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
// ======================================================================== // // Copyright 2009-2019 Intel Corporation // // // // 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. // // ======================================================================== // #pragma once #include <mutex> namespace ospcommon { namespace utility { /* This implements a 1-to-1 value fence. One thread can set (or "queue") a * value for another thread to later get. This is conceptually similar to * "doublebuffering" a single value. Note that all values from the producer * thread overwrite the "queued" value, where the consumer thread will * always get the last value set by the producer thread. */ template <typename T> class TransactionalValue { public: TransactionalValue() = default; ~TransactionalValue() = default; template <typename OtherType> TransactionalValue(const OtherType &ot); template <typename OtherType> TransactionalValue &operator=(const OtherType &ot); TransactionalValue<T> &operator=(const TransactionalValue<T> &fp); T &ref(); T get(); bool update(); private: bool newValue{false}; T queuedValue; T currentValue; std::mutex mutex; }; // Inlined TransactionalValue Members ///////////////////////////////////// template <typename T> template <typename OtherType> inline TransactionalValue<T>::TransactionalValue(const OtherType &ot) { currentValue = ot; } template <typename T> template <typename OtherType> inline TransactionalValue<T> &TransactionalValue<T>::operator=( const OtherType &ot) { std::lock_guard<std::mutex> lock{mutex}; queuedValue = ot; newValue = true; return *this; } template <typename T> inline TransactionalValue<T> &TransactionalValue<T>::operator=( const TransactionalValue<T> &fp) { std::lock_guard<std::mutex> lock{mutex}; queuedValue = fp.ref(); newValue = true; return *this; } template <typename T> inline T &TransactionalValue<T>::ref() { return currentValue; } template <typename T> inline T TransactionalValue<T>::get() { return currentValue; } template <typename T> inline bool TransactionalValue<T>::update() { bool didUpdate = false; if (newValue) { std::lock_guard<std::mutex> lock{mutex}; currentValue = std::move(queuedValue); newValue = false; didUpdate = true; } return didUpdate; } } // namespace utility } // namespace ospcommon
36.99
95
(translation_unit) "// ======================================================================== //\n// Copyright 2009-2019 Intel Corporation //\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\n#pragma once\n\n#include <mutex>\n\nnamespace ospcommon {\n namespace utility {\n\n /* This implements a 1-to-1 value fence. One thread can set (or "queue") a\n * value for another thread to later get. This is conceptually similar to\n * "doublebuffering" a single value. Note that all values from the producer\n * thread overwrite the "queued" value, where the consumer thread will\n * always get the last value set by the producer thread.\n */\n template <typename T>\n class TransactionalValue\n {\n public:\n TransactionalValue() = default;\n ~TransactionalValue() = default;\n\n template <typename OtherType>\n TransactionalValue(const OtherType &ot);\n\n template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot);\n\n TransactionalValue<T> &operator=(const TransactionalValue<T> &fp);\n\n T &ref();\n T get();\n\n bool update();\n\n private:\n bool newValue{false};\n T queuedValue;\n T currentValue;\n\n std::mutex mutex;\n };\n\n // Inlined TransactionalValue Members /////////////////////////////////////\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T>::TransactionalValue(const OtherType &ot)\n {\n currentValue = ot;\n }\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const OtherType &ot)\n {\n std::lock_guard<std::mutex> lock{mutex};\n queuedValue = ot;\n newValue = true;\n return *this;\n }\n\n template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const TransactionalValue<T> &fp)\n {\n std::lock_guard<std::mutex> lock{mutex};\n queuedValue = fp.ref();\n newValue = true;\n return *this;\n }\n\n template <typename T>\n inline T &TransactionalValue<T>::ref()\n {\n return currentValue;\n }\n\n template <typename T>\n inline T TransactionalValue<T>::get()\n {\n return currentValue;\n }\n\n template <typename T>\n inline bool TransactionalValue<T>::update()\n {\n bool didUpdate = false;\n if (newValue) {\n std::lock_guard<std::mutex> lock{mutex};\n currentValue = std::move(queuedValue);\n newValue = false;\n didUpdate = true;\n }\n\n return didUpdate;\n }\n\n } // namespace utility\n} // namespace ospcommon\n" (comment) "// ======================================================================== //" (comment) "// Copyright 2009-2019 Intel Corporation //" (comment) "// //" (comment) "// Licensed under the Apache License, Version 2.0 (the "License"); //" (comment) "// you may not use this file except in compliance with the License. //" (comment) "// You may obtain a copy of the License at //" (comment) "// //" (comment) "// http://www.apache.org/licenses/LICENSE-2.0 //" (comment) "// //" (comment) "// Unless required by applicable law or agreed to in writing, software //" (comment) "// distributed under the License is distributed on an "AS IS" BASIS, //" (comment) "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //" (comment) "// See the License for the specific language governing permissions and //" (comment) "// limitations under the License. //" (comment) "// ======================================================================== //" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <mutex>\n" (#include) "#include" (system_lib_string) "<mutex>" (ERROR) "namespace ospcommon {\n namespace utility {\n\n /* This implements a 1-to-1 value fence. One thread can set (or "queue") a\n * value for another thread to later get. This is conceptually similar to\n * "doublebuffering" a single value. Note that all values from the producer\n * thread overwrite the "queued" value, where the consumer thread will\n * always get the last value set by the producer thread.\n */\n template <typename T>\n class TransactionalValue\n {\n public:\n TransactionalValue() = default;\n ~TransactionalValue() = default;\n\n template <typename OtherType>\n TransactionalValue(const OtherType &ot);\n\n template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot);\n\n TransactionalValue<T> &operator=(const TransactionalValue<T> &fp);\n\n T &ref();\n T get();\n\n bool update();\n\n private:\n bool newValue{false};\n T queuedValue;\n T currentValue;\n\n std::mutex mutex;\n };\n\n // Inlined TransactionalValue Members /////////////////////////////////////\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T>::TransactionalValue(const OtherType &ot)\n {\n currentValue = ot;\n }\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const OtherType &ot)\n {\n std::lock_guard<std::mutex> lock{mutex};\n queuedValue = ot;\n newValue = true;\n return *this;\n }\n\n template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const TransactionalValue<T> &fp)\n {\n std::lock_guard<std::mutex> lock{mutex};\n queuedValue = fp.ref();\n newValue = true;\n return *this;\n }\n\n template <typename T>\n inline T &TransactionalValue<T>::ref()\n {\n return currentValue;\n }\n\n template <typename T>\n inline T TransactionalValue<T>::get()\n {\n return currentValue;\n }\n\n template <typename T>\n inline bool TransactionalValue<T>::update()\n {\n bool didUpdate = false;\n if (newValue) {\n std::lock_guard<std::mutex> lock{mutex};\n currentValue = std::move(queuedValue);\n newValue = false;\n didUpdate = true;\n }\n\n return didUpdate;\n }\n\n } // namespace utility\n}" (type_identifier) "namespace" (identifier) "ospcommon" ({) "{" (function_definition) "namespace utility {\n\n /* This implements a 1-to-1 value fence. One thread can set (or "queue") a\n * value for another thread to later get. This is conceptually similar to\n * "doublebuffering" a single value. Note that all values from the producer\n * thread overwrite the "queued" value, where the consumer thread will\n * always get the last value set by the producer thread.\n */\n template <typename T>\n class TransactionalValue\n {\n public:\n TransactionalValue() = default;\n ~TransactionalValue() = default;\n\n template <typename OtherType>\n TransactionalValue(const OtherType &ot);\n\n template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot);\n\n TransactionalValue<T> &operator=(const TransactionalValue<T> &fp);\n\n T &ref();\n T get();\n\n bool update();\n\n private:\n bool newValue{false};\n T queuedValue;\n T currentValue;\n\n std::mutex mutex;\n };\n\n // Inlined TransactionalValue Members /////////////////////////////////////\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T>::TransactionalValue(const OtherType &ot)\n {\n currentValue = ot;\n }" (type_identifier) "namespace" (identifier) "utility" (compound_statement) "{\n\n /* This implements a 1-to-1 value fence. One thread can set (or "queue") a\n * value for another thread to later get. This is conceptually similar to\n * "doublebuffering" a single value. Note that all values from the producer\n * thread overwrite the "queued" value, where the consumer thread will\n * always get the last value set by the producer thread.\n */\n template <typename T>\n class TransactionalValue\n {\n public:\n TransactionalValue() = default;\n ~TransactionalValue() = default;\n\n template <typename OtherType>\n TransactionalValue(const OtherType &ot);\n\n template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot);\n\n TransactionalValue<T> &operator=(const TransactionalValue<T> &fp);\n\n T &ref();\n T get();\n\n bool update();\n\n private:\n bool newValue{false};\n T queuedValue;\n T currentValue;\n\n std::mutex mutex;\n };\n\n // Inlined TransactionalValue Members /////////////////////////////////////\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T>::TransactionalValue(const OtherType &ot)\n {\n currentValue = ot;\n }" ({) "{" (comment) "/* This implements a 1-to-1 value fence. One thread can set (or "queue") a\n * value for another thread to later get. This is conceptually similar to\n * "doublebuffering" a single value. Note that all values from the producer\n * thread overwrite the "queued" value, where the consumer thread will\n * always get the last value set by the producer thread.\n */" (ERROR) "template <typename T>\n class TransactionalValue" (binary_expression) "template <typename T>\n class" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "class" (identifier) "TransactionalValue" (compound_statement) "{\n public:\n TransactionalValue() = default;\n ~TransactionalValue() = default;\n\n template <typename OtherType>\n TransactionalValue(const OtherType &ot);\n\n template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot);\n\n TransactionalValue<T> &operator=(const TransactionalValue<T> &fp);\n\n T &ref();\n T get();\n\n bool update();\n\n private:\n bool newValue{false};\n T queuedValue;\n T currentValue;\n\n std::mutex mutex;\n }" ({) "{" (labeled_statement) "public:\n TransactionalValue() = default;" (statement_identifier) "public" (:) ":" (expression_statement) "TransactionalValue() = default;" (assignment_expression) "TransactionalValue() = default" (call_expression) "TransactionalValue()" (identifier) "TransactionalValue" (argument_list) "()" (() "(" ()) ")" (=) "=" (identifier) "default" (;) ";" (expression_statement) "~TransactionalValue() = default;" (unary_expression) "~TransactionalValue() = default" (~) "~" (assignment_expression) "TransactionalValue() = default" (call_expression) "TransactionalValue()" (identifier) "TransactionalValue" (argument_list) "()" (() "(" ()) ")" (=) "=" (identifier) "default" (;) ";" (expression_statement) "template <typename OtherType>\n TransactionalValue(const OtherType &ot);" (binary_expression) "template <typename OtherType>\n TransactionalValue(const OtherType &ot)" (binary_expression) "template <typename OtherType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "OtherType" (>) ">" (call_expression) "TransactionalValue(const OtherType &ot)" (identifier) "TransactionalValue" (argument_list) "(const OtherType &ot)" (() "(" (ERROR) "const" (identifier) "const" (binary_expression) "OtherType &ot" (identifier) "OtherType" (&) "&" (identifier) "ot" ()) ")" (;) ";" (expression_statement) "template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot);" (binary_expression) "template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot)" (binary_expression) "template <typename OtherType>\n TransactionalValue" (binary_expression) "template <typename OtherType" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "OtherType" (>) ">" (identifier) "TransactionalValue" (&) "&" (assignment_expression) "operator=(const OtherType &ot)" (identifier) "operator" (=) "=" (parenthesized_expression) "(const OtherType &ot)" (() "(" (ERROR) "const OtherType" (type_descriptor) "const OtherType" (type_qualifier) "const" (const) "const" (type_identifier) "OtherType" (pointer_expression) "&ot" (&) "&" (identifier) "ot" ()) ")" (;) ";" (expression_statement) "TransactionalValue<T> &operator=(const TransactionalValue<T> &fp);" (binary_expression) "TransactionalValue<T> &operator=(const TransactionalValue<T> &fp" (binary_expression) "TransactionalValue<T> &operator=(const TransactionalValue<T" (binary_expression) "TransactionalValue<T> &operator" (binary_expression) "TransactionalValue<T" (identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "&operator" (&) "&" (identifier) "operator" (ERROR) "=(const TransactionalValue" (=) "=" (() "(" (type_descriptor) "const TransactionalValue" (type_qualifier) "const" (const) "const" (type_identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "&fp" (&) "&" (identifier) "fp" (ERROR) ")" ()) ")" (;) ";" (expression_statement) "T &ref();" (binary_expression) "T &ref()" (identifier) "T" (&) "&" (call_expression) "ref()" (identifier) "ref" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "T get();" (type_identifier) "T" (function_declarator) "get()" (identifier) "get" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool update();" (primitive_type) "bool" (function_declarator) "update()" (identifier) "update" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n bool newValue{false};" (statement_identifier) "private" (:) ":" (ERROR) "bool newValue{false}" (primitive_type) "bool" (identifier) "newValue" ({) "{" (false) "false" (}) "}" (expression_statement) ";" (;) ";" (declaration) "T queuedValue;" (type_identifier) "T" (identifier) "queuedValue" (;) ";" (declaration) "T currentValue;" (type_identifier) "T" (identifier) "currentValue" (;) ";" (labeled_statement) "std::mutex mutex;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "mutex mutex;" (type_identifier) "mutex" (identifier) "mutex" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "// Inlined TransactionalValue Members /////////////////////////////////////" (expression_statement) "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T>::TransactionalValue(const OtherType &ot)\n {\n currentValue = ot;" (binary_expression) "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T>::TransactionalValue(const OtherType &ot)\n {\n currentValue = ot" (binary_expression) "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T" (binary_expression) "template <typename T>\n template <typename OtherType>\n inline TransactionalValue" (binary_expression) "template <typename T>\n template <typename OtherType" (binary_expression) "template <typename T>\n template" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "OtherType" (>) ">" (ERROR) "inline" (identifier) "inline" (identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (ERROR) "::TransactionalValue(const OtherType &ot)\n {" (:) ":" (:) ":" (call_expression) "TransactionalValue(const OtherType &ot)" (identifier) "TransactionalValue" (argument_list) "(const OtherType &ot)" (() "(" (ERROR) "const" (identifier) "const" (binary_expression) "OtherType &ot" (identifier) "OtherType" (&) "&" (identifier) "ot" ()) ")" ({) "{" (assignment_expression) "currentValue = ot" (identifier) "currentValue" (=) "=" (identifier) "ot" (;) ";" (}) "}" (expression_statement) "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const OtherType &ot)" (binary_expression) "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const OtherType &ot)" (binary_expression) "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue<T" (binary_expression) "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue" (binary_expression) "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T" (binary_expression) "template <typename T>\n template <typename OtherType>\n inline TransactionalValue" (binary_expression) "template <typename T>\n template <typename OtherType" (binary_expression) "template <typename T>\n template" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "template" (<) "<" (ERROR) "typename" (identifier) "typename" (identifier) "OtherType" (>) ">" (ERROR) "inline" (identifier) "inline" (identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "&TransactionalValue" (&) "&" (identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (ERROR) "::" (:) ":" (:) ":" (assignment_expression) "operator=(\n const OtherType &ot)" (identifier) "operator" (=) "=" (parenthesized_expression) "(\n const OtherType &ot)" (() "(" (ERROR) "const OtherType" (type_descriptor) "const OtherType" (type_qualifier) "const" (const) "const" (type_identifier) "OtherType" (pointer_expression) "&ot" (&) "&" (identifier) "ot" ()) ")" (;) "" ({) "{" (labeled_statement) "std::lock_guard<std::mutex> lock" (statement_identifier) "std" (ERROR) "::lock_guard<std:" (:) ":" (:) ":" (binary_expression) "lock_guard<std" (identifier) "lock_guard" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> lock" (binary_expression) "mutex> lock" (identifier) "mutex" (>) ">" (identifier) "lock" (;) "" (compound_statement) "{mutex};\n queuedValue = ot;\n newValue = true;\n return *this;\n }" ({) "{" (type_identifier) "mutex" (ERROR) "}" (}) "}" (;) ";" (expression_statement) "queuedValue = ot;" (assignment_expression) "queuedValue = ot" (identifier) "queuedValue" (=) "=" (identifier) "ot" (;) ";" (expression_statement) "newValue = true;" (assignment_expression) "newValue = true" (identifier) "newValue" (=) "=" (true) "true" (;) ";" (return_statement) "return *this;" (return) "return" (pointer_expression) "*this" (*) "*" (identifier) "this" (;) ";" (}) "}" (ERROR) "template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const TransactionalValue<T> &fp)" (binary_expression) "template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const TransactionalValue<T> &fp" (binary_expression) "template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const TransactionalValue<T" (binary_expression) "template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator" (binary_expression) "template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T" (binary_expression) "template <typename T>\n inline TransactionalValue<T> &TransactionalValue" (binary_expression) "template <typename T>\n inline TransactionalValue<T" (binary_expression) "template <typename T>\n inline TransactionalValue" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "inline" (identifier) "inline" (identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "&TransactionalValue" (&) "&" (identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (ERROR) "::" (:) ":" (:) ":" (identifier) "operator" (ERROR) "=(\n const TransactionalValue" (=) "=" (() "(" (type_descriptor) "const TransactionalValue" (type_qualifier) "const" (const) "const" (type_identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "&fp" (&) "&" (identifier) "fp" ()) ")" (compound_statement) "{\n std::lock_guard<std::mutex> lock{mutex};\n queuedValue = fp.ref();\n newValue = true;\n return *this;\n }\n\n template <typename T>\n inline T &TransactionalValue<T>::ref()\n {\n return currentValue;\n }\n\n template <typename T>\n inline T TransactionalValue<T>::get()\n {\n return currentValue;\n }\n\n template <typename T>\n inline bool TransactionalValue<T>::update()\n {\n bool didUpdate = false;\n if (newValue) {\n std::lock_guard<std::mutex> lock{mutex};\n currentValue = std::move(queuedValue);\n newValue = false;\n didUpdate = true;\n }\n\n return didUpdate;\n }\n\n } // namespace utility\n}" ({) "{" (labeled_statement) "std::lock_guard<std::mutex> lock" (statement_identifier) "std" (ERROR) "::lock_guard<std:" (:) ":" (:) ":" (binary_expression) "lock_guard<std" (identifier) "lock_guard" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> lock" (binary_expression) "mutex> lock" (identifier) "mutex" (>) ">" (identifier) "lock" (;) "" (compound_statement) "{mutex};\n queuedValue = fp.ref();\n newValue = true;\n return *this;\n }" ({) "{" (type_identifier) "mutex" (ERROR) "}" (}) "}" (;) ";" (expression_statement) "queuedValue = fp.ref();" (assignment_expression) "queuedValue = fp.ref()" (identifier) "queuedValue" (=) "=" (call_expression) "fp.ref()" (field_expression) "fp.ref" (identifier) "fp" (.) "." (field_identifier) "ref" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "newValue = true;" (assignment_expression) "newValue = true" (identifier) "newValue" (=) "=" (true) "true" (;) ";" (return_statement) "return *this;" (return) "return" (pointer_expression) "*this" (*) "*" (identifier) "this" (;) ";" (}) "}" (expression_statement) "template <typename T>\n inline T &TransactionalValue<T>::ref()" (binary_expression) "template <typename T>\n inline T &TransactionalValue<T>::ref()" (binary_expression) "template <typename T>\n inline" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "inline" (ERROR) "T" (identifier) "T" (&) "&" (binary_expression) "TransactionalValue<T>::ref()" (binary_expression) "TransactionalValue<T" (identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (ERROR) "::" (:) ":" (:) ":" (call_expression) "ref()" (identifier) "ref" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{\n return currentValue;\n }" ({) "{" (return_statement) "return currentValue;" (return) "return" (identifier) "currentValue" (;) ";" (}) "}" (expression_statement) "template <typename T>\n inline T TransactionalValue<T>::get()" (binary_expression) "template <typename T>\n inline T TransactionalValue<T>::get()" (binary_expression) "template <typename T>\n inline T TransactionalValue<T" (binary_expression) "template <typename T>\n inline T TransactionalValue" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "inline T" (identifier) "inline" (identifier) "T" (identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (ERROR) "::" (:) ":" (:) ":" (call_expression) "get()" (identifier) "get" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{\n return currentValue;\n }" ({) "{" (return_statement) "return currentValue;" (return) "return" (identifier) "currentValue" (;) ";" (}) "}" (expression_statement) "template <typename T>\n inline bool TransactionalValue<T>::update()" (binary_expression) "template <typename T>\n inline bool TransactionalValue<T>::update()" (binary_expression) "template <typename T>\n inline bool TransactionalValue<T" (binary_expression) "template <typename T>\n inline bool TransactionalValue" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "inline bool" (identifier) "inline" (identifier) "bool" (identifier) "TransactionalValue" (<) "<" (identifier) "T" (>) ">" (ERROR) "::" (:) ":" (:) ":" (call_expression) "update()" (identifier) "update" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{\n bool didUpdate = false;\n if (newValue) {\n std::lock_guard<std::mutex> lock{mutex};\n currentValue = std::move(queuedValue);\n newValue = false;\n didUpdate = true;\n }\n\n return didUpdate;\n }\n\n }" ({) "{" (declaration) "bool didUpdate = false;" (primitive_type) "bool" (init_declarator) "didUpdate = false" (identifier) "didUpdate" (=) "=" (false) "false" (;) ";" (if_statement) "if (newValue) {\n std::lock_guard<std::mutex> lock{mutex};\n currentValue = std::move(queuedValue);\n newValue = false;\n didUpdate = true;\n }\n\n return didUpdate;\n }" (if) "if" (parenthesized_expression) "(newValue)" (() "(" (identifier) "newValue" ()) ")" (compound_statement) "{\n std::lock_guard<std::mutex> lock{mutex};\n currentValue = std::move(queuedValue);\n newValue = false;\n didUpdate = true;\n }\n\n return didUpdate;\n }" ({) "{" (labeled_statement) "std::lock_guard<std::mutex> lock" (statement_identifier) "std" (ERROR) "::lock_guard<std:" (:) ":" (:) ":" (binary_expression) "lock_guard<std" (identifier) "lock_guard" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> lock" (binary_expression) "mutex> lock" (identifier) "mutex" (>) ">" (identifier) "lock" (;) "" (compound_statement) "{mutex};\n currentValue = std::move(queuedValue);\n newValue = false;\n didUpdate = true;\n }" ({) "{" (type_identifier) "mutex" (ERROR) "}" (}) "}" (;) ";" (ERROR) "currentValue = std::" (assignment_expression) "currentValue = std" (identifier) "currentValue" (=) "=" (identifier) "std" (:) ":" (:) ":" (expression_statement) "move(queuedValue);" (call_expression) "move(queuedValue)" (identifier) "move" (argument_list) "(queuedValue)" (() "(" (identifier) "queuedValue" ()) ")" (;) ";" (expression_statement) "newValue = false;" (assignment_expression) "newValue = false" (identifier) "newValue" (=) "=" (false) "false" (;) ";" (expression_statement) "didUpdate = true;" (assignment_expression) "didUpdate = true" (identifier) "didUpdate" (=) "=" (true) "true" (;) ";" (}) "}" (return_statement) "return didUpdate;" (return) "return" (identifier) "didUpdate" (;) ";" (}) "}" (}) "}" (comment) "// namespace utility" (}) "}" (comment) "// namespace ospcommon"
614
42
{"language": "c", "success": true, "metadata": {"lines": 95, "avg_line_length": 36.99, "nodes": 388, "errors": 0, "source_hash": "0601f02b066644f5ae7fb147e8fa5ea82bbad20511bec23b860061fe3d4d3c7a", "categorized_nodes": 256}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <mutex>\n", "parent": null, "children": [4, 5], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<mutex>", "parent": 3, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 16}}, {"id": 6, "type": "ERROR", "text": "namespace ospcommon {\n namespace utility {\n\n /* This implements a 1-to-1 value fence. One thread can set (or \"queue\") a\n * value for another thread to later get. This is conceptually similar to\n * \"doublebuffering\" a single value. Note that all values from the producer\n * thread overwrite the \"queued\" value, where the consumer thread will\n * always get the last value set by the producer thread.\n */\n template <typename T>\n class TransactionalValue\n {\n public:\n TransactionalValue() = default;\n ~TransactionalValue() = default;\n\n template <typename OtherType>\n TransactionalValue(const OtherType &ot);\n\n template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot);\n\n TransactionalValue<T> &operator=(const TransactionalValue<T> &fp);\n\n T &ref();\n T get();\n\n bool update();\n\n private:\n bool newValue{false};\n T queuedValue;\n T currentValue;\n\n std::mutex mutex;\n };\n\n // Inlined TransactionalValue Members /////////////////////////////////////\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T>::TransactionalValue(const OtherType &ot)\n {\n currentValue = ot;\n }\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const OtherType &ot)\n {\n std::lock_guard<std::mutex> lock{mutex};\n queuedValue = ot;\n newValue = true;\n return *this;\n }\n\n template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const TransactionalValue<T> &fp)\n {\n std::lock_guard<std::mutex> lock{mutex};\n queuedValue = fp.ref();\n newValue = true;\n return *this;\n }\n\n template <typename T>\n inline T &TransactionalValue<T>::ref()\n {\n return currentValue;\n }\n\n template <typename T>\n inline T TransactionalValue<T>::get()\n {\n return currentValue;\n }\n\n template <typename T>\n inline bool TransactionalValue<T>::update()\n {\n bool didUpdate = false;\n if (newValue) {\n std::lock_guard<std::mutex> lock{mutex};\n currentValue = std::move(queuedValue);\n newValue = false;\n didUpdate = true;\n }\n\n return didUpdate;\n }\n\n } // namespace utility\n}", "parent": null, "children": [7, 8, 9, 195, 219], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 114, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "namespace", "parent": 6, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 9}}, {"id": 8, "type": "identifier", "text": "ospcommon", "parent": 6, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 19}}, {"id": 9, "type": "function_definition", "text": "namespace utility {\n\n /* This implements a 1-to-1 value fence. One thread can set (or \"queue\") a\n * value for another thread to later get. This is conceptually similar to\n * \"doublebuffering\" a single value. Note that all values from the producer\n * thread overwrite the \"queued\" value, where the consumer thread will\n * always get the last value set by the producer thread.\n */\n template <typename T>\n class TransactionalValue\n {\n public:\n TransactionalValue() = default;\n ~TransactionalValue() = default;\n\n template <typename OtherType>\n TransactionalValue(const OtherType &ot);\n\n template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot);\n\n TransactionalValue<T> &operator=(const TransactionalValue<T> &fp);\n\n T &ref();\n T get();\n\n bool update();\n\n private:\n bool newValue{false};\n T queuedValue;\n T currentValue;\n\n std::mutex mutex;\n };\n\n // Inlined TransactionalValue Members /////////////////////////////////////\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T>::TransactionalValue(const OtherType &ot)\n {\n currentValue = ot;\n }", "parent": 6, "children": [10, 11], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 64, "column": 5}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 11}}, {"id": 11, "type": "identifier", "text": "utility", "parent": 9, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 19}}, {"id": 12, "type": "ERROR", "text": "template <typename T>\n class TransactionalValue", "parent": 9, "children": [13, 21], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 30, "column": 28}}, {"id": 13, "type": "binary_expression", "text": "template <typename T>\n class", "parent": 12, "children": [14, 18, 20], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 30, "column": 9}}, {"id": 14, "type": "binary_expression", "text": "template <typename", "parent": 13, "children": [15, 16, 17], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 22}}, {"id": 15, "type": "identifier", "text": "template", "parent": 14, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 12}}, {"id": 16, "type": "<", "text": "<", "parent": 14, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 14}}, {"id": 17, "type": "identifier", "text": "typename", "parent": 14, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 22}}, {"id": 18, "type": "ERROR", "text": "T", "parent": 13, "children": [19], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 24}}, {"id": 19, "type": "identifier", "text": "T", "parent": 18, "children": [], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 24}}, {"id": 20, "type": ">", "text": ">", "parent": 13, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 25}}, {"id": 21, "type": "identifier", "text": "TransactionalValue", "parent": 12, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 28}}, {"id": 22, "type": "labeled_statement", "text": "public:\n TransactionalValue() = default;", "parent": 9, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 33, "column": 38}}, {"id": 23, "type": "assignment_expression", "text": "TransactionalValue() = default", "parent": 22, "children": [24, 27, 28], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 37}}, {"id": 24, "type": "call_expression", "text": "TransactionalValue()", "parent": 23, "children": [25, 26], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 26}}, {"id": 25, "type": "identifier", "text": "TransactionalValue", "parent": 24, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 24}}, {"id": 26, "type": "argument_list", "text": "()", "parent": 24, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 26}}, {"id": 27, "type": "=", "text": "=", "parent": 23, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 29}}, {"id": 28, "type": "identifier", "text": "default", "parent": 23, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 37}}, {"id": 29, "type": "unary_expression", "text": "~TransactionalValue() = default", "parent": 9, "children": [30, 31], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 37}}, {"id": 30, "type": "~", "text": "~", "parent": 29, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 7}}, {"id": 31, "type": "assignment_expression", "text": "TransactionalValue() = default", "parent": 29, "children": [32, 35, 36], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 37}}, {"id": 32, "type": "call_expression", "text": "TransactionalValue()", "parent": 31, "children": [33, 34], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 27}}, {"id": 33, "type": "identifier", "text": "TransactionalValue", "parent": 32, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 25}}, {"id": 34, "type": "argument_list", "text": "()", "parent": 32, "children": [], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 27}}, {"id": 35, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 34, "column": 28}, "end_point": {"row": 34, "column": 29}}, {"id": 36, "type": "identifier", "text": "default", "parent": 31, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 37}}, {"id": 37, "type": "binary_expression", "text": "template <typename OtherType>\n TransactionalValue(const OtherType &ot)", "parent": 9, "children": [38, 44, 45], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 37, "column": 45}}, {"id": 38, "type": "binary_expression", "text": "template <typename OtherType", "parent": 37, "children": [39, 40, 41, 43], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 34}}, {"id": 39, "type": "identifier", "text": "template", "parent": 38, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 14}}, {"id": 40, "type": "<", "text": "<", "parent": 38, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 16}}, {"id": 41, "type": "ERROR", "text": "typename", "parent": 38, "children": [42], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 24}}, {"id": 42, "type": "identifier", "text": "typename", "parent": 41, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 24}}, {"id": 43, "type": "identifier", "text": "OtherType", "parent": 38, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 34}}, {"id": 44, "type": ">", "text": ">", "parent": 37, "children": [], "start_point": {"row": 36, "column": 34}, "end_point": {"row": 36, "column": 35}}, {"id": 45, "type": "call_expression", "text": "TransactionalValue(const OtherType &ot)", "parent": 37, "children": [46, 47], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 45}}, {"id": 46, "type": "identifier", "text": "TransactionalValue", "parent": 45, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 24}}, {"id": 47, "type": "argument_list", "text": "(const OtherType &ot)", "parent": 45, "children": [48], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 45}}, {"id": 48, "type": "binary_expression", "text": "OtherType &ot", "parent": 47, "children": [49, 50], "start_point": {"row": 37, "column": 31}, "end_point": {"row": 37, "column": 44}}, {"id": 49, "type": "identifier", "text": "OtherType", "parent": 48, "children": [], "start_point": {"row": 37, "column": 31}, "end_point": {"row": 37, "column": 40}}, {"id": 50, "type": "identifier", "text": "ot", "parent": 48, "children": [], "start_point": {"row": 37, "column": 42}, "end_point": {"row": 37, "column": 44}}, {"id": 51, "type": "binary_expression", "text": "template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot)", "parent": 9, "children": [52, 61], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 40, "column": 56}}, {"id": 52, "type": "binary_expression", "text": "template <typename OtherType>\n TransactionalValue", "parent": 51, "children": [53, 59, 60], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 40, "column": 24}}, {"id": 53, "type": "binary_expression", "text": "template <typename OtherType", "parent": 52, "children": [54, 55, 56, 58], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 34}}, {"id": 54, "type": "identifier", "text": "template", "parent": 53, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 14}}, {"id": 55, "type": "<", "text": "<", "parent": 53, "children": [], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 16}}, {"id": 56, "type": "ERROR", "text": "typename", "parent": 53, "children": [57], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 24}}, {"id": 57, "type": "identifier", "text": "typename", "parent": 56, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 24}}, {"id": 58, "type": "identifier", "text": "OtherType", "parent": 53, "children": [], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 34}}, {"id": 59, "type": ">", "text": ">", "parent": 52, "children": [], "start_point": {"row": 39, "column": 34}, "end_point": {"row": 39, "column": 35}}, {"id": 60, "type": "identifier", "text": "TransactionalValue", "parent": 52, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 24}}, {"id": 61, "type": "assignment_expression", "text": "operator=(const OtherType &ot)", "parent": 51, "children": [62, 63, 64], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 56}}, {"id": 62, "type": "identifier", "text": "operator", "parent": 61, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 34}}, {"id": 63, "type": "=", "text": "=", "parent": 61, "children": [], "start_point": {"row": 40, "column": 34}, "end_point": {"row": 40, "column": 35}}, {"id": 64, "type": "parenthesized_expression", "text": "(const OtherType &ot)", "parent": 61, "children": [65, 68], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 56}}, {"id": 65, "type": "ERROR", "text": "const OtherType", "parent": 64, "children": [66], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 51}}, {"id": 66, "type": "type_descriptor", "text": "const OtherType", "parent": 65, "children": [67], "start_point": {"row": 40, "column": 36}, "end_point": {"row": 40, "column": 51}}, {"id": 67, "type": "type_identifier", "text": "OtherType", "parent": 66, "children": [], "start_point": {"row": 40, "column": 42}, "end_point": {"row": 40, "column": 51}}, {"id": 68, "type": "pointer_expression", "text": "&ot", "parent": 64, "children": [69], "start_point": {"row": 40, "column": 52}, "end_point": {"row": 40, "column": 55}}, {"id": 69, "type": "identifier", "text": "ot", "parent": 68, "children": [], "start_point": {"row": 40, "column": 53}, "end_point": {"row": 40, "column": 55}}, {"id": 70, "type": "binary_expression", "text": "TransactionalValue<T> &operator=(const TransactionalValue<T> &fp", "parent": 9, "children": [71, 86, 87], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 70}}, {"id": 71, "type": "binary_expression", "text": "TransactionalValue<T> &operator=(const TransactionalValue<T", "parent": 70, "children": [72, 80, 84, 85], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 65}}, {"id": 72, "type": "binary_expression", "text": "TransactionalValue<T> &operator", "parent": 71, "children": [73, 77, 78], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 37}}, {"id": 73, "type": "binary_expression", "text": "TransactionalValue<T", "parent": 72, "children": [74, 75, 76], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 26}}, {"id": 74, "type": "identifier", "text": "TransactionalValue", "parent": 73, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 24}}, {"id": 75, "type": "<", "text": "<", "parent": 73, "children": [], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 25}}, {"id": 76, "type": "identifier", "text": "T", "parent": 73, "children": [], "start_point": {"row": 42, "column": 25}, "end_point": {"row": 42, "column": 26}}, {"id": 77, "type": ">", "text": ">", "parent": 72, "children": [], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 27}}, {"id": 78, "type": "pointer_expression", "text": "&operator", "parent": 72, "children": [79], "start_point": {"row": 42, "column": 28}, "end_point": {"row": 42, "column": 37}}, {"id": 79, "type": "identifier", "text": "operator", "parent": 78, "children": [], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 37}}, {"id": 80, "type": "ERROR", "text": "=(const TransactionalValue", "parent": 71, "children": [81, 82], "start_point": {"row": 42, "column": 37}, "end_point": {"row": 42, "column": 63}}, {"id": 81, "type": "=", "text": "=", "parent": 80, "children": [], "start_point": {"row": 42, "column": 37}, "end_point": {"row": 42, "column": 38}}, {"id": 82, "type": "type_descriptor", "text": "const TransactionalValue", "parent": 80, "children": [83], "start_point": {"row": 42, "column": 39}, "end_point": {"row": 42, "column": 63}}, {"id": 83, "type": "type_identifier", "text": "TransactionalValue", "parent": 82, "children": [], "start_point": {"row": 42, "column": 45}, "end_point": {"row": 42, "column": 63}}, {"id": 84, "type": "<", "text": "<", "parent": 71, "children": [], "start_point": {"row": 42, "column": 63}, "end_point": {"row": 42, "column": 64}}, {"id": 85, "type": "identifier", "text": "T", "parent": 71, "children": [], "start_point": {"row": 42, "column": 64}, "end_point": {"row": 42, "column": 65}}, {"id": 86, "type": ">", "text": ">", "parent": 70, "children": [], "start_point": {"row": 42, "column": 65}, "end_point": {"row": 42, "column": 66}}, {"id": 87, "type": "pointer_expression", "text": "&fp", "parent": 70, "children": [88], "start_point": {"row": 42, "column": 67}, "end_point": {"row": 42, "column": 70}}, {"id": 88, "type": "identifier", "text": "fp", "parent": 87, "children": [], "start_point": {"row": 42, "column": 68}, "end_point": {"row": 42, "column": 70}}, {"id": 89, "type": "binary_expression", "text": "T &ref()", "parent": 9, "children": [90, 91], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 14}}, {"id": 90, "type": "identifier", "text": "T", "parent": 89, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 7}}, {"id": 91, "type": "call_expression", "text": "ref()", "parent": 89, "children": [92, 93], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 14}}, {"id": 92, "type": "identifier", "text": "ref", "parent": 91, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 12}}, {"id": 93, "type": "argument_list", "text": "()", "parent": 91, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 14}}, {"id": 94, "type": "declaration", "text": "T get();", "parent": 9, "children": [95, 96], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 14}}, {"id": 95, "type": "type_identifier", "text": "T", "parent": 94, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 7}}, {"id": 96, "type": "function_declarator", "text": "get()", "parent": 94, "children": [97, 98], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 13}}, {"id": 97, "type": "identifier", "text": "get", "parent": 96, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 11}}, {"id": 98, "type": "parameter_list", "text": "()", "parent": 96, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 13}}, {"id": 99, "type": "declaration", "text": "bool update();", "parent": 9, "children": [100, 101], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 20}}, {"id": 100, "type": "primitive_type", "text": "bool", "parent": 99, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 10}}, {"id": 101, "type": "function_declarator", "text": "update()", "parent": 99, "children": [102, 103], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 19}}, {"id": 102, "type": "identifier", "text": "update", "parent": 101, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 17}}, {"id": 103, "type": "parameter_list", "text": "()", "parent": 101, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 19}}, {"id": 104, "type": "labeled_statement", "text": "private:\n bool newValue{false};", "parent": 9, "children": [105], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 50, "column": 27}}, {"id": 105, "type": "ERROR", "text": "bool newValue{false}", "parent": 104, "children": [106, 107, 108], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 26}}, {"id": 106, "type": "primitive_type", "text": "bool", "parent": 105, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 10}}, {"id": 107, "type": "identifier", "text": "newValue", "parent": 105, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 19}}, {"id": 108, "type": "false", "text": "false", "parent": 105, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 25}}, {"id": 109, "type": "declaration", "text": "T queuedValue;", "parent": 9, "children": [110, 111], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 20}}, {"id": 110, "type": "type_identifier", "text": "T", "parent": 109, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 7}}, {"id": 111, "type": "identifier", "text": "queuedValue", "parent": 109, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 19}}, {"id": 112, "type": "declaration", "text": "T currentValue;", "parent": 9, "children": [113, 114], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 21}}, {"id": 113, "type": "type_identifier", "text": "T", "parent": 112, "children": [], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 7}}, {"id": 114, "type": "identifier", "text": "currentValue", "parent": 112, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 20}}, {"id": 115, "type": "labeled_statement", "text": "std::mutex mutex;", "parent": 9, "children": [116, 117], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 23}}, {"id": 116, "type": "statement_identifier", "text": "std", "parent": 115, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 9}}, {"id": 117, "type": "declaration", "text": "mutex mutex;", "parent": 115, "children": [118, 119], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 23}}, {"id": 118, "type": "type_identifier", "text": "mutex", "parent": 117, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 16}}, {"id": 119, "type": "identifier", "text": "mutex", "parent": 117, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 22}}, {"id": 120, "type": "binary_expression", "text": "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T>::TransactionalValue(const OtherType &ot)\n {\n currentValue = ot", "parent": 9, "children": [121, 143, 144, 151], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 63, "column": 23}}, {"id": 121, "type": "binary_expression", "text": "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T", "parent": 120, "children": [122, 141, 142], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 61, "column": 31}}, {"id": 122, "type": "binary_expression", "text": "template <typename T>\n template <typename OtherType>\n inline TransactionalValue", "parent": 121, "children": [123, 137, 138, 140], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 61, "column": 29}}, {"id": 123, "type": "binary_expression", "text": "template <typename T>\n template <typename OtherType", "parent": 122, "children": [124, 133, 134, 136], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 60, "column": 32}}, {"id": 124, "type": "binary_expression", "text": "template <typename T>\n template", "parent": 123, "children": [125, 129, 131, 132], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 60, "column": 12}}, {"id": 125, "type": "binary_expression", "text": "template <typename", "parent": 124, "children": [126, 127, 128], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 22}}, {"id": 126, "type": "identifier", "text": "template", "parent": 125, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 12}}, {"id": 127, "type": "<", "text": "<", "parent": 125, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 14}}, {"id": 128, "type": "identifier", "text": "typename", "parent": 125, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 22}}, {"id": 129, "type": "ERROR", "text": "T", "parent": 124, "children": [130], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 24}}, {"id": 130, "type": "identifier", "text": "T", "parent": 129, "children": [], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 24}}, {"id": 131, "type": ">", "text": ">", "parent": 124, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 25}}, {"id": 132, "type": "identifier", "text": "template", "parent": 124, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 12}}, {"id": 133, "type": "<", "text": "<", "parent": 123, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 14}}, {"id": 134, "type": "ERROR", "text": "typename", "parent": 123, "children": [135], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 22}}, {"id": 135, "type": "identifier", "text": "typename", "parent": 134, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 22}}, {"id": 136, "type": "identifier", "text": "OtherType", "parent": 123, "children": [], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 32}}, {"id": 137, "type": ">", "text": ">", "parent": 122, "children": [], "start_point": {"row": 60, "column": 32}, "end_point": {"row": 60, "column": 33}}, {"id": 138, "type": "ERROR", "text": "inline", "parent": 122, "children": [139], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 10}}, {"id": 139, "type": "identifier", "text": "inline", "parent": 138, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 10}}, {"id": 140, "type": "identifier", "text": "TransactionalValue", "parent": 122, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 29}}, {"id": 141, "type": "<", "text": "<", "parent": 121, "children": [], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 61, "column": 30}}, {"id": 142, "type": "identifier", "text": "T", "parent": 121, "children": [], "start_point": {"row": 61, "column": 30}, "end_point": {"row": 61, "column": 31}}, {"id": 143, "type": ">", "text": ">", "parent": 120, "children": [], "start_point": {"row": 61, "column": 31}, "end_point": {"row": 61, "column": 32}}, {"id": 144, "type": "ERROR", "text": "::TransactionalValue(const OtherType &ot)\n {", "parent": 120, "children": [145], "start_point": {"row": 61, "column": 32}, "end_point": {"row": 62, "column": 5}}, {"id": 145, "type": "call_expression", "text": "TransactionalValue(const OtherType &ot)", "parent": 144, "children": [146, 147], "start_point": {"row": 61, "column": 34}, "end_point": {"row": 61, "column": 73}}, {"id": 146, "type": "identifier", "text": "TransactionalValue", "parent": 145, "children": [], "start_point": {"row": 61, "column": 34}, "end_point": {"row": 61, "column": 52}}, {"id": 147, "type": "argument_list", "text": "(const OtherType &ot)", "parent": 145, "children": [148], "start_point": {"row": 61, "column": 52}, "end_point": {"row": 61, "column": 73}}, {"id": 148, "type": "binary_expression", "text": "OtherType &ot", "parent": 147, "children": [149, 150], "start_point": {"row": 61, "column": 59}, "end_point": {"row": 61, "column": 72}}, {"id": 149, "type": "identifier", "text": "OtherType", "parent": 148, "children": [], "start_point": {"row": 61, "column": 59}, "end_point": {"row": 61, "column": 68}}, {"id": 150, "type": "identifier", "text": "ot", "parent": 148, "children": [], "start_point": {"row": 61, "column": 70}, "end_point": {"row": 61, "column": 72}}, {"id": 151, "type": "assignment_expression", "text": "currentValue = ot", "parent": 120, "children": [152, 153, 154], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 23}}, {"id": 152, "type": "identifier", "text": "currentValue", "parent": 151, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 18}}, {"id": 153, "type": "=", "text": "=", "parent": 151, "children": [], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 20}}, {"id": 154, "type": "identifier", "text": "ot", "parent": 151, "children": [], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 23}}, {"id": 155, "type": "binary_expression", "text": "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const OtherType &ot)", "parent": 6, "children": [156, 185, 186], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 69, "column": 28}}, {"id": 156, "type": "binary_expression", "text": "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue<T", "parent": 155, "children": [157, 183, 184], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 68, "column": 54}}, {"id": 157, "type": "binary_expression", "text": "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue", "parent": 156, "children": [158, 180, 181], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 68, "column": 52}}, {"id": 158, "type": "binary_expression", "text": "template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T", "parent": 157, "children": [159, 178, 179], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 68, "column": 31}}, {"id": 159, "type": "binary_expression", "text": "template <typename T>\n template <typename OtherType>\n inline TransactionalValue", "parent": 158, "children": [160, 174, 175, 177], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 68, "column": 29}}, {"id": 160, "type": "binary_expression", "text": "template <typename T>\n template <typename OtherType", "parent": 159, "children": [161, 170, 171, 173], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 67, "column": 32}}, {"id": 161, "type": "binary_expression", "text": "template <typename T>\n template", "parent": 160, "children": [162, 166, 168, 169], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 67, "column": 12}}, {"id": 162, "type": "binary_expression", "text": "template <typename", "parent": 161, "children": [163, 164, 165], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 22}}, {"id": 163, "type": "identifier", "text": "template", "parent": 162, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 12}}, {"id": 164, "type": "<", "text": "<", "parent": 162, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 14}}, {"id": 165, "type": "identifier", "text": "typename", "parent": 162, "children": [], "start_point": {"row": 66, "column": 14}, "end_point": {"row": 66, "column": 22}}, {"id": 166, "type": "ERROR", "text": "T", "parent": 161, "children": [167], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 24}}, {"id": 167, "type": "identifier", "text": "T", "parent": 166, "children": [], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 24}}, {"id": 168, "type": ">", "text": ">", "parent": 161, "children": [], "start_point": {"row": 66, "column": 24}, "end_point": {"row": 66, "column": 25}}, {"id": 169, "type": "identifier", "text": "template", "parent": 161, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 12}}, {"id": 170, "type": "<", "text": "<", "parent": 160, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 14}}, {"id": 171, "type": "ERROR", "text": "typename", "parent": 160, "children": [172], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 22}}, {"id": 172, "type": "identifier", "text": "typename", "parent": 171, "children": [], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 22}}, {"id": 173, "type": "identifier", "text": "OtherType", "parent": 160, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 32}}, {"id": 174, "type": ">", "text": ">", "parent": 159, "children": [], "start_point": {"row": 67, "column": 32}, "end_point": {"row": 67, "column": 33}}, {"id": 175, "type": "ERROR", "text": "inline", "parent": 159, "children": [176], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 10}}, {"id": 176, "type": "identifier", "text": "inline", "parent": 175, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 10}}, {"id": 177, "type": "identifier", "text": "TransactionalValue", "parent": 159, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 29}}, {"id": 178, "type": "<", "text": "<", "parent": 158, "children": [], "start_point": {"row": 68, "column": 29}, "end_point": {"row": 68, "column": 30}}, {"id": 179, "type": "identifier", "text": "T", "parent": 158, "children": [], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 31}}, {"id": 180, "type": ">", "text": ">", "parent": 157, "children": [], "start_point": {"row": 68, "column": 31}, "end_point": {"row": 68, "column": 32}}, {"id": 181, "type": "pointer_expression", "text": "&TransactionalValue", "parent": 157, "children": [182], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 52}}, {"id": 182, "type": "identifier", "text": "TransactionalValue", "parent": 181, "children": [], "start_point": {"row": 68, "column": 34}, "end_point": {"row": 68, "column": 52}}, {"id": 183, "type": "<", "text": "<", "parent": 156, "children": [], "start_point": {"row": 68, "column": 52}, "end_point": {"row": 68, "column": 53}}, {"id": 184, "type": "identifier", "text": "T", "parent": 156, "children": [], "start_point": {"row": 68, "column": 53}, "end_point": {"row": 68, "column": 54}}, {"id": 185, "type": ">", "text": ">", "parent": 155, "children": [], "start_point": {"row": 68, "column": 54}, "end_point": {"row": 68, "column": 55}}, {"id": 186, "type": "assignment_expression", "text": "operator=(\n const OtherType &ot)", "parent": 155, "children": [187, 188, 189], "start_point": {"row": 68, "column": 57}, "end_point": {"row": 69, "column": 28}}, {"id": 187, "type": "identifier", "text": "operator", "parent": 186, "children": [], "start_point": {"row": 68, "column": 57}, "end_point": {"row": 68, "column": 65}}, {"id": 188, "type": "=", "text": "=", "parent": 186, "children": [], "start_point": {"row": 68, "column": 65}, "end_point": {"row": 68, "column": 66}}, {"id": 189, "type": "parenthesized_expression", "text": "(\n const OtherType &ot)", "parent": 186, "children": [190, 193], "start_point": {"row": 68, "column": 66}, "end_point": {"row": 69, "column": 28}}, {"id": 190, "type": "ERROR", "text": "const OtherType", "parent": 189, "children": [191], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 23}}, {"id": 191, "type": "type_descriptor", "text": "const OtherType", "parent": 190, "children": [192], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 23}}, {"id": 192, "type": "type_identifier", "text": "OtherType", "parent": 191, "children": [], "start_point": {"row": 69, "column": 14}, "end_point": {"row": 69, "column": 23}}, {"id": 193, "type": "pointer_expression", "text": "&ot", "parent": 189, "children": [194], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 27}}, {"id": 194, "type": "identifier", "text": "ot", "parent": 193, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 27}}, {"id": 195, "type": "labeled_statement", "text": "std::lock_guard<std::mutex> lock", "parent": 6, "children": [196, 197], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 38}}, {"id": 196, "type": "statement_identifier", "text": "std", "parent": 195, "children": [], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 9}}, {"id": 197, "type": "ERROR", "text": "::lock_guard<std:", "parent": 195, "children": [198], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 26}}, {"id": 198, "type": "binary_expression", "text": "lock_guard<std", "parent": 197, "children": [199, 200, 201], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 25}}, {"id": 199, "type": "identifier", "text": "lock_guard", "parent": 198, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 21}}, {"id": 200, "type": "<", "text": "<", "parent": 198, "children": [], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 22}}, {"id": 201, "type": "identifier", "text": "std", "parent": 198, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 25}}, {"id": 202, "type": "binary_expression", "text": "mutex> lock", "parent": 195, "children": [203, 204, 205], "start_point": {"row": 71, "column": 27}, "end_point": {"row": 71, "column": 38}}, {"id": 203, "type": "identifier", "text": "mutex", "parent": 202, "children": [], "start_point": {"row": 71, "column": 27}, "end_point": {"row": 71, "column": 32}}, {"id": 204, "type": ">", "text": ">", "parent": 202, "children": [], "start_point": {"row": 71, "column": 32}, "end_point": {"row": 71, "column": 33}}, {"id": 205, "type": "identifier", "text": "lock", "parent": 202, "children": [], "start_point": {"row": 71, "column": 34}, "end_point": {"row": 71, "column": 38}}, {"id": 206, "type": "type_identifier", "text": "mutex", "parent": 6, "children": [], "start_point": {"row": 71, "column": 39}, "end_point": {"row": 71, "column": 44}}, {"id": 207, "type": "assignment_expression", "text": "queuedValue = ot", "parent": 6, "children": [208, 209, 210], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 22}}, {"id": 208, "type": "identifier", "text": "queuedValue", "parent": 207, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 17}}, {"id": 209, "type": "=", "text": "=", "parent": 207, "children": [], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 19}}, {"id": 210, "type": "identifier", "text": "ot", "parent": 207, "children": [], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 22}}, {"id": 211, "type": "assignment_expression", "text": "newValue = true", "parent": 6, "children": [212, 213, 214], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 24}}, {"id": 212, "type": "identifier", "text": "newValue", "parent": 211, "children": [], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 14}}, {"id": 213, "type": "=", "text": "=", "parent": 211, "children": [], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 19}}, {"id": 214, "type": "true", "text": "true", "parent": 211, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 24}}, {"id": 215, "type": "return_statement", "text": "return *this;", "parent": 6, "children": [216], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 19}}, {"id": 216, "type": "pointer_expression", "text": "*this", "parent": 215, "children": [217, 218], "start_point": {"row": 74, "column": 13}, "end_point": {"row": 74, "column": 18}}, {"id": 217, "type": "*", "text": "*", "parent": 216, "children": [], "start_point": {"row": 74, "column": 13}, "end_point": {"row": 74, "column": 14}}, {"id": 218, "type": "identifier", "text": "this", "parent": 216, "children": [], "start_point": {"row": 74, "column": 14}, "end_point": {"row": 74, "column": 18}}, {"id": 219, "type": "ERROR", "text": "template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const TransactionalValue<T> &fp)", "parent": 6, "children": [220], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 79, "column": 40}}, {"id": 220, "type": "binary_expression", "text": "template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const TransactionalValue<T> &fp", "parent": 219, "children": [221, 252, 253], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 79, "column": 39}}, {"id": 221, "type": "binary_expression", "text": "template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const TransactionalValue<T", "parent": 220, "children": [222, 246, 250, 251], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 79, "column": 34}}, {"id": 222, "type": "binary_expression", "text": "template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator", "parent": 221, "children": [223, 244, 245], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 78, "column": 65}}, {"id": 223, "type": "binary_expression", "text": "template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T", "parent": 222, "children": [224, 242, 243], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 78, "column": 54}}, {"id": 224, "type": "binary_expression", "text": "template <typename T>\n inline TransactionalValue<T> &TransactionalValue", "parent": 223, "children": [225, 239, 240], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 78, "column": 52}}, {"id": 225, "type": "binary_expression", "text": "template <typename T>\n inline TransactionalValue<T", "parent": 224, "children": [226, 237, 238], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 78, "column": 31}}, {"id": 226, "type": "binary_expression", "text": "template <typename T>\n inline TransactionalValue", "parent": 225, "children": [227, 231, 233, 234, 236], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 78, "column": 29}}, {"id": 227, "type": "binary_expression", "text": "template <typename", "parent": 226, "children": [228, 229, 230], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 22}}, {"id": 228, "type": "identifier", "text": "template", "parent": 227, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 12}}, {"id": 229, "type": "<", "text": "<", "parent": 227, "children": [], "start_point": {"row": 77, "column": 13}, "end_point": {"row": 77, "column": 14}}, {"id": 230, "type": "identifier", "text": "typename", "parent": 227, "children": [], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 22}}, {"id": 231, "type": "ERROR", "text": "T", "parent": 226, "children": [232], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 24}}, {"id": 232, "type": "identifier", "text": "T", "parent": 231, "children": [], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 24}}, {"id": 233, "type": ">", "text": ">", "parent": 226, "children": [], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 25}}, {"id": 234, "type": "ERROR", "text": "inline", "parent": 226, "children": [235], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 10}}, {"id": 235, "type": "identifier", "text": "inline", "parent": 234, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 10}}, {"id": 236, "type": "identifier", "text": "TransactionalValue", "parent": 226, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 29}}, {"id": 237, "type": "<", "text": "<", "parent": 225, "children": [], "start_point": {"row": 78, "column": 29}, "end_point": {"row": 78, "column": 30}}, {"id": 238, "type": "identifier", "text": "T", "parent": 225, "children": [], "start_point": {"row": 78, "column": 30}, "end_point": {"row": 78, "column": 31}}, {"id": 239, "type": ">", "text": ">", "parent": 224, "children": [], "start_point": {"row": 78, "column": 31}, "end_point": {"row": 78, "column": 32}}, {"id": 240, "type": "pointer_expression", "text": "&TransactionalValue", "parent": 224, "children": [241], "start_point": {"row": 78, "column": 33}, "end_point": {"row": 78, "column": 52}}, {"id": 241, "type": "identifier", "text": "TransactionalValue", "parent": 240, "children": [], "start_point": {"row": 78, "column": 34}, "end_point": {"row": 78, "column": 52}}, {"id": 242, "type": "<", "text": "<", "parent": 223, "children": [], "start_point": {"row": 78, "column": 52}, "end_point": {"row": 78, "column": 53}}, {"id": 243, "type": "identifier", "text": "T", "parent": 223, "children": [], "start_point": {"row": 78, "column": 53}, "end_point": {"row": 78, "column": 54}}, {"id": 244, "type": ">", "text": ">", "parent": 222, "children": [], "start_point": {"row": 78, "column": 54}, "end_point": {"row": 78, "column": 55}}, {"id": 245, "type": "identifier", "text": "operator", "parent": 222, "children": [], "start_point": {"row": 78, "column": 57}, "end_point": {"row": 78, "column": 65}}, {"id": 246, "type": "ERROR", "text": "=(\n const TransactionalValue", "parent": 221, "children": [247, 248], "start_point": {"row": 78, "column": 65}, "end_point": {"row": 79, "column": 32}}, {"id": 247, "type": "=", "text": "=", "parent": 246, "children": [], "start_point": {"row": 78, "column": 65}, "end_point": {"row": 78, "column": 66}}, {"id": 248, "type": "type_descriptor", "text": "const TransactionalValue", "parent": 246, "children": [249], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 32}}, {"id": 249, "type": "type_identifier", "text": "TransactionalValue", "parent": 248, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 32}}, {"id": 250, "type": "<", "text": "<", "parent": 221, "children": [], "start_point": {"row": 79, "column": 32}, "end_point": {"row": 79, "column": 33}}, {"id": 251, "type": "identifier", "text": "T", "parent": 221, "children": [], "start_point": {"row": 79, "column": 33}, "end_point": {"row": 79, "column": 34}}, {"id": 252, "type": ">", "text": ">", "parent": 220, "children": [], "start_point": {"row": 79, "column": 34}, "end_point": {"row": 79, "column": 35}}, {"id": 253, "type": "pointer_expression", "text": "&fp", "parent": 220, "children": [254], "start_point": {"row": 79, "column": 36}, "end_point": {"row": 79, "column": 39}}, {"id": 254, "type": "identifier", "text": "fp", "parent": 253, "children": [], "start_point": {"row": 79, "column": 37}, "end_point": {"row": 79, "column": 39}}, {"id": 255, "type": "labeled_statement", "text": "std::lock_guard<std::mutex> lock", "parent": 6, "children": [256, 257], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 38}}, {"id": 256, "type": "statement_identifier", "text": "std", "parent": 255, "children": [], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 9}}, {"id": 257, "type": "ERROR", "text": "::lock_guard<std:", "parent": 255, "children": [258], "start_point": {"row": 81, "column": 9}, "end_point": {"row": 81, "column": 26}}, {"id": 258, "type": "binary_expression", "text": "lock_guard<std", "parent": 257, "children": [259, 260, 261], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 25}}, {"id": 259, "type": "identifier", "text": "lock_guard", "parent": 258, "children": [], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 21}}, {"id": 260, "type": "<", "text": "<", "parent": 258, "children": [], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 22}}, {"id": 261, "type": "identifier", "text": "std", "parent": 258, "children": [], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 25}}, {"id": 262, "type": "binary_expression", "text": "mutex> lock", "parent": 255, "children": [263, 264, 265], "start_point": {"row": 81, "column": 27}, "end_point": {"row": 81, "column": 38}}, {"id": 263, "type": "identifier", "text": "mutex", "parent": 262, "children": [], "start_point": {"row": 81, "column": 27}, "end_point": {"row": 81, "column": 32}}, {"id": 264, "type": ">", "text": ">", "parent": 262, "children": [], "start_point": {"row": 81, "column": 32}, "end_point": {"row": 81, "column": 33}}, {"id": 265, "type": "identifier", "text": "lock", "parent": 262, "children": [], "start_point": {"row": 81, "column": 34}, "end_point": {"row": 81, "column": 38}}, {"id": 266, "type": "type_identifier", "text": "mutex", "parent": 6, "children": [], "start_point": {"row": 81, "column": 39}, "end_point": {"row": 81, "column": 44}}, {"id": 267, "type": "assignment_expression", "text": "queuedValue = fp.ref()", "parent": 6, "children": [268, 269, 270], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 28}}, {"id": 268, "type": "identifier", "text": "queuedValue", "parent": 267, "children": [], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 17}}, {"id": 269, "type": "=", "text": "=", "parent": 267, "children": [], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 19}}, {"id": 270, "type": "call_expression", "text": "fp.ref()", "parent": 267, "children": [271, 274], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 28}}, {"id": 271, "type": "field_expression", "text": "fp.ref", "parent": 270, "children": [272, 273], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 26}}, {"id": 272, "type": "identifier", "text": "fp", "parent": 271, "children": [], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 22}}, {"id": 273, "type": "field_identifier", "text": "ref", "parent": 271, "children": [], "start_point": {"row": 82, "column": 23}, "end_point": {"row": 82, "column": 26}}, {"id": 274, "type": "argument_list", "text": "()", "parent": 270, "children": [], "start_point": {"row": 82, "column": 26}, "end_point": {"row": 82, "column": 28}}, {"id": 275, "type": "assignment_expression", "text": "newValue = true", "parent": 6, "children": [276, 277, 278], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 24}}, {"id": 276, "type": "identifier", "text": "newValue", "parent": 275, "children": [], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 14}}, {"id": 277, "type": "=", "text": "=", "parent": 275, "children": [], "start_point": {"row": 83, "column": 18}, "end_point": {"row": 83, "column": 19}}, {"id": 278, "type": "true", "text": "true", "parent": 275, "children": [], "start_point": {"row": 83, "column": 20}, "end_point": {"row": 83, "column": 24}}, {"id": 279, "type": "return_statement", "text": "return *this;", "parent": 6, "children": [280], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 19}}, {"id": 280, "type": "pointer_expression", "text": "*this", "parent": 279, "children": [281, 282], "start_point": {"row": 84, "column": 13}, "end_point": {"row": 84, "column": 18}}, {"id": 281, "type": "*", "text": "*", "parent": 280, "children": [], "start_point": {"row": 84, "column": 13}, "end_point": {"row": 84, "column": 14}}, {"id": 282, "type": "identifier", "text": "this", "parent": 280, "children": [], "start_point": {"row": 84, "column": 14}, "end_point": {"row": 84, "column": 18}}, {"id": 283, "type": "binary_expression", "text": "template <typename T>\n inline T &TransactionalValue<T>::ref()", "parent": 6, "children": [284, 293, 295], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 88, "column": 42}}, {"id": 284, "type": "binary_expression", "text": "template <typename T>\n inline", "parent": 283, "children": [285, 289, 291, 292], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 88, "column": 10}}, {"id": 285, "type": "binary_expression", "text": "template <typename", "parent": 284, "children": [286, 287, 288], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 22}}, {"id": 286, "type": "identifier", "text": "template", "parent": 285, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 12}}, {"id": 287, "type": "<", "text": "<", "parent": 285, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 14}}, {"id": 288, "type": "identifier", "text": "typename", "parent": 285, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 22}}, {"id": 289, "type": "ERROR", "text": "T", "parent": 284, "children": [290], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 24}}, {"id": 290, "type": "identifier", "text": "T", "parent": 289, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 24}}, {"id": 291, "type": ">", "text": ">", "parent": 284, "children": [], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 25}}, {"id": 292, "type": "identifier", "text": "inline", "parent": 284, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 10}}, {"id": 293, "type": "ERROR", "text": "T", "parent": 283, "children": [294], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 12}}, {"id": 294, "type": "identifier", "text": "T", "parent": 293, "children": [], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 12}}, {"id": 295, "type": "binary_expression", "text": "TransactionalValue<T>::ref()", "parent": 283, "children": [296, 300, 301], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 42}}, {"id": 296, "type": "binary_expression", "text": "TransactionalValue<T", "parent": 295, "children": [297, 298, 299], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 34}}, {"id": 297, "type": "identifier", "text": "TransactionalValue", "parent": 296, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 32}}, {"id": 298, "type": "<", "text": "<", "parent": 296, "children": [], "start_point": {"row": 88, "column": 32}, "end_point": {"row": 88, "column": 33}}, {"id": 299, "type": "identifier", "text": "T", "parent": 296, "children": [], "start_point": {"row": 88, "column": 33}, "end_point": {"row": 88, "column": 34}}, {"id": 300, "type": ">", "text": ">", "parent": 295, "children": [], "start_point": {"row": 88, "column": 34}, "end_point": {"row": 88, "column": 35}}, {"id": 301, "type": "call_expression", "text": "ref()", "parent": 295, "children": [302, 303], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 42}}, {"id": 302, "type": "identifier", "text": "ref", "parent": 301, "children": [], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 40}}, {"id": 303, "type": "argument_list", "text": "()", "parent": 301, "children": [], "start_point": {"row": 88, "column": 40}, "end_point": {"row": 88, "column": 42}}, {"id": 304, "type": "return_statement", "text": "return currentValue;", "parent": 6, "children": [305], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 26}}, {"id": 305, "type": "identifier", "text": "currentValue", "parent": 304, "children": [], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 25}}, {"id": 306, "type": "binary_expression", "text": "template <typename T>\n inline T TransactionalValue<T>::get()", "parent": 6, "children": [307, 322, 323], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 94, "column": 41}}, {"id": 307, "type": "binary_expression", "text": "template <typename T>\n inline T TransactionalValue<T", "parent": 306, "children": [308, 320, 321], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 94, "column": 33}}, {"id": 308, "type": "binary_expression", "text": "template <typename T>\n inline T TransactionalValue", "parent": 307, "children": [309, 313, 315, 316, 319], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 94, "column": 31}}, {"id": 309, "type": "binary_expression", "text": "template <typename", "parent": 308, "children": [310, 311, 312], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 22}}, {"id": 310, "type": "identifier", "text": "template", "parent": 309, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 12}}, {"id": 311, "type": "<", "text": "<", "parent": 309, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 14}}, {"id": 312, "type": "identifier", "text": "typename", "parent": 309, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 22}}, {"id": 313, "type": "ERROR", "text": "T", "parent": 308, "children": [314], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 24}}, {"id": 314, "type": "identifier", "text": "T", "parent": 313, "children": [], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 24}}, {"id": 315, "type": ">", "text": ">", "parent": 308, "children": [], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 25}}, {"id": 316, "type": "ERROR", "text": "inline T", "parent": 308, "children": [317, 318], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 12}}, {"id": 317, "type": "identifier", "text": "inline", "parent": 316, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 10}}, {"id": 318, "type": "identifier", "text": "T", "parent": 316, "children": [], "start_point": {"row": 94, "column": 11}, "end_point": {"row": 94, "column": 12}}, {"id": 319, "type": "identifier", "text": "TransactionalValue", "parent": 308, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 31}}, {"id": 320, "type": "<", "text": "<", "parent": 307, "children": [], "start_point": {"row": 94, "column": 31}, "end_point": {"row": 94, "column": 32}}, {"id": 321, "type": "identifier", "text": "T", "parent": 307, "children": [], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 33}}, {"id": 322, "type": ">", "text": ">", "parent": 306, "children": [], "start_point": {"row": 94, "column": 33}, "end_point": {"row": 94, "column": 34}}, {"id": 323, "type": "call_expression", "text": "get()", "parent": 306, "children": [324, 325], "start_point": {"row": 94, "column": 36}, "end_point": {"row": 94, "column": 41}}, {"id": 324, "type": "identifier", "text": "get", "parent": 323, "children": [], "start_point": {"row": 94, "column": 36}, "end_point": {"row": 94, "column": 39}}, {"id": 325, "type": "argument_list", "text": "()", "parent": 323, "children": [], "start_point": {"row": 94, "column": 39}, "end_point": {"row": 94, "column": 41}}, {"id": 326, "type": "return_statement", "text": "return currentValue;", "parent": 6, "children": [327], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 26}}, {"id": 327, "type": "identifier", "text": "currentValue", "parent": 326, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 25}}, {"id": 328, "type": "binary_expression", "text": "template <typename T>\n inline bool TransactionalValue<T>::update()", "parent": 6, "children": [329, 344, 345], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 100, "column": 47}}, {"id": 329, "type": "binary_expression", "text": "template <typename T>\n inline bool TransactionalValue<T", "parent": 328, "children": [330, 342, 343], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 100, "column": 36}}, {"id": 330, "type": "binary_expression", "text": "template <typename T>\n inline bool TransactionalValue", "parent": 329, "children": [331, 335, 337, 338, 341], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 100, "column": 34}}, {"id": 331, "type": "binary_expression", "text": "template <typename", "parent": 330, "children": [332, 333, 334], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 22}}, {"id": 332, "type": "identifier", "text": "template", "parent": 331, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 12}}, {"id": 333, "type": "<", "text": "<", "parent": 331, "children": [], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 14}}, {"id": 334, "type": "identifier", "text": "typename", "parent": 331, "children": [], "start_point": {"row": 99, "column": 14}, "end_point": {"row": 99, "column": 22}}, {"id": 335, "type": "ERROR", "text": "T", "parent": 330, "children": [336], "start_point": {"row": 99, "column": 23}, "end_point": {"row": 99, "column": 24}}, {"id": 336, "type": "identifier", "text": "T", "parent": 335, "children": [], "start_point": {"row": 99, "column": 23}, "end_point": {"row": 99, "column": 24}}, {"id": 337, "type": ">", "text": ">", "parent": 330, "children": [], "start_point": {"row": 99, "column": 24}, "end_point": {"row": 99, "column": 25}}, {"id": 338, "type": "ERROR", "text": "inline bool", "parent": 330, "children": [339, 340], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 15}}, {"id": 339, "type": "identifier", "text": "inline", "parent": 338, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 10}}, {"id": 340, "type": "identifier", "text": "bool", "parent": 338, "children": [], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 15}}, {"id": 341, "type": "identifier", "text": "TransactionalValue", "parent": 330, "children": [], "start_point": {"row": 100, "column": 16}, "end_point": {"row": 100, "column": 34}}, {"id": 342, "type": "<", "text": "<", "parent": 329, "children": [], "start_point": {"row": 100, "column": 34}, "end_point": {"row": 100, "column": 35}}, {"id": 343, "type": "identifier", "text": "T", "parent": 329, "children": [], "start_point": {"row": 100, "column": 35}, "end_point": {"row": 100, "column": 36}}, {"id": 344, "type": ">", "text": ">", "parent": 328, "children": [], "start_point": {"row": 100, "column": 36}, "end_point": {"row": 100, "column": 37}}, {"id": 345, "type": "call_expression", "text": "update()", "parent": 328, "children": [346, 347], "start_point": {"row": 100, "column": 39}, "end_point": {"row": 100, "column": 47}}, {"id": 346, "type": "identifier", "text": "update", "parent": 345, "children": [], "start_point": {"row": 100, "column": 39}, "end_point": {"row": 100, "column": 45}}, {"id": 347, "type": "argument_list", "text": "()", "parent": 345, "children": [], "start_point": {"row": 100, "column": 45}, "end_point": {"row": 100, "column": 47}}, {"id": 348, "type": "declaration", "text": "bool didUpdate = false;", "parent": 6, "children": [349, 350], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 29}}, {"id": 349, "type": "primitive_type", "text": "bool", "parent": 348, "children": [], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 10}}, {"id": 350, "type": "init_declarator", "text": "didUpdate = false", "parent": 348, "children": [351, 352, 353], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 28}}, {"id": 351, "type": "identifier", "text": "didUpdate", "parent": 350, "children": [], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 20}}, {"id": 352, "type": "=", "text": "=", "parent": 350, "children": [], "start_point": {"row": 102, "column": 21}, "end_point": {"row": 102, "column": 22}}, {"id": 353, "type": "false", "text": "false", "parent": 350, "children": [], "start_point": {"row": 102, "column": 23}, "end_point": {"row": 102, "column": 28}}, {"id": 354, "type": "if_statement", "text": "if (newValue) {\n std::lock_guard<std::mutex> lock{mutex};\n currentValue = std::move(queuedValue);\n newValue = false;\n didUpdate = true;\n }\n\n return didUpdate;\n }", "parent": 6, "children": [355], "start_point": {"row": 103, "column": 6}, "end_point": {"row": 111, "column": 5}}, {"id": 355, "type": "parenthesized_expression", "text": "(newValue)", "parent": 354, "children": [356], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 19}}, {"id": 356, "type": "identifier", "text": "newValue", "parent": 355, "children": [], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 18}}, {"id": 357, "type": "labeled_statement", "text": "std::lock_guard<std::mutex> lock", "parent": 354, "children": [358, 359], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 40}}, {"id": 358, "type": "statement_identifier", "text": "std", "parent": 357, "children": [], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 11}}, {"id": 359, "type": "ERROR", "text": "::lock_guard<std:", "parent": 357, "children": [360], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 28}}, {"id": 360, "type": "binary_expression", "text": "lock_guard<std", "parent": 359, "children": [361, 362, 363], "start_point": {"row": 104, "column": 13}, "end_point": {"row": 104, "column": 27}}, {"id": 361, "type": "identifier", "text": "lock_guard", "parent": 360, "children": [], "start_point": {"row": 104, "column": 13}, "end_point": {"row": 104, "column": 23}}, {"id": 362, "type": "<", "text": "<", "parent": 360, "children": [], "start_point": {"row": 104, "column": 23}, "end_point": {"row": 104, "column": 24}}, {"id": 363, "type": "identifier", "text": "std", "parent": 360, "children": [], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 27}}, {"id": 364, "type": "binary_expression", "text": "mutex> lock", "parent": 357, "children": [365, 366, 367], "start_point": {"row": 104, "column": 29}, "end_point": {"row": 104, "column": 40}}, {"id": 365, "type": "identifier", "text": "mutex", "parent": 364, "children": [], "start_point": {"row": 104, "column": 29}, "end_point": {"row": 104, "column": 34}}, {"id": 366, "type": ">", "text": ">", "parent": 364, "children": [], "start_point": {"row": 104, "column": 34}, "end_point": {"row": 104, "column": 35}}, {"id": 367, "type": "identifier", "text": "lock", "parent": 364, "children": [], "start_point": {"row": 104, "column": 36}, "end_point": {"row": 104, "column": 40}}, {"id": 368, "type": "type_identifier", "text": "mutex", "parent": 354, "children": [], "start_point": {"row": 104, "column": 41}, "end_point": {"row": 104, "column": 46}}, {"id": 369, "type": "ERROR", "text": "currentValue = std::", "parent": 354, "children": [370], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 28}}, {"id": 370, "type": "assignment_expression", "text": "currentValue = std", "parent": 369, "children": [371, 372, 373], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 26}}, {"id": 371, "type": "identifier", "text": "currentValue", "parent": 370, "children": [], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 20}}, {"id": 372, "type": "=", "text": "=", "parent": 370, "children": [], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 22}}, {"id": 373, "type": "identifier", "text": "std", "parent": 370, "children": [], "start_point": {"row": 105, "column": 23}, "end_point": {"row": 105, "column": 26}}, {"id": 374, "type": "call_expression", "text": "move(queuedValue)", "parent": 354, "children": [375, 376], "start_point": {"row": 105, "column": 28}, "end_point": {"row": 105, "column": 45}}, {"id": 375, "type": "identifier", "text": "move", "parent": 374, "children": [], "start_point": {"row": 105, "column": 28}, "end_point": {"row": 105, "column": 32}}, {"id": 376, "type": "argument_list", "text": "(queuedValue)", "parent": 374, "children": [377], "start_point": {"row": 105, "column": 32}, "end_point": {"row": 105, "column": 45}}, {"id": 377, "type": "identifier", "text": "queuedValue", "parent": 376, "children": [], "start_point": {"row": 105, "column": 33}, "end_point": {"row": 105, "column": 44}}, {"id": 378, "type": "assignment_expression", "text": "newValue = false", "parent": 354, "children": [379, 380, 381], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 28}}, {"id": 379, "type": "identifier", "text": "newValue", "parent": 378, "children": [], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 16}}, {"id": 380, "type": "=", "text": "=", "parent": 378, "children": [], "start_point": {"row": 106, "column": 21}, "end_point": {"row": 106, "column": 22}}, {"id": 381, "type": "false", "text": "false", "parent": 378, "children": [], "start_point": {"row": 106, "column": 23}, "end_point": {"row": 106, "column": 28}}, {"id": 382, "type": "assignment_expression", "text": "didUpdate = true", "parent": 354, "children": [383, 384, 385], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 27}}, {"id": 383, "type": "identifier", "text": "didUpdate", "parent": 382, "children": [], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 17}}, {"id": 384, "type": "=", "text": "=", "parent": 382, "children": [], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 22}}, {"id": 385, "type": "true", "text": "true", "parent": 382, "children": [], "start_point": {"row": 107, "column": 23}, "end_point": {"row": 107, "column": 27}}, {"id": 386, "type": "return_statement", "text": "return didUpdate;", "parent": 354, "children": [387], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 23}}, {"id": 387, "type": "identifier", "text": "didUpdate", "parent": 386, "children": [], "start_point": {"row": 110, "column": 13}, "end_point": {"row": 110, "column": 22}}]}, "node_categories": {"declarations": {"functions": [9, 96, 101], "variables": [94, 99, 109, 112, 117, 348], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [13, 14, 24, 29, 32, 37, 38, 45, 48, 51, 52, 53, 64, 68, 70, 71, 72, 73, 78, 87, 89, 91, 120, 121, 122, 123, 124, 125, 145, 148, 155, 156, 157, 158, 159, 160, 161, 162, 181, 189, 193, 198, 202, 216, 220, 221, 222, 223, 224, 225, 226, 227, 240, 253, 258, 262, 270, 271, 280, 283, 284, 285, 295, 296, 301, 306, 307, 308, 309, 323, 328, 329, 330, 331, 345, 355, 360, 364, 374], "assignments": [23, 31, 61, 151, 186, 207, 211, 267, 275, 370, 378, 382], "loops": [], "conditionals": [7, 8, 10, 11, 15, 17, 19, 21, 25, 28, 33, 36, 39, 42, 43, 46, 49, 50, 54, 57, 58, 60, 62, 67, 69, 74, 76, 79, 83, 85, 88, 90, 92, 95, 97, 102, 107, 110, 111, 113, 114, 116, 118, 119, 126, 128, 130, 132, 135, 136, 139, 140, 142, 146, 149, 150, 152, 154, 163, 165, 167, 169, 172, 173, 176, 177, 179, 182, 184, 187, 192, 194, 196, 199, 201, 203, 205, 206, 208, 210, 212, 218, 228, 230, 232, 235, 236, 238, 241, 243, 245, 249, 251, 254, 256, 259, 261, 263, 265, 266, 268, 272, 273, 276, 282, 286, 288, 290, 292, 294, 297, 299, 302, 305, 310, 312, 314, 317, 318, 319, 321, 324, 327, 332, 334, 336, 339, 340, 341, 343, 346, 351, 354, 356, 358, 361, 363, 365, 367, 368, 371, 373, 375, 377, 379, 383, 387], "returns": [215, 279, 304, 326, 386], "exceptions": []}, "expressions": {"calls": [0], "literals": [5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "TransactionalValue", "text_snippet": "namespace utility {\n\n /* This implements a 1-to-1 value fence. One thread can set (or \"queue\") a\n"}, {"node_id": 96, "universal_type": "function", "name": "unknown", "text_snippet": "get()"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "update()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <mutex>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "// ======================================================================== //\n// Copyright 2009-2019 Intel Corporation //\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\n#pragma once\n\n#include <mutex>\n\nnamespace ospcommon {\n namespace utility {\n\n /* This implements a 1-to-1 value fence. One thread can set (or \"queue\") a\n * value for another thread to later get. This is conceptually similar to\n * \"doublebuffering\" a single value. Note that all values from the producer\n * thread overwrite the \"queued\" value, where the consumer thread will\n * always get the last value set by the producer thread.\n */\n template <typename T>\n class TransactionalValue\n {\n public:\n TransactionalValue() = default;\n ~TransactionalValue() = default;\n\n template <typename OtherType>\n TransactionalValue(const OtherType &ot);\n\n template <typename OtherType>\n TransactionalValue &operator=(const OtherType &ot);\n\n TransactionalValue<T> &operator=(const TransactionalValue<T> &fp);\n\n T &ref();\n T get();\n\n bool update();\n\n private:\n bool newValue{false};\n T queuedValue;\n T currentValue;\n\n std::mutex mutex;\n };\n\n // Inlined TransactionalValue Members /////////////////////////////////////\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T>::TransactionalValue(const OtherType &ot)\n {\n currentValue = ot;\n }\n\n template <typename T>\n template <typename OtherType>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const OtherType &ot)\n {\n std::lock_guard<std::mutex> lock{mutex};\n queuedValue = ot;\n newValue = true;\n return *this;\n }\n\n template <typename T>\n inline TransactionalValue<T> &TransactionalValue<T>::operator=(\n const TransactionalValue<T> &fp)\n {\n std::lock_guard<std::mutex> lock{mutex};\n queuedValue = fp.ref();\n newValue = true;\n return *this;\n }\n\n template <typename T>\n inline T &TransactionalValue<T>::ref()\n {\n return currentValue;\n }\n\n template <typename T>\n inline T TransactionalValue<T>::get()\n {\n return currentValue;\n }\n\n template <typename T>\n inline bool TransactionalValue<T>::update()\n {\n bool didUpdate = false;\n if (newValue) {\n std::lock_guard<std::mutex> lock{mutex};\n currentValue = std::move(queuedValue);\n newValue = false;\n didUpdate = true;\n }\n\n return didUpdate;\n }\n\n } // namespace utility\n} // namespace ospcommon\n"}
80,900
c
// // EFTwoSlidersAutoLayoutViewController.h // EFCircularSlider // // Created by <NAME> on 12/5/13. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface EFTwoSlidersAutoLayoutViewController : UIViewController @end
24.5
10
(translation_unit) "//\n// EFTwoSlidersAutoLayoutViewController.h\n// EFCircularSlider\n//\n// Created by <NAME> on 12/5/13.\n// Copyright (c) 2013 <NAME>. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface EFTwoSlidersAutoLayoutViewController : UIViewController\n\n@end\n" (comment) "//" (comment) "// EFTwoSlidersAutoLayoutViewController.h" (comment) "// EFCircularSlider" (comment) "//" (comment) "// Created by <NAME> on 12/5/13." (comment) "// Copyright (c) 2013 <NAME>. All rights reserved." (comment) "//" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (ERROR) "@interface EFTwoSlidersAutoLayoutViewController : UIViewController\n\n@end" (ERROR) "@" (type_identifier) "interface" (identifier) "EFTwoSlidersAutoLayoutViewController" (:) ":" (identifier) "UIViewController" (ERROR) "@" (identifier) "end"
19
3
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 24.5, "nodes": 9, "errors": 0, "source_hash": "d82e550af7c08b7515e0037d28e44440a83277fada5e837c9d1a6e5e88e1c831", "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 EFTwoSlidersAutoLayoutViewController : UIViewController\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": "EFTwoSlidersAutoLayoutViewController", "parent": 3, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 47}}, {"id": 7, "type": "identifier", "text": "UIViewController", "parent": 3, "children": [], "start_point": {"row": 10, "column": 50}, "end_point": {"row": 10, "column": 66}}, {"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// EFTwoSlidersAutoLayoutViewController.h\n// EFCircularSlider\n//\n// Created by <NAME> on 12/5/13.\n// Copyright (c) 2013 <NAME>. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface EFTwoSlidersAutoLayoutViewController : UIViewController\n\n@end\n"}
80,901
c
/* * Phoenix-RTOS * * i.MX RT Flash Configurator * * Copyright 2019 Phoenix Systems * Author: <NAME> * * This file is part of Phoenix-RTOS. * * %LICENSE% */ #include <stdlib.h> #include <errno.h> #include "flash_config.h" #define WINDBOND_W25Q32JV_IQ 0x4016 #define ISSI_DEV_IS25WP064A 0x7017 #define MICRON_MT25QL512ABB 0xba20 #define GET_MANUFACTURE_ID(flashID) (flashID & 0xff) #define GET_DEVICE_ID(flashID) (((flashID >> 16) & 0xff) | (flashID & (0xff << 8))) enum { flash_windbond = 0xef, flash_issi = 0x9d, flash_micron = 0x20 }; static int flash_getWindbondConfig(flash_context_t *context) { switch (GET_DEVICE_ID(context->flashID)) { case WINDBOND_W25Q32JV_IQ : context->properties.size = 0x400000; context->properties.page_size = 0x100; context->properties.sector_size = 0x1000; context->buff = malloc(context->properties.sector_size); if (context->buff == NULL) return -ENOMEM; break; default : return -ENODEV; } return EOK; } static int flash_getIssiConfig(flash_context_t *context) { switch (GET_DEVICE_ID(context->flashID)) { case ISSI_DEV_IS25WP064A : context->properties.size = 0x800000; context->properties.page_size = 0x100; context->properties.sector_size = 0x1000; context->buff = malloc(context->properties.sector_size); if (context->buff == NULL) return -ENOMEM; break; default : return -ENODEV; } return EOK; } static int flash_getMicronConfig(flash_context_t *context) { switch (GET_DEVICE_ID(context->flashID)) { case MICRON_MT25QL512ABB : context->properties.size = 0x400000; context->properties.page_size = 0x100; context->properties.sector_size = 0x1000; context->buff = malloc(context->properties.sector_size); if (context->buff == NULL) return -ENOMEM; break; default : return -ENODEV; } return EOK; } int flash_getConfig(flash_context_t *context) { switch (GET_MANUFACTURE_ID(context->flashID)) { case flash_windbond : if (flash_getWindbondConfig(context) < 0) return -ENODEV; break; case flash_issi : if (flash_getIssiConfig(context) < 0) return -ENODEV; break; case flash_micron : if (flash_getMicronConfig(context) < 0) return -ENODEV; break; default: return -ENODEV; } return EOK; }
23.19
94
(translation_unit) "/*\n * Phoenix-RTOS\n *\n * i.MX RT Flash Configurator\n *\n * Copyright 2019 Phoenix Systems\n * Author: <NAME>\n *\n * This file is part of Phoenix-RTOS.\n *\n * %LICENSE%\n */\n\n#include <stdlib.h>\n#include <errno.h>\n\n#include "flash_config.h"\n\n#define WINDBOND_W25Q32JV_IQ 0x4016\n#define ISSI_DEV_IS25WP064A 0x7017\n#define MICRON_MT25QL512ABB 0xba20\n\n#define GET_MANUFACTURE_ID(flashID) (flashID & 0xff)\n#define GET_DEVICE_ID(flashID) (((flashID >> 16) & 0xff) | (flashID & (0xff << 8)))\n\n\nenum { flash_windbond = 0xef, flash_issi = 0x9d, flash_micron = 0x20 };\n\n\nstatic int flash_getWindbondConfig(flash_context_t *context)\n{\n switch (GET_DEVICE_ID(context->flashID)) {\n case WINDBOND_W25Q32JV_IQ :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }\n\n return EOK;\n}\n\n\nstatic int flash_getIssiConfig(flash_context_t *context)\n{\n switch (GET_DEVICE_ID(context->flashID)) {\n case ISSI_DEV_IS25WP064A :\n context->properties.size = 0x800000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }\n\n return EOK;\n}\n\n\nstatic int flash_getMicronConfig(flash_context_t *context)\n{\n switch (GET_DEVICE_ID(context->flashID)) {\n case MICRON_MT25QL512ABB :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }\n\n return EOK;\n}\n\n\nint flash_getConfig(flash_context_t *context)\n{\n switch (GET_MANUFACTURE_ID(context->flashID)) {\n case flash_windbond :\n if (flash_getWindbondConfig(context) < 0)\n return -ENODEV;\n break;\n\n case flash_issi :\n if (flash_getIssiConfig(context) < 0)\n return -ENODEV;\n break;\n\n case flash_micron :\n if (flash_getMicronConfig(context) < 0)\n return -ENODEV;\n break;\n\n default:\n return -ENODEV;\n }\n\n return EOK;\n}\n" (comment) "/*\n * Phoenix-RTOS\n *\n * i.MX RT Flash Configurator\n *\n * Copyright 2019 Phoenix Systems\n * Author: <NAME>\n *\n * This file is part of Phoenix-RTOS.\n *\n * %LICENSE%\n */" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <errno.h>\n" (#include) "#include" (system_lib_string) "<errno.h>" (preproc_include) "#include "flash_config.h"\n" (#include) "#include" (string_literal) ""flash_config.h"" (") """ (string_content) "flash_config.h" (") """ (preproc_def) "#define WINDBOND_W25Q32JV_IQ 0x4016\n" (#define) "#define" (identifier) "WINDBOND_W25Q32JV_IQ" (preproc_arg) "0x4016" (preproc_def) "#define ISSI_DEV_IS25WP064A 0x7017\n" (#define) "#define" (identifier) "ISSI_DEV_IS25WP064A" (preproc_arg) "0x7017" (preproc_def) "#define MICRON_MT25QL512ABB 0xba20\n" (#define) "#define" (identifier) "MICRON_MT25QL512ABB" (preproc_arg) "0xba20" (preproc_function_def) "#define GET_MANUFACTURE_ID(flashID) (flashID & 0xff)\n" (#define) "#define" (identifier) "GET_MANUFACTURE_ID" (preproc_params) "(flashID)" (() "(" (identifier) "flashID" ()) ")" (preproc_arg) "(flashID & 0xff)" (preproc_function_def) "#define GET_DEVICE_ID(flashID) (((flashID >> 16) & 0xff) | (flashID & (0xff << 8)))\n" (#define) "#define" (identifier) "GET_DEVICE_ID" (preproc_params) "(flashID)" (() "(" (identifier) "flashID" ()) ")" (preproc_arg) "(((flashID >> 16) & 0xff) | (flashID & (0xff << 8)))" (enum_specifier) "enum { flash_windbond = 0xef, flash_issi = 0x9d, flash_micron = 0x20 }" (enum) "enum" (enumerator_list) "{ flash_windbond = 0xef, flash_issi = 0x9d, flash_micron = 0x20 }" ({) "{" (enumerator) "flash_windbond = 0xef" (identifier) "flash_windbond" (=) "=" (number_literal) "0xef" (,) "," (enumerator) "flash_issi = 0x9d" (identifier) "flash_issi" (=) "=" (number_literal) "0x9d" (,) "," (enumerator) "flash_micron = 0x20" (identifier) "flash_micron" (=) "=" (number_literal) "0x20" (}) "}" (;) ";" (function_definition) "static int flash_getWindbondConfig(flash_context_t *context)\n{\n switch (GET_DEVICE_ID(context->flashID)) {\n case WINDBOND_W25Q32JV_IQ :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }\n\n return EOK;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "flash_getWindbondConfig(flash_context_t *context)" (identifier) "flash_getWindbondConfig" (parameter_list) "(flash_context_t *context)" (() "(" (parameter_declaration) "flash_context_t *context" (type_identifier) "flash_context_t" (pointer_declarator) "*context" (*) "*" (identifier) "context" ()) ")" (compound_statement) "{\n switch (GET_DEVICE_ID(context->flashID)) {\n case WINDBOND_W25Q32JV_IQ :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }\n\n return EOK;\n}" ({) "{" (switch_statement) "switch (GET_DEVICE_ID(context->flashID)) {\n case WINDBOND_W25Q32JV_IQ :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }" (switch) "switch" (parenthesized_expression) "(GET_DEVICE_ID(context->flashID))" (() "(" (call_expression) "GET_DEVICE_ID(context->flashID)" (identifier) "GET_DEVICE_ID" (argument_list) "(context->flashID)" (() "(" (field_expression) "context->flashID" (identifier) "context" (->) "->" (field_identifier) "flashID" ()) ")" ()) ")" (compound_statement) "{\n case WINDBOND_W25Q32JV_IQ :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }" ({) "{" (case_statement) "case WINDBOND_W25Q32JV_IQ :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;" (case) "case" (identifier) "WINDBOND_W25Q32JV_IQ" (:) ":" (expression_statement) "context->properties.size = 0x400000;" (assignment_expression) "context->properties.size = 0x400000" (field_expression) "context->properties.size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "size" (=) "=" (number_literal) "0x400000" (;) ";" (expression_statement) "context->properties.page_size = 0x100;" (assignment_expression) "context->properties.page_size = 0x100" (field_expression) "context->properties.page_size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "page_size" (=) "=" (number_literal) "0x100" (;) ";" (expression_statement) "context->properties.sector_size = 0x1000;" (assignment_expression) "context->properties.sector_size = 0x1000" (field_expression) "context->properties.sector_size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "sector_size" (=) "=" (number_literal) "0x1000" (;) ";" (expression_statement) "context->buff = malloc(context->properties.sector_size);" (assignment_expression) "context->buff = malloc(context->properties.sector_size)" (field_expression) "context->buff" (identifier) "context" (->) "->" (field_identifier) "buff" (=) "=" (call_expression) "malloc(context->properties.sector_size)" (identifier) "malloc" (argument_list) "(context->properties.sector_size)" (() "(" (field_expression) "context->properties.sector_size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "sector_size" ()) ")" (;) ";" (if_statement) "if (context->buff == NULL)\n return -ENOMEM;" (if) "if" (parenthesized_expression) "(context->buff == NULL)" (() "(" (binary_expression) "context->buff == NULL" (field_expression) "context->buff" (identifier) "context" (->) "->" (field_identifier) "buff" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (return_statement) "return -ENOMEM;" (return) "return" (unary_expression) "-ENOMEM" (-) "-" (identifier) "ENOMEM" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default :\n return -ENODEV;" (default) "default" (:) ":" (return_statement) "return -ENODEV;" (return) "return" (unary_expression) "-ENODEV" (-) "-" (identifier) "ENODEV" (;) ";" (}) "}" (return_statement) "return EOK;" (return) "return" (identifier) "EOK" (;) ";" (}) "}" (function_definition) "static int flash_getIssiConfig(flash_context_t *context)\n{\n switch (GET_DEVICE_ID(context->flashID)) {\n case ISSI_DEV_IS25WP064A :\n context->properties.size = 0x800000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }\n\n return EOK;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "flash_getIssiConfig(flash_context_t *context)" (identifier) "flash_getIssiConfig" (parameter_list) "(flash_context_t *context)" (() "(" (parameter_declaration) "flash_context_t *context" (type_identifier) "flash_context_t" (pointer_declarator) "*context" (*) "*" (identifier) "context" ()) ")" (compound_statement) "{\n switch (GET_DEVICE_ID(context->flashID)) {\n case ISSI_DEV_IS25WP064A :\n context->properties.size = 0x800000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }\n\n return EOK;\n}" ({) "{" (switch_statement) "switch (GET_DEVICE_ID(context->flashID)) {\n case ISSI_DEV_IS25WP064A :\n context->properties.size = 0x800000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }" (switch) "switch" (parenthesized_expression) "(GET_DEVICE_ID(context->flashID))" (() "(" (call_expression) "GET_DEVICE_ID(context->flashID)" (identifier) "GET_DEVICE_ID" (argument_list) "(context->flashID)" (() "(" (field_expression) "context->flashID" (identifier) "context" (->) "->" (field_identifier) "flashID" ()) ")" ()) ")" (compound_statement) "{\n case ISSI_DEV_IS25WP064A :\n context->properties.size = 0x800000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }" ({) "{" (case_statement) "case ISSI_DEV_IS25WP064A :\n context->properties.size = 0x800000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;" (case) "case" (identifier) "ISSI_DEV_IS25WP064A" (:) ":" (expression_statement) "context->properties.size = 0x800000;" (assignment_expression) "context->properties.size = 0x800000" (field_expression) "context->properties.size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "size" (=) "=" (number_literal) "0x800000" (;) ";" (expression_statement) "context->properties.page_size = 0x100;" (assignment_expression) "context->properties.page_size = 0x100" (field_expression) "context->properties.page_size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "page_size" (=) "=" (number_literal) "0x100" (;) ";" (expression_statement) "context->properties.sector_size = 0x1000;" (assignment_expression) "context->properties.sector_size = 0x1000" (field_expression) "context->properties.sector_size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "sector_size" (=) "=" (number_literal) "0x1000" (;) ";" (expression_statement) "context->buff = malloc(context->properties.sector_size);" (assignment_expression) "context->buff = malloc(context->properties.sector_size)" (field_expression) "context->buff" (identifier) "context" (->) "->" (field_identifier) "buff" (=) "=" (call_expression) "malloc(context->properties.sector_size)" (identifier) "malloc" (argument_list) "(context->properties.sector_size)" (() "(" (field_expression) "context->properties.sector_size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "sector_size" ()) ")" (;) ";" (if_statement) "if (context->buff == NULL)\n return -ENOMEM;" (if) "if" (parenthesized_expression) "(context->buff == NULL)" (() "(" (binary_expression) "context->buff == NULL" (field_expression) "context->buff" (identifier) "context" (->) "->" (field_identifier) "buff" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (return_statement) "return -ENOMEM;" (return) "return" (unary_expression) "-ENOMEM" (-) "-" (identifier) "ENOMEM" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default :\n return -ENODEV;" (default) "default" (:) ":" (return_statement) "return -ENODEV;" (return) "return" (unary_expression) "-ENODEV" (-) "-" (identifier) "ENODEV" (;) ";" (}) "}" (return_statement) "return EOK;" (return) "return" (identifier) "EOK" (;) ";" (}) "}" (function_definition) "static int flash_getMicronConfig(flash_context_t *context)\n{\n switch (GET_DEVICE_ID(context->flashID)) {\n case MICRON_MT25QL512ABB :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }\n\n return EOK;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "flash_getMicronConfig(flash_context_t *context)" (identifier) "flash_getMicronConfig" (parameter_list) "(flash_context_t *context)" (() "(" (parameter_declaration) "flash_context_t *context" (type_identifier) "flash_context_t" (pointer_declarator) "*context" (*) "*" (identifier) "context" ()) ")" (compound_statement) "{\n switch (GET_DEVICE_ID(context->flashID)) {\n case MICRON_MT25QL512ABB :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }\n\n return EOK;\n}" ({) "{" (switch_statement) "switch (GET_DEVICE_ID(context->flashID)) {\n case MICRON_MT25QL512ABB :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }" (switch) "switch" (parenthesized_expression) "(GET_DEVICE_ID(context->flashID))" (() "(" (call_expression) "GET_DEVICE_ID(context->flashID)" (identifier) "GET_DEVICE_ID" (argument_list) "(context->flashID)" (() "(" (field_expression) "context->flashID" (identifier) "context" (->) "->" (field_identifier) "flashID" ()) ")" ()) ")" (compound_statement) "{\n case MICRON_MT25QL512ABB :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;\n\n default :\n return -ENODEV;\n }" ({) "{" (case_statement) "case MICRON_MT25QL512ABB :\n context->properties.size = 0x400000;\n context->properties.page_size = 0x100;\n context->properties.sector_size = 0x1000;\n context->buff = malloc(context->properties.sector_size);\n\n if (context->buff == NULL)\n return -ENOMEM;\n break;" (case) "case" (identifier) "MICRON_MT25QL512ABB" (:) ":" (expression_statement) "context->properties.size = 0x400000;" (assignment_expression) "context->properties.size = 0x400000" (field_expression) "context->properties.size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "size" (=) "=" (number_literal) "0x400000" (;) ";" (expression_statement) "context->properties.page_size = 0x100;" (assignment_expression) "context->properties.page_size = 0x100" (field_expression) "context->properties.page_size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "page_size" (=) "=" (number_literal) "0x100" (;) ";" (expression_statement) "context->properties.sector_size = 0x1000;" (assignment_expression) "context->properties.sector_size = 0x1000" (field_expression) "context->properties.sector_size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "sector_size" (=) "=" (number_literal) "0x1000" (;) ";" (expression_statement) "context->buff = malloc(context->properties.sector_size);" (assignment_expression) "context->buff = malloc(context->properties.sector_size)" (field_expression) "context->buff" (identifier) "context" (->) "->" (field_identifier) "buff" (=) "=" (call_expression) "malloc(context->properties.sector_size)" (identifier) "malloc" (argument_list) "(context->properties.sector_size)" (() "(" (field_expression) "context->properties.sector_size" (field_expression) "context->properties" (identifier) "context" (->) "->" (field_identifier) "properties" (.) "." (field_identifier) "sector_size" ()) ")" (;) ";" (if_statement) "if (context->buff == NULL)\n return -ENOMEM;" (if) "if" (parenthesized_expression) "(context->buff == NULL)" (() "(" (binary_expression) "context->buff == NULL" (field_expression) "context->buff" (identifier) "context" (->) "->" (field_identifier) "buff" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (return_statement) "return -ENOMEM;" (return) "return" (unary_expression) "-ENOMEM" (-) "-" (identifier) "ENOMEM" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default :\n return -ENODEV;" (default) "default" (:) ":" (return_statement) "return -ENODEV;" (return) "return" (unary_expression) "-ENODEV" (-) "-" (identifier) "ENODEV" (;) ";" (}) "}" (return_statement) "return EOK;" (return) "return" (identifier) "EOK" (;) ";" (}) "}" (function_definition) "int flash_getConfig(flash_context_t *context)\n{\n switch (GET_MANUFACTURE_ID(context->flashID)) {\n case flash_windbond :\n if (flash_getWindbondConfig(context) < 0)\n return -ENODEV;\n break;\n\n case flash_issi :\n if (flash_getIssiConfig(context) < 0)\n return -ENODEV;\n break;\n\n case flash_micron :\n if (flash_getMicronConfig(context) < 0)\n return -ENODEV;\n break;\n\n default:\n return -ENODEV;\n }\n\n return EOK;\n}" (primitive_type) "int" (function_declarator) "flash_getConfig(flash_context_t *context)" (identifier) "flash_getConfig" (parameter_list) "(flash_context_t *context)" (() "(" (parameter_declaration) "flash_context_t *context" (type_identifier) "flash_context_t" (pointer_declarator) "*context" (*) "*" (identifier) "context" ()) ")" (compound_statement) "{\n switch (GET_MANUFACTURE_ID(context->flashID)) {\n case flash_windbond :\n if (flash_getWindbondConfig(context) < 0)\n return -ENODEV;\n break;\n\n case flash_issi :\n if (flash_getIssiConfig(context) < 0)\n return -ENODEV;\n break;\n\n case flash_micron :\n if (flash_getMicronConfig(context) < 0)\n return -ENODEV;\n break;\n\n default:\n return -ENODEV;\n }\n\n return EOK;\n}" ({) "{" (switch_statement) "switch (GET_MANUFACTURE_ID(context->flashID)) {\n case flash_windbond :\n if (flash_getWindbondConfig(context) < 0)\n return -ENODEV;\n break;\n\n case flash_issi :\n if (flash_getIssiConfig(context) < 0)\n return -ENODEV;\n break;\n\n case flash_micron :\n if (flash_getMicronConfig(context) < 0)\n return -ENODEV;\n break;\n\n default:\n return -ENODEV;\n }" (switch) "switch" (parenthesized_expression) "(GET_MANUFACTURE_ID(context->flashID))" (() "(" (call_expression) "GET_MANUFACTURE_ID(context->flashID)" (identifier) "GET_MANUFACTURE_ID" (argument_list) "(context->flashID)" (() "(" (field_expression) "context->flashID" (identifier) "context" (->) "->" (field_identifier) "flashID" ()) ")" ()) ")" (compound_statement) "{\n case flash_windbond :\n if (flash_getWindbondConfig(context) < 0)\n return -ENODEV;\n break;\n\n case flash_issi :\n if (flash_getIssiConfig(context) < 0)\n return -ENODEV;\n break;\n\n case flash_micron :\n if (flash_getMicronConfig(context) < 0)\n return -ENODEV;\n break;\n\n default:\n return -ENODEV;\n }" ({) "{" (case_statement) "case flash_windbond :\n if (flash_getWindbondConfig(context) < 0)\n return -ENODEV;\n break;" (case) "case" (identifier) "flash_windbond" (:) ":" (if_statement) "if (flash_getWindbondConfig(context) < 0)\n return -ENODEV;" (if) "if" (parenthesized_expression) "(flash_getWindbondConfig(context) < 0)" (() "(" (binary_expression) "flash_getWindbondConfig(context) < 0" (call_expression) "flash_getWindbondConfig(context)" (identifier) "flash_getWindbondConfig" (argument_list) "(context)" (() "(" (identifier) "context" ()) ")" (<) "<" (number_literal) "0" ()) ")" (return_statement) "return -ENODEV;" (return) "return" (unary_expression) "-ENODEV" (-) "-" (identifier) "ENODEV" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case flash_issi :\n if (flash_getIssiConfig(context) < 0)\n return -ENODEV;\n break;" (case) "case" (identifier) "flash_issi" (:) ":" (if_statement) "if (flash_getIssiConfig(context) < 0)\n return -ENODEV;" (if) "if" (parenthesized_expression) "(flash_getIssiConfig(context) < 0)" (() "(" (binary_expression) "flash_getIssiConfig(context) < 0" (call_expression) "flash_getIssiConfig(context)" (identifier) "flash_getIssiConfig" (argument_list) "(context)" (() "(" (identifier) "context" ()) ")" (<) "<" (number_literal) "0" ()) ")" (return_statement) "return -ENODEV;" (return) "return" (unary_expression) "-ENODEV" (-) "-" (identifier) "ENODEV" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case flash_micron :\n if (flash_getMicronConfig(context) < 0)\n return -ENODEV;\n break;" (case) "case" (identifier) "flash_micron" (:) ":" (if_statement) "if (flash_getMicronConfig(context) < 0)\n return -ENODEV;" (if) "if" (parenthesized_expression) "(flash_getMicronConfig(context) < 0)" (() "(" (binary_expression) "flash_getMicronConfig(context) < 0" (call_expression) "flash_getMicronConfig(context)" (identifier) "flash_getMicronConfig" (argument_list) "(context)" (() "(" (identifier) "context" ()) ")" (<) "<" (number_literal) "0" ()) ")" (return_statement) "return -ENODEV;" (return) "return" (unary_expression) "-ENODEV" (-) "-" (identifier) "ENODEV" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n return -ENODEV;" (default) "default" (:) ":" (return_statement) "return -ENODEV;" (return) "return" (unary_expression) "-ENODEV" (-) "-" (identifier) "ENODEV" (;) ";" (}) "}" (return_statement) "return EOK;" (return) "return" (identifier) "EOK" (;) ";" (}) "}"
575
0
{"language": "c", "success": true, "metadata": {"lines": 94, "avg_line_length": 23.19, "nodes": 375, "errors": 0, "source_hash": "52eef0b677da269ab895cf904a3eff8169a92f2b024092ecbc746c6d13663b42", "categorized_nodes": 281}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdlib.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": "system_lib_string", "text": "<stdlib.h>", "parent": 0, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <errno.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<errno.h>", "parent": 3, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include \"flash_config.h\"\n", "parent": null, "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": "\"flash_config.h\"", "parent": 6, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 25}}, {"id": 9, "type": "preproc_def", "text": "#define WINDBOND_W25Q32JV_IQ 0x4016\n", "parent": null, "children": [10, 11, 12], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 11, "type": "identifier", "text": "WINDBOND_W25Q32JV_IQ", "parent": 9, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 28}}, {"id": 12, "type": "preproc_arg", "text": "0x4016", "parent": 9, "children": [], "start_point": {"row": 18, "column": 29}, "end_point": {"row": 18, "column": 35}}, {"id": 13, "type": "preproc_def", "text": "#define ISSI_DEV_IS25WP064A 0x7017\n", "parent": null, "children": [14, 15, 16], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 14, "type": "#define", "text": "#define", "parent": 13, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 15, "type": "identifier", "text": "ISSI_DEV_IS25WP064A", "parent": 13, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 27}}, {"id": 16, "type": "preproc_arg", "text": "0x7017", "parent": 13, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 34}}, {"id": 17, "type": "preproc_def", "text": "#define MICRON_MT25QL512ABB 0xba20\n", "parent": null, "children": [18, 19, 20], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 18, "type": "#define", "text": "#define", "parent": 17, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 19, "type": "identifier", "text": "MICRON_MT25QL512ABB", "parent": 17, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 27}}, {"id": 20, "type": "preproc_arg", "text": "0xba20", "parent": 17, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 34}}, {"id": 21, "type": "preproc_function_def", "text": "#define GET_MANUFACTURE_ID(flashID) (flashID & 0xff)\n", "parent": null, "children": [22, 23, 24, 26], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 23, "type": "identifier", "text": "GET_MANUFACTURE_ID", "parent": 21, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 26}}, {"id": 24, "type": "preproc_params", "text": "(flashID)", "parent": 21, "children": [25], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 35}}, {"id": 25, "type": "identifier", "text": "flashID", "parent": 24, "children": [], "start_point": {"row": 22, "column": 27}, "end_point": {"row": 22, "column": 34}}, {"id": 26, "type": "preproc_arg", "text": "(flashID & 0xff)", "parent": 21, "children": [], "start_point": {"row": 22, "column": 36}, "end_point": {"row": 22, "column": 52}}, {"id": 27, "type": "preproc_function_def", "text": "#define GET_DEVICE_ID(flashID) (((flashID >> 16) & 0xff) | (flashID & (0xff << 8)))\n", "parent": null, "children": [28, 29, 30, 32], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 28, "type": "#define", "text": "#define", "parent": 27, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 29, "type": "identifier", "text": "GET_DEVICE_ID", "parent": 27, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 21}}, {"id": 30, "type": "preproc_params", "text": "(flashID)", "parent": 27, "children": [31], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 30}}, {"id": 31, "type": "identifier", "text": "flashID", "parent": 30, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 29}}, {"id": 32, "type": "preproc_arg", "text": "(((flashID >> 16) & 0xff) | (flashID & (0xff << 8)))", "parent": 27, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 83}}, {"id": 33, "type": "enum_specifier", "text": "enum {\tflash_windbond = 0xef, flash_issi = 0x9d, flash_micron = 0x20 }", "parent": null, "children": [34, 35], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 70}}, {"id": 34, "type": "enum", "text": "enum", "parent": 33, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 4}}, {"id": 35, "type": "enumerator_list", "text": "{\tflash_windbond = 0xef, flash_issi = 0x9d, flash_micron = 0x20 }", "parent": 33, "children": [36, 40, 44], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 70}}, {"id": 36, "type": "enumerator", "text": "flash_windbond = 0xef", "parent": 35, "children": [37, 38, 39], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 28}}, {"id": 37, "type": "identifier", "text": "flash_windbond", "parent": 36, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 21}}, {"id": 38, "type": "=", "text": "=", "parent": 36, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 23}}, {"id": 39, "type": "number_literal", "text": "0xef", "parent": 36, "children": [], "start_point": {"row": 26, "column": 24}, "end_point": {"row": 26, "column": 28}}, {"id": 40, "type": "enumerator", "text": "flash_issi = 0x9d", "parent": 35, "children": [41, 42, 43], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 47}}, {"id": 41, "type": "identifier", "text": "flash_issi", "parent": 40, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 40}}, {"id": 42, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 26, "column": 41}, "end_point": {"row": 26, "column": 42}}, {"id": 43, "type": "number_literal", "text": "0x9d", "parent": 40, "children": [], "start_point": {"row": 26, "column": 43}, "end_point": {"row": 26, "column": 47}}, {"id": 44, "type": "enumerator", "text": "flash_micron = 0x20", "parent": 35, "children": [45, 46, 47], "start_point": {"row": 26, "column": 49}, "end_point": {"row": 26, "column": 68}}, {"id": 45, "type": "identifier", "text": "flash_micron", "parent": 44, "children": [], "start_point": {"row": 26, "column": 49}, "end_point": {"row": 26, "column": 61}}, {"id": 46, "type": "=", "text": "=", "parent": 44, "children": [], "start_point": {"row": 26, "column": 62}, "end_point": {"row": 26, "column": 63}}, {"id": 47, "type": "number_literal", "text": "0x20", "parent": 44, "children": [], "start_point": {"row": 26, "column": 64}, "end_point": {"row": 26, "column": 68}}, {"id": 48, "type": "function_definition", "text": "static int flash_getWindbondConfig(flash_context_t *context)\n{\n\tswitch (GET_DEVICE_ID(context->flashID)) {\n\t\tcase WINDBOND_W25Q32JV_IQ :\n\t\t\tcontext->properties.size = 0x400000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn -ENODEV;\n\t}\n\n\treturn EOK;\n}", "parent": null, "children": [49, 50], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 49, "type": "primitive_type", "text": "int", "parent": 48, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 10}}, {"id": 50, "type": "function_declarator", "text": "flash_getWindbondConfig(flash_context_t *context)", "parent": 48, "children": [51, 52], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 60}}, {"id": 51, "type": "identifier", "text": "flash_getWindbondConfig", "parent": 50, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 34}}, {"id": 52, "type": "parameter_list", "text": "(flash_context_t *context)", "parent": 50, "children": [53], "start_point": {"row": 29, "column": 34}, "end_point": {"row": 29, "column": 60}}, {"id": 53, "type": "parameter_declaration", "text": "flash_context_t *context", "parent": 52, "children": [54, 55], "start_point": {"row": 29, "column": 35}, "end_point": {"row": 29, "column": 59}}, {"id": 54, "type": "type_identifier", "text": "flash_context_t", "parent": 53, "children": [], "start_point": {"row": 29, "column": 35}, "end_point": {"row": 29, "column": 50}}, {"id": 55, "type": "pointer_declarator", "text": "*context", "parent": 53, "children": [56, 57], "start_point": {"row": 29, "column": 51}, "end_point": {"row": 29, "column": 59}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 29, "column": 51}, "end_point": {"row": 29, "column": 52}}, {"id": 57, "type": "identifier", "text": "context", "parent": 55, "children": [], "start_point": {"row": 29, "column": 52}, "end_point": {"row": 29, "column": 59}}, {"id": 58, "type": "switch_statement", "text": "switch (GET_DEVICE_ID(context->flashID)) {\n\t\tcase WINDBOND_W25Q32JV_IQ :\n\t\t\tcontext->properties.size = 0x400000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn -ENODEV;\n\t}", "parent": 48, "children": [59, 60], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 44, "column": 2}}, {"id": 59, "type": "switch", "text": "switch", "parent": 58, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 7}}, {"id": 60, "type": "parenthesized_expression", "text": "(GET_DEVICE_ID(context->flashID))", "parent": 58, "children": [61], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 41}}, {"id": 61, "type": "call_expression", "text": "GET_DEVICE_ID(context->flashID)", "parent": 60, "children": [62, 63], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 40}}, {"id": 62, "type": "identifier", "text": "GET_DEVICE_ID", "parent": 61, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 22}}, {"id": 63, "type": "argument_list", "text": "(context->flashID)", "parent": 61, "children": [64], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 40}}, {"id": 64, "type": "field_expression", "text": "context->flashID", "parent": 63, "children": [65, 66], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 39}}, {"id": 65, "type": "identifier", "text": "context", "parent": 64, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 30}}, {"id": 66, "type": "field_identifier", "text": "flashID", "parent": 64, "children": [], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 31, "column": 39}}, {"id": 67, "type": "case_statement", "text": "case WINDBOND_W25Q32JV_IQ :\n\t\t\tcontext->properties.size = 0x400000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;", "parent": 58, "children": [68, 69, 107, 120], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 40, "column": 9}}, {"id": 68, "type": "case", "text": "case", "parent": 67, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 6}}, {"id": 69, "type": "identifier", "text": "WINDBOND_W25Q32JV_IQ", "parent": 67, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 27}}, {"id": 70, "type": "assignment_expression", "text": "context->properties.size = 0x400000", "parent": 67, "children": [71, 76, 77], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 38}}, {"id": 71, "type": "field_expression", "text": "context->properties.size", "parent": 70, "children": [72, 75], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 27}}, {"id": 72, "type": "field_expression", "text": "context->properties", "parent": 71, "children": [73, 74], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 22}}, {"id": 73, "type": "identifier", "text": "context", "parent": 72, "children": [], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 10}}, {"id": 74, "type": "field_identifier", "text": "properties", "parent": 72, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 22}}, {"id": 75, "type": "field_identifier", "text": "size", "parent": 71, "children": [], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 27}}, {"id": 76, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 29}}, {"id": 77, "type": "number_literal", "text": "0x400000", "parent": 70, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 38}}, {"id": 78, "type": "assignment_expression", "text": "context->properties.page_size = 0x100", "parent": 67, "children": [79, 84, 85], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 40}}, {"id": 79, "type": "field_expression", "text": "context->properties.page_size", "parent": 78, "children": [80, 83], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 32}}, {"id": 80, "type": "field_expression", "text": "context->properties", "parent": 79, "children": [81, 82], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 22}}, {"id": 81, "type": "identifier", "text": "context", "parent": 80, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 10}}, {"id": 82, "type": "field_identifier", "text": "properties", "parent": 80, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 22}}, {"id": 83, "type": "field_identifier", "text": "page_size", "parent": 79, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 32}}, {"id": 84, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 34}}, {"id": 85, "type": "number_literal", "text": "0x100", "parent": 78, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 40}}, {"id": 86, "type": "assignment_expression", "text": "context->properties.sector_size = 0x1000", "parent": 67, "children": [87, 92, 93], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 43}}, {"id": 87, "type": "field_expression", "text": "context->properties.sector_size", "parent": 86, "children": [88, 91], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 34}}, {"id": 88, "type": "field_expression", "text": "context->properties", "parent": 87, "children": [89, 90], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 22}}, {"id": 89, "type": "identifier", "text": "context", "parent": 88, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 10}}, {"id": 90, "type": "field_identifier", "text": "properties", "parent": 88, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 22}}, {"id": 91, "type": "field_identifier", "text": "sector_size", "parent": 87, "children": [], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 34}}, {"id": 92, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 35, "column": 35}, "end_point": {"row": 35, "column": 36}}, {"id": 93, "type": "number_literal", "text": "0x1000", "parent": 86, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 43}}, {"id": 94, "type": "assignment_expression", "text": "context->buff = malloc(context->properties.sector_size)", "parent": 67, "children": [95, 98, 99], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 58}}, {"id": 95, "type": "field_expression", "text": "context->buff", "parent": 94, "children": [96, 97], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 16}}, {"id": 96, "type": "identifier", "text": "context", "parent": 95, "children": [], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 10}}, {"id": 97, "type": "field_identifier", "text": "buff", "parent": 95, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 16}}, {"id": 98, "type": "=", "text": "=", "parent": 94, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 99, "type": "call_expression", "text": "malloc(context->properties.sector_size)", "parent": 94, "children": [100, 101], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 58}}, {"id": 100, "type": "identifier", "text": "malloc", "parent": 99, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 25}}, {"id": 101, "type": "argument_list", "text": "(context->properties.sector_size)", "parent": 99, "children": [102], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 58}}, {"id": 102, "type": "field_expression", "text": "context->properties.sector_size", "parent": 101, "children": [103, 106], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 57}}, {"id": 103, "type": "field_expression", "text": "context->properties", "parent": 102, "children": [104, 105], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 45}}, {"id": 104, "type": "identifier", "text": "context", "parent": 103, "children": [], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 33}}, {"id": 105, "type": "field_identifier", "text": "properties", "parent": 103, "children": [], "start_point": {"row": 36, "column": 35}, "end_point": {"row": 36, "column": 45}}, {"id": 106, "type": "field_identifier", "text": "sector_size", "parent": 102, "children": [], "start_point": {"row": 36, "column": 46}, "end_point": {"row": 36, "column": 57}}, {"id": 107, "type": "if_statement", "text": "if (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;", "parent": 67, "children": [108, 116], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 39, "column": 19}}, {"id": 108, "type": "parenthesized_expression", "text": "(context->buff == NULL)", "parent": 107, "children": [109], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 29}}, {"id": 109, "type": "binary_expression", "text": "context->buff == NULL", "parent": 108, "children": [110, 113, 114], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 28}}, {"id": 110, "type": "field_expression", "text": "context->buff", "parent": 109, "children": [111, 112], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 20}}, {"id": 111, "type": "identifier", "text": "context", "parent": 110, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 14}}, {"id": 112, "type": "field_identifier", "text": "buff", "parent": 110, "children": [], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 20}}, {"id": 113, "type": "==", "text": "==", "parent": 109, "children": [], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 23}}, {"id": 114, "type": "null", "text": "NULL", "parent": 109, "children": [115], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 28}}, {"id": 115, "type": "NULL", "text": "NULL", "parent": 114, "children": [], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 28}}, {"id": 116, "type": "return_statement", "text": "return -ENOMEM;", "parent": 107, "children": [117], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 19}}, {"id": 117, "type": "unary_expression", "text": "-ENOMEM", "parent": 116, "children": [118, 119], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 18}}, {"id": 118, "type": "-", "text": "-", "parent": 117, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 12}}, {"id": 119, "type": "identifier", "text": "ENOMEM", "parent": 117, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 18}}, {"id": 120, "type": "break_statement", "text": "break;", "parent": 67, "children": [121], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 9}}, {"id": 121, "type": "break", "text": "break", "parent": 120, "children": [], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 8}}, {"id": 122, "type": "case_statement", "text": "default :\n\t\t\treturn -ENODEV;", "parent": 58, "children": [123, 124], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 43, "column": 18}}, {"id": 123, "type": "default", "text": "default", "parent": 122, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 9}}, {"id": 124, "type": "return_statement", "text": "return -ENODEV;", "parent": 122, "children": [125], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 18}}, {"id": 125, "type": "unary_expression", "text": "-ENODEV", "parent": 124, "children": [126, 127], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 17}}, {"id": 126, "type": "-", "text": "-", "parent": 125, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 11}}, {"id": 127, "type": "identifier", "text": "ENODEV", "parent": 125, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 17}}, {"id": 128, "type": "return_statement", "text": "return EOK;", "parent": 48, "children": [129], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 12}}, {"id": 129, "type": "identifier", "text": "EOK", "parent": 128, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 11}}, {"id": 130, "type": "function_definition", "text": "static int flash_getIssiConfig(flash_context_t *context)\n{\n\tswitch (GET_DEVICE_ID(context->flashID)) {\n\t\tcase ISSI_DEV_IS25WP064A :\n\t\t\tcontext->properties.size = 0x800000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn -ENODEV;\n\t}\n\n\treturn EOK;\n}", "parent": null, "children": [131, 132], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 131, "type": "primitive_type", "text": "int", "parent": 130, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 10}}, {"id": 132, "type": "function_declarator", "text": "flash_getIssiConfig(flash_context_t *context)", "parent": 130, "children": [133, 134], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 56}}, {"id": 133, "type": "identifier", "text": "flash_getIssiConfig", "parent": 132, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 30}}, {"id": 134, "type": "parameter_list", "text": "(flash_context_t *context)", "parent": 132, "children": [135], "start_point": {"row": 50, "column": 30}, "end_point": {"row": 50, "column": 56}}, {"id": 135, "type": "parameter_declaration", "text": "flash_context_t *context", "parent": 134, "children": [136, 137], "start_point": {"row": 50, "column": 31}, "end_point": {"row": 50, "column": 55}}, {"id": 136, "type": "type_identifier", "text": "flash_context_t", "parent": 135, "children": [], "start_point": {"row": 50, "column": 31}, "end_point": {"row": 50, "column": 46}}, {"id": 137, "type": "pointer_declarator", "text": "*context", "parent": 135, "children": [138, 139], "start_point": {"row": 50, "column": 47}, "end_point": {"row": 50, "column": 55}}, {"id": 138, "type": "*", "text": "*", "parent": 137, "children": [], "start_point": {"row": 50, "column": 47}, "end_point": {"row": 50, "column": 48}}, {"id": 139, "type": "identifier", "text": "context", "parent": 137, "children": [], "start_point": {"row": 50, "column": 48}, "end_point": {"row": 50, "column": 55}}, {"id": 140, "type": "switch_statement", "text": "switch (GET_DEVICE_ID(context->flashID)) {\n\t\tcase ISSI_DEV_IS25WP064A :\n\t\t\tcontext->properties.size = 0x800000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn -ENODEV;\n\t}", "parent": 130, "children": [141, 142], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 65, "column": 2}}, {"id": 141, "type": "switch", "text": "switch", "parent": 140, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 7}}, {"id": 142, "type": "parenthesized_expression", "text": "(GET_DEVICE_ID(context->flashID))", "parent": 140, "children": [143], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 41}}, {"id": 143, "type": "call_expression", "text": "GET_DEVICE_ID(context->flashID)", "parent": 142, "children": [144, 145], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 40}}, {"id": 144, "type": "identifier", "text": "GET_DEVICE_ID", "parent": 143, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 22}}, {"id": 145, "type": "argument_list", "text": "(context->flashID)", "parent": 143, "children": [146], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 40}}, {"id": 146, "type": "field_expression", "text": "context->flashID", "parent": 145, "children": [147, 148], "start_point": {"row": 52, "column": 23}, "end_point": {"row": 52, "column": 39}}, {"id": 147, "type": "identifier", "text": "context", "parent": 146, "children": [], "start_point": {"row": 52, "column": 23}, "end_point": {"row": 52, "column": 30}}, {"id": 148, "type": "field_identifier", "text": "flashID", "parent": 146, "children": [], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 39}}, {"id": 149, "type": "case_statement", "text": "case ISSI_DEV_IS25WP064A :\n\t\t\tcontext->properties.size = 0x800000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;", "parent": 140, "children": [150, 151, 189, 202], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 61, "column": 9}}, {"id": 150, "type": "case", "text": "case", "parent": 149, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 6}}, {"id": 151, "type": "identifier", "text": "ISSI_DEV_IS25WP064A", "parent": 149, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 26}}, {"id": 152, "type": "assignment_expression", "text": "context->properties.size = 0x800000", "parent": 149, "children": [153, 158, 159], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 38}}, {"id": 153, "type": "field_expression", "text": "context->properties.size", "parent": 152, "children": [154, 157], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 27}}, {"id": 154, "type": "field_expression", "text": "context->properties", "parent": 153, "children": [155, 156], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 22}}, {"id": 155, "type": "identifier", "text": "context", "parent": 154, "children": [], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 10}}, {"id": 156, "type": "field_identifier", "text": "properties", "parent": 154, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 22}}, {"id": 157, "type": "field_identifier", "text": "size", "parent": 153, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 27}}, {"id": 158, "type": "=", "text": "=", "parent": 152, "children": [], "start_point": {"row": 54, "column": 28}, "end_point": {"row": 54, "column": 29}}, {"id": 159, "type": "number_literal", "text": "0x800000", "parent": 152, "children": [], "start_point": {"row": 54, "column": 30}, "end_point": {"row": 54, "column": 38}}, {"id": 160, "type": "assignment_expression", "text": "context->properties.page_size = 0x100", "parent": 149, "children": [161, 166, 167], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 40}}, {"id": 161, "type": "field_expression", "text": "context->properties.page_size", "parent": 160, "children": [162, 165], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 32}}, {"id": 162, "type": "field_expression", "text": "context->properties", "parent": 161, "children": [163, 164], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 22}}, {"id": 163, "type": "identifier", "text": "context", "parent": 162, "children": [], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 10}}, {"id": 164, "type": "field_identifier", "text": "properties", "parent": 162, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 22}}, {"id": 165, "type": "field_identifier", "text": "page_size", "parent": 161, "children": [], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 32}}, {"id": 166, "type": "=", "text": "=", "parent": 160, "children": [], "start_point": {"row": 55, "column": 33}, "end_point": {"row": 55, "column": 34}}, {"id": 167, "type": "number_literal", "text": "0x100", "parent": 160, "children": [], "start_point": {"row": 55, "column": 35}, "end_point": {"row": 55, "column": 40}}, {"id": 168, "type": "assignment_expression", "text": "context->properties.sector_size = 0x1000", "parent": 149, "children": [169, 174, 175], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 43}}, {"id": 169, "type": "field_expression", "text": "context->properties.sector_size", "parent": 168, "children": [170, 173], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 34}}, {"id": 170, "type": "field_expression", "text": "context->properties", "parent": 169, "children": [171, 172], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 22}}, {"id": 171, "type": "identifier", "text": "context", "parent": 170, "children": [], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 10}}, {"id": 172, "type": "field_identifier", "text": "properties", "parent": 170, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 22}}, {"id": 173, "type": "field_identifier", "text": "sector_size", "parent": 169, "children": [], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 34}}, {"id": 174, "type": "=", "text": "=", "parent": 168, "children": [], "start_point": {"row": 56, "column": 35}, "end_point": {"row": 56, "column": 36}}, {"id": 175, "type": "number_literal", "text": "0x1000", "parent": 168, "children": [], "start_point": {"row": 56, "column": 37}, "end_point": {"row": 56, "column": 43}}, {"id": 176, "type": "assignment_expression", "text": "context->buff = malloc(context->properties.sector_size)", "parent": 149, "children": [177, 180, 181], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 58}}, {"id": 177, "type": "field_expression", "text": "context->buff", "parent": 176, "children": [178, 179], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 16}}, {"id": 178, "type": "identifier", "text": "context", "parent": 177, "children": [], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 10}}, {"id": 179, "type": "field_identifier", "text": "buff", "parent": 177, "children": [], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 16}}, {"id": 180, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 18}}, {"id": 181, "type": "call_expression", "text": "malloc(context->properties.sector_size)", "parent": 176, "children": [182, 183], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 58}}, {"id": 182, "type": "identifier", "text": "malloc", "parent": 181, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 25}}, {"id": 183, "type": "argument_list", "text": "(context->properties.sector_size)", "parent": 181, "children": [184], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 58}}, {"id": 184, "type": "field_expression", "text": "context->properties.sector_size", "parent": 183, "children": [185, 188], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 57}}, {"id": 185, "type": "field_expression", "text": "context->properties", "parent": 184, "children": [186, 187], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 45}}, {"id": 186, "type": "identifier", "text": "context", "parent": 185, "children": [], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 33}}, {"id": 187, "type": "field_identifier", "text": "properties", "parent": 185, "children": [], "start_point": {"row": 57, "column": 35}, "end_point": {"row": 57, "column": 45}}, {"id": 188, "type": "field_identifier", "text": "sector_size", "parent": 184, "children": [], "start_point": {"row": 57, "column": 46}, "end_point": {"row": 57, "column": 57}}, {"id": 189, "type": "if_statement", "text": "if (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;", "parent": 149, "children": [190, 198], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 60, "column": 19}}, {"id": 190, "type": "parenthesized_expression", "text": "(context->buff == NULL)", "parent": 189, "children": [191], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 29}}, {"id": 191, "type": "binary_expression", "text": "context->buff == NULL", "parent": 190, "children": [192, 195, 196], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 28}}, {"id": 192, "type": "field_expression", "text": "context->buff", "parent": 191, "children": [193, 194], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 20}}, {"id": 193, "type": "identifier", "text": "context", "parent": 192, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 14}}, {"id": 194, "type": "field_identifier", "text": "buff", "parent": 192, "children": [], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 59, "column": 20}}, {"id": 195, "type": "==", "text": "==", "parent": 191, "children": [], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 23}}, {"id": 196, "type": "null", "text": "NULL", "parent": 191, "children": [197], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 28}}, {"id": 197, "type": "NULL", "text": "NULL", "parent": 196, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 28}}, {"id": 198, "type": "return_statement", "text": "return -ENOMEM;", "parent": 189, "children": [199], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 19}}, {"id": 199, "type": "unary_expression", "text": "-ENOMEM", "parent": 198, "children": [200, 201], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 18}}, {"id": 200, "type": "-", "text": "-", "parent": 199, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 12}}, {"id": 201, "type": "identifier", "text": "ENOMEM", "parent": 199, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 18}}, {"id": 202, "type": "break_statement", "text": "break;", "parent": 149, "children": [203], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 9}}, {"id": 203, "type": "break", "text": "break", "parent": 202, "children": [], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 8}}, {"id": 204, "type": "case_statement", "text": "default :\n\t\t\treturn -ENODEV;", "parent": 140, "children": [205, 206], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 64, "column": 18}}, {"id": 205, "type": "default", "text": "default", "parent": 204, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 9}}, {"id": 206, "type": "return_statement", "text": "return -ENODEV;", "parent": 204, "children": [207], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 64, "column": 18}}, {"id": 207, "type": "unary_expression", "text": "-ENODEV", "parent": 206, "children": [208, 209], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 17}}, {"id": 208, "type": "-", "text": "-", "parent": 207, "children": [], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 11}}, {"id": 209, "type": "identifier", "text": "ENODEV", "parent": 207, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 17}}, {"id": 210, "type": "return_statement", "text": "return EOK;", "parent": 130, "children": [211], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 12}}, {"id": 211, "type": "identifier", "text": "EOK", "parent": 210, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 11}}, {"id": 212, "type": "function_definition", "text": "static int flash_getMicronConfig(flash_context_t *context)\n{\n\tswitch (GET_DEVICE_ID(context->flashID)) {\n\t\tcase MICRON_MT25QL512ABB :\n\t\t\tcontext->properties.size = 0x400000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn -ENODEV;\n\t}\n\n\treturn EOK;\n}", "parent": null, "children": [213, 214], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 89, "column": 1}}, {"id": 213, "type": "primitive_type", "text": "int", "parent": 212, "children": [], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 10}}, {"id": 214, "type": "function_declarator", "text": "flash_getMicronConfig(flash_context_t *context)", "parent": 212, "children": [215, 216], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 58}}, {"id": 215, "type": "identifier", "text": "flash_getMicronConfig", "parent": 214, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 32}}, {"id": 216, "type": "parameter_list", "text": "(flash_context_t *context)", "parent": 214, "children": [217], "start_point": {"row": 71, "column": 32}, "end_point": {"row": 71, "column": 58}}, {"id": 217, "type": "parameter_declaration", "text": "flash_context_t *context", "parent": 216, "children": [218, 219], "start_point": {"row": 71, "column": 33}, "end_point": {"row": 71, "column": 57}}, {"id": 218, "type": "type_identifier", "text": "flash_context_t", "parent": 217, "children": [], "start_point": {"row": 71, "column": 33}, "end_point": {"row": 71, "column": 48}}, {"id": 219, "type": "pointer_declarator", "text": "*context", "parent": 217, "children": [220, 221], "start_point": {"row": 71, "column": 49}, "end_point": {"row": 71, "column": 57}}, {"id": 220, "type": "*", "text": "*", "parent": 219, "children": [], "start_point": {"row": 71, "column": 49}, "end_point": {"row": 71, "column": 50}}, {"id": 221, "type": "identifier", "text": "context", "parent": 219, "children": [], "start_point": {"row": 71, "column": 50}, "end_point": {"row": 71, "column": 57}}, {"id": 222, "type": "switch_statement", "text": "switch (GET_DEVICE_ID(context->flashID)) {\n\t\tcase MICRON_MT25QL512ABB :\n\t\t\tcontext->properties.size = 0x400000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn -ENODEV;\n\t}", "parent": 212, "children": [223, 224], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 86, "column": 2}}, {"id": 223, "type": "switch", "text": "switch", "parent": 222, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 7}}, {"id": 224, "type": "parenthesized_expression", "text": "(GET_DEVICE_ID(context->flashID))", "parent": 222, "children": [225], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 41}}, {"id": 225, "type": "call_expression", "text": "GET_DEVICE_ID(context->flashID)", "parent": 224, "children": [226, 227], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 40}}, {"id": 226, "type": "identifier", "text": "GET_DEVICE_ID", "parent": 225, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 22}}, {"id": 227, "type": "argument_list", "text": "(context->flashID)", "parent": 225, "children": [228], "start_point": {"row": 73, "column": 22}, "end_point": {"row": 73, "column": 40}}, {"id": 228, "type": "field_expression", "text": "context->flashID", "parent": 227, "children": [229, 230], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 39}}, {"id": 229, "type": "identifier", "text": "context", "parent": 228, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 30}}, {"id": 230, "type": "field_identifier", "text": "flashID", "parent": 228, "children": [], "start_point": {"row": 73, "column": 32}, "end_point": {"row": 73, "column": 39}}, {"id": 231, "type": "case_statement", "text": "case MICRON_MT25QL512ABB :\n\t\t\tcontext->properties.size = 0x400000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;", "parent": 222, "children": [232, 233, 271, 284], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 82, "column": 9}}, {"id": 232, "type": "case", "text": "case", "parent": 231, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 6}}, {"id": 233, "type": "identifier", "text": "MICRON_MT25QL512ABB", "parent": 231, "children": [], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 26}}, {"id": 234, "type": "assignment_expression", "text": "context->properties.size = 0x400000", "parent": 231, "children": [235, 240, 241], "start_point": {"row": 75, "column": 3}, "end_point": {"row": 75, "column": 38}}, {"id": 235, "type": "field_expression", "text": "context->properties.size", "parent": 234, "children": [236, 239], "start_point": {"row": 75, "column": 3}, "end_point": {"row": 75, "column": 27}}, {"id": 236, "type": "field_expression", "text": "context->properties", "parent": 235, "children": [237, 238], "start_point": {"row": 75, "column": 3}, "end_point": {"row": 75, "column": 22}}, {"id": 237, "type": "identifier", "text": "context", "parent": 236, "children": [], "start_point": {"row": 75, "column": 3}, "end_point": {"row": 75, "column": 10}}, {"id": 238, "type": "field_identifier", "text": "properties", "parent": 236, "children": [], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 22}}, {"id": 239, "type": "field_identifier", "text": "size", "parent": 235, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 27}}, {"id": 240, "type": "=", "text": "=", "parent": 234, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 29}}, {"id": 241, "type": "number_literal", "text": "0x400000", "parent": 234, "children": [], "start_point": {"row": 75, "column": 30}, "end_point": {"row": 75, "column": 38}}, {"id": 242, "type": "assignment_expression", "text": "context->properties.page_size = 0x100", "parent": 231, "children": [243, 248, 249], "start_point": {"row": 76, "column": 3}, "end_point": {"row": 76, "column": 40}}, {"id": 243, "type": "field_expression", "text": "context->properties.page_size", "parent": 242, "children": [244, 247], "start_point": {"row": 76, "column": 3}, "end_point": {"row": 76, "column": 32}}, {"id": 244, "type": "field_expression", "text": "context->properties", "parent": 243, "children": [245, 246], "start_point": {"row": 76, "column": 3}, "end_point": {"row": 76, "column": 22}}, {"id": 245, "type": "identifier", "text": "context", "parent": 244, "children": [], "start_point": {"row": 76, "column": 3}, "end_point": {"row": 76, "column": 10}}, {"id": 246, "type": "field_identifier", "text": "properties", "parent": 244, "children": [], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 22}}, {"id": 247, "type": "field_identifier", "text": "page_size", "parent": 243, "children": [], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 32}}, {"id": 248, "type": "=", "text": "=", "parent": 242, "children": [], "start_point": {"row": 76, "column": 33}, "end_point": {"row": 76, "column": 34}}, {"id": 249, "type": "number_literal", "text": "0x100", "parent": 242, "children": [], "start_point": {"row": 76, "column": 35}, "end_point": {"row": 76, "column": 40}}, {"id": 250, "type": "assignment_expression", "text": "context->properties.sector_size = 0x1000", "parent": 231, "children": [251, 256, 257], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 43}}, {"id": 251, "type": "field_expression", "text": "context->properties.sector_size", "parent": 250, "children": [252, 255], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 34}}, {"id": 252, "type": "field_expression", "text": "context->properties", "parent": 251, "children": [253, 254], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 22}}, {"id": 253, "type": "identifier", "text": "context", "parent": 252, "children": [], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 10}}, {"id": 254, "type": "field_identifier", "text": "properties", "parent": 252, "children": [], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 22}}, {"id": 255, "type": "field_identifier", "text": "sector_size", "parent": 251, "children": [], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 34}}, {"id": 256, "type": "=", "text": "=", "parent": 250, "children": [], "start_point": {"row": 77, "column": 35}, "end_point": {"row": 77, "column": 36}}, {"id": 257, "type": "number_literal", "text": "0x1000", "parent": 250, "children": [], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 43}}, {"id": 258, "type": "assignment_expression", "text": "context->buff = malloc(context->properties.sector_size)", "parent": 231, "children": [259, 262, 263], "start_point": {"row": 78, "column": 3}, "end_point": {"row": 78, "column": 58}}, {"id": 259, "type": "field_expression", "text": "context->buff", "parent": 258, "children": [260, 261], "start_point": {"row": 78, "column": 3}, "end_point": {"row": 78, "column": 16}}, {"id": 260, "type": "identifier", "text": "context", "parent": 259, "children": [], "start_point": {"row": 78, "column": 3}, "end_point": {"row": 78, "column": 10}}, {"id": 261, "type": "field_identifier", "text": "buff", "parent": 259, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 16}}, {"id": 262, "type": "=", "text": "=", "parent": 258, "children": [], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 18}}, {"id": 263, "type": "call_expression", "text": "malloc(context->properties.sector_size)", "parent": 258, "children": [264, 265], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 58}}, {"id": 264, "type": "identifier", "text": "malloc", "parent": 263, "children": [], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 25}}, {"id": 265, "type": "argument_list", "text": "(context->properties.sector_size)", "parent": 263, "children": [266], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 58}}, {"id": 266, "type": "field_expression", "text": "context->properties.sector_size", "parent": 265, "children": [267, 270], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 57}}, {"id": 267, "type": "field_expression", "text": "context->properties", "parent": 266, "children": [268, 269], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 45}}, {"id": 268, "type": "identifier", "text": "context", "parent": 267, "children": [], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 33}}, {"id": 269, "type": "field_identifier", "text": "properties", "parent": 267, "children": [], "start_point": {"row": 78, "column": 35}, "end_point": {"row": 78, "column": 45}}, {"id": 270, "type": "field_identifier", "text": "sector_size", "parent": 266, "children": [], "start_point": {"row": 78, "column": 46}, "end_point": {"row": 78, "column": 57}}, {"id": 271, "type": "if_statement", "text": "if (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;", "parent": 231, "children": [272, 280], "start_point": {"row": 80, "column": 3}, "end_point": {"row": 81, "column": 19}}, {"id": 272, "type": "parenthesized_expression", "text": "(context->buff == NULL)", "parent": 271, "children": [273], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 29}}, {"id": 273, "type": "binary_expression", "text": "context->buff == NULL", "parent": 272, "children": [274, 277, 278], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 28}}, {"id": 274, "type": "field_expression", "text": "context->buff", "parent": 273, "children": [275, 276], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 20}}, {"id": 275, "type": "identifier", "text": "context", "parent": 274, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 14}}, {"id": 276, "type": "field_identifier", "text": "buff", "parent": 274, "children": [], "start_point": {"row": 80, "column": 16}, "end_point": {"row": 80, "column": 20}}, {"id": 277, "type": "==", "text": "==", "parent": 273, "children": [], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 23}}, {"id": 278, "type": "null", "text": "NULL", "parent": 273, "children": [279], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 28}}, {"id": 279, "type": "NULL", "text": "NULL", "parent": 278, "children": [], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 28}}, {"id": 280, "type": "return_statement", "text": "return -ENOMEM;", "parent": 271, "children": [281], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 19}}, {"id": 281, "type": "unary_expression", "text": "-ENOMEM", "parent": 280, "children": [282, 283], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 18}}, {"id": 282, "type": "-", "text": "-", "parent": 281, "children": [], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 12}}, {"id": 283, "type": "identifier", "text": "ENOMEM", "parent": 281, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 18}}, {"id": 284, "type": "break_statement", "text": "break;", "parent": 231, "children": [285], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 9}}, {"id": 285, "type": "break", "text": "break", "parent": 284, "children": [], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 8}}, {"id": 286, "type": "case_statement", "text": "default :\n\t\t\treturn -ENODEV;", "parent": 222, "children": [287, 288], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 85, "column": 18}}, {"id": 287, "type": "default", "text": "default", "parent": 286, "children": [], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 9}}, {"id": 288, "type": "return_statement", "text": "return -ENODEV;", "parent": 286, "children": [289], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 18}}, {"id": 289, "type": "unary_expression", "text": "-ENODEV", "parent": 288, "children": [290, 291], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 17}}, {"id": 290, "type": "-", "text": "-", "parent": 289, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 11}}, {"id": 291, "type": "identifier", "text": "ENODEV", "parent": 289, "children": [], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 17}}, {"id": 292, "type": "return_statement", "text": "return EOK;", "parent": 212, "children": [293], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 12}}, {"id": 293, "type": "identifier", "text": "EOK", "parent": 292, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 11}}, {"id": 294, "type": "function_definition", "text": "int flash_getConfig(flash_context_t *context)\n{\n\tswitch (GET_MANUFACTURE_ID(context->flashID)) {\n\t\tcase flash_windbond :\n\t\t\tif (flash_getWindbondConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;\n\n\t\tcase flash_issi :\n\t\t\tif (flash_getIssiConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;\n\n\t\tcase flash_micron :\n\t\t\tif (flash_getMicronConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\treturn -ENODEV;\n\t}\n\n\treturn EOK;\n}", "parent": null, "children": [295, 296], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 115, "column": 1}}, {"id": 295, "type": "primitive_type", "text": "int", "parent": 294, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 3}}, {"id": 296, "type": "function_declarator", "text": "flash_getConfig(flash_context_t *context)", "parent": 294, "children": [297, 298], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 45}}, {"id": 297, "type": "identifier", "text": "flash_getConfig", "parent": 296, "children": [], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 19}}, {"id": 298, "type": "parameter_list", "text": "(flash_context_t *context)", "parent": 296, "children": [299], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 92, "column": 45}}, {"id": 299, "type": "parameter_declaration", "text": "flash_context_t *context", "parent": 298, "children": [300, 301], "start_point": {"row": 92, "column": 20}, "end_point": {"row": 92, "column": 44}}, {"id": 300, "type": "type_identifier", "text": "flash_context_t", "parent": 299, "children": [], "start_point": {"row": 92, "column": 20}, "end_point": {"row": 92, "column": 35}}, {"id": 301, "type": "pointer_declarator", "text": "*context", "parent": 299, "children": [302, 303], "start_point": {"row": 92, "column": 36}, "end_point": {"row": 92, "column": 44}}, {"id": 302, "type": "*", "text": "*", "parent": 301, "children": [], "start_point": {"row": 92, "column": 36}, "end_point": {"row": 92, "column": 37}}, {"id": 303, "type": "identifier", "text": "context", "parent": 301, "children": [], "start_point": {"row": 92, "column": 37}, "end_point": {"row": 92, "column": 44}}, {"id": 304, "type": "switch_statement", "text": "switch (GET_MANUFACTURE_ID(context->flashID)) {\n\t\tcase flash_windbond :\n\t\t\tif (flash_getWindbondConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;\n\n\t\tcase flash_issi :\n\t\t\tif (flash_getIssiConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;\n\n\t\tcase flash_micron :\n\t\t\tif (flash_getMicronConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\treturn -ENODEV;\n\t}", "parent": 294, "children": [305, 306], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 112, "column": 2}}, {"id": 305, "type": "switch", "text": "switch", "parent": 304, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 7}}, {"id": 306, "type": "parenthesized_expression", "text": "(GET_MANUFACTURE_ID(context->flashID))", "parent": 304, "children": [307], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 46}}, {"id": 307, "type": "call_expression", "text": "GET_MANUFACTURE_ID(context->flashID)", "parent": 306, "children": [308, 309], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 45}}, {"id": 308, "type": "identifier", "text": "GET_MANUFACTURE_ID", "parent": 307, "children": [], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 27}}, {"id": 309, "type": "argument_list", "text": "(context->flashID)", "parent": 307, "children": [310], "start_point": {"row": 94, "column": 27}, "end_point": {"row": 94, "column": 45}}, {"id": 310, "type": "field_expression", "text": "context->flashID", "parent": 309, "children": [311, 312], "start_point": {"row": 94, "column": 28}, "end_point": {"row": 94, "column": 44}}, {"id": 311, "type": "identifier", "text": "context", "parent": 310, "children": [], "start_point": {"row": 94, "column": 28}, "end_point": {"row": 94, "column": 35}}, {"id": 312, "type": "field_identifier", "text": "flashID", "parent": 310, "children": [], "start_point": {"row": 94, "column": 37}, "end_point": {"row": 94, "column": 44}}, {"id": 313, "type": "case_statement", "text": "case flash_windbond :\n\t\t\tif (flash_getWindbondConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;", "parent": 304, "children": [314, 315, 316, 329], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 98, "column": 9}}, {"id": 314, "type": "case", "text": "case", "parent": 313, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 6}}, {"id": 315, "type": "identifier", "text": "flash_windbond", "parent": 313, "children": [], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 21}}, {"id": 316, "type": "if_statement", "text": "if (flash_getWindbondConfig(context) < 0)\n\t\t\t\treturn -ENODEV;", "parent": 313, "children": [317, 325], "start_point": {"row": 96, "column": 3}, "end_point": {"row": 97, "column": 19}}, {"id": 317, "type": "parenthesized_expression", "text": "(flash_getWindbondConfig(context) < 0)", "parent": 316, "children": [318], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 44}}, {"id": 318, "type": "binary_expression", "text": "flash_getWindbondConfig(context) < 0", "parent": 317, "children": [319, 323, 324], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 43}}, {"id": 319, "type": "call_expression", "text": "flash_getWindbondConfig(context)", "parent": 318, "children": [320, 321], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 39}}, {"id": 320, "type": "identifier", "text": "flash_getWindbondConfig", "parent": 319, "children": [], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 30}}, {"id": 321, "type": "argument_list", "text": "(context)", "parent": 319, "children": [322], "start_point": {"row": 96, "column": 30}, "end_point": {"row": 96, "column": 39}}, {"id": 322, "type": "identifier", "text": "context", "parent": 321, "children": [], "start_point": {"row": 96, "column": 31}, "end_point": {"row": 96, "column": 38}}, {"id": 323, "type": "<", "text": "<", "parent": 318, "children": [], "start_point": {"row": 96, "column": 40}, "end_point": {"row": 96, "column": 41}}, {"id": 324, "type": "number_literal", "text": "0", "parent": 318, "children": [], "start_point": {"row": 96, "column": 42}, "end_point": {"row": 96, "column": 43}}, {"id": 325, "type": "return_statement", "text": "return -ENODEV;", "parent": 316, "children": [326], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 19}}, {"id": 326, "type": "unary_expression", "text": "-ENODEV", "parent": 325, "children": [327, 328], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 18}}, {"id": 327, "type": "-", "text": "-", "parent": 326, "children": [], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 12}}, {"id": 328, "type": "identifier", "text": "ENODEV", "parent": 326, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 18}}, {"id": 329, "type": "break_statement", "text": "break;", "parent": 313, "children": [330], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 9}}, {"id": 330, "type": "break", "text": "break", "parent": 329, "children": [], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 8}}, {"id": 331, "type": "case_statement", "text": "case flash_issi :\n\t\t\tif (flash_getIssiConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;", "parent": 304, "children": [332, 333, 334, 347], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 103, "column": 9}}, {"id": 332, "type": "case", "text": "case", "parent": 331, "children": [], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 6}}, {"id": 333, "type": "identifier", "text": "flash_issi", "parent": 331, "children": [], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 17}}, {"id": 334, "type": "if_statement", "text": "if (flash_getIssiConfig(context) < 0)\n\t\t\t\treturn -ENODEV;", "parent": 331, "children": [335, 343], "start_point": {"row": 101, "column": 3}, "end_point": {"row": 102, "column": 19}}, {"id": 335, "type": "parenthesized_expression", "text": "(flash_getIssiConfig(context) < 0)", "parent": 334, "children": [336], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 40}}, {"id": 336, "type": "binary_expression", "text": "flash_getIssiConfig(context) < 0", "parent": 335, "children": [337, 341, 342], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 39}}, {"id": 337, "type": "call_expression", "text": "flash_getIssiConfig(context)", "parent": 336, "children": [338, 339], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 35}}, {"id": 338, "type": "identifier", "text": "flash_getIssiConfig", "parent": 337, "children": [], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 26}}, {"id": 339, "type": "argument_list", "text": "(context)", "parent": 337, "children": [340], "start_point": {"row": 101, "column": 26}, "end_point": {"row": 101, "column": 35}}, {"id": 340, "type": "identifier", "text": "context", "parent": 339, "children": [], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 34}}, {"id": 341, "type": "<", "text": "<", "parent": 336, "children": [], "start_point": {"row": 101, "column": 36}, "end_point": {"row": 101, "column": 37}}, {"id": 342, "type": "number_literal", "text": "0", "parent": 336, "children": [], "start_point": {"row": 101, "column": 38}, "end_point": {"row": 101, "column": 39}}, {"id": 343, "type": "return_statement", "text": "return -ENODEV;", "parent": 334, "children": [344], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 19}}, {"id": 344, "type": "unary_expression", "text": "-ENODEV", "parent": 343, "children": [345, 346], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 18}}, {"id": 345, "type": "-", "text": "-", "parent": 344, "children": [], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 12}}, {"id": 346, "type": "identifier", "text": "ENODEV", "parent": 344, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 18}}, {"id": 347, "type": "break_statement", "text": "break;", "parent": 331, "children": [348], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 9}}, {"id": 348, "type": "break", "text": "break", "parent": 347, "children": [], "start_point": {"row": 103, "column": 3}, "end_point": {"row": 103, "column": 8}}, {"id": 349, "type": "case_statement", "text": "case flash_micron :\n\t\t\tif (flash_getMicronConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;", "parent": 304, "children": [350, 351, 352, 365], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 108, "column": 9}}, {"id": 350, "type": "case", "text": "case", "parent": 349, "children": [], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 6}}, {"id": 351, "type": "identifier", "text": "flash_micron", "parent": 349, "children": [], "start_point": {"row": 105, "column": 7}, "end_point": {"row": 105, "column": 19}}, {"id": 352, "type": "if_statement", "text": "if (flash_getMicronConfig(context) < 0)\n\t\t\t\treturn -ENODEV;", "parent": 349, "children": [353, 361], "start_point": {"row": 106, "column": 3}, "end_point": {"row": 107, "column": 19}}, {"id": 353, "type": "parenthesized_expression", "text": "(flash_getMicronConfig(context) < 0)", "parent": 352, "children": [354], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 42}}, {"id": 354, "type": "binary_expression", "text": "flash_getMicronConfig(context) < 0", "parent": 353, "children": [355, 359, 360], "start_point": {"row": 106, "column": 7}, "end_point": {"row": 106, "column": 41}}, {"id": 355, "type": "call_expression", "text": "flash_getMicronConfig(context)", "parent": 354, "children": [356, 357], "start_point": {"row": 106, "column": 7}, "end_point": {"row": 106, "column": 37}}, {"id": 356, "type": "identifier", "text": "flash_getMicronConfig", "parent": 355, "children": [], "start_point": {"row": 106, "column": 7}, "end_point": {"row": 106, "column": 28}}, {"id": 357, "type": "argument_list", "text": "(context)", "parent": 355, "children": [358], "start_point": {"row": 106, "column": 28}, "end_point": {"row": 106, "column": 37}}, {"id": 358, "type": "identifier", "text": "context", "parent": 357, "children": [], "start_point": {"row": 106, "column": 29}, "end_point": {"row": 106, "column": 36}}, {"id": 359, "type": "<", "text": "<", "parent": 354, "children": [], "start_point": {"row": 106, "column": 38}, "end_point": {"row": 106, "column": 39}}, {"id": 360, "type": "number_literal", "text": "0", "parent": 354, "children": [], "start_point": {"row": 106, "column": 40}, "end_point": {"row": 106, "column": 41}}, {"id": 361, "type": "return_statement", "text": "return -ENODEV;", "parent": 352, "children": [362], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 19}}, {"id": 362, "type": "unary_expression", "text": "-ENODEV", "parent": 361, "children": [363, 364], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 18}}, {"id": 363, "type": "-", "text": "-", "parent": 362, "children": [], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 12}}, {"id": 364, "type": "identifier", "text": "ENODEV", "parent": 362, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 18}}, {"id": 365, "type": "break_statement", "text": "break;", "parent": 349, "children": [366], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 108, "column": 9}}, {"id": 366, "type": "break", "text": "break", "parent": 365, "children": [], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 108, "column": 8}}, {"id": 367, "type": "case_statement", "text": "default:\n\t\t\treturn -ENODEV;", "parent": 304, "children": [368, 369], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 111, "column": 18}}, {"id": 368, "type": "default", "text": "default", "parent": 367, "children": [], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 9}}, {"id": 369, "type": "return_statement", "text": "return -ENODEV;", "parent": 367, "children": [370], "start_point": {"row": 111, "column": 3}, "end_point": {"row": 111, "column": 18}}, {"id": 370, "type": "unary_expression", "text": "-ENODEV", "parent": 369, "children": [371, 372], "start_point": {"row": 111, "column": 10}, "end_point": {"row": 111, "column": 17}}, {"id": 371, "type": "-", "text": "-", "parent": 370, "children": [], "start_point": {"row": 111, "column": 10}, "end_point": {"row": 111, "column": 11}}, {"id": 372, "type": "identifier", "text": "ENODEV", "parent": 370, "children": [], "start_point": {"row": 111, "column": 11}, "end_point": {"row": 111, "column": 17}}, {"id": 373, "type": "return_statement", "text": "return EOK;", "parent": 294, "children": [374], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 12}}, {"id": 374, "type": "identifier", "text": "EOK", "parent": 373, "children": [], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 11}}]}, "node_categories": {"declarations": {"functions": [21, 27, 48, 50, 130, 132, 212, 214, 294, 296], "variables": [53, 135, 217, 299], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": [33, 34, 35, 36, 40, 44]}, "statements": {"expressions": [60, 61, 64, 71, 72, 79, 80, 87, 88, 95, 99, 102, 103, 108, 109, 110, 117, 125, 142, 143, 146, 153, 154, 161, 162, 169, 170, 177, 181, 184, 185, 190, 191, 192, 199, 207, 224, 225, 228, 235, 236, 243, 244, 251, 252, 259, 263, 266, 267, 272, 273, 274, 281, 289, 306, 307, 310, 317, 318, 319, 326, 335, 336, 337, 344, 353, 354, 355, 362, 370], "assignments": [70, 78, 86, 94, 152, 160, 168, 176, 234, 242, 250, 258], "loops": [], "conditionals": [11, 15, 19, 23, 25, 29, 31, 37, 41, 45, 51, 54, 57, 58, 59, 62, 65, 66, 67, 68, 69, 73, 74, 75, 81, 82, 83, 89, 90, 91, 96, 97, 100, 104, 105, 106, 107, 111, 112, 119, 122, 127, 129, 133, 136, 139, 140, 141, 144, 147, 148, 149, 150, 151, 155, 156, 157, 163, 164, 165, 171, 172, 173, 178, 179, 182, 186, 187, 188, 189, 193, 194, 201, 204, 209, 211, 215, 218, 221, 222, 223, 226, 229, 230, 231, 232, 233, 237, 238, 239, 245, 246, 247, 253, 254, 255, 260, 261, 264, 268, 269, 270, 271, 275, 276, 283, 286, 291, 293, 297, 300, 303, 304, 305, 308, 311, 312, 313, 314, 315, 316, 320, 322, 328, 331, 332, 333, 334, 338, 340, 346, 349, 350, 351, 352, 356, 358, 364, 367, 372, 374], "returns": [116, 124, 128, 198, 206, 210, 280, 288, 292, 325, 343, 361, 369, 373], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 39, 43, 47, 77, 85, 93, 159, 167, 175, 241, 249, 257, 324, 342, 360], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "unknown", "text_snippet": "#define GET_MANUFACTURE_ID(flashID) (flashID & 0xff)\n"}, {"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "#define GET_DEVICE_ID(flashID) (((flashID >> 16) & 0xff) | (flashID & (0xff << 8)))\n"}, {"node_id": 48, "universal_type": "function", "name": "flash_getWindbondConfig", "text_snippet": "static int flash_getWindbondConfig(flash_context_t *context)\n{\n\tswitch (GET_DEVICE_ID(context->flash"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "flash_getWindbondConfig(flash_context_t *context)"}, {"node_id": 130, "universal_type": "function", "name": "flash_getIssiConfig", "text_snippet": "static int flash_getIssiConfig(flash_context_t *context)\n{\n\tswitch (GET_DEVICE_ID(context->flashID))"}, {"node_id": 132, "universal_type": "function", "name": "unknown", "text_snippet": "flash_getIssiConfig(flash_context_t *context)"}, {"node_id": 212, "universal_type": "function", "name": "flash_getMicronConfig", "text_snippet": "static int flash_getMicronConfig(flash_context_t *context)\n{\n\tswitch (GET_DEVICE_ID(context->flashID"}, {"node_id": 214, "universal_type": "function", "name": "unknown", "text_snippet": "flash_getMicronConfig(flash_context_t *context)"}, {"node_id": 294, "universal_type": "function", "name": "flash_getConfig", "text_snippet": "int flash_getConfig(flash_context_t *context)\n{\n\tswitch (GET_MANUFACTURE_ID(context->flashID)) {\n\t\tc"}, {"node_id": 296, "universal_type": "function", "name": "unknown", "text_snippet": "flash_getConfig(flash_context_t *context)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdlib.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <errno.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"flash_config.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n * Phoenix-RTOS\n *\n * i.MX RT Flash Configurator\n *\n * Copyright 2019 Phoenix Systems\n * Author: <NAME>\n *\n * This file is part of Phoenix-RTOS.\n *\n * %LICENSE%\n */\n\n#include <stdlib.h>\n#include <errno.h>\n\n#include \"flash_config.h\"\n\n#define WINDBOND_W25Q32JV_IQ 0x4016\n#define ISSI_DEV_IS25WP064A 0x7017\n#define MICRON_MT25QL512ABB 0xba20\n\n#define GET_MANUFACTURE_ID(flashID) (flashID & 0xff)\n#define GET_DEVICE_ID(flashID) (((flashID >> 16) & 0xff) | (flashID & (0xff << 8)))\n\n\nenum {\tflash_windbond = 0xef, flash_issi = 0x9d, flash_micron = 0x20 };\n\n\nstatic int flash_getWindbondConfig(flash_context_t *context)\n{\n\tswitch (GET_DEVICE_ID(context->flashID)) {\n\t\tcase WINDBOND_W25Q32JV_IQ :\n\t\t\tcontext->properties.size = 0x400000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn -ENODEV;\n\t}\n\n\treturn EOK;\n}\n\n\nstatic int flash_getIssiConfig(flash_context_t *context)\n{\n\tswitch (GET_DEVICE_ID(context->flashID)) {\n\t\tcase ISSI_DEV_IS25WP064A :\n\t\t\tcontext->properties.size = 0x800000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn -ENODEV;\n\t}\n\n\treturn EOK;\n}\n\n\nstatic int flash_getMicronConfig(flash_context_t *context)\n{\n\tswitch (GET_DEVICE_ID(context->flashID)) {\n\t\tcase MICRON_MT25QL512ABB :\n\t\t\tcontext->properties.size = 0x400000;\n\t\t\tcontext->properties.page_size = 0x100;\n\t\t\tcontext->properties.sector_size = 0x1000;\n\t\t\tcontext->buff = malloc(context->properties.sector_size);\n\n\t\t\tif (context->buff == NULL)\n\t\t\t\treturn -ENOMEM;\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn -ENODEV;\n\t}\n\n\treturn EOK;\n}\n\n\nint flash_getConfig(flash_context_t *context)\n{\n\tswitch (GET_MANUFACTURE_ID(context->flashID)) {\n\t\tcase flash_windbond :\n\t\t\tif (flash_getWindbondConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;\n\n\t\tcase flash_issi :\n\t\t\tif (flash_getIssiConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;\n\n\t\tcase flash_micron :\n\t\t\tif (flash_getMicronConfig(context) < 0)\n\t\t\t\treturn -ENODEV;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\treturn -ENODEV;\n\t}\n\n\treturn EOK;\n}\n"}
80,902
c
#include "utils.h" char * itoa_mp(int i) // función para convertir de int a array de char { char * res = malloc(8 * sizeof(int)); sprintf(res, "%d", i); return res; }
23.29
7
(translation_unit) "#include "utils.h"\n\nchar * itoa_mp(int i) // función para convertir de int a array de char\n{\n char * res = malloc(8 * sizeof(int));\n sprintf(res, "%d", i);\n return res;\n}\n" (preproc_include) "#include "utils.h"\n" (#include) "#include" (string_literal) ""utils.h"" (") """ (string_content) "utils.h" (") """ (function_definition) "char * itoa_mp(int i) // función para convertir de int a array de char\n{\n char * res = malloc(8 * sizeof(int));\n sprintf(res, "%d", i);\n return res;\n}\n" (primitive_type) "char" (pointer_declarator) "* itoa_mp(int i)" (*) "*" (function_declarator) "itoa_mp(int i)" (identifier) "itoa_mp" (parameter_list) "(int i)" (() "(" (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (comment) "// función para convertir de int a array de char\n" (compound_statement) "\n char * res = malloc(8 * sizeof(int));\n sprintf(res, "%d", i);\n return res;\n}\n" ({) "\n" (declaration) "har * res = malloc(8 * sizeof(int));\n" (primitive_type) "har " (init_declarator) " res = malloc(8 * sizeof(int));" (pointer_declarator) " res " (*) " " (identifier) "es " (=) " " (call_expression) "alloc(8 * sizeof(int));" (identifier) "alloc(" (argument_list) "8 * sizeof(int));" (() "8" (binary_expression) " * sizeof(int))" (number_literal) " " (*) " " (sizeof_expression) "izeof(int))" (sizeof) "izeof(" (() "i" (type_descriptor) "nt)" (primitive_type) "nt)" ()) ")" ()) ";" (;) "\n" (expression_statement) "printf(res, "%d", i);\n" (call_expression) "printf(res, "%d", i);" (identifier) "printf(" (argument_list) "res, "%d", i);" (() "r" (identifier) "es," (,) " " (string_literal) "%d"," (") "%" (string_content) "d"" (") "," (,) " " (identifier) ")" ()) ";" (;) "\n" (return_statement) "eturn res;\n" (return) "eturn " (identifier) "es;" (;) "\n" (}) "\n"
64
0
{"language": "c", "success": true, "metadata": {"lines": 7, "avg_line_length": 23.29, "nodes": 37, "errors": 0, "source_hash": "6737983cb481e327b1d7cd9eb26a97a6433f586751cd9f9c4a076217d624f1ec", "categorized_nodes": 21}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"utils.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"utils.h\"", "parent": 0, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 18}}, {"id": 3, "type": "function_definition", "text": "char * itoa_mp(int i)\t// funci\u00f3n para convertir de int a array de char\n{\n\tchar * res = malloc(8 * sizeof(int));\n\tsprintf(res, \"%d\", i);\n\treturn res;\n}\n", "parent": null, "children": [4, 5], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "char", "parent": 3, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 4}}, {"id": 5, "type": "pointer_declarator", "text": "* itoa_mp(int i)", "parent": 3, "children": [6, 7], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 21}}, {"id": 6, "type": "*", "text": "*", "parent": 5, "children": [], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 6}}, {"id": 7, "type": "function_declarator", "text": "itoa_mp(int i)", "parent": 5, "children": [8, 9], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 21}}, {"id": 8, "type": "identifier", "text": "itoa_mp", "parent": 7, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 14}}, {"id": 9, "type": "parameter_list", "text": "(int i)", "parent": 7, "children": [10], "start_point": {"row": 3, "column": 14}, "end_point": {"row": 3, "column": 21}}, {"id": 10, "type": "parameter_declaration", "text": "int i", "parent": 9, "children": [11, 12], "start_point": {"row": 3, "column": 15}, "end_point": {"row": 3, "column": 20}}, {"id": 11, "type": "primitive_type", "text": "int", "parent": 10, "children": [], "start_point": {"row": 3, "column": 15}, "end_point": {"row": 3, "column": 18}}, {"id": 12, "type": "identifier", "text": "i", "parent": 10, "children": [], "start_point": {"row": 3, "column": 19}, "end_point": {"row": 3, "column": 20}}, {"id": 13, "type": "declaration", "text": "har * res = malloc(8 * sizeof(int));\n", "parent": 3, "children": [14, 15], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 38}}, {"id": 14, "type": "primitive_type", "text": "har ", "parent": 13, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 5}}, {"id": 15, "type": "init_declarator", "text": " res = malloc(8 * sizeof(int));", "parent": 13, "children": [16, 19, 20], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 37}}, {"id": 16, "type": "pointer_declarator", "text": " res ", "parent": 15, "children": [17, 18], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 11}}, {"id": 17, "type": "*", "text": " ", "parent": 16, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 7}}, {"id": 18, "type": "identifier", "text": "es ", "parent": 16, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 11}}, {"id": 19, "type": "=", "text": " ", "parent": 15, "children": [], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 13}}, {"id": 20, "type": "call_expression", "text": "alloc(8 * sizeof(int));", "parent": 15, "children": [21, 22], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 37}}, {"id": 21, "type": "identifier", "text": "alloc(", "parent": 20, "children": [], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 20}}, {"id": 22, "type": "argument_list", "text": "8 * sizeof(int));", "parent": 20, "children": [23], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 37}}, {"id": 23, "type": "binary_expression", "text": " * sizeof(int))", "parent": 22, "children": [24, 25, 26], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 36}}, {"id": 24, "type": "number_literal", "text": " ", "parent": 23, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 22}}, {"id": 25, "type": "*", "text": " ", "parent": 23, "children": [], "start_point": {"row": 5, "column": 23}, "end_point": {"row": 5, "column": 24}}, {"id": 26, "type": "sizeof_expression", "text": "izeof(int))", "parent": 23, "children": [27, 28], "start_point": {"row": 5, "column": 25}, "end_point": {"row": 5, "column": 36}}, {"id": 27, "type": "sizeof", "text": "izeof(", "parent": 26, "children": [], "start_point": {"row": 5, "column": 25}, "end_point": {"row": 5, "column": 31}}, {"id": 28, "type": "type_descriptor", "text": "nt)", "parent": 26, "children": [29], "start_point": {"row": 5, "column": 32}, "end_point": {"row": 5, "column": 35}}, {"id": 29, "type": "primitive_type", "text": "nt)", "parent": 28, "children": [], "start_point": {"row": 5, "column": 32}, "end_point": {"row": 5, "column": 35}}, {"id": 30, "type": "call_expression", "text": "printf(res, \"%d\", i);", "parent": 3, "children": [31, 32], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 22}}, {"id": 31, "type": "identifier", "text": "printf(", "parent": 30, "children": [], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 8}}, {"id": 32, "type": "argument_list", "text": "res, \"%d\", i);", "parent": 30, "children": [33, 34], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 22}}, {"id": 33, "type": "identifier", "text": "es,", "parent": 32, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 12}}, {"id": 34, "type": "string_literal", "text": "%d\",", "parent": 32, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 18}}, {"id": 35, "type": "return_statement", "text": "eturn res;\n", "parent": 3, "children": [36], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 12}}, {"id": 36, "type": "identifier", "text": "es;", "parent": 35, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 11}}]}, "node_categories": {"declarations": {"functions": [3, 7], "variables": [10, 13], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [20, 23, 26, 30], "assignments": [], "loops": [], "conditionals": [8, 12, 18, 21, 31, 33, 36], "returns": [35], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 24, 34], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "a", "text_snippet": "char * itoa_mp(int i)\t// funci\u00f3n para convertir de int a array de char\n{\n\tchar * res = malloc(8 * si"}, {"node_id": 7, "universal_type": "function", "name": "unknown", "text_snippet": "itoa_mp(int i)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"utils.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "\n#include \"utils.h\"\n\nchar * itoa_mp(int i)\t// funci\u00f3n para convertir de int a array de char\n{\n\tchar * res = malloc(8 * sizeof(int));\n\tsprintf(res, \"%d\", i);\n\treturn res;\n}\n"}
80,903
c
// // STRImgur.h // ShareToReddit // // Created by <NAME> on 01/10/2013. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface STRImgur : NSObject + (void)uploadImage:(UIImage*)img progress:(void(^)(float))progress completion:(void(^)(NSURL*,NSError*))completion; @end
27.91
11
(translation_unit) "//\n// STRImgur.h\n// ShareToReddit\n//\n// Created by <NAME> on 01/10/2013.\n// Copyright (c) 2013 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface STRImgur : NSObject\n\n+ (void)uploadImage:(UIImage*)img progress:(void(^)(float))progress completion:(void(^)(NSURL*,NSError*))completion;\n\n@end\n" (comment) "//" (comment) "// STRImgur.h" (comment) "// ShareToReddit" (comment) "//" (comment) "// Created by <NAME> on 01/10/2013." (comment) "// Copyright (c) 2013 <NAME>. All rights reserved." (comment) "//" (preproc_call) "#import <Foundation/Foundation.h>\n" (preproc_directive) "#import" (preproc_arg) "<Foundation/Foundation.h>" (ERROR) "@interface STRImgur : NSObject\n\n+ (void)uploadImage:(UIImage*)img progress:(void(^)(" (ERROR) "@" (type_identifier) "interface" (identifier) "STRImgur" (:) ":" (identifier) "NSObject" (unary_expression) "+ (void)uploadImage" (+) "+" (cast_expression) "(void)uploadImage" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "uploadImage" (:) ":" (() "(" (binary_expression) "UIImage*)img progress" (identifier) "UIImage" (*) "*" (ERROR) ")img" ()) ")" (identifier) "img" (identifier) "progress" (:) ":" (() "(" (primitive_type) "void" (() "(" (^) "^" ()) ")" (() "(" (declaration) "float))progress" (primitive_type) "float" (ERROR) "))" ()) ")" ()) ")" (identifier) "progress" (;) "" (labeled_statement) "completion:(void(^)(NSURL*,NSError*))completion;" (statement_identifier) "completion" (:) ":" (expression_statement) "(void(^)(NSURL*,NSError*))completion;" (cast_expression) "(void(^)(NSURL*,NSError*))completion" (() "(" (type_descriptor) "void(^)(NSURL*,NSError*)" (primitive_type) "void" (abstract_function_declarator) "(^)(NSURL*,NSError*)" (abstract_function_declarator) "(^)" (parameter_list) "(^)" (() "(" (ERROR) "^" (^) "^" ()) ")" (parameter_list) "(NSURL*,NSError*)" (() "(" (parameter_declaration) "NSURL*" (type_identifier) "NSURL" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "NSError*" (type_identifier) "NSError" (abstract_pointer_declarator) "*" (*) "*" ()) ")" ()) ")" (identifier) "completion" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
83
7
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 27.91, "nodes": 48, "errors": 0, "source_hash": "c56ba10b01a787f5e4c005f5eb24d9233fed22e47f839b734924b10c5c5a4dcb", "categorized_nodes": 22}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <Foundation/Foundation.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": "<Foundation/Foundation.h>", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "ERROR", "text": "@interface STRImgur : NSObject\n\n+ (void)uploadImage:(UIImage*)img progress:(void(^)(", "parent": null, "children": [4, 5, 6, 7, 8, 14, 20, 21], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 52}}, {"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": "STRImgur", "parent": 3, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 19}}, {"id": 7, "type": "identifier", "text": "NSObject", "parent": 3, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 30}}, {"id": 8, "type": "unary_expression", "text": "+ (void)uploadImage", "parent": 3, "children": [9, 10], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 19}}, {"id": 9, "type": "+", "text": "+", "parent": 8, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 10, "type": "cast_expression", "text": "(void)uploadImage", "parent": 8, "children": [11, 13], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 19}}, {"id": 11, "type": "type_descriptor", "text": "void", "parent": 10, "children": [12], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 12, "type": "primitive_type", "text": "void", "parent": 11, "children": [], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 13, "type": "identifier", "text": "uploadImage", "parent": 10, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 19}}, {"id": 14, "type": "binary_expression", "text": "UIImage*)img progress", "parent": 3, "children": [15, 16, 17, 19], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 42}}, {"id": 15, "type": "identifier", "text": "UIImage", "parent": 14, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 28}}, {"id": 16, "type": "*", "text": "*", "parent": 14, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 29}}, {"id": 17, "type": "ERROR", "text": ")img", "parent": 14, "children": [18], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 33}}, {"id": 18, "type": "identifier", "text": "img", "parent": 17, "children": [], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 33}}, {"id": 19, "type": "identifier", "text": "progress", "parent": 14, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 42}}, {"id": 20, "type": "primitive_type", "text": "void", "parent": 3, "children": [], "start_point": {"row": 12, "column": 44}, "end_point": {"row": 12, "column": 48}}, {"id": 21, "type": "^", "text": "^", "parent": 3, "children": [], "start_point": {"row": 12, "column": 49}, "end_point": {"row": 12, "column": 50}}, {"id": 22, "type": "declaration", "text": "float))progress", "parent": null, "children": [23, 24, 25], "start_point": {"row": 12, "column": 52}, "end_point": {"row": 12, "column": 67}}, {"id": 23, "type": "primitive_type", "text": "float", "parent": 22, "children": [], "start_point": {"row": 12, "column": 52}, "end_point": {"row": 12, "column": 57}}, {"id": 24, "type": "ERROR", "text": "))", "parent": 22, "children": [], "start_point": {"row": 12, "column": 57}, "end_point": {"row": 12, "column": 59}}, {"id": 25, "type": "identifier", "text": "progress", "parent": 22, "children": [], "start_point": {"row": 12, "column": 59}, "end_point": {"row": 12, "column": 67}}, {"id": 26, "type": "labeled_statement", "text": "completion:(void(^)(NSURL*,NSError*))completion;", "parent": null, "children": [27], "start_point": {"row": 12, "column": 68}, "end_point": {"row": 12, "column": 116}}, {"id": 27, "type": "statement_identifier", "text": "completion", "parent": 26, "children": [], "start_point": {"row": 12, "column": 68}, "end_point": {"row": 12, "column": 78}}, {"id": 28, "type": "cast_expression", "text": "(void(^)(NSURL*,NSError*))completion", "parent": 26, "children": [29, 45], "start_point": {"row": 12, "column": 79}, "end_point": {"row": 12, "column": 115}}, {"id": 29, "type": "type_descriptor", "text": "void(^)(NSURL*,NSError*)", "parent": 28, "children": [30, 31], "start_point": {"row": 12, "column": 80}, "end_point": {"row": 12, "column": 104}}, {"id": 30, "type": "primitive_type", "text": "void", "parent": 29, "children": [], "start_point": {"row": 12, "column": 80}, "end_point": {"row": 12, "column": 84}}, {"id": 31, "type": "abstract_function_declarator", "text": "(^)(NSURL*,NSError*)", "parent": 29, "children": [32, 36], "start_point": {"row": 12, "column": 84}, "end_point": {"row": 12, "column": 104}}, {"id": 32, "type": "abstract_function_declarator", "text": "(^)", "parent": 31, "children": [33], "start_point": {"row": 12, "column": 84}, "end_point": {"row": 12, "column": 87}}, {"id": 33, "type": "parameter_list", "text": "(^)", "parent": 32, "children": [34], "start_point": {"row": 12, "column": 84}, "end_point": {"row": 12, "column": 87}}, {"id": 34, "type": "ERROR", "text": "^", "parent": 33, "children": [35], "start_point": {"row": 12, "column": 85}, "end_point": {"row": 12, "column": 86}}, {"id": 35, "type": "^", "text": "^", "parent": 34, "children": [], "start_point": {"row": 12, "column": 85}, "end_point": {"row": 12, "column": 86}}, {"id": 36, "type": "parameter_list", "text": "(NSURL*,NSError*)", "parent": 31, "children": [37, 41], "start_point": {"row": 12, "column": 87}, "end_point": {"row": 12, "column": 104}}, {"id": 37, "type": "parameter_declaration", "text": "NSURL*", "parent": 36, "children": [38, 39], "start_point": {"row": 12, "column": 88}, "end_point": {"row": 12, "column": 94}}, {"id": 38, "type": "type_identifier", "text": "NSURL", "parent": 37, "children": [], "start_point": {"row": 12, "column": 88}, "end_point": {"row": 12, "column": 93}}, {"id": 39, "type": "abstract_pointer_declarator", "text": "*", "parent": 37, "children": [40], "start_point": {"row": 12, "column": 93}, "end_point": {"row": 12, "column": 94}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 12, "column": 93}, "end_point": {"row": 12, "column": 94}}, {"id": 41, "type": "parameter_declaration", "text": "NSError*", "parent": 36, "children": [42, 43], "start_point": {"row": 12, "column": 95}, "end_point": {"row": 12, "column": 103}}, {"id": 42, "type": "type_identifier", "text": "NSError", "parent": 41, "children": [], "start_point": {"row": 12, "column": 95}, "end_point": {"row": 12, "column": 102}}, {"id": 43, "type": "abstract_pointer_declarator", "text": "*", "parent": 41, "children": [44], "start_point": {"row": 12, "column": 102}, "end_point": {"row": 12, "column": 103}}, {"id": 44, "type": "*", "text": "*", "parent": 43, "children": [], "start_point": {"row": 12, "column": 102}, "end_point": {"row": 12, "column": 103}}, {"id": 45, "type": "identifier", "text": "completion", "parent": 28, "children": [], "start_point": {"row": 12, "column": 105}, "end_point": {"row": 12, "column": 115}}, {"id": 46, "type": "ERROR", "text": "@", "parent": null, "children": [47], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 47, "type": "ERROR", "text": "@", "parent": 46, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}]}, "node_categories": {"declarations": {"functions": [31, 32], "variables": [22, 37, 41], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [8, 10, 14, 28], "assignments": [], "loops": [], "conditionals": [5, 6, 7, 13, 15, 18, 19, 25, 27, 38, 42, 45], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "(^)(NSURL*,NSError*)"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "(^)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// STRImgur.h\n// ShareToReddit\n//\n// Created by <NAME> on 01/10/2013.\n// Copyright (c) 2013 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface STRImgur : NSObject\n\n+ (void)uploadImage:(UIImage*)img progress:(void(^)(float))progress completion:(void(^)(NSURL*,NSError*))completion;\n\n@end\n"}
80,904
c
/*! \file bcmlrd_table_count_get.c * * Get the number of valid tables for the given unit. */ /* * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. * * Copyright 2007-2020 Broadcom Inc. All rights reserved. */ #include <sal/sal_types.h> #include <shr/shr_error.h> #include <bcmlrd/bcmlrd_table.h> #include <bcmlrd/bcmlrd_internal.h> int bcmlrd_table_count_get(int unit, size_t *num_sid) { int rv = SHR_E_PARAM; const bcmlrd_map_conf_rep_t *conf; size_t i; size_t count; do { conf = bcmlrd_unit_conf_get(unit); if (num_sid == NULL) { break; } if (conf == NULL) { /* No configuration means no tables. */ count = 0; } else { /* Count what is mapped. */ for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) { /* if the table is valid for this conf */ if (conf->map[i] != NULL) { count++; } } } *num_sid = count; rv = SHR_E_NONE; } while (0); return rv; }
26.69
42
(translation_unit) "/*! \file bcmlrd_table_count_get.c\n *\n * Get the number of valid tables for the given unit.\n */\n/*\n * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.\n * \n * Copyright 2007-2020 Broadcom Inc. All rights reserved.\n */\n\n#include <sal/sal_types.h>\n#include <shr/shr_error.h>\n#include <bcmlrd/bcmlrd_table.h>\n#include <bcmlrd/bcmlrd_internal.h>\n\nint\nbcmlrd_table_count_get(int unit, size_t *num_sid)\n\n{\n int rv = SHR_E_PARAM;\n const bcmlrd_map_conf_rep_t *conf;\n size_t i;\n size_t count;\n\n do {\n\n conf = bcmlrd_unit_conf_get(unit);\n\n if (num_sid == NULL) {\n break;\n }\n\n if (conf == NULL) {\n /* No configuration means no tables. */\n count = 0;\n } else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }\n\n *num_sid = count;\n rv = SHR_E_NONE;\n\n } while (0);\n\n return rv;\n}\n" (comment) "/*! \file bcmlrd_table_count_get.c\n *\n * Get the number of valid tables for the given unit.\n */" (comment) "/*\n * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.\n * \n * Copyright 2007-2020 Broadcom Inc. All rights reserved.\n */" (preproc_include) "#include <sal/sal_types.h>\n" (#include) "#include" (system_lib_string) "<sal/sal_types.h>" (preproc_include) "#include <shr/shr_error.h>\n" (#include) "#include" (system_lib_string) "<shr/shr_error.h>" (preproc_include) "#include <bcmlrd/bcmlrd_table.h>\n" (#include) "#include" (system_lib_string) "<bcmlrd/bcmlrd_table.h>" (preproc_include) "#include <bcmlrd/bcmlrd_internal.h>\n" (#include) "#include" (system_lib_string) "<bcmlrd/bcmlrd_internal.h>" (function_definition) "int\nbcmlrd_table_count_get(int unit, size_t *num_sid)\n\n{\n int rv = SHR_E_PARAM;\n const bcmlrd_map_conf_rep_t *conf;\n size_t i;\n size_t count;\n\n do {\n\n conf = bcmlrd_unit_conf_get(unit);\n\n if (num_sid == NULL) {\n break;\n }\n\n if (conf == NULL) {\n /* No configuration means no tables. */\n count = 0;\n } else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }\n\n *num_sid = count;\n rv = SHR_E_NONE;\n\n } while (0);\n\n return rv;\n}" (primitive_type) "int" (function_declarator) "bcmlrd_table_count_get(int unit, size_t *num_sid)" (identifier) "bcmlrd_table_count_get" (parameter_list) "(int unit, size_t *num_sid)" (() "(" (parameter_declaration) "int unit" (primitive_type) "int" (identifier) "unit" (,) "," (parameter_declaration) "size_t *num_sid" (primitive_type) "size_t" (pointer_declarator) "*num_sid" (*) "*" (identifier) "num_sid" ()) ")" (compound_statement) "{\n int rv = SHR_E_PARAM;\n const bcmlrd_map_conf_rep_t *conf;\n size_t i;\n size_t count;\n\n do {\n\n conf = bcmlrd_unit_conf_get(unit);\n\n if (num_sid == NULL) {\n break;\n }\n\n if (conf == NULL) {\n /* No configuration means no tables. */\n count = 0;\n } else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }\n\n *num_sid = count;\n rv = SHR_E_NONE;\n\n } while (0);\n\n return rv;\n}" ({) "{" (declaration) "int rv = SHR_E_PARAM;" (primitive_type) "int" (init_declarator) "rv = SHR_E_PARAM" (identifier) "rv" (=) "=" (identifier) "SHR_E_PARAM" (;) ";" (declaration) "const bcmlrd_map_conf_rep_t *conf;" (type_qualifier) "const" (const) "const" (type_identifier) "bcmlrd_map_conf_rep_t" (pointer_declarator) "*conf" (*) "*" (identifier) "conf" (;) ";" (declaration) "size_t i;" (primitive_type) "size_t" (identifier) "i" (;) ";" (declaration) "size_t count;" (primitive_type) "size_t" (identifier) "count" (;) ";" (do_statement) "do {\n\n conf = bcmlrd_unit_conf_get(unit);\n\n if (num_sid == NULL) {\n break;\n }\n\n if (conf == NULL) {\n /* No configuration means no tables. */\n count = 0;\n } else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }\n\n *num_sid = count;\n rv = SHR_E_NONE;\n\n } while (0);" (do) "do" (compound_statement) "{\n\n conf = bcmlrd_unit_conf_get(unit);\n\n if (num_sid == NULL) {\n break;\n }\n\n if (conf == NULL) {\n /* No configuration means no tables. */\n count = 0;\n } else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }\n\n *num_sid = count;\n rv = SHR_E_NONE;\n\n }" ({) "{" (expression_statement) "conf = bcmlrd_unit_conf_get(unit);" (assignment_expression) "conf = bcmlrd_unit_conf_get(unit)" (identifier) "conf" (=) "=" (call_expression) "bcmlrd_unit_conf_get(unit)" (identifier) "bcmlrd_unit_conf_get" (argument_list) "(unit)" (() "(" (identifier) "unit" ()) ")" (;) ";" (if_statement) "if (num_sid == NULL) {\n break;\n }" (if) "if" (parenthesized_expression) "(num_sid == NULL)" (() "(" (binary_expression) "num_sid == NULL" (identifier) "num_sid" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n break;\n }" ({) "{" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (if_statement) "if (conf == NULL) {\n /* No configuration means no tables. */\n count = 0;\n } else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }" (if) "if" (parenthesized_expression) "(conf == NULL)" (() "(" (binary_expression) "conf == NULL" (identifier) "conf" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n /* No configuration means no tables. */\n count = 0;\n }" ({) "{" (comment) "/* No configuration means no tables. */" (expression_statement) "count = 0;" (assignment_expression) "count = 0" (identifier) "count" (=) "=" (number_literal) "0" (;) ";" (}) "}" (else_clause) "else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }" (else) "else" (compound_statement) "{\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }" ({) "{" (comment) "/* Count what is mapped. */" (for_statement) "for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }" (for) "for" (() "(" (assignment_expression) "count=i=0" (identifier) "count" (=) "=" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<BCMLRD_TABLE_COUNT" (identifier) "i" (<) "<" (identifier) "BCMLRD_TABLE_COUNT" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }" ({) "{" (comment) "/* if the table is valid for this conf */" (if_statement) "if (conf->map[i] != NULL) {\n count++;\n }" (if) "if" (parenthesized_expression) "(conf->map[i] != NULL)" (() "(" (binary_expression) "conf->map[i] != NULL" (subscript_expression) "conf->map[i]" (field_expression) "conf->map" (identifier) "conf" (->) "->" (field_identifier) "map" ([) "[" (identifier) "i" (]) "]" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n count++;\n }" ({) "{" (expression_statement) "count++;" (update_expression) "count++" (identifier) "count" (++) "++" (;) ";" (}) "}" (}) "}" (}) "}" (expression_statement) "*num_sid = count;" (assignment_expression) "*num_sid = count" (pointer_expression) "*num_sid" (*) "*" (identifier) "num_sid" (=) "=" (identifier) "count" (;) ";" (expression_statement) "rv = SHR_E_NONE;" (assignment_expression) "rv = SHR_E_NONE" (identifier) "rv" (=) "=" (identifier) "SHR_E_NONE" (;) ";" (}) "}" (while) "while" (parenthesized_expression) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (return_statement) "return rv;" (return) "return" (identifier) "rv" (;) ";" (}) "}"
188
0
{"language": "c", "success": true, "metadata": {"lines": 42, "avg_line_length": 26.69, "nodes": 114, "errors": 0, "source_hash": "f1ec98dd3946f8b89062b6aa07fccbf5958e93d1640f1d8ba44e94a40d6d6f31", "categorized_nodes": 77}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <sal/sal_types.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": "system_lib_string", "text": "<sal/sal_types.h>", "parent": 0, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 26}}, {"id": 3, "type": "preproc_include", "text": "#include <shr/shr_error.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": "system_lib_string", "text": "<shr/shr_error.h>", "parent": 3, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 26}}, {"id": 6, "type": "preproc_include", "text": "#include <bcmlrd/bcmlrd_table.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": "system_lib_string", "text": "<bcmlrd/bcmlrd_table.h>", "parent": 6, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 32}}, {"id": 9, "type": "preproc_include", "text": "#include <bcmlrd/bcmlrd_internal.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": "system_lib_string", "text": "<bcmlrd/bcmlrd_internal.h>", "parent": 9, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 35}}, {"id": 12, "type": "function_definition", "text": "int\nbcmlrd_table_count_get(int unit, size_t *num_sid)\n\n{\n int rv = SHR_E_PARAM;\n const bcmlrd_map_conf_rep_t *conf;\n size_t i;\n size_t count;\n\n do {\n\n conf = bcmlrd_unit_conf_get(unit);\n\n if (num_sid == NULL) {\n break;\n }\n\n if (conf == NULL) {\n /* No configuration means no tables. */\n count = 0;\n } else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }\n\n *num_sid = count;\n rv = SHR_E_NONE;\n\n } while (0);\n\n return rv;\n}", "parent": null, "children": [13, 14], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 12, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 3}}, {"id": 14, "type": "function_declarator", "text": "bcmlrd_table_count_get(int unit, size_t *num_sid)", "parent": 12, "children": [15, 16], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 49}}, {"id": 15, "type": "identifier", "text": "bcmlrd_table_count_get", "parent": 14, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 22}}, {"id": 16, "type": "parameter_list", "text": "(int unit, size_t *num_sid)", "parent": 14, "children": [17, 20], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 49}}, {"id": 17, "type": "parameter_declaration", "text": "int unit", "parent": 16, "children": [18, 19], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 31}}, {"id": 18, "type": "primitive_type", "text": "int", "parent": 17, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 26}}, {"id": 19, "type": "identifier", "text": "unit", "parent": 17, "children": [], "start_point": {"row": 16, "column": 27}, "end_point": {"row": 16, "column": 31}}, {"id": 20, "type": "parameter_declaration", "text": "size_t *num_sid", "parent": 16, "children": [21, 22], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 48}}, {"id": 21, "type": "primitive_type", "text": "size_t", "parent": 20, "children": [], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 39}}, {"id": 22, "type": "pointer_declarator", "text": "*num_sid", "parent": 20, "children": [23, 24], "start_point": {"row": 16, "column": 40}, "end_point": {"row": 16, "column": 48}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 16, "column": 40}, "end_point": {"row": 16, "column": 41}}, {"id": 24, "type": "identifier", "text": "num_sid", "parent": 22, "children": [], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 48}}, {"id": 25, "type": "declaration", "text": "int rv = SHR_E_PARAM;", "parent": 12, "children": [26, 27], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 25}}, {"id": 26, "type": "primitive_type", "text": "int", "parent": 25, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 7}}, {"id": 27, "type": "init_declarator", "text": "rv = SHR_E_PARAM", "parent": 25, "children": [28, 29, 30], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 24}}, {"id": 28, "type": "identifier", "text": "rv", "parent": 27, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 10}}, {"id": 29, "type": "=", "text": "=", "parent": 27, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 12}}, {"id": 30, "type": "identifier", "text": "SHR_E_PARAM", "parent": 27, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 24}}, {"id": 31, "type": "declaration", "text": "const bcmlrd_map_conf_rep_t *conf;", "parent": 12, "children": [32, 33], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 38}}, {"id": 32, "type": "type_identifier", "text": "bcmlrd_map_conf_rep_t", "parent": 31, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 31}}, {"id": 33, "type": "pointer_declarator", "text": "*conf", "parent": 31, "children": [34, 35], "start_point": {"row": 20, "column": 32}, "end_point": {"row": 20, "column": 37}}, {"id": 34, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 20, "column": 32}, "end_point": {"row": 20, "column": 33}}, {"id": 35, "type": "identifier", "text": "conf", "parent": 33, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 37}}, {"id": 36, "type": "declaration", "text": "size_t i;", "parent": 12, "children": [37, 38], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 13}}, {"id": 37, "type": "primitive_type", "text": "size_t", "parent": 36, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 38, "type": "identifier", "text": "i", "parent": 36, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 12}}, {"id": 39, "type": "declaration", "text": "size_t count;", "parent": 12, "children": [40, 41], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 17}}, {"id": 40, "type": "primitive_type", "text": "size_t", "parent": 39, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 10}}, {"id": 41, "type": "identifier", "text": "count", "parent": 39, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 16}}, {"id": 42, "type": "do_statement", "text": "do {\n\n conf = bcmlrd_unit_conf_get(unit);\n\n if (num_sid == NULL) {\n break;\n }\n\n if (conf == NULL) {\n /* No configuration means no tables. */\n count = 0;\n } else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }\n\n *num_sid = count;\n rv = SHR_E_NONE;\n\n } while (0);", "parent": 12, "children": [110], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 48, "column": 16}}, {"id": 43, "type": "assignment_expression", "text": "conf = bcmlrd_unit_conf_get(unit)", "parent": 42, "children": [44, 45, 46], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 41}}, {"id": 44, "type": "identifier", "text": "conf", "parent": 43, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 12}}, {"id": 45, "type": "=", "text": "=", "parent": 43, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 14}}, {"id": 46, "type": "call_expression", "text": "bcmlrd_unit_conf_get(unit)", "parent": 43, "children": [47, 48], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 41}}, {"id": 47, "type": "identifier", "text": "bcmlrd_unit_conf_get", "parent": 46, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 35}}, {"id": 48, "type": "argument_list", "text": "(unit)", "parent": 46, "children": [49], "start_point": {"row": 26, "column": 35}, "end_point": {"row": 26, "column": 41}}, {"id": 49, "type": "identifier", "text": "unit", "parent": 48, "children": [], "start_point": {"row": 26, "column": 36}, "end_point": {"row": 26, "column": 40}}, {"id": 50, "type": "if_statement", "text": "if (num_sid == NULL) {\n break;\n }", "parent": 42, "children": [51], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 30, "column": 9}}, {"id": 51, "type": "parenthesized_expression", "text": "(num_sid == NULL)", "parent": 50, "children": [52], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 28}}, {"id": 52, "type": "binary_expression", "text": "num_sid == NULL", "parent": 51, "children": [53, 54, 55], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 27}}, {"id": 53, "type": "identifier", "text": "num_sid", "parent": 52, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 19}}, {"id": 54, "type": "==", "text": "==", "parent": 52, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 22}}, {"id": 55, "type": "null", "text": "NULL", "parent": 52, "children": [56], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 27}}, {"id": 56, "type": "NULL", "text": "NULL", "parent": 55, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 27}}, {"id": 57, "type": "break_statement", "text": "break;", "parent": 50, "children": [58], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 18}}, {"id": 58, "type": "break", "text": "break", "parent": 57, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 17}}, {"id": 59, "type": "if_statement", "text": "if (conf == NULL) {\n /* No configuration means no tables. */\n count = 0;\n } else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }", "parent": 42, "children": [60, 70], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 43, "column": 9}}, {"id": 60, "type": "parenthesized_expression", "text": "(conf == NULL)", "parent": 59, "children": [61], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 25}}, {"id": 61, "type": "binary_expression", "text": "conf == NULL", "parent": 60, "children": [62, 63, 64], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 24}}, {"id": 62, "type": "identifier", "text": "conf", "parent": 61, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 16}}, {"id": 63, "type": "==", "text": "==", "parent": 61, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 19}}, {"id": 64, "type": "null", "text": "NULL", "parent": 61, "children": [65], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 24}}, {"id": 65, "type": "NULL", "text": "NULL", "parent": 64, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 24}}, {"id": 66, "type": "assignment_expression", "text": "count = 0", "parent": 59, "children": [67, 68, 69], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 21}}, {"id": 67, "type": "identifier", "text": "count", "parent": 66, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 17}}, {"id": 68, "type": "=", "text": "=", "parent": 66, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 19}}, {"id": 69, "type": "number_literal", "text": "0", "parent": 66, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 21}}, {"id": 70, "type": "else_clause", "text": "else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }", "parent": 59, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 43, "column": 9}}, {"id": 71, "type": "for_statement", "text": "for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }", "parent": 70, "children": [72, 79, 83], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 42, "column": 13}}, {"id": 72, "type": "assignment_expression", "text": "count=i=0", "parent": 71, "children": [73, 74, 75], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 26}}, {"id": 73, "type": "identifier", "text": "count", "parent": 72, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 22}}, {"id": 74, "type": "=", "text": "=", "parent": 72, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 23}}, {"id": 75, "type": "assignment_expression", "text": "i=0", "parent": 72, "children": [76, 77, 78], "start_point": {"row": 37, "column": 23}, "end_point": {"row": 37, "column": 26}}, {"id": 76, "type": "identifier", "text": "i", "parent": 75, "children": [], "start_point": {"row": 37, "column": 23}, "end_point": {"row": 37, "column": 24}}, {"id": 77, "type": "=", "text": "=", "parent": 75, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 25}}, {"id": 78, "type": "number_literal", "text": "0", "parent": 75, "children": [], "start_point": {"row": 37, "column": 25}, "end_point": {"row": 37, "column": 26}}, {"id": 79, "type": "binary_expression", "text": "i<BCMLRD_TABLE_COUNT", "parent": 71, "children": [80, 81, 82], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 48}}, {"id": 80, "type": "identifier", "text": "i", "parent": 79, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 29}}, {"id": 81, "type": "<", "text": "<", "parent": 79, "children": [], "start_point": {"row": 37, "column": 29}, "end_point": {"row": 37, "column": 30}}, {"id": 82, "type": "identifier", "text": "BCMLRD_TABLE_COUNT", "parent": 79, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 48}}, {"id": 83, "type": "update_expression", "text": "i++", "parent": 71, "children": [84, 85], "start_point": {"row": 37, "column": 50}, "end_point": {"row": 37, "column": 53}}, {"id": 84, "type": "identifier", "text": "i", "parent": 83, "children": [], "start_point": {"row": 37, "column": 50}, "end_point": {"row": 37, "column": 51}}, {"id": 85, "type": "++", "text": "++", "parent": 83, "children": [], "start_point": {"row": 37, "column": 51}, "end_point": {"row": 37, "column": 53}}, {"id": 86, "type": "if_statement", "text": "if (conf->map[i] != NULL) {\n count++;\n }", "parent": 71, "children": [87], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 41, "column": 17}}, {"id": 87, "type": "parenthesized_expression", "text": "(conf->map[i] != NULL)", "parent": 86, "children": [88], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 41}}, {"id": 88, "type": "binary_expression", "text": "conf->map[i] != NULL", "parent": 87, "children": [89, 94, 95], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 40}}, {"id": 89, "type": "subscript_expression", "text": "conf->map[i]", "parent": 88, "children": [90, 93], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 32}}, {"id": 90, "type": "field_expression", "text": "conf->map", "parent": 89, "children": [91, 92], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 29}}, {"id": 91, "type": "identifier", "text": "conf", "parent": 90, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 24}}, {"id": 92, "type": "field_identifier", "text": "map", "parent": 90, "children": [], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 29}}, {"id": 93, "type": "identifier", "text": "i", "parent": 89, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 31}}, {"id": 94, "type": "!=", "text": "!=", "parent": 88, "children": [], "start_point": {"row": 39, "column": 33}, "end_point": {"row": 39, "column": 35}}, {"id": 95, "type": "null", "text": "NULL", "parent": 88, "children": [96], "start_point": {"row": 39, "column": 36}, "end_point": {"row": 39, "column": 40}}, {"id": 96, "type": "NULL", "text": "NULL", "parent": 95, "children": [], "start_point": {"row": 39, "column": 36}, "end_point": {"row": 39, "column": 40}}, {"id": 97, "type": "update_expression", "text": "count++", "parent": 86, "children": [98, 99], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 27}}, {"id": 98, "type": "identifier", "text": "count", "parent": 97, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 25}}, {"id": 99, "type": "++", "text": "++", "parent": 97, "children": [], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 27}}, {"id": 100, "type": "assignment_expression", "text": "*num_sid = count", "parent": 42, "children": [101, 104, 105], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 24}}, {"id": 101, "type": "pointer_expression", "text": "*num_sid", "parent": 100, "children": [102, 103], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 16}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 9}}, {"id": 103, "type": "identifier", "text": "num_sid", "parent": 101, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 16}}, {"id": 104, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 18}}, {"id": 105, "type": "identifier", "text": "count", "parent": 100, "children": [], "start_point": {"row": 45, "column": 19}, "end_point": {"row": 45, "column": 24}}, {"id": 106, "type": "assignment_expression", "text": "rv = SHR_E_NONE", "parent": 42, "children": [107, 108, 109], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 23}}, {"id": 107, "type": "identifier", "text": "rv", "parent": 106, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 10}}, {"id": 108, "type": "=", "text": "=", "parent": 106, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 12}}, {"id": 109, "type": "identifier", "text": "SHR_E_NONE", "parent": 106, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 23}}, {"id": 110, "type": "parenthesized_expression", "text": "(0)", "parent": 42, "children": [111], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 15}}, {"id": 111, "type": "number_literal", "text": "0", "parent": 110, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 14}}, {"id": 112, "type": "return_statement", "text": "return rv;", "parent": 12, "children": [113], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 14}}, {"id": 113, "type": "identifier", "text": "rv", "parent": 112, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 13}}]}, "node_categories": {"declarations": {"functions": [12, 14], "variables": [17, 20, 25, 31, 36, 39], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [46, 51, 52, 60, 61, 79, 83, 87, 88, 89, 90, 97, 101, 110], "assignments": [43, 66, 72, 75, 100, 106], "loops": [71], "conditionals": [15, 19, 24, 28, 30, 32, 35, 38, 41, 44, 47, 49, 50, 53, 59, 62, 67, 73, 76, 80, 82, 84, 86, 91, 92, 93, 98, 103, 105, 107, 109, 113], "returns": [112], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 69, 78, 111], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "bcmlrd_table_count_get", "text_snippet": "int\nbcmlrd_table_count_get(int unit, size_t *num_sid)\n\n{\n int rv = SHR_E_PARAM;\n const bcmlrd_"}, {"node_id": 14, "universal_type": "function", "name": "unknown", "text_snippet": "bcmlrd_table_count_get(int unit, size_t *num_sid)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <sal/sal_types.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <shr/shr_error.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <bcmlrd/bcmlrd_table.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <bcmlrd/bcmlrd_internal.h>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/*! \\file bcmlrd_table_count_get.c\n *\n * Get the number of valid tables for the given unit.\n */\n/*\n * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.\n * \n * Copyright 2007-2020 Broadcom Inc. All rights reserved.\n */\n\n#include <sal/sal_types.h>\n#include <shr/shr_error.h>\n#include <bcmlrd/bcmlrd_table.h>\n#include <bcmlrd/bcmlrd_internal.h>\n\nint\nbcmlrd_table_count_get(int unit, size_t *num_sid)\n\n{\n int rv = SHR_E_PARAM;\n const bcmlrd_map_conf_rep_t *conf;\n size_t i;\n size_t count;\n\n do {\n\n conf = bcmlrd_unit_conf_get(unit);\n\n if (num_sid == NULL) {\n break;\n }\n\n if (conf == NULL) {\n /* No configuration means no tables. */\n count = 0;\n } else {\n /* Count what is mapped. */\n for (count=i=0; i<BCMLRD_TABLE_COUNT; i++) {\n /* if the table is valid for this conf */\n if (conf->map[i] != NULL) {\n count++;\n }\n }\n }\n\n *num_sid = count;\n rv = SHR_E_NONE;\n\n } while (0);\n\n return rv;\n}\n"}
80,905
c
#include "1_1.h" void stackpush(char* stack , char element , int* top) { if(*top==STACKSIZE-1) { printf("Stack is full"); return; } else{ *top+=1; *(stack+*top)=element; } } char stackpeek(char* stack , int* top) { return *(stack+*top); } void stackpop(char* stack , int* top) { *top-=1; return; }
15.36
22
(translation_unit) "#include "1_1.h"\n\nvoid stackpush(char* stack , char element , int* top)\n{\n if(*top==STACKSIZE-1)\n {\n printf("Stack is full");\n return;\n }\n else{\n *top+=1;\n *(stack+*top)=element;\n }\n}\nchar stackpeek(char* stack , int* top)\n{\n return *(stack+*top);\n}\nvoid stackpop(char* stack , int* top)\n{\n *top-=1;\n return;\n}" (preproc_include) "#include "1_1.h"\n" (#include) "#include" (string_literal) ""1_1.h"" (") """ (string_content) "1_1.h" (") """ (function_definition) "void stackpush(char* stack , char element , int* top)\n{\n if(*top==STACKSIZE-1)\n {\n printf("Stack is full");\n return;\n }\n else{\n *top+=1;\n *(stack+*top)=element;\n }\n}" (primitive_type) "void" (function_declarator) "stackpush(char* stack , char element , int* top)" (identifier) "stackpush" (parameter_list) "(char* stack , char element , int* top)" (() "(" (parameter_declaration) "char* stack" (primitive_type) "char" (pointer_declarator) "* stack" (*) "*" (identifier) "stack" (,) "," (parameter_declaration) "char element" (primitive_type) "char" (identifier) "element" (,) "," (parameter_declaration) "int* top" (primitive_type) "int" (pointer_declarator) "* top" (*) "*" (identifier) "top" ()) ")" (compound_statement) "{\n if(*top==STACKSIZE-1)\n {\n printf("Stack is full");\n return;\n }\n else{\n *top+=1;\n *(stack+*top)=element;\n }\n}" ({) "{" (if_statement) "if(*top==STACKSIZE-1)\n {\n printf("Stack is full");\n return;\n }\n else{\n *top+=1;\n *(stack+*top)=element;\n }" (if) "if" (parenthesized_expression) "(*top==STACKSIZE-1)" (() "(" (binary_expression) "*top==STACKSIZE-1" (pointer_expression) "*top" (*) "*" (identifier) "top" (==) "==" (binary_expression) "STACKSIZE-1" (identifier) "STACKSIZE" (-) "-" (number_literal) "1" ()) ")" (compound_statement) "{\n printf("Stack is full");\n return;\n }" ({) "{" (expression_statement) "printf("Stack is full");" (call_expression) "printf("Stack is full")" (identifier) "printf" (argument_list) "("Stack is full")" (() "(" (string_literal) ""Stack is full"" (") """ (string_content) "Stack is full" (") """ ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (else_clause) "else{\n *top+=1;\n *(stack+*top)=element;\n }" (else) "else" (compound_statement) "{\n *top+=1;\n *(stack+*top)=element;\n }" ({) "{" (expression_statement) "*top+=1;" (assignment_expression) "*top+=1" (pointer_expression) "*top" (*) "*" (identifier) "top" (+=) "+=" (number_literal) "1" (;) ";" (expression_statement) "*(stack+*top)=element;" (assignment_expression) "*(stack+*top)=element" (pointer_expression) "*(stack+*top)" (*) "*" (parenthesized_expression) "(stack+*top)" (() "(" (binary_expression) "stack+*top" (identifier) "stack" (+) "+" (pointer_expression) "*top" (*) "*" (identifier) "top" ()) ")" (=) "=" (identifier) "element" (;) ";" (}) "}" (}) "}" (function_definition) "char stackpeek(char* stack , int* top)\n{\n return *(stack+*top);\n}" (primitive_type) "char" (function_declarator) "stackpeek(char* stack , int* top)" (identifier) "stackpeek" (parameter_list) "(char* stack , int* top)" (() "(" (parameter_declaration) "char* stack" (primitive_type) "char" (pointer_declarator) "* stack" (*) "*" (identifier) "stack" (,) "," (parameter_declaration) "int* top" (primitive_type) "int" (pointer_declarator) "* top" (*) "*" (identifier) "top" ()) ")" (compound_statement) "{\n return *(stack+*top);\n}" ({) "{" (return_statement) "return *(stack+*top);" (return) "return" (pointer_expression) "*(stack+*top)" (*) "*" (parenthesized_expression) "(stack+*top)" (() "(" (binary_expression) "stack+*top" (identifier) "stack" (+) "+" (pointer_expression) "*top" (*) "*" (identifier) "top" ()) ")" (;) ";" (}) "}" (function_definition) "void stackpop(char* stack , int* top)\n{\n *top-=1;\n return;\n}" (primitive_type) "void" (function_declarator) "stackpop(char* stack , int* top)" (identifier) "stackpop" (parameter_list) "(char* stack , int* top)" (() "(" (parameter_declaration) "char* stack" (primitive_type) "char" (pointer_declarator) "* stack" (*) "*" (identifier) "stack" (,) "," (parameter_declaration) "int* top" (primitive_type) "int" (pointer_declarator) "* top" (*) "*" (identifier) "top" ()) ")" (compound_statement) "{\n *top-=1;\n return;\n}" ({) "{" (expression_statement) "*top-=1;" (assignment_expression) "*top-=1" (pointer_expression) "*top" (*) "*" (identifier) "top" (-=) "-=" (number_literal) "1" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}"
159
0
{"language": "c", "success": true, "metadata": {"lines": 22, "avg_line_length": 15.36, "nodes": 103, "errors": 0, "source_hash": "829f628b55f085e9aea20f2ac2870eb4554cd15d7a207ba1f7dc3573ca893250", "categorized_nodes": 62}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"1_1.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": "\"1_1.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 16}}, {"id": 3, "type": "function_definition", "text": "void stackpush(char* stack , char element , int* top)\n{\n if(*top==STACKSIZE-1)\n {\n printf(\"Stack is full\");\n return;\n }\n else{\n *top+=1;\n *(stack+*top)=element;\n }\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "void", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 4}}, {"id": 5, "type": "function_declarator", "text": "stackpush(char* stack , char element , int* top)", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 53}}, {"id": 6, "type": "identifier", "text": "stackpush", "parent": 5, "children": [], "start_point": {"row": 2, "column": 5}, "end_point": {"row": 2, "column": 14}}, {"id": 7, "type": "parameter_list", "text": "(char* stack , char element , int* top)", "parent": 5, "children": [8, 13, 16], "start_point": {"row": 2, "column": 14}, "end_point": {"row": 2, "column": 53}}, {"id": 8, "type": "parameter_declaration", "text": "char* stack", "parent": 7, "children": [9, 10], "start_point": {"row": 2, "column": 15}, "end_point": {"row": 2, "column": 26}}, {"id": 9, "type": "primitive_type", "text": "char", "parent": 8, "children": [], "start_point": {"row": 2, "column": 15}, "end_point": {"row": 2, "column": 19}}, {"id": 10, "type": "pointer_declarator", "text": "* stack", "parent": 8, "children": [11, 12], "start_point": {"row": 2, "column": 19}, "end_point": {"row": 2, "column": 26}}, {"id": 11, "type": "*", "text": "*", "parent": 10, "children": [], "start_point": {"row": 2, "column": 19}, "end_point": {"row": 2, "column": 20}}, {"id": 12, "type": "identifier", "text": "stack", "parent": 10, "children": [], "start_point": {"row": 2, "column": 21}, "end_point": {"row": 2, "column": 26}}, {"id": 13, "type": "parameter_declaration", "text": "char element", "parent": 7, "children": [14, 15], "start_point": {"row": 2, "column": 29}, "end_point": {"row": 2, "column": 41}}, {"id": 14, "type": "primitive_type", "text": "char", "parent": 13, "children": [], "start_point": {"row": 2, "column": 29}, "end_point": {"row": 2, "column": 33}}, {"id": 15, "type": "identifier", "text": "element", "parent": 13, "children": [], "start_point": {"row": 2, "column": 34}, "end_point": {"row": 2, "column": 41}}, {"id": 16, "type": "parameter_declaration", "text": "int* top", "parent": 7, "children": [17, 18], "start_point": {"row": 2, "column": 44}, "end_point": {"row": 2, "column": 52}}, {"id": 17, "type": "primitive_type", "text": "int", "parent": 16, "children": [], "start_point": {"row": 2, "column": 44}, "end_point": {"row": 2, "column": 47}}, {"id": 18, "type": "pointer_declarator", "text": "* top", "parent": 16, "children": [19, 20], "start_point": {"row": 2, "column": 47}, "end_point": {"row": 2, "column": 52}}, {"id": 19, "type": "*", "text": "*", "parent": 18, "children": [], "start_point": {"row": 2, "column": 47}, "end_point": {"row": 2, "column": 48}}, {"id": 20, "type": "identifier", "text": "top", "parent": 18, "children": [], "start_point": {"row": 2, "column": 49}, "end_point": {"row": 2, "column": 52}}, {"id": 21, "type": "if_statement", "text": "if(*top==STACKSIZE-1)\n {\n printf(\"Stack is full\");\n return;\n }\n else{\n *top+=1;\n *(stack+*top)=element;\n }", "parent": 3, "children": [22, 37], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 12, "column": 5}}, {"id": 22, "type": "parenthesized_expression", "text": "(*top==STACKSIZE-1)", "parent": 21, "children": [23], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 25}}, {"id": 23, "type": "binary_expression", "text": "*top==STACKSIZE-1", "parent": 22, "children": [24, 27, 28], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 24}}, {"id": 24, "type": "pointer_expression", "text": "*top", "parent": 23, "children": [25, 26], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 11}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 8}}, {"id": 26, "type": "identifier", "text": "top", "parent": 24, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 11}}, {"id": 27, "type": "==", "text": "==", "parent": 23, "children": [], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 13}}, {"id": 28, "type": "binary_expression", "text": "STACKSIZE-1", "parent": 23, "children": [29, 30, 31], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 24}}, {"id": 29, "type": "identifier", "text": "STACKSIZE", "parent": 28, "children": [], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 22}}, {"id": 30, "type": "-", "text": "-", "parent": 28, "children": [], "start_point": {"row": 4, "column": 22}, "end_point": {"row": 4, "column": 23}}, {"id": 31, "type": "number_literal", "text": "1", "parent": 28, "children": [], "start_point": {"row": 4, "column": 23}, "end_point": {"row": 4, "column": 24}}, {"id": 32, "type": "call_expression", "text": "printf(\"Stack is full\")", "parent": 21, "children": [33, 34], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 30}}, {"id": 33, "type": "identifier", "text": "printf", "parent": 32, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 13}}, {"id": 34, "type": "argument_list", "text": "(\"Stack is full\")", "parent": 32, "children": [35], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 30}}, {"id": 35, "type": "string_literal", "text": "\"Stack is full\"", "parent": 34, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 29}}, {"id": 36, "type": "return_statement", "text": "return;", "parent": 21, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 14}}, {"id": 37, "type": "else_clause", "text": "else{\n *top+=1;\n *(stack+*top)=element;\n }", "parent": 21, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 12, "column": 5}}, {"id": 38, "type": "assignment_expression", "text": "*top+=1", "parent": 37, "children": [39, 42, 43], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 15}}, {"id": 39, "type": "pointer_expression", "text": "*top", "parent": 38, "children": [40, 41], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 12}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 9}}, {"id": 41, "type": "identifier", "text": "top", "parent": 39, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 12}}, {"id": 42, "type": "+=", "text": "+=", "parent": 38, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 14}}, {"id": 43, "type": "number_literal", "text": "1", "parent": 38, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 15}}, {"id": 44, "type": "assignment_expression", "text": "*(stack+*top)=element", "parent": 37, "children": [45, 54, 55], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 29}}, {"id": 45, "type": "pointer_expression", "text": "*(stack+*top)", "parent": 44, "children": [46, 47], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 21}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 9}}, {"id": 47, "type": "parenthesized_expression", "text": "(stack+*top)", "parent": 45, "children": [48], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 21}}, {"id": 48, "type": "binary_expression", "text": "stack+*top", "parent": 47, "children": [49, 50, 51], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 20}}, {"id": 49, "type": "identifier", "text": "stack", "parent": 48, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 15}}, {"id": 50, "type": "+", "text": "+", "parent": 48, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 16}}, {"id": 51, "type": "pointer_expression", "text": "*top", "parent": 48, "children": [52, 53], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 20}}, {"id": 52, "type": "*", "text": "*", "parent": 51, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 17}}, {"id": 53, "type": "identifier", "text": "top", "parent": 51, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 20}}, {"id": 54, "type": "=", "text": "=", "parent": 44, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 22}}, {"id": 55, "type": "identifier", "text": "element", "parent": 44, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 29}}, {"id": 56, "type": "function_definition", "text": "char stackpeek(char* stack , int* top)\n{\n return *(stack+*top);\n}", "parent": null, "children": [57, 58], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 57, "type": "primitive_type", "text": "char", "parent": 56, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 4}}, {"id": 58, "type": "function_declarator", "text": "stackpeek(char* stack , int* top)", "parent": 56, "children": [59, 60], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 38}}, {"id": 59, "type": "identifier", "text": "stackpeek", "parent": 58, "children": [], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 14}}, {"id": 60, "type": "parameter_list", "text": "(char* stack , int* top)", "parent": 58, "children": [61, 66], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 38}}, {"id": 61, "type": "parameter_declaration", "text": "char* stack", "parent": 60, "children": [62, 63], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 26}}, {"id": 62, "type": "primitive_type", "text": "char", "parent": 61, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 19}}, {"id": 63, "type": "pointer_declarator", "text": "* stack", "parent": 61, "children": [64, 65], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 26}}, {"id": 64, "type": "*", "text": "*", "parent": 63, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 20}}, {"id": 65, "type": "identifier", "text": "stack", "parent": 63, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 26}}, {"id": 66, "type": "parameter_declaration", "text": "int* top", "parent": 60, "children": [67, 68], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 37}}, {"id": 67, "type": "primitive_type", "text": "int", "parent": 66, "children": [], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 32}}, {"id": 68, "type": "pointer_declarator", "text": "* top", "parent": 66, "children": [69, 70], "start_point": {"row": 14, "column": 32}, "end_point": {"row": 14, "column": 37}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 14, "column": 32}, "end_point": {"row": 14, "column": 33}}, {"id": 70, "type": "identifier", "text": "top", "parent": 68, "children": [], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 37}}, {"id": 71, "type": "return_statement", "text": "return *(stack+*top);", "parent": 56, "children": [72], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 25}}, {"id": 72, "type": "pointer_expression", "text": "*(stack+*top)", "parent": 71, "children": [73, 74], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 24}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 12}}, {"id": 74, "type": "parenthesized_expression", "text": "(stack+*top)", "parent": 72, "children": [75], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 24}}, {"id": 75, "type": "binary_expression", "text": "stack+*top", "parent": 74, "children": [76, 77, 78], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 23}}, {"id": 76, "type": "identifier", "text": "stack", "parent": 75, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 18}}, {"id": 77, "type": "+", "text": "+", "parent": 75, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 19}}, {"id": 78, "type": "pointer_expression", "text": "*top", "parent": 75, "children": [79, 80], "start_point": {"row": 16, "column": 19}, "end_point": {"row": 16, "column": 23}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 16, "column": 19}, "end_point": {"row": 16, "column": 20}}, {"id": 80, "type": "identifier", "text": "top", "parent": 78, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 23}}, {"id": 81, "type": "function_definition", "text": "void stackpop(char* stack , int* top)\n{\n *top-=1;\n return;\n}", "parent": null, "children": [82, 83], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 82, "type": "primitive_type", "text": "void", "parent": 81, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 83, "type": "function_declarator", "text": "stackpop(char* stack , int* top)", "parent": 81, "children": [84, 85], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 37}}, {"id": 84, "type": "identifier", "text": "stackpop", "parent": 83, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 13}}, {"id": 85, "type": "parameter_list", "text": "(char* stack , int* top)", "parent": 83, "children": [86, 91], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 37}}, {"id": 86, "type": "parameter_declaration", "text": "char* stack", "parent": 85, "children": [87, 88], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 25}}, {"id": 87, "type": "primitive_type", "text": "char", "parent": 86, "children": [], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 18}}, {"id": 88, "type": "pointer_declarator", "text": "* stack", "parent": 86, "children": [89, 90], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 25}}, {"id": 89, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 19}}, {"id": 90, "type": "identifier", "text": "stack", "parent": 88, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 25}}, {"id": 91, "type": "parameter_declaration", "text": "int* top", "parent": 85, "children": [92, 93], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 36}}, {"id": 92, "type": "primitive_type", "text": "int", "parent": 91, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 31}}, {"id": 93, "type": "pointer_declarator", "text": "* top", "parent": 91, "children": [94, 95], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 36}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 32}}, {"id": 95, "type": "identifier", "text": "top", "parent": 93, "children": [], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 36}}, {"id": 96, "type": "assignment_expression", "text": "*top-=1", "parent": 81, "children": [97, 100, 101], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 11}}, {"id": 97, "type": "pointer_expression", "text": "*top", "parent": 96, "children": [98, 99], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 8}}, {"id": 98, "type": "*", "text": "*", "parent": 97, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 5}}, {"id": 99, "type": "identifier", "text": "top", "parent": 97, "children": [], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 8}}, {"id": 100, "type": "-=", "text": "-=", "parent": 96, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 10}}, {"id": 101, "type": "number_literal", "text": "1", "parent": 96, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 11}}, {"id": 102, "type": "return_statement", "text": "return;", "parent": 81, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 11}}]}, "node_categories": {"declarations": {"functions": [3, 5, 56, 58, 81, 83], "variables": [8, 13, 16, 61, 66, 86, 91], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [22, 23, 24, 28, 32, 39, 45, 47, 48, 51, 72, 74, 75, 78, 97], "assignments": [38, 44, 96], "loops": [], "conditionals": [6, 12, 15, 20, 21, 26, 29, 33, 41, 49, 53, 55, 59, 65, 70, 76, 80, 84, 90, 95, 99], "returns": [36, 71, 102], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 31, 35, 43, 101], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "stackpush", "text_snippet": "void stackpush(char* stack , char element , int* top)\n{\n if(*top==STACKSIZE-1)\n {\n print"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "stackpush(char* stack , char element , int* top)"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "char stackpeek(char* stack , int* top)\n{\n return *(stack+*top);\n}"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "stackpeek(char* stack , int* top)"}, {"node_id": 81, "universal_type": "function", "name": "stackpop", "text_snippet": "void stackpop(char* stack , int* top)\n{\n *top-=1;\n return;\n}"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "stackpop(char* stack , int* top)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"1_1.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include \"1_1.h\"\n\nvoid stackpush(char* stack , char element , int* top)\n{\n if(*top==STACKSIZE-1)\n {\n printf(\"Stack is full\");\n return;\n }\n else{\n *top+=1;\n *(stack+*top)=element;\n }\n}\nchar stackpeek(char* stack , int* top)\n{\n return *(stack+*top);\n}\nvoid stackpop(char* stack , int* top)\n{\n *top-=1;\n return;\n}"}
80,906
c
/** * Raise your ARM 2015 sample code http://raiseyourarm.com/ * Author: Pay it forward club * http://www.payitforward.edu.vn * version 0.0.1 */ /** * @file qei.h * @brief QEI module controller */ #ifndef QEI_QEI_H_ #define QEI_QEI_H_ #define MOTOR_SELECT_LEFT 1 #define MOTOR_SELECT_RIGHT 0 extern void qei_init(uint16_t ms_Timebase); extern bool qei_getVelocity(bool Select, int32_t *Velocity); int32_t qei_getPosRight(); int32_t qei_getPosLeft(); void qei_setPosLeft(int32_t pos); void qei_setPosRight(int32_t pos); #endif /* QEI_QEI_H_ */
24.09
22
(translation_unit) "/**\n * Raise your ARM 2015 sample code http://raiseyourarm.com/\n * Author: Pay it forward club\n * http://www.payitforward.edu.vn\n * version 0.0.1\n */\n\n/**\n * @file qei.h\n * @brief QEI module controller\n */\n\n#ifndef QEI_QEI_H_\n#define QEI_QEI_H_\n\n#define MOTOR_SELECT_LEFT 1\n#define MOTOR_SELECT_RIGHT 0\n\nextern void qei_init(uint16_t ms_Timebase);\nextern bool qei_getVelocity(bool Select, int32_t *Velocity);\nint32_t qei_getPosRight();\nint32_t qei_getPosLeft();\nvoid qei_setPosLeft(int32_t pos);\nvoid qei_setPosRight(int32_t pos);\n\n\n#endif /* QEI_QEI_H_ */\n" (comment) "/**\n * Raise your ARM 2015 sample code http://raiseyourarm.com/\n * Author: Pay it forward club\n * http://www.payitforward.edu.vn\n * version 0.0.1\n */" (comment) "/**\n * @file qei.h\n * @brief QEI module controller\n */" (preproc_ifdef) "#ifndef QEI_QEI_H_\n#define QEI_QEI_H_\n\n#define MOTOR_SELECT_LEFT 1\n#define MOTOR_SELECT_RIGHT 0\n\nextern void qei_init(uint16_t ms_Timebase);\nextern bool qei_getVelocity(bool Select, int32_t *Velocity);\nint32_t qei_getPosRight();\nint32_t qei_getPosLeft();\nvoid qei_setPosLeft(int32_t pos);\nvoid qei_setPosRight(int32_t pos);\n\n\n#endif" (#ifndef) "#ifndef" (identifier) "QEI_QEI_H_" (preproc_def) "#define QEI_QEI_H_\n" (#define) "#define" (identifier) "QEI_QEI_H_" (preproc_def) "#define MOTOR_SELECT_LEFT 1\n" (#define) "#define" (identifier) "MOTOR_SELECT_LEFT" (preproc_arg) "1" (preproc_def) "#define MOTOR_SELECT_RIGHT 0\n" (#define) "#define" (identifier) "MOTOR_SELECT_RIGHT" (preproc_arg) "0" (declaration) "extern void qei_init(uint16_t ms_Timebase);" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "void" (function_declarator) "qei_init(uint16_t ms_Timebase)" (identifier) "qei_init" (parameter_list) "(uint16_t ms_Timebase)" (() "(" (parameter_declaration) "uint16_t ms_Timebase" (primitive_type) "uint16_t" (identifier) "ms_Timebase" ()) ")" (;) ";" (declaration) "extern bool qei_getVelocity(bool Select, int32_t *Velocity);" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "bool" (function_declarator) "qei_getVelocity(bool Select, int32_t *Velocity)" (identifier) "qei_getVelocity" (parameter_list) "(bool Select, int32_t *Velocity)" (() "(" (parameter_declaration) "bool Select" (primitive_type) "bool" (identifier) "Select" (,) "," (parameter_declaration) "int32_t *Velocity" (primitive_type) "int32_t" (pointer_declarator) "*Velocity" (*) "*" (identifier) "Velocity" ()) ")" (;) ";" (declaration) "int32_t qei_getPosRight();" (primitive_type) "int32_t" (function_declarator) "qei_getPosRight()" (identifier) "qei_getPosRight" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int32_t qei_getPosLeft();" (primitive_type) "int32_t" (function_declarator) "qei_getPosLeft()" (identifier) "qei_getPosLeft" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void qei_setPosLeft(int32_t pos);" (primitive_type) "void" (function_declarator) "qei_setPosLeft(int32_t pos)" (identifier) "qei_setPosLeft" (parameter_list) "(int32_t pos)" (() "(" (parameter_declaration) "int32_t pos" (primitive_type) "int32_t" (identifier) "pos" ()) ")" (;) ";" (declaration) "void qei_setPosRight(int32_t pos);" (primitive_type) "void" (function_declarator) "qei_setPosRight(int32_t pos)" (identifier) "qei_setPosRight" (parameter_list) "(int32_t pos)" (() "(" (parameter_declaration) "int32_t pos" (primitive_type) "int32_t" (identifier) "pos" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* QEI_QEI_H_ */"
89
0
{"language": "c", "success": true, "metadata": {"lines": 22, "avg_line_length": 24.09, "nodes": 66, "errors": 0, "source_hash": "6292809653e6210436a1587fa2ee265dbd1d1025fb3ec7a82e44e2fb1d0915f0", "categorized_nodes": 37}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef QEI_QEI_H_\n#define QEI_QEI_H_\n\n#define MOTOR_SELECT_LEFT 1\n#define MOTOR_SELECT_RIGHT 0\n\nextern void qei_init(uint16_t ms_Timebase);\nextern bool qei_getVelocity(bool Select, int32_t *Velocity);\nint32_t qei_getPosRight();\nint32_t qei_getPosLeft();\nvoid qei_setPosLeft(int32_t pos);\nvoid qei_setPosRight(int32_t pos);\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 10, 14, 24, 39, 44, 49, 57, 65], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 26, "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": "QEI_QEI_H_", "parent": 0, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 18}}, {"id": 3, "type": "preproc_def", "text": "#define QEI_QEI_H_\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": "QEI_QEI_H_", "parent": 3, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 18}}, {"id": 6, "type": "preproc_def", "text": "#define MOTOR_SELECT_LEFT 1\n", "parent": 0, "children": [7, 8, 9], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 8, "type": "identifier", "text": "MOTOR_SELECT_LEFT", "parent": 6, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 25}}, {"id": 9, "type": "preproc_arg", "text": "1", "parent": 6, "children": [], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 27}}, {"id": 10, "type": "preproc_def", "text": "#define MOTOR_SELECT_RIGHT 0\n", "parent": 0, "children": [11, 12, 13], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 11, "type": "#define", "text": "#define", "parent": 10, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 12, "type": "identifier", "text": "MOTOR_SELECT_RIGHT", "parent": 10, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 26}}, {"id": 13, "type": "preproc_arg", "text": "0", "parent": 10, "children": [], "start_point": {"row": 16, "column": 27}, "end_point": {"row": 16, "column": 28}}, {"id": 14, "type": "declaration", "text": "extern void qei_init(uint16_t ms_Timebase);", "parent": 0, "children": [15, 17, 18], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 43}}, {"id": 15, "type": "storage_class_specifier", "text": "extern", "parent": 14, "children": [16], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 16, "type": "extern", "text": "extern", "parent": 15, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 17, "type": "primitive_type", "text": "void", "parent": 14, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 11}}, {"id": 18, "type": "function_declarator", "text": "qei_init(uint16_t ms_Timebase)", "parent": 14, "children": [19, 20], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 42}}, {"id": 19, "type": "identifier", "text": "qei_init", "parent": 18, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 20}}, {"id": 20, "type": "parameter_list", "text": "(uint16_t ms_Timebase)", "parent": 18, "children": [21], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 42}}, {"id": 21, "type": "parameter_declaration", "text": "uint16_t ms_Timebase", "parent": 20, "children": [22, 23], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 41}}, {"id": 22, "type": "primitive_type", "text": "uint16_t", "parent": 21, "children": [], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 29}}, {"id": 23, "type": "identifier", "text": "ms_Timebase", "parent": 21, "children": [], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 41}}, {"id": 24, "type": "declaration", "text": "extern bool qei_getVelocity(bool Select, int32_t *Velocity);", "parent": 0, "children": [25, 27, 28], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 60}}, {"id": 25, "type": "storage_class_specifier", "text": "extern", "parent": 24, "children": [26], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 26, "type": "extern", "text": "extern", "parent": 25, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 27, "type": "primitive_type", "text": "bool", "parent": 24, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 11}}, {"id": 28, "type": "function_declarator", "text": "qei_getVelocity(bool Select, int32_t *Velocity)", "parent": 24, "children": [29, 30], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 59}}, {"id": 29, "type": "identifier", "text": "qei_getVelocity", "parent": 28, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 27}}, {"id": 30, "type": "parameter_list", "text": "(bool Select, int32_t *Velocity)", "parent": 28, "children": [31, 34], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 59}}, {"id": 31, "type": "parameter_declaration", "text": "bool Select", "parent": 30, "children": [32, 33], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 39}}, {"id": 32, "type": "primitive_type", "text": "bool", "parent": 31, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 32}}, {"id": 33, "type": "identifier", "text": "Select", "parent": 31, "children": [], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 39}}, {"id": 34, "type": "parameter_declaration", "text": "int32_t *Velocity", "parent": 30, "children": [35, 36], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 58}}, {"id": 35, "type": "primitive_type", "text": "int32_t", "parent": 34, "children": [], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 48}}, {"id": 36, "type": "pointer_declarator", "text": "*Velocity", "parent": 34, "children": [37, 38], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 58}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 50}}, {"id": 38, "type": "identifier", "text": "Velocity", "parent": 36, "children": [], "start_point": {"row": 19, "column": 50}, "end_point": {"row": 19, "column": 58}}, {"id": 39, "type": "declaration", "text": "int32_t qei_getPosRight();", "parent": 0, "children": [40, 41], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 26}}, {"id": 40, "type": "primitive_type", "text": "int32_t", "parent": 39, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 41, "type": "function_declarator", "text": "qei_getPosRight()", "parent": 39, "children": [42, 43], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 25}}, {"id": 42, "type": "identifier", "text": "qei_getPosRight", "parent": 41, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 23}}, {"id": 43, "type": "parameter_list", "text": "()", "parent": 41, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 25}}, {"id": 44, "type": "declaration", "text": "int32_t qei_getPosLeft();", "parent": 0, "children": [45, 46], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 25}}, {"id": 45, "type": "primitive_type", "text": "int32_t", "parent": 44, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 46, "type": "function_declarator", "text": "qei_getPosLeft()", "parent": 44, "children": [47, 48], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 24}}, {"id": 47, "type": "identifier", "text": "qei_getPosLeft", "parent": 46, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 22}}, {"id": 48, "type": "parameter_list", "text": "()", "parent": 46, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 24}}, {"id": 49, "type": "declaration", "text": "void qei_setPosLeft(int32_t pos);", "parent": 0, "children": [50, 51], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 33}}, {"id": 50, "type": "primitive_type", "text": "void", "parent": 49, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 51, "type": "function_declarator", "text": "qei_setPosLeft(int32_t pos)", "parent": 49, "children": [52, 53], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 32}}, {"id": 52, "type": "identifier", "text": "qei_setPosLeft", "parent": 51, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 19}}, {"id": 53, "type": "parameter_list", "text": "(int32_t pos)", "parent": 51, "children": [54], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 32}}, {"id": 54, "type": "parameter_declaration", "text": "int32_t pos", "parent": 53, "children": [55, 56], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 31}}, {"id": 55, "type": "primitive_type", "text": "int32_t", "parent": 54, "children": [], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 27}}, {"id": 56, "type": "identifier", "text": "pos", "parent": 54, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 31}}, {"id": 57, "type": "declaration", "text": "void qei_setPosRight(int32_t pos);", "parent": 0, "children": [58, 59], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 34}}, {"id": 58, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 4}}, {"id": 59, "type": "function_declarator", "text": "qei_setPosRight(int32_t pos)", "parent": 57, "children": [60, 61], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 33}}, {"id": 60, "type": "identifier", "text": "qei_setPosRight", "parent": 59, "children": [], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 20}}, {"id": 61, "type": "parameter_list", "text": "(int32_t pos)", "parent": 59, "children": [62], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 33}}, {"id": 62, "type": "parameter_declaration", "text": "int32_t pos", "parent": 61, "children": [63, 64], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 32}}, {"id": 63, "type": "primitive_type", "text": "int32_t", "parent": 62, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 28}}, {"id": 64, "type": "identifier", "text": "pos", "parent": 62, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 32}}, {"id": 65, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}]}, "node_categories": {"declarations": {"functions": [18, 28, 41, 46, 51, 59], "variables": [14, 21, 24, 31, 34, 39, 44, 49, 54, 57, 62], "classes": [15, 25], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 8, 12, 19, 23, 29, 33, 38, 42, 47, 52, 56, 60, 64, 65], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "qei_init(uint16_t ms_Timebase)"}, {"node_id": 28, "universal_type": "function", "name": "unknown", "text_snippet": "qei_getVelocity(bool Select, int32_t *Velocity)"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "qei_getPosRight()"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "qei_getPosLeft()"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "qei_setPosLeft(int32_t pos)"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "qei_setPosRight(int32_t pos)"}], "class_declarations": [{"node_id": 15, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 25, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": []}, "original_source_code": "/**\n *\tRaise your ARM 2015 sample code http://raiseyourarm.com/\n *\tAuthor: Pay it forward club\n *\thttp://www.payitforward.edu.vn\n *\tversion 0.0.1\n */\n\n/**\n * @file\tqei.h\n * @brief\tQEI module controller\n */\n\n#ifndef QEI_QEI_H_\n#define QEI_QEI_H_\n\n#define MOTOR_SELECT_LEFT 1\n#define MOTOR_SELECT_RIGHT 0\n\nextern void qei_init(uint16_t ms_Timebase);\nextern bool qei_getVelocity(bool Select, int32_t *Velocity);\nint32_t qei_getPosRight();\nint32_t qei_getPosLeft();\nvoid qei_setPosLeft(int32_t pos);\nvoid qei_setPosRight(int32_t pos);\n\n\n#endif /* QEI_QEI_H_ */\n"}
80,907
c
#ifndef gen_PhotosInterface_PhotosppInterface_h #define gen_PhotosInterface_PhotosppInterface_h // #include "HepPDT/ParticleDataTable.hh" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/EventSetup.h" #include "HepMC/SimpleVector.h" #include "GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h" namespace HepMC { class GenEvent; class GenVertex; } namespace gen { class PhotosppInterface : public PhotosInterfaceBase { public: // ctor & dtor PhotosppInterface( const edm::ParameterSet& pset); ~PhotosppInterface() {} void init(); const std::vector<std::string>& specialSettings() { return fSpecialSettings; } HepMC::GenEvent* apply( HepMC::GenEvent* ); void configureOnlyFor( int ); void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; } bool isTauLeptonicDecay( HepMC::GenVertex* ); void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine); static double flat(); void statistics(); private: int fOnlyPDG; bool fAvoidTauLeptonicDecays; bool fIsInitialized; edm::ParameterSet* fPSet; static CLHEP::HepRandomEngine* fRandomEngine; }; } #endif
32.3
40
(translation_unit) "#ifndef gen_PhotosInterface_PhotosppInterface_h\n#define gen_PhotosInterface_PhotosppInterface_h\n\n// #include "HepPDT/ParticleDataTable.hh"\n\n#include "FWCore/ParameterSet/interface/ParameterSet.h"\n#include "FWCore/Framework/interface/ESHandle.h"\n#include "FWCore/Framework/interface/EventSetup.h"\n\n#include "HepMC/SimpleVector.h"\n#include "GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h"\n\n\nnamespace HepMC \n{\nclass GenEvent;\nclass GenVertex;\n}\n\nnamespace gen {\n class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);\n ~PhotosppInterface() {}\n\n void init();\n const std::vector<std::string>& specialSettings() { return fSpecialSettings; }\n HepMC::GenEvent* apply( HepMC::GenEvent* );\n void configureOnlyFor( int );\n void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }\n bool isTauLeptonicDecay( HepMC::GenVertex* );\n void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);\n static double flat();\n void statistics();\n \n private: \n int fOnlyPDG;\n bool fAvoidTauLeptonicDecays; \n bool fIsInitialized;\n edm::ParameterSet* fPSet;\n\n static CLHEP::HepRandomEngine* fRandomEngine;\n };\n}\n\n#endif\n" (preproc_ifdef) "#ifndef gen_PhotosInterface_PhotosppInterface_h\n#define gen_PhotosInterface_PhotosppInterface_h\n\n// #include "HepPDT/ParticleDataTable.hh"\n\n#include "FWCore/ParameterSet/interface/ParameterSet.h"\n#include "FWCore/Framework/interface/ESHandle.h"\n#include "FWCore/Framework/interface/EventSetup.h"\n\n#include "HepMC/SimpleVector.h"\n#include "GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h"\n\n\nnamespace HepMC \n{\nclass GenEvent;\nclass GenVertex;\n}\n\nnamespace gen {\n class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);\n ~PhotosppInterface() {}\n\n void init();\n const std::vector<std::string>& specialSettings() { return fSpecialSettings; }\n HepMC::GenEvent* apply( HepMC::GenEvent* );\n void configureOnlyFor( int );\n void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }\n bool isTauLeptonicDecay( HepMC::GenVertex* );\n void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);\n static double flat();\n void statistics();\n \n private: \n int fOnlyPDG;\n bool fAvoidTauLeptonicDecays; \n bool fIsInitialized;\n edm::ParameterSet* fPSet;\n\n static CLHEP::HepRandomEngine* fRandomEngine;\n };\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "gen_PhotosInterface_PhotosppInterface_h" (preproc_def) "#define gen_PhotosInterface_PhotosppInterface_h\n" (#define) "#define" (identifier) "gen_PhotosInterface_PhotosppInterface_h" (comment) "// #include "HepPDT/ParticleDataTable.hh"" (preproc_include) "#include "FWCore/ParameterSet/interface/ParameterSet.h"\n" (#include) "#include" (string_literal) ""FWCore/ParameterSet/interface/ParameterSet.h"" (") """ (string_content) "FWCore/ParameterSet/interface/ParameterSet.h" (") """ (preproc_include) "#include "FWCore/Framework/interface/ESHandle.h"\n" (#include) "#include" (string_literal) ""FWCore/Framework/interface/ESHandle.h"" (") """ (string_content) "FWCore/Framework/interface/ESHandle.h" (") """ (preproc_include) "#include "FWCore/Framework/interface/EventSetup.h"\n" (#include) "#include" (string_literal) ""FWCore/Framework/interface/EventSetup.h"" (") """ (string_content) "FWCore/Framework/interface/EventSetup.h" (") """ (preproc_include) "#include "HepMC/SimpleVector.h"\n" (#include) "#include" (string_literal) ""HepMC/SimpleVector.h"" (") """ (string_content) "HepMC/SimpleVector.h" (") """ (preproc_include) "#include "GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h"\n" (#include) "#include" (string_literal) ""GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h"" (") """ (string_content) "GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h" (") """ (function_definition) "namespace HepMC \n{\nclass GenEvent;\nclass GenVertex;\n}" (type_identifier) "namespace" (identifier) "HepMC" (compound_statement) "{\nclass GenEvent;\nclass GenVertex;\n}" ({) "{" (declaration) "class GenEvent;" (type_identifier) "class" (identifier) "GenEvent" (;) ";" (declaration) "class GenVertex;" (type_identifier) "class" (identifier) "GenVertex" (;) ";" (}) "}" (function_definition) "namespace gen {\n class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);\n ~PhotosppInterface() {}\n\n void init();\n const std::vector<std::string>& specialSettings() { return fSpecialSettings; }\n HepMC::GenEvent* apply( HepMC::GenEvent* );\n void configureOnlyFor( int );\n void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }\n bool isTauLeptonicDecay( HepMC::GenVertex* );\n void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);\n static double flat();\n void statistics();\n \n private: \n int fOnlyPDG;\n bool fAvoidTauLeptonicDecays; \n bool fIsInitialized;\n edm::ParameterSet* fPSet;\n\n static CLHEP::HepRandomEngine* fRandomEngine;\n };\n}" (type_identifier) "namespace" (identifier) "gen" (compound_statement) "{\n class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);\n ~PhotosppInterface() {}\n\n void init();\n const std::vector<std::string>& specialSettings() { return fSpecialSettings; }\n HepMC::GenEvent* apply( HepMC::GenEvent* );\n void configureOnlyFor( int );\n void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }\n bool isTauLeptonicDecay( HepMC::GenVertex* );\n void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);\n static double flat();\n void statistics();\n \n private: \n int fOnlyPDG;\n bool fAvoidTauLeptonicDecays; \n bool fIsInitialized;\n edm::ParameterSet* fPSet;\n\n static CLHEP::HepRandomEngine* fRandomEngine;\n };\n}" ({) "{" (function_definition) "class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);\n ~PhotosppInterface() {}\n\n void init();\n const std::vector<std::string>& specialSettings() { return fSpecialSettings; }\n HepMC::GenEvent* apply( HepMC::GenEvent* );\n void configureOnlyFor( int );\n void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }\n bool isTauLeptonicDecay( HepMC::GenVertex* );\n void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);\n static double flat();\n void statistics();\n \n private: \n int fOnlyPDG;\n bool fAvoidTauLeptonicDecays; \n bool fIsInitialized;\n edm::ParameterSet* fPSet;\n\n static CLHEP::HepRandomEngine* fRandomEngine;\n }" (type_identifier) "class" (ERROR) "PhotosppInterface : public" (identifier) "PhotosppInterface" (:) ":" (identifier) "public" (identifier) "PhotosInterfaceBase" (compound_statement) "{\n public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);\n ~PhotosppInterface() {}\n\n void init();\n const std::vector<std::string>& specialSettings() { return fSpecialSettings; }\n HepMC::GenEvent* apply( HepMC::GenEvent* );\n void configureOnlyFor( int );\n void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }\n bool isTauLeptonicDecay( HepMC::GenVertex* );\n void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);\n static double flat();\n void statistics();\n \n private: \n int fOnlyPDG;\n bool fAvoidTauLeptonicDecays; \n bool fIsInitialized;\n edm::ParameterSet* fPSet;\n\n static CLHEP::HepRandomEngine* fRandomEngine;\n }" ({) "{" (labeled_statement) "public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);" (statement_identifier) "public" (:) ":" (comment) "// ctor & dtor" (labeled_statement) "PhotosppInterface( const edm::ParameterSet& pset);" (statement_identifier) "PhotosppInterface" (ERROR) "( const edm:" (() "(" (type_descriptor) "const edm" (type_qualifier) "const" (const) "const" (type_identifier) "edm" (:) ":" (:) ":" (expression_statement) "ParameterSet& pset);" (binary_expression) "ParameterSet& pset" (identifier) "ParameterSet" (&) "&" (identifier) "pset" (ERROR) ")" ()) ")" (;) ";" (expression_statement) "~PhotosppInterface()" (unary_expression) "~PhotosppInterface()" (~) "~" (call_expression) "PhotosppInterface()" (identifier) "PhotosppInterface" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{}" ({) "{" (}) "}" (declaration) "void init();" (primitive_type) "void" (function_declarator) "init()" (identifier) "init" (parameter_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "const std::vector<std::string>& specialSettings() { return fSpecialSettings; }" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::vector<std::string>&" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (>) ">" (&) "&" (function_declarator) "specialSettings()" (identifier) "specialSettings" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return fSpecialSettings; }" ({) "{" (return_statement) "return fSpecialSettings;" (return) "return" (identifier) "fSpecialSettings" (;) ";" (}) "}" (labeled_statement) "HepMC::GenEvent* apply( HepMC::GenEvent* );" (statement_identifier) "HepMC" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "GenEvent* apply( HepMC::GenEvent* );" (binary_expression) "GenEvent* apply( HepMC::GenEvent* )" (identifier) "GenEvent" (*) "*" (call_expression) "apply( HepMC::GenEvent* )" (identifier) "apply" (argument_list) "( HepMC::GenEvent* )" (() "(" (ERROR) "HepMC::GenEvent*" (identifier) "HepMC" (:) ":" (:) ":" (identifier) "GenEvent" (*) "*" ()) ")" (;) ";" (declaration) "void configureOnlyFor( int );" (primitive_type) "void" (function_declarator) "configureOnlyFor( int )" (identifier) "configureOnlyFor" (parameter_list) "( int )" (() "(" (parameter_declaration) "int" (primitive_type) "int" ()) ")" (;) ";" (function_definition) "void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }" (primitive_type) "void" (function_declarator) "avoidTauLeptonicDecays()" (identifier) "avoidTauLeptonicDecays" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ fAvoidTauLeptonicDecays=true; return; }" ({) "{" (expression_statement) "fAvoidTauLeptonicDecays=true;" (assignment_expression) "fAvoidTauLeptonicDecays=true" (identifier) "fAvoidTauLeptonicDecays" (=) "=" (true) "true" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (declaration) "bool isTauLeptonicDecay( HepMC::GenVertex* );" (primitive_type) "bool" (function_declarator) "isTauLeptonicDecay( HepMC::GenVertex* )" (identifier) "isTauLeptonicDecay" (parameter_list) "( HepMC::GenVertex* )" (() "(" (parameter_declaration) "HepMC::GenVertex*" (type_identifier) "HepMC" (ERROR) "::GenVertex" (:) ":" (:) ":" (identifier) "GenVertex" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);" (primitive_type) "void" (function_declarator) "setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine)" (identifier) "setRandomEngine" (parameter_list) "(CLHEP::HepRandomEngine* decayRandomEngine)" (() "(" (parameter_declaration) "CLHEP::HepRandomEngine* decayRandomEngine" (type_identifier) "CLHEP" (ERROR) "::HepRandomEngine" (:) ":" (:) ":" (identifier) "HepRandomEngine" (pointer_declarator) "* decayRandomEngine" (*) "*" (identifier) "decayRandomEngine" ()) ")" (;) ";" (declaration) "static double flat();" (storage_class_specifier) "static" (static) "static" (primitive_type) "double" (function_declarator) "flat()" (identifier) "flat" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void statistics();" (primitive_type) "void" (function_declarator) "statistics()" (identifier) "statistics" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private: \n int fOnlyPDG;" (statement_identifier) "private" (:) ":" (declaration) "int fOnlyPDG;" (primitive_type) "int" (identifier) "fOnlyPDG" (;) ";" (declaration) "bool fAvoidTauLeptonicDecays;" (primitive_type) "bool" (identifier) "fAvoidTauLeptonicDecays" (;) ";" (declaration) "bool fIsInitialized;" (primitive_type) "bool" (identifier) "fIsInitialized" (;) ";" (labeled_statement) "edm::ParameterSet* fPSet;" (statement_identifier) "edm" (:) ":" (ERROR) ":" (:) ":" (declaration) "ParameterSet* fPSet;" (type_identifier) "ParameterSet" (pointer_declarator) "* fPSet" (*) "*" (identifier) "fPSet" (;) ";" (declaration) "static CLHEP::HepRandomEngine* fRandomEngine;" (storage_class_specifier) "static" (static) "static" (type_identifier) "CLHEP" (ERROR) "::HepRandomEngine" (:) ":" (:) ":" (identifier) "HepRandomEngine" (pointer_declarator) "* fRandomEngine" (*) "*" (identifier) "fRandomEngine" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (#endif) "#endif"
279
10
{"language": "c", "success": true, "metadata": {"lines": 40, "avg_line_length": 32.3, "nodes": 154, "errors": 0, "source_hash": "d147709cde874973bf98194e68e3a895b4d7231237c6d82513dc2d6c8647167a", "categorized_nodes": 103}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef gen_PhotosInterface_PhotosppInterface_h\n#define gen_PhotosInterface_PhotosppInterface_h\n\n// #include \"HepPDT/ParticleDataTable.hh\"\n\n#include \"FWCore/ParameterSet/interface/ParameterSet.h\"\n#include \"FWCore/Framework/interface/ESHandle.h\"\n#include \"FWCore/Framework/interface/EventSetup.h\"\n\n#include \"HepMC/SimpleVector.h\"\n#include \"GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h\"\n\n\nnamespace HepMC \n{\nclass GenEvent;\nclass GenVertex;\n}\n\nnamespace gen {\n class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);\n ~PhotosppInterface() {}\n\n void init();\n const std::vector<std::string>& specialSettings() { return fSpecialSettings; }\n HepMC::GenEvent* apply( HepMC::GenEvent* );\n void configureOnlyFor( int );\n void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }\n bool isTauLeptonicDecay( HepMC::GenVertex* );\n void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);\n static double flat();\n void statistics();\n \n private: \n int fOnlyPDG;\n bool fAvoidTauLeptonicDecays; \n bool fIsInitialized;\n edm::ParameterSet* fPSet;\n\n static CLHEP::HepRandomEngine* fRandomEngine;\n };\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 28, 153], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 47, "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": "gen_PhotosInterface_PhotosppInterface_h", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 47}}, {"id": 3, "type": "preproc_def", "text": "#define gen_PhotosInterface_PhotosppInterface_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": "gen_PhotosInterface_PhotosppInterface_h", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 47}}, {"id": 6, "type": "preproc_include", "text": "#include \"FWCore/ParameterSet/interface/ParameterSet.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"FWCore/ParameterSet/interface/ParameterSet.h\"", "parent": 6, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 55}}, {"id": 9, "type": "preproc_include", "text": "#include \"FWCore/Framework/interface/ESHandle.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": "string_literal", "text": "\"FWCore/Framework/interface/ESHandle.h\"", "parent": 9, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 48}}, {"id": 12, "type": "preproc_include", "text": "#include \"FWCore/Framework/interface/EventSetup.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"FWCore/Framework/interface/EventSetup.h\"", "parent": 12, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 50}}, {"id": 15, "type": "preproc_include", "text": "#include \"HepMC/SimpleVector.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"HepMC/SimpleVector.h\"", "parent": 15, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 31}}, {"id": 18, "type": "preproc_include", "text": "#include \"GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h\"", "parent": 18, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 77}}, {"id": 21, "type": "function_definition", "text": "namespace HepMC \n{\nclass GenEvent;\nclass GenVertex;\n}", "parent": 0, "children": [22, 23], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 22, "type": "type_identifier", "text": "namespace", "parent": 21, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 9}}, {"id": 23, "type": "identifier", "text": "HepMC", "parent": 21, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 15}}, {"id": 24, "type": "declaration", "text": "class GenEvent;", "parent": 21, "children": [25], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 15}}, {"id": 25, "type": "identifier", "text": "GenEvent", "parent": 24, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 14}}, {"id": 26, "type": "declaration", "text": "class GenVertex;", "parent": 21, "children": [27], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 16}}, {"id": 27, "type": "identifier", "text": "GenVertex", "parent": 26, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 15}}, {"id": 28, "type": "function_definition", "text": "namespace gen {\n class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);\n ~PhotosppInterface() {}\n\n void init();\n const std::vector<std::string>& specialSettings() { return fSpecialSettings; }\n HepMC::GenEvent* apply( HepMC::GenEvent* );\n void configureOnlyFor( int );\n void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }\n bool isTauLeptonicDecay( HepMC::GenVertex* );\n void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);\n static double flat();\n void statistics();\n \n private: \n int fOnlyPDG;\n bool fAvoidTauLeptonicDecays; \n bool fIsInitialized;\n edm::ParameterSet* fPSet;\n\n static CLHEP::HepRandomEngine* fRandomEngine;\n };\n}", "parent": 0, "children": [29, 30], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 29, "type": "type_identifier", "text": "namespace", "parent": 28, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 9}}, {"id": 30, "type": "identifier", "text": "gen", "parent": 28, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 13}}, {"id": 31, "type": "function_definition", "text": "class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);\n ~PhotosppInterface() {}\n\n void init();\n const std::vector<std::string>& specialSettings() { return fSpecialSettings; }\n HepMC::GenEvent* apply( HepMC::GenEvent* );\n void configureOnlyFor( int );\n void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }\n bool isTauLeptonicDecay( HepMC::GenVertex* );\n void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);\n static double flat();\n void statistics();\n \n private: \n int fOnlyPDG;\n bool fAvoidTauLeptonicDecays; \n bool fIsInitialized;\n edm::ParameterSet* fPSet;\n\n static CLHEP::HepRandomEngine* fRandomEngine;\n }", "parent": 28, "children": [32, 34], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 44, "column": 3}}, {"id": 32, "type": "ERROR", "text": "PhotosppInterface : public", "parent": 31, "children": [33], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 34}}, {"id": 33, "type": "identifier", "text": "PhotosppInterface", "parent": 32, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 25}}, {"id": 34, "type": "identifier", "text": "PhotosInterfaceBase", "parent": 31, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 54}}, {"id": 35, "type": "labeled_statement", "text": "public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);", "parent": 31, "children": [36], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 24, "column": 54}}, {"id": 36, "type": "labeled_statement", "text": "PhotosppInterface( const edm::ParameterSet& pset);", "parent": 35, "children": [37, 38], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 54}}, {"id": 37, "type": "statement_identifier", "text": "PhotosppInterface", "parent": 36, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 21}}, {"id": 38, "type": "ERROR", "text": "( const edm:", "parent": 36, "children": [39], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 33}}, {"id": 39, "type": "type_descriptor", "text": "const edm", "parent": 38, "children": [40], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 32}}, {"id": 40, "type": "type_identifier", "text": "edm", "parent": 39, "children": [], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 32}}, {"id": 41, "type": "binary_expression", "text": "ParameterSet& pset", "parent": 36, "children": [42, 43], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 52}}, {"id": 42, "type": "identifier", "text": "ParameterSet", "parent": 41, "children": [], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 46}}, {"id": 43, "type": "identifier", "text": "pset", "parent": 41, "children": [], "start_point": {"row": 24, "column": 48}, "end_point": {"row": 24, "column": 52}}, {"id": 44, "type": "unary_expression", "text": "~PhotosppInterface()", "parent": 31, "children": [45, 46], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 24}}, {"id": 45, "type": "~", "text": "~", "parent": 44, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 5}}, {"id": 46, "type": "call_expression", "text": "PhotosppInterface()", "parent": 44, "children": [47, 48], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 24}}, {"id": 47, "type": "identifier", "text": "PhotosppInterface", "parent": 46, "children": [], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 22}}, {"id": 48, "type": "argument_list", "text": "()", "parent": 46, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 24}}, {"id": 49, "type": "declaration", "text": "void init();", "parent": 31, "children": [50, 51], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 16}}, {"id": 50, "type": "primitive_type", "text": "void", "parent": 49, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 8}}, {"id": 51, "type": "function_declarator", "text": "init()", "parent": 49, "children": [52, 53], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 15}}, {"id": 52, "type": "identifier", "text": "init", "parent": 51, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 13}}, {"id": 53, "type": "parameter_list", "text": "()", "parent": 51, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 15}}, {"id": 54, "type": "function_definition", "text": "const std::vector<std::string>& specialSettings() { return fSpecialSettings; }", "parent": 31, "children": [55, 56, 62], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 82}}, {"id": 55, "type": "type_identifier", "text": "std", "parent": 54, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 13}}, {"id": 56, "type": "ERROR", "text": "::vector<std::string>&", "parent": 54, "children": [57, 58, 59, 60, 61], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 35}}, {"id": 57, "type": "identifier", "text": "vector", "parent": 56, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 21}}, {"id": 58, "type": "<", "text": "<", "parent": 56, "children": [], "start_point": {"row": 28, "column": 21}, "end_point": {"row": 28, "column": 22}}, {"id": 59, "type": "identifier", "text": "std", "parent": 56, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 25}}, {"id": 60, "type": "identifier", "text": "string", "parent": 56, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 33}}, {"id": 61, "type": ">", "text": ">", "parent": 56, "children": [], "start_point": {"row": 28, "column": 33}, "end_point": {"row": 28, "column": 34}}, {"id": 62, "type": "function_declarator", "text": "specialSettings()", "parent": 54, "children": [63, 64], "start_point": {"row": 28, "column": 36}, "end_point": {"row": 28, "column": 53}}, {"id": 63, "type": "identifier", "text": "specialSettings", "parent": 62, "children": [], "start_point": {"row": 28, "column": 36}, "end_point": {"row": 28, "column": 51}}, {"id": 64, "type": "parameter_list", "text": "()", "parent": 62, "children": [], "start_point": {"row": 28, "column": 51}, "end_point": {"row": 28, "column": 53}}, {"id": 65, "type": "return_statement", "text": "return fSpecialSettings;", "parent": 54, "children": [66], "start_point": {"row": 28, "column": 56}, "end_point": {"row": 28, "column": 80}}, {"id": 66, "type": "identifier", "text": "fSpecialSettings", "parent": 65, "children": [], "start_point": {"row": 28, "column": 63}, "end_point": {"row": 28, "column": 79}}, {"id": 67, "type": "labeled_statement", "text": "HepMC::GenEvent* apply( HepMC::GenEvent* );", "parent": 31, "children": [68], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 47}}, {"id": 68, "type": "statement_identifier", "text": "HepMC", "parent": 67, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 9}}, {"id": 69, "type": "binary_expression", "text": "GenEvent* apply( HepMC::GenEvent* )", "parent": 67, "children": [70, 71, 72], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 46}}, {"id": 70, "type": "identifier", "text": "GenEvent", "parent": 69, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 19}}, {"id": 71, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 20}}, {"id": 72, "type": "call_expression", "text": "apply( HepMC::GenEvent* )", "parent": 69, "children": [73, 74], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 46}}, {"id": 73, "type": "identifier", "text": "apply", "parent": 72, "children": [], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 26}}, {"id": 74, "type": "argument_list", "text": "( HepMC::GenEvent* )", "parent": 72, "children": [75], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 46}}, {"id": 75, "type": "ERROR", "text": "HepMC::GenEvent*", "parent": 74, "children": [76, 77, 78], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 44}}, {"id": 76, "type": "identifier", "text": "HepMC", "parent": 75, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 33}}, {"id": 77, "type": "identifier", "text": "GenEvent", "parent": 75, "children": [], "start_point": {"row": 29, "column": 35}, "end_point": {"row": 29, "column": 43}}, {"id": 78, "type": "*", "text": "*", "parent": 75, "children": [], "start_point": {"row": 29, "column": 43}, "end_point": {"row": 29, "column": 44}}, {"id": 79, "type": "declaration", "text": "void configureOnlyFor( int );", "parent": 31, "children": [80, 81], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 33}}, {"id": 80, "type": "primitive_type", "text": "void", "parent": 79, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 8}}, {"id": 81, "type": "function_declarator", "text": "configureOnlyFor( int )", "parent": 79, "children": [82, 83], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 32}}, {"id": 82, "type": "identifier", "text": "configureOnlyFor", "parent": 81, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 25}}, {"id": 83, "type": "parameter_list", "text": "( int )", "parent": 81, "children": [84], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 32}}, {"id": 84, "type": "parameter_declaration", "text": "int", "parent": 83, "children": [85], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 30}}, {"id": 85, "type": "primitive_type", "text": "int", "parent": 84, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 30}}, {"id": 86, "type": "function_definition", "text": "void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }", "parent": 31, "children": [87, 88], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 75}}, {"id": 87, "type": "primitive_type", "text": "void", "parent": 86, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 8}}, {"id": 88, "type": "function_declarator", "text": "avoidTauLeptonicDecays()", "parent": 86, "children": [89, 90], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 33}}, {"id": 89, "type": "identifier", "text": "avoidTauLeptonicDecays", "parent": 88, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 31}}, {"id": 90, "type": "parameter_list", "text": "()", "parent": 88, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 33}}, {"id": 91, "type": "assignment_expression", "text": "fAvoidTauLeptonicDecays=true", "parent": 86, "children": [92, 93, 94], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 64}}, {"id": 92, "type": "identifier", "text": "fAvoidTauLeptonicDecays", "parent": 91, "children": [], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 59}}, {"id": 93, "type": "=", "text": "=", "parent": 91, "children": [], "start_point": {"row": 31, "column": 59}, "end_point": {"row": 31, "column": 60}}, {"id": 94, "type": "true", "text": "true", "parent": 91, "children": [], "start_point": {"row": 31, "column": 60}, "end_point": {"row": 31, "column": 64}}, {"id": 95, "type": "return_statement", "text": "return;", "parent": 86, "children": [], "start_point": {"row": 31, "column": 66}, "end_point": {"row": 31, "column": 73}}, {"id": 96, "type": "declaration", "text": "bool isTauLeptonicDecay( HepMC::GenVertex* );", "parent": 31, "children": [97, 98], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 49}}, {"id": 97, "type": "primitive_type", "text": "bool", "parent": 96, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 8}}, {"id": 98, "type": "function_declarator", "text": "isTauLeptonicDecay( HepMC::GenVertex* )", "parent": 96, "children": [99, 100], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 48}}, {"id": 99, "type": "identifier", "text": "isTauLeptonicDecay", "parent": 98, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 27}}, {"id": 100, "type": "parameter_list", "text": "( HepMC::GenVertex* )", "parent": 98, "children": [101], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 48}}, {"id": 101, "type": "parameter_declaration", "text": "HepMC::GenVertex*", "parent": 100, "children": [102, 103, 105], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 46}}, {"id": 102, "type": "type_identifier", "text": "HepMC", "parent": 101, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 34}}, {"id": 103, "type": "ERROR", "text": "::GenVertex", "parent": 101, "children": [104], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 45}}, {"id": 104, "type": "identifier", "text": "GenVertex", "parent": 103, "children": [], "start_point": {"row": 32, "column": 36}, "end_point": {"row": 32, "column": 45}}, {"id": 105, "type": "abstract_pointer_declarator", "text": "*", "parent": 101, "children": [106], "start_point": {"row": 32, "column": 45}, "end_point": {"row": 32, "column": 46}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 32, "column": 45}, "end_point": {"row": 32, "column": 46}}, {"id": 107, "type": "declaration", "text": "void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);", "parent": 31, "children": [108, 109], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 68}}, {"id": 108, "type": "primitive_type", "text": "void", "parent": 107, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 8}}, {"id": 109, "type": "function_declarator", "text": "setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine)", "parent": 107, "children": [110, 111], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 67}}, {"id": 110, "type": "identifier", "text": "setRandomEngine", "parent": 109, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 24}}, {"id": 111, "type": "parameter_list", "text": "(CLHEP::HepRandomEngine* decayRandomEngine)", "parent": 109, "children": [112], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 67}}, {"id": 112, "type": "parameter_declaration", "text": "CLHEP::HepRandomEngine* decayRandomEngine", "parent": 111, "children": [113, 114, 116], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 66}}, {"id": 113, "type": "type_identifier", "text": "CLHEP", "parent": 112, "children": [], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 30}}, {"id": 114, "type": "ERROR", "text": "::HepRandomEngine", "parent": 112, "children": [115], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 47}}, {"id": 115, "type": "identifier", "text": "HepRandomEngine", "parent": 114, "children": [], "start_point": {"row": 33, "column": 32}, "end_point": {"row": 33, "column": 47}}, {"id": 116, "type": "pointer_declarator", "text": "* decayRandomEngine", "parent": 112, "children": [117, 118], "start_point": {"row": 33, "column": 47}, "end_point": {"row": 33, "column": 66}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 33, "column": 47}, "end_point": {"row": 33, "column": 48}}, {"id": 118, "type": "identifier", "text": "decayRandomEngine", "parent": 116, "children": [], "start_point": {"row": 33, "column": 49}, "end_point": {"row": 33, "column": 66}}, {"id": 119, "type": "declaration", "text": "static double flat();", "parent": 31, "children": [120, 121], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 25}}, {"id": 120, "type": "primitive_type", "text": "double", "parent": 119, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 17}}, {"id": 121, "type": "function_declarator", "text": "flat()", "parent": 119, "children": [122, 123], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 24}}, {"id": 122, "type": "identifier", "text": "flat", "parent": 121, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 22}}, {"id": 123, "type": "parameter_list", "text": "()", "parent": 121, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 24}}, {"id": 124, "type": "declaration", "text": "void statistics();", "parent": 31, "children": [125, 126], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 22}}, {"id": 125, "type": "primitive_type", "text": "void", "parent": 124, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 8}}, {"id": 126, "type": "function_declarator", "text": "statistics()", "parent": 124, "children": [127, 128], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 21}}, {"id": 127, "type": "identifier", "text": "statistics", "parent": 126, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 19}}, {"id": 128, "type": "parameter_list", "text": "()", "parent": 126, "children": [], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 21}}, {"id": 129, "type": "labeled_statement", "text": "private: \n int fOnlyPDG;", "parent": 31, "children": [130], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 38, "column": 38}}, {"id": 130, "type": "declaration", "text": "int fOnlyPDG;", "parent": 129, "children": [131, 132], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 38}}, {"id": 131, "type": "primitive_type", "text": "int", "parent": 130, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 7}}, {"id": 132, "type": "identifier", "text": "fOnlyPDG", "parent": 130, "children": [], "start_point": {"row": 38, "column": 29}, "end_point": {"row": 38, "column": 37}}, {"id": 133, "type": "declaration", "text": "bool fAvoidTauLeptonicDecays;", "parent": 31, "children": [134, 135], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 53}}, {"id": 134, "type": "primitive_type", "text": "bool", "parent": 133, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 8}}, {"id": 135, "type": "identifier", "text": "fAvoidTauLeptonicDecays", "parent": 133, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 52}}, {"id": 136, "type": "declaration", "text": "bool fIsInitialized;", "parent": 31, "children": [137, 138], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 44}}, {"id": 137, "type": "primitive_type", "text": "bool", "parent": 136, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 8}}, {"id": 138, "type": "identifier", "text": "fIsInitialized", "parent": 136, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 43}}, {"id": 139, "type": "labeled_statement", "text": "edm::ParameterSet* fPSet;", "parent": 31, "children": [140, 141], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 35}}, {"id": 140, "type": "statement_identifier", "text": "edm", "parent": 139, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 7}}, {"id": 141, "type": "declaration", "text": "ParameterSet* fPSet;", "parent": 139, "children": [142, 143], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 35}}, {"id": 142, "type": "type_identifier", "text": "ParameterSet", "parent": 141, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 21}}, {"id": 143, "type": "pointer_declarator", "text": "* fPSet", "parent": 141, "children": [144, 145], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 34}}, {"id": 144, "type": "*", "text": "*", "parent": 143, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 22}}, {"id": 145, "type": "identifier", "text": "fPSet", "parent": 143, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 34}}, {"id": 146, "type": "declaration", "text": "static CLHEP::HepRandomEngine* fRandomEngine;", "parent": 31, "children": [147, 148, 150], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 49}}, {"id": 147, "type": "type_identifier", "text": "CLHEP", "parent": 146, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 16}}, {"id": 148, "type": "ERROR", "text": "::HepRandomEngine", "parent": 146, "children": [149], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 33}}, {"id": 149, "type": "identifier", "text": "HepRandomEngine", "parent": 148, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 33}}, {"id": 150, "type": "pointer_declarator", "text": "* fRandomEngine", "parent": 146, "children": [151, 152], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 48}}, {"id": 151, "type": "*", "text": "*", "parent": 150, "children": [], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 34}}, {"id": 152, "type": "identifier", "text": "fRandomEngine", "parent": 150, "children": [], "start_point": {"row": 43, "column": 35}, "end_point": {"row": 43, "column": 48}}, {"id": 153, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 6}}]}, "node_categories": {"declarations": {"functions": [21, 28, 31, 51, 54, 62, 81, 86, 88, 98, 109, 121, 126], "variables": [24, 26, 49, 79, 84, 96, 101, 107, 112, 119, 124, 130, 133, 136, 141, 146], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [41, 44, 46, 69, 72], "assignments": [91], "loops": [], "conditionals": [0, 1, 2, 5, 22, 23, 25, 27, 29, 30, 33, 34, 37, 40, 42, 43, 47, 52, 55, 57, 59, 60, 63, 66, 68, 70, 73, 76, 77, 82, 89, 92, 99, 102, 104, 110, 113, 115, 118, 122, 127, 132, 135, 138, 140, 142, 145, 147, 149, 152, 153], "returns": [65, 95], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "GenEvent;", "text_snippet": "namespace HepMC \n{\nclass GenEvent;\nclass GenVertex;\n}"}, {"node_id": 28, "universal_type": "function", "name": "PhotosppInterface", "text_snippet": "namespace gen {\n class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor "}, {"node_id": 31, "universal_type": "function", "name": "PhotosppInterface", "text_snippet": "class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor & dtor\n Photosp"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "init()"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "const std::vector<std::string>& specialSettings() { return fSpecialSettings; }"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "specialSettings()"}, {"node_id": 81, "universal_type": "function", "name": ")", "text_snippet": "configureOnlyFor( int )"}, {"node_id": 86, "universal_type": "function", "name": "avoidTauLeptonicDecays", "text_snippet": "void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }"}, {"node_id": 88, "universal_type": "function", "name": "unknown", "text_snippet": "avoidTauLeptonicDecays()"}, {"node_id": 98, "universal_type": "function", "name": "unknown", "text_snippet": "isTauLeptonicDecay( HepMC::GenVertex* )"}, {"node_id": 109, "universal_type": "function", "name": "unknown", "text_snippet": "setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine)"}, {"node_id": 121, "universal_type": "function", "name": "unknown", "text_snippet": "flat()"}, {"node_id": 126, "universal_type": "function", "name": "unknown", "text_snippet": "statistics()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"FWCore/ParameterSet/interface/ParameterSet.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"FWCore/Framework/interface/ESHandle.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"FWCore/Framework/interface/EventSetup.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"HepMC/SimpleVector.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#ifndef gen_PhotosInterface_PhotosppInterface_h\n#define gen_PhotosInterface_PhotosppInterface_h\n\n// #include \"HepPDT/ParticleDataTable.hh\"\n\n#include \"FWCore/ParameterSet/interface/ParameterSet.h\"\n#include \"FWCore/Framework/interface/ESHandle.h\"\n#include \"FWCore/Framework/interface/EventSetup.h\"\n\n#include \"HepMC/SimpleVector.h\"\n#include \"GeneratorInterface/PhotosInterface/interface/PhotosInterfaceBase.h\"\n\n\nnamespace HepMC \n{\nclass GenEvent;\nclass GenVertex;\n}\n\nnamespace gen {\n class PhotosppInterface : public PhotosInterfaceBase {\n public:\n \n // ctor & dtor\n PhotosppInterface( const edm::ParameterSet& pset);\n ~PhotosppInterface() {}\n\n void init();\n const std::vector<std::string>& specialSettings() { return fSpecialSettings; }\n HepMC::GenEvent* apply( HepMC::GenEvent* );\n void configureOnlyFor( int );\n void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; }\n bool isTauLeptonicDecay( HepMC::GenVertex* );\n void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine);\n static double flat();\n void statistics();\n \n private: \n int fOnlyPDG;\n bool fAvoidTauLeptonicDecays; \n bool fIsInitialized;\n edm::ParameterSet* fPSet;\n\n static CLHEP::HepRandomEngine* fRandomEngine;\n };\n}\n\n#endif\n"}
80,908
c
#include "main.h" /* * Test if the element α is normal in F_{p^d}/F_p. * * For that purpose, we will check if Q = X^d - 1 and * P are relatively primes. P is a polynomial that * depends only on α. * * P = \sum_{i=0}^{d-1} α^{p^{i-1}}X^i * */ int is_normal(const fq_nmod_t elem, const fq_nmod_ctx_t field) { // We create the variables fq_nmod_poly_t P, Q, gcd; slong d, i; d = fq_nmod_ctx_degree(field); // We initialize the polynomials fq_nmod_poly_init(P, field); fq_nmod_poly_init(Q, field); fq_nmod_poly_init(gcd, field); // We create a variable coef belonging to F_{p^n} fq_nmod_t coef; fq_nmod_init(coef, field); // coef = 1 fq_nmod_one(coef, field); // We set Q to X^d fq_nmod_poly_set_coeff(Q, d, coef, field); // coef = -1 fq_nmod_neg(coef, coef, field); // We set Q to X^n - 1 fq_nmod_poly_set_coeff(Q, 0, coef, field); // coef = α fq_nmod_set(coef, elem, field); // We set P to α fq_nmod_poly_set_coeff(P, 0, coef, field); /* And using the Frobenius homomorphism, we set P to the polynomial described at the beginning. */ for (i = 1; i < d; i++) { fq_nmod_frobenius(coef, coef, 1, field); fq_nmod_poly_set_coeff(P, i, coef, field); } // We set gcd to gcd(P, Q) fq_nmod_poly_gcd(gcd, P, Q, field); // We compute a nonzero value if gcd = 1 int b = fq_nmod_poly_is_one(gcd, field); // We clear the variables, except gcd that is needed fq_nmod_poly_clear(P, field); fq_nmod_poly_clear(Q, field); fq_nmod_poly_clear(gcd, field); fq_nmod_clear(coef, field); return b; }
27.85
53
(translation_unit) "#include "main.h"\n\n/*\n * Test if the element α is normal in F_{p^d}/F_p. \n *\n * For that purpose, we will check if Q = X^d - 1 and\n * P are relatively primes. P is a polynomial that\n * depends only on α.\n *\n * P = \sum_{i=0}^{d-1} α^{p^{i-1}}X^i\n *\n */\n\nint is_normal(const fq_nmod_t elem, const fq_nmod_ctx_t field) {\n\n // We create the variables\n fq_nmod_poly_t P, Q, gcd; \n slong d, i;\n d = fq_nmod_ctx_degree(field);\n\n // We initialize the polynomials\n fq_nmod_poly_init(P, field);\n fq_nmod_poly_init(Q, field);\n fq_nmod_poly_init(gcd, field);\n\n // We create a variable coef belonging to F_{p^n}\n fq_nmod_t coef;\n fq_nmod_init(coef, field);\n\n // coef = 1\n fq_nmod_one(coef, field);\n\n // We set Q to X^d\n fq_nmod_poly_set_coeff(Q, d, coef, field);\n\n // coef = -1\n fq_nmod_neg(coef, coef, field);\n\n // We set Q to X^n - 1\n fq_nmod_poly_set_coeff(Q, 0, coef, field);\n\n // coef = α\n fq_nmod_set(coef, elem, field);\n\n // We set P to α\n fq_nmod_poly_set_coeff(P, 0, coef, field);\n\n\n /* And using the Frobenius homomorphism, we set P to the polynomial\n described at the beginning. */\n for (i = 1; i < d; i++) {\n fq_nmod_frobenius(coef, coef, 1, field);\n fq_nmod_poly_set_coeff(P, i, coef, field);\n }\n\n // We set gcd to gcd(P, Q)\n fq_nmod_poly_gcd(gcd, P, Q, field);\n\n // We compute a nonzero value if gcd = 1\n int b = fq_nmod_poly_is_one(gcd, field);\n\n // We clear the variables, except gcd that is needed\n fq_nmod_poly_clear(P, field);\n fq_nmod_poly_clear(Q, field);\n fq_nmod_poly_clear(gcd, field);\n fq_nmod_clear(coef, field);\n\n return b;\n}\n" (preproc_include) "#include "main.h"\n" (#include) "#include" (string_literal) ""main.h"" (") """ (string_content) "main.h" (") """ (comment) "/*\n * Test if the element α is normal in F_{p^d}/F_p. \n *\n * For that purpose, we will check if Q = X^d - 1 and\n * P are relatively primes. P is a polynomial that\n * depends only on α.\n *\n * P = \sum_{i=0}^{d-1} α^{p^{i-1}}X^i\n *\n */\n\ni" (function_definition) " is_normal(const fq_nmod_t elem, const fq_nmod_ctx_t field) {\n\n // We create the variables\n fq_nmod_poly_t P, Q, gcd; \n slong d, i;\n d = fq_nmod_ctx_degree(field);\n\n // We initialize the polynomials\n fq_nmod_poly_init(P, field);\n fq_nmod_poly_init(Q, field);\n fq_nmod_poly_init(gcd, field);\n\n // We create a variable coef belonging to F_{p^n}\n fq_nmod_t coef;\n fq_nmod_init(coef, field);\n\n // coef = 1\n fq_nmod_one(coef, field);\n\n // We set Q to X^d\n fq_nmod_poly_set_coeff(Q, d, coef, field);\n\n // coef = -1\n fq_nmod_neg(coef, coef, field);\n\n // We set Q to X^n - 1\n fq_nmod_poly_set_coeff(Q, 0, coef, field);\n\n // coef = α\n fq_nmod_set(coef, elem, field);\n\n // We set P to α\n fq_nmod_poly_set_coeff(P, 0, coef, field);\n\n\n /* And using the Frobenius homomorphism, we set P to the polynomial\n described at the beginning. */\n for (i = 1; i < d; i++) {\n fq_nmod_frobenius(coef, coef, 1, field);\n fq_nmod_poly_set_coeff(P, i, coef, field);\n }\n\n // We set gcd to gcd(P, Q)\n fq_nmod_poly_gcd(gcd, P, Q, field);\n\n // We compute a nonzero value if gcd = 1\n int b = fq_nmod_poly_is_one(gcd, field);\n\n // We clear the variables, except gcd that is needed\n fq_nmod_poly_clear(P, field);\n fq_nmod_poly_clear(Q, field);\n fq_nmod_poly_clear(gcd, field);\n fq_nmod_clear(coef, field);\n\n return b;\n}\n" (primitive_type) " is" (function_declarator) "normal(const fq_nmod_t elem, const fq_nmod_ctx_t field) {\n" (identifier) "normal(co" (parameter_list) "nst fq_nmod_t elem, const fq_nmod_ctx_t field) {\n" (() "n" (parameter_declaration) "st fq_nmod_t elem, c" (type_qualifier) "st fq" (const) "st fq" (type_identifier) "nmod_t el" (identifier) "m, c" (,) "o" (parameter_declaration) "st fq_nmod_ctx_t field) {" (type_qualifier) "st fq" (const) "st fq" (type_identifier) "nmod_ctx_t fi" (identifier) "ld) {" ()) "\n" (compound_statement) " // We create the variables\n fq_nmod_poly_t P, Q, gcd; \n slong d, i;\n d = fq_nmod_ctx_degree(field);\n\n // We initialize the polynomials\n fq_nmod_poly_init(P, field);\n fq_nmod_poly_init(Q, field);\n fq_nmod_poly_init(gcd, field);\n\n // We create a variable coef belonging to F_{p^n}\n fq_nmod_t coef;\n fq_nmod_init(coef, field);\n\n // coef = 1\n fq_nmod_one(coef, field);\n\n // We set Q to X^d\n fq_nmod_poly_set_coeff(Q, d, coef, field);\n\n // coef = -1\n fq_nmod_neg(coef, coef, field);\n\n // We set Q to X^n - 1\n fq_nmod_poly_set_coeff(Q, 0, coef, field);\n\n // coef = α\n fq_nmod_set(coef, elem, field);\n\n // We set P to α\n fq_nmod_poly_set_coeff(P, 0, coef, field);\n\n\n /* And using the Frobenius homomorphism, we set P to the polynomial\n described at the beginning. */\n for (i = 1; i < d; i++) {\n fq_nmod_frobenius(coef, coef, 1, field);\n fq_nmod_poly_set_coeff(P, i, coef, field);\n }\n\n // We set gcd to gcd(P, Q)\n fq_nmod_poly_gcd(gcd, P, Q, field);\n\n // We compute a nonzero value if gcd = 1\n int b = fq_nmod_poly_is_one(gcd, field);\n\n // We clear the variables, except gcd that is needed\n fq_nmod_poly_clear(P, field);\n fq_nmod_poly_clear(Q, field);\n fq_nmod_poly_clear(gcd, field);\n fq_nmod_clear(coef, field);\n\n return b;\n}\n" ({) " " (comment) "We create the variables\n f" (declaration) "nmod_poly_t P, Q, gcd; \n " (type_identifier) "nmod_poly_t P," (identifier) "Q" (,) "," (identifier) "g" (,) "c" (identifier) "; \n" (;) " " (declaration) "ng d, i;\n d" (type_identifier) "ng d," (identifier) "i" (,) ";" (identifier) " " (;) "d" (expression_statement) " fq_nmod_ctx_degree(field);\n\n " (assignment_expression) " fq_nmod_ctx_degree(field);\n\n" (identifier) " " (=) "q" (call_expression) "nmod_ctx_degree(field);\n\n" (identifier) "nmod_ctx_degree(fi" (argument_list) "eld);\n\n" (() "e" (identifier) "ld);\n" ()) "\n" (;) " " (comment) "We initialize the polynomials\n f" (expression_statement) "nmod_poly_init(P, field);\n f" (call_expression) "nmod_poly_init(P, field);\n " (identifier) "nmod_poly_init(P," (argument_list) " field);\n " (() " " (identifier) "f" (,) "i" (identifier) "ld);\n" ()) " " (;) "f" (expression_statement) "nmod_poly_init(Q, field);\n f" (call_expression) "nmod_poly_init(Q, field);\n " (identifier) "nmod_poly_init(Q," (argument_list) " field);\n " (() " " (identifier) "f" (,) "i" (identifier) "ld);\n" ()) " " (;) "f" (expression_statement) "nmod_poly_init(gcd, field);\n\n " (call_expression) "nmod_poly_init(gcd, field);\n\n" (identifier) "nmod_poly_init(gc" (argument_list) "d, field);\n\n" (() "d" (identifier) ", f" (,) "i" (identifier) "ld);\n" ()) "\n" (;) " " (comment) "We create a variable coef belonging to F_{p^n}\n f" (declaration) "nmod_t coef;\n f" (type_identifier) "nmod_t co" (identifier) "f;\n " (;) "f" (expression_statement) "nmod_init(coef, field);\n\n " (call_expression) "nmod_init(coef, field);\n\n" (identifier) "nmod_init(co" (argument_list) "ef, field);\n\n" (() "e" (identifier) "f, f" (,) "i" (identifier) "ld);\n" ()) "\n" (;) " " (comment) "coef = 1\n f" (expression_statement) "nmod_one(coef, field);\n\n " (call_expression) "nmod_one(coef, field);\n\n" (identifier) "nmod_one(co" (argument_list) "ef, field);\n\n" (() "e" (identifier) "f, f" (,) "i" (identifier) "ld);\n" ()) "\n" (;) " " (comment) "We set Q to X^d\n f" (expression_statement) "nmod_poly_set_coeff(Q, d, coef, field);\n\n " (call_expression) "nmod_poly_set_coeff(Q, d, coef, field);\n\n" (identifier) "nmod_poly_set_coeff(Q," (argument_list) " d, coef, field);\n\n" (() " " (identifier) "d" (,) "," (identifier) "c" (,) "o" (identifier) "f, f" (,) "i" (identifier) "ld);\n" ()) "\n" (;) " " (comment) "coef = -1\n f" (expression_statement) "nmod_neg(coef, coef, field);\n\n " (call_expression) "nmod_neg(coef, coef, field);\n\n" (identifier) "nmod_neg(co" (argument_list) "ef, coef, field);\n\n" (() "e" (identifier) "f, c" (,) "o" (identifier) "f, f" (,) "i" (identifier) "ld);\n" ()) "\n" (;) " " (comment) "We set Q to X^n - 1\n f" (expression_statement) "nmod_poly_set_coeff(Q, 0, coef, field);\n\n " (call_expression) "nmod_poly_set_coeff(Q, 0, coef, field);\n\n" (identifier) "nmod_poly_set_coeff(Q," (argument_list) " 0, coef, field);\n\n" (() " " (identifier) "0" (,) "," (number_literal) "c" (,) "o" (identifier) "f, f" (,) "i" (identifier) "ld);\n" ()) "\n" (;) " " (comment) "coef = α\n fq" (expression_statement) "mod_set(coef, elem, field);\n\n /" (call_expression) "mod_set(coef, elem, field);\n\n " (identifier) "mod_set(coe" (argument_list) "f, elem, field);\n\n " (() "f" (identifier) ", el" (,) "e" (identifier) ", fi" (,) "e" (identifier) "d);\n\n" ()) " " (;) "/" (comment) "e set P to α\n fq_" (expression_statement) "od_poly_set_coeff(P, 0, coef, field);\n\n\n /" (call_expression) "od_poly_set_coeff(P, 0, coef, field);\n\n\n " (identifier) "od_poly_set_coeff(P, 0" (argument_list) ", coef, field);\n\n\n " (() "," (identifier) " " (,) "c" (number_literal) "e" (,) "f" (identifier) " fie" (,) "l" (identifier) ");\n\n\n" ()) " " (;) "/" (comment) "d using the Frobenius homomorphism, we set P to the polynomial\n described at the beginning. */\n for" (for_statement) "i = 1; i < d; i++) {\n fq_nmod_frobenius(coef, coef, 1, field);\n fq_nmod_poly_set_coeff(P, i, coef, field);\n }\n\n //" (for) "i =" (() "1" (assignment_expression) "; i <" (identifier) ";" (=) "i" (number_literal) "<" (;) " " (binary_expression) "; i++" (identifier) ";" (<) "i" (identifier) "+" (;) ")" (update_expression) "{\n " (identifier) "{" (++) "\n " ()) " " (compound_statement) "q_nmod_frobenius(coef, coef, 1, field);\n fq_nmod_poly_set_coeff(P, i, coef, field);\n }\n\n //" ({) "q" (expression_statement) "od_frobenius(coef, coef, 1, field);\n fq" (call_expression) "od_frobenius(coef, coef, 1, field);\n f" (identifier) "od_frobenius(coef" (argument_list) ", coef, 1, field);\n f" (() "," (identifier) " coe" (,) "f" (identifier) " 1, " (,) "f" (number_literal) "e" (,) "l" (identifier) ");\n " ()) "f" (;) "q" (expression_statement) "od_poly_set_coeff(P, i, coef, field);\n }\n\n" (call_expression) "od_poly_set_coeff(P, i, coef, field);\n }\n" (identifier) "od_poly_set_coeff(P, i" (argument_list) ", coef, field);\n }\n" (() "," (identifier) " " (,) "c" (identifier) "e" (,) "f" (identifier) " fie" (,) "l" (identifier) ");\n }" ()) "\n" (;) "\n" (}) "/" (comment) " set gcd to gcd(P, Q)\n fq_" (expression_statement) "od_poly_gcd(gcd, P, Q, field);\n\n //" (call_expression) "od_poly_gcd(gcd, P, Q, field);\n\n /" (identifier) "od_poly_gcd(gcd," (argument_list) " P, Q, field);\n\n /" (() " " (identifier) "P, " (,) "Q" (identifier) " " (,) "f" (identifier) "e" (,) "l" (identifier) ");\n\n " ()) "/" (;) "/" (comment) " compute a nonzero value if gcd = 1\n int" (declaration) " = fq_nmod_poly_is_one(gcd, field);\n\n //" (primitive_type) " = " (init_declarator) "q_nmod_poly_is_one(gcd, field);\n\n /" (identifier) "q" (=) "n" (call_expression) "od_poly_is_one(gcd, field);\n\n /" (identifier) "od_poly_is_one(gcd," (argument_list) " field);\n\n /" (() " " (identifier) "fie" (,) "l" (identifier) ");\n\n " ()) "/" (;) "/" (comment) " clear the variables, except gcd that is needed\n fq_" (expression_statement) "od_poly_clear(P, field);\n fq_" (call_expression) "od_poly_clear(P, field);\n fq" (identifier) "od_poly_clear(P, f" (argument_list) "ield);\n fq" (() "i" (identifier) "e" (,) "l" (identifier) ");\n f" ()) "q" (;) "_" (expression_statement) "od_poly_clear(Q, field);\n fq_" (call_expression) "od_poly_clear(Q, field);\n fq" (identifier) "od_poly_clear(Q, f" (argument_list) "ield);\n fq" (() "i" (identifier) "e" (,) "l" (identifier) ");\n f" ()) "q" (;) "_" (expression_statement) "od_poly_clear(gcd, field);\n fq_" (call_expression) "od_poly_clear(gcd, field);\n fq" (identifier) "od_poly_clear(gcd," (argument_list) " field);\n fq" (() " " (identifier) "fie" (,) "l" (identifier) ");\n f" ()) "q" (;) "_" (expression_statement) "od_clear(coef, field);\n\n re" (call_expression) "od_clear(coef, field);\n\n r" (identifier) "od_clear(coef" (argument_list) ", field);\n\n r" (() "," (identifier) " fie" (,) "l" (identifier) ");\n\n " ()) "r" (;) "e" (return_statement) "n b;\n}\n" (return) "n b;\n}" (identifier) "" (;) "" (}) ""
307
0
{"language": "c", "success": true, "metadata": {"lines": 53, "avg_line_length": 27.85, "nodes": 153, "errors": 0, "source_hash": "c2c42c98449855489cfa178db81b6f586a47e408f812ab1c4a849210fe8f4dea", "categorized_nodes": 125}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"main.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": "\"main.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "function_definition", "text": " is_normal(const fq_nmod_t elem, const fq_nmod_ctx_t field) {\n\n\t// We create the variables\n\tfq_nmod_poly_t P, Q, gcd; \n\tslong d, i;\n\td = fq_nmod_ctx_degree(field);\n\n\t// We initialize the polynomials\n\tfq_nmod_poly_init(P, field);\n\tfq_nmod_poly_init(Q, field);\n\tfq_nmod_poly_init(gcd, field);\n\n\t// We create a variable coef belonging to F_{p^n}\n\tfq_nmod_t coef;\n\tfq_nmod_init(coef, field);\n\n\t// coef = 1\n\tfq_nmod_one(coef, field);\n\n\t// We set Q to X^d\n\tfq_nmod_poly_set_coeff(Q, d, coef, field);\n\n\t// coef = -1\n\tfq_nmod_neg(coef, coef, field);\n\n\t// We set Q to X^n - 1\n\tfq_nmod_poly_set_coeff(Q, 0, coef, field);\n\n\t// coef = \u03b1\n\tfq_nmod_set(coef, elem, field);\n\n\t// We set P to \u03b1\n\tfq_nmod_poly_set_coeff(P, 0, coef, field);\n\n\n\t/* And using the Frobenius homomorphism, we set P to the polynomial\n\t described at the beginning. */\n\tfor (i = 1; i < d; i++) {\n\t\tfq_nmod_frobenius(coef, coef, 1, field);\n\t\tfq_nmod_poly_set_coeff(P, i, coef, field);\n\t}\n\n\t// We set gcd to gcd(P, Q)\n\tfq_nmod_poly_gcd(gcd, P, Q, field);\n\n\t// We compute a nonzero value if gcd = 1\n\tint b = fq_nmod_poly_is_one(gcd, field);\n\n\t// We clear the variables, except gcd that is needed\n\tfq_nmod_poly_clear(P, field);\n\tfq_nmod_poly_clear(Q, field);\n\tfq_nmod_poly_clear(gcd, field);\n\tfq_nmod_clear(coef, field);\n\n\treturn b;\n}\n", "parent": null, "children": [4, 5], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 4, "type": "primitive_type", "text": " is", "parent": 3, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 3}}, {"id": 5, "type": "function_declarator", "text": "normal(const fq_nmod_t elem, const fq_nmod_ctx_t field) {\n", "parent": 3, "children": [6, 7], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 62}}, {"id": 6, "type": "identifier", "text": "normal(co", "parent": 5, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 13}}, {"id": 7, "type": "parameter_list", "text": "nst fq_nmod_t elem, const fq_nmod_ctx_t field) {\n", "parent": 5, "children": [8, 12], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 62}}, {"id": 8, "type": "parameter_declaration", "text": "st fq_nmod_t elem, c", "parent": 7, "children": [9, 10, 11], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 34}}, {"id": 9, "type": "type_qualifier", "text": "st fq", "parent": 8, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 19}}, {"id": 10, "type": "type_identifier", "text": "nmod_t el", "parent": 8, "children": [], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 29}}, {"id": 11, "type": "identifier", "text": "m, c", "parent": 8, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 34}}, {"id": 12, "type": "parameter_declaration", "text": "st fq_nmod_ctx_t field) {", "parent": 7, "children": [13, 14, 15], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 61}}, {"id": 13, "type": "type_qualifier", "text": "st fq", "parent": 12, "children": [], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 41}}, {"id": 14, "type": "type_identifier", "text": "nmod_ctx_t fi", "parent": 12, "children": [], "start_point": {"row": 13, "column": 42}, "end_point": {"row": 13, "column": 55}}, {"id": 15, "type": "identifier", "text": "ld) {", "parent": 12, "children": [], "start_point": {"row": 13, "column": 56}, "end_point": {"row": 13, "column": 61}}, {"id": 16, "type": "declaration", "text": "nmod_poly_t P, Q, gcd; \n\t", "parent": 3, "children": [17, 18, 19], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 26}}, {"id": 17, "type": "type_identifier", "text": "nmod_poly_t P,", "parent": 16, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 15}}, {"id": 18, "type": "identifier", "text": "Q", "parent": 16, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 17}}, {"id": 19, "type": "identifier", "text": "g", "parent": 16, "children": [], "start_point": {"row": 16, "column": 19}, "end_point": {"row": 16, "column": 20}}, {"id": 20, "type": "declaration", "text": "ng d, i;\n\td", "parent": 3, "children": [21, 22, 23], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 12}}, {"id": 21, "type": "type_identifier", "text": "ng d,", "parent": 20, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 6}}, {"id": 22, "type": "identifier", "text": "i", "parent": 20, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 8}}, {"id": 23, "type": "identifier", "text": "\t", "parent": 20, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 11}}, {"id": 24, "type": "assignment_expression", "text": " fq_nmod_ctx_degree(field);\n\n", "parent": 3, "children": [25, 26, 27], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 30}}, {"id": 25, "type": "identifier", "text": " ", "parent": 24, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 2}}, {"id": 26, "type": "=", "text": "q", "parent": 24, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 4}}, {"id": 27, "type": "call_expression", "text": "nmod_ctx_degree(field);\n\n", "parent": 24, "children": [28, 29], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 30}}, {"id": 28, "type": "identifier", "text": "nmod_ctx_degree(fi", "parent": 27, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 23}}, {"id": 29, "type": "argument_list", "text": "eld);\n\n", "parent": 27, "children": [30], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 30}}, {"id": 30, "type": "identifier", "text": "ld);\n", "parent": 29, "children": [], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 29}}, {"id": 31, "type": "call_expression", "text": "nmod_poly_init(P, field);\n\t", "parent": 3, "children": [32, 33], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 28}}, {"id": 32, "type": "identifier", "text": "nmod_poly_init(P,", "parent": 31, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 18}}, {"id": 33, "type": "argument_list", "text": " field);\n\t", "parent": 31, "children": [34, 35], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 28}}, {"id": 34, "type": "identifier", "text": "f", "parent": 33, "children": [], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 20}}, {"id": 35, "type": "identifier", "text": "ld);\n", "parent": 33, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 27}}, {"id": 36, "type": "call_expression", "text": "nmod_poly_init(Q, field);\n\t", "parent": 3, "children": [37, 38], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 28}}, {"id": 37, "type": "identifier", "text": "nmod_poly_init(Q,", "parent": 36, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 18}}, {"id": 38, "type": "argument_list", "text": " field);\n\t", "parent": 36, "children": [39, 40], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 28}}, {"id": 39, "type": "identifier", "text": "f", "parent": 38, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 20}}, {"id": 40, "type": "identifier", "text": "ld);\n", "parent": 38, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 27}}, {"id": 41, "type": "call_expression", "text": "nmod_poly_init(gcd, field);\n\n", "parent": 3, "children": [42, 43], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 30}}, {"id": 42, "type": "identifier", "text": "nmod_poly_init(gc", "parent": 41, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 18}}, {"id": 43, "type": "argument_list", "text": "d, field);\n\n", "parent": 41, "children": [44, 45], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 30}}, {"id": 44, "type": "identifier", "text": ", f", "parent": 43, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 22}}, {"id": 45, "type": "identifier", "text": "ld);\n", "parent": 43, "children": [], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 29}}, {"id": 46, "type": "declaration", "text": "nmod_t coef;\n\tf", "parent": 3, "children": [47, 48], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 16}}, {"id": 47, "type": "type_identifier", "text": "nmod_t co", "parent": 46, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 10}}, {"id": 48, "type": "identifier", "text": "f;\n\t", "parent": 46, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 15}}, {"id": 49, "type": "call_expression", "text": "nmod_init(coef, field);\n\n", "parent": 3, "children": [50, 51], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 26}}, {"id": 50, "type": "identifier", "text": "nmod_init(co", "parent": 49, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 13}}, {"id": 51, "type": "argument_list", "text": "ef, field);\n\n", "parent": 49, "children": [52, 53], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 26}}, {"id": 52, "type": "identifier", "text": "f, f", "parent": 51, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 18}}, {"id": 53, "type": "identifier", "text": "ld);\n", "parent": 51, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 25}}, {"id": 54, "type": "call_expression", "text": "nmod_one(coef, field);\n\n", "parent": 3, "children": [55, 56], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 25}}, {"id": 55, "type": "identifier", "text": "nmod_one(co", "parent": 54, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 12}}, {"id": 56, "type": "argument_list", "text": "ef, field);\n\n", "parent": 54, "children": [57, 58], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 25}}, {"id": 57, "type": "identifier", "text": "f, f", "parent": 56, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 17}}, {"id": 58, "type": "identifier", "text": "ld);\n", "parent": 56, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 24}}, {"id": 59, "type": "call_expression", "text": "nmod_poly_set_coeff(Q, d, coef, field);\n\n", "parent": 3, "children": [60, 61], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 42}}, {"id": 60, "type": "identifier", "text": "nmod_poly_set_coeff(Q,", "parent": 59, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 23}}, {"id": 61, "type": "argument_list", "text": " d, coef, field);\n\n", "parent": 59, "children": [62, 63, 64, 65], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 42}}, {"id": 62, "type": "identifier", "text": "d", "parent": 61, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 25}}, {"id": 63, "type": "identifier", "text": "c", "parent": 61, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 28}}, {"id": 64, "type": "identifier", "text": "f, f", "parent": 61, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 34}}, {"id": 65, "type": "identifier", "text": "ld);\n", "parent": 61, "children": [], "start_point": {"row": 33, "column": 36}, "end_point": {"row": 33, "column": 41}}, {"id": 66, "type": "call_expression", "text": "nmod_neg(coef, coef, field);\n\n", "parent": 3, "children": [67, 68], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 31}}, {"id": 67, "type": "identifier", "text": "nmod_neg(co", "parent": 66, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 12}}, {"id": 68, "type": "argument_list", "text": "ef, coef, field);\n\n", "parent": 66, "children": [69, 70, 71], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 31}}, {"id": 69, "type": "identifier", "text": "f, c", "parent": 68, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 17}}, {"id": 70, "type": "identifier", "text": "f, f", "parent": 68, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 23}}, {"id": 71, "type": "identifier", "text": "ld);\n", "parent": 68, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 30}}, {"id": 72, "type": "call_expression", "text": "nmod_poly_set_coeff(Q, 0, coef, field);\n\n", "parent": 3, "children": [73, 74], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 42}}, {"id": 73, "type": "identifier", "text": "nmod_poly_set_coeff(Q,", "parent": 72, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 23}}, {"id": 74, "type": "argument_list", "text": " 0, coef, field);\n\n", "parent": 72, "children": [75, 76, 77, 78], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 42}}, {"id": 75, "type": "identifier", "text": "0", "parent": 74, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 25}}, {"id": 76, "type": "number_literal", "text": "c", "parent": 74, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 28}}, {"id": 77, "type": "identifier", "text": "f, f", "parent": 74, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 34}}, {"id": 78, "type": "identifier", "text": "ld);\n", "parent": 74, "children": [], "start_point": {"row": 39, "column": 36}, "end_point": {"row": 39, "column": 41}}, {"id": 79, "type": "call_expression", "text": "mod_set(coef, elem, field);\n\n\t", "parent": 3, "children": [80, 81], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 31}}, {"id": 80, "type": "identifier", "text": "mod_set(coe", "parent": 79, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 12}}, {"id": 81, "type": "argument_list", "text": "f, elem, field);\n\n\t", "parent": 79, "children": [82, 83, 84], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 31}}, {"id": 82, "type": "identifier", "text": ", el", "parent": 81, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 17}}, {"id": 83, "type": "identifier", "text": ", fi", "parent": 81, "children": [], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 23}}, {"id": 84, "type": "identifier", "text": "d);\n\n", "parent": 81, "children": [], "start_point": {"row": 42, "column": 25}, "end_point": {"row": 42, "column": 30}}, {"id": 85, "type": "call_expression", "text": "od_poly_set_coeff(P, 0, coef, field);\n\n\n\t", "parent": 3, "children": [86, 87], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 42}}, {"id": 86, "type": "identifier", "text": "od_poly_set_coeff(P, 0", "parent": 85, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 23}}, {"id": 87, "type": "argument_list", "text": ", coef, field);\n\n\n\t", "parent": 85, "children": [88, 89, 90, 91], "start_point": {"row": 45, "column": 23}, "end_point": {"row": 45, "column": 42}}, {"id": 88, "type": "identifier", "text": " ", "parent": 87, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 25}}, {"id": 89, "type": "number_literal", "text": "e", "parent": 87, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 28}}, {"id": 90, "type": "identifier", "text": " fie", "parent": 87, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 34}}, {"id": 91, "type": "identifier", "text": ");\n\n\n", "parent": 87, "children": [], "start_point": {"row": 45, "column": 36}, "end_point": {"row": 45, "column": 41}}, {"id": 92, "type": "for_statement", "text": "i = 1; i < d; i++) {\n\t\tfq_nmod_frobenius(coef, coef, 1, field);\n\t\tfq_nmod_poly_set_coeff(P, i, coef, field);\n\t}\n\n\t//", "parent": 3, "children": [93, 96], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 53, "column": 2}}, {"id": 93, "type": "assignment_expression", "text": "; i <", "parent": 92, "children": [94, 95], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 11}}, {"id": 94, "type": "=", "text": "i", "parent": 93, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 9}}, {"id": 95, "type": "number_literal", "text": "<", "parent": 93, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 11}}, {"id": 96, "type": "binary_expression", "text": "; i++", "parent": 92, "children": [97, 98], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 18}}, {"id": 97, "type": "<", "text": "i", "parent": 96, "children": [], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 16}}, {"id": 98, "type": "identifier", "text": "+", "parent": 96, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 18}}, {"id": 99, "type": "++", "text": "\n\t", "parent": 92, "children": [], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 23}}, {"id": 100, "type": "call_expression", "text": "od_frobenius(coef, coef, 1, field);\n\t\tf", "parent": 92, "children": [101, 102], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 41}}, {"id": 101, "type": "identifier", "text": "od_frobenius(coef", "parent": 100, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 19}}, {"id": 102, "type": "argument_list", "text": ", coef, 1, field);\n\t\tf", "parent": 100, "children": [103, 104, 105, 106], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 41}}, {"id": 103, "type": "identifier", "text": " coe", "parent": 102, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 24}}, {"id": 104, "type": "identifier", "text": " 1, ", "parent": 102, "children": [], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 30}}, {"id": 105, "type": "number_literal", "text": "e", "parent": 102, "children": [], "start_point": {"row": 51, "column": 32}, "end_point": {"row": 51, "column": 33}}, {"id": 106, "type": "identifier", "text": ");\n\t\t", "parent": 102, "children": [], "start_point": {"row": 51, "column": 35}, "end_point": {"row": 51, "column": 40}}, {"id": 107, "type": "call_expression", "text": "od_poly_set_coeff(P, i, coef, field);\n\t}\n", "parent": 92, "children": [108, 109], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 43}}, {"id": 108, "type": "identifier", "text": "od_poly_set_coeff(P, i", "parent": 107, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 24}}, {"id": 109, "type": "argument_list", "text": ", coef, field);\n\t}\n", "parent": 107, "children": [110, 111, 112, 113], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 43}}, {"id": 110, "type": "identifier", "text": " ", "parent": 109, "children": [], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 26}}, {"id": 111, "type": "identifier", "text": "e", "parent": 109, "children": [], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 29}}, {"id": 112, "type": "identifier", "text": " fie", "parent": 109, "children": [], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 35}}, {"id": 113, "type": "identifier", "text": ");\n\t}", "parent": 109, "children": [], "start_point": {"row": 52, "column": 37}, "end_point": {"row": 52, "column": 42}}, {"id": 114, "type": "call_expression", "text": "od_poly_gcd(gcd, P, Q, field);\n\n\t/", "parent": 3, "children": [115, 116], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 35}}, {"id": 115, "type": "identifier", "text": "od_poly_gcd(gcd,", "parent": 114, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 17}}, {"id": 116, "type": "argument_list", "text": " P, Q, field);\n\n\t/", "parent": 114, "children": [117, 118, 119, 120], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 35}}, {"id": 117, "type": "identifier", "text": "P, ", "parent": 116, "children": [], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 21}}, {"id": 118, "type": "identifier", "text": " ", "parent": 116, "children": [], "start_point": {"row": 56, "column": 23}, "end_point": {"row": 56, "column": 24}}, {"id": 119, "type": "identifier", "text": "e", "parent": 116, "children": [], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 27}}, {"id": 120, "type": "identifier", "text": ");\n\n\t", "parent": 116, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 34}}, {"id": 121, "type": "declaration", "text": " = fq_nmod_poly_is_one(gcd, field);\n\n\t//", "parent": 3, "children": [122, 123], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 41}}, {"id": 122, "type": "primitive_type", "text": " = ", "parent": 121, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 4}}, {"id": 123, "type": "init_declarator", "text": "q_nmod_poly_is_one(gcd, field);\n\n\t/", "parent": 121, "children": [124, 125, 126], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 40}}, {"id": 124, "type": "identifier", "text": "q", "parent": 123, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 6}}, {"id": 125, "type": "=", "text": "n", "parent": 123, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 8}}, {"id": 126, "type": "call_expression", "text": "od_poly_is_one(gcd, field);\n\n\t/", "parent": 123, "children": [127, 128], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 40}}, {"id": 127, "type": "identifier", "text": "od_poly_is_one(gcd,", "parent": 126, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 28}}, {"id": 128, "type": "argument_list", "text": " field);\n\n\t/", "parent": 126, "children": [129, 130], "start_point": {"row": 59, "column": 28}, "end_point": {"row": 59, "column": 40}}, {"id": 129, "type": "identifier", "text": "fie", "parent": 128, "children": [], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 32}}, {"id": 130, "type": "identifier", "text": ");\n\n\t", "parent": 128, "children": [], "start_point": {"row": 59, "column": 34}, "end_point": {"row": 59, "column": 39}}, {"id": 131, "type": "call_expression", "text": "od_poly_clear(P, field);\n\tfq", "parent": 3, "children": [132, 133], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 29}}, {"id": 132, "type": "identifier", "text": "od_poly_clear(P, f", "parent": 131, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 19}}, {"id": 133, "type": "argument_list", "text": "ield);\n\tfq", "parent": 131, "children": [134, 135], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 29}}, {"id": 134, "type": "identifier", "text": "e", "parent": 133, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 21}}, {"id": 135, "type": "identifier", "text": ");\n\tf", "parent": 133, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 28}}, {"id": 136, "type": "call_expression", "text": "od_poly_clear(Q, field);\n\tfq", "parent": 3, "children": [137, 138], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 29}}, {"id": 137, "type": "identifier", "text": "od_poly_clear(Q, f", "parent": 136, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 19}}, {"id": 138, "type": "argument_list", "text": "ield);\n\tfq", "parent": 136, "children": [139, 140], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 29}}, {"id": 139, "type": "identifier", "text": "e", "parent": 138, "children": [], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 21}}, {"id": 140, "type": "identifier", "text": ");\n\tf", "parent": 138, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 28}}, {"id": 141, "type": "call_expression", "text": "od_poly_clear(gcd, field);\n\tfq", "parent": 3, "children": [142, 143], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 31}}, {"id": 142, "type": "identifier", "text": "od_poly_clear(gcd,", "parent": 141, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 19}}, {"id": 143, "type": "argument_list", "text": " field);\n\tfq", "parent": 141, "children": [144, 145], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 31}}, {"id": 144, "type": "identifier", "text": "fie", "parent": 143, "children": [], "start_point": {"row": 64, "column": 20}, "end_point": {"row": 64, "column": 23}}, {"id": 145, "type": "identifier", "text": ");\n\tf", "parent": 143, "children": [], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 30}}, {"id": 146, "type": "call_expression", "text": "od_clear(coef, field);\n\n\tr", "parent": 3, "children": [147, 148], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 27}}, {"id": 147, "type": "identifier", "text": "od_clear(coef", "parent": 146, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 14}}, {"id": 148, "type": "argument_list", "text": ", field);\n\n\tr", "parent": 146, "children": [149, 150], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 27}}, {"id": 149, "type": "identifier", "text": " fie", "parent": 148, "children": [], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 19}}, {"id": 150, "type": "identifier", "text": ");\n\n\t", "parent": 148, "children": [], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 26}}, {"id": 151, "type": "return_statement", "text": "n b;\n}\n", "parent": 3, "children": [152], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 10}}, {"id": 152, "type": "identifier", "text": "", "parent": 151, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 9}}]}, "node_categories": {"declarations": {"functions": [3, 5], "variables": [8, 12, 16, 20, 46, 121], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [27, 31, 36, 41, 49, 54, 59, 66, 72, 79, 85, 96, 100, 107, 114, 126, 131, 136, 141, 146], "assignments": [24, 93], "loops": [92], "conditionals": [6, 9, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 28, 30, 32, 34, 35, 37, 39, 40, 42, 44, 45, 47, 48, 50, 52, 53, 55, 57, 58, 60, 62, 63, 64, 65, 67, 69, 70, 71, 73, 75, 77, 78, 80, 82, 83, 84, 86, 88, 90, 91, 98, 101, 103, 104, 106, 108, 110, 111, 112, 113, 115, 117, 118, 119, 120, 124, 127, 129, 130, 132, 134, 135, 137, 139, 140, 142, 144, 145, 147, 149, 150, 152], "returns": [151], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 76, 89, 95, 105], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "b", "text_snippet": " is_normal(const fq_nmod_t elem, const fq_nmod_ctx_t field) {\n\n\t// We create the variables\n\tfq_nmod_"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "normal(const fq_nmod_t elem, const fq_nmod_ctx_t field) {\n"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"main.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include \"main.h\"\n\n/*\n * Test if the element \u03b1 is normal in F_{p^d}/F_p. \n *\n * For that purpose, we will check if Q = X^d - 1 and\n * P are relatively primes. P is a polynomial that\n * depends only on \u03b1.\n *\n * P = \\sum_{i=0}^{d-1} \u03b1^{p^{i-1}}X^i\n *\n */\n\nint is_normal(const fq_nmod_t elem, const fq_nmod_ctx_t field) {\n\n\t// We create the variables\n\tfq_nmod_poly_t P, Q, gcd; \n\tslong d, i;\n\td = fq_nmod_ctx_degree(field);\n\n\t// We initialize the polynomials\n\tfq_nmod_poly_init(P, field);\n\tfq_nmod_poly_init(Q, field);\n\tfq_nmod_poly_init(gcd, field);\n\n\t// We create a variable coef belonging to F_{p^n}\n\tfq_nmod_t coef;\n\tfq_nmod_init(coef, field);\n\n\t// coef = 1\n\tfq_nmod_one(coef, field);\n\n\t// We set Q to X^d\n\tfq_nmod_poly_set_coeff(Q, d, coef, field);\n\n\t// coef = -1\n\tfq_nmod_neg(coef, coef, field);\n\n\t// We set Q to X^n - 1\n\tfq_nmod_poly_set_coeff(Q, 0, coef, field);\n\n\t// coef = \u03b1\n\tfq_nmod_set(coef, elem, field);\n\n\t// We set P to \u03b1\n\tfq_nmod_poly_set_coeff(P, 0, coef, field);\n\n\n\t/* And using the Frobenius homomorphism, we set P to the polynomial\n\t described at the beginning. */\n\tfor (i = 1; i < d; i++) {\n\t\tfq_nmod_frobenius(coef, coef, 1, field);\n\t\tfq_nmod_poly_set_coeff(P, i, coef, field);\n\t}\n\n\t// We set gcd to gcd(P, Q)\n\tfq_nmod_poly_gcd(gcd, P, Q, field);\n\n\t// We compute a nonzero value if gcd = 1\n\tint b = fq_nmod_poly_is_one(gcd, field);\n\n\t// We clear the variables, except gcd that is needed\n\tfq_nmod_poly_clear(P, field);\n\tfq_nmod_poly_clear(Q, field);\n\tfq_nmod_poly_clear(gcd, field);\n\tfq_nmod_clear(coef, field);\n\n\treturn b;\n}\n"}
80,909
c
#ifndef W2C2_LEB128_TEST_H #define W2C2_LEB128_TEST_H void testReadU32LEB128(void); void testReadI32LEB128(void); #endif /* W2C2_LEB128_TEST_H */
19.86
7
(translation_unit) "#ifndef W2C2_LEB128_TEST_H\n#define W2C2_LEB128_TEST_H\n\nvoid\ntestReadU32LEB128(void);\n\nvoid\ntestReadI32LEB128(void);\n\n#endif /* W2C2_LEB128_TEST_H */\n" (preproc_ifdef) "#ifndef W2C2_LEB128_TEST_H\n#define W2C2_LEB128_TEST_H\n\nvoid\ntestReadU32LEB128(void);\n\nvoid\ntestReadI32LEB128(void);\n\n#endif" (#ifndef) "#ifndef" (identifier) "W2C2_LEB128_TEST_H" (preproc_def) "#define W2C2_LEB128_TEST_H\n" (#define) "#define" (identifier) "W2C2_LEB128_TEST_H" (declaration) "void\ntestReadU32LEB128(void);" (primitive_type) "void" (function_declarator) "testReadU32LEB128(void)" (identifier) "testReadU32LEB128" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void\ntestReadI32LEB128(void);" (primitive_type) "void" (function_declarator) "testReadI32LEB128(void)" (identifier) "testReadI32LEB128" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* W2C2_LEB128_TEST_H */"
29
0
{"language": "c", "success": true, "metadata": {"lines": 7, "avg_line_length": 19.86, "nodes": 21, "errors": 0, "source_hash": "1298cf8754cefc92a20b6863cd79214b9623abbebb531c1917c7df36cee187f5", "categorized_nodes": 13}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef W2C2_LEB128_TEST_H\n#define W2C2_LEB128_TEST_H\n\nvoid\ntestReadU32LEB128(void);\n\nvoid\ntestReadI32LEB128(void);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 13, 20], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 9, "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": "W2C2_LEB128_TEST_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define W2C2_LEB128_TEST_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": "W2C2_LEB128_TEST_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 26}}, {"id": 6, "type": "declaration", "text": "void\ntestReadU32LEB128(void);", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 24}}, {"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": "testReadU32LEB128(void)", "parent": 6, "children": [9, 10], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 23}}, {"id": 9, "type": "identifier", "text": "testReadU32LEB128", "parent": 8, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 17}}, {"id": 10, "type": "parameter_list", "text": "(void)", "parent": 8, "children": [11], "start_point": {"row": 4, "column": 17}, "end_point": {"row": 4, "column": 23}}, {"id": 11, "type": "parameter_declaration", "text": "void", "parent": 10, "children": [12], "start_point": {"row": 4, "column": 18}, "end_point": {"row": 4, "column": 22}}, {"id": 12, "type": "primitive_type", "text": "void", "parent": 11, "children": [], "start_point": {"row": 4, "column": 18}, "end_point": {"row": 4, "column": 22}}, {"id": 13, "type": "declaration", "text": "void\ntestReadI32LEB128(void);", "parent": 0, "children": [14, 15], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 24}}, {"id": 14, "type": "primitive_type", "text": "void", "parent": 13, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 4}}, {"id": 15, "type": "function_declarator", "text": "testReadI32LEB128(void)", "parent": 13, "children": [16, 17], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 23}}, {"id": 16, "type": "identifier", "text": "testReadI32LEB128", "parent": 15, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 17}}, {"id": 17, "type": "parameter_list", "text": "(void)", "parent": 15, "children": [18], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 23}}, {"id": 18, "type": "parameter_declaration", "text": "void", "parent": 17, "children": [19], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 22}}, {"id": 19, "type": "primitive_type", "text": "void", "parent": 18, "children": [], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 22}}, {"id": 20, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}]}, "node_categories": {"declarations": {"functions": [8, 15], "variables": [6, 11, 13, 18], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 16, 20], "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": "testReadU32LEB128(void)"}, {"node_id": 15, "universal_type": "function", "name": "unknown", "text_snippet": "testReadI32LEB128(void)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "#ifndef W2C2_LEB128_TEST_H\n#define W2C2_LEB128_TEST_H\n\nvoid\ntestReadU32LEB128(void);\n\nvoid\ntestReadI32LEB128(void);\n\n#endif /* W2C2_LEB128_TEST_H */\n"}
80,910
c
// // EETabBarController.h // iOSBlogReader // // Created by everettjf on 16/4/27. // Copyright © 2016年 everettjf. All rights reserved. // #import <UIKit/UIKit.h> @interface EETabBarController : UITabBarController @end
21.3
10
(translation_unit) "//\n// EETabBarController.h\n// iOSBlogReader\n//\n// Created by everettjf on 16/4/27.\n// Copyright © 2016年 everettjf. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface EETabBarController : UITabBarController\n\n@end\n" (comment) "//" (comment) "// EETabBarController.h" (comment) "// iOSBlogReader" (comment) "//" (comment) "// Created by everettjf on 16/4/27." (comment) "// Copyright © 2016年 everettjf. All rights reserved.\n//" (comment) "\n#" (preproc_call) "port <UIKit/UIKit.h>\n\n@i" (preproc_directive) "port <U" (preproc_arg) "Kit/UIKit.h>\n\n@" (ERROR) "terface EETabBarController : UITabBarController\n\n@end\n" (ERROR) "t" (type_identifier) "erface EE" (identifier) "abBarController : " (:) "I" (identifier) "abBarController\n\n@" (ERROR) "d" (identifier) "\n"
19
3
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 21.3, "nodes": 10, "errors": 0, "source_hash": "555830ddd74560725ff4225f6b39c8d6bd57154229fb6cb3c918fdad86d59977", "categorized_nodes": 5}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port <UIKit/UIKit.h>\n\n@i", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "port <U", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "Kit/UIKit.h>\n\n@", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "terface EETabBarController : UITabBarController\n\n@end\n", "parent": null, "children": [4, 5, 6, 7, 8, 9], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 4}}, {"id": 4, "type": "ERROR", "text": "t", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "erface EE", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "identifier", "text": "abBarController : ", "parent": 3, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 29}}, {"id": 7, "type": "identifier", "text": "abBarController\n\n@", "parent": 3, "children": [], "start_point": {"row": 10, "column": 32}, "end_point": {"row": 10, "column": 50}}, {"id": 8, "type": "ERROR", "text": "d", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 9, "type": "identifier", "text": "\n", "parent": 3, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 6, 7, 9], "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// EETabBarController.h\n// iOSBlogReader\n//\n// Created by everettjf on 16/4/27.\n// Copyright \u00a9 2016\u5e74 everettjf. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface EETabBarController : UITabBarController\n\n@end\n"}
80,911
c
#pragma once class Heap { private: vector<Node*> heap; public: Heap(); ~Heap(); void Insert(Node* node); void UpdateUpper(); Node* DeleteRoot(); void UpdateLower(); void Swap(int n1, int n2); void Clear() { heap.clear(); } bool Empty() { return heap.empty(); } };
16.12
16
(translation_unit) "#pragma once\n\nclass Heap\n{\nprivate:\n vector<Node*> heap;\n\npublic:\n Heap();\n ~Heap();\n\n void Insert(Node* node);\n void UpdateUpper();\n\n Node* DeleteRoot();\n void UpdateLower();\n\n void Swap(int n1, int n2);\n\n void Clear() { heap.clear(); }\n bool Empty() { return heap.empty(); }\n};" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (function_definition) "class Heap\n{\nprivate:\n vector<Node*> heap;\n\npublic:\n Heap();\n ~Heap();\n\n void Insert(Node* node);\n void UpdateUpper();\n\n Node* DeleteRoot();\n void UpdateLower();\n\n void Swap(int n1, int n2);\n\n void Clear() { heap.clear(); }\n bool Empty() { return heap.empty(); }\n}" (type_identifier) "class" (identifier) "Heap" (compound_statement) "{\nprivate:\n vector<Node*> heap;\n\npublic:\n Heap();\n ~Heap();\n\n void Insert(Node* node);\n void UpdateUpper();\n\n Node* DeleteRoot();\n void UpdateLower();\n\n void Swap(int n1, int n2);\n\n void Clear() { heap.clear(); }\n bool Empty() { return heap.empty(); }\n}" ({) "{" (labeled_statement) "private:\n vector<Node*> heap;" (statement_identifier) "private" (:) ":" (expression_statement) "vector<Node*> heap;" (binary_expression) "vector<Node*> heap" (binary_expression) "vector<Node" (identifier) "vector" (<) "<" (identifier) "Node" (ERROR) "*" (*) "*" (>) ">" (identifier) "heap" (;) ";" (labeled_statement) "public:\n Heap();" (statement_identifier) "public" (:) ":" (expression_statement) "Heap();" (call_expression) "Heap()" (identifier) "Heap" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "~Heap();" (unary_expression) "~Heap()" (~) "~" (call_expression) "Heap()" (identifier) "Heap" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void Insert(Node* node);" (primitive_type) "void" (function_declarator) "Insert(Node* node)" (identifier) "Insert" (parameter_list) "(Node* node)" (() "(" (parameter_declaration) "Node* node" (type_identifier) "Node" (pointer_declarator) "* node" (*) "*" (identifier) "node" ()) ")" (;) ";" (declaration) "void UpdateUpper();" (primitive_type) "void" (function_declarator) "UpdateUpper()" (identifier) "UpdateUpper" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "Node* DeleteRoot();" (type_identifier) "Node" (pointer_declarator) "* DeleteRoot()" (*) "*" (function_declarator) "DeleteRoot()" (identifier) "DeleteRoot" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void UpdateLower();" (primitive_type) "void" (function_declarator) "UpdateLower()" (identifier) "UpdateLower" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void Swap(int n1, int n2);" (primitive_type) "void" (function_declarator) "Swap(int n1, int n2)" (identifier) "Swap" (parameter_list) "(int n1, int n2)" (() "(" (parameter_declaration) "int n1" (primitive_type) "int" (identifier) "n1" (,) "," (parameter_declaration) "int n2" (primitive_type) "int" (identifier) "n2" ()) ")" (;) ";" (function_definition) "void Clear() { heap.clear(); }" (primitive_type) "void" (function_declarator) "Clear()" (identifier) "Clear" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ heap.clear(); }" ({) "{" (expression_statement) "heap.clear();" (call_expression) "heap.clear()" (field_expression) "heap.clear" (identifier) "heap" (.) "." (field_identifier) "clear" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "bool Empty() { return heap.empty(); }" (primitive_type) "bool" (function_declarator) "Empty()" (identifier) "Empty" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return heap.empty(); }" ({) "{" (return_statement) "return heap.empty();" (return) "return" (call_expression) "heap.empty()" (field_expression) "heap.empty" (identifier) "heap" (.) "." (field_identifier) "empty" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";"
140
1
{"language": "c", "success": true, "metadata": {"lines": 16, "avg_line_length": 16.12, "nodes": 83, "errors": 0, "source_hash": "e08f767a267c91f9177dd7c0a2f1a1ebc878677097c844f939abc9d21f80fa54", "categorized_nodes": 51}, "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": "class Heap\n{\nprivate:\n\tvector<Node*> heap;\n\npublic:\n\tHeap();\n\t~Heap();\n\n\tvoid Insert(Node* node);\n\tvoid UpdateUpper();\n\n\tNode* DeleteRoot();\n\tvoid UpdateLower();\n\n\tvoid Swap(int n1, int n2);\n\n\tvoid Clear() { heap.clear(); }\n\tbool Empty() { return heap.empty(); }\n}", "parent": null, "children": [4], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 4, "type": "identifier", "text": "Heap", "parent": 3, "children": [], "start_point": {"row": 2, "column": 6}, "end_point": {"row": 2, "column": 10}}, {"id": 5, "type": "labeled_statement", "text": "private:\n\tvector<Node*> heap;", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 20}}, {"id": 6, "type": "binary_expression", "text": "vector<Node*> heap", "parent": 5, "children": [7, 11, 13, 14], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 19}}, {"id": 7, "type": "binary_expression", "text": "vector<Node", "parent": 6, "children": [8, 9, 10], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 12}}, {"id": 8, "type": "identifier", "text": "vector", "parent": 7, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 7}}, {"id": 9, "type": "<", "text": "<", "parent": 7, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 8}}, {"id": 10, "type": "identifier", "text": "Node", "parent": 7, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 12}}, {"id": 11, "type": "ERROR", "text": "*", "parent": 6, "children": [12], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 13}}, {"id": 12, "type": "*", "text": "*", "parent": 11, "children": [], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 13}}, {"id": 13, "type": ">", "text": ">", "parent": 6, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 14}}, {"id": 14, "type": "identifier", "text": "heap", "parent": 6, "children": [], "start_point": {"row": 5, "column": 15}, "end_point": {"row": 5, "column": 19}}, {"id": 15, "type": "labeled_statement", "text": "public:\n\tHeap();", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 16, "type": "call_expression", "text": "Heap()", "parent": 15, "children": [17, 18], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 7}}, {"id": 17, "type": "identifier", "text": "Heap", "parent": 16, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 5}}, {"id": 18, "type": "argument_list", "text": "()", "parent": 16, "children": [], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 7}}, {"id": 19, "type": "unary_expression", "text": "~Heap()", "parent": 3, "children": [20, 21], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 8}}, {"id": 20, "type": "~", "text": "~", "parent": 19, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 2}}, {"id": 21, "type": "call_expression", "text": "Heap()", "parent": 19, "children": [22, 23], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 8}}, {"id": 22, "type": "identifier", "text": "Heap", "parent": 21, "children": [], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 6}}, {"id": 23, "type": "argument_list", "text": "()", "parent": 21, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 8}}, {"id": 24, "type": "declaration", "text": "void Insert(Node* node);", "parent": 3, "children": [25, 26], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 25}}, {"id": 25, "type": "primitive_type", "text": "void", "parent": 24, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 5}}, {"id": 26, "type": "function_declarator", "text": "Insert(Node* node)", "parent": 24, "children": [27, 28], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 24}}, {"id": 27, "type": "identifier", "text": "Insert", "parent": 26, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 12}}, {"id": 28, "type": "parameter_list", "text": "(Node* node)", "parent": 26, "children": [29], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 24}}, {"id": 29, "type": "parameter_declaration", "text": "Node* node", "parent": 28, "children": [30, 31], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 23}}, {"id": 30, "type": "type_identifier", "text": "Node", "parent": 29, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 17}}, {"id": 31, "type": "pointer_declarator", "text": "* node", "parent": 29, "children": [32, 33], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 23}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 18}}, {"id": 33, "type": "identifier", "text": "node", "parent": 31, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 23}}, {"id": 34, "type": "declaration", "text": "void UpdateUpper();", "parent": 3, "children": [35, 36], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 20}}, {"id": 35, "type": "primitive_type", "text": "void", "parent": 34, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 5}}, {"id": 36, "type": "function_declarator", "text": "UpdateUpper()", "parent": 34, "children": [37, 38], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 19}}, {"id": 37, "type": "identifier", "text": "UpdateUpper", "parent": 36, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 17}}, {"id": 38, "type": "parameter_list", "text": "()", "parent": 36, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 19}}, {"id": 39, "type": "declaration", "text": "Node* DeleteRoot();", "parent": 3, "children": [40, 41], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 20}}, {"id": 40, "type": "type_identifier", "text": "Node", "parent": 39, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 5}}, {"id": 41, "type": "pointer_declarator", "text": "* DeleteRoot()", "parent": 39, "children": [42, 43], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 19}}, {"id": 42, "type": "*", "text": "*", "parent": 41, "children": [], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 6}}, {"id": 43, "type": "function_declarator", "text": "DeleteRoot()", "parent": 41, "children": [44, 45], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 19}}, {"id": 44, "type": "identifier", "text": "DeleteRoot", "parent": 43, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 17}}, {"id": 45, "type": "parameter_list", "text": "()", "parent": 43, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 19}}, {"id": 46, "type": "declaration", "text": "void UpdateLower();", "parent": 3, "children": [47, 48], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 20}}, {"id": 47, "type": "primitive_type", "text": "void", "parent": 46, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 5}}, {"id": 48, "type": "function_declarator", "text": "UpdateLower()", "parent": 46, "children": [49, 50], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 19}}, {"id": 49, "type": "identifier", "text": "UpdateLower", "parent": 48, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 17}}, {"id": 50, "type": "parameter_list", "text": "()", "parent": 48, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 19}}, {"id": 51, "type": "declaration", "text": "void Swap(int n1, int n2);", "parent": 3, "children": [52, 53], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 27}}, {"id": 52, "type": "primitive_type", "text": "void", "parent": 51, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 5}}, {"id": 53, "type": "function_declarator", "text": "Swap(int n1, int n2)", "parent": 51, "children": [54, 55], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 26}}, {"id": 54, "type": "identifier", "text": "Swap", "parent": 53, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 10}}, {"id": 55, "type": "parameter_list", "text": "(int n1, int n2)", "parent": 53, "children": [56, 59], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 26}}, {"id": 56, "type": "parameter_declaration", "text": "int n1", "parent": 55, "children": [57, 58], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 17}}, {"id": 57, "type": "primitive_type", "text": "int", "parent": 56, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 14}}, {"id": 58, "type": "identifier", "text": "n1", "parent": 56, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 17}}, {"id": 59, "type": "parameter_declaration", "text": "int n2", "parent": 55, "children": [60, 61], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 25}}, {"id": 60, "type": "primitive_type", "text": "int", "parent": 59, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 22}}, {"id": 61, "type": "identifier", "text": "n2", "parent": 59, "children": [], "start_point": {"row": 17, "column": 23}, "end_point": {"row": 17, "column": 25}}, {"id": 62, "type": "function_definition", "text": "void Clear() { heap.clear(); }", "parent": 3, "children": [63, 64], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 31}}, {"id": 63, "type": "primitive_type", "text": "void", "parent": 62, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 5}}, {"id": 64, "type": "function_declarator", "text": "Clear()", "parent": 62, "children": [65, 66], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 13}}, {"id": 65, "type": "identifier", "text": "Clear", "parent": 64, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 11}}, {"id": 66, "type": "parameter_list", "text": "()", "parent": 64, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 13}}, {"id": 67, "type": "call_expression", "text": "heap.clear()", "parent": 62, "children": [68, 71], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 28}}, {"id": 68, "type": "field_expression", "text": "heap.clear", "parent": 67, "children": [69, 70], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 26}}, {"id": 69, "type": "identifier", "text": "heap", "parent": 68, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 20}}, {"id": 70, "type": "field_identifier", "text": "clear", "parent": 68, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 26}}, {"id": 71, "type": "argument_list", "text": "()", "parent": 67, "children": [], "start_point": {"row": 19, "column": 26}, "end_point": {"row": 19, "column": 28}}, {"id": 72, "type": "function_definition", "text": "bool Empty() { return heap.empty(); }", "parent": 3, "children": [73, 74], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 38}}, {"id": 73, "type": "primitive_type", "text": "bool", "parent": 72, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 5}}, {"id": 74, "type": "function_declarator", "text": "Empty()", "parent": 72, "children": [75, 76], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 13}}, {"id": 75, "type": "identifier", "text": "Empty", "parent": 74, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 11}}, {"id": 76, "type": "parameter_list", "text": "()", "parent": 74, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 13}}, {"id": 77, "type": "return_statement", "text": "return heap.empty();", "parent": 72, "children": [78], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 36}}, {"id": 78, "type": "call_expression", "text": "heap.empty()", "parent": 77, "children": [79, 82], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 35}}, {"id": 79, "type": "field_expression", "text": "heap.empty", "parent": 78, "children": [80, 81], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 33}}, {"id": 80, "type": "identifier", "text": "heap", "parent": 79, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 27}}, {"id": 81, "type": "field_identifier", "text": "empty", "parent": 79, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 33}}, {"id": 82, "type": "argument_list", "text": "()", "parent": 78, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 35}}]}, "node_categories": {"declarations": {"functions": [3, 26, 36, 43, 48, 53, 62, 64, 72, 74], "variables": [24, 29, 34, 39, 46, 51, 56, 59], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [6, 7, 16, 19, 21, 67, 68, 78, 79], "assignments": [], "loops": [], "conditionals": [4, 8, 10, 14, 17, 22, 27, 30, 33, 37, 40, 44, 49, 54, 58, 61, 65, 69, 70, 75, 80, 81], "returns": [77], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "Heap", "text_snippet": "class Heap\n{\nprivate:\n\tvector<Node*> heap;\n\npublic:\n\tHeap();\n\t~Heap();\n\n\tvoid Insert(Node* node);\n\tv"}, {"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "Insert(Node* node)"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "UpdateUpper()"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "DeleteRoot()"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "UpdateLower()"}, {"node_id": 53, "universal_type": "function", "name": "n2)", "text_snippet": "Swap(int n1, int n2)"}, {"node_id": 62, "universal_type": "function", "name": "Clear", "text_snippet": "void Clear() { heap.clear(); }"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "Clear()"}, {"node_id": 72, "universal_type": "function", "name": "Empty", "text_snippet": "bool Empty() { return heap.empty(); }"}, {"node_id": 74, "universal_type": "function", "name": "unknown", "text_snippet": "Empty()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "#pragma once\n\nclass Heap\n{\nprivate:\n\tvector<Node*> heap;\n\npublic:\n\tHeap();\n\t~Heap();\n\n\tvoid Insert(Node* node);\n\tvoid UpdateUpper();\n\n\tNode* DeleteRoot();\n\tvoid UpdateLower();\n\n\tvoid Swap(int n1, int n2);\n\n\tvoid Clear() { heap.clear(); }\n\tbool Empty() { return heap.empty(); }\n};"}
80,912
c
// // SettingSliderCell.h // SettingsSample // // Created by <NAME> on 27.01.17. // Copyright 2017 <NAME>. All rights reserved. // #import "SettingTitleCell.h" @interface SettingSliderCell : SettingTitleCell @property (nonatomic, weak) IBOutlet UILabel *maxLabel; @property (nonatomic, weak) IBOutlet UILabel *minLabel; @property (nonatomic, weak) IBOutlet UISlider *slider; @end
28.54
13
(translation_unit) "//\n// SettingSliderCell.h\n// SettingsSample\n//\n// Created by <NAME> on 27.01.17.\n// Copyright 2017 <NAME>. All rights reserved.\n//\n\n#import "SettingTitleCell.h"\n\n@interface SettingSliderCell : SettingTitleCell\n\n@property (nonatomic, weak) IBOutlet UILabel *maxLabel;\n@property (nonatomic, weak) IBOutlet UILabel *minLabel;\n@property (nonatomic, weak) IBOutlet UISlider *slider;\n\n@end\n" (comment) "//" (comment) "// SettingSliderCell.h" (comment) "// SettingsSample" (comment) "//" (comment) "// Created by <NAME> on 27.01.17." (comment) "// Copyright 2017 <NAME>. All rights reserved." (comment) "//" (preproc_call) "#import "SettingTitleCell.h"\n" (preproc_directive) "#import" (preproc_arg) ""SettingTitleCell.h"" (ERROR) "@interface SettingSliderCell : SettingTitleCell\n\n@property (nonatomic, weak) IBOutlet UILabel *maxLabel;\n@property (nonatomic, weak) IBOutlet UILabel *minLabel;\n@property (nonatomic, weak) IBOutlet UISlider *slider;\n\n@end" (ERROR) "@" (type_identifier) "interface" (function_declarator) "SettingSliderCell : SettingTitleCell\n\n@property (nonatomic, weak)" (identifier) "SettingSliderCell" (ERROR) ": SettingTitleCell\n\n@property" (:) ":" (identifier) "SettingTitleCell" (ERROR) "@" (identifier) "property" (parameter_list) "(nonatomic, weak)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "weak" ()) ")" (declaration) "IBOutlet UILabel *maxLabel;" (type_identifier) "IBOutlet" (ERROR) "UILabel" (identifier) "UILabel" (pointer_declarator) "*maxLabel" (*) "*" (identifier) "maxLabel" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "property (nonatomic, weak) IBOutlet" (macro_type_specifier) "property (nonatomic, weak)" (identifier) "property" (() "(" (type_descriptor) "nonatomic" (type_identifier) "nonatomic" (ERROR) ", weak" (,) "," (identifier) "weak" ()) ")" (identifier) "IBOutlet" (;) "" (declaration) "UILabel *minLabel;" (type_identifier) "UILabel" (pointer_declarator) "*minLabel" (*) "*" (identifier) "minLabel" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "property (nonatomic, weak) IBOutlet" (macro_type_specifier) "property (nonatomic, weak)" (identifier) "property" (() "(" (type_descriptor) "nonatomic" (type_identifier) "nonatomic" (ERROR) ", weak" (,) "," (identifier) "weak" ()) ")" (identifier) "IBOutlet" (;) "" (declaration) "UISlider *slider;" (type_identifier) "UISlider" (pointer_declarator) "*slider" (*) "*" (identifier) "slider" (;) ";" (ERROR) "@" (ERROR) "@" (identifier) "end"
78
13
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 28.54, "nodes": 54, "errors": 0, "source_hash": "0d6c8b5dd2c77f3b64a5405f8fb27eea317f27de2f7f5dd68b46a97d58bd7109", "categorized_nodes": 30}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import \"SettingTitleCell.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": "\"SettingTitleCell.h\"", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 28}}, {"id": 3, "type": "ERROR", "text": "@interface SettingSliderCell : SettingTitleCell\n\n@property (nonatomic, weak) IBOutlet UILabel *maxLabel;\n@property (nonatomic, weak) IBOutlet UILabel *minLabel;\n@property (nonatomic, weak) IBOutlet UISlider *slider;\n\n@end", "parent": null, "children": [4, 5, 6, 15, 22, 24, 32, 37, 39, 47, 52], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 16, "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": "function_declarator", "text": "SettingSliderCell : SettingTitleCell\n\n@property (nonatomic, weak)", "parent": 3, "children": [7, 8, 12], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 12, "column": 27}}, {"id": 7, "type": "identifier", "text": "SettingSliderCell", "parent": 6, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 28}}, {"id": 8, "type": "ERROR", "text": ": SettingTitleCell\n\n@property", "parent": 6, "children": [9, 10, 11], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 12, "column": 9}}, {"id": 9, "type": "identifier", "text": "SettingTitleCell", "parent": 8, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 47}}, {"id": 10, "type": "ERROR", "text": "@", "parent": 8, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 11, "type": "identifier", "text": "property", "parent": 8, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 12, "type": "parameter_list", "text": "(nonatomic, weak)", "parent": 6, "children": [13, 14], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 27}}, {"id": 13, "type": "identifier", "text": "nonatomic", "parent": 12, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 20}}, {"id": 14, "type": "identifier", "text": "weak", "parent": 12, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 26}}, {"id": 15, "type": "declaration", "text": "IBOutlet UILabel *maxLabel;", "parent": 3, "children": [16, 17, 19], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 55}}, {"id": 16, "type": "type_identifier", "text": "IBOutlet", "parent": 15, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 36}}, {"id": 17, "type": "ERROR", "text": "UILabel", "parent": 15, "children": [18], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 44}}, {"id": 18, "type": "identifier", "text": "UILabel", "parent": 17, "children": [], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 44}}, {"id": 19, "type": "pointer_declarator", "text": "*maxLabel", "parent": 15, "children": [20, 21], "start_point": {"row": 12, "column": 45}, "end_point": {"row": 12, "column": 54}}, {"id": 20, "type": "*", "text": "*", "parent": 19, "children": [], "start_point": {"row": 12, "column": 45}, "end_point": {"row": 12, "column": 46}}, {"id": 21, "type": "identifier", "text": "maxLabel", "parent": 19, "children": [], "start_point": {"row": 12, "column": 46}, "end_point": {"row": 12, "column": 54}}, {"id": 22, "type": "ERROR", "text": "@", "parent": 3, "children": [23], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 23, "type": "ERROR", "text": "@", "parent": 22, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 24, "type": "declaration", "text": "property (nonatomic, weak) IBOutlet", "parent": 3, "children": [25, 31], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 36}}, {"id": 25, "type": "macro_type_specifier", "text": "property (nonatomic, weak)", "parent": 24, "children": [26, 27, 29], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 27}}, {"id": 26, "type": "identifier", "text": "property", "parent": 25, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 27, "type": "type_descriptor", "text": "nonatomic", "parent": 25, "children": [28], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 20}}, {"id": 28, "type": "type_identifier", "text": "nonatomic", "parent": 27, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 20}}, {"id": 29, "type": "ERROR", "text": ", weak", "parent": 25, "children": [30], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 26}}, {"id": 30, "type": "identifier", "text": "weak", "parent": 29, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 26}}, {"id": 31, "type": "identifier", "text": "IBOutlet", "parent": 24, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 36}}, {"id": 32, "type": "declaration", "text": "UILabel *minLabel;", "parent": 3, "children": [33, 34], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 55}}, {"id": 33, "type": "type_identifier", "text": "UILabel", "parent": 32, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 44}}, {"id": 34, "type": "pointer_declarator", "text": "*minLabel", "parent": 32, "children": [35, 36], "start_point": {"row": 13, "column": 45}, "end_point": {"row": 13, "column": 54}}, {"id": 35, "type": "*", "text": "*", "parent": 34, "children": [], "start_point": {"row": 13, "column": 45}, "end_point": {"row": 13, "column": 46}}, {"id": 36, "type": "identifier", "text": "minLabel", "parent": 34, "children": [], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 54}}, {"id": 37, "type": "ERROR", "text": "@", "parent": 3, "children": [38], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 38, "type": "ERROR", "text": "@", "parent": 37, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 39, "type": "declaration", "text": "property (nonatomic, weak) IBOutlet", "parent": 3, "children": [40, 46], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 36}}, {"id": 40, "type": "macro_type_specifier", "text": "property (nonatomic, weak)", "parent": 39, "children": [41, 42, 44], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 27}}, {"id": 41, "type": "identifier", "text": "property", "parent": 40, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 42, "type": "type_descriptor", "text": "nonatomic", "parent": 40, "children": [43], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 20}}, {"id": 43, "type": "type_identifier", "text": "nonatomic", "parent": 42, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 20}}, {"id": 44, "type": "ERROR", "text": ", weak", "parent": 40, "children": [45], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 26}}, {"id": 45, "type": "identifier", "text": "weak", "parent": 44, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 26}}, {"id": 46, "type": "identifier", "text": "IBOutlet", "parent": 39, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 36}}, {"id": 47, "type": "declaration", "text": "UISlider *slider;", "parent": 3, "children": [48, 49], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 54}}, {"id": 48, "type": "type_identifier", "text": "UISlider", "parent": 47, "children": [], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 45}}, {"id": 49, "type": "pointer_declarator", "text": "*slider", "parent": 47, "children": [50, 51], "start_point": {"row": 14, "column": 46}, "end_point": {"row": 14, "column": 53}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 14, "column": 46}, "end_point": {"row": 14, "column": 47}}, {"id": 51, "type": "identifier", "text": "slider", "parent": 49, "children": [], "start_point": {"row": 14, "column": 47}, "end_point": {"row": 14, "column": 53}}, {"id": 52, "type": "ERROR", "text": "@", "parent": 3, "children": [53], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 53, "type": "ERROR", "text": "@", "parent": 52, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}]}, "node_categories": {"declarations": {"functions": [6], "variables": [15, 24, 32, 39, 47], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 7, 9, 11, 13, 14, 16, 18, 21, 25, 26, 28, 30, 31, 33, 36, 40, 41, 43, 45, 46, 48, 51], "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": "SettingSliderCell : SettingTitleCell\n\n@property (nonatomic, weak)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// SettingSliderCell.h\n// SettingsSample\n//\n// Created by <NAME> on 27.01.17.\n// Copyright 2017 <NAME>. All rights reserved.\n//\n\n#import \"SettingTitleCell.h\"\n\n@interface SettingSliderCell : SettingTitleCell\n\n@property (nonatomic, weak) IBOutlet UILabel *maxLabel;\n@property (nonatomic, weak) IBOutlet UILabel *minLabel;\n@property (nonatomic, weak) IBOutlet UISlider *slider;\n\n@end\n"}
80,913
c
/*========================================================================= medInria Copyright (c) INRIA 2013 - 2014. All rights reserved. See LICENSE.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =========================================================================*/ #pragma once #include <medToolBox.h> class QtDcmPreviewWidget; class QtDcmSerieInfoWidget; class QtDcmImportWidget; class qtdcmDataSourceSerieToolBoxPrivate; class qtdcmDataSourceSerieToolBox : public medToolBox { Q_OBJECT public: qtdcmDataSourceSerieToolBox ( QWidget* parent = 0 ); ~qtdcmDataSourceSerieToolBox(); QtDcmPreviewWidget * getPreviewWidget(); QtDcmSerieInfoWidget * getSerieInfoWidget(); QtDcmImportWidget * getImportWidget(); private: qtdcmDataSourceSerieToolBoxPrivate * d; };
32.96
27
(translation_unit) "/*=========================================================================\n\n medInria\n\n Copyright (c) INRIA 2013 - 2014. All rights reserved.\n See LICENSE.txt for details.\n \n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE.\n\n=========================================================================*/\n\n#pragma once\n\n#include <medToolBox.h>\n\nclass QtDcmPreviewWidget;\nclass QtDcmSerieInfoWidget;\nclass QtDcmImportWidget;\n\nclass qtdcmDataSourceSerieToolBoxPrivate;\n\nclass qtdcmDataSourceSerieToolBox : public medToolBox\n{\n Q_OBJECT\npublic:\n qtdcmDataSourceSerieToolBox ( QWidget* parent = 0 );\n ~qtdcmDataSourceSerieToolBox();\n\n QtDcmPreviewWidget * getPreviewWidget();\n QtDcmSerieInfoWidget * getSerieInfoWidget();\n QtDcmImportWidget * getImportWidget();\n\nprivate:\n qtdcmDataSourceSerieToolBoxPrivate * d;\n};\n\n\n" (comment) "/*=========================================================================\n\n medInria\n\n Copyright (c) INRIA 2013 - 2014. All rights reserved.\n See LICENSE.txt for details.\n \n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE.\n\n=========================================================================*/" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <medToolBox.h>\n" (#include) "#include" (system_lib_string) "<medToolBox.h>" (declaration) "class QtDcmPreviewWidget;" (type_identifier) "class" (identifier) "QtDcmPreviewWidget" (;) ";" (declaration) "class QtDcmSerieInfoWidget;" (type_identifier) "class" (identifier) "QtDcmSerieInfoWidget" (;) ";" (declaration) "class QtDcmImportWidget;" (type_identifier) "class" (identifier) "QtDcmImportWidget" (;) ";" (declaration) "class qtdcmDataSourceSerieToolBoxPrivate;" (type_identifier) "class" (identifier) "qtdcmDataSourceSerieToolBoxPrivate" (;) ";" (function_definition) "class qtdcmDataSourceSerieToolBox : public medToolBox\n{\n Q_OBJECT\npublic:\n qtdcmDataSourceSerieToolBox ( QWidget* parent = 0 );\n ~qtdcmDataSourceSerieToolBox();\n\n QtDcmPreviewWidget * getPreviewWidget();\n QtDcmSerieInfoWidget * getSerieInfoWidget();\n QtDcmImportWidget * getImportWidget();\n\nprivate:\n qtdcmDataSourceSerieToolBoxPrivate * d;\n}" (type_identifier) "class" (identifier) "qtdcmDataSourceSerieToolBox" (ERROR) ": public medToolBox" (:) ":" (identifier) "public" (identifier) "medToolBox" (compound_statement) "{\n Q_OBJECT\npublic:\n qtdcmDataSourceSerieToolBox ( QWidget* parent = 0 );\n ~qtdcmDataSourceSerieToolBox();\n\n QtDcmPreviewWidget * getPreviewWidget();\n QtDcmSerieInfoWidget * getSerieInfoWidget();\n QtDcmImportWidget * getImportWidget();\n\nprivate:\n qtdcmDataSourceSerieToolBoxPrivate * d;\n}" ({) "{" (declaration) "Q_OBJECT\npublic:\n qtdcmDataSourceSerieToolBox ( QWidget* parent = 0 );" (type_identifier) "Q_OBJECT" (ERROR) "public:" (identifier) "public" (:) ":" (init_declarator) "qtdcmDataSourceSerieToolBox ( QWidget* parent = 0" (function_declarator) "qtdcmDataSourceSerieToolBox ( QWidget* parent" (identifier) "qtdcmDataSourceSerieToolBox" (parameter_list) "( QWidget* parent" (() "(" (parameter_declaration) "QWidget* parent" (type_identifier) "QWidget" (pointer_declarator) "* parent" (*) "*" (identifier) "parent" ()) "" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (expression_statement) "~qtdcmDataSourceSerieToolBox();" (unary_expression) "~qtdcmDataSourceSerieToolBox()" (~) "~" (call_expression) "qtdcmDataSourceSerieToolBox()" (identifier) "qtdcmDataSourceSerieToolBox" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "QtDcmPreviewWidget * getPreviewWidget();" (type_identifier) "QtDcmPreviewWidget" (pointer_declarator) "* getPreviewWidget()" (*) "*" (function_declarator) "getPreviewWidget()" (identifier) "getPreviewWidget" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "QtDcmSerieInfoWidget * getSerieInfoWidget();" (type_identifier) "QtDcmSerieInfoWidget" (pointer_declarator) "* getSerieInfoWidget()" (*) "*" (function_declarator) "getSerieInfoWidget()" (identifier) "getSerieInfoWidget" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "QtDcmImportWidget * getImportWidget();" (type_identifier) "QtDcmImportWidget" (pointer_declarator) "* getImportWidget()" (*) "*" (function_declarator) "getImportWidget()" (identifier) "getImportWidget" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n qtdcmDataSourceSerieToolBoxPrivate * d;" (statement_identifier) "private" (:) ":" (declaration) "qtdcmDataSourceSerieToolBoxPrivate * d;" (type_identifier) "qtdcmDataSourceSerieToolBoxPrivate" (pointer_declarator) "* d" (*) "*" (identifier) "d" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
105
3
{"language": "c", "success": true, "metadata": {"lines": 27, "avg_line_length": 32.96, "nodes": 64, "errors": 0, "source_hash": "83dcf9a1a50ea8ae66093ddd5be3ee482d67b19070568c5ac9347649f2e730d0", "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": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <medToolBox.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<medToolBox.h>", "parent": 3, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 23}}, {"id": 6, "type": "declaration", "text": "class QtDcmPreviewWidget;", "parent": null, "children": [7], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 25}}, {"id": 7, "type": "identifier", "text": "QtDcmPreviewWidget", "parent": 6, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 24}}, {"id": 8, "type": "declaration", "text": "class QtDcmSerieInfoWidget;", "parent": null, "children": [9], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 27}}, {"id": 9, "type": "identifier", "text": "QtDcmSerieInfoWidget", "parent": 8, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 26}}, {"id": 10, "type": "declaration", "text": "class QtDcmImportWidget;", "parent": null, "children": [11], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 24}}, {"id": 11, "type": "identifier", "text": "QtDcmImportWidget", "parent": 10, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 23}}, {"id": 12, "type": "declaration", "text": "class qtdcmDataSourceSerieToolBoxPrivate;", "parent": null, "children": [13], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 41}}, {"id": 13, "type": "identifier", "text": "qtdcmDataSourceSerieToolBoxPrivate", "parent": 12, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 40}}, {"id": 14, "type": "function_definition", "text": "class qtdcmDataSourceSerieToolBox : public medToolBox\n{\n Q_OBJECT\npublic:\n qtdcmDataSourceSerieToolBox ( QWidget* parent = 0 );\n ~qtdcmDataSourceSerieToolBox();\n\n QtDcmPreviewWidget * getPreviewWidget();\n QtDcmSerieInfoWidget * getSerieInfoWidget();\n QtDcmImportWidget * getImportWidget();\n\nprivate:\n qtdcmDataSourceSerieToolBoxPrivate * d;\n}", "parent": null, "children": [15, 16], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 15, "type": "identifier", "text": "qtdcmDataSourceSerieToolBox", "parent": 14, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 33}}, {"id": 16, "type": "ERROR", "text": ": public medToolBox", "parent": 14, "children": [17], "start_point": {"row": 23, "column": 34}, "end_point": {"row": 23, "column": 53}}, {"id": 17, "type": "identifier", "text": "medToolBox", "parent": 16, "children": [], "start_point": {"row": 23, "column": 43}, "end_point": {"row": 23, "column": 53}}, {"id": 18, "type": "declaration", "text": "Q_OBJECT\npublic:\n qtdcmDataSourceSerieToolBox ( QWidget* parent = 0 );", "parent": 14, "children": [19, 20, 21], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 27, "column": 56}}, {"id": 19, "type": "type_identifier", "text": "Q_OBJECT", "parent": 18, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 12}}, {"id": 20, "type": "ERROR", "text": "public:", "parent": 18, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 21, "type": "init_declarator", "text": "qtdcmDataSourceSerieToolBox ( QWidget* parent = 0", "parent": 18, "children": [22, 30, 31], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 53}}, {"id": 22, "type": "function_declarator", "text": "qtdcmDataSourceSerieToolBox ( QWidget* parent", "parent": 21, "children": [23, 24], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 49}}, {"id": 23, "type": "identifier", "text": "qtdcmDataSourceSerieToolBox", "parent": 22, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 31}}, {"id": 24, "type": "parameter_list", "text": "( QWidget* parent", "parent": 22, "children": [25], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 49}}, {"id": 25, "type": "parameter_declaration", "text": "QWidget* parent", "parent": 24, "children": [26, 27], "start_point": {"row": 27, "column": 34}, "end_point": {"row": 27, "column": 49}}, {"id": 26, "type": "type_identifier", "text": "QWidget", "parent": 25, "children": [], "start_point": {"row": 27, "column": 34}, "end_point": {"row": 27, "column": 41}}, {"id": 27, "type": "pointer_declarator", "text": "* parent", "parent": 25, "children": [28, 29], "start_point": {"row": 27, "column": 41}, "end_point": {"row": 27, "column": 49}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 27, "column": 41}, "end_point": {"row": 27, "column": 42}}, {"id": 29, "type": "identifier", "text": "parent", "parent": 27, "children": [], "start_point": {"row": 27, "column": 43}, "end_point": {"row": 27, "column": 49}}, {"id": 30, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 51}}, {"id": 31, "type": "number_literal", "text": "0", "parent": 21, "children": [], "start_point": {"row": 27, "column": 52}, "end_point": {"row": 27, "column": 53}}, {"id": 32, "type": "unary_expression", "text": "~qtdcmDataSourceSerieToolBox()", "parent": 14, "children": [33, 34], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 34}}, {"id": 33, "type": "~", "text": "~", "parent": 32, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 5}}, {"id": 34, "type": "call_expression", "text": "qtdcmDataSourceSerieToolBox()", "parent": 32, "children": [35, 36], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 34}}, {"id": 35, "type": "identifier", "text": "qtdcmDataSourceSerieToolBox", "parent": 34, "children": [], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 32}}, {"id": 36, "type": "argument_list", "text": "()", "parent": 34, "children": [], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 34}}, {"id": 37, "type": "declaration", "text": "QtDcmPreviewWidget * getPreviewWidget();", "parent": 14, "children": [38, 39], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 44}}, {"id": 38, "type": "type_identifier", "text": "QtDcmPreviewWidget", "parent": 37, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 22}}, {"id": 39, "type": "pointer_declarator", "text": "* getPreviewWidget()", "parent": 37, "children": [40, 41], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 43}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 24}}, {"id": 41, "type": "function_declarator", "text": "getPreviewWidget()", "parent": 39, "children": [42, 43], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 43}}, {"id": 42, "type": "identifier", "text": "getPreviewWidget", "parent": 41, "children": [], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 41}}, {"id": 43, "type": "parameter_list", "text": "()", "parent": 41, "children": [], "start_point": {"row": 30, "column": 41}, "end_point": {"row": 30, "column": 43}}, {"id": 44, "type": "declaration", "text": "QtDcmSerieInfoWidget * getSerieInfoWidget();", "parent": 14, "children": [45, 46], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 48}}, {"id": 45, "type": "type_identifier", "text": "QtDcmSerieInfoWidget", "parent": 44, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 24}}, {"id": 46, "type": "pointer_declarator", "text": "* getSerieInfoWidget()", "parent": 44, "children": [47, 48], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 47}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 26}}, {"id": 48, "type": "function_declarator", "text": "getSerieInfoWidget()", "parent": 46, "children": [49, 50], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 47}}, {"id": 49, "type": "identifier", "text": "getSerieInfoWidget", "parent": 48, "children": [], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 45}}, {"id": 50, "type": "parameter_list", "text": "()", "parent": 48, "children": [], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 31, "column": 47}}, {"id": 51, "type": "declaration", "text": "QtDcmImportWidget * getImportWidget();", "parent": 14, "children": [52, 53], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 42}}, {"id": 52, "type": "type_identifier", "text": "QtDcmImportWidget", "parent": 51, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 21}}, {"id": 53, "type": "pointer_declarator", "text": "* getImportWidget()", "parent": 51, "children": [54, 55], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 41}}, {"id": 54, "type": "*", "text": "*", "parent": 53, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 23}}, {"id": 55, "type": "function_declarator", "text": "getImportWidget()", "parent": 53, "children": [56, 57], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 41}}, {"id": 56, "type": "identifier", "text": "getImportWidget", "parent": 55, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 39}}, {"id": 57, "type": "parameter_list", "text": "()", "parent": 55, "children": [], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 41}}, {"id": 58, "type": "labeled_statement", "text": "private:\n qtdcmDataSourceSerieToolBoxPrivate * d;", "parent": 14, "children": [59], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 43}}, {"id": 59, "type": "declaration", "text": "qtdcmDataSourceSerieToolBoxPrivate * d;", "parent": 58, "children": [60, 61], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 43}}, {"id": 60, "type": "type_identifier", "text": "qtdcmDataSourceSerieToolBoxPrivate", "parent": 59, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 38}}, {"id": 61, "type": "pointer_declarator", "text": "* d", "parent": 59, "children": [62, 63], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 42}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 40}}, {"id": 63, "type": "identifier", "text": "d", "parent": 61, "children": [], "start_point": {"row": 35, "column": 41}, "end_point": {"row": 35, "column": 42}}]}, "node_categories": {"declarations": {"functions": [14, 22, 41, 48, 55], "variables": [6, 8, 10, 12, 18, 25, 37, 44, 51, 59], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [32, 34], "assignments": [], "loops": [], "conditionals": [7, 9, 11, 13, 15, 17, 19, 23, 26, 29, 35, 38, 42, 45, 49, 52, 56, 60, 63], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 31], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 14, "universal_type": "function", "name": "qtdcmDataSourceSerieToolBox", "text_snippet": "class qtdcmDataSourceSerieToolBox : public medToolBox\n{\n Q_OBJECT\npublic:\n qtdcmDataSourceSeri"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "qtdcmDataSourceSerieToolBox ( QWidget* parent"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "getPreviewWidget()"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "getSerieInfoWidget()"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "getImportWidget()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <medToolBox.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "/*=========================================================================\n\n medInria\n\n Copyright (c) INRIA 2013 - 2014. All rights reserved.\n See LICENSE.txt for details.\n \n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE.\n\n=========================================================================*/\n\n#pragma once\n\n#include <medToolBox.h>\n\nclass QtDcmPreviewWidget;\nclass QtDcmSerieInfoWidget;\nclass QtDcmImportWidget;\n\nclass qtdcmDataSourceSerieToolBoxPrivate;\n\nclass qtdcmDataSourceSerieToolBox : public medToolBox\n{\n Q_OBJECT\npublic:\n qtdcmDataSourceSerieToolBox ( QWidget* parent = 0 );\n ~qtdcmDataSourceSerieToolBox();\n\n QtDcmPreviewWidget * getPreviewWidget();\n QtDcmSerieInfoWidget * getSerieInfoWidget();\n QtDcmImportWidget * getImportWidget();\n\nprivate:\n qtdcmDataSourceSerieToolBoxPrivate * d;\n};\n\n\n"}
80,914
c
/* * Copyright (C) 2015-2020 "IoT.bzh" * Author <NAME> <<EMAIL>> * * 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. */ /* * This simple program expands the object { "$ref": "#/path/to/a/target" } * * For example: * * { * "type":{ * "a": "int", * "b": { "$ref": "#/type/a" } * } * } * * will be exapanded to * * { * "type":{ * "a": "int", * "b": "int" * } * } * * Invocation: program [file|-]... * * without arguments, it reads the input. */ #define _GNU_SOURCE #include <string.h> #include <stdio.h> #include <unistd.h> #include <json-c/json.h> /** * records path to the expanded node */ struct path { struct json_object *object; /**< node being expanded */ struct path *upper; /**< link to upper expanded nodes */ }; /** * root of the JSON being parsed */ struct json_object *root; /** * Search for a reference of type "#/a/b/c" int the * parsed JSON object */ struct json_object *search(const char *path) { char *d; struct json_object *i; /* does it match #/ at the beginning? */ if (path[0] != '#' || (path[0] && path[1] != '/')) return NULL; /* search from root to target */ i = root; d = strdupa(path+2); d = strtok(d, "/"); while(i && d) { if (!json_object_object_get_ex(i, d, &i)) return NULL; d = strtok(NULL, "/"); } return i; } /** * Expands the node designated by path and returns its expanded form */ struct json_object *expand(struct path path) { struct path *p; struct json_object *o, *x; int n, i; struct json_object_iterator ji, jn; /* expansion depends of the type of the node */ switch (json_object_get_type(path.object)) { case json_type_object: /* for object, look if it contains a property "$ref" */ if (json_object_object_get_ex(path.object, "$ref", &o)) { /* yes, reference, try to substitute its target */ if (!json_object_is_type(o, json_type_string)) { fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o)); exit(1); } x = search(json_object_get_string(o)); if (!x) { fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o)); exit(1); } p = &path; while(p) { if (x == p->object) { fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o)); exit(1); } p = p->upper; } /* cool found, return a new instance of the target */ return json_object_get(x); } /* no, expand the values */ ji = json_object_iter_begin(path.object); jn = json_object_iter_end(path.object); while (!json_object_iter_equal(&ji, &jn)) { o = json_object_iter_peek_value(&ji); x = expand((struct path){ .object = o, .upper = &path }); if (x != o) json_object_object_add(path.object, json_object_iter_peek_name(&ji), x); json_object_iter_next(&ji); } break; case json_type_array: /* expand the values of arrays */ i = 0; n = (int)json_object_array_length(path.object); while (i != n) { o = json_object_array_get_idx(path.object, i); x = expand((struct path){ .object = o, .upper = &path }); if (x != o) json_object_array_put_idx(path.object, i, x); i++; } break; default: /* otherwise no expansion */ break; } /* return the given node */ return path.object; } /** * process a file and prints its expansion on stdout */ void process(char *filename) { /* translate - */ if (!strcmp(filename, "-")) filename = "/dev/stdin"; /* check access */ if (access(filename, R_OK)) { fprintf(stderr, "can't access file %s\n", filename); exit(1); } /* read the file */ root = json_object_from_file(filename); if (!root) { fprintf(stderr, "reading file %s produced null\n", filename); exit(1); } /* expand */ root = expand((struct path){ .object = root, .upper = NULL }); /* print the result */ json_object_to_file_ext ("/dev/stdout", root, JSON_C_TO_STRING_PRETTY); /* clean up */ json_object_put(root); } /** process the list of files or stdin if none */ int main(int ac, char **av) { if (!*++av) process("-"); else { do { process(*av); } while(*++av); } return 0; }
24.36
181
(translation_unit) "/*\n * Copyright (C) 2015-2020 "IoT.bzh"\n * Author <NAME> <<EMAIL>>\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/*\n * This simple program expands the object { "$ref": "#/path/to/a/target" }\n *\n * For example:\n *\n * {\n * "type":{\n * "a": "int",\n * "b": { "$ref": "#/type/a" }\n * }\n * }\n *\n * will be exapanded to\n *\n * {\n * "type":{\n * "a": "int",\n * "b": "int"\n * }\n * }\n *\n * Invocation: program [file|-]...\n *\n * without arguments, it reads the input.\n */\n\n#define _GNU_SOURCE\n#include <string.h>\n#include <stdio.h>\n#include <unistd.h>\n\n#include <json-c/json.h>\n\n/**\n * records path to the expanded node\n */\nstruct path\n{\n struct json_object *object; /**< node being expanded */\n struct path *upper; /**< link to upper expanded nodes */\n};\n\n/**\n * root of the JSON being parsed\n */\nstruct json_object *root;\n\n/**\n * Search for a reference of type "#/a/b/c" int the\n * parsed JSON object\n */\nstruct json_object *search(const char *path)\n{\n char *d;\n struct json_object *i;\n\n /* does it match #/ at the beginning? */\n if (path[0] != '#' || (path[0] && path[1] != '/'))\n return NULL;\n\n /* search from root to target */\n i = root;\n d = strdupa(path+2);\n d = strtok(d, "/");\n while(i && d) {\n if (!json_object_object_get_ex(i, d, &i))\n return NULL;\n d = strtok(NULL, "/");\n }\n return i;\n}\n\n/**\n * Expands the node designated by path and returns its expanded form\n */\nstruct json_object *expand(struct path path)\n{\n struct path *p;\n struct json_object *o, *x;\n int n, i;\n struct json_object_iterator ji, jn;\n\n /* expansion depends of the type of the node */\n switch (json_object_get_type(path.object)) {\n case json_type_object:\n /* for object, look if it contains a property "$ref" */\n if (json_object_object_get_ex(path.object, "$ref", &o)) {\n /* yes, reference, try to substitute its target */\n if (!json_object_is_type(o, json_type_string)) {\n fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));\n exit(1);\n }\n x = search(json_object_get_string(o));\n if (!x) {\n fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = &path;\n while(p) {\n if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = p->upper;\n }\n /* cool found, return a new instance of the target */\n return json_object_get(x);\n }\n /* no, expand the values */\n ji = json_object_iter_begin(path.object);\n jn = json_object_iter_end(path.object);\n while (!json_object_iter_equal(&ji, &jn)) {\n o = json_object_iter_peek_value(&ji);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n json_object_iter_next(&ji);\n }\n break;\n case json_type_array:\n /* expand the values of arrays */\n i = 0;\n n = (int)json_object_array_length(path.object);\n while (i != n) {\n o = json_object_array_get_idx(path.object, i);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_array_put_idx(path.object, i, x);\n i++;\n }\n break;\n default:\n /* otherwise no expansion */\n break;\n }\n /* return the given node */\n return path.object;\n}\n\n/**\n * process a file and prints its expansion on stdout\n */\nvoid process(char *filename)\n{\n /* translate - */\n if (!strcmp(filename, "-"))\n filename = "/dev/stdin";\n\n /* check access */\n if (access(filename, R_OK)) {\n fprintf(stderr, "can't access file %s\n", filename);\n exit(1);\n }\n\n /* read the file */\n root = json_object_from_file(filename);\n if (!root) {\n fprintf(stderr, "reading file %s produced null\n", filename);\n exit(1);\n }\n\n /* expand */\n root = expand((struct path){ .object = root, .upper = NULL });\n\n /* print the result */\n json_object_to_file_ext ("/dev/stdout", root, JSON_C_TO_STRING_PRETTY);\n\n /* clean up */\n json_object_put(root);\n}\n\n/** process the list of files or stdin if none */\nint main(int ac, char **av)\n{\n if (!*++av)\n process("-");\n else {\n do { process(*av); } while(*++av);\n }\n return 0;\n}\n\n" (comment) "/*\n * Copyright (C) 2015-2020 "IoT.bzh"\n * Author <NAME> <<EMAIL>>\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 */" (comment) "/*\n * This simple program expands the object { "$ref": "#/path/to/a/target" }\n *\n * For example:\n *\n * {\n * "type":{\n * "a": "int",\n * "b": { "$ref": "#/type/a" }\n * }\n * }\n *\n * will be exapanded to\n *\n * {\n * "type":{\n * "a": "int",\n * "b": "int"\n * }\n * }\n *\n * Invocation: program [file|-]...\n *\n * without arguments, it reads the input.\n */" (preproc_def) "#define _GNU_SOURCE\n" (#define) "#define" (identifier) "_GNU_SOURCE" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.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 <json-c/json.h>\n" (#include) "#include" (system_lib_string) "<json-c/json.h>" (comment) "/**\n * records path to the expanded node\n */" (struct_specifier) "struct path\n{\n struct json_object *object; /**< node being expanded */\n struct path *upper; /**< link to upper expanded nodes */\n}" (struct) "struct" (type_identifier) "path" (field_declaration_list) "{\n struct json_object *object; /**< node being expanded */\n struct path *upper; /**< link to upper expanded nodes */\n}" ({) "{" (field_declaration) "struct json_object *object;" (struct_specifier) "struct json_object" (struct) "struct" (type_identifier) "json_object" (pointer_declarator) "*object" (*) "*" (field_identifier) "object" (;) ";" (comment) "/**< node being expanded */" (field_declaration) "struct path *upper;" (struct_specifier) "struct path" (struct) "struct" (type_identifier) "path" (pointer_declarator) "*upper" (*) "*" (field_identifier) "upper" (;) ";" (comment) "/**< link to upper expanded nodes */" (}) "}" (;) ";" (comment) "/**\n * root of the JSON being parsed\n */" (declaration) "struct json_object *root;" (struct_specifier) "struct json_object" (struct) "struct" (type_identifier) "json_object" (pointer_declarator) "*root" (*) "*" (identifier) "root" (;) ";" (comment) "/**\n * Search for a reference of type "#/a/b/c" int the\n * parsed JSON object\n */" (function_definition) "struct json_object *search(const char *path)\n{\n char *d;\n struct json_object *i;\n\n /* does it match #/ at the beginning? */\n if (path[0] != '#' || (path[0] && path[1] != '/'))\n return NULL;\n\n /* search from root to target */\n i = root;\n d = strdupa(path+2);\n d = strtok(d, "/");\n while(i && d) {\n if (!json_object_object_get_ex(i, d, &i))\n return NULL;\n d = strtok(NULL, "/");\n }\n return i;\n}" (struct_specifier) "struct json_object" (struct) "struct" (type_identifier) "json_object" (pointer_declarator) "*search(const char *path)" (*) "*" (function_declarator) "search(const char *path)" (identifier) "search" (parameter_list) "(const char *path)" (() "(" (parameter_declaration) "const char *path" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*path" (*) "*" (identifier) "path" ()) ")" (compound_statement) "{\n char *d;\n struct json_object *i;\n\n /* does it match #/ at the beginning? */\n if (path[0] != '#' || (path[0] && path[1] != '/'))\n return NULL;\n\n /* search from root to target */\n i = root;\n d = strdupa(path+2);\n d = strtok(d, "/");\n while(i && d) {\n if (!json_object_object_get_ex(i, d, &i))\n return NULL;\n d = strtok(NULL, "/");\n }\n return i;\n}" ({) "{" (declaration) "char *d;" (primitive_type) "char" (pointer_declarator) "*d" (*) "*" (identifier) "d" (;) ";" (declaration) "struct json_object *i;" (struct_specifier) "struct json_object" (struct) "struct" (type_identifier) "json_object" (pointer_declarator) "*i" (*) "*" (identifier) "i" (;) ";" (comment) "/* does it match #/ at the beginning? */" (if_statement) "if (path[0] != '#' || (path[0] && path[1] != '/'))\n return NULL;" (if) "if" (parenthesized_expression) "(path[0] != '#' || (path[0] && path[1] != '/'))" (() "(" (binary_expression) "path[0] != '#' || (path[0] && path[1] != '/')" (binary_expression) "path[0] != '#'" (subscript_expression) "path[0]" (identifier) "path" ([) "[" (number_literal) "0" (]) "]" (!=) "!=" (char_literal) "'#'" (') "'" (character) "#" (') "'" (||) "||" (parenthesized_expression) "(path[0] && path[1] != '/')" (() "(" (binary_expression) "path[0] && path[1] != '/'" (subscript_expression) "path[0]" (identifier) "path" ([) "[" (number_literal) "0" (]) "]" (&&) "&&" (binary_expression) "path[1] != '/'" (subscript_expression) "path[1]" (identifier) "path" ([) "[" (number_literal) "1" (]) "]" (!=) "!=" (char_literal) "'/'" (') "'" (character) "/" (') "'" ()) ")" ()) ")" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (comment) "/* search from root to target */" (expression_statement) "i = root;" (assignment_expression) "i = root" (identifier) "i" (=) "=" (identifier) "root" (;) ";" (expression_statement) "d = strdupa(path+2);" (assignment_expression) "d = strdupa(path+2)" (identifier) "d" (=) "=" (call_expression) "strdupa(path+2)" (identifier) "strdupa" (argument_list) "(path+2)" (() "(" (binary_expression) "path+2" (identifier) "path" (+) "+" (number_literal) "2" ()) ")" (;) ";" (expression_statement) "d = strtok(d, "/");" (assignment_expression) "d = strtok(d, "/")" (identifier) "d" (=) "=" (call_expression) "strtok(d, "/")" (identifier) "strtok" (argument_list) "(d, "/")" (() "(" (identifier) "d" (,) "," (string_literal) ""/"" (") """ (string_content) "/" (") """ ()) ")" (;) ";" (while_statement) "while(i && d) {\n if (!json_object_object_get_ex(i, d, &i))\n return NULL;\n d = strtok(NULL, "/");\n }" (while) "while" (parenthesized_expression) "(i && d)" (() "(" (binary_expression) "i && d" (identifier) "i" (&&) "&&" (identifier) "d" ()) ")" (compound_statement) "{\n if (!json_object_object_get_ex(i, d, &i))\n return NULL;\n d = strtok(NULL, "/");\n }" ({) "{" (if_statement) "if (!json_object_object_get_ex(i, d, &i))\n return NULL;" (if) "if" (parenthesized_expression) "(!json_object_object_get_ex(i, d, &i))" (() "(" (unary_expression) "!json_object_object_get_ex(i, d, &i)" (!) "!" (call_expression) "json_object_object_get_ex(i, d, &i)" (identifier) "json_object_object_get_ex" (argument_list) "(i, d, &i)" (() "(" (identifier) "i" (,) "," (identifier) "d" (,) "," (pointer_expression) "&i" (&) "&" (identifier) "i" ()) ")" ()) ")" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "d = strtok(NULL, "/");" (assignment_expression) "d = strtok(NULL, "/")" (identifier) "d" (=) "=" (call_expression) "strtok(NULL, "/")" (identifier) "strtok" (argument_list) "(NULL, "/")" (() "(" (null) "NULL" (NULL) "NULL" (,) "," (string_literal) ""/"" (") """ (string_content) "/" (") """ ()) ")" (;) ";" (}) "}" (return_statement) "return i;" (return) "return" (identifier) "i" (;) ";" (}) "}" (comment) "/**\n * Expands the node designated by path and returns its expanded form\n */" (function_definition) "struct json_object *expand(struct path path)\n{\n struct path *p;\n struct json_object *o, *x;\n int n, i;\n struct json_object_iterator ji, jn;\n\n /* expansion depends of the type of the node */\n switch (json_object_get_type(path.object)) {\n case json_type_object:\n /* for object, look if it contains a property "$ref" */\n if (json_object_object_get_ex(path.object, "$ref", &o)) {\n /* yes, reference, try to substitute its target */\n if (!json_object_is_type(o, json_type_string)) {\n fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));\n exit(1);\n }\n x = search(json_object_get_string(o));\n if (!x) {\n fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = &path;\n while(p) {\n if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = p->upper;\n }\n /* cool found, return a new instance of the target */\n return json_object_get(x);\n }\n /* no, expand the values */\n ji = json_object_iter_begin(path.object);\n jn = json_object_iter_end(path.object);\n while (!json_object_iter_equal(&ji, &jn)) {\n o = json_object_iter_peek_value(&ji);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n json_object_iter_next(&ji);\n }\n break;\n case json_type_array:\n /* expand the values of arrays */\n i = 0;\n n = (int)json_object_array_length(path.object);\n while (i != n) {\n o = json_object_array_get_idx(path.object, i);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_array_put_idx(path.object, i, x);\n i++;\n }\n break;\n default:\n /* otherwise no expansion */\n break;\n }\n /* return the given node */\n return path.object;\n}" (struct_specifier) "struct json_object" (struct) "struct" (type_identifier) "json_object" (pointer_declarator) "*expand(struct path path)" (*) "*" (function_declarator) "expand(struct path path)" (identifier) "expand" (parameter_list) "(struct path path)" (() "(" (parameter_declaration) "struct path path" (struct_specifier) "struct path" (struct) "struct" (type_identifier) "path" (identifier) "path" ()) ")" (compound_statement) "{\n struct path *p;\n struct json_object *o, *x;\n int n, i;\n struct json_object_iterator ji, jn;\n\n /* expansion depends of the type of the node */\n switch (json_object_get_type(path.object)) {\n case json_type_object:\n /* for object, look if it contains a property "$ref" */\n if (json_object_object_get_ex(path.object, "$ref", &o)) {\n /* yes, reference, try to substitute its target */\n if (!json_object_is_type(o, json_type_string)) {\n fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));\n exit(1);\n }\n x = search(json_object_get_string(o));\n if (!x) {\n fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = &path;\n while(p) {\n if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = p->upper;\n }\n /* cool found, return a new instance of the target */\n return json_object_get(x);\n }\n /* no, expand the values */\n ji = json_object_iter_begin(path.object);\n jn = json_object_iter_end(path.object);\n while (!json_object_iter_equal(&ji, &jn)) {\n o = json_object_iter_peek_value(&ji);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n json_object_iter_next(&ji);\n }\n break;\n case json_type_array:\n /* expand the values of arrays */\n i = 0;\n n = (int)json_object_array_length(path.object);\n while (i != n) {\n o = json_object_array_get_idx(path.object, i);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_array_put_idx(path.object, i, x);\n i++;\n }\n break;\n default:\n /* otherwise no expansion */\n break;\n }\n /* return the given node */\n return path.object;\n}" ({) "{" (declaration) "struct path *p;" (struct_specifier) "struct path" (struct) "struct" (type_identifier) "path" (pointer_declarator) "*p" (*) "*" (identifier) "p" (;) ";" (declaration) "struct json_object *o, *x;" (struct_specifier) "struct json_object" (struct) "struct" (type_identifier) "json_object" (pointer_declarator) "*o" (*) "*" (identifier) "o" (,) "," (pointer_declarator) "*x" (*) "*" (identifier) "x" (;) ";" (declaration) "int n, i;" (primitive_type) "int" (identifier) "n" (,) "," (identifier) "i" (;) ";" (declaration) "struct json_object_iterator ji, jn;" (struct_specifier) "struct json_object_iterator" (struct) "struct" (type_identifier) "json_object_iterator" (identifier) "ji" (,) "," (identifier) "jn" (;) ";" (comment) "/* expansion depends of the type of the node */" (switch_statement) "switch (json_object_get_type(path.object)) {\n case json_type_object:\n /* for object, look if it contains a property "$ref" */\n if (json_object_object_get_ex(path.object, "$ref", &o)) {\n /* yes, reference, try to substitute its target */\n if (!json_object_is_type(o, json_type_string)) {\n fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));\n exit(1);\n }\n x = search(json_object_get_string(o));\n if (!x) {\n fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = &path;\n while(p) {\n if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = p->upper;\n }\n /* cool found, return a new instance of the target */\n return json_object_get(x);\n }\n /* no, expand the values */\n ji = json_object_iter_begin(path.object);\n jn = json_object_iter_end(path.object);\n while (!json_object_iter_equal(&ji, &jn)) {\n o = json_object_iter_peek_value(&ji);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n json_object_iter_next(&ji);\n }\n break;\n case json_type_array:\n /* expand the values of arrays */\n i = 0;\n n = (int)json_object_array_length(path.object);\n while (i != n) {\n o = json_object_array_get_idx(path.object, i);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_array_put_idx(path.object, i, x);\n i++;\n }\n break;\n default:\n /* otherwise no expansion */\n break;\n }" (switch) "switch" (parenthesized_expression) "(json_object_get_type(path.object))" (() "(" (call_expression) "json_object_get_type(path.object)" (identifier) "json_object_get_type" (argument_list) "(path.object)" (() "(" (field_expression) "path.object" (identifier) "path" (.) "." (field_identifier) "object" ()) ")" ()) ")" (compound_statement) "{\n case json_type_object:\n /* for object, look if it contains a property "$ref" */\n if (json_object_object_get_ex(path.object, "$ref", &o)) {\n /* yes, reference, try to substitute its target */\n if (!json_object_is_type(o, json_type_string)) {\n fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));\n exit(1);\n }\n x = search(json_object_get_string(o));\n if (!x) {\n fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = &path;\n while(p) {\n if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = p->upper;\n }\n /* cool found, return a new instance of the target */\n return json_object_get(x);\n }\n /* no, expand the values */\n ji = json_object_iter_begin(path.object);\n jn = json_object_iter_end(path.object);\n while (!json_object_iter_equal(&ji, &jn)) {\n o = json_object_iter_peek_value(&ji);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n json_object_iter_next(&ji);\n }\n break;\n case json_type_array:\n /* expand the values of arrays */\n i = 0;\n n = (int)json_object_array_length(path.object);\n while (i != n) {\n o = json_object_array_get_idx(path.object, i);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_array_put_idx(path.object, i, x);\n i++;\n }\n break;\n default:\n /* otherwise no expansion */\n break;\n }" ({) "{" (case_statement) "case json_type_object:\n /* for object, look if it contains a property "$ref" */\n if (json_object_object_get_ex(path.object, "$ref", &o)) {\n /* yes, reference, try to substitute its target */\n if (!json_object_is_type(o, json_type_string)) {\n fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));\n exit(1);\n }\n x = search(json_object_get_string(o));\n if (!x) {\n fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = &path;\n while(p) {\n if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = p->upper;\n }\n /* cool found, return a new instance of the target */\n return json_object_get(x);\n }\n /* no, expand the values */\n ji = json_object_iter_begin(path.object);\n jn = json_object_iter_end(path.object);\n while (!json_object_iter_equal(&ji, &jn)) {\n o = json_object_iter_peek_value(&ji);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n json_object_iter_next(&ji);\n }\n break;" (case) "case" (identifier) "json_type_object" (:) ":" (comment) "/* for object, look if it contains a property "$ref" */" (if_statement) "if (json_object_object_get_ex(path.object, "$ref", &o)) {\n /* yes, reference, try to substitute its target */\n if (!json_object_is_type(o, json_type_string)) {\n fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));\n exit(1);\n }\n x = search(json_object_get_string(o));\n if (!x) {\n fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = &path;\n while(p) {\n if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = p->upper;\n }\n /* cool found, return a new instance of the target */\n return json_object_get(x);\n }" (if) "if" (parenthesized_expression) "(json_object_object_get_ex(path.object, "$ref", &o))" (() "(" (call_expression) "json_object_object_get_ex(path.object, "$ref", &o)" (identifier) "json_object_object_get_ex" (argument_list) "(path.object, "$ref", &o)" (() "(" (field_expression) "path.object" (identifier) "path" (.) "." (field_identifier) "object" (,) "," (string_literal) ""$ref"" (") """ (string_content) "$ref" (") """ (,) "," (pointer_expression) "&o" (&) "&" (identifier) "o" ()) ")" ()) ")" (compound_statement) "{\n /* yes, reference, try to substitute its target */\n if (!json_object_is_type(o, json_type_string)) {\n fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));\n exit(1);\n }\n x = search(json_object_get_string(o));\n if (!x) {\n fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = &path;\n while(p) {\n if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = p->upper;\n }\n /* cool found, return a new instance of the target */\n return json_object_get(x);\n }" ({) "{" (comment) "/* yes, reference, try to substitute its target */" (if_statement) "if (!json_object_is_type(o, json_type_string)) {\n fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(!json_object_is_type(o, json_type_string))" (() "(" (unary_expression) "!json_object_is_type(o, json_type_string)" (!) "!" (call_expression) "json_object_is_type(o, json_type_string)" (identifier) "json_object_is_type" (argument_list) "(o, json_type_string)" (() "(" (identifier) "o" (,) "," (identifier) "json_type_string" ()) ")" ()) ")" (compound_statement) "{\n fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o));" (call_expression) "fprintf(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o))" (identifier) "fprintf" (argument_list) "(stderr, "found a $ref not being string. Is: %s\n", json_object_get_string(o))" (() "(" (identifier) "stderr" (,) "," (string_literal) ""found a $ref not being string. Is: %s\n"" (") """ (string_content) "found a $ref not being string. Is: %s" (escape_sequence) "\n" (") """ (,) "," (call_expression) "json_object_get_string(o)" (identifier) "json_object_get_string" (argument_list) "(o)" (() "(" (identifier) "o" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "x = search(json_object_get_string(o));" (assignment_expression) "x = search(json_object_get_string(o))" (identifier) "x" (=) "=" (call_expression) "search(json_object_get_string(o))" (identifier) "search" (argument_list) "(json_object_get_string(o))" (() "(" (call_expression) "json_object_get_string(o)" (identifier) "json_object_get_string" (argument_list) "(o)" (() "(" (identifier) "o" ()) ")" ()) ")" (;) ";" (if_statement) "if (!x) {\n fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(!x)" (() "(" (unary_expression) "!x" (!) "!" (identifier) "x" ()) ")" (compound_statement) "{\n fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o));" (call_expression) "fprintf(stderr, "$ref not found. Was: %s\n", json_object_get_string(o))" (identifier) "fprintf" (argument_list) "(stderr, "$ref not found. Was: %s\n", json_object_get_string(o))" (() "(" (identifier) "stderr" (,) "," (string_literal) ""$ref not found. Was: %s\n"" (") """ (string_content) "$ref not found. Was: %s" (escape_sequence) "\n" (") """ (,) "," (call_expression) "json_object_get_string(o)" (identifier) "json_object_get_string" (argument_list) "(o)" (() "(" (identifier) "o" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "p = &path;" (assignment_expression) "p = &path" (identifier) "p" (=) "=" (pointer_expression) "&path" (&) "&" (identifier) "path" (;) ";" (while_statement) "while(p) {\n if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = p->upper;\n }" (while) "while" (parenthesized_expression) "(p)" (() "(" (identifier) "p" ()) ")" (compound_statement) "{\n if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }\n p = p->upper;\n }" ({) "{" (if_statement) "if (x == p->object) {\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }" (if) "if" (parenthesized_expression) "(x == p->object)" (() "(" (binary_expression) "x == p->object" (identifier) "x" (==) "==" (field_expression) "p->object" (identifier) "p" (->) "->" (field_identifier) "object" ()) ")" (compound_statement) "{\n fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o));" (call_expression) "fprintf(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o))" (identifier) "fprintf" (argument_list) "(stderr, "$ref recursive. Was: %s\n", json_object_get_string(o))" (() "(" (identifier) "stderr" (,) "," (string_literal) ""$ref recursive. Was: %s\n"" (") """ (string_content) "$ref recursive. Was: %s" (escape_sequence) "\n" (") """ (,) "," (call_expression) "json_object_get_string(o)" (identifier) "json_object_get_string" (argument_list) "(o)" (() "(" (identifier) "o" ()) ")" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "p = p->upper;" (assignment_expression) "p = p->upper" (identifier) "p" (=) "=" (field_expression) "p->upper" (identifier) "p" (->) "->" (field_identifier) "upper" (;) ";" (}) "}" (comment) "/* cool found, return a new instance of the target */" (return_statement) "return json_object_get(x);" (return) "return" (call_expression) "json_object_get(x)" (identifier) "json_object_get" (argument_list) "(x)" (() "(" (identifier) "x" ()) ")" (;) ";" (}) "}" (comment) "/* no, expand the values */" (expression_statement) "ji = json_object_iter_begin(path.object);" (assignment_expression) "ji = json_object_iter_begin(path.object)" (identifier) "ji" (=) "=" (call_expression) "json_object_iter_begin(path.object)" (identifier) "json_object_iter_begin" (argument_list) "(path.object)" (() "(" (field_expression) "path.object" (identifier) "path" (.) "." (field_identifier) "object" ()) ")" (;) ";" (expression_statement) "jn = json_object_iter_end(path.object);" (assignment_expression) "jn = json_object_iter_end(path.object)" (identifier) "jn" (=) "=" (call_expression) "json_object_iter_end(path.object)" (identifier) "json_object_iter_end" (argument_list) "(path.object)" (() "(" (field_expression) "path.object" (identifier) "path" (.) "." (field_identifier) "object" ()) ")" (;) ";" (while_statement) "while (!json_object_iter_equal(&ji, &jn)) {\n o = json_object_iter_peek_value(&ji);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n json_object_iter_next(&ji);\n }" (while) "while" (parenthesized_expression) "(!json_object_iter_equal(&ji, &jn))" (() "(" (unary_expression) "!json_object_iter_equal(&ji, &jn)" (!) "!" (call_expression) "json_object_iter_equal(&ji, &jn)" (identifier) "json_object_iter_equal" (argument_list) "(&ji, &jn)" (() "(" (pointer_expression) "&ji" (&) "&" (identifier) "ji" (,) "," (pointer_expression) "&jn" (&) "&" (identifier) "jn" ()) ")" ()) ")" (compound_statement) "{\n o = json_object_iter_peek_value(&ji);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n json_object_iter_next(&ji);\n }" ({) "{" (expression_statement) "o = json_object_iter_peek_value(&ji);" (assignment_expression) "o = json_object_iter_peek_value(&ji)" (identifier) "o" (=) "=" (call_expression) "json_object_iter_peek_value(&ji)" (identifier) "json_object_iter_peek_value" (argument_list) "(&ji)" (() "(" (pointer_expression) "&ji" (&) "&" (identifier) "ji" ()) ")" (;) ";" (expression_statement) "x = expand((struct path){ .object = o, .upper = &path });" (assignment_expression) "x = expand((struct path){ .object = o, .upper = &path })" (identifier) "x" (=) "=" (call_expression) "expand((struct path){ .object = o, .upper = &path })" (identifier) "expand" (argument_list) "((struct path){ .object = o, .upper = &path })" (() "(" (compound_literal_expression) "(struct path){ .object = o, .upper = &path }" (() "(" (type_descriptor) "struct path" (struct_specifier) "struct path" (struct) "struct" (type_identifier) "path" ()) ")" (initializer_list) "{ .object = o, .upper = &path }" ({) "{" (initializer_pair) ".object = o" (field_designator) ".object" (.) "." (field_identifier) "object" (=) "=" (identifier) "o" (,) "," (initializer_pair) ".upper = &path" (field_designator) ".upper" (.) "." (field_identifier) "upper" (=) "=" (pointer_expression) "&path" (&) "&" (identifier) "path" (}) "}" ()) ")" (;) ";" (if_statement) "if (x != o)\n json_object_object_add(path.object, json_object_iter_peek_name(&ji), x);" (if) "if" (parenthesized_expression) "(x != o)" (() "(" (binary_expression) "x != o" (identifier) "x" (!=) "!=" (identifier) "o" ()) ")" (expression_statement) "json_object_object_add(path.object, json_object_iter_peek_name(&ji), x);" (call_expression) "json_object_object_add(path.object, json_object_iter_peek_name(&ji), x)" (identifier) "json_object_object_add" (argument_list) "(path.object, json_object_iter_peek_name(&ji), x)" (() "(" (field_expression) "path.object" (identifier) "path" (.) "." (field_identifier) "object" (,) "," (call_expression) "json_object_iter_peek_name(&ji)" (identifier) "json_object_iter_peek_name" (argument_list) "(&ji)" (() "(" (pointer_expression) "&ji" (&) "&" (identifier) "ji" ()) ")" (,) "," (identifier) "x" ()) ")" (;) ";" (expression_statement) "json_object_iter_next(&ji);" (call_expression) "json_object_iter_next(&ji)" (identifier) "json_object_iter_next" (argument_list) "(&ji)" (() "(" (pointer_expression) "&ji" (&) "&" (identifier) "ji" ()) ")" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case json_type_array:\n /* expand the values of arrays */\n i = 0;\n n = (int)json_object_array_length(path.object);\n while (i != n) {\n o = json_object_array_get_idx(path.object, i);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_array_put_idx(path.object, i, x);\n i++;\n }\n break;" (case) "case" (identifier) "json_type_array" (:) ":" (comment) "/* expand the values of arrays */" (expression_statement) "i = 0;" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "n = (int)json_object_array_length(path.object);" (assignment_expression) "n = (int)json_object_array_length(path.object)" (identifier) "n" (=) "=" (cast_expression) "(int)json_object_array_length(path.object)" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (call_expression) "json_object_array_length(path.object)" (identifier) "json_object_array_length" (argument_list) "(path.object)" (() "(" (field_expression) "path.object" (identifier) "path" (.) "." (field_identifier) "object" ()) ")" (;) ";" (while_statement) "while (i != n) {\n o = json_object_array_get_idx(path.object, i);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_array_put_idx(path.object, i, x);\n i++;\n }" (while) "while" (parenthesized_expression) "(i != n)" (() "(" (binary_expression) "i != n" (identifier) "i" (!=) "!=" (identifier) "n" ()) ")" (compound_statement) "{\n o = json_object_array_get_idx(path.object, i);\n x = expand((struct path){ .object = o, .upper = &path });\n if (x != o)\n json_object_array_put_idx(path.object, i, x);\n i++;\n }" ({) "{" (expression_statement) "o = json_object_array_get_idx(path.object, i);" (assignment_expression) "o = json_object_array_get_idx(path.object, i)" (identifier) "o" (=) "=" (call_expression) "json_object_array_get_idx(path.object, i)" (identifier) "json_object_array_get_idx" (argument_list) "(path.object, i)" (() "(" (field_expression) "path.object" (identifier) "path" (.) "." (field_identifier) "object" (,) "," (identifier) "i" ()) ")" (;) ";" (expression_statement) "x = expand((struct path){ .object = o, .upper = &path });" (assignment_expression) "x = expand((struct path){ .object = o, .upper = &path })" (identifier) "x" (=) "=" (call_expression) "expand((struct path){ .object = o, .upper = &path })" (identifier) "expand" (argument_list) "((struct path){ .object = o, .upper = &path })" (() "(" (compound_literal_expression) "(struct path){ .object = o, .upper = &path }" (() "(" (type_descriptor) "struct path" (struct_specifier) "struct path" (struct) "struct" (type_identifier) "path" ()) ")" (initializer_list) "{ .object = o, .upper = &path }" ({) "{" (initializer_pair) ".object = o" (field_designator) ".object" (.) "." (field_identifier) "object" (=) "=" (identifier) "o" (,) "," (initializer_pair) ".upper = &path" (field_designator) ".upper" (.) "." (field_identifier) "upper" (=) "=" (pointer_expression) "&path" (&) "&" (identifier) "path" (}) "}" ()) ")" (;) ";" (if_statement) "if (x != o)\n json_object_array_put_idx(path.object, i, x);" (if) "if" (parenthesized_expression) "(x != o)" (() "(" (binary_expression) "x != o" (identifier) "x" (!=) "!=" (identifier) "o" ()) ")" (expression_statement) "json_object_array_put_idx(path.object, i, x);" (call_expression) "json_object_array_put_idx(path.object, i, x)" (identifier) "json_object_array_put_idx" (argument_list) "(path.object, i, x)" (() "(" (field_expression) "path.object" (identifier) "path" (.) "." (field_identifier) "object" (,) "," (identifier) "i" (,) "," (identifier) "x" ()) ")" (;) ";" (expression_statement) "i++;" (update_expression) "i++" (identifier) "i" (++) "++" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n /* otherwise no expansion */\n break;" (default) "default" (:) ":" (comment) "/* otherwise no expansion */" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (comment) "/* return the given node */" (return_statement) "return path.object;" (return) "return" (field_expression) "path.object" (identifier) "path" (.) "." (field_identifier) "object" (;) ";" (}) "}" (comment) "/**\n * process a file and prints its expansion on stdout\n */" (function_definition) "void process(char *filename)\n{\n /* translate - */\n if (!strcmp(filename, "-"))\n filename = "/dev/stdin";\n\n /* check access */\n if (access(filename, R_OK)) {\n fprintf(stderr, "can't access file %s\n", filename);\n exit(1);\n }\n\n /* read the file */\n root = json_object_from_file(filename);\n if (!root) {\n fprintf(stderr, "reading file %s produced null\n", filename);\n exit(1);\n }\n\n /* expand */\n root = expand((struct path){ .object = root, .upper = NULL });\n\n /* print the result */\n json_object_to_file_ext ("/dev/stdout", root, JSON_C_TO_STRING_PRETTY);\n\n /* clean up */\n json_object_put(root);\n}" (primitive_type) "void" (function_declarator) "process(char *filename)" (identifier) "process" (parameter_list) "(char *filename)" (() "(" (parameter_declaration) "char *filename" (primitive_type) "char" (pointer_declarator) "*filename" (*) "*" (identifier) "filename" ()) ")" (compound_statement) "{\n /* translate - */\n if (!strcmp(filename, "-"))\n filename = "/dev/stdin";\n\n /* check access */\n if (access(filename, R_OK)) {\n fprintf(stderr, "can't access file %s\n", filename);\n exit(1);\n }\n\n /* read the file */\n root = json_object_from_file(filename);\n if (!root) {\n fprintf(stderr, "reading file %s produced null\n", filename);\n exit(1);\n }\n\n /* expand */\n root = expand((struct path){ .object = root, .upper = NULL });\n\n /* print the result */\n json_object_to_file_ext ("/dev/stdout", root, JSON_C_TO_STRING_PRETTY);\n\n /* clean up */\n json_object_put(root);\n}" ({) "{" (comment) "/* translate - */" (if_statement) "if (!strcmp(filename, "-"))\n filename = "/dev/stdin";" (if) "if" (parenthesized_expression) "(!strcmp(filename, "-"))" (() "(" (unary_expression) "!strcmp(filename, "-")" (!) "!" (call_expression) "strcmp(filename, "-")" (identifier) "strcmp" (argument_list) "(filename, "-")" (() "(" (identifier) "filename" (,) "," (string_literal) ""-"" (") """ (string_content) "-" (") """ ()) ")" ()) ")" (expression_statement) "filename = "/dev/stdin";" (assignment_expression) "filename = "/dev/stdin"" (identifier) "filename" (=) "=" (string_literal) ""/dev/stdin"" (") """ (string_content) "/dev/stdin" (") """ (;) ";" (comment) "/* check access */" (if_statement) "if (access(filename, R_OK)) {\n fprintf(stderr, "can't access file %s\n", filename);\n exit(1);\n }" (if) "if" (parenthesized_expression) "(access(filename, R_OK))" (() "(" (call_expression) "access(filename, R_OK)" (identifier) "access" (argument_list) "(filename, R_OK)" (() "(" (identifier) "filename" (,) "," (identifier) "R_OK" ()) ")" ()) ")" (compound_statement) "{\n fprintf(stderr, "can't access file %s\n", filename);\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr, "can't access file %s\n", filename);" (call_expression) "fprintf(stderr, "can't access file %s\n", filename)" (identifier) "fprintf" (argument_list) "(stderr, "can't access file %s\n", filename)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""can't access file %s\n"" (") """ (string_content) "can't access file %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "filename" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (comment) "/* read the file */" (expression_statement) "root = json_object_from_file(filename);" (assignment_expression) "root = json_object_from_file(filename)" (identifier) "root" (=) "=" (call_expression) "json_object_from_file(filename)" (identifier) "json_object_from_file" (argument_list) "(filename)" (() "(" (identifier) "filename" ()) ")" (;) ";" (if_statement) "if (!root) {\n fprintf(stderr, "reading file %s produced null\n", filename);\n exit(1);\n }" (if) "if" (parenthesized_expression) "(!root)" (() "(" (unary_expression) "!root" (!) "!" (identifier) "root" ()) ")" (compound_statement) "{\n fprintf(stderr, "reading file %s produced null\n", filename);\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr, "reading file %s produced null\n", filename);" (call_expression) "fprintf(stderr, "reading file %s produced null\n", filename)" (identifier) "fprintf" (argument_list) "(stderr, "reading file %s produced null\n", filename)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""reading file %s produced null\n"" (") """ (string_content) "reading file %s produced null" (escape_sequence) "\n" (") """ (,) "," (identifier) "filename" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (comment) "/* expand */" (expression_statement) "root = expand((struct path){ .object = root, .upper = NULL });" (assignment_expression) "root = expand((struct path){ .object = root, .upper = NULL })" (identifier) "root" (=) "=" (call_expression) "expand((struct path){ .object = root, .upper = NULL })" (identifier) "expand" (argument_list) "((struct path){ .object = root, .upper = NULL })" (() "(" (compound_literal_expression) "(struct path){ .object = root, .upper = NULL }" (() "(" (type_descriptor) "struct path" (struct_specifier) "struct path" (struct) "struct" (type_identifier) "path" ()) ")" (initializer_list) "{ .object = root, .upper = NULL }" ({) "{" (initializer_pair) ".object = root" (field_designator) ".object" (.) "." (field_identifier) "object" (=) "=" (identifier) "root" (,) "," (initializer_pair) ".upper = NULL" (field_designator) ".upper" (.) "." (field_identifier) "upper" (=) "=" (null) "NULL" (NULL) "NULL" (}) "}" ()) ")" (;) ";" (comment) "/* print the result */" (expression_statement) "json_object_to_file_ext ("/dev/stdout", root, JSON_C_TO_STRING_PRETTY);" (call_expression) "json_object_to_file_ext ("/dev/stdout", root, JSON_C_TO_STRING_PRETTY)" (identifier) "json_object_to_file_ext" (argument_list) "("/dev/stdout", root, JSON_C_TO_STRING_PRETTY)" (() "(" (string_literal) ""/dev/stdout"" (") """ (string_content) "/dev/stdout" (") """ (,) "," (identifier) "root" (,) "," (identifier) "JSON_C_TO_STRING_PRETTY" ()) ")" (;) ";" (comment) "/* clean up */" (expression_statement) "json_object_put(root);" (call_expression) "json_object_put(root)" (identifier) "json_object_put" (argument_list) "(root)" (() "(" (identifier) "root" ()) ")" (;) ";" (}) "}" (comment) "/** process the list of files or stdin if none */" (function_definition) "int main(int ac, char **av)\n{\n if (!*++av)\n process("-");\n else {\n do { process(*av); } while(*++av);\n }\n return 0;\n}" (primitive_type) "int" (function_declarator) "main(int ac, char **av)" (identifier) "main" (parameter_list) "(int ac, char **av)" (() "(" (parameter_declaration) "int ac" (primitive_type) "int" (identifier) "ac" (,) "," (parameter_declaration) "char **av" (primitive_type) "char" (pointer_declarator) "**av" (*) "*" (pointer_declarator) "*av" (*) "*" (identifier) "av" ()) ")" (compound_statement) "{\n if (!*++av)\n process("-");\n else {\n do { process(*av); } while(*++av);\n }\n return 0;\n}" ({) "{" (if_statement) "if (!*++av)\n process("-");\n else {\n do { process(*av); } while(*++av);\n }" (if) "if" (parenthesized_expression) "(!*++av)" (() "(" (unary_expression) "!*++av" (!) "!" (pointer_expression) "*++av" (*) "*" (update_expression) "++av" (++) "++" (identifier) "av" ()) ")" (expression_statement) "process("-");" (call_expression) "process("-")" (identifier) "process" (argument_list) "("-")" (() "(" (string_literal) ""-"" (") """ (string_content) "-" (") """ ()) ")" (;) ";" (else_clause) "else {\n do { process(*av); } while(*++av);\n }" (else) "else" (compound_statement) "{\n do { process(*av); } while(*++av);\n }" ({) "{" (do_statement) "do { process(*av); } while(*++av);" (do) "do" (compound_statement) "{ process(*av); }" ({) "{" (expression_statement) "process(*av);" (call_expression) "process(*av)" (identifier) "process" (argument_list) "(*av)" (() "(" (pointer_expression) "*av" (*) "*" (identifier) "av" ()) ")" (;) ";" (}) "}" (while) "while" (parenthesized_expression) "(*++av)" (() "(" (pointer_expression) "*++av" (*) "*" (update_expression) "++av" (++) "++" (identifier) "av" ()) ")" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
1,069
0
{"language": "c", "success": true, "metadata": {"lines": 181, "avg_line_length": 24.36, "nodes": 617, "errors": 0, "source_hash": "10e7ac2e25b70f7438db73ffe3fbf41afd9c0a46d5b4851cbeac944719a8a27c", "categorized_nodes": 443}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_def", "text": "#define _GNU_SOURCE\n", "parent": null, "children": [1, 2], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 1, "type": "#define", "text": "#define", "parent": 0, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 7}}, {"id": 2, "type": "identifier", "text": "_GNU_SOURCE", "parent": 0, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<string.h>", "parent": 3, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdio.h>", "parent": 6, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<unistd.h>", "parent": 9, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <json-c/json.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 48, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<json-c/json.h>", "parent": 12, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 24}}, {"id": 15, "type": "struct_specifier", "text": "struct path\n{\n\tstruct json_object *object;\t/**< node being expanded */\n\tstruct path *upper;\t\t/**< link to upper expanded nodes */\n}", "parent": null, "children": [16, 17], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 16, "type": "struct", "text": "struct", "parent": 15, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 17, "type": "type_identifier", "text": "path", "parent": 15, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 11}}, {"id": 18, "type": "field_declaration", "text": "struct json_object *object;", "parent": 15, "children": [19, 22], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 28}}, {"id": 19, "type": "struct_specifier", "text": "struct json_object", "parent": 18, "children": [20, 21], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 19}}, {"id": 20, "type": "struct", "text": "struct", "parent": 19, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 7}}, {"id": 21, "type": "type_identifier", "text": "json_object", "parent": 19, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 19}}, {"id": 22, "type": "pointer_declarator", "text": "*object", "parent": 18, "children": [23, 24], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 27}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 21}}, {"id": 24, "type": "field_identifier", "text": "object", "parent": 22, "children": [], "start_point": {"row": 54, "column": 21}, "end_point": {"row": 54, "column": 27}}, {"id": 25, "type": "field_declaration", "text": "struct path *upper;", "parent": 15, "children": [26, 29], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 20}}, {"id": 26, "type": "struct_specifier", "text": "struct path", "parent": 25, "children": [27, 28], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 12}}, {"id": 27, "type": "struct", "text": "struct", "parent": 26, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 7}}, {"id": 28, "type": "type_identifier", "text": "path", "parent": 26, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 12}}, {"id": 29, "type": "pointer_declarator", "text": "*upper", "parent": 25, "children": [30, 31], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 19}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 14}}, {"id": 31, "type": "field_identifier", "text": "upper", "parent": 29, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 19}}, {"id": 32, "type": "declaration", "text": "struct json_object *root;", "parent": null, "children": [33, 36], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 25}}, {"id": 33, "type": "struct_specifier", "text": "struct json_object", "parent": 32, "children": [34, 35], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 18}}, {"id": 34, "type": "struct", "text": "struct", "parent": 33, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 6}}, {"id": 35, "type": "type_identifier", "text": "json_object", "parent": 33, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 18}}, {"id": 36, "type": "pointer_declarator", "text": "*root", "parent": 32, "children": [37, 38], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 24}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 20}}, {"id": 38, "type": "identifier", "text": "root", "parent": 36, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 24}}, {"id": 39, "type": "function_definition", "text": "struct json_object *search(const char *path)\n{\n\tchar *d;\n\tstruct json_object *i;\n\n\t/* does it match #/ at the beginning? */\n\tif (path[0] != '#' || (path[0] && path[1] != '/'))\n\t\treturn NULL;\n\n\t/* search from root to target */\n\ti = root;\n\td = strdupa(path+2);\n\td = strtok(d, \"/\");\n\twhile(i && d) {\n\t\tif (!json_object_object_get_ex(i, d, &i))\n\t\t\treturn NULL;\n\t\td = strtok(NULL, \"/\");\n\t}\n\treturn i;\n}", "parent": null, "children": [40, 43], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 86, "column": 1}}, {"id": 40, "type": "struct_specifier", "text": "struct json_object", "parent": 39, "children": [41, 42], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 18}}, {"id": 41, "type": "struct", "text": "struct", "parent": 40, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 6}}, {"id": 42, "type": "type_identifier", "text": "json_object", "parent": 40, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 18}}, {"id": 43, "type": "pointer_declarator", "text": "*search(const char *path)", "parent": 39, "children": [44, 45], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 44}}, {"id": 44, "type": "*", "text": "*", "parent": 43, "children": [], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 20}}, {"id": 45, "type": "function_declarator", "text": "search(const char *path)", "parent": 43, "children": [46, 47], "start_point": {"row": 67, "column": 20}, "end_point": {"row": 67, "column": 44}}, {"id": 46, "type": "identifier", "text": "search", "parent": 45, "children": [], "start_point": {"row": 67, "column": 20}, "end_point": {"row": 67, "column": 26}}, {"id": 47, "type": "parameter_list", "text": "(const char *path)", "parent": 45, "children": [48], "start_point": {"row": 67, "column": 26}, "end_point": {"row": 67, "column": 44}}, {"id": 48, "type": "parameter_declaration", "text": "const char *path", "parent": 47, "children": [49, 50], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 43}}, {"id": 49, "type": "primitive_type", "text": "char", "parent": 48, "children": [], "start_point": {"row": 67, "column": 33}, "end_point": {"row": 67, "column": 37}}, {"id": 50, "type": "pointer_declarator", "text": "*path", "parent": 48, "children": [51, 52], "start_point": {"row": 67, "column": 38}, "end_point": {"row": 67, "column": 43}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 67, "column": 38}, "end_point": {"row": 67, "column": 39}}, {"id": 52, "type": "identifier", "text": "path", "parent": 50, "children": [], "start_point": {"row": 67, "column": 39}, "end_point": {"row": 67, "column": 43}}, {"id": 53, "type": "declaration", "text": "char *d;", "parent": 39, "children": [54, 55], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 9}}, {"id": 54, "type": "primitive_type", "text": "char", "parent": 53, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 5}}, {"id": 55, "type": "pointer_declarator", "text": "*d", "parent": 53, "children": [56, 57], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 8}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 7}}, {"id": 57, "type": "identifier", "text": "d", "parent": 55, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 8}}, {"id": 58, "type": "declaration", "text": "struct json_object *i;", "parent": 39, "children": [59, 62], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 23}}, {"id": 59, "type": "struct_specifier", "text": "struct json_object", "parent": 58, "children": [60, 61], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 19}}, {"id": 60, "type": "struct", "text": "struct", "parent": 59, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 7}}, {"id": 61, "type": "type_identifier", "text": "json_object", "parent": 59, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 19}}, {"id": 62, "type": "pointer_declarator", "text": "*i", "parent": 58, "children": [63, 64], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 22}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 21}}, {"id": 64, "type": "identifier", "text": "i", "parent": 62, "children": [], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 22}}, {"id": 65, "type": "if_statement", "text": "if (path[0] != '#' || (path[0] && path[1] != '/'))\n\t\treturn NULL;", "parent": 39, "children": [66, 93], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 74, "column": 14}}, {"id": 66, "type": "parenthesized_expression", "text": "(path[0] != '#' || (path[0] && path[1] != '/'))", "parent": 65, "children": [67], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 51}}, {"id": 67, "type": "binary_expression", "text": "path[0] != '#' || (path[0] && path[1] != '/')", "parent": 66, "children": [68, 77, 78], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 50}}, {"id": 68, "type": "binary_expression", "text": "path[0] != '#'", "parent": 67, "children": [69, 72, 73], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 19}}, {"id": 69, "type": "subscript_expression", "text": "path[0]", "parent": 68, "children": [70, 71], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 12}}, {"id": 70, "type": "identifier", "text": "path", "parent": 69, "children": [], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 9}}, {"id": 71, "type": "number_literal", "text": "0", "parent": 69, "children": [], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 11}}, {"id": 72, "type": "!=", "text": "!=", "parent": 68, "children": [], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 15}}, {"id": 73, "type": "char_literal", "text": "'#'", "parent": 68, "children": [74, 75, 76], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 19}}, {"id": 74, "type": "'", "text": "'", "parent": 73, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 17}}, {"id": 75, "type": "character", "text": "#", "parent": 73, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 18}}, {"id": 76, "type": "'", "text": "'", "parent": 73, "children": [], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 19}}, {"id": 77, "type": "||", "text": "||", "parent": 67, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 22}}, {"id": 78, "type": "parenthesized_expression", "text": "(path[0] && path[1] != '/')", "parent": 67, "children": [79], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 50}}, {"id": 79, "type": "binary_expression", "text": "path[0] && path[1] != '/'", "parent": 78, "children": [80, 83, 84], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 49}}, {"id": 80, "type": "subscript_expression", "text": "path[0]", "parent": 79, "children": [81, 82], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 31}}, {"id": 81, "type": "identifier", "text": "path", "parent": 80, "children": [], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 28}}, {"id": 82, "type": "number_literal", "text": "0", "parent": 80, "children": [], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 30}}, {"id": 83, "type": "&&", "text": "&&", "parent": 79, "children": [], "start_point": {"row": 73, "column": 32}, "end_point": {"row": 73, "column": 34}}, {"id": 84, "type": "binary_expression", "text": "path[1] != '/'", "parent": 79, "children": [85, 88, 89], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 49}}, {"id": 85, "type": "subscript_expression", "text": "path[1]", "parent": 84, "children": [86, 87], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 42}}, {"id": 86, "type": "identifier", "text": "path", "parent": 85, "children": [], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 39}}, {"id": 87, "type": "number_literal", "text": "1", "parent": 85, "children": [], "start_point": {"row": 73, "column": 40}, "end_point": {"row": 73, "column": 41}}, {"id": 88, "type": "!=", "text": "!=", "parent": 84, "children": [], "start_point": {"row": 73, "column": 43}, "end_point": {"row": 73, "column": 45}}, {"id": 89, "type": "char_literal", "text": "'/'", "parent": 84, "children": [90, 91, 92], "start_point": {"row": 73, "column": 46}, "end_point": {"row": 73, "column": 49}}, {"id": 90, "type": "'", "text": "'", "parent": 89, "children": [], "start_point": {"row": 73, "column": 46}, "end_point": {"row": 73, "column": 47}}, {"id": 91, "type": "character", "text": "/", "parent": 89, "children": [], "start_point": {"row": 73, "column": 47}, "end_point": {"row": 73, "column": 48}}, {"id": 92, "type": "'", "text": "'", "parent": 89, "children": [], "start_point": {"row": 73, "column": 48}, "end_point": {"row": 73, "column": 49}}, {"id": 93, "type": "return_statement", "text": "return NULL;", "parent": 65, "children": [94], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 14}}, {"id": 94, "type": "null", "text": "NULL", "parent": 93, "children": [95], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 13}}, {"id": 95, "type": "NULL", "text": "NULL", "parent": 94, "children": [], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 13}}, {"id": 96, "type": "assignment_expression", "text": "i = root", "parent": 39, "children": [97, 98, 99], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 9}}, {"id": 97, "type": "identifier", "text": "i", "parent": 96, "children": [], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 2}}, {"id": 98, "type": "=", "text": "=", "parent": 96, "children": [], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 4}}, {"id": 99, "type": "identifier", "text": "root", "parent": 96, "children": [], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 9}}, {"id": 100, "type": "assignment_expression", "text": "d = strdupa(path+2)", "parent": 39, "children": [101, 102, 103], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 20}}, {"id": 101, "type": "identifier", "text": "d", "parent": 100, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 2}}, {"id": 102, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 78, "column": 3}, "end_point": {"row": 78, "column": 4}}, {"id": 103, "type": "call_expression", "text": "strdupa(path+2)", "parent": 100, "children": [104, 105], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 20}}, {"id": 104, "type": "identifier", "text": "strdupa", "parent": 103, "children": [], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 12}}, {"id": 105, "type": "argument_list", "text": "(path+2)", "parent": 103, "children": [106], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 20}}, {"id": 106, "type": "binary_expression", "text": "path+2", "parent": 105, "children": [107, 108, 109], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 19}}, {"id": 107, "type": "identifier", "text": "path", "parent": 106, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 17}}, {"id": 108, "type": "+", "text": "+", "parent": 106, "children": [], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 18}}, {"id": 109, "type": "number_literal", "text": "2", "parent": 106, "children": [], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 78, "column": 19}}, {"id": 110, "type": "assignment_expression", "text": "d = strtok(d, \"/\")", "parent": 39, "children": [111, 112, 113], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 19}}, {"id": 111, "type": "identifier", "text": "d", "parent": 110, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 2}}, {"id": 112, "type": "=", "text": "=", "parent": 110, "children": [], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 4}}, {"id": 113, "type": "call_expression", "text": "strtok(d, \"/\")", "parent": 110, "children": [114, 115], "start_point": {"row": 79, "column": 5}, "end_point": {"row": 79, "column": 19}}, {"id": 114, "type": "identifier", "text": "strtok", "parent": 113, "children": [], "start_point": {"row": 79, "column": 5}, "end_point": {"row": 79, "column": 11}}, {"id": 115, "type": "argument_list", "text": "(d, \"/\")", "parent": 113, "children": [116, 117], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 19}}, {"id": 116, "type": "identifier", "text": "d", "parent": 115, "children": [], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 13}}, {"id": 117, "type": "string_literal", "text": "\"/\"", "parent": 115, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 18}}, {"id": 118, "type": "while_statement", "text": "while(i && d) {\n\t\tif (!json_object_object_get_ex(i, d, &i))\n\t\t\treturn NULL;\n\t\td = strtok(NULL, \"/\");\n\t}", "parent": 39, "children": [119], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 84, "column": 2}}, {"id": 119, "type": "parenthesized_expression", "text": "(i && d)", "parent": 118, "children": [120], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 14}}, {"id": 120, "type": "binary_expression", "text": "i && d", "parent": 119, "children": [121, 122, 123], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 13}}, {"id": 121, "type": "identifier", "text": "i", "parent": 120, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 8}}, {"id": 122, "type": "&&", "text": "&&", "parent": 120, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 11}}, {"id": 123, "type": "identifier", "text": "d", "parent": 120, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 13}}, {"id": 124, "type": "if_statement", "text": "if (!json_object_object_get_ex(i, d, &i))\n\t\t\treturn NULL;", "parent": 118, "children": [125, 135], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 82, "column": 15}}, {"id": 125, "type": "parenthesized_expression", "text": "(!json_object_object_get_ex(i, d, &i))", "parent": 124, "children": [126], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 43}}, {"id": 126, "type": "unary_expression", "text": "!json_object_object_get_ex(i, d, &i)", "parent": 125, "children": [127, 128], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 42}}, {"id": 127, "type": "!", "text": "!", "parent": 126, "children": [], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 7}}, {"id": 128, "type": "call_expression", "text": "json_object_object_get_ex(i, d, &i)", "parent": 126, "children": [129, 130], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 42}}, {"id": 129, "type": "identifier", "text": "json_object_object_get_ex", "parent": 128, "children": [], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 32}}, {"id": 130, "type": "argument_list", "text": "(i, d, &i)", "parent": 128, "children": [131, 132, 133], "start_point": {"row": 81, "column": 32}, "end_point": {"row": 81, "column": 42}}, {"id": 131, "type": "identifier", "text": "i", "parent": 130, "children": [], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 34}}, {"id": 132, "type": "identifier", "text": "d", "parent": 130, "children": [], "start_point": {"row": 81, "column": 36}, "end_point": {"row": 81, "column": 37}}, {"id": 133, "type": "pointer_expression", "text": "&i", "parent": 130, "children": [134], "start_point": {"row": 81, "column": 39}, "end_point": {"row": 81, "column": 41}}, {"id": 134, "type": "identifier", "text": "i", "parent": 133, "children": [], "start_point": {"row": 81, "column": 40}, "end_point": {"row": 81, "column": 41}}, {"id": 135, "type": "return_statement", "text": "return NULL;", "parent": 124, "children": [136], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 15}}, {"id": 136, "type": "null", "text": "NULL", "parent": 135, "children": [137], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 14}}, {"id": 137, "type": "NULL", "text": "NULL", "parent": 136, "children": [], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 14}}, {"id": 138, "type": "assignment_expression", "text": "d = strtok(NULL, \"/\")", "parent": 118, "children": [139, 140, 141], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 23}}, {"id": 139, "type": "identifier", "text": "d", "parent": 138, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 3}}, {"id": 140, "type": "=", "text": "=", "parent": 138, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 5}}, {"id": 141, "type": "call_expression", "text": "strtok(NULL, \"/\")", "parent": 138, "children": [142, 143], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 23}}, {"id": 142, "type": "identifier", "text": "strtok", "parent": 141, "children": [], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 12}}, {"id": 143, "type": "argument_list", "text": "(NULL, \"/\")", "parent": 141, "children": [144, 146], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 23}}, {"id": 144, "type": "null", "text": "NULL", "parent": 143, "children": [145], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 17}}, {"id": 145, "type": "NULL", "text": "NULL", "parent": 144, "children": [], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 17}}, {"id": 146, "type": "string_literal", "text": "\"/\"", "parent": 143, "children": [], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 22}}, {"id": 147, "type": "return_statement", "text": "return i;", "parent": 39, "children": [148], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 10}}, {"id": 148, "type": "identifier", "text": "i", "parent": 147, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 9}}, {"id": 149, "type": "function_definition", "text": "struct json_object *expand(struct path path)\n{\n\tstruct path *p;\n\tstruct json_object *o, *x;\n\tint n, i;\n\tstruct json_object_iterator ji, jn;\n\n\t/* expansion depends of the type of the node */\n\tswitch (json_object_get_type(path.object)) {\n\tcase json_type_object:\n\t\t/* for object, look if it contains a property \"$ref\" */\n\t\tif (json_object_object_get_ex(path.object, \"$ref\", &o)) {\n\t\t\t/* yes, reference, try to substitute its target */\n\t\t\tif (!json_object_is_type(o, json_type_string)) {\n\t\t\t\tfprintf(stderr, \"found a $ref not being string. Is: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tx = search(json_object_get_string(o));\n\t\t\tif (!x) {\n\t\t\t\tfprintf(stderr, \"$ref not found. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tp = &path;\n\t\t\twhile(p) {\n\t\t\t\tif (x == p->object) {\n\t\t\t\t\tfprintf(stderr, \"$ref recursive. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\t\texit(1);\n\t\t\t\t}\n\t\t\t\tp = p->upper;\n\t\t\t}\n\t\t\t/* cool found, return a new instance of the target */\n\t\t\treturn json_object_get(x);\n\t\t}\n\t\t/* no, expand the values */\n\t\tji = json_object_iter_begin(path.object);\n\t\tjn = json_object_iter_end(path.object);\n\t\twhile (!json_object_iter_equal(&ji, &jn)) {\n\t\t\to = json_object_iter_peek_value(&ji);\n\t\t\tx = expand((struct path){ .object = o, .upper = &path });\n\t\t\tif (x != o)\n\t\t\t\tjson_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n\t\t\tjson_object_iter_next(&ji);\n\t\t}\n\t\tbreak;\n\tcase json_type_array:\n\t\t/* expand the values of arrays */\n\t\ti = 0;\n\t\tn = (int)json_object_array_length(path.object);\n\t\twhile (i != n) {\n\t\t\to = json_object_array_get_idx(path.object, i);\n\t\t\tx = expand((struct path){ .object = o, .upper = &path });\n\t\t\tif (x != o)\n\t\t\t\tjson_object_array_put_idx(path.object, i, x);\n\t\t\ti++;\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\t/* otherwise no expansion */\n\t\tbreak;\n\t}\n\t/* return the given node */\n\treturn path.object;\n}", "parent": null, "children": [150, 153], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 153, "column": 1}}, {"id": 150, "type": "struct_specifier", "text": "struct json_object", "parent": 149, "children": [151, 152], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 18}}, {"id": 151, "type": "struct", "text": "struct", "parent": 150, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 6}}, {"id": 152, "type": "type_identifier", "text": "json_object", "parent": 150, "children": [], "start_point": {"row": 91, "column": 7}, "end_point": {"row": 91, "column": 18}}, {"id": 153, "type": "pointer_declarator", "text": "*expand(struct path path)", "parent": 149, "children": [154, 155], "start_point": {"row": 91, "column": 19}, "end_point": {"row": 91, "column": 44}}, {"id": 154, "type": "*", "text": "*", "parent": 153, "children": [], "start_point": {"row": 91, "column": 19}, "end_point": {"row": 91, "column": 20}}, {"id": 155, "type": "function_declarator", "text": "expand(struct path path)", "parent": 153, "children": [156, 157], "start_point": {"row": 91, "column": 20}, "end_point": {"row": 91, "column": 44}}, {"id": 156, "type": "identifier", "text": "expand", "parent": 155, "children": [], "start_point": {"row": 91, "column": 20}, "end_point": {"row": 91, "column": 26}}, {"id": 157, "type": "parameter_list", "text": "(struct path path)", "parent": 155, "children": [158], "start_point": {"row": 91, "column": 26}, "end_point": {"row": 91, "column": 44}}, {"id": 158, "type": "parameter_declaration", "text": "struct path path", "parent": 157, "children": [159, 162], "start_point": {"row": 91, "column": 27}, "end_point": {"row": 91, "column": 43}}, {"id": 159, "type": "struct_specifier", "text": "struct path", "parent": 158, "children": [160, 161], "start_point": {"row": 91, "column": 27}, "end_point": {"row": 91, "column": 38}}, {"id": 160, "type": "struct", "text": "struct", "parent": 159, "children": [], "start_point": {"row": 91, "column": 27}, "end_point": {"row": 91, "column": 33}}, {"id": 161, "type": "type_identifier", "text": "path", "parent": 159, "children": [], "start_point": {"row": 91, "column": 34}, "end_point": {"row": 91, "column": 38}}, {"id": 162, "type": "identifier", "text": "path", "parent": 158, "children": [], "start_point": {"row": 91, "column": 39}, "end_point": {"row": 91, "column": 43}}, {"id": 163, "type": "declaration", "text": "struct path *p;", "parent": 149, "children": [164, 167], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 16}}, {"id": 164, "type": "struct_specifier", "text": "struct path", "parent": 163, "children": [165, 166], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 12}}, {"id": 165, "type": "struct", "text": "struct", "parent": 164, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 7}}, {"id": 166, "type": "type_identifier", "text": "path", "parent": 164, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 12}}, {"id": 167, "type": "pointer_declarator", "text": "*p", "parent": 163, "children": [168, 169], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 15}}, {"id": 168, "type": "*", "text": "*", "parent": 167, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 14}}, {"id": 169, "type": "identifier", "text": "p", "parent": 167, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 15}}, {"id": 170, "type": "declaration", "text": "struct json_object *o, *x;", "parent": 149, "children": [171, 174, 177], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 27}}, {"id": 171, "type": "struct_specifier", "text": "struct json_object", "parent": 170, "children": [172, 173], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 19}}, {"id": 172, "type": "struct", "text": "struct", "parent": 171, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 7}}, {"id": 173, "type": "type_identifier", "text": "json_object", "parent": 171, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 19}}, {"id": 174, "type": "pointer_declarator", "text": "*o", "parent": 170, "children": [175, 176], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 22}}, {"id": 175, "type": "*", "text": "*", "parent": 174, "children": [], "start_point": {"row": 94, "column": 20}, "end_point": {"row": 94, "column": 21}}, {"id": 176, "type": "identifier", "text": "o", "parent": 174, "children": [], "start_point": {"row": 94, "column": 21}, "end_point": {"row": 94, "column": 22}}, {"id": 177, "type": "pointer_declarator", "text": "*x", "parent": 170, "children": [178, 179], "start_point": {"row": 94, "column": 24}, "end_point": {"row": 94, "column": 26}}, {"id": 178, "type": "*", "text": "*", "parent": 177, "children": [], "start_point": {"row": 94, "column": 24}, "end_point": {"row": 94, "column": 25}}, {"id": 179, "type": "identifier", "text": "x", "parent": 177, "children": [], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 26}}, {"id": 180, "type": "declaration", "text": "int n, i;", "parent": 149, "children": [181, 182, 183], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 10}}, {"id": 181, "type": "primitive_type", "text": "int", "parent": 180, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 4}}, {"id": 182, "type": "identifier", "text": "n", "parent": 180, "children": [], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 6}}, {"id": 183, "type": "identifier", "text": "i", "parent": 180, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 9}}, {"id": 184, "type": "declaration", "text": "struct json_object_iterator ji, jn;", "parent": 149, "children": [185, 188, 189], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 36}}, {"id": 185, "type": "struct_specifier", "text": "struct json_object_iterator", "parent": 184, "children": [186, 187], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 28}}, {"id": 186, "type": "struct", "text": "struct", "parent": 185, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 7}}, {"id": 187, "type": "type_identifier", "text": "json_object_iterator", "parent": 185, "children": [], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 28}}, {"id": 188, "type": "identifier", "text": "ji", "parent": 184, "children": [], "start_point": {"row": 96, "column": 29}, "end_point": {"row": 96, "column": 31}}, {"id": 189, "type": "identifier", "text": "jn", "parent": 184, "children": [], "start_point": {"row": 96, "column": 33}, "end_point": {"row": 96, "column": 35}}, {"id": 190, "type": "switch_statement", "text": "switch (json_object_get_type(path.object)) {\n\tcase json_type_object:\n\t\t/* for object, look if it contains a property \"$ref\" */\n\t\tif (json_object_object_get_ex(path.object, \"$ref\", &o)) {\n\t\t\t/* yes, reference, try to substitute its target */\n\t\t\tif (!json_object_is_type(o, json_type_string)) {\n\t\t\t\tfprintf(stderr, \"found a $ref not being string. Is: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tx = search(json_object_get_string(o));\n\t\t\tif (!x) {\n\t\t\t\tfprintf(stderr, \"$ref not found. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tp = &path;\n\t\t\twhile(p) {\n\t\t\t\tif (x == p->object) {\n\t\t\t\t\tfprintf(stderr, \"$ref recursive. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\t\texit(1);\n\t\t\t\t}\n\t\t\t\tp = p->upper;\n\t\t\t}\n\t\t\t/* cool found, return a new instance of the target */\n\t\t\treturn json_object_get(x);\n\t\t}\n\t\t/* no, expand the values */\n\t\tji = json_object_iter_begin(path.object);\n\t\tjn = json_object_iter_end(path.object);\n\t\twhile (!json_object_iter_equal(&ji, &jn)) {\n\t\t\to = json_object_iter_peek_value(&ji);\n\t\t\tx = expand((struct path){ .object = o, .upper = &path });\n\t\t\tif (x != o)\n\t\t\t\tjson_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n\t\t\tjson_object_iter_next(&ji);\n\t\t}\n\t\tbreak;\n\tcase json_type_array:\n\t\t/* expand the values of arrays */\n\t\ti = 0;\n\t\tn = (int)json_object_array_length(path.object);\n\t\twhile (i != n) {\n\t\t\to = json_object_array_get_idx(path.object, i);\n\t\t\tx = expand((struct path){ .object = o, .upper = &path });\n\t\t\tif (x != o)\n\t\t\t\tjson_object_array_put_idx(path.object, i, x);\n\t\t\ti++;\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\t/* otherwise no expansion */\n\t\tbreak;\n\t}", "parent": 149, "children": [191, 192], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 150, "column": 2}}, {"id": 191, "type": "switch", "text": "switch", "parent": 190, "children": [], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 7}}, {"id": 192, "type": "parenthesized_expression", "text": "(json_object_get_type(path.object))", "parent": 190, "children": [193], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 43}}, {"id": 193, "type": "call_expression", "text": "json_object_get_type(path.object)", "parent": 192, "children": [194, 195], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 42}}, {"id": 194, "type": "identifier", "text": "json_object_get_type", "parent": 193, "children": [], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 29}}, {"id": 195, "type": "argument_list", "text": "(path.object)", "parent": 193, "children": [196], "start_point": {"row": 99, "column": 29}, "end_point": {"row": 99, "column": 42}}, {"id": 196, "type": "field_expression", "text": "path.object", "parent": 195, "children": [197, 198], "start_point": {"row": 99, "column": 30}, "end_point": {"row": 99, "column": 41}}, {"id": 197, "type": "identifier", "text": "path", "parent": 196, "children": [], "start_point": {"row": 99, "column": 30}, "end_point": {"row": 99, "column": 34}}, {"id": 198, "type": "field_identifier", "text": "object", "parent": 196, "children": [], "start_point": {"row": 99, "column": 35}, "end_point": {"row": 99, "column": 41}}, {"id": 199, "type": "case_statement", "text": "case json_type_object:\n\t\t/* for object, look if it contains a property \"$ref\" */\n\t\tif (json_object_object_get_ex(path.object, \"$ref\", &o)) {\n\t\t\t/* yes, reference, try to substitute its target */\n\t\t\tif (!json_object_is_type(o, json_type_string)) {\n\t\t\t\tfprintf(stderr, \"found a $ref not being string. Is: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tx = search(json_object_get_string(o));\n\t\t\tif (!x) {\n\t\t\t\tfprintf(stderr, \"$ref not found. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tp = &path;\n\t\t\twhile(p) {\n\t\t\t\tif (x == p->object) {\n\t\t\t\t\tfprintf(stderr, \"$ref recursive. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\t\texit(1);\n\t\t\t\t}\n\t\t\t\tp = p->upper;\n\t\t\t}\n\t\t\t/* cool found, return a new instance of the target */\n\t\t\treturn json_object_get(x);\n\t\t}\n\t\t/* no, expand the values */\n\t\tji = json_object_iter_begin(path.object);\n\t\tjn = json_object_iter_end(path.object);\n\t\twhile (!json_object_iter_equal(&ji, &jn)) {\n\t\t\to = json_object_iter_peek_value(&ji);\n\t\t\tx = expand((struct path){ .object = o, .upper = &path });\n\t\t\tif (x != o)\n\t\t\t\tjson_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n\t\t\tjson_object_iter_next(&ji);\n\t\t}\n\t\tbreak;", "parent": 190, "children": [200, 201, 202, 324, 389], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 134, "column": 8}}, {"id": 200, "type": "case", "text": "case", "parent": 199, "children": [], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 5}}, {"id": 201, "type": "identifier", "text": "json_type_object", "parent": 199, "children": [], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 22}}, {"id": 202, "type": "if_statement", "text": "if (json_object_object_get_ex(path.object, \"$ref\", &o)) {\n\t\t\t/* yes, reference, try to substitute its target */\n\t\t\tif (!json_object_is_type(o, json_type_string)) {\n\t\t\t\tfprintf(stderr, \"found a $ref not being string. Is: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tx = search(json_object_get_string(o));\n\t\t\tif (!x) {\n\t\t\t\tfprintf(stderr, \"$ref not found. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tp = &path;\n\t\t\twhile(p) {\n\t\t\t\tif (x == p->object) {\n\t\t\t\t\tfprintf(stderr, \"$ref recursive. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\t\texit(1);\n\t\t\t\t}\n\t\t\t\tp = p->upper;\n\t\t\t}\n\t\t\t/* cool found, return a new instance of the target */\n\t\t\treturn json_object_get(x);\n\t\t}", "parent": 199, "children": [203], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 123, "column": 3}}, {"id": 203, "type": "parenthesized_expression", "text": "(json_object_object_get_ex(path.object, \"$ref\", &o))", "parent": 202, "children": [204], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 57}}, {"id": 204, "type": "call_expression", "text": "json_object_object_get_ex(path.object, \"$ref\", &o)", "parent": 203, "children": [205, 206], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 56}}, {"id": 205, "type": "identifier", "text": "json_object_object_get_ex", "parent": 204, "children": [], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 31}}, {"id": 206, "type": "argument_list", "text": "(path.object, \"$ref\", &o)", "parent": 204, "children": [207, 210, 211], "start_point": {"row": 102, "column": 31}, "end_point": {"row": 102, "column": 56}}, {"id": 207, "type": "field_expression", "text": "path.object", "parent": 206, "children": [208, 209], "start_point": {"row": 102, "column": 32}, "end_point": {"row": 102, "column": 43}}, {"id": 208, "type": "identifier", "text": "path", "parent": 207, "children": [], "start_point": {"row": 102, "column": 32}, "end_point": {"row": 102, "column": 36}}, {"id": 209, "type": "field_identifier", "text": "object", "parent": 207, "children": [], "start_point": {"row": 102, "column": 37}, "end_point": {"row": 102, "column": 43}}, {"id": 210, "type": "string_literal", "text": "\"$ref\"", "parent": 206, "children": [], "start_point": {"row": 102, "column": 45}, "end_point": {"row": 102, "column": 51}}, {"id": 211, "type": "pointer_expression", "text": "&o", "parent": 206, "children": [212], "start_point": {"row": 102, "column": 53}, "end_point": {"row": 102, "column": 55}}, {"id": 212, "type": "identifier", "text": "o", "parent": 211, "children": [], "start_point": {"row": 102, "column": 54}, "end_point": {"row": 102, "column": 55}}, {"id": 213, "type": "if_statement", "text": "if (!json_object_is_type(o, json_type_string)) {\n\t\t\t\tfprintf(stderr, \"found a $ref not being string. Is: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}", "parent": 202, "children": [214], "start_point": {"row": 104, "column": 3}, "end_point": {"row": 107, "column": 4}}, {"id": 214, "type": "parenthesized_expression", "text": "(!json_object_is_type(o, json_type_string))", "parent": 213, "children": [215], "start_point": {"row": 104, "column": 6}, "end_point": {"row": 104, "column": 49}}, {"id": 215, "type": "unary_expression", "text": "!json_object_is_type(o, json_type_string)", "parent": 214, "children": [216, 217], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 104, "column": 48}}, {"id": 216, "type": "!", "text": "!", "parent": 215, "children": [], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 104, "column": 8}}, {"id": 217, "type": "call_expression", "text": "json_object_is_type(o, json_type_string)", "parent": 215, "children": [218, 219], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 48}}, {"id": 218, "type": "identifier", "text": "json_object_is_type", "parent": 217, "children": [], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 27}}, {"id": 219, "type": "argument_list", "text": "(o, json_type_string)", "parent": 217, "children": [220, 221], "start_point": {"row": 104, "column": 27}, "end_point": {"row": 104, "column": 48}}, {"id": 220, "type": "identifier", "text": "o", "parent": 219, "children": [], "start_point": {"row": 104, "column": 28}, "end_point": {"row": 104, "column": 29}}, {"id": 221, "type": "identifier", "text": "json_type_string", "parent": 219, "children": [], "start_point": {"row": 104, "column": 31}, "end_point": {"row": 104, "column": 47}}, {"id": 222, "type": "call_expression", "text": "fprintf(stderr, \"found a $ref not being string. Is: %s\\n\", json_object_get_string(o))", "parent": 213, "children": [223, 224], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 89}}, {"id": 223, "type": "identifier", "text": "fprintf", "parent": 222, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 11}}, {"id": 224, "type": "argument_list", "text": "(stderr, \"found a $ref not being string. Is: %s\\n\", json_object_get_string(o))", "parent": 222, "children": [225, 226, 228], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 89}}, {"id": 225, "type": "identifier", "text": "stderr", "parent": 224, "children": [], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 18}}, {"id": 226, "type": "string_literal", "text": "\"found a $ref not being string. Is: %s\\n\"", "parent": 224, "children": [227], "start_point": {"row": 105, "column": 20}, "end_point": {"row": 105, "column": 61}}, {"id": 227, "type": "escape_sequence", "text": "\\n", "parent": 226, "children": [], "start_point": {"row": 105, "column": 58}, "end_point": {"row": 105, "column": 60}}, {"id": 228, "type": "call_expression", "text": "json_object_get_string(o)", "parent": 224, "children": [229, 230], "start_point": {"row": 105, "column": 63}, "end_point": {"row": 105, "column": 88}}, {"id": 229, "type": "identifier", "text": "json_object_get_string", "parent": 228, "children": [], "start_point": {"row": 105, "column": 63}, "end_point": {"row": 105, "column": 85}}, {"id": 230, "type": "argument_list", "text": "(o)", "parent": 228, "children": [231], "start_point": {"row": 105, "column": 85}, "end_point": {"row": 105, "column": 88}}, {"id": 231, "type": "identifier", "text": "o", "parent": 230, "children": [], "start_point": {"row": 105, "column": 86}, "end_point": {"row": 105, "column": 87}}, {"id": 232, "type": "call_expression", "text": "exit(1)", "parent": 213, "children": [233, 234], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 11}}, {"id": 233, "type": "identifier", "text": "exit", "parent": 232, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 8}}, {"id": 234, "type": "argument_list", "text": "(1)", "parent": 232, "children": [235], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 11}}, {"id": 235, "type": "number_literal", "text": "1", "parent": 234, "children": [], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 10}}, {"id": 236, "type": "assignment_expression", "text": "x = search(json_object_get_string(o))", "parent": 202, "children": [237, 238, 239], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 108, "column": 40}}, {"id": 237, "type": "identifier", "text": "x", "parent": 236, "children": [], "start_point": {"row": 108, "column": 3}, "end_point": {"row": 108, "column": 4}}, {"id": 238, "type": "=", "text": "=", "parent": 236, "children": [], "start_point": {"row": 108, "column": 5}, "end_point": {"row": 108, "column": 6}}, {"id": 239, "type": "call_expression", "text": "search(json_object_get_string(o))", "parent": 236, "children": [240, 241], "start_point": {"row": 108, "column": 7}, "end_point": {"row": 108, "column": 40}}, {"id": 240, "type": "identifier", "text": "search", "parent": 239, "children": [], "start_point": {"row": 108, "column": 7}, "end_point": {"row": 108, "column": 13}}, {"id": 241, "type": "argument_list", "text": "(json_object_get_string(o))", "parent": 239, "children": [242], "start_point": {"row": 108, "column": 13}, "end_point": {"row": 108, "column": 40}}, {"id": 242, "type": "call_expression", "text": "json_object_get_string(o)", "parent": 241, "children": [243, 244], "start_point": {"row": 108, "column": 14}, "end_point": {"row": 108, "column": 39}}, {"id": 243, "type": "identifier", "text": "json_object_get_string", "parent": 242, "children": [], "start_point": {"row": 108, "column": 14}, "end_point": {"row": 108, "column": 36}}, {"id": 244, "type": "argument_list", "text": "(o)", "parent": 242, "children": [245], "start_point": {"row": 108, "column": 36}, "end_point": {"row": 108, "column": 39}}, {"id": 245, "type": "identifier", "text": "o", "parent": 244, "children": [], "start_point": {"row": 108, "column": 37}, "end_point": {"row": 108, "column": 38}}, {"id": 246, "type": "if_statement", "text": "if (!x) {\n\t\t\t\tfprintf(stderr, \"$ref not found. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}", "parent": 202, "children": [247], "start_point": {"row": 109, "column": 3}, "end_point": {"row": 112, "column": 4}}, {"id": 247, "type": "parenthesized_expression", "text": "(!x)", "parent": 246, "children": [248], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 10}}, {"id": 248, "type": "unary_expression", "text": "!x", "parent": 247, "children": [249, 250], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 9}}, {"id": 249, "type": "!", "text": "!", "parent": 248, "children": [], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 8}}, {"id": 250, "type": "identifier", "text": "x", "parent": 248, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 9}}, {"id": 251, "type": "call_expression", "text": "fprintf(stderr, \"$ref not found. Was: %s\\n\", json_object_get_string(o))", "parent": 246, "children": [252, 253], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 75}}, {"id": 252, "type": "identifier", "text": "fprintf", "parent": 251, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 11}}, {"id": 253, "type": "argument_list", "text": "(stderr, \"$ref not found. Was: %s\\n\", json_object_get_string(o))", "parent": 251, "children": [254, 255, 257], "start_point": {"row": 110, "column": 11}, "end_point": {"row": 110, "column": 75}}, {"id": 254, "type": "identifier", "text": "stderr", "parent": 253, "children": [], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 110, "column": 18}}, {"id": 255, "type": "string_literal", "text": "\"$ref not found. Was: %s\\n\"", "parent": 253, "children": [256], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 47}}, {"id": 256, "type": "escape_sequence", "text": "\\n", "parent": 255, "children": [], "start_point": {"row": 110, "column": 44}, "end_point": {"row": 110, "column": 46}}, {"id": 257, "type": "call_expression", "text": "json_object_get_string(o)", "parent": 253, "children": [258, 259], "start_point": {"row": 110, "column": 49}, "end_point": {"row": 110, "column": 74}}, {"id": 258, "type": "identifier", "text": "json_object_get_string", "parent": 257, "children": [], "start_point": {"row": 110, "column": 49}, "end_point": {"row": 110, "column": 71}}, {"id": 259, "type": "argument_list", "text": "(o)", "parent": 257, "children": [260], "start_point": {"row": 110, "column": 71}, "end_point": {"row": 110, "column": 74}}, {"id": 260, "type": "identifier", "text": "o", "parent": 259, "children": [], "start_point": {"row": 110, "column": 72}, "end_point": {"row": 110, "column": 73}}, {"id": 261, "type": "call_expression", "text": "exit(1)", "parent": 246, "children": [262, 263], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 11}}, {"id": 262, "type": "identifier", "text": "exit", "parent": 261, "children": [], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 8}}, {"id": 263, "type": "argument_list", "text": "(1)", "parent": 261, "children": [264], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 11}}, {"id": 264, "type": "number_literal", "text": "1", "parent": 263, "children": [], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 10}}, {"id": 265, "type": "assignment_expression", "text": "p = &path", "parent": 202, "children": [266, 267, 268], "start_point": {"row": 113, "column": 3}, "end_point": {"row": 113, "column": 12}}, {"id": 266, "type": "identifier", "text": "p", "parent": 265, "children": [], "start_point": {"row": 113, "column": 3}, "end_point": {"row": 113, "column": 4}}, {"id": 267, "type": "=", "text": "=", "parent": 265, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 6}}, {"id": 268, "type": "pointer_expression", "text": "&path", "parent": 265, "children": [269], "start_point": {"row": 113, "column": 7}, "end_point": {"row": 113, "column": 12}}, {"id": 269, "type": "identifier", "text": "path", "parent": 268, "children": [], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 113, "column": 12}}, {"id": 270, "type": "while_statement", "text": "while(p) {\n\t\t\t\tif (x == p->object) {\n\t\t\t\t\tfprintf(stderr, \"$ref recursive. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\t\texit(1);\n\t\t\t\t}\n\t\t\t\tp = p->upper;\n\t\t\t}", "parent": 202, "children": [271], "start_point": {"row": 114, "column": 3}, "end_point": {"row": 120, "column": 4}}, {"id": 271, "type": "parenthesized_expression", "text": "(p)", "parent": 270, "children": [272], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 11}}, {"id": 272, "type": "identifier", "text": "p", "parent": 271, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 10}}, {"id": 273, "type": "if_statement", "text": "if (x == p->object) {\n\t\t\t\t\tfprintf(stderr, \"$ref recursive. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\t\texit(1);\n\t\t\t\t}", "parent": 270, "children": [274], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 118, "column": 5}}, {"id": 274, "type": "parenthesized_expression", "text": "(x == p->object)", "parent": 273, "children": [275], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 23}}, {"id": 275, "type": "binary_expression", "text": "x == p->object", "parent": 274, "children": [276, 277, 278], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 22}}, {"id": 276, "type": "identifier", "text": "x", "parent": 275, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 9}}, {"id": 277, "type": "==", "text": "==", "parent": 275, "children": [], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 12}}, {"id": 278, "type": "field_expression", "text": "p->object", "parent": 275, "children": [279, 280], "start_point": {"row": 115, "column": 13}, "end_point": {"row": 115, "column": 22}}, {"id": 279, "type": "identifier", "text": "p", "parent": 278, "children": [], "start_point": {"row": 115, "column": 13}, "end_point": {"row": 115, "column": 14}}, {"id": 280, "type": "field_identifier", "text": "object", "parent": 278, "children": [], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 22}}, {"id": 281, "type": "call_expression", "text": "fprintf(stderr, \"$ref recursive. Was: %s\\n\", json_object_get_string(o))", "parent": 273, "children": [282, 283], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 76}}, {"id": 282, "type": "identifier", "text": "fprintf", "parent": 281, "children": [], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 12}}, {"id": 283, "type": "argument_list", "text": "(stderr, \"$ref recursive. Was: %s\\n\", json_object_get_string(o))", "parent": 281, "children": [284, 285, 287], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 76}}, {"id": 284, "type": "identifier", "text": "stderr", "parent": 283, "children": [], "start_point": {"row": 116, "column": 13}, "end_point": {"row": 116, "column": 19}}, {"id": 285, "type": "string_literal", "text": "\"$ref recursive. Was: %s\\n\"", "parent": 283, "children": [286], "start_point": {"row": 116, "column": 21}, "end_point": {"row": 116, "column": 48}}, {"id": 286, "type": "escape_sequence", "text": "\\n", "parent": 285, "children": [], "start_point": {"row": 116, "column": 45}, "end_point": {"row": 116, "column": 47}}, {"id": 287, "type": "call_expression", "text": "json_object_get_string(o)", "parent": 283, "children": [288, 289], "start_point": {"row": 116, "column": 50}, "end_point": {"row": 116, "column": 75}}, {"id": 288, "type": "identifier", "text": "json_object_get_string", "parent": 287, "children": [], "start_point": {"row": 116, "column": 50}, "end_point": {"row": 116, "column": 72}}, {"id": 289, "type": "argument_list", "text": "(o)", "parent": 287, "children": [290], "start_point": {"row": 116, "column": 72}, "end_point": {"row": 116, "column": 75}}, {"id": 290, "type": "identifier", "text": "o", "parent": 289, "children": [], "start_point": {"row": 116, "column": 73}, "end_point": {"row": 116, "column": 74}}, {"id": 291, "type": "call_expression", "text": "exit(1)", "parent": 273, "children": [292, 293], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 12}}, {"id": 292, "type": "identifier", "text": "exit", "parent": 291, "children": [], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 9}}, {"id": 293, "type": "argument_list", "text": "(1)", "parent": 291, "children": [294], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 12}}, {"id": 294, "type": "number_literal", "text": "1", "parent": 293, "children": [], "start_point": {"row": 117, "column": 10}, "end_point": {"row": 117, "column": 11}}, {"id": 295, "type": "assignment_expression", "text": "p = p->upper", "parent": 270, "children": [296, 297, 298], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 16}}, {"id": 296, "type": "identifier", "text": "p", "parent": 295, "children": [], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 5}}, {"id": 297, "type": "=", "text": "=", "parent": 295, "children": [], "start_point": {"row": 119, "column": 6}, "end_point": {"row": 119, "column": 7}}, {"id": 298, "type": "field_expression", "text": "p->upper", "parent": 295, "children": [299, 300], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 119, "column": 16}}, {"id": 299, "type": "identifier", "text": "p", "parent": 298, "children": [], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 119, "column": 9}}, {"id": 300, "type": "field_identifier", "text": "upper", "parent": 298, "children": [], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 16}}, {"id": 301, "type": "return_statement", "text": "return json_object_get(x);", "parent": 202, "children": [302], "start_point": {"row": 122, "column": 3}, "end_point": {"row": 122, "column": 29}}, {"id": 302, "type": "call_expression", "text": "json_object_get(x)", "parent": 301, "children": [303, 304], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 28}}, {"id": 303, "type": "identifier", "text": "json_object_get", "parent": 302, "children": [], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 25}}, {"id": 304, "type": "argument_list", "text": "(x)", "parent": 302, "children": [305], "start_point": {"row": 122, "column": 25}, "end_point": {"row": 122, "column": 28}}, {"id": 305, "type": "identifier", "text": "x", "parent": 304, "children": [], "start_point": {"row": 122, "column": 26}, "end_point": {"row": 122, "column": 27}}, {"id": 306, "type": "assignment_expression", "text": "ji = json_object_iter_begin(path.object)", "parent": 199, "children": [307, 308, 309], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 125, "column": 42}}, {"id": 307, "type": "identifier", "text": "ji", "parent": 306, "children": [], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 125, "column": 4}}, {"id": 308, "type": "=", "text": "=", "parent": 306, "children": [], "start_point": {"row": 125, "column": 5}, "end_point": {"row": 125, "column": 6}}, {"id": 309, "type": "call_expression", "text": "json_object_iter_begin(path.object)", "parent": 306, "children": [310, 311], "start_point": {"row": 125, "column": 7}, "end_point": {"row": 125, "column": 42}}, {"id": 310, "type": "identifier", "text": "json_object_iter_begin", "parent": 309, "children": [], "start_point": {"row": 125, "column": 7}, "end_point": {"row": 125, "column": 29}}, {"id": 311, "type": "argument_list", "text": "(path.object)", "parent": 309, "children": [312], "start_point": {"row": 125, "column": 29}, "end_point": {"row": 125, "column": 42}}, {"id": 312, "type": "field_expression", "text": "path.object", "parent": 311, "children": [313, 314], "start_point": {"row": 125, "column": 30}, "end_point": {"row": 125, "column": 41}}, {"id": 313, "type": "identifier", "text": "path", "parent": 312, "children": [], "start_point": {"row": 125, "column": 30}, "end_point": {"row": 125, "column": 34}}, {"id": 314, "type": "field_identifier", "text": "object", "parent": 312, "children": [], "start_point": {"row": 125, "column": 35}, "end_point": {"row": 125, "column": 41}}, {"id": 315, "type": "assignment_expression", "text": "jn = json_object_iter_end(path.object)", "parent": 199, "children": [316, 317, 318], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 126, "column": 40}}, {"id": 316, "type": "identifier", "text": "jn", "parent": 315, "children": [], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 126, "column": 4}}, {"id": 317, "type": "=", "text": "=", "parent": 315, "children": [], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 6}}, {"id": 318, "type": "call_expression", "text": "json_object_iter_end(path.object)", "parent": 315, "children": [319, 320], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 40}}, {"id": 319, "type": "identifier", "text": "json_object_iter_end", "parent": 318, "children": [], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 27}}, {"id": 320, "type": "argument_list", "text": "(path.object)", "parent": 318, "children": [321], "start_point": {"row": 126, "column": 27}, "end_point": {"row": 126, "column": 40}}, {"id": 321, "type": "field_expression", "text": "path.object", "parent": 320, "children": [322, 323], "start_point": {"row": 126, "column": 28}, "end_point": {"row": 126, "column": 39}}, {"id": 322, "type": "identifier", "text": "path", "parent": 321, "children": [], "start_point": {"row": 126, "column": 28}, "end_point": {"row": 126, "column": 32}}, {"id": 323, "type": "field_identifier", "text": "object", "parent": 321, "children": [], "start_point": {"row": 126, "column": 33}, "end_point": {"row": 126, "column": 39}}, {"id": 324, "type": "while_statement", "text": "while (!json_object_iter_equal(&ji, &jn)) {\n\t\t\to = json_object_iter_peek_value(&ji);\n\t\t\tx = expand((struct path){ .object = o, .upper = &path });\n\t\t\tif (x != o)\n\t\t\t\tjson_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n\t\t\tjson_object_iter_next(&ji);\n\t\t}", "parent": 199, "children": [325], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 133, "column": 3}}, {"id": 325, "type": "parenthesized_expression", "text": "(!json_object_iter_equal(&ji, &jn))", "parent": 324, "children": [326], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 43}}, {"id": 326, "type": "unary_expression", "text": "!json_object_iter_equal(&ji, &jn)", "parent": 325, "children": [327, 328], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 42}}, {"id": 327, "type": "!", "text": "!", "parent": 326, "children": [], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 10}}, {"id": 328, "type": "call_expression", "text": "json_object_iter_equal(&ji, &jn)", "parent": 326, "children": [329, 330], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 42}}, {"id": 329, "type": "identifier", "text": "json_object_iter_equal", "parent": 328, "children": [], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 32}}, {"id": 330, "type": "argument_list", "text": "(&ji, &jn)", "parent": 328, "children": [331, 333], "start_point": {"row": 127, "column": 32}, "end_point": {"row": 127, "column": 42}}, {"id": 331, "type": "pointer_expression", "text": "&ji", "parent": 330, "children": [332], "start_point": {"row": 127, "column": 33}, "end_point": {"row": 127, "column": 36}}, {"id": 332, "type": "identifier", "text": "ji", "parent": 331, "children": [], "start_point": {"row": 127, "column": 34}, "end_point": {"row": 127, "column": 36}}, {"id": 333, "type": "pointer_expression", "text": "&jn", "parent": 330, "children": [334], "start_point": {"row": 127, "column": 38}, "end_point": {"row": 127, "column": 41}}, {"id": 334, "type": "identifier", "text": "jn", "parent": 333, "children": [], "start_point": {"row": 127, "column": 39}, "end_point": {"row": 127, "column": 41}}, {"id": 335, "type": "assignment_expression", "text": "o = json_object_iter_peek_value(&ji)", "parent": 324, "children": [336, 337, 338], "start_point": {"row": 128, "column": 3}, "end_point": {"row": 128, "column": 39}}, {"id": 336, "type": "identifier", "text": "o", "parent": 335, "children": [], "start_point": {"row": 128, "column": 3}, "end_point": {"row": 128, "column": 4}}, {"id": 337, "type": "=", "text": "=", "parent": 335, "children": [], "start_point": {"row": 128, "column": 5}, "end_point": {"row": 128, "column": 6}}, {"id": 338, "type": "call_expression", "text": "json_object_iter_peek_value(&ji)", "parent": 335, "children": [339, 340], "start_point": {"row": 128, "column": 7}, "end_point": {"row": 128, "column": 39}}, {"id": 339, "type": "identifier", "text": "json_object_iter_peek_value", "parent": 338, "children": [], "start_point": {"row": 128, "column": 7}, "end_point": {"row": 128, "column": 34}}, {"id": 340, "type": "argument_list", "text": "(&ji)", "parent": 338, "children": [341], "start_point": {"row": 128, "column": 34}, "end_point": {"row": 128, "column": 39}}, {"id": 341, "type": "pointer_expression", "text": "&ji", "parent": 340, "children": [342], "start_point": {"row": 128, "column": 35}, "end_point": {"row": 128, "column": 38}}, {"id": 342, "type": "identifier", "text": "ji", "parent": 341, "children": [], "start_point": {"row": 128, "column": 36}, "end_point": {"row": 128, "column": 38}}, {"id": 343, "type": "assignment_expression", "text": "x = expand((struct path){ .object = o, .upper = &path })", "parent": 324, "children": [344, 345, 346], "start_point": {"row": 129, "column": 3}, "end_point": {"row": 129, "column": 59}}, {"id": 344, "type": "identifier", "text": "x", "parent": 343, "children": [], "start_point": {"row": 129, "column": 3}, "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": "expand((struct path){ .object = o, .upper = &path })", "parent": 343, "children": [347, 348], "start_point": {"row": 129, "column": 7}, "end_point": {"row": 129, "column": 59}}, {"id": 347, "type": "identifier", "text": "expand", "parent": 346, "children": [], "start_point": {"row": 129, "column": 7}, "end_point": {"row": 129, "column": 13}}, {"id": 348, "type": "argument_list", "text": "((struct path){ .object = o, .upper = &path })", "parent": 346, "children": [349], "start_point": {"row": 129, "column": 13}, "end_point": {"row": 129, "column": 59}}, {"id": 349, "type": "compound_literal_expression", "text": "(struct path){ .object = o, .upper = &path }", "parent": 348, "children": [350, 354], "start_point": {"row": 129, "column": 14}, "end_point": {"row": 129, "column": 58}}, {"id": 350, "type": "type_descriptor", "text": "struct path", "parent": 349, "children": [351], "start_point": {"row": 129, "column": 15}, "end_point": {"row": 129, "column": 26}}, {"id": 351, "type": "struct_specifier", "text": "struct path", "parent": 350, "children": [352, 353], "start_point": {"row": 129, "column": 15}, "end_point": {"row": 129, "column": 26}}, {"id": 352, "type": "struct", "text": "struct", "parent": 351, "children": [], "start_point": {"row": 129, "column": 15}, "end_point": {"row": 129, "column": 21}}, {"id": 353, "type": "type_identifier", "text": "path", "parent": 351, "children": [], "start_point": {"row": 129, "column": 22}, "end_point": {"row": 129, "column": 26}}, {"id": 354, "type": "initializer_list", "text": "{ .object = o, .upper = &path }", "parent": 349, "children": [355, 360], "start_point": {"row": 129, "column": 27}, "end_point": {"row": 129, "column": 58}}, {"id": 355, "type": "initializer_pair", "text": ".object = o", "parent": 354, "children": [356, 358, 359], "start_point": {"row": 129, "column": 29}, "end_point": {"row": 129, "column": 40}}, {"id": 356, "type": "field_designator", "text": ".object", "parent": 355, "children": [357], "start_point": {"row": 129, "column": 29}, "end_point": {"row": 129, "column": 36}}, {"id": 357, "type": "field_identifier", "text": "object", "parent": 356, "children": [], "start_point": {"row": 129, "column": 30}, "end_point": {"row": 129, "column": 36}}, {"id": 358, "type": "=", "text": "=", "parent": 355, "children": [], "start_point": {"row": 129, "column": 37}, "end_point": {"row": 129, "column": 38}}, {"id": 359, "type": "identifier", "text": "o", "parent": 355, "children": [], "start_point": {"row": 129, "column": 39}, "end_point": {"row": 129, "column": 40}}, {"id": 360, "type": "initializer_pair", "text": ".upper = &path", "parent": 354, "children": [361, 363, 364], "start_point": {"row": 129, "column": 42}, "end_point": {"row": 129, "column": 56}}, {"id": 361, "type": "field_designator", "text": ".upper", "parent": 360, "children": [362], "start_point": {"row": 129, "column": 42}, "end_point": {"row": 129, "column": 48}}, {"id": 362, "type": "field_identifier", "text": "upper", "parent": 361, "children": [], "start_point": {"row": 129, "column": 43}, "end_point": {"row": 129, "column": 48}}, {"id": 363, "type": "=", "text": "=", "parent": 360, "children": [], "start_point": {"row": 129, "column": 49}, "end_point": {"row": 129, "column": 50}}, {"id": 364, "type": "pointer_expression", "text": "&path", "parent": 360, "children": [365], "start_point": {"row": 129, "column": 51}, "end_point": {"row": 129, "column": 56}}, {"id": 365, "type": "identifier", "text": "path", "parent": 364, "children": [], "start_point": {"row": 129, "column": 52}, "end_point": {"row": 129, "column": 56}}, {"id": 366, "type": "if_statement", "text": "if (x != o)\n\t\t\t\tjson_object_object_add(path.object, json_object_iter_peek_name(&ji), x);", "parent": 324, "children": [367], "start_point": {"row": 130, "column": 3}, "end_point": {"row": 131, "column": 76}}, {"id": 367, "type": "parenthesized_expression", "text": "(x != o)", "parent": 366, "children": [368], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 14}}, {"id": 368, "type": "binary_expression", "text": "x != o", "parent": 367, "children": [369, 370, 371], "start_point": {"row": 130, "column": 7}, "end_point": {"row": 130, "column": 13}}, {"id": 369, "type": "identifier", "text": "x", "parent": 368, "children": [], "start_point": {"row": 130, "column": 7}, "end_point": {"row": 130, "column": 8}}, {"id": 370, "type": "!=", "text": "!=", "parent": 368, "children": [], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 11}}, {"id": 371, "type": "identifier", "text": "o", "parent": 368, "children": [], "start_point": {"row": 130, "column": 12}, "end_point": {"row": 130, "column": 13}}, {"id": 372, "type": "call_expression", "text": "json_object_object_add(path.object, json_object_iter_peek_name(&ji), x)", "parent": 366, "children": [373, 374], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 75}}, {"id": 373, "type": "identifier", "text": "json_object_object_add", "parent": 372, "children": [], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 26}}, {"id": 374, "type": "argument_list", "text": "(path.object, json_object_iter_peek_name(&ji), x)", "parent": 372, "children": [375, 378, 383], "start_point": {"row": 131, "column": 26}, "end_point": {"row": 131, "column": 75}}, {"id": 375, "type": "field_expression", "text": "path.object", "parent": 374, "children": [376, 377], "start_point": {"row": 131, "column": 27}, "end_point": {"row": 131, "column": 38}}, {"id": 376, "type": "identifier", "text": "path", "parent": 375, "children": [], "start_point": {"row": 131, "column": 27}, "end_point": {"row": 131, "column": 31}}, {"id": 377, "type": "field_identifier", "text": "object", "parent": 375, "children": [], "start_point": {"row": 131, "column": 32}, "end_point": {"row": 131, "column": 38}}, {"id": 378, "type": "call_expression", "text": "json_object_iter_peek_name(&ji)", "parent": 374, "children": [379, 380], "start_point": {"row": 131, "column": 40}, "end_point": {"row": 131, "column": 71}}, {"id": 379, "type": "identifier", "text": "json_object_iter_peek_name", "parent": 378, "children": [], "start_point": {"row": 131, "column": 40}, "end_point": {"row": 131, "column": 66}}, {"id": 380, "type": "argument_list", "text": "(&ji)", "parent": 378, "children": [381], "start_point": {"row": 131, "column": 66}, "end_point": {"row": 131, "column": 71}}, {"id": 381, "type": "pointer_expression", "text": "&ji", "parent": 380, "children": [382], "start_point": {"row": 131, "column": 67}, "end_point": {"row": 131, "column": 70}}, {"id": 382, "type": "identifier", "text": "ji", "parent": 381, "children": [], "start_point": {"row": 131, "column": 68}, "end_point": {"row": 131, "column": 70}}, {"id": 383, "type": "identifier", "text": "x", "parent": 374, "children": [], "start_point": {"row": 131, "column": 73}, "end_point": {"row": 131, "column": 74}}, {"id": 384, "type": "call_expression", "text": "json_object_iter_next(&ji)", "parent": 324, "children": [385, 386], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 29}}, {"id": 385, "type": "identifier", "text": "json_object_iter_next", "parent": 384, "children": [], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 24}}, {"id": 386, "type": "argument_list", "text": "(&ji)", "parent": 384, "children": [387], "start_point": {"row": 132, "column": 24}, "end_point": {"row": 132, "column": 29}}, {"id": 387, "type": "pointer_expression", "text": "&ji", "parent": 386, "children": [388], "start_point": {"row": 132, "column": 25}, "end_point": {"row": 132, "column": 28}}, {"id": 388, "type": "identifier", "text": "ji", "parent": 387, "children": [], "start_point": {"row": 132, "column": 26}, "end_point": {"row": 132, "column": 28}}, {"id": 389, "type": "break_statement", "text": "break;", "parent": 199, "children": [390], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 8}}, {"id": 390, "type": "break", "text": "break", "parent": 389, "children": [], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 7}}, {"id": 391, "type": "case_statement", "text": "case json_type_array:\n\t\t/* expand the values of arrays */\n\t\ti = 0;\n\t\tn = (int)json_object_array_length(path.object);\n\t\twhile (i != n) {\n\t\t\to = json_object_array_get_idx(path.object, i);\n\t\t\tx = expand((struct path){ .object = o, .upper = &path });\n\t\t\tif (x != o)\n\t\t\t\tjson_object_array_put_idx(path.object, i, x);\n\t\t\ti++;\n\t\t}\n\t\tbreak;", "parent": 190, "children": [392, 393, 410, 466], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 146, "column": 8}}, {"id": 392, "type": "case", "text": "case", "parent": 391, "children": [], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 5}}, {"id": 393, "type": "identifier", "text": "json_type_array", "parent": 391, "children": [], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 21}}, {"id": 394, "type": "assignment_expression", "text": "i = 0", "parent": 391, "children": [395, 396, 397], "start_point": {"row": 137, "column": 2}, "end_point": {"row": 137, "column": 7}}, {"id": 395, "type": "identifier", "text": "i", "parent": 394, "children": [], "start_point": {"row": 137, "column": 2}, "end_point": {"row": 137, "column": 3}}, {"id": 396, "type": "=", "text": "=", "parent": 394, "children": [], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 5}}, {"id": 397, "type": "number_literal", "text": "0", "parent": 394, "children": [], "start_point": {"row": 137, "column": 6}, "end_point": {"row": 137, "column": 7}}, {"id": 398, "type": "assignment_expression", "text": "n = (int)json_object_array_length(path.object)", "parent": 391, "children": [399, 400, 401], "start_point": {"row": 138, "column": 2}, "end_point": {"row": 138, "column": 48}}, {"id": 399, "type": "identifier", "text": "n", "parent": 398, "children": [], "start_point": {"row": 138, "column": 2}, "end_point": {"row": 138, "column": 3}}, {"id": 400, "type": "=", "text": "=", "parent": 398, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 5}}, {"id": 401, "type": "cast_expression", "text": "(int)json_object_array_length(path.object)", "parent": 398, "children": [402, 404], "start_point": {"row": 138, "column": 6}, "end_point": {"row": 138, "column": 48}}, {"id": 402, "type": "type_descriptor", "text": "int", "parent": 401, "children": [403], "start_point": {"row": 138, "column": 7}, "end_point": {"row": 138, "column": 10}}, {"id": 403, "type": "primitive_type", "text": "int", "parent": 402, "children": [], "start_point": {"row": 138, "column": 7}, "end_point": {"row": 138, "column": 10}}, {"id": 404, "type": "call_expression", "text": "json_object_array_length(path.object)", "parent": 401, "children": [405, 406], "start_point": {"row": 138, "column": 11}, "end_point": {"row": 138, "column": 48}}, {"id": 405, "type": "identifier", "text": "json_object_array_length", "parent": 404, "children": [], "start_point": {"row": 138, "column": 11}, "end_point": {"row": 138, "column": 35}}, {"id": 406, "type": "argument_list", "text": "(path.object)", "parent": 404, "children": [407], "start_point": {"row": 138, "column": 35}, "end_point": {"row": 138, "column": 48}}, {"id": 407, "type": "field_expression", "text": "path.object", "parent": 406, "children": [408, 409], "start_point": {"row": 138, "column": 36}, "end_point": {"row": 138, "column": 47}}, {"id": 408, "type": "identifier", "text": "path", "parent": 407, "children": [], "start_point": {"row": 138, "column": 36}, "end_point": {"row": 138, "column": 40}}, {"id": 409, "type": "field_identifier", "text": "object", "parent": 407, "children": [], "start_point": {"row": 138, "column": 41}, "end_point": {"row": 138, "column": 47}}, {"id": 410, "type": "while_statement", "text": "while (i != n) {\n\t\t\to = json_object_array_get_idx(path.object, i);\n\t\t\tx = expand((struct path){ .object = o, .upper = &path });\n\t\t\tif (x != o)\n\t\t\t\tjson_object_array_put_idx(path.object, i, x);\n\t\t\ti++;\n\t\t}", "parent": 391, "children": [411], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 145, "column": 3}}, {"id": 411, "type": "parenthesized_expression", "text": "(i != n)", "parent": 410, "children": [412], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 16}}, {"id": 412, "type": "binary_expression", "text": "i != n", "parent": 411, "children": [413, 414, 415], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 15}}, {"id": 413, "type": "identifier", "text": "i", "parent": 412, "children": [], "start_point": {"row": 139, "column": 9}, "end_point": {"row": 139, "column": 10}}, {"id": 414, "type": "!=", "text": "!=", "parent": 412, "children": [], "start_point": {"row": 139, "column": 11}, "end_point": {"row": 139, "column": 13}}, {"id": 415, "type": "identifier", "text": "n", "parent": 412, "children": [], "start_point": {"row": 139, "column": 14}, "end_point": {"row": 139, "column": 15}}, {"id": 416, "type": "assignment_expression", "text": "o = json_object_array_get_idx(path.object, i)", "parent": 410, "children": [417, 418, 419], "start_point": {"row": 140, "column": 3}, "end_point": {"row": 140, "column": 48}}, {"id": 417, "type": "identifier", "text": "o", "parent": 416, "children": [], "start_point": {"row": 140, "column": 3}, "end_point": {"row": 140, "column": 4}}, {"id": 418, "type": "=", "text": "=", "parent": 416, "children": [], "start_point": {"row": 140, "column": 5}, "end_point": {"row": 140, "column": 6}}, {"id": 419, "type": "call_expression", "text": "json_object_array_get_idx(path.object, i)", "parent": 416, "children": [420, 421], "start_point": {"row": 140, "column": 7}, "end_point": {"row": 140, "column": 48}}, {"id": 420, "type": "identifier", "text": "json_object_array_get_idx", "parent": 419, "children": [], "start_point": {"row": 140, "column": 7}, "end_point": {"row": 140, "column": 32}}, {"id": 421, "type": "argument_list", "text": "(path.object, i)", "parent": 419, "children": [422, 425], "start_point": {"row": 140, "column": 32}, "end_point": {"row": 140, "column": 48}}, {"id": 422, "type": "field_expression", "text": "path.object", "parent": 421, "children": [423, 424], "start_point": {"row": 140, "column": 33}, "end_point": {"row": 140, "column": 44}}, {"id": 423, "type": "identifier", "text": "path", "parent": 422, "children": [], "start_point": {"row": 140, "column": 33}, "end_point": {"row": 140, "column": 37}}, {"id": 424, "type": "field_identifier", "text": "object", "parent": 422, "children": [], "start_point": {"row": 140, "column": 38}, "end_point": {"row": 140, "column": 44}}, {"id": 425, "type": "identifier", "text": "i", "parent": 421, "children": [], "start_point": {"row": 140, "column": 46}, "end_point": {"row": 140, "column": 47}}, {"id": 426, "type": "assignment_expression", "text": "x = expand((struct path){ .object = o, .upper = &path })", "parent": 410, "children": [427, 428, 429], "start_point": {"row": 141, "column": 3}, "end_point": {"row": 141, "column": 59}}, {"id": 427, "type": "identifier", "text": "x", "parent": 426, "children": [], "start_point": {"row": 141, "column": 3}, "end_point": {"row": 141, "column": 4}}, {"id": 428, "type": "=", "text": "=", "parent": 426, "children": [], "start_point": {"row": 141, "column": 5}, "end_point": {"row": 141, "column": 6}}, {"id": 429, "type": "call_expression", "text": "expand((struct path){ .object = o, .upper = &path })", "parent": 426, "children": [430, 431], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 59}}, {"id": 430, "type": "identifier", "text": "expand", "parent": 429, "children": [], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 13}}, {"id": 431, "type": "argument_list", "text": "((struct path){ .object = o, .upper = &path })", "parent": 429, "children": [432], "start_point": {"row": 141, "column": 13}, "end_point": {"row": 141, "column": 59}}, {"id": 432, "type": "compound_literal_expression", "text": "(struct path){ .object = o, .upper = &path }", "parent": 431, "children": [433, 437], "start_point": {"row": 141, "column": 14}, "end_point": {"row": 141, "column": 58}}, {"id": 433, "type": "type_descriptor", "text": "struct path", "parent": 432, "children": [434], "start_point": {"row": 141, "column": 15}, "end_point": {"row": 141, "column": 26}}, {"id": 434, "type": "struct_specifier", "text": "struct path", "parent": 433, "children": [435, 436], "start_point": {"row": 141, "column": 15}, "end_point": {"row": 141, "column": 26}}, {"id": 435, "type": "struct", "text": "struct", "parent": 434, "children": [], "start_point": {"row": 141, "column": 15}, "end_point": {"row": 141, "column": 21}}, {"id": 436, "type": "type_identifier", "text": "path", "parent": 434, "children": [], "start_point": {"row": 141, "column": 22}, "end_point": {"row": 141, "column": 26}}, {"id": 437, "type": "initializer_list", "text": "{ .object = o, .upper = &path }", "parent": 432, "children": [438, 443], "start_point": {"row": 141, "column": 27}, "end_point": {"row": 141, "column": 58}}, {"id": 438, "type": "initializer_pair", "text": ".object = o", "parent": 437, "children": [439, 441, 442], "start_point": {"row": 141, "column": 29}, "end_point": {"row": 141, "column": 40}}, {"id": 439, "type": "field_designator", "text": ".object", "parent": 438, "children": [440], "start_point": {"row": 141, "column": 29}, "end_point": {"row": 141, "column": 36}}, {"id": 440, "type": "field_identifier", "text": "object", "parent": 439, "children": [], "start_point": {"row": 141, "column": 30}, "end_point": {"row": 141, "column": 36}}, {"id": 441, "type": "=", "text": "=", "parent": 438, "children": [], "start_point": {"row": 141, "column": 37}, "end_point": {"row": 141, "column": 38}}, {"id": 442, "type": "identifier", "text": "o", "parent": 438, "children": [], "start_point": {"row": 141, "column": 39}, "end_point": {"row": 141, "column": 40}}, {"id": 443, "type": "initializer_pair", "text": ".upper = &path", "parent": 437, "children": [444, 446, 447], "start_point": {"row": 141, "column": 42}, "end_point": {"row": 141, "column": 56}}, {"id": 444, "type": "field_designator", "text": ".upper", "parent": 443, "children": [445], "start_point": {"row": 141, "column": 42}, "end_point": {"row": 141, "column": 48}}, {"id": 445, "type": "field_identifier", "text": "upper", "parent": 444, "children": [], "start_point": {"row": 141, "column": 43}, "end_point": {"row": 141, "column": 48}}, {"id": 446, "type": "=", "text": "=", "parent": 443, "children": [], "start_point": {"row": 141, "column": 49}, "end_point": {"row": 141, "column": 50}}, {"id": 447, "type": "pointer_expression", "text": "&path", "parent": 443, "children": [448], "start_point": {"row": 141, "column": 51}, "end_point": {"row": 141, "column": 56}}, {"id": 448, "type": "identifier", "text": "path", "parent": 447, "children": [], "start_point": {"row": 141, "column": 52}, "end_point": {"row": 141, "column": 56}}, {"id": 449, "type": "if_statement", "text": "if (x != o)\n\t\t\t\tjson_object_array_put_idx(path.object, i, x);", "parent": 410, "children": [450], "start_point": {"row": 142, "column": 3}, "end_point": {"row": 143, "column": 49}}, {"id": 450, "type": "parenthesized_expression", "text": "(x != o)", "parent": 449, "children": [451], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 14}}, {"id": 451, "type": "binary_expression", "text": "x != o", "parent": 450, "children": [452, 453, 454], "start_point": {"row": 142, "column": 7}, "end_point": {"row": 142, "column": 13}}, {"id": 452, "type": "identifier", "text": "x", "parent": 451, "children": [], "start_point": {"row": 142, "column": 7}, "end_point": {"row": 142, "column": 8}}, {"id": 453, "type": "!=", "text": "!=", "parent": 451, "children": [], "start_point": {"row": 142, "column": 9}, "end_point": {"row": 142, "column": 11}}, {"id": 454, "type": "identifier", "text": "o", "parent": 451, "children": [], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 13}}, {"id": 455, "type": "call_expression", "text": "json_object_array_put_idx(path.object, i, x)", "parent": 449, "children": [456, 457], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 48}}, {"id": 456, "type": "identifier", "text": "json_object_array_put_idx", "parent": 455, "children": [], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 29}}, {"id": 457, "type": "argument_list", "text": "(path.object, i, x)", "parent": 455, "children": [458, 461, 462], "start_point": {"row": 143, "column": 29}, "end_point": {"row": 143, "column": 48}}, {"id": 458, "type": "field_expression", "text": "path.object", "parent": 457, "children": [459, 460], "start_point": {"row": 143, "column": 30}, "end_point": {"row": 143, "column": 41}}, {"id": 459, "type": "identifier", "text": "path", "parent": 458, "children": [], "start_point": {"row": 143, "column": 30}, "end_point": {"row": 143, "column": 34}}, {"id": 460, "type": "field_identifier", "text": "object", "parent": 458, "children": [], "start_point": {"row": 143, "column": 35}, "end_point": {"row": 143, "column": 41}}, {"id": 461, "type": "identifier", "text": "i", "parent": 457, "children": [], "start_point": {"row": 143, "column": 43}, "end_point": {"row": 143, "column": 44}}, {"id": 462, "type": "identifier", "text": "x", "parent": 457, "children": [], "start_point": {"row": 143, "column": 46}, "end_point": {"row": 143, "column": 47}}, {"id": 463, "type": "update_expression", "text": "i++", "parent": 410, "children": [464, 465], "start_point": {"row": 144, "column": 3}, "end_point": {"row": 144, "column": 6}}, {"id": 464, "type": "identifier", "text": "i", "parent": 463, "children": [], "start_point": {"row": 144, "column": 3}, "end_point": {"row": 144, "column": 4}}, {"id": 465, "type": "++", "text": "++", "parent": 463, "children": [], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 6}}, {"id": 466, "type": "break_statement", "text": "break;", "parent": 391, "children": [467], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 146, "column": 8}}, {"id": 467, "type": "break", "text": "break", "parent": 466, "children": [], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 146, "column": 7}}, {"id": 468, "type": "case_statement", "text": "default:\n\t\t/* otherwise no expansion */\n\t\tbreak;", "parent": 190, "children": [469, 470], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 149, "column": 8}}, {"id": 469, "type": "default", "text": "default", "parent": 468, "children": [], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 147, "column": 8}}, {"id": 470, "type": "break_statement", "text": "break;", "parent": 468, "children": [471], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 8}}, {"id": 471, "type": "break", "text": "break", "parent": 470, "children": [], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 7}}, {"id": 472, "type": "return_statement", "text": "return path.object;", "parent": 149, "children": [473], "start_point": {"row": 152, "column": 1}, "end_point": {"row": 152, "column": 20}}, {"id": 473, "type": "field_expression", "text": "path.object", "parent": 472, "children": [474, 475], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 19}}, {"id": 474, "type": "identifier", "text": "path", "parent": 473, "children": [], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 12}}, {"id": 475, "type": "field_identifier", "text": "object", "parent": 473, "children": [], "start_point": {"row": 152, "column": 13}, "end_point": {"row": 152, "column": 19}}, {"id": 476, "type": "function_definition", "text": "void process(char *filename)\n{\n\t/* translate - */\n\tif (!strcmp(filename, \"-\"))\n\t\tfilename = \"/dev/stdin\";\n\n\t/* check access */\n\tif (access(filename, R_OK)) {\n\t\tfprintf(stderr, \"can't access file %s\\n\", filename);\n\t\texit(1);\n\t}\n\n\t/* read the file */\n\troot = json_object_from_file(filename);\n\tif (!root) {\n\t\tfprintf(stderr, \"reading file %s produced null\\n\", filename);\n\t\texit(1);\n\t}\n\n\t/* expand */\n\troot = expand((struct path){ .object = root, .upper = NULL });\n\n\t/* print the result */\n\tjson_object_to_file_ext (\"/dev/stdout\", root, JSON_C_TO_STRING_PRETTY);\n\n\t/* clean up */\n\tjson_object_put(root);\n}", "parent": null, "children": [477, 478], "start_point": {"row": 158, "column": 0}, "end_point": {"row": 185, "column": 1}}, {"id": 477, "type": "primitive_type", "text": "void", "parent": 476, "children": [], "start_point": {"row": 158, "column": 0}, "end_point": {"row": 158, "column": 4}}, {"id": 478, "type": "function_declarator", "text": "process(char *filename)", "parent": 476, "children": [479, 480], "start_point": {"row": 158, "column": 5}, "end_point": {"row": 158, "column": 28}}, {"id": 479, "type": "identifier", "text": "process", "parent": 478, "children": [], "start_point": {"row": 158, "column": 5}, "end_point": {"row": 158, "column": 12}}, {"id": 480, "type": "parameter_list", "text": "(char *filename)", "parent": 478, "children": [481], "start_point": {"row": 158, "column": 12}, "end_point": {"row": 158, "column": 28}}, {"id": 481, "type": "parameter_declaration", "text": "char *filename", "parent": 480, "children": [482, 483], "start_point": {"row": 158, "column": 13}, "end_point": {"row": 158, "column": 27}}, {"id": 482, "type": "primitive_type", "text": "char", "parent": 481, "children": [], "start_point": {"row": 158, "column": 13}, "end_point": {"row": 158, "column": 17}}, {"id": 483, "type": "pointer_declarator", "text": "*filename", "parent": 481, "children": [484, 485], "start_point": {"row": 158, "column": 18}, "end_point": {"row": 158, "column": 27}}, {"id": 484, "type": "*", "text": "*", "parent": 483, "children": [], "start_point": {"row": 158, "column": 18}, "end_point": {"row": 158, "column": 19}}, {"id": 485, "type": "identifier", "text": "filename", "parent": 483, "children": [], "start_point": {"row": 158, "column": 19}, "end_point": {"row": 158, "column": 27}}, {"id": 486, "type": "if_statement", "text": "if (!strcmp(filename, \"-\"))\n\t\tfilename = \"/dev/stdin\";", "parent": 476, "children": [487], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 162, "column": 26}}, {"id": 487, "type": "parenthesized_expression", "text": "(!strcmp(filename, \"-\"))", "parent": 486, "children": [488], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 28}}, {"id": 488, "type": "unary_expression", "text": "!strcmp(filename, \"-\")", "parent": 487, "children": [489, 490], "start_point": {"row": 161, "column": 5}, "end_point": {"row": 161, "column": 27}}, {"id": 489, "type": "!", "text": "!", "parent": 488, "children": [], "start_point": {"row": 161, "column": 5}, "end_point": {"row": 161, "column": 6}}, {"id": 490, "type": "call_expression", "text": "strcmp(filename, \"-\")", "parent": 488, "children": [491, 492], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 27}}, {"id": 491, "type": "identifier", "text": "strcmp", "parent": 490, "children": [], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 12}}, {"id": 492, "type": "argument_list", "text": "(filename, \"-\")", "parent": 490, "children": [493, 494], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 27}}, {"id": 493, "type": "identifier", "text": "filename", "parent": 492, "children": [], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 21}}, {"id": 494, "type": "string_literal", "text": "\"-\"", "parent": 492, "children": [], "start_point": {"row": 161, "column": 23}, "end_point": {"row": 161, "column": 26}}, {"id": 495, "type": "assignment_expression", "text": "filename = \"/dev/stdin\"", "parent": 486, "children": [496, 497, 498], "start_point": {"row": 162, "column": 2}, "end_point": {"row": 162, "column": 25}}, {"id": 496, "type": "identifier", "text": "filename", "parent": 495, "children": [], "start_point": {"row": 162, "column": 2}, "end_point": {"row": 162, "column": 10}}, {"id": 497, "type": "=", "text": "=", "parent": 495, "children": [], "start_point": {"row": 162, "column": 11}, "end_point": {"row": 162, "column": 12}}, {"id": 498, "type": "string_literal", "text": "\"/dev/stdin\"", "parent": 495, "children": [], "start_point": {"row": 162, "column": 13}, "end_point": {"row": 162, "column": 25}}, {"id": 499, "type": "if_statement", "text": "if (access(filename, R_OK)) {\n\t\tfprintf(stderr, \"can't access file %s\\n\", filename);\n\t\texit(1);\n\t}", "parent": 476, "children": [500], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 168, "column": 2}}, {"id": 500, "type": "parenthesized_expression", "text": "(access(filename, R_OK))", "parent": 499, "children": [501], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 28}}, {"id": 501, "type": "call_expression", "text": "access(filename, R_OK)", "parent": 500, "children": [502, 503], "start_point": {"row": 165, "column": 5}, "end_point": {"row": 165, "column": 27}}, {"id": 502, "type": "identifier", "text": "access", "parent": 501, "children": [], "start_point": {"row": 165, "column": 5}, "end_point": {"row": 165, "column": 11}}, {"id": 503, "type": "argument_list", "text": "(filename, R_OK)", "parent": 501, "children": [504, 505], "start_point": {"row": 165, "column": 11}, "end_point": {"row": 165, "column": 27}}, {"id": 504, "type": "identifier", "text": "filename", "parent": 503, "children": [], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 165, "column": 20}}, {"id": 505, "type": "identifier", "text": "R_OK", "parent": 503, "children": [], "start_point": {"row": 165, "column": 22}, "end_point": {"row": 165, "column": 26}}, {"id": 506, "type": "call_expression", "text": "fprintf(stderr, \"can't access file %s\\n\", filename)", "parent": 499, "children": [507, 508], "start_point": {"row": 166, "column": 2}, "end_point": {"row": 166, "column": 53}}, {"id": 507, "type": "identifier", "text": "fprintf", "parent": 506, "children": [], "start_point": {"row": 166, "column": 2}, "end_point": {"row": 166, "column": 9}}, {"id": 508, "type": "argument_list", "text": "(stderr, \"can't access file %s\\n\", filename)", "parent": 506, "children": [509, 510, 512], "start_point": {"row": 166, "column": 9}, "end_point": {"row": 166, "column": 53}}, {"id": 509, "type": "identifier", "text": "stderr", "parent": 508, "children": [], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 16}}, {"id": 510, "type": "string_literal", "text": "\"can't access file %s\\n\"", "parent": 508, "children": [511], "start_point": {"row": 166, "column": 18}, "end_point": {"row": 166, "column": 42}}, {"id": 511, "type": "escape_sequence", "text": "\\n", "parent": 510, "children": [], "start_point": {"row": 166, "column": 39}, "end_point": {"row": 166, "column": 41}}, {"id": 512, "type": "identifier", "text": "filename", "parent": 508, "children": [], "start_point": {"row": 166, "column": 44}, "end_point": {"row": 166, "column": 52}}, {"id": 513, "type": "call_expression", "text": "exit(1)", "parent": 499, "children": [514, 515], "start_point": {"row": 167, "column": 2}, "end_point": {"row": 167, "column": 9}}, {"id": 514, "type": "identifier", "text": "exit", "parent": 513, "children": [], "start_point": {"row": 167, "column": 2}, "end_point": {"row": 167, "column": 6}}, {"id": 515, "type": "argument_list", "text": "(1)", "parent": 513, "children": [516], "start_point": {"row": 167, "column": 6}, "end_point": {"row": 167, "column": 9}}, {"id": 516, "type": "number_literal", "text": "1", "parent": 515, "children": [], "start_point": {"row": 167, "column": 7}, "end_point": {"row": 167, "column": 8}}, {"id": 517, "type": "assignment_expression", "text": "root = json_object_from_file(filename)", "parent": 476, "children": [518, 519, 520], "start_point": {"row": 171, "column": 1}, "end_point": {"row": 171, "column": 39}}, {"id": 518, "type": "identifier", "text": "root", "parent": 517, "children": [], "start_point": {"row": 171, "column": 1}, "end_point": {"row": 171, "column": 5}}, {"id": 519, "type": "=", "text": "=", "parent": 517, "children": [], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 7}}, {"id": 520, "type": "call_expression", "text": "json_object_from_file(filename)", "parent": 517, "children": [521, 522], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 39}}, {"id": 521, "type": "identifier", "text": "json_object_from_file", "parent": 520, "children": [], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 29}}, {"id": 522, "type": "argument_list", "text": "(filename)", "parent": 520, "children": [523], "start_point": {"row": 171, "column": 29}, "end_point": {"row": 171, "column": 39}}, {"id": 523, "type": "identifier", "text": "filename", "parent": 522, "children": [], "start_point": {"row": 171, "column": 30}, "end_point": {"row": 171, "column": 38}}, {"id": 524, "type": "if_statement", "text": "if (!root) {\n\t\tfprintf(stderr, \"reading file %s produced null\\n\", filename);\n\t\texit(1);\n\t}", "parent": 476, "children": [525], "start_point": {"row": 172, "column": 1}, "end_point": {"row": 175, "column": 2}}, {"id": 525, "type": "parenthesized_expression", "text": "(!root)", "parent": 524, "children": [526], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 11}}, {"id": 526, "type": "unary_expression", "text": "!root", "parent": 525, "children": [527, 528], "start_point": {"row": 172, "column": 5}, "end_point": {"row": 172, "column": 10}}, {"id": 527, "type": "!", "text": "!", "parent": 526, "children": [], "start_point": {"row": 172, "column": 5}, "end_point": {"row": 172, "column": 6}}, {"id": 528, "type": "identifier", "text": "root", "parent": 526, "children": [], "start_point": {"row": 172, "column": 6}, "end_point": {"row": 172, "column": 10}}, {"id": 529, "type": "call_expression", "text": "fprintf(stderr, \"reading file %s produced null\\n\", filename)", "parent": 524, "children": [530, 531], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 62}}, {"id": 530, "type": "identifier", "text": "fprintf", "parent": 529, "children": [], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 9}}, {"id": 531, "type": "argument_list", "text": "(stderr, \"reading file %s produced null\\n\", filename)", "parent": 529, "children": [532, 533, 535], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 62}}, {"id": 532, "type": "identifier", "text": "stderr", "parent": 531, "children": [], "start_point": {"row": 173, "column": 10}, "end_point": {"row": 173, "column": 16}}, {"id": 533, "type": "string_literal", "text": "\"reading file %s produced null\\n\"", "parent": 531, "children": [534], "start_point": {"row": 173, "column": 18}, "end_point": {"row": 173, "column": 51}}, {"id": 534, "type": "escape_sequence", "text": "\\n", "parent": 533, "children": [], "start_point": {"row": 173, "column": 48}, "end_point": {"row": 173, "column": 50}}, {"id": 535, "type": "identifier", "text": "filename", "parent": 531, "children": [], "start_point": {"row": 173, "column": 53}, "end_point": {"row": 173, "column": 61}}, {"id": 536, "type": "call_expression", "text": "exit(1)", "parent": 524, "children": [537, 538], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 9}}, {"id": 537, "type": "identifier", "text": "exit", "parent": 536, "children": [], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 6}}, {"id": 538, "type": "argument_list", "text": "(1)", "parent": 536, "children": [539], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 9}}, {"id": 539, "type": "number_literal", "text": "1", "parent": 538, "children": [], "start_point": {"row": 174, "column": 7}, "end_point": {"row": 174, "column": 8}}, {"id": 540, "type": "assignment_expression", "text": "root = expand((struct path){ .object = root, .upper = NULL })", "parent": 476, "children": [541, 542, 543], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 62}}, {"id": 541, "type": "identifier", "text": "root", "parent": 540, "children": [], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 5}}, {"id": 542, "type": "=", "text": "=", "parent": 540, "children": [], "start_point": {"row": 178, "column": 6}, "end_point": {"row": 178, "column": 7}}, {"id": 543, "type": "call_expression", "text": "expand((struct path){ .object = root, .upper = NULL })", "parent": 540, "children": [544, 545], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 62}}, {"id": 544, "type": "identifier", "text": "expand", "parent": 543, "children": [], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 14}}, {"id": 545, "type": "argument_list", "text": "((struct path){ .object = root, .upper = NULL })", "parent": 543, "children": [546], "start_point": {"row": 178, "column": 14}, "end_point": {"row": 178, "column": 62}}, {"id": 546, "type": "compound_literal_expression", "text": "(struct path){ .object = root, .upper = NULL }", "parent": 545, "children": [547, 551], "start_point": {"row": 178, "column": 15}, "end_point": {"row": 178, "column": 61}}, {"id": 547, "type": "type_descriptor", "text": "struct path", "parent": 546, "children": [548], "start_point": {"row": 178, "column": 16}, "end_point": {"row": 178, "column": 27}}, {"id": 548, "type": "struct_specifier", "text": "struct path", "parent": 547, "children": [549, 550], "start_point": {"row": 178, "column": 16}, "end_point": {"row": 178, "column": 27}}, {"id": 549, "type": "struct", "text": "struct", "parent": 548, "children": [], "start_point": {"row": 178, "column": 16}, "end_point": {"row": 178, "column": 22}}, {"id": 550, "type": "type_identifier", "text": "path", "parent": 548, "children": [], "start_point": {"row": 178, "column": 23}, "end_point": {"row": 178, "column": 27}}, {"id": 551, "type": "initializer_list", "text": "{ .object = root, .upper = NULL }", "parent": 546, "children": [552, 557], "start_point": {"row": 178, "column": 28}, "end_point": {"row": 178, "column": 61}}, {"id": 552, "type": "initializer_pair", "text": ".object = root", "parent": 551, "children": [553, 555, 556], "start_point": {"row": 178, "column": 30}, "end_point": {"row": 178, "column": 44}}, {"id": 553, "type": "field_designator", "text": ".object", "parent": 552, "children": [554], "start_point": {"row": 178, "column": 30}, "end_point": {"row": 178, "column": 37}}, {"id": 554, "type": "field_identifier", "text": "object", "parent": 553, "children": [], "start_point": {"row": 178, "column": 31}, "end_point": {"row": 178, "column": 37}}, {"id": 555, "type": "=", "text": "=", "parent": 552, "children": [], "start_point": {"row": 178, "column": 38}, "end_point": {"row": 178, "column": 39}}, {"id": 556, "type": "identifier", "text": "root", "parent": 552, "children": [], "start_point": {"row": 178, "column": 40}, "end_point": {"row": 178, "column": 44}}, {"id": 557, "type": "initializer_pair", "text": ".upper = NULL", "parent": 551, "children": [558, 560, 561], "start_point": {"row": 178, "column": 46}, "end_point": {"row": 178, "column": 59}}, {"id": 558, "type": "field_designator", "text": ".upper", "parent": 557, "children": [559], "start_point": {"row": 178, "column": 46}, "end_point": {"row": 178, "column": 52}}, {"id": 559, "type": "field_identifier", "text": "upper", "parent": 558, "children": [], "start_point": {"row": 178, "column": 47}, "end_point": {"row": 178, "column": 52}}, {"id": 560, "type": "=", "text": "=", "parent": 557, "children": [], "start_point": {"row": 178, "column": 53}, "end_point": {"row": 178, "column": 54}}, {"id": 561, "type": "null", "text": "NULL", "parent": 557, "children": [562], "start_point": {"row": 178, "column": 55}, "end_point": {"row": 178, "column": 59}}, {"id": 562, "type": "NULL", "text": "NULL", "parent": 561, "children": [], "start_point": {"row": 178, "column": 55}, "end_point": {"row": 178, "column": 59}}, {"id": 563, "type": "call_expression", "text": "json_object_to_file_ext (\"/dev/stdout\", root, JSON_C_TO_STRING_PRETTY)", "parent": 476, "children": [564, 565], "start_point": {"row": 181, "column": 1}, "end_point": {"row": 181, "column": 71}}, {"id": 564, "type": "identifier", "text": "json_object_to_file_ext", "parent": 563, "children": [], "start_point": {"row": 181, "column": 1}, "end_point": {"row": 181, "column": 24}}, {"id": 565, "type": "argument_list", "text": "(\"/dev/stdout\", root, JSON_C_TO_STRING_PRETTY)", "parent": 563, "children": [566, 567, 568], "start_point": {"row": 181, "column": 25}, "end_point": {"row": 181, "column": 71}}, {"id": 566, "type": "string_literal", "text": "\"/dev/stdout\"", "parent": 565, "children": [], "start_point": {"row": 181, "column": 26}, "end_point": {"row": 181, "column": 39}}, {"id": 567, "type": "identifier", "text": "root", "parent": 565, "children": [], "start_point": {"row": 181, "column": 41}, "end_point": {"row": 181, "column": 45}}, {"id": 568, "type": "identifier", "text": "JSON_C_TO_STRING_PRETTY", "parent": 565, "children": [], "start_point": {"row": 181, "column": 47}, "end_point": {"row": 181, "column": 70}}, {"id": 569, "type": "call_expression", "text": "json_object_put(root)", "parent": 476, "children": [570, 571], "start_point": {"row": 184, "column": 1}, "end_point": {"row": 184, "column": 22}}, {"id": 570, "type": "identifier", "text": "json_object_put", "parent": 569, "children": [], "start_point": {"row": 184, "column": 1}, "end_point": {"row": 184, "column": 16}}, {"id": 571, "type": "argument_list", "text": "(root)", "parent": 569, "children": [572], "start_point": {"row": 184, "column": 16}, "end_point": {"row": 184, "column": 22}}, {"id": 572, "type": "identifier", "text": "root", "parent": 571, "children": [], "start_point": {"row": 184, "column": 17}, "end_point": {"row": 184, "column": 21}}, {"id": 573, "type": "function_definition", "text": "int main(int ac, char **av)\n{\n\tif (!*++av)\n\t\tprocess(\"-\");\n\telse {\n\t\tdo { process(*av); } while(*++av);\n\t}\n\treturn 0;\n}", "parent": null, "children": [574, 575], "start_point": {"row": 188, "column": 0}, "end_point": {"row": 196, "column": 1}}, {"id": 574, "type": "primitive_type", "text": "int", "parent": 573, "children": [], "start_point": {"row": 188, "column": 0}, "end_point": {"row": 188, "column": 3}}, {"id": 575, "type": "function_declarator", "text": "main(int ac, char **av)", "parent": 573, "children": [576, 577], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 27}}, {"id": 576, "type": "identifier", "text": "main", "parent": 575, "children": [], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 8}}, {"id": 577, "type": "parameter_list", "text": "(int ac, char **av)", "parent": 575, "children": [578, 581], "start_point": {"row": 188, "column": 8}, "end_point": {"row": 188, "column": 27}}, {"id": 578, "type": "parameter_declaration", "text": "int ac", "parent": 577, "children": [579, 580], "start_point": {"row": 188, "column": 9}, "end_point": {"row": 188, "column": 15}}, {"id": 579, "type": "primitive_type", "text": "int", "parent": 578, "children": [], "start_point": {"row": 188, "column": 9}, "end_point": {"row": 188, "column": 12}}, {"id": 580, "type": "identifier", "text": "ac", "parent": 578, "children": [], "start_point": {"row": 188, "column": 13}, "end_point": {"row": 188, "column": 15}}, {"id": 581, "type": "parameter_declaration", "text": "char **av", "parent": 577, "children": [582, 583], "start_point": {"row": 188, "column": 17}, "end_point": {"row": 188, "column": 26}}, {"id": 582, "type": "primitive_type", "text": "char", "parent": 581, "children": [], "start_point": {"row": 188, "column": 17}, "end_point": {"row": 188, "column": 21}}, {"id": 583, "type": "pointer_declarator", "text": "**av", "parent": 581, "children": [584, 585], "start_point": {"row": 188, "column": 22}, "end_point": {"row": 188, "column": 26}}, {"id": 584, "type": "*", "text": "*", "parent": 583, "children": [], "start_point": {"row": 188, "column": 22}, "end_point": {"row": 188, "column": 23}}, {"id": 585, "type": "pointer_declarator", "text": "*av", "parent": 583, "children": [586, 587], "start_point": {"row": 188, "column": 23}, "end_point": {"row": 188, "column": 26}}, {"id": 586, "type": "*", "text": "*", "parent": 585, "children": [], "start_point": {"row": 188, "column": 23}, "end_point": {"row": 188, "column": 24}}, {"id": 587, "type": "identifier", "text": "av", "parent": 585, "children": [], "start_point": {"row": 188, "column": 24}, "end_point": {"row": 188, "column": 26}}, {"id": 588, "type": "if_statement", "text": "if (!*++av)\n\t\tprocess(\"-\");\n\telse {\n\t\tdo { process(*av); } while(*++av);\n\t}", "parent": 573, "children": [589, 601], "start_point": {"row": 190, "column": 1}, "end_point": {"row": 194, "column": 2}}, {"id": 589, "type": "parenthesized_expression", "text": "(!*++av)", "parent": 588, "children": [590], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 190, "column": 12}}, {"id": 590, "type": "unary_expression", "text": "!*++av", "parent": 589, "children": [591, 592], "start_point": {"row": 190, "column": 5}, "end_point": {"row": 190, "column": 11}}, {"id": 591, "type": "!", "text": "!", "parent": 590, "children": [], "start_point": {"row": 190, "column": 5}, "end_point": {"row": 190, "column": 6}}, {"id": 592, "type": "pointer_expression", "text": "*++av", "parent": 590, "children": [593, 594], "start_point": {"row": 190, "column": 6}, "end_point": {"row": 190, "column": 11}}, {"id": 593, "type": "*", "text": "*", "parent": 592, "children": [], "start_point": {"row": 190, "column": 6}, "end_point": {"row": 190, "column": 7}}, {"id": 594, "type": "update_expression", "text": "++av", "parent": 592, "children": [595, 596], "start_point": {"row": 190, "column": 7}, "end_point": {"row": 190, "column": 11}}, {"id": 595, "type": "++", "text": "++", "parent": 594, "children": [], "start_point": {"row": 190, "column": 7}, "end_point": {"row": 190, "column": 9}}, {"id": 596, "type": "identifier", "text": "av", "parent": 594, "children": [], "start_point": {"row": 190, "column": 9}, "end_point": {"row": 190, "column": 11}}, {"id": 597, "type": "call_expression", "text": "process(\"-\")", "parent": 588, "children": [598, 599], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 14}}, {"id": 598, "type": "identifier", "text": "process", "parent": 597, "children": [], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 9}}, {"id": 599, "type": "argument_list", "text": "(\"-\")", "parent": 597, "children": [600], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 14}}, {"id": 600, "type": "string_literal", "text": "\"-\"", "parent": 599, "children": [], "start_point": {"row": 191, "column": 10}, "end_point": {"row": 191, "column": 13}}, {"id": 601, "type": "else_clause", "text": "else {\n\t\tdo { process(*av); } while(*++av);\n\t}", "parent": 588, "children": [], "start_point": {"row": 192, "column": 1}, "end_point": {"row": 194, "column": 2}}, {"id": 602, "type": "do_statement", "text": "do { process(*av); } while(*++av);", "parent": 601, "children": [609], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 36}}, {"id": 603, "type": "call_expression", "text": "process(*av)", "parent": 602, "children": [604, 605], "start_point": {"row": 193, "column": 7}, "end_point": {"row": 193, "column": 19}}, {"id": 604, "type": "identifier", "text": "process", "parent": 603, "children": [], "start_point": {"row": 193, "column": 7}, "end_point": {"row": 193, "column": 14}}, {"id": 605, "type": "argument_list", "text": "(*av)", "parent": 603, "children": [606], "start_point": {"row": 193, "column": 14}, "end_point": {"row": 193, "column": 19}}, {"id": 606, "type": "pointer_expression", "text": "*av", "parent": 605, "children": [607, 608], "start_point": {"row": 193, "column": 15}, "end_point": {"row": 193, "column": 18}}, {"id": 607, "type": "*", "text": "*", "parent": 606, "children": [], "start_point": {"row": 193, "column": 15}, "end_point": {"row": 193, "column": 16}}, {"id": 608, "type": "identifier", "text": "av", "parent": 606, "children": [], "start_point": {"row": 193, "column": 16}, "end_point": {"row": 193, "column": 18}}, {"id": 609, "type": "parenthesized_expression", "text": "(*++av)", "parent": 602, "children": [610], "start_point": {"row": 193, "column": 28}, "end_point": {"row": 193, "column": 35}}, {"id": 610, "type": "pointer_expression", "text": "*++av", "parent": 609, "children": [611, 612], "start_point": {"row": 193, "column": 29}, "end_point": {"row": 193, "column": 34}}, {"id": 611, "type": "*", "text": "*", "parent": 610, "children": [], "start_point": {"row": 193, "column": 29}, "end_point": {"row": 193, "column": 30}}, {"id": 612, "type": "update_expression", "text": "++av", "parent": 610, "children": [613, 614], "start_point": {"row": 193, "column": 30}, "end_point": {"row": 193, "column": 34}}, {"id": 613, "type": "++", "text": "++", "parent": 612, "children": [], "start_point": {"row": 193, "column": 30}, "end_point": {"row": 193, "column": 32}}, {"id": 614, "type": "identifier", "text": "av", "parent": 612, "children": [], "start_point": {"row": 193, "column": 32}, "end_point": {"row": 193, "column": 34}}, {"id": 615, "type": "return_statement", "text": "return 0;", "parent": 573, "children": [616], "start_point": {"row": 195, "column": 1}, "end_point": {"row": 195, "column": 10}}, {"id": 616, "type": "number_literal", "text": "0", "parent": 615, "children": [], "start_point": {"row": 195, "column": 8}, "end_point": {"row": 195, "column": 9}}]}, "node_categories": {"declarations": {"functions": [39, 45, 149, 155, 476, 478, 573, 575], "variables": [18, 25, 32, 48, 53, 58, 158, 163, 170, 180, 184, 481, 578, 581], "classes": [15, 16, 19, 20, 26, 27, 33, 34, 40, 41, 59, 60, 150, 151, 159, 160, 164, 165, 171, 172, 185, 186, 351, 352, 434, 435, 548, 549], "imports": [3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [66, 67, 68, 69, 78, 79, 80, 84, 85, 103, 106, 113, 119, 120, 125, 126, 128, 133, 141, 192, 193, 196, 203, 204, 207, 211, 214, 215, 217, 222, 228, 232, 239, 242, 247, 248, 251, 257, 261, 268, 271, 274, 275, 278, 281, 287, 291, 298, 302, 309, 312, 318, 321, 325, 326, 328, 331, 333, 338, 341, 346, 349, 364, 367, 368, 372, 375, 378, 381, 384, 387, 401, 404, 407, 411, 412, 419, 422, 429, 432, 447, 450, 451, 455, 458, 463, 473, 487, 488, 490, 500, 501, 506, 513, 520, 525, 526, 529, 536, 543, 546, 563, 569, 589, 590, 592, 594, 597, 603, 606, 609, 610, 612], "assignments": [96, 100, 110, 138, 236, 265, 295, 306, 315, 335, 343, 394, 398, 416, 426, 495, 517, 540], "loops": [118, 270, 324, 410], "conditionals": [2, 17, 21, 24, 28, 31, 35, 38, 42, 46, 52, 57, 61, 64, 65, 70, 81, 86, 97, 99, 101, 104, 107, 111, 114, 116, 121, 123, 124, 129, 131, 132, 134, 139, 142, 148, 152, 156, 161, 162, 166, 169, 173, 176, 179, 182, 183, 187, 188, 189, 190, 191, 194, 197, 198, 199, 200, 201, 202, 205, 208, 209, 212, 213, 218, 220, 221, 223, 225, 229, 231, 233, 237, 240, 243, 245, 246, 250, 252, 254, 258, 260, 262, 266, 269, 272, 273, 276, 279, 280, 282, 284, 288, 290, 292, 296, 299, 300, 303, 305, 307, 310, 313, 314, 316, 319, 322, 323, 329, 332, 334, 336, 339, 342, 344, 347, 353, 357, 359, 362, 365, 366, 369, 371, 373, 376, 377, 379, 382, 383, 385, 388, 391, 392, 393, 395, 399, 405, 408, 409, 413, 415, 417, 420, 423, 424, 425, 427, 430, 436, 440, 442, 445, 448, 449, 452, 454, 456, 459, 460, 461, 462, 464, 468, 474, 475, 479, 485, 486, 491, 493, 496, 499, 502, 504, 505, 507, 509, 512, 514, 518, 521, 523, 524, 528, 530, 532, 535, 537, 541, 544, 550, 554, 556, 559, 564, 567, 568, 570, 572, 576, 580, 587, 588, 596, 598, 604, 608, 614], "returns": [93, 135, 147, 301, 472, 615], "exceptions": []}, "expressions": {"calls": [], "literals": [5, 8, 11, 14, 71, 73, 82, 87, 89, 109, 117, 146, 210, 226, 235, 255, 264, 285, 294, 397, 494, 498, 510, 516, 533, 539, 566, 600, 616], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [356, 361, 439, 444, 553, 558]}}, "cross_language_map": {"function_declarations": [{"node_id": 39, "universal_type": "function", "name": "json_object", "text_snippet": "struct json_object *search(const char *path)\n{\n\tchar *d;\n\tstruct json_object *i;\n\n\t/* does it match "}, {"node_id": 45, "universal_type": "function", "name": "unknown", "text_snippet": "search(const char *path)"}, {"node_id": 149, "universal_type": "function", "name": "json_object", "text_snippet": "struct json_object *expand(struct path path)\n{\n\tstruct path *p;\n\tstruct json_object *o, *x;\n\tint n, "}, {"node_id": 155, "universal_type": "function", "name": "unknown", "text_snippet": "expand(struct path path)"}, {"node_id": 476, "universal_type": "function", "name": "process", "text_snippet": "void process(char *filename)\n{\n\t/* translate - */\n\tif (!strcmp(filename, \"-\"))\n\t\tfilename = \"/dev/st"}, {"node_id": 478, "universal_type": "function", "name": "unknown", "text_snippet": "process(char *filename)"}, {"node_id": 573, "universal_type": "function", "name": "main", "text_snippet": "int main(int ac, char **av)\n{\n\tif (!*++av)\n\t\tprocess(\"-\");\n\telse {\n\t\tdo { process(*av); } while(*++a"}, {"node_id": 575, "universal_type": "function", "name": "unknown", "text_snippet": "main(int ac, char **av)"}], "class_declarations": [{"node_id": 15, "universal_type": "class", "name": "path", "text_snippet": "struct path\n{\n\tstruct json_object *object;\t/**< node being expanded */\n\tstruct path *upper;\t\t/**< li"}, {"node_id": 16, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 19, "universal_type": "class", "name": "json_object", "text_snippet": "struct json_object"}, {"node_id": 20, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 26, "universal_type": "class", "name": "path", "text_snippet": "struct path"}, {"node_id": 27, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 33, "universal_type": "class", "name": "json_object", "text_snippet": "struct json_object"}, {"node_id": 34, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 40, "universal_type": "class", "name": "json_object", "text_snippet": "struct json_object"}, {"node_id": 41, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 59, "universal_type": "class", "name": "json_object", "text_snippet": "struct json_object"}, {"node_id": 60, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 150, "universal_type": "class", "name": "json_object", "text_snippet": "struct json_object"}, {"node_id": 151, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 159, "universal_type": "class", "name": "path", "text_snippet": "struct path"}, {"node_id": 160, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 164, "universal_type": "class", "name": "path", "text_snippet": "struct path"}, {"node_id": 165, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 171, "universal_type": "class", "name": "json_object", "text_snippet": "struct json_object"}, {"node_id": 172, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 185, "universal_type": "class", "name": "json_object_iterator", "text_snippet": "struct json_object_iterator"}, {"node_id": 186, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 351, "universal_type": "class", "name": "path", "text_snippet": "struct path"}, {"node_id": 352, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 434, "universal_type": "class", "name": "path", "text_snippet": "struct path"}, {"node_id": 435, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 548, "universal_type": "class", "name": "path", "text_snippet": "struct path"}, {"node_id": 549, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include <string.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <stdio.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <unistd.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <json-c/json.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (C) 2015-2020 \"IoT.bzh\"\n * Author <NAME> <<EMAIL>>\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/*\n * This simple program expands the object { \"$ref\": \"#/path/to/a/target\" }\n *\n * For example:\n *\n * {\n * \"type\":{\n * \"a\": \"int\",\n * \"b\": { \"$ref\": \"#/type/a\" }\n * }\n * }\n *\n * will be exapanded to\n *\n * {\n * \"type\":{\n * \"a\": \"int\",\n * \"b\": \"int\"\n * }\n * }\n *\n * Invocation: program [file|-]...\n *\n * without arguments, it reads the input.\n */\n\n#define _GNU_SOURCE\n#include <string.h>\n#include <stdio.h>\n#include <unistd.h>\n\n#include <json-c/json.h>\n\n/**\n * records path to the expanded node\n */\nstruct path\n{\n\tstruct json_object *object;\t/**< node being expanded */\n\tstruct path *upper;\t\t/**< link to upper expanded nodes */\n};\n\n/**\n * root of the JSON being parsed\n */\nstruct json_object *root;\n\n/**\n * Search for a reference of type \"#/a/b/c\" int the\n * parsed JSON object\n */\nstruct json_object *search(const char *path)\n{\n\tchar *d;\n\tstruct json_object *i;\n\n\t/* does it match #/ at the beginning? */\n\tif (path[0] != '#' || (path[0] && path[1] != '/'))\n\t\treturn NULL;\n\n\t/* search from root to target */\n\ti = root;\n\td = strdupa(path+2);\n\td = strtok(d, \"/\");\n\twhile(i && d) {\n\t\tif (!json_object_object_get_ex(i, d, &i))\n\t\t\treturn NULL;\n\t\td = strtok(NULL, \"/\");\n\t}\n\treturn i;\n}\n\n/**\n * Expands the node designated by path and returns its expanded form\n */\nstruct json_object *expand(struct path path)\n{\n\tstruct path *p;\n\tstruct json_object *o, *x;\n\tint n, i;\n\tstruct json_object_iterator ji, jn;\n\n\t/* expansion depends of the type of the node */\n\tswitch (json_object_get_type(path.object)) {\n\tcase json_type_object:\n\t\t/* for object, look if it contains a property \"$ref\" */\n\t\tif (json_object_object_get_ex(path.object, \"$ref\", &o)) {\n\t\t\t/* yes, reference, try to substitute its target */\n\t\t\tif (!json_object_is_type(o, json_type_string)) {\n\t\t\t\tfprintf(stderr, \"found a $ref not being string. Is: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tx = search(json_object_get_string(o));\n\t\t\tif (!x) {\n\t\t\t\tfprintf(stderr, \"$ref not found. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tp = &path;\n\t\t\twhile(p) {\n\t\t\t\tif (x == p->object) {\n\t\t\t\t\tfprintf(stderr, \"$ref recursive. Was: %s\\n\", json_object_get_string(o));\n\t\t\t\t\texit(1);\n\t\t\t\t}\n\t\t\t\tp = p->upper;\n\t\t\t}\n\t\t\t/* cool found, return a new instance of the target */\n\t\t\treturn json_object_get(x);\n\t\t}\n\t\t/* no, expand the values */\n\t\tji = json_object_iter_begin(path.object);\n\t\tjn = json_object_iter_end(path.object);\n\t\twhile (!json_object_iter_equal(&ji, &jn)) {\n\t\t\to = json_object_iter_peek_value(&ji);\n\t\t\tx = expand((struct path){ .object = o, .upper = &path });\n\t\t\tif (x != o)\n\t\t\t\tjson_object_object_add(path.object, json_object_iter_peek_name(&ji), x);\n\t\t\tjson_object_iter_next(&ji);\n\t\t}\n\t\tbreak;\n\tcase json_type_array:\n\t\t/* expand the values of arrays */\n\t\ti = 0;\n\t\tn = (int)json_object_array_length(path.object);\n\t\twhile (i != n) {\n\t\t\to = json_object_array_get_idx(path.object, i);\n\t\t\tx = expand((struct path){ .object = o, .upper = &path });\n\t\t\tif (x != o)\n\t\t\t\tjson_object_array_put_idx(path.object, i, x);\n\t\t\ti++;\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\t/* otherwise no expansion */\n\t\tbreak;\n\t}\n\t/* return the given node */\n\treturn path.object;\n}\n\n/**\n * process a file and prints its expansion on stdout\n */\nvoid process(char *filename)\n{\n\t/* translate - */\n\tif (!strcmp(filename, \"-\"))\n\t\tfilename = \"/dev/stdin\";\n\n\t/* check access */\n\tif (access(filename, R_OK)) {\n\t\tfprintf(stderr, \"can't access file %s\\n\", filename);\n\t\texit(1);\n\t}\n\n\t/* read the file */\n\troot = json_object_from_file(filename);\n\tif (!root) {\n\t\tfprintf(stderr, \"reading file %s produced null\\n\", filename);\n\t\texit(1);\n\t}\n\n\t/* expand */\n\troot = expand((struct path){ .object = root, .upper = NULL });\n\n\t/* print the result */\n\tjson_object_to_file_ext (\"/dev/stdout\", root, JSON_C_TO_STRING_PRETTY);\n\n\t/* clean up */\n\tjson_object_put(root);\n}\n\n/** process the list of files or stdin if none */\nint main(int ac, char **av)\n{\n\tif (!*++av)\n\t\tprocess(\"-\");\n\telse {\n\t\tdo { process(*av); } while(*++av);\n\t}\n\treturn 0;\n}\n\n"}
80,915
c
#pragma once #include <catch2/catch_test_macros.hpp> #include "../src/utils.h" #include "../src/ioutils.h"
25.75
4
(translation_unit) "#pragma once\n\n#include <catch2/catch_test_macros.hpp>\n\n#include "../src/utils.h"\n#include "../src/ioutils.h"\n\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <catch2/catch_test_macros.hpp>\n" (#include) "#include" (system_lib_string) "<catch2/catch_test_macros.hpp>" (preproc_include) "#include "../src/utils.h"\n" (#include) "#include" (string_literal) ""../src/utils.h"" (") """ (string_content) "../src/utils.h" (") """ (preproc_include) "#include "../src/ioutils.h"\n" (#include) "#include" (string_literal) ""../src/ioutils.h"" (") """ (string_content) "../src/ioutils.h" (") """
19
0
{"language": "c", "success": true, "metadata": {"lines": 4, "avg_line_length": 25.75, "nodes": 12, "errors": 0, "source_hash": "f32b3e300cf9daedd7d02d5ecbbcfe536e6b7e2ede741ff410096d7acbb95a16", "categorized_nodes": 10}, "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 <catch2/catch_test_macros.hpp>\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": "<catch2/catch_test_macros.hpp>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 39}}, {"id": 6, "type": "preproc_include", "text": "#include \"../src/utils.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"../src/utils.h\"", "parent": 6, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include \"../src/ioutils.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"../src/ioutils.h\"", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 27}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <catch2/catch_test_macros.hpp>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"../src/utils.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"../src/ioutils.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <catch2/catch_test_macros.hpp>\n\n#include \"../src/utils.h\"\n#include \"../src/ioutils.h\"\n\n"}
80,916
c
#pragma once #include "quantum.h" #define LAYOUT_numbrero_numpad( \ K00, K01, K02, K03, K04, \ K10, K11, K12, K13, \ K20, K21, K22, K23, K14, \ K30, K31, K32, K33, \ K41, K43, K34 \ ) { \ { K00, K01, K02, K03, K04 }, \ { K10, K11, K12, K13, K14 }, \ { K20, K21, K22, K23, KC_NO }, \ { K30, K31, K32, K33, K34 }, \ { KC_NO, K41, KC_NO, K43, KC_NO } \ } #define LAYOUT_numbrero_ortho(\ K00, K01, K02, K03, K04, \ K10, K11, K12, K13, K14, \ K20, K21, K22, K23, K24, \ K30, K31, K32, K33, K34, \ K41, K42, K43, K44 \ ){ \ { K00, K01, K02, K03, K04 }, \ { K10, K11, K12, K13, K14 }, \ { K20, K21, K22, K23, K24 }, \ { K30, K31, K32, K33, K34 }, \ { KC_NO, K41, K42, K43, K44 } \ }
51.44
16
(translation_unit) "#pragma once\n\n#include "quantum.h"\n\n#define LAYOUT_numbrero_numpad( \\n K00, K01, K02, K03, K04, \\n K10, K11, K12, K13, \\n K20, K21, K22, K23, K14, \\n K30, K31, K32, K33, \\n K41, K43, K34 \\n) { \\n { K00, K01, K02, K03, K04 }, \\n { K10, K11, K12, K13, K14 }, \\n { K20, K21, K22, K23, KC_NO }, \\n { K30, K31, K32, K33, K34 }, \\n { KC_NO, K41, KC_NO, K43, KC_NO } \\n}\n#define LAYOUT_numbrero_ortho(\\n K00, K01, K02, K03, K04, \\n K10, K11, K12, K13, K14, \\n K20, K21, K22, K23, K24, \\n K30, K31, K32, K33, K34, \\n K41, K42, K43, K44 \\n){ \\n { K00, K01, K02, K03, K04 }, \\n { K10, K11, K12, K13, K14 }, \\n { K20, K21, K22, K23, K24 }, \\n { K30, K31, K32, K33, K34 }, \\n { KC_NO, K41, K42, K43, K44 } \\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "quantum.h"\n" (#include) "#include" (string_literal) ""quantum.h"" (") """ (string_content) "quantum.h" (") """ (preproc_function_def) "#define LAYOUT_numbrero_numpad( \\n K00, K01, K02, K03, K04, \\n K10, K11, K12, K13, \\n K20, K21, K22, K23, K14, \\n K30, K31, K32, K33, \\n K41, K43, K34 \\n) { \\n { K00, K01, K02, K03, K04 }, \\n { K10, K11, K12, K13, K14 }, \\n { K20, K21, K22, K23, KC_NO }, \\n { K30, K31, K32, K33, K34 }, \\n { KC_NO, K41, KC_NO, K43, KC_NO } \\n}\n" (#define) "#define" (identifier) "LAYOUT_numbrero_numpad" (preproc_params) "( \\n K00, K01, K02, K03, K04, \\n K10, K11, K12, K13, \\n K20, K21, K22, K23, K14, \\n K30, K31, K32, K33, \\n K41, K43, K34 \\n)" (() "(" (identifier) "K00" (,) "," (identifier) "K01" (,) "," (identifier) "K02" (,) "," (identifier) "K03" (,) "," (identifier) "K04" (,) "," (identifier) "K10" (,) "," (identifier) "K11" (,) "," (identifier) "K12" (,) "," (identifier) "K13" (,) "," (identifier) "K20" (,) "," (identifier) "K21" (,) "," (identifier) "K22" (,) "," (identifier) "K23" (,) "," (identifier) "K14" (,) "," (identifier) "K30" (,) "," (identifier) "K31" (,) "," (identifier) "K32" (,) "," (identifier) "K33" (,) "," (identifier) "K41" (,) "," (identifier) "K43" (,) "," (identifier) "K34" ()) ")" (preproc_arg) "{ \\n { K00, K01, K02, K03, K04 }, \\n { K10, K11, K12, K13, K14 }, \\n { K20, K21, K22, K23, KC_NO }, \\n { K30, K31, K32, K33, K34 }, \\n { KC_NO, K41, KC_NO, K43, KC_NO } \\n}" (preproc_function_def) "#define LAYOUT_numbrero_ortho(\\n K00, K01, K02, K03, K04, \\n K10, K11, K12, K13, K14, \\n K20, K21, K22, K23, K24, \\n K30, K31, K32, K33, K34, \\n K41, K42, K43, K44 \\n){ \\n { K00, K01, K02, K03, K04 }, \\n { K10, K11, K12, K13, K14 }, \\n { K20, K21, K22, K23, K24 }, \\n { K30, K31, K32, K33, K34 }, \\n { KC_NO, K41, K42, K43, K44 } \\n}\n" (#define) "#define" (identifier) "LAYOUT_numbrero_ortho" (preproc_params) "(\\n K00, K01, K02, K03, K04, \\n K10, K11, K12, K13, K14, \\n K20, K21, K22, K23, K24, \\n K30, K31, K32, K33, K34, \\n K41, K42, K43, K44 \\n)" (() "(" (identifier) "K00" (,) "," (identifier) "K01" (,) "," (identifier) "K02" (,) "," (identifier) "K03" (,) "," (identifier) "K04" (,) "," (identifier) "K10" (,) "," (identifier) "K11" (,) "," (identifier) "K12" (,) "," (identifier) "K13" (,) "," (identifier) "K14" (,) "," (identifier) "K20" (,) "," (identifier) "K21" (,) "," (identifier) "K22" (,) "," (identifier) "K23" (,) "," (identifier) "K24" (,) "," (identifier) "K30" (,) "," (identifier) "K31" (,) "," (identifier) "K32" (,) "," (identifier) "K33" (,) "," (identifier) "K34" (,) "," (identifier) "K41" (,) "," (identifier) "K42" (,) "," (identifier) "K43" (,) "," (identifier) "K44" ()) ")" (preproc_arg) "{ \\n { K00, K01, K02, K03, K04 }, \\n { K10, K11, K12, K13, K14 }, \\n { K20, K21, K22, K23, K24 }, \\n { K30, K31, K32, K33, K34 }, \\n { KC_NO, K41, K42, K43, K44 } \\n}"
112
0
{"language": "c", "success": true, "metadata": {"lines": 16, "avg_line_length": 51.44, "nodes": 61, "errors": 0, "source_hash": "897c89235ef34a2ffa0d67d5b0c2c7d7c4760ee52e153701a33531ef0ab66eae", "categorized_nodes": 53}, "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 \"quantum.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": "\"quantum.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 20}}, {"id": 6, "type": "preproc_function_def", "text": "#define LAYOUT_numbrero_numpad( \\\n K00, K01, K02, K03, K04, \\\n K10, K11, K12, K13, \\\n K20, K21, K22, K23, K14, \\\n K30, K31, K32, K33, \\\n K41, K43, K34 \\\n) { \\\n { K00, K01, K02, K03, K04 }, \\\n { K10, K11, K12, K13, K14 }, \\\n { K20, K21, K22, K23, KC_NO }, \\\n { K30, K31, K32, K33, K34 }, \\\n { KC_NO, K41, KC_NO, K43, KC_NO } \\\n}\n", "parent": null, "children": [7, 8, 9, 31], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 8, "type": "identifier", "text": "LAYOUT_numbrero_numpad", "parent": 6, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 30}}, {"id": 9, "type": "preproc_params", "text": "( \\\n K00, K01, K02, K03, K04, \\\n K10, K11, K12, K13, \\\n K20, K21, K22, K23, K14, \\\n K30, K31, K32, K33, \\\n K41, K43, K34 \\\n)", "parent": 6, "children": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "start_point": {"row": 4, "column": 30}, "end_point": {"row": 10, "column": 1}}, {"id": 10, "type": "identifier", "text": "K00", "parent": 9, "children": [], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 5, "column": 5}}, {"id": 11, "type": "identifier", "text": "K01", "parent": 9, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 10}}, {"id": 12, "type": "identifier", "text": "K02", "parent": 9, "children": [], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 15}}, {"id": 13, "type": "identifier", "text": "K03", "parent": 9, "children": [], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 20}}, {"id": 14, "type": "identifier", "text": "K04", "parent": 9, "children": [], "start_point": {"row": 5, "column": 22}, "end_point": {"row": 5, "column": 25}}, {"id": 15, "type": "identifier", "text": "K10", "parent": 9, "children": [], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 5}}, {"id": 16, "type": "identifier", "text": "K11", "parent": 9, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 10}}, {"id": 17, "type": "identifier", "text": "K12", "parent": 9, "children": [], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 15}}, {"id": 18, "type": "identifier", "text": "K13", "parent": 9, "children": [], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 20}}, {"id": 19, "type": "identifier", "text": "K20", "parent": 9, "children": [], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 5}}, {"id": 20, "type": "identifier", "text": "K21", "parent": 9, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 10}}, {"id": 21, "type": "identifier", "text": "K22", "parent": 9, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 15}}, {"id": 22, "type": "identifier", "text": "K23", "parent": 9, "children": [], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 20}}, {"id": 23, "type": "identifier", "text": "K14", "parent": 9, "children": [], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 25}}, {"id": 24, "type": "identifier", "text": "K30", "parent": 9, "children": [], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 5}}, {"id": 25, "type": "identifier", "text": "K31", "parent": 9, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 10}}, {"id": 26, "type": "identifier", "text": "K32", "parent": 9, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 15}}, {"id": 27, "type": "identifier", "text": "K33", "parent": 9, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 20}}, {"id": 28, "type": "identifier", "text": "K41", "parent": 9, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 10}}, {"id": 29, "type": "identifier", "text": "K43", "parent": 9, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 20}}, {"id": 30, "type": "identifier", "text": "K34", "parent": 9, "children": [], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 25}}, {"id": 31, "type": "preproc_arg", "text": "{ \\\n { K00, K01, K02, K03, K04 }, \\\n { K10, K11, K12, K13, K14 }, \\\n { K20, K21, K22, K23, KC_NO }, \\\n { K30, K31, K32, K33, K34 }, \\\n { KC_NO, K41, KC_NO, K43, KC_NO } \\\n}", "parent": 6, "children": [], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 16, "column": 1}}, {"id": 32, "type": "preproc_function_def", "text": "#define LAYOUT_numbrero_ortho(\\\n K00, K01, K02, K03, K04, \\\n K10, K11, K12, K13, K14, \\\n K20, K21, K22, K23, K24, \\\n K30, K31, K32, K33, K34, \\\n K41, K42, K43, K44 \\\n){ \\\n { K00, K01, K02, K03, K04 }, \\\n { K10, K11, K12, K13, K14 }, \\\n { K20, K21, K22, K23, K24 }, \\\n { K30, K31, K32, K33, K34 }, \\\n { KC_NO, K41, K42, K43, K44 } \\\n}\n", "parent": null, "children": [33, 34, 35, 60], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 33, "type": "#define", "text": "#define", "parent": 32, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 34, "type": "identifier", "text": "LAYOUT_numbrero_ortho", "parent": 32, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 29}}, {"id": 35, "type": "preproc_params", "text": "(\\\n K00, K01, K02, K03, K04, \\\n K10, K11, K12, K13, K14, \\\n K20, K21, K22, K23, K24, \\\n K30, K31, K32, K33, K34, \\\n K41, K42, K43, K44 \\\n)", "parent": 32, "children": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59], "start_point": {"row": 17, "column": 29}, "end_point": {"row": 23, "column": 1}}, {"id": 36, "type": "identifier", "text": "K00", "parent": 35, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 5}}, {"id": 37, "type": "identifier", "text": "K01", "parent": 35, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 10}}, {"id": 38, "type": "identifier", "text": "K02", "parent": 35, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 15}}, {"id": 39, "type": "identifier", "text": "K03", "parent": 35, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 20}}, {"id": 40, "type": "identifier", "text": "K04", "parent": 35, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 25}}, {"id": 41, "type": "identifier", "text": "K10", "parent": 35, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 5}}, {"id": 42, "type": "identifier", "text": "K11", "parent": 35, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 10}}, {"id": 43, "type": "identifier", "text": "K12", "parent": 35, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 15}}, {"id": 44, "type": "identifier", "text": "K13", "parent": 35, "children": [], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 20}}, {"id": 45, "type": "identifier", "text": "K14", "parent": 35, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 25}}, {"id": 46, "type": "identifier", "text": "K20", "parent": 35, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 5}}, {"id": 47, "type": "identifier", "text": "K21", "parent": 35, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 10}}, {"id": 48, "type": "identifier", "text": "K22", "parent": 35, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 15}}, {"id": 49, "type": "identifier", "text": "K23", "parent": 35, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 20}}, {"id": 50, "type": "identifier", "text": "K24", "parent": 35, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 25}}, {"id": 51, "type": "identifier", "text": "K30", "parent": 35, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 5}}, {"id": 52, "type": "identifier", "text": "K31", "parent": 35, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 10}}, {"id": 53, "type": "identifier", "text": "K32", "parent": 35, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 15}}, {"id": 54, "type": "identifier", "text": "K33", "parent": 35, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 20}}, {"id": 55, "type": "identifier", "text": "K34", "parent": 35, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 25}}, {"id": 56, "type": "identifier", "text": "K41", "parent": 35, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 10}}, {"id": 57, "type": "identifier", "text": "K42", "parent": 35, "children": [], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 15}}, {"id": 58, "type": "identifier", "text": "K43", "parent": 35, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 20}}, {"id": 59, "type": "identifier", "text": "K44", "parent": 35, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 25}}, {"id": 60, "type": "preproc_arg", "text": "{ \\\n { K00, K01, K02, K03, K04 }, \\\n { K10, K11, K12, K13, K14 }, \\\n { K20, K21, K22, K23, K24 }, \\\n { K30, K31, K32, K33, K34 }, \\\n { KC_NO, K41, K42, K43, K44 } \\\n}", "parent": 32, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 29, "column": 1}}]}, "node_categories": {"declarations": {"functions": [6, 32], "variables": [], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59], "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": "unknown", "text_snippet": "#define LAYOUT_numbrero_numpad( \\\n K00, K01, K02, K03, K04, \\\n K10, K11, K12, K13, \\\n K20, K"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "#define LAYOUT_numbrero_ortho(\\\n K00, K01, K02, K03, K04, \\\n K10, K11, K12, K13, K14, \\\n K20, K21"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"quantum.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"quantum.h\"\n\n#define LAYOUT_numbrero_numpad( \\\n K00, K01, K02, K03, K04, \\\n K10, K11, K12, K13, \\\n K20, K21, K22, K23, K14, \\\n K30, K31, K32, K33, \\\n K41, K43, K34 \\\n) { \\\n { K00, K01, K02, K03, K04 }, \\\n { K10, K11, K12, K13, K14 }, \\\n { K20, K21, K22, K23, KC_NO }, \\\n { K30, K31, K32, K33, K34 }, \\\n { KC_NO, K41, KC_NO, K43, KC_NO } \\\n}\n#define LAYOUT_numbrero_ortho(\\\n K00, K01, K02, K03, K04, \\\n K10, K11, K12, K13, K14, \\\n K20, K21, K22, K23, K24, \\\n K30, K31, K32, K33, K34, \\\n K41, K42, K43, K44 \\\n){ \\\n { K00, K01, K02, K03, K04 }, \\\n { K10, K11, K12, K13, K14 }, \\\n { K20, K21, K22, K23, K24 }, \\\n { K30, K31, K32, K33, K34 }, \\\n { KC_NO, K41, K42, K43, K44 } \\\n}\n"}
80,917
c
#pragma once #include <Core/Game.h> #include <tchar.h> namespace Osm { class Profiler : public Component<CGame> { public: Profiler(CGame& engine); void StartFrame(); void EndFrame(); uint StartSection(const std::string& name); void EndSection(uint sectionId); double GetTimePerFrame() const { return _timePerFrame; } double GetFPS() const; #ifdef INSPECTOR virtual void Inspect() override; #endif private: struct Section { std::string Name; double StartTime; double EndTime; }; std::vector<Section> _sections; double _frameStart; double _frameEnd; double _framePerSecond; double _timePerFrame; double _timeSinceRefresh; }; }
19.3
33
(translation_unit) "#pragma once\n#include <Core/Game.h>\n#include <tchar.h>\n\nnamespace Osm\n{\n\nclass Profiler : public Component<CGame>\n{\npublic:\n Profiler(CGame& engine);\n\n void StartFrame();\n\n void EndFrame();\n\n uint StartSection(const std::string& name);\n\n void EndSection(uint sectionId);\n\n double GetTimePerFrame() const { return _timePerFrame; }\n\n double GetFPS() const;\n\n#ifdef INSPECTOR\n virtual void Inspect() override;\n#endif\n\nprivate:\n\n struct Section\n {\n std::string Name;\n double StartTime;\n double EndTime;\n };\n\n std::vector<Section> _sections;\n double _frameStart;\n double _frameEnd;\n double _framePerSecond;\n double _timePerFrame;\n double _timeSinceRefresh;\n};\n\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <Core/Game.h>\n" (#include) "#include" (system_lib_string) "<Core/Game.h>" (preproc_include) "#include <tchar.h>\n" (#include) "#include" (system_lib_string) "<tchar.h>" (function_definition) "namespace Osm\n{\n\nclass Profiler : public Component<CGame>\n{\npublic:\n Profiler(CGame& engine);\n\n void StartFrame();\n\n void EndFrame();\n\n uint StartSection(const std::string& name);\n\n void EndSection(uint sectionId);\n\n double GetTimePerFrame() const { return _timePerFrame; }\n\n double GetFPS() const;\n\n#ifdef INSPECTOR\n virtual void Inspect() override;\n#endif\n\nprivate:\n\n struct Section\n {\n std::string Name;\n double StartTime;\n double EndTime;\n };\n\n std::vector<Section> _sections;\n double _frameStart;\n double _frameEnd;\n double _framePerSecond;\n double _timePerFrame;\n double _timeSinceRefresh;\n};\n\n}" (type_identifier) "namespace" (identifier) "Osm" (compound_statement) "{\n\nclass Profiler : public Component<CGame>\n{\npublic:\n Profiler(CGame& engine);\n\n void StartFrame();\n\n void EndFrame();\n\n uint StartSection(const std::string& name);\n\n void EndSection(uint sectionId);\n\n double GetTimePerFrame() const { return _timePerFrame; }\n\n double GetFPS() const;\n\n#ifdef INSPECTOR\n virtual void Inspect() override;\n#endif\n\nprivate:\n\n struct Section\n {\n std::string Name;\n double StartTime;\n double EndTime;\n };\n\n std::vector<Section> _sections;\n double _frameStart;\n double _frameEnd;\n double _framePerSecond;\n double _timePerFrame;\n double _timeSinceRefresh;\n};\n\n}" ({) "{" (function_definition) "class Profiler : public Component<CGame>\n{\npublic:\n Profiler(CGame& engine);\n\n void StartFrame();\n\n void EndFrame();\n\n uint StartSection(const std::string& name);\n\n void EndSection(uint sectionId);\n\n double GetTimePerFrame() const { return _timePerFrame; }\n\n double GetFPS() const;\n\n#ifdef INSPECTOR\n virtual void Inspect() override;\n#endif\n\nprivate:\n\n struct Section\n {\n std::string Name;\n double StartTime;\n double EndTime;\n };\n\n std::vector<Section> _sections;\n double _frameStart;\n double _frameEnd;\n double _framePerSecond;\n double _timePerFrame;\n double _timeSinceRefresh;\n}" (type_identifier) "class" (ERROR) "Profiler : public Component<" (identifier) "Profiler" (:) ":" (identifier) "public" (identifier) "Component" (<) "<" (identifier) "CGame" (ERROR) ">" (>) ">" (compound_statement) "{\npublic:\n Profiler(CGame& engine);\n\n void StartFrame();\n\n void EndFrame();\n\n uint StartSection(const std::string& name);\n\n void EndSection(uint sectionId);\n\n double GetTimePerFrame() const { return _timePerFrame; }\n\n double GetFPS() const;\n\n#ifdef INSPECTOR\n virtual void Inspect() override;\n#endif\n\nprivate:\n\n struct Section\n {\n std::string Name;\n double StartTime;\n double EndTime;\n };\n\n std::vector<Section> _sections;\n double _frameStart;\n double _frameEnd;\n double _framePerSecond;\n double _timePerFrame;\n double _timeSinceRefresh;\n}" ({) "{" (labeled_statement) "public:\n Profiler(CGame& engine);" (statement_identifier) "public" (:) ":" (expression_statement) "Profiler(CGame& engine);" (call_expression) "Profiler(CGame& engine)" (identifier) "Profiler" (argument_list) "(CGame& engine)" (() "(" (binary_expression) "CGame& engine" (identifier) "CGame" (&) "&" (identifier) "engine" ()) ")" (;) ";" (declaration) "void StartFrame();" (primitive_type) "void" (function_declarator) "StartFrame()" (identifier) "StartFrame" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void EndFrame();" (primitive_type) "void" (function_declarator) "EndFrame()" (identifier) "EndFrame" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "uint StartSection(const std::string& name);" (type_identifier) "uint" (function_declarator) "StartSection(const std::string& name)" (identifier) "StartSection" (parameter_list) "(const std::string& name)" (() "(" (parameter_declaration) "const std::string& name" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "name" ()) ")" (;) ";" (declaration) "void EndSection(uint sectionId);" (primitive_type) "void" (function_declarator) "EndSection(uint sectionId)" (identifier) "EndSection" (parameter_list) "(uint sectionId)" (() "(" (parameter_declaration) "uint sectionId" (type_identifier) "uint" (identifier) "sectionId" ()) ")" (;) ";" (ERROR) "double GetTimePerFrame() const" (primitive_type) "double" (function_declarator) "GetTimePerFrame()" (identifier) "GetTimePerFrame" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return _timePerFrame; }" ({) "{" (return_statement) "return _timePerFrame;" (return) "return" (identifier) "_timePerFrame" (;) ";" (}) "}" (ERROR) "double GetFPS() const" (primitive_type) "double" (function_declarator) "GetFPS()" (identifier) "GetFPS" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (expression_statement) ";" (;) ";" (preproc_ifdef) "#ifdef INSPECTOR\n virtual void Inspect() override;\n#endif" (#ifdef) "#ifdef" (identifier) "INSPECTOR" (ERROR) "virtual void Inspect() override" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "Inspect()" (identifier) "Inspect" (parameter_list) "()" (() "(" ()) ")" (type_identifier) "override" (expression_statement) ";" (;) ";" (#endif) "#endif" (labeled_statement) "private:\n\n struct Section\n {\n std::string Name;\n double StartTime;\n double EndTime;\n };" (statement_identifier) "private" (:) ":" (declaration) "struct Section\n {\n std::string Name;\n double StartTime;\n double EndTime;\n };" (struct_specifier) "struct Section\n {\n std::string Name;\n double StartTime;\n double EndTime;\n }" (struct) "struct" (type_identifier) "Section" (field_declaration_list) "{\n std::string Name;\n double StartTime;\n double EndTime;\n }" ({) "{" (field_declaration) "std::string Name;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "Name" (;) ";" (field_declaration) "double StartTime;" (primitive_type) "double" (field_identifier) "StartTime" (;) ";" (field_declaration) "double EndTime;" (primitive_type) "double" (field_identifier) "EndTime" (;) ";" (}) "}" (identifier) "" (;) ";" (labeled_statement) "std::vector<Section> _sections;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vector<Section> _sections;" (binary_expression) "vector<Section> _sections" (binary_expression) "vector<Section" (identifier) "vector" (<) "<" (identifier) "Section" (>) ">" (identifier) "_sections" (;) ";" (declaration) "double _frameStart;" (primitive_type) "double" (identifier) "_frameStart" (;) ";" (declaration) "double _frameEnd;" (primitive_type) "double" (identifier) "_frameEnd" (;) ";" (declaration) "double _framePerSecond;" (primitive_type) "double" (identifier) "_framePerSecond" (;) ";" (declaration) "double _timePerFrame;" (primitive_type) "double" (identifier) "_timePerFrame" (;) ";" (declaration) "double _timeSinceRefresh;" (primitive_type) "double" (identifier) "_timeSinceRefresh" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}"
196
9
{"language": "c", "success": true, "metadata": {"lines": 33, "avg_line_length": 19.3, "nodes": 120, "errors": 0, "source_hash": "f50d10f28955df6125a2fdfebf72680751cc6b487da378fc00fec70af3e09bd3", "categorized_nodes": 83}, "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 <Core/Game.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": "<Core/Game.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include <tchar.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": "<tchar.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 18}}, {"id": 9, "type": "function_definition", "text": "namespace Osm\n{\n\nclass Profiler : public Component<CGame>\n{\npublic:\n\tProfiler(CGame& engine);\n\n\tvoid StartFrame();\n\n\tvoid EndFrame();\n\n\tuint StartSection(const std::string& name);\n\n\tvoid EndSection(uint sectionId);\n\n\tdouble GetTimePerFrame() const\t{ return _timePerFrame;\t\t}\n\n\tdouble GetFPS() const;\n\n#ifdef INSPECTOR\n\tvirtual void Inspect() override;\n#endif\n\nprivate:\n\n\tstruct Section\n\t{\n\t\tstd::string Name;\n\t\tdouble StartTime;\n\t\tdouble EndTime;\n\t};\n\n\tstd::vector<Section>\t_sections;\n\tdouble\t\t\t\t\t_frameStart;\n\tdouble\t\t\t\t\t_frameEnd;\n\tdouble\t\t\t\t\t_framePerSecond;\n\tdouble\t\t\t\t\t_timePerFrame;\n\tdouble\t\t\t\t\t_timeSinceRefresh;\n};\n\n}", "parent": null, "children": [10, 11], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 9}}, {"id": 11, "type": "identifier", "text": "Osm", "parent": 9, "children": [], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 4, "column": 13}}, {"id": 12, "type": "function_definition", "text": "class Profiler : public Component<CGame>\n{\npublic:\n\tProfiler(CGame& engine);\n\n\tvoid StartFrame();\n\n\tvoid EndFrame();\n\n\tuint StartSection(const std::string& name);\n\n\tvoid EndSection(uint sectionId);\n\n\tdouble GetTimePerFrame() const\t{ return _timePerFrame;\t\t}\n\n\tdouble GetFPS() const;\n\n#ifdef INSPECTOR\n\tvirtual void Inspect() override;\n#endif\n\nprivate:\n\n\tstruct Section\n\t{\n\t\tstd::string Name;\n\t\tdouble StartTime;\n\t\tdouble EndTime;\n\t};\n\n\tstd::vector<Section>\t_sections;\n\tdouble\t\t\t\t\t_frameStart;\n\tdouble\t\t\t\t\t_frameEnd;\n\tdouble\t\t\t\t\t_framePerSecond;\n\tdouble\t\t\t\t\t_timePerFrame;\n\tdouble\t\t\t\t\t_timeSinceRefresh;\n}", "parent": 9, "children": [13, 17, 18], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 13, "type": "ERROR", "text": "Profiler : public Component<", "parent": 12, "children": [14, 15, 16], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 35}}, {"id": 14, "type": "identifier", "text": "Profiler", "parent": 13, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 14}}, {"id": 15, "type": "identifier", "text": "Component", "parent": 13, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 34}}, {"id": 16, "type": "<", "text": "<", "parent": 13, "children": [], "start_point": {"row": 7, "column": 34}, "end_point": {"row": 7, "column": 35}}, {"id": 17, "type": "identifier", "text": "CGame", "parent": 12, "children": [], "start_point": {"row": 7, "column": 35}, "end_point": {"row": 7, "column": 40}}, {"id": 18, "type": "ERROR", "text": ">", "parent": 12, "children": [19], "start_point": {"row": 7, "column": 40}, "end_point": {"row": 7, "column": 41}}, {"id": 19, "type": ">", "text": ">", "parent": 18, "children": [], "start_point": {"row": 7, "column": 40}, "end_point": {"row": 7, "column": 41}}, {"id": 20, "type": "labeled_statement", "text": "public:\n\tProfiler(CGame& engine);", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 25}}, {"id": 21, "type": "call_expression", "text": "Profiler(CGame& engine)", "parent": 20, "children": [22, 23], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 24}}, {"id": 22, "type": "identifier", "text": "Profiler", "parent": 21, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 9}}, {"id": 23, "type": "argument_list", "text": "(CGame& engine)", "parent": 21, "children": [24], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 24}}, {"id": 24, "type": "binary_expression", "text": "CGame& engine", "parent": 23, "children": [25, 26], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 23}}, {"id": 25, "type": "identifier", "text": "CGame", "parent": 24, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 15}}, {"id": 26, "type": "identifier", "text": "engine", "parent": 24, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 23}}, {"id": 27, "type": "declaration", "text": "void StartFrame();", "parent": 12, "children": [28, 29], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 19}}, {"id": 28, "type": "primitive_type", "text": "void", "parent": 27, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 5}}, {"id": 29, "type": "function_declarator", "text": "StartFrame()", "parent": 27, "children": [30, 31], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 18}}, {"id": 30, "type": "identifier", "text": "StartFrame", "parent": 29, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 16}}, {"id": 31, "type": "parameter_list", "text": "()", "parent": 29, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 18}}, {"id": 32, "type": "declaration", "text": "void EndFrame();", "parent": 12, "children": [33, 34], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 17}}, {"id": 33, "type": "primitive_type", "text": "void", "parent": 32, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 5}}, {"id": 34, "type": "function_declarator", "text": "EndFrame()", "parent": 32, "children": [35, 36], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 16}}, {"id": 35, "type": "identifier", "text": "EndFrame", "parent": 34, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 14}}, {"id": 36, "type": "parameter_list", "text": "()", "parent": 34, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 16}}, {"id": 37, "type": "declaration", "text": "uint StartSection(const std::string& name);", "parent": 12, "children": [38, 39], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 44}}, {"id": 38, "type": "type_identifier", "text": "uint", "parent": 37, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 5}}, {"id": 39, "type": "function_declarator", "text": "StartSection(const std::string& name)", "parent": 37, "children": [40, 41], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 43}}, {"id": 40, "type": "identifier", "text": "StartSection", "parent": 39, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 18}}, {"id": 41, "type": "parameter_list", "text": "(const std::string& name)", "parent": 39, "children": [42], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 43}}, {"id": 42, "type": "parameter_declaration", "text": "const std::string& name", "parent": 41, "children": [43, 44, 46], "start_point": {"row": 16, "column": 19}, "end_point": {"row": 16, "column": 42}}, {"id": 43, "type": "type_identifier", "text": "std", "parent": 42, "children": [], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 28}}, {"id": 44, "type": "ERROR", "text": "::string&", "parent": 42, "children": [45], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 37}}, {"id": 45, "type": "identifier", "text": "string", "parent": 44, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 36}}, {"id": 46, "type": "identifier", "text": "name", "parent": 42, "children": [], "start_point": {"row": 16, "column": 38}, "end_point": {"row": 16, "column": 42}}, {"id": 47, "type": "declaration", "text": "void EndSection(uint sectionId);", "parent": 12, "children": [48, 49], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 33}}, {"id": 48, "type": "primitive_type", "text": "void", "parent": 47, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 5}}, {"id": 49, "type": "function_declarator", "text": "EndSection(uint sectionId)", "parent": 47, "children": [50, 51], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 32}}, {"id": 50, "type": "identifier", "text": "EndSection", "parent": 49, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 16}}, {"id": 51, "type": "parameter_list", "text": "(uint sectionId)", "parent": 49, "children": [52], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 32}}, {"id": 52, "type": "parameter_declaration", "text": "uint sectionId", "parent": 51, "children": [53, 54], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 31}}, {"id": 53, "type": "type_identifier", "text": "uint", "parent": 52, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 21}}, {"id": 54, "type": "identifier", "text": "sectionId", "parent": 52, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 31}}, {"id": 55, "type": "ERROR", "text": "double GetTimePerFrame() const", "parent": 12, "children": [56, 57], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 31}}, {"id": 56, "type": "primitive_type", "text": "double", "parent": 55, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 7}}, {"id": 57, "type": "function_declarator", "text": "GetTimePerFrame()", "parent": 55, "children": [58, 59], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 25}}, {"id": 58, "type": "identifier", "text": "GetTimePerFrame", "parent": 57, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 23}}, {"id": 59, "type": "parameter_list", "text": "()", "parent": 57, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 25}}, {"id": 60, "type": "return_statement", "text": "return _timePerFrame;", "parent": 12, "children": [61], "start_point": {"row": 20, "column": 34}, "end_point": {"row": 20, "column": 55}}, {"id": 61, "type": "identifier", "text": "_timePerFrame", "parent": 60, "children": [], "start_point": {"row": 20, "column": 41}, "end_point": {"row": 20, "column": 54}}, {"id": 62, "type": "ERROR", "text": "double GetFPS() const", "parent": 12, "children": [63, 64], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 22}}, {"id": 63, "type": "primitive_type", "text": "double", "parent": 62, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 7}}, {"id": 64, "type": "function_declarator", "text": "GetFPS()", "parent": 62, "children": [65, 66], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 16}}, {"id": 65, "type": "identifier", "text": "GetFPS", "parent": 64, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 14}}, {"id": 66, "type": "parameter_list", "text": "()", "parent": 64, "children": [], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 16}}, {"id": 67, "type": "preproc_ifdef", "text": "#ifdef INSPECTOR\n\tvirtual void Inspect() override;\n#endif", "parent": 12, "children": [68, 69, 70, 78], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 68, "type": "#ifdef", "text": "#ifdef", "parent": 67, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 69, "type": "identifier", "text": "INSPECTOR", "parent": 67, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 16}}, {"id": 70, "type": "ERROR", "text": "virtual void Inspect() override", "parent": 67, "children": [71, 72, 74, 77], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 32}}, {"id": 71, "type": "type_identifier", "text": "virtual", "parent": 70, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 8}}, {"id": 72, "type": "ERROR", "text": "void", "parent": 70, "children": [73], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 13}}, {"id": 73, "type": "identifier", "text": "void", "parent": 72, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 13}}, {"id": 74, "type": "function_declarator", "text": "Inspect()", "parent": 70, "children": [75, 76], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 23}}, {"id": 75, "type": "identifier", "text": "Inspect", "parent": 74, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 21}}, {"id": 76, "type": "parameter_list", "text": "()", "parent": 74, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 23}}, {"id": 77, "type": "type_identifier", "text": "override", "parent": 70, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 32}}, {"id": 78, "type": "#endif", "text": "#endif", "parent": 67, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 79, "type": "labeled_statement", "text": "private:\n\n\tstruct Section\n\t{\n\t\tstd::string Name;\n\t\tdouble StartTime;\n\t\tdouble EndTime;\n\t};", "parent": 12, "children": [80], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 35, "column": 3}}, {"id": 80, "type": "declaration", "text": "struct Section\n\t{\n\t\tstd::string Name;\n\t\tdouble StartTime;\n\t\tdouble EndTime;\n\t};", "parent": 79, "children": [81, 95], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 35, "column": 3}}, {"id": 81, "type": "struct_specifier", "text": "struct Section\n\t{\n\t\tstd::string Name;\n\t\tdouble StartTime;\n\t\tdouble EndTime;\n\t}", "parent": 80, "children": [82, 83], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 35, "column": 2}}, {"id": 82, "type": "struct", "text": "struct", "parent": 81, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 7}}, {"id": 83, "type": "type_identifier", "text": "Section", "parent": 81, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 15}}, {"id": 84, "type": "field_declaration", "text": "std::string Name;", "parent": 81, "children": [85, 86, 88], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 19}}, {"id": 85, "type": "type_identifier", "text": "std", "parent": 84, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 5}}, {"id": 86, "type": "ERROR", "text": "::string", "parent": 84, "children": [87], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 13}}, {"id": 87, "type": "field_identifier", "text": "string", "parent": 86, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 13}}, {"id": 88, "type": "field_identifier", "text": "Name", "parent": 84, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 18}}, {"id": 89, "type": "field_declaration", "text": "double StartTime;", "parent": 81, "children": [90, 91], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 19}}, {"id": 90, "type": "primitive_type", "text": "double", "parent": 89, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 8}}, {"id": 91, "type": "field_identifier", "text": "StartTime", "parent": 89, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 18}}, {"id": 92, "type": "field_declaration", "text": "double EndTime;", "parent": 81, "children": [93, 94], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 17}}, {"id": 93, "type": "primitive_type", "text": "double", "parent": 92, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 8}}, {"id": 94, "type": "field_identifier", "text": "EndTime", "parent": 92, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 16}}, {"id": 95, "type": "identifier", "text": "", "parent": 80, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 2}}, {"id": 96, "type": "labeled_statement", "text": "std::vector<Section>\t_sections;", "parent": 12, "children": [97], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 32}}, {"id": 97, "type": "statement_identifier", "text": "std", "parent": 96, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 4}}, {"id": 98, "type": "binary_expression", "text": "vector<Section>\t_sections", "parent": 96, "children": [99, 103, 104], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 31}}, {"id": 99, "type": "binary_expression", "text": "vector<Section", "parent": 98, "children": [100, 101, 102], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 20}}, {"id": 100, "type": "identifier", "text": "vector", "parent": 99, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 12}}, {"id": 101, "type": "<", "text": "<", "parent": 99, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 13}}, {"id": 102, "type": "identifier", "text": "Section", "parent": 99, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 20}}, {"id": 103, "type": ">", "text": ">", "parent": 98, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 21}}, {"id": 104, "type": "identifier", "text": "_sections", "parent": 98, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 31}}, {"id": 105, "type": "declaration", "text": "double\t\t\t\t\t_frameStart;", "parent": 12, "children": [106, 107], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 24}}, {"id": 106, "type": "primitive_type", "text": "double", "parent": 105, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 7}}, {"id": 107, "type": "identifier", "text": "_frameStart", "parent": 105, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 23}}, {"id": 108, "type": "declaration", "text": "double\t\t\t\t\t_frameEnd;", "parent": 12, "children": [109, 110], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 22}}, {"id": 109, "type": "primitive_type", "text": "double", "parent": 108, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 7}}, {"id": 110, "type": "identifier", "text": "_frameEnd", "parent": 108, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 21}}, {"id": 111, "type": "declaration", "text": "double\t\t\t\t\t_framePerSecond;", "parent": 12, "children": [112, 113], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 28}}, {"id": 112, "type": "primitive_type", "text": "double", "parent": 111, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 7}}, {"id": 113, "type": "identifier", "text": "_framePerSecond", "parent": 111, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 27}}, {"id": 114, "type": "declaration", "text": "double\t\t\t\t\t_timePerFrame;", "parent": 12, "children": [115, 116], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 26}}, {"id": 115, "type": "primitive_type", "text": "double", "parent": 114, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 7}}, {"id": 116, "type": "identifier", "text": "_timePerFrame", "parent": 114, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 25}}, {"id": 117, "type": "declaration", "text": "double\t\t\t\t\t_timeSinceRefresh;", "parent": 12, "children": [118, 119], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 30}}, {"id": 118, "type": "primitive_type", "text": "double", "parent": 117, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 7}}, {"id": 119, "type": "identifier", "text": "_timeSinceRefresh", "parent": 117, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 29}}]}, "node_categories": {"declarations": {"functions": [9, 12, 29, 34, 39, 49, 57, 64, 74], "variables": [27, 32, 37, 42, 47, 52, 80, 84, 89, 92, 105, 108, 111, 114, 117], "classes": [81, 82], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [21, 24, 98, 99], "assignments": [], "loops": [], "conditionals": [10, 11, 14, 15, 17, 22, 25, 26, 30, 35, 38, 40, 43, 45, 46, 50, 53, 54, 58, 61, 65, 67, 68, 69, 71, 73, 75, 77, 78, 83, 85, 87, 88, 91, 94, 95, 97, 100, 102, 104, 107, 110, 113, 116, 119], "returns": [60], "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": "Profiler", "text_snippet": "namespace Osm\n{\n\nclass Profiler : public Component<CGame>\n{\npublic:\n\tProfiler(CGame& engine);\n\n\tvoi"}, {"node_id": 12, "universal_type": "function", "name": "Profiler", "text_snippet": "class Profiler : public Component<CGame>\n{\npublic:\n\tProfiler(CGame& engine);\n\n\tvoid StartFrame();\n\n"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "StartFrame()"}, {"node_id": 34, "universal_type": "function", "name": "unknown", "text_snippet": "EndFrame()"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "StartSection(const std::string& name)"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "EndSection(uint sectionId)"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "GetTimePerFrame()"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "GetFPS()"}, {"node_id": 74, "universal_type": "function", "name": "unknown", "text_snippet": "Inspect()"}], "class_declarations": [{"node_id": 81, "universal_type": "class", "name": "Section", "text_snippet": "struct Section\n\t{\n\t\tstd::string Name;\n\t\tdouble StartTime;\n\t\tdouble EndTime;\n\t}"}, {"node_id": 82, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include <Core/Game.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <tchar.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n#include <Core/Game.h>\n#include <tchar.h>\n\nnamespace Osm\n{\n\nclass Profiler : public Component<CGame>\n{\npublic:\n\tProfiler(CGame& engine);\n\n\tvoid StartFrame();\n\n\tvoid EndFrame();\n\n\tuint StartSection(const std::string& name);\n\n\tvoid EndSection(uint sectionId);\n\n\tdouble GetTimePerFrame() const\t{ return _timePerFrame;\t\t}\n\n\tdouble GetFPS() const;\n\n#ifdef INSPECTOR\n\tvirtual void Inspect() override;\n#endif\n\nprivate:\n\n\tstruct Section\n\t{\n\t\tstd::string Name;\n\t\tdouble StartTime;\n\t\tdouble EndTime;\n\t};\n\n\tstd::vector<Section>\t_sections;\n\tdouble\t\t\t\t\t_frameStart;\n\tdouble\t\t\t\t\t_frameEnd;\n\tdouble\t\t\t\t\t_framePerSecond;\n\tdouble\t\t\t\t\t_timePerFrame;\n\tdouble\t\t\t\t\t_timeSinceRefresh;\n};\n\n}\n"}
80,918
c
// // RootViewController.h // BubbleBlitz // // Created by <NAME> on 12/31/10. // Copyright Student: UC Merced 2010. All rights reserved. // #import <UIKit/UIKit.h> @interface RootViewController : UIViewController { } @end
18
12
(translation_unit) "//\n// RootViewController.h\n// BubbleBlitz\n//\n// Created by <NAME> on 12/31/10.\n// Copyright Student: UC Merced 2010. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n\n@interface RootViewController : UIViewController {\n\n}\n\n@end\n" (comment) "//" (comment) "// RootViewController.h" (comment) "// BubbleBlitz" (comment) "//" (comment) "// Created by <NAME> on 12/31/10." (comment) "// Copyright Student: UC Merced 2010. All rights reserved." (comment) "//" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (ERROR) "@" (ERROR) "@" (function_definition) "interface RootViewController : UIViewController {\n\n}" (type_identifier) "interface" (identifier) "RootViewController" (ERROR) ": UIViewController" (:) ":" (identifier) "UIViewController" (compound_statement) "{\n\n}" ({) "{" (}) "}" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
27
5
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 18.0, "nodes": 12, "errors": 0, "source_hash": "330141f272e444b398c2672e1ca19bd392b23b6dec0d3aef834e07674d991325", "categorized_nodes": 5}, "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": "@", "parent": null, "children": [4], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 5, "type": "function_definition", "text": "interface RootViewController : UIViewController {\n\n}", "parent": null, "children": [6, 7, 8], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 13, "column": 1}}, {"id": 6, "type": "type_identifier", "text": "interface", "parent": 5, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 7, "type": "identifier", "text": "RootViewController", "parent": 5, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 29}}, {"id": 8, "type": "ERROR", "text": ": UIViewController", "parent": 5, "children": [9], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 48}}, {"id": 9, "type": "identifier", "text": "UIViewController", "parent": 8, "children": [], "start_point": {"row": 11, "column": 32}, "end_point": {"row": 11, "column": 48}}, {"id": 10, "type": "ERROR", "text": "@", "parent": null, "children": [11], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 11, "type": "ERROR", "text": "@", "parent": 10, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}]}, "node_categories": {"declarations": {"functions": [5], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [6, 7, 9], "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": "RootViewController", "text_snippet": "interface RootViewController : UIViewController {\n\n}"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// RootViewController.h\n// BubbleBlitz\n//\n// Created by <NAME> on 12/31/10.\n// Copyright Student: UC Merced 2010. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n\n@interface RootViewController : UIViewController {\n\n}\n\n@end\n"}
80,919
c
/* "Copyright [2019] <Tych0n>" [legal/copyright] */ #ifndef IMPLICIT_TOPNC_H_ #define IMPLICIT_TOPNC_H_ extern void fargsort_c(float A[], int n_row, int m_row, int m_cols, int ktop, int B[]); #endif // IMPLICIT_TOPNC_H_
43.4
5
(translation_unit) "/* "Copyright [2019] <Tych0n>" [legal/copyright] */\n#ifndef IMPLICIT_TOPNC_H_\n#define IMPLICIT_TOPNC_H_\n\nextern void fargsort_c(float A[], int n_row, int m_row, int m_cols, int ktop, int B[]);\n\n#endif // IMPLICIT_TOPNC_H_\n" (comment) "/* "Copyright [2019] <Tych0n>" [legal/copyright] */" (preproc_ifdef) "#ifndef IMPLICIT_TOPNC_H_\n#define IMPLICIT_TOPNC_H_\n\nextern void fargsort_c(float A[], int n_row, int m_row, int m_cols, int ktop, int B[]);\n\n#endif" (#ifndef) "#ifndef" (identifier) "IMPLICIT_TOPNC_H_" (preproc_def) "#define IMPLICIT_TOPNC_H_\n" (#define) "#define" (identifier) "IMPLICIT_TOPNC_H_" (declaration) "extern void fargsort_c(float A[], int n_row, int m_row, int m_cols, int ktop, int B[]);" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "void" (function_declarator) "fargsort_c(float A[], int n_row, int m_row, int m_cols, int ktop, int B[])" (identifier) "fargsort_c" (parameter_list) "(float A[], int n_row, int m_row, int m_cols, int ktop, int B[])" (() "(" (parameter_declaration) "float A[]" (primitive_type) "float" (array_declarator) "A[]" (identifier) "A" ([) "[" (]) "]" (,) "," (parameter_declaration) "int n_row" (primitive_type) "int" (identifier) "n_row" (,) "," (parameter_declaration) "int m_row" (primitive_type) "int" (identifier) "m_row" (,) "," (parameter_declaration) "int m_cols" (primitive_type) "int" (identifier) "m_cols" (,) "," (parameter_declaration) "int ktop" (primitive_type) "int" (identifier) "ktop" (,) "," (parameter_declaration) "int B[]" (primitive_type) "int" (array_declarator) "B[]" (identifier) "B" ([) "[" (]) "]" ()) ")" (;) ";" (#endif) "#endif" (comment) "// IMPLICIT_TOPNC_H_"
49
0
{"language": "c", "success": true, "metadata": {"lines": 5, "avg_line_length": 43.4, "nodes": 34, "errors": 0, "source_hash": "f35607f1ed69eeec0de5317055272152b7665e6f63dde25268eb69a334f5a06d", "categorized_nodes": 21}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef IMPLICIT_TOPNC_H_\n#define IMPLICIT_TOPNC_H_\n\nextern void fargsort_c(float A[], int n_row, int m_row, int m_cols, int ktop, int B[]);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 33], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 2, "type": "identifier", "text": "IMPLICIT_TOPNC_H_", "parent": 0, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define IMPLICIT_TOPNC_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 5, "type": "identifier", "text": "IMPLICIT_TOPNC_H_", "parent": 3, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 25}}, {"id": 6, "type": "declaration", "text": "extern void fargsort_c(float A[], int n_row, int m_row, int m_cols, int ktop, int B[]);", "parent": 0, "children": [7, 9, 10], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 87}}, {"id": 7, "type": "storage_class_specifier", "text": "extern", "parent": 6, "children": [8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 8, "type": "extern", "text": "extern", "parent": 7, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 9, "type": "primitive_type", "text": "void", "parent": 6, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 11}}, {"id": 10, "type": "function_declarator", "text": "fargsort_c(float A[], int n_row, int m_row, int m_cols, int ktop, int B[])", "parent": 6, "children": [11, 12], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 86}}, {"id": 11, "type": "identifier", "text": "fargsort_c", "parent": 10, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 22}}, {"id": 12, "type": "parameter_list", "text": "(float A[], int n_row, int m_row, int m_cols, int ktop, int B[])", "parent": 10, "children": [13, 17, 20, 23, 26, 29], "start_point": {"row": 4, "column": 22}, "end_point": {"row": 4, "column": 86}}, {"id": 13, "type": "parameter_declaration", "text": "float A[]", "parent": 12, "children": [14, 15], "start_point": {"row": 4, "column": 23}, "end_point": {"row": 4, "column": 32}}, {"id": 14, "type": "primitive_type", "text": "float", "parent": 13, "children": [], "start_point": {"row": 4, "column": 23}, "end_point": {"row": 4, "column": 28}}, {"id": 15, "type": "array_declarator", "text": "A[]", "parent": 13, "children": [16], "start_point": {"row": 4, "column": 29}, "end_point": {"row": 4, "column": 32}}, {"id": 16, "type": "identifier", "text": "A", "parent": 15, "children": [], "start_point": {"row": 4, "column": 29}, "end_point": {"row": 4, "column": 30}}, {"id": 17, "type": "parameter_declaration", "text": "int n_row", "parent": 12, "children": [18, 19], "start_point": {"row": 4, "column": 34}, "end_point": {"row": 4, "column": 43}}, {"id": 18, "type": "primitive_type", "text": "int", "parent": 17, "children": [], "start_point": {"row": 4, "column": 34}, "end_point": {"row": 4, "column": 37}}, {"id": 19, "type": "identifier", "text": "n_row", "parent": 17, "children": [], "start_point": {"row": 4, "column": 38}, "end_point": {"row": 4, "column": 43}}, {"id": 20, "type": "parameter_declaration", "text": "int m_row", "parent": 12, "children": [21, 22], "start_point": {"row": 4, "column": 45}, "end_point": {"row": 4, "column": 54}}, {"id": 21, "type": "primitive_type", "text": "int", "parent": 20, "children": [], "start_point": {"row": 4, "column": 45}, "end_point": {"row": 4, "column": 48}}, {"id": 22, "type": "identifier", "text": "m_row", "parent": 20, "children": [], "start_point": {"row": 4, "column": 49}, "end_point": {"row": 4, "column": 54}}, {"id": 23, "type": "parameter_declaration", "text": "int m_cols", "parent": 12, "children": [24, 25], "start_point": {"row": 4, "column": 56}, "end_point": {"row": 4, "column": 66}}, {"id": 24, "type": "primitive_type", "text": "int", "parent": 23, "children": [], "start_point": {"row": 4, "column": 56}, "end_point": {"row": 4, "column": 59}}, {"id": 25, "type": "identifier", "text": "m_cols", "parent": 23, "children": [], "start_point": {"row": 4, "column": 60}, "end_point": {"row": 4, "column": 66}}, {"id": 26, "type": "parameter_declaration", "text": "int ktop", "parent": 12, "children": [27, 28], "start_point": {"row": 4, "column": 68}, "end_point": {"row": 4, "column": 76}}, {"id": 27, "type": "primitive_type", "text": "int", "parent": 26, "children": [], "start_point": {"row": 4, "column": 68}, "end_point": {"row": 4, "column": 71}}, {"id": 28, "type": "identifier", "text": "ktop", "parent": 26, "children": [], "start_point": {"row": 4, "column": 72}, "end_point": {"row": 4, "column": 76}}, {"id": 29, "type": "parameter_declaration", "text": "int B[]", "parent": 12, "children": [30, 31], "start_point": {"row": 4, "column": 78}, "end_point": {"row": 4, "column": 85}}, {"id": 30, "type": "primitive_type", "text": "int", "parent": 29, "children": [], "start_point": {"row": 4, "column": 78}, "end_point": {"row": 4, "column": 81}}, {"id": 31, "type": "array_declarator", "text": "B[]", "parent": 29, "children": [32], "start_point": {"row": 4, "column": 82}, "end_point": {"row": 4, "column": 85}}, {"id": 32, "type": "identifier", "text": "B", "parent": 31, "children": [], "start_point": {"row": 4, "column": 82}, "end_point": {"row": 4, "column": 83}}, {"id": 33, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}]}, "node_categories": {"declarations": {"functions": [10], "variables": [6, 13, 17, 20, 23, 26, 29], "classes": [7], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 11, 16, 19, 22, 25, 28, 32, 33], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 10, "universal_type": "function", "name": "n_row,", "text_snippet": "fargsort_c(float A[], int n_row, int m_row, int m_cols, int ktop, int B[])"}], "class_declarations": [{"node_id": 7, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": []}, "original_source_code": "/* \"Copyright [2019] <Tych0n>\" [legal/copyright] */\n#ifndef IMPLICIT_TOPNC_H_\n#define IMPLICIT_TOPNC_H_\n\nextern void fargsort_c(float A[], int n_row, int m_row, int m_cols, int ktop, int B[]);\n\n#endif // IMPLICIT_TOPNC_H_\n"}
80,920
c
/* * VersionChecksumBytes.c * * Created on: 03/10/2012 * Created by: <NAME> * Copyright (c) 2012 Bitcoin Project Team */ #include "VersionChecksumBytes.h" #include "../BigInt/BigInt.h" #include "../Base58/Base58.h" #include <stdlib.h> #include <stdint.h> #include <assert.h> VersionChecksumBytes * createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...)) { VersionChecksumBytes * self = malloc(sizeof(*self)); if (! self) { onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\n",sizeof(*self)); return NULL; } getObject(self)->destroy = destroyVersionChecksumBytes; if(initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived)){ return self; } free(self); return NULL; } uint8_t initializeVersionChecksumBytesFromString(VersionChecksumBytes * self,ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...)) { /* Cache string if needed */ if (cacheString) { self->cachedString = string; incrementReferenceCount(string); } else { self->cachedString = NULL; } self->cacheString = cacheString; /* Get bytes from string conversion*/ BigInt bytes; BigIntAlloc(&bytes, 25); /*25 is the number of bytes for bitcoin addresses.*/ bytes=decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived); if (&bytes==NULL){ return FALSE; } /* Take over the bytes with the ByteArray*/ if (! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)){ return FALSE; } reverseBytes(getByteArray(self)); /* BigInt is in little-endian. Conversion needed to make bitcoin address the right way.*/ return TRUE; } VersionChecksumBytes * createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...)){ VersionChecksumBytes * self = malloc(sizeof(*self)); if (! self) { onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\n",sizeof(*self)); return NULL; } getObject(self)->destroy = destroyVersionChecksumBytes; if(initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived)){ return self; } free(self); return NULL; } uint8_t initializeVersionChecksumBytesFromBytes(VersionChecksumBytes * self,uint8_t * bytes,uint32_t size,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...)){ self->cacheString = cacheString; self->cachedString = NULL; if (! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)){ return FALSE; } return TRUE; } /* Object Getter */ VersionChecksumBytes * getVersionChecksumBytes(void * self) { assert(self!=NULL); return self; } void destroyVersionChecksumBytes(void * vself){ VersionChecksumBytes * self = vself; if (self->cachedString){ decrementReferenceCount(self->cachedString); } destroyByteArray(getByteArray(self)); } /* Functions */ uint8_t getNetVersionByteForVersionChecksumBytes(VersionChecksumBytes * self){ return getByteFromByteArray(getByteArray(self), 0); } ByteArray * getStringForVersionChecksumBytes(VersionChecksumBytes * self){ if (self->cachedString) { incrementReferenceCount(self->cachedString); return self->cachedString; } else { reverseBytes(getByteArray(self)); BigInt bytes; BigIntAlloc(&bytes, getByteArray(self)->length); bytes.length = getByteArray(self)->length; memcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length); char * string = encodeBase58(bytes.data,bytes.length); if (! string){ return NULL; } ByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived); if (! str) { free(string); return NULL; } reverseBytes(getByteArray(self)); if (self->cacheString) { self->cachedString = str; incrementReferenceCount(str); } return str; } }
32.43
119
(translation_unit) "/*\n * VersionChecksumBytes.c\n *\n * Created on: 03/10/2012\n * Created by: <NAME>\n * Copyright (c) 2012 Bitcoin Project Team\n */\n\n#include "VersionChecksumBytes.h"\n#include "../BigInt/BigInt.h"\n#include "../Base58/Base58.h"\n#include <stdlib.h>\n#include <stdint.h>\n#include <assert.h>\n\n\nVersionChecksumBytes * createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))\n{\n VersionChecksumBytes * self = malloc(sizeof(*self));\n if (! self) {\n onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\n",sizeof(*self));\n return NULL;\n }\n\n getObject(self)->destroy = destroyVersionChecksumBytes;\n if(initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived)){\n return self;\n }\n\n free(self);\n return NULL;\n}\n\nuint8_t initializeVersionChecksumBytesFromString(VersionChecksumBytes * self,ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))\n{\n /* Cache string if needed */\n if (cacheString) {\n self->cachedString = string;\n incrementReferenceCount(string);\n } else {\n self->cachedString = NULL;\n }\n\n self->cacheString = cacheString;\n /* Get bytes from string conversion*/\n BigInt bytes;\n BigIntAlloc(&bytes, 25); /*25 is the number of bytes for bitcoin addresses.*/\n bytes=decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived);\n\n if (&bytes==NULL){\n return FALSE;\n }\n\n /* Take over the bytes with the ByteArray*/\n if (! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)){\n return FALSE;\n }\n reverseBytes(getByteArray(self)); /* BigInt is in little-endian. Conversion needed to make bitcoin address the right way.*/\n return TRUE;\n}\n\n\nVersionChecksumBytes * createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...)){\n VersionChecksumBytes * self = malloc(sizeof(*self));\n if (! self) {\n onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\n",sizeof(*self));\n return NULL;\n }\n getObject(self)->destroy = destroyVersionChecksumBytes;\n if(initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived)){\n return self;\n }\n free(self);\n return NULL;\n}\n\n\n\nuint8_t initializeVersionChecksumBytesFromBytes(VersionChecksumBytes * self,uint8_t * bytes,uint32_t size,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...)){ self->cacheString = cacheString;\n self->cachedString = NULL;\n if (! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)){\n return FALSE;\n }\n return TRUE;\n}\n\n/* Object Getter */\n\nVersionChecksumBytes * getVersionChecksumBytes(void * self)\n{\n assert(self!=NULL);\n\n return self;\n}\n\n\n\nvoid destroyVersionChecksumBytes(void * vself){\n VersionChecksumBytes * self = vself;\n if (self->cachedString){\n decrementReferenceCount(self->cachedString);\n }\n destroyByteArray(getByteArray(self));\n}\n\n/* Functions */\n\nuint8_t getNetVersionByteForVersionChecksumBytes(VersionChecksumBytes * self){\n\n return getByteFromByteArray(getByteArray(self), 0);\n}\n\nByteArray * getStringForVersionChecksumBytes(VersionChecksumBytes * self){\n if (self->cachedString) {\n incrementReferenceCount(self->cachedString);\n return self->cachedString;\n } else {\n reverseBytes(getByteArray(self));\n\n BigInt bytes;\n BigIntAlloc(&bytes, getByteArray(self)->length);\n bytes.length = getByteArray(self)->length;\n memcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);\n\n char * string = encodeBase58(bytes.data,bytes.length);\n\n if (! string){\n return NULL;\n }\n ByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);\n if (! str) {\n free(string);\n return NULL;\n }\n reverseBytes(getByteArray(self));\n if (self->cacheString) {\n self->cachedString = str;\n incrementReferenceCount(str);\n }\n\n return str;\n }\n}\n\n" (comment) "/*\n * VersionChecksumBytes.c\n *\n * Created on: 03/10/2012\n * Created by: <NAME>\n * Copyright (c) 2012 Bitcoin Project Team\n */" (preproc_include) "#include "VersionChecksumBytes.h"\n" (#include) "#include" (string_literal) ""VersionChecksumBytes.h"" (") """ (string_content) "VersionChecksumBytes.h" (") """ (preproc_include) "#include "../BigInt/BigInt.h"\n" (#include) "#include" (string_literal) ""../BigInt/BigInt.h"" (") """ (string_content) "../BigInt/BigInt.h" (") """ (preproc_include) "#include "../Base58/Base58.h"\n" (#include) "#include" (string_literal) ""../Base58/Base58.h"" (") """ (string_content) "../Base58/Base58.h" (") """ (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_include) "#include <assert.h>\n" (#include) "#include" (system_lib_string) "<assert.h>" (function_definition) "VersionChecksumBytes * createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))\n{\n VersionChecksumBytes * self = malloc(sizeof(*self));\n if (! self) {\n onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\n",sizeof(*self));\n return NULL;\n }\n\n getObject(self)->destroy = destroyVersionChecksumBytes;\n if(initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived)){\n return self;\n }\n\n free(self);\n return NULL;\n}" (type_identifier) "VersionChecksumBytes" (pointer_declarator) "* createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))" (*) "*" (function_declarator) "createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))" (identifier) "createNewVersionChecksumBytesFromString" (parameter_list) "(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))" (() "(" (parameter_declaration) "ByteArray * string" (type_identifier) "ByteArray" (pointer_declarator) "* string" (*) "*" (identifier) "string" (,) "," (parameter_declaration) "uint8_t cacheString" (primitive_type) "uint8_t" (identifier) "cacheString" (,) "," (parameter_declaration) "void (*onErrorReceived)(Error error,char *,...)" (primitive_type) "void" (function_declarator) "(*onErrorReceived)(Error error,char *,...)" (parenthesized_declarator) "(*onErrorReceived)" (() "(" (pointer_declarator) "*onErrorReceived" (*) "*" (identifier) "onErrorReceived" ()) ")" (parameter_list) "(Error error,char *,...)" (() "(" (parameter_declaration) "Error error" (type_identifier) "Error" (identifier) "error" (,) "," (parameter_declaration) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (,) "," (variadic_parameter) "..." (...) "..." ()) ")" ()) ")" (compound_statement) "{\n VersionChecksumBytes * self = malloc(sizeof(*self));\n if (! self) {\n onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\n",sizeof(*self));\n return NULL;\n }\n\n getObject(self)->destroy = destroyVersionChecksumBytes;\n if(initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived)){\n return self;\n }\n\n free(self);\n return NULL;\n}" ({) "{" (declaration) "VersionChecksumBytes * self = malloc(sizeof(*self));" (type_identifier) "VersionChecksumBytes" (init_declarator) "* self = malloc(sizeof(*self))" (pointer_declarator) "* self" (*) "*" (identifier) "self" (=) "=" (call_expression) "malloc(sizeof(*self))" (identifier) "malloc" (argument_list) "(sizeof(*self))" (() "(" (sizeof_expression) "sizeof(*self)" (sizeof) "sizeof" (parenthesized_expression) "(*self)" (() "(" (pointer_expression) "*self" (*) "*" (identifier) "self" ()) ")" ()) ")" (;) ";" (if_statement) "if (! self) {\n onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\n",sizeof(*self));\n return NULL;\n }" (if) "if" (parenthesized_expression) "(! self)" (() "(" (unary_expression) "! self" (!) "!" (identifier) "self" ()) ")" (compound_statement) "{\n onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\n",sizeof(*self));\n return NULL;\n }" ({) "{" (expression_statement) "onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\n",sizeof(*self));" (call_expression) "onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\n",sizeof(*self))" (identifier) "onErrorReceived" (argument_list) "(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\n",sizeof(*self))" (() "(" (identifier) "ERROR_OUT_OF_MEMORY" (,) "," (string_literal) ""Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\n"" (") """ (string_content) "Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString" (escape_sequence) "\n" (") """ (,) "," (sizeof_expression) "sizeof(*self)" (sizeof) "sizeof" (parenthesized_expression) "(*self)" (() "(" (pointer_expression) "*self" (*) "*" (identifier) "self" ()) ")" ()) ")" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "getObject(self)->destroy = destroyVersionChecksumBytes;" (assignment_expression) "getObject(self)->destroy = destroyVersionChecksumBytes" (field_expression) "getObject(self)->destroy" (call_expression) "getObject(self)" (identifier) "getObject" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" (->) "->" (field_identifier) "destroy" (=) "=" (identifier) "destroyVersionChecksumBytes" (;) ";" (if_statement) "if(initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived)){\n return self;\n }" (if) "if" (parenthesized_expression) "(initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived))" (() "(" (call_expression) "initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived)" (identifier) "initializeVersionChecksumBytesFromString" (argument_list) "(self,string,cacheString,onErrorReceived)" (() "(" (identifier) "self" (,) "," (identifier) "string" (,) "," (identifier) "cacheString" (,) "," (identifier) "onErrorReceived" ()) ")" ()) ")" (compound_statement) "{\n return self;\n }" ({) "{" (return_statement) "return self;" (return) "return" (identifier) "self" (;) ";" (}) "}" (expression_statement) "free(self);" (call_expression) "free(self)" (identifier) "free" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (function_definition) "uint8_t initializeVersionChecksumBytesFromString(VersionChecksumBytes * self,ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))\n{\n /* Cache string if needed */\n if (cacheString) {\n self->cachedString = string;\n incrementReferenceCount(string);\n } else {\n self->cachedString = NULL;\n }\n\n self->cacheString = cacheString;\n /* Get bytes from string conversion*/\n BigInt bytes;\n BigIntAlloc(&bytes, 25); /*25 is the number of bytes for bitcoin addresses.*/\n bytes=decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived);\n\n if (&bytes==NULL){\n return FALSE;\n }\n\n /* Take over the bytes with the ByteArray*/\n if (! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)){\n return FALSE;\n }\n reverseBytes(getByteArray(self)); /* BigInt is in little-endian. Conversion needed to make bitcoin address the right way.*/\n return TRUE;\n}" (primitive_type) "uint8_t" (function_declarator) "initializeVersionChecksumBytesFromString(VersionChecksumBytes * self,ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))" (identifier) "initializeVersionChecksumBytesFromString" (parameter_list) "(VersionChecksumBytes * self,ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))" (() "(" (parameter_declaration) "VersionChecksumBytes * self" (type_identifier) "VersionChecksumBytes" (pointer_declarator) "* self" (*) "*" (identifier) "self" (,) "," (parameter_declaration) "ByteArray * string" (type_identifier) "ByteArray" (pointer_declarator) "* string" (*) "*" (identifier) "string" (,) "," (parameter_declaration) "uint8_t cacheString" (primitive_type) "uint8_t" (identifier) "cacheString" (,) "," (parameter_declaration) "void (*onErrorReceived)(Error error,char *,...)" (primitive_type) "void" (function_declarator) "(*onErrorReceived)(Error error,char *,...)" (parenthesized_declarator) "(*onErrorReceived)" (() "(" (pointer_declarator) "*onErrorReceived" (*) "*" (identifier) "onErrorReceived" ()) ")" (parameter_list) "(Error error,char *,...)" (() "(" (parameter_declaration) "Error error" (type_identifier) "Error" (identifier) "error" (,) "," (parameter_declaration) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (,) "," (variadic_parameter) "..." (...) "..." ()) ")" ()) ")" (compound_statement) "{\n /* Cache string if needed */\n if (cacheString) {\n self->cachedString = string;\n incrementReferenceCount(string);\n } else {\n self->cachedString = NULL;\n }\n\n self->cacheString = cacheString;\n /* Get bytes from string conversion*/\n BigInt bytes;\n BigIntAlloc(&bytes, 25); /*25 is the number of bytes for bitcoin addresses.*/\n bytes=decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived);\n\n if (&bytes==NULL){\n return FALSE;\n }\n\n /* Take over the bytes with the ByteArray*/\n if (! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)){\n return FALSE;\n }\n reverseBytes(getByteArray(self)); /* BigInt is in little-endian. Conversion needed to make bitcoin address the right way.*/\n return TRUE;\n}" ({) "{" (comment) "/* Cache string if needed */" (if_statement) "if (cacheString) {\n self->cachedString = string;\n incrementReferenceCount(string);\n } else {\n self->cachedString = NULL;\n }" (if) "if" (parenthesized_expression) "(cacheString)" (() "(" (identifier) "cacheString" ()) ")" (compound_statement) "{\n self->cachedString = string;\n incrementReferenceCount(string);\n }" ({) "{" (expression_statement) "self->cachedString = string;" (assignment_expression) "self->cachedString = string" (field_expression) "self->cachedString" (identifier) "self" (->) "->" (field_identifier) "cachedString" (=) "=" (identifier) "string" (;) ";" (expression_statement) "incrementReferenceCount(string);" (call_expression) "incrementReferenceCount(string)" (identifier) "incrementReferenceCount" (argument_list) "(string)" (() "(" (identifier) "string" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n self->cachedString = NULL;\n }" (else) "else" (compound_statement) "{\n self->cachedString = NULL;\n }" ({) "{" (expression_statement) "self->cachedString = NULL;" (assignment_expression) "self->cachedString = NULL" (field_expression) "self->cachedString" (identifier) "self" (->) "->" (field_identifier) "cachedString" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "self->cacheString = cacheString;" (assignment_expression) "self->cacheString = cacheString" (field_expression) "self->cacheString" (identifier) "self" (->) "->" (field_identifier) "cacheString" (=) "=" (identifier) "cacheString" (;) ";" (comment) "/* Get bytes from string conversion*/" (declaration) "BigInt bytes;" (type_identifier) "BigInt" (identifier) "bytes" (;) ";" (expression_statement) "BigIntAlloc(&bytes, 25);" (call_expression) "BigIntAlloc(&bytes, 25)" (identifier) "BigIntAlloc" (argument_list) "(&bytes, 25)" (() "(" (pointer_expression) "&bytes" (&) "&" (identifier) "bytes" (,) "," (number_literal) "25" ()) ")" (;) ";" (comment) "/*25 is the number of bytes for bitcoin addresses.*/" (expression_statement) "bytes=decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived);" (assignment_expression) "bytes=decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived)" (identifier) "bytes" (=) "=" (call_expression) "decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived)" (identifier) "decodeBase58Checked" (argument_list) "((char *)getByteArrayData(string), onErrorReceived)" (() "(" (cast_expression) "(char *)getByteArrayData(string)" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "getByteArrayData(string)" (identifier) "getByteArrayData" (argument_list) "(string)" (() "(" (identifier) "string" ()) ")" (,) "," (identifier) "onErrorReceived" ()) ")" (;) ";" (if_statement) "if (&bytes==NULL){\n return FALSE;\n }" (if) "if" (parenthesized_expression) "(&bytes==NULL)" (() "(" (binary_expression) "&bytes==NULL" (pointer_expression) "&bytes" (&) "&" (identifier) "bytes" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n return FALSE;\n }" ({) "{" (return_statement) "return FALSE;" (return) "return" (false) "FALSE" (;) ";" (}) "}" (comment) "/* Take over the bytes with the ByteArray*/" (if_statement) "if (! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)){\n return FALSE;\n }" (if) "if" (parenthesized_expression) "(! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived))" (() "(" (unary_expression) "! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)" (!) "!" (call_expression) "initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)" (identifier) "initializeNewByteArrayFromData" (argument_list) "(getByteArray(self), bytes.data, bytes.length, onErrorReceived)" (() "(" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" (,) "," (field_expression) "bytes.data" (identifier) "bytes" (.) "." (field_identifier) "data" (,) "," (field_expression) "bytes.length" (identifier) "bytes" (.) "." (field_identifier) "length" (,) "," (identifier) "onErrorReceived" ()) ")" ()) ")" (compound_statement) "{\n return FALSE;\n }" ({) "{" (return_statement) "return FALSE;" (return) "return" (false) "FALSE" (;) ";" (}) "}" (expression_statement) "reverseBytes(getByteArray(self));" (call_expression) "reverseBytes(getByteArray(self))" (identifier) "reverseBytes" (argument_list) "(getByteArray(self))" (() "(" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" ()) ")" (;) ";" (comment) "/* BigInt is in little-endian. Conversion needed to make bitcoin address the right way.*/" (return_statement) "return TRUE;" (return) "return" (true) "TRUE" (;) ";" (}) "}" (function_definition) "VersionChecksumBytes * createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...)){\n VersionChecksumBytes * self = malloc(sizeof(*self));\n if (! self) {\n onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\n",sizeof(*self));\n return NULL;\n }\n getObject(self)->destroy = destroyVersionChecksumBytes;\n if(initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived)){\n return self;\n }\n free(self);\n return NULL;\n}" (type_identifier) "VersionChecksumBytes" (pointer_declarator) "* createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...))" (*) "*" (function_declarator) "createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...))" (identifier) "createNewVersionChecksumBytesFromBytes" (parameter_list) "(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...))" (() "(" (parameter_declaration) "uint8_t * bytes" (primitive_type) "uint8_t" (pointer_declarator) "* bytes" (*) "*" (identifier) "bytes" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" (,) "," (parameter_declaration) "int cacheString" (primitive_type) "int" (identifier) "cacheString" (,) "," (parameter_declaration) "void (*onErrorReceived)(Error error,char *,...)" (primitive_type) "void" (function_declarator) "(*onErrorReceived)(Error error,char *,...)" (parenthesized_declarator) "(*onErrorReceived)" (() "(" (pointer_declarator) "*onErrorReceived" (*) "*" (identifier) "onErrorReceived" ()) ")" (parameter_list) "(Error error,char *,...)" (() "(" (parameter_declaration) "Error error" (type_identifier) "Error" (identifier) "error" (,) "," (parameter_declaration) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (,) "," (variadic_parameter) "..." (...) "..." ()) ")" ()) ")" (compound_statement) "{\n VersionChecksumBytes * self = malloc(sizeof(*self));\n if (! self) {\n onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\n",sizeof(*self));\n return NULL;\n }\n getObject(self)->destroy = destroyVersionChecksumBytes;\n if(initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived)){\n return self;\n }\n free(self);\n return NULL;\n}" ({) "{" (declaration) "VersionChecksumBytes * self = malloc(sizeof(*self));" (type_identifier) "VersionChecksumBytes" (init_declarator) "* self = malloc(sizeof(*self))" (pointer_declarator) "* self" (*) "*" (identifier) "self" (=) "=" (call_expression) "malloc(sizeof(*self))" (identifier) "malloc" (argument_list) "(sizeof(*self))" (() "(" (sizeof_expression) "sizeof(*self)" (sizeof) "sizeof" (parenthesized_expression) "(*self)" (() "(" (pointer_expression) "*self" (*) "*" (identifier) "self" ()) ")" ()) ")" (;) ";" (if_statement) "if (! self) {\n onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\n",sizeof(*self));\n return NULL;\n }" (if) "if" (parenthesized_expression) "(! self)" (() "(" (unary_expression) "! self" (!) "!" (identifier) "self" ()) ")" (compound_statement) "{\n onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\n",sizeof(*self));\n return NULL;\n }" ({) "{" (expression_statement) "onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\n",sizeof(*self));" (call_expression) "onErrorReceived(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\n",sizeof(*self))" (identifier) "onErrorReceived" (argument_list) "(ERROR_OUT_OF_MEMORY,"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\n",sizeof(*self))" (() "(" (identifier) "ERROR_OUT_OF_MEMORY" (,) "," (string_literal) ""Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\n"" (") """ (string_content) "Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes" (escape_sequence) "\n" (") """ (,) "," (sizeof_expression) "sizeof(*self)" (sizeof) "sizeof" (parenthesized_expression) "(*self)" (() "(" (pointer_expression) "*self" (*) "*" (identifier) "self" ()) ")" ()) ")" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "getObject(self)->destroy = destroyVersionChecksumBytes;" (assignment_expression) "getObject(self)->destroy = destroyVersionChecksumBytes" (field_expression) "getObject(self)->destroy" (call_expression) "getObject(self)" (identifier) "getObject" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" (->) "->" (field_identifier) "destroy" (=) "=" (identifier) "destroyVersionChecksumBytes" (;) ";" (if_statement) "if(initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived)){\n return self;\n }" (if) "if" (parenthesized_expression) "(initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived))" (() "(" (call_expression) "initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived)" (identifier) "initializeVersionChecksumBytesFromBytes" (argument_list) "(self,bytes,size,cacheString,onErrorReceived)" (() "(" (identifier) "self" (,) "," (identifier) "bytes" (,) "," (identifier) "size" (,) "," (identifier) "cacheString" (,) "," (identifier) "onErrorReceived" ()) ")" ()) ")" (compound_statement) "{\n return self;\n }" ({) "{" (return_statement) "return self;" (return) "return" (identifier) "self" (;) ";" (}) "}" (expression_statement) "free(self);" (call_expression) "free(self)" (identifier) "free" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (function_definition) "uint8_t initializeVersionChecksumBytesFromBytes(VersionChecksumBytes * self,uint8_t * bytes,uint32_t size,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...)){ self->cacheString = cacheString;\n self->cachedString = NULL;\n if (! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)){\n return FALSE;\n }\n return TRUE;\n}" (primitive_type) "uint8_t" (function_declarator) "initializeVersionChecksumBytesFromBytes(VersionChecksumBytes * self,uint8_t * bytes,uint32_t size,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))" (identifier) "initializeVersionChecksumBytesFromBytes" (parameter_list) "(VersionChecksumBytes * self,uint8_t * bytes,uint32_t size,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))" (() "(" (parameter_declaration) "VersionChecksumBytes * self" (type_identifier) "VersionChecksumBytes" (pointer_declarator) "* self" (*) "*" (identifier) "self" (,) "," (parameter_declaration) "uint8_t * bytes" (primitive_type) "uint8_t" (pointer_declarator) "* bytes" (*) "*" (identifier) "bytes" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" (,) "," (parameter_declaration) "uint8_t cacheString" (primitive_type) "uint8_t" (identifier) "cacheString" (,) "," (parameter_declaration) "void (*onErrorReceived)(Error error,char *,...)" (primitive_type) "void" (function_declarator) "(*onErrorReceived)(Error error,char *,...)" (parenthesized_declarator) "(*onErrorReceived)" (() "(" (pointer_declarator) "*onErrorReceived" (*) "*" (identifier) "onErrorReceived" ()) ")" (parameter_list) "(Error error,char *,...)" (() "(" (parameter_declaration) "Error error" (type_identifier) "Error" (identifier) "error" (,) "," (parameter_declaration) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" (,) "," (variadic_parameter) "..." (...) "..." ()) ")" ()) ")" (compound_statement) "{ self->cacheString = cacheString;\n self->cachedString = NULL;\n if (! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)){\n return FALSE;\n }\n return TRUE;\n}" ({) "{" (expression_statement) "self->cacheString = cacheString;" (assignment_expression) "self->cacheString = cacheString" (field_expression) "self->cacheString" (identifier) "self" (->) "->" (field_identifier) "cacheString" (=) "=" (identifier) "cacheString" (;) ";" (expression_statement) "self->cachedString = NULL;" (assignment_expression) "self->cachedString = NULL" (field_expression) "self->cachedString" (identifier) "self" (->) "->" (field_identifier) "cachedString" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (if_statement) "if (! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)){\n return FALSE;\n }" (if) "if" (parenthesized_expression) "(! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived))" (() "(" (unary_expression) "! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)" (!) "!" (call_expression) "initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)" (identifier) "initializeNewByteArrayFromData" (argument_list) "(getByteArray(self), bytes, size, onErrorReceived)" (() "(" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" (,) "," (identifier) "bytes" (,) "," (identifier) "size" (,) "," (identifier) "onErrorReceived" ()) ")" ()) ")" (compound_statement) "{\n return FALSE;\n }" ({) "{" (return_statement) "return FALSE;" (return) "return" (false) "FALSE" (;) ";" (}) "}" (return_statement) "return TRUE;" (return) "return" (true) "TRUE" (;) ";" (}) "}" (comment) "/* Object Getter */" (function_definition) "VersionChecksumBytes * getVersionChecksumBytes(void * self)\n{\n assert(self!=NULL);\n\n return self;\n}" (type_identifier) "VersionChecksumBytes" (pointer_declarator) "* getVersionChecksumBytes(void * self)" (*) "*" (function_declarator) "getVersionChecksumBytes(void * self)" (identifier) "getVersionChecksumBytes" (parameter_list) "(void * self)" (() "(" (parameter_declaration) "void * self" (primitive_type) "void" (pointer_declarator) "* self" (*) "*" (identifier) "self" ()) ")" (compound_statement) "{\n assert(self!=NULL);\n\n return self;\n}" ({) "{" (expression_statement) "assert(self!=NULL);" (call_expression) "assert(self!=NULL)" (identifier) "assert" (argument_list) "(self!=NULL)" (() "(" (binary_expression) "self!=NULL" (identifier) "self" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (return_statement) "return self;" (return) "return" (identifier) "self" (;) ";" (}) "}" (function_definition) "void destroyVersionChecksumBytes(void * vself){\n VersionChecksumBytes * self = vself;\n if (self->cachedString){\n decrementReferenceCount(self->cachedString);\n }\n destroyByteArray(getByteArray(self));\n}" (primitive_type) "void" (function_declarator) "destroyVersionChecksumBytes(void * vself)" (identifier) "destroyVersionChecksumBytes" (parameter_list) "(void * vself)" (() "(" (parameter_declaration) "void * vself" (primitive_type) "void" (pointer_declarator) "* vself" (*) "*" (identifier) "vself" ()) ")" (compound_statement) "{\n VersionChecksumBytes * self = vself;\n if (self->cachedString){\n decrementReferenceCount(self->cachedString);\n }\n destroyByteArray(getByteArray(self));\n}" ({) "{" (declaration) "VersionChecksumBytes * self = vself;" (type_identifier) "VersionChecksumBytes" (init_declarator) "* self = vself" (pointer_declarator) "* self" (*) "*" (identifier) "self" (=) "=" (identifier) "vself" (;) ";" (if_statement) "if (self->cachedString){\n decrementReferenceCount(self->cachedString);\n }" (if) "if" (parenthesized_expression) "(self->cachedString)" (() "(" (field_expression) "self->cachedString" (identifier) "self" (->) "->" (field_identifier) "cachedString" ()) ")" (compound_statement) "{\n decrementReferenceCount(self->cachedString);\n }" ({) "{" (expression_statement) "decrementReferenceCount(self->cachedString);" (call_expression) "decrementReferenceCount(self->cachedString)" (identifier) "decrementReferenceCount" (argument_list) "(self->cachedString)" (() "(" (field_expression) "self->cachedString" (identifier) "self" (->) "->" (field_identifier) "cachedString" ()) ")" (;) ";" (}) "}" (expression_statement) "destroyByteArray(getByteArray(self));" (call_expression) "destroyByteArray(getByteArray(self))" (identifier) "destroyByteArray" (argument_list) "(getByteArray(self))" (() "(" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" ()) ")" (;) ";" (}) "}" (comment) "/* Functions */" (function_definition) "uint8_t getNetVersionByteForVersionChecksumBytes(VersionChecksumBytes * self){\n\n return getByteFromByteArray(getByteArray(self), 0);\n}" (primitive_type) "uint8_t" (function_declarator) "getNetVersionByteForVersionChecksumBytes(VersionChecksumBytes * self)" (identifier) "getNetVersionByteForVersionChecksumBytes" (parameter_list) "(VersionChecksumBytes * self)" (() "(" (parameter_declaration) "VersionChecksumBytes * self" (type_identifier) "VersionChecksumBytes" (pointer_declarator) "* self" (*) "*" (identifier) "self" ()) ")" (compound_statement) "{\n\n return getByteFromByteArray(getByteArray(self), 0);\n}" ({) "{" (return_statement) "return getByteFromByteArray(getByteArray(self), 0);" (return) "return" (call_expression) "getByteFromByteArray(getByteArray(self), 0)" (identifier) "getByteFromByteArray" (argument_list) "(getByteArray(self), 0)" (() "(" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" (,) "," (number_literal) "0" ()) ")" (;) ";" (}) "}" (function_definition) "ByteArray * getStringForVersionChecksumBytes(VersionChecksumBytes * self){\n if (self->cachedString) {\n incrementReferenceCount(self->cachedString);\n return self->cachedString;\n } else {\n reverseBytes(getByteArray(self));\n\n BigInt bytes;\n BigIntAlloc(&bytes, getByteArray(self)->length);\n bytes.length = getByteArray(self)->length;\n memcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);\n\n char * string = encodeBase58(bytes.data,bytes.length);\n\n if (! string){\n return NULL;\n }\n ByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);\n if (! str) {\n free(string);\n return NULL;\n }\n reverseBytes(getByteArray(self));\n if (self->cacheString) {\n self->cachedString = str;\n incrementReferenceCount(str);\n }\n\n return str;\n }\n}" (type_identifier) "ByteArray" (pointer_declarator) "* getStringForVersionChecksumBytes(VersionChecksumBytes * self)" (*) "*" (function_declarator) "getStringForVersionChecksumBytes(VersionChecksumBytes * self)" (identifier) "getStringForVersionChecksumBytes" (parameter_list) "(VersionChecksumBytes * self)" (() "(" (parameter_declaration) "VersionChecksumBytes * self" (type_identifier) "VersionChecksumBytes" (pointer_declarator) "* self" (*) "*" (identifier) "self" ()) ")" (compound_statement) "{\n if (self->cachedString) {\n incrementReferenceCount(self->cachedString);\n return self->cachedString;\n } else {\n reverseBytes(getByteArray(self));\n\n BigInt bytes;\n BigIntAlloc(&bytes, getByteArray(self)->length);\n bytes.length = getByteArray(self)->length;\n memcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);\n\n char * string = encodeBase58(bytes.data,bytes.length);\n\n if (! string){\n return NULL;\n }\n ByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);\n if (! str) {\n free(string);\n return NULL;\n }\n reverseBytes(getByteArray(self));\n if (self->cacheString) {\n self->cachedString = str;\n incrementReferenceCount(str);\n }\n\n return str;\n }\n}" ({) "{" (if_statement) "if (self->cachedString) {\n incrementReferenceCount(self->cachedString);\n return self->cachedString;\n } else {\n reverseBytes(getByteArray(self));\n\n BigInt bytes;\n BigIntAlloc(&bytes, getByteArray(self)->length);\n bytes.length = getByteArray(self)->length;\n memcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);\n\n char * string = encodeBase58(bytes.data,bytes.length);\n\n if (! string){\n return NULL;\n }\n ByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);\n if (! str) {\n free(string);\n return NULL;\n }\n reverseBytes(getByteArray(self));\n if (self->cacheString) {\n self->cachedString = str;\n incrementReferenceCount(str);\n }\n\n return str;\n }" (if) "if" (parenthesized_expression) "(self->cachedString)" (() "(" (field_expression) "self->cachedString" (identifier) "self" (->) "->" (field_identifier) "cachedString" ()) ")" (compound_statement) "{\n incrementReferenceCount(self->cachedString);\n return self->cachedString;\n }" ({) "{" (expression_statement) "incrementReferenceCount(self->cachedString);" (call_expression) "incrementReferenceCount(self->cachedString)" (identifier) "incrementReferenceCount" (argument_list) "(self->cachedString)" (() "(" (field_expression) "self->cachedString" (identifier) "self" (->) "->" (field_identifier) "cachedString" ()) ")" (;) ";" (return_statement) "return self->cachedString;" (return) "return" (field_expression) "self->cachedString" (identifier) "self" (->) "->" (field_identifier) "cachedString" (;) ";" (}) "}" (else_clause) "else {\n reverseBytes(getByteArray(self));\n\n BigInt bytes;\n BigIntAlloc(&bytes, getByteArray(self)->length);\n bytes.length = getByteArray(self)->length;\n memcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);\n\n char * string = encodeBase58(bytes.data,bytes.length);\n\n if (! string){\n return NULL;\n }\n ByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);\n if (! str) {\n free(string);\n return NULL;\n }\n reverseBytes(getByteArray(self));\n if (self->cacheString) {\n self->cachedString = str;\n incrementReferenceCount(str);\n }\n\n return str;\n }" (else) "else" (compound_statement) "{\n reverseBytes(getByteArray(self));\n\n BigInt bytes;\n BigIntAlloc(&bytes, getByteArray(self)->length);\n bytes.length = getByteArray(self)->length;\n memcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);\n\n char * string = encodeBase58(bytes.data,bytes.length);\n\n if (! string){\n return NULL;\n }\n ByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);\n if (! str) {\n free(string);\n return NULL;\n }\n reverseBytes(getByteArray(self));\n if (self->cacheString) {\n self->cachedString = str;\n incrementReferenceCount(str);\n }\n\n return str;\n }" ({) "{" (expression_statement) "reverseBytes(getByteArray(self));" (call_expression) "reverseBytes(getByteArray(self))" (identifier) "reverseBytes" (argument_list) "(getByteArray(self))" (() "(" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" ()) ")" (;) ";" (declaration) "BigInt bytes;" (type_identifier) "BigInt" (identifier) "bytes" (;) ";" (expression_statement) "BigIntAlloc(&bytes, getByteArray(self)->length);" (call_expression) "BigIntAlloc(&bytes, getByteArray(self)->length)" (identifier) "BigIntAlloc" (argument_list) "(&bytes, getByteArray(self)->length)" (() "(" (pointer_expression) "&bytes" (&) "&" (identifier) "bytes" (,) "," (field_expression) "getByteArray(self)->length" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" (->) "->" (field_identifier) "length" ()) ")" (;) ";" (expression_statement) "bytes.length = getByteArray(self)->length;" (assignment_expression) "bytes.length = getByteArray(self)->length" (field_expression) "bytes.length" (identifier) "bytes" (.) "." (field_identifier) "length" (=) "=" (field_expression) "getByteArray(self)->length" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" (->) "->" (field_identifier) "length" (;) ";" (expression_statement) "memcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);" (call_expression) "memcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length)" (identifier) "memcpy" (argument_list) "(bytes.data, getByteArrayData(getByteArray(self)), bytes.length)" (() "(" (field_expression) "bytes.data" (identifier) "bytes" (.) "." (field_identifier) "data" (,) "," (call_expression) "getByteArrayData(getByteArray(self))" (identifier) "getByteArrayData" (argument_list) "(getByteArray(self))" (() "(" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" ()) ")" (,) "," (field_expression) "bytes.length" (identifier) "bytes" (.) "." (field_identifier) "length" ()) ")" (;) ";" (declaration) "char * string = encodeBase58(bytes.data,bytes.length);" (primitive_type) "char" (init_declarator) "* string = encodeBase58(bytes.data,bytes.length)" (pointer_declarator) "* string" (*) "*" (identifier) "string" (=) "=" (call_expression) "encodeBase58(bytes.data,bytes.length)" (identifier) "encodeBase58" (argument_list) "(bytes.data,bytes.length)" (() "(" (field_expression) "bytes.data" (identifier) "bytes" (.) "." (field_identifier) "data" (,) "," (field_expression) "bytes.length" (identifier) "bytes" (.) "." (field_identifier) "length" ()) ")" (;) ";" (if_statement) "if (! string){\n return NULL;\n }" (if) "if" (parenthesized_expression) "(! string)" (() "(" (unary_expression) "! string" (!) "!" (identifier) "string" ()) ")" (compound_statement) "{\n return NULL;\n }" ({) "{" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (declaration) "ByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);" (type_identifier) "ByteArray" (init_declarator) "* str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived)" (pointer_declarator) "* str" (*) "*" (identifier) "str" (=) "=" (call_expression) "createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived)" (identifier) "createNewByteArrayFromString" (argument_list) "(string, TRUE, getByteArray(self)->onErrorReceived)" (() "(" (identifier) "string" (,) "," (true) "TRUE" (,) "," (field_expression) "getByteArray(self)->onErrorReceived" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" (->) "->" (field_identifier) "onErrorReceived" ()) ")" (;) ";" (if_statement) "if (! str) {\n free(string);\n return NULL;\n }" (if) "if" (parenthesized_expression) "(! str)" (() "(" (unary_expression) "! str" (!) "!" (identifier) "str" ()) ")" (compound_statement) "{\n free(string);\n return NULL;\n }" ({) "{" (expression_statement) "free(string);" (call_expression) "free(string)" (identifier) "free" (argument_list) "(string)" (() "(" (identifier) "string" ()) ")" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "reverseBytes(getByteArray(self));" (call_expression) "reverseBytes(getByteArray(self))" (identifier) "reverseBytes" (argument_list) "(getByteArray(self))" (() "(" (call_expression) "getByteArray(self)" (identifier) "getByteArray" (argument_list) "(self)" (() "(" (identifier) "self" ()) ")" ()) ")" (;) ";" (if_statement) "if (self->cacheString) {\n self->cachedString = str;\n incrementReferenceCount(str);\n }" (if) "if" (parenthesized_expression) "(self->cacheString)" (() "(" (field_expression) "self->cacheString" (identifier) "self" (->) "->" (field_identifier) "cacheString" ()) ")" (compound_statement) "{\n self->cachedString = str;\n incrementReferenceCount(str);\n }" ({) "{" (expression_statement) "self->cachedString = str;" (assignment_expression) "self->cachedString = str" (field_expression) "self->cachedString" (identifier) "self" (->) "->" (field_identifier) "cachedString" (=) "=" (identifier) "str" (;) ";" (expression_statement) "incrementReferenceCount(str);" (call_expression) "incrementReferenceCount(str)" (identifier) "incrementReferenceCount" (argument_list) "(str)" (() "(" (identifier) "str" ()) ")" (;) ";" (}) "}" (return_statement) "return str;" (return) "return" (identifier) "str" (;) ";" (}) "}" (}) "}"
1,066
0
{"language": "c", "success": true, "metadata": {"lines": 119, "avg_line_length": 32.43, "nodes": 626, "errors": 0, "source_hash": "4af2f943794560ca245e2e3d1f385889f974d902a8e763cb8f856d21a02dd996", "categorized_nodes": 425}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"VersionChecksumBytes.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": "string_literal", "text": "\"VersionChecksumBytes.h\"", "parent": 0, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "preproc_include", "text": "#include \"../BigInt/BigInt.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": "string_literal", "text": "\"../BigInt/BigInt.h\"", "parent": 3, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 29}}, {"id": 6, "type": "preproc_include", "text": "#include \"../Base58/Base58.h\"\n", "parent": null, "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": "\"../Base58/Base58.h\"", "parent": 6, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 29}}, {"id": 9, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "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": "<stdlib.h>", "parent": 9, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": null, "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": "<stdint.h>", "parent": 12, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include <assert.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<assert.h>", "parent": 15, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 19}}, {"id": 18, "type": "function_definition", "text": "VersionChecksumBytes * createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))\n{\n\tVersionChecksumBytes * self = malloc(sizeof(*self));\n\tif (! self) {\n\t\tonErrorReceived(ERROR_OUT_OF_MEMORY,\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\\n\",sizeof(*self));\n\t\treturn NULL;\n\t}\n\n\tgetObject(self)->destroy = destroyVersionChecksumBytes;\n\tif(initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived)){\n\t\treturn self;\n\t}\n\n\tfree(self);\n\treturn NULL;\n}", "parent": null, "children": [19, 20], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 19, "type": "type_identifier", "text": "VersionChecksumBytes", "parent": 18, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 20}}, {"id": 20, "type": "pointer_declarator", "text": "* createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))", "parent": 18, "children": [21, 22], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 150}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 22}}, {"id": 22, "type": "function_declarator", "text": "createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))", "parent": 20, "children": [23, 24], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 150}}, {"id": 23, "type": "identifier", "text": "createNewVersionChecksumBytesFromString", "parent": 22, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 62}}, {"id": 24, "type": "parameter_list", "text": "(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))", "parent": 22, "children": [25, 30, 33], "start_point": {"row": 16, "column": 62}, "end_point": {"row": 16, "column": 150}}, {"id": 25, "type": "parameter_declaration", "text": "ByteArray * string", "parent": 24, "children": [26, 27], "start_point": {"row": 16, "column": 63}, "end_point": {"row": 16, "column": 81}}, {"id": 26, "type": "type_identifier", "text": "ByteArray", "parent": 25, "children": [], "start_point": {"row": 16, "column": 63}, "end_point": {"row": 16, "column": 72}}, {"id": 27, "type": "pointer_declarator", "text": "* string", "parent": 25, "children": [28, 29], "start_point": {"row": 16, "column": 73}, "end_point": {"row": 16, "column": 81}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 16, "column": 73}, "end_point": {"row": 16, "column": 74}}, {"id": 29, "type": "identifier", "text": "string", "parent": 27, "children": [], "start_point": {"row": 16, "column": 75}, "end_point": {"row": 16, "column": 81}}, {"id": 30, "type": "parameter_declaration", "text": "uint8_t cacheString", "parent": 24, "children": [31, 32], "start_point": {"row": 16, "column": 82}, "end_point": {"row": 16, "column": 101}}, {"id": 31, "type": "primitive_type", "text": "uint8_t", "parent": 30, "children": [], "start_point": {"row": 16, "column": 82}, "end_point": {"row": 16, "column": 89}}, {"id": 32, "type": "identifier", "text": "cacheString", "parent": 30, "children": [], "start_point": {"row": 16, "column": 90}, "end_point": {"row": 16, "column": 101}}, {"id": 33, "type": "parameter_declaration", "text": "void (*onErrorReceived)(Error error,char *,...)", "parent": 24, "children": [34, 35], "start_point": {"row": 16, "column": 102}, "end_point": {"row": 16, "column": 149}}, {"id": 34, "type": "primitive_type", "text": "void", "parent": 33, "children": [], "start_point": {"row": 16, "column": 102}, "end_point": {"row": 16, "column": 106}}, {"id": 35, "type": "function_declarator", "text": "(*onErrorReceived)(Error error,char *,...)", "parent": 33, "children": [36, 40], "start_point": {"row": 16, "column": 107}, "end_point": {"row": 16, "column": 149}}, {"id": 36, "type": "parenthesized_declarator", "text": "(*onErrorReceived)", "parent": 35, "children": [37], "start_point": {"row": 16, "column": 107}, "end_point": {"row": 16, "column": 125}}, {"id": 37, "type": "pointer_declarator", "text": "*onErrorReceived", "parent": 36, "children": [38, 39], "start_point": {"row": 16, "column": 108}, "end_point": {"row": 16, "column": 124}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 16, "column": 108}, "end_point": {"row": 16, "column": 109}}, {"id": 39, "type": "identifier", "text": "onErrorReceived", "parent": 37, "children": [], "start_point": {"row": 16, "column": 109}, "end_point": {"row": 16, "column": 124}}, {"id": 40, "type": "parameter_list", "text": "(Error error,char *,...)", "parent": 35, "children": [41, 44], "start_point": {"row": 16, "column": 125}, "end_point": {"row": 16, "column": 149}}, {"id": 41, "type": "parameter_declaration", "text": "Error error", "parent": 40, "children": [42, 43], "start_point": {"row": 16, "column": 126}, "end_point": {"row": 16, "column": 137}}, {"id": 42, "type": "type_identifier", "text": "Error", "parent": 41, "children": [], "start_point": {"row": 16, "column": 126}, "end_point": {"row": 16, "column": 131}}, {"id": 43, "type": "identifier", "text": "error", "parent": 41, "children": [], "start_point": {"row": 16, "column": 132}, "end_point": {"row": 16, "column": 137}}, {"id": 44, "type": "parameter_declaration", "text": "char *", "parent": 40, "children": [45, 46], "start_point": {"row": 16, "column": 138}, "end_point": {"row": 16, "column": 144}}, {"id": 45, "type": "primitive_type", "text": "char", "parent": 44, "children": [], "start_point": {"row": 16, "column": 138}, "end_point": {"row": 16, "column": 142}}, {"id": 46, "type": "abstract_pointer_declarator", "text": "*", "parent": 44, "children": [47], "start_point": {"row": 16, "column": 143}, "end_point": {"row": 16, "column": 144}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 16, "column": 143}, "end_point": {"row": 16, "column": 144}}, {"id": 48, "type": "declaration", "text": "VersionChecksumBytes * self = malloc(sizeof(*self));", "parent": 18, "children": [49, 50], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 53}}, {"id": 49, "type": "type_identifier", "text": "VersionChecksumBytes", "parent": 48, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 21}}, {"id": 50, "type": "init_declarator", "text": "* self = malloc(sizeof(*self))", "parent": 48, "children": [51, 54, 55], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 52}}, {"id": 51, "type": "pointer_declarator", "text": "* self", "parent": 50, "children": [52, 53], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 28}}, {"id": 52, "type": "*", "text": "*", "parent": 51, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 23}}, {"id": 53, "type": "identifier", "text": "self", "parent": 51, "children": [], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 28}}, {"id": 54, "type": "=", "text": "=", "parent": 50, "children": [], "start_point": {"row": 18, "column": 29}, "end_point": {"row": 18, "column": 30}}, {"id": 55, "type": "call_expression", "text": "malloc(sizeof(*self))", "parent": 50, "children": [56, 57], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 52}}, {"id": 56, "type": "identifier", "text": "malloc", "parent": 55, "children": [], "start_point": {"row": 18, "column": 31}, "end_point": {"row": 18, "column": 37}}, {"id": 57, "type": "argument_list", "text": "(sizeof(*self))", "parent": 55, "children": [58], "start_point": {"row": 18, "column": 37}, "end_point": {"row": 18, "column": 52}}, {"id": 58, "type": "sizeof_expression", "text": "sizeof(*self)", "parent": 57, "children": [59], "start_point": {"row": 18, "column": 38}, "end_point": {"row": 18, "column": 51}}, {"id": 59, "type": "parenthesized_expression", "text": "(*self)", "parent": 58, "children": [60], "start_point": {"row": 18, "column": 44}, "end_point": {"row": 18, "column": 51}}, {"id": 60, "type": "pointer_expression", "text": "*self", "parent": 59, "children": [61, 62], "start_point": {"row": 18, "column": 45}, "end_point": {"row": 18, "column": 50}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 18, "column": 45}, "end_point": {"row": 18, "column": 46}}, {"id": 62, "type": "identifier", "text": "self", "parent": 60, "children": [], "start_point": {"row": 18, "column": 46}, "end_point": {"row": 18, "column": 50}}, {"id": 63, "type": "if_statement", "text": "if (! self) {\n\t\tonErrorReceived(ERROR_OUT_OF_MEMORY,\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\\n\",sizeof(*self));\n\t\treturn NULL;\n\t}", "parent": 18, "children": [64], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 22, "column": 2}}, {"id": 64, "type": "parenthesized_expression", "text": "(! self)", "parent": 63, "children": [65], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 12}}, {"id": 65, "type": "unary_expression", "text": "! self", "parent": 64, "children": [66, 67], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 11}}, {"id": 66, "type": "!", "text": "!", "parent": 65, "children": [], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 6}}, {"id": 67, "type": "identifier", "text": "self", "parent": 65, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 11}}, {"id": 68, "type": "call_expression", "text": "onErrorReceived(ERROR_OUT_OF_MEMORY,\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\\n\",sizeof(*self))", "parent": 63, "children": [69, 70], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 128}}, {"id": 69, "type": "identifier", "text": "onErrorReceived", "parent": 68, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 17}}, {"id": 70, "type": "argument_list", "text": "(ERROR_OUT_OF_MEMORY,\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\\n\",sizeof(*self))", "parent": 68, "children": [71, 72, 74], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 128}}, {"id": 71, "type": "identifier", "text": "ERROR_OUT_OF_MEMORY", "parent": 70, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 37}}, {"id": 72, "type": "string_literal", "text": "\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\\n\"", "parent": 70, "children": [73], "start_point": {"row": 20, "column": 38}, "end_point": {"row": 20, "column": 113}}, {"id": 73, "type": "escape_sequence", "text": "\\n", "parent": 72, "children": [], "start_point": {"row": 20, "column": 110}, "end_point": {"row": 20, "column": 112}}, {"id": 74, "type": "sizeof_expression", "text": "sizeof(*self)", "parent": 70, "children": [75], "start_point": {"row": 20, "column": 114}, "end_point": {"row": 20, "column": 127}}, {"id": 75, "type": "parenthesized_expression", "text": "(*self)", "parent": 74, "children": [76], "start_point": {"row": 20, "column": 120}, "end_point": {"row": 20, "column": 127}}, {"id": 76, "type": "pointer_expression", "text": "*self", "parent": 75, "children": [77, 78], "start_point": {"row": 20, "column": 121}, "end_point": {"row": 20, "column": 126}}, {"id": 77, "type": "*", "text": "*", "parent": 76, "children": [], "start_point": {"row": 20, "column": 121}, "end_point": {"row": 20, "column": 122}}, {"id": 78, "type": "identifier", "text": "self", "parent": 76, "children": [], "start_point": {"row": 20, "column": 122}, "end_point": {"row": 20, "column": 126}}, {"id": 79, "type": "return_statement", "text": "return NULL;", "parent": 63, "children": [80], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 14}}, {"id": 80, "type": "null", "text": "NULL", "parent": 79, "children": [81], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 81, "type": "NULL", "text": "NULL", "parent": 80, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 82, "type": "assignment_expression", "text": "getObject(self)->destroy = destroyVersionChecksumBytes", "parent": 18, "children": [83, 89, 90], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 55}}, {"id": 83, "type": "field_expression", "text": "getObject(self)->destroy", "parent": 82, "children": [84, 88], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 25}}, {"id": 84, "type": "call_expression", "text": "getObject(self)", "parent": 83, "children": [85, 86], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 16}}, {"id": 85, "type": "identifier", "text": "getObject", "parent": 84, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 10}}, {"id": 86, "type": "argument_list", "text": "(self)", "parent": 84, "children": [87], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 16}}, {"id": 87, "type": "identifier", "text": "self", "parent": 86, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 15}}, {"id": 88, "type": "field_identifier", "text": "destroy", "parent": 83, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 25}}, {"id": 89, "type": "=", "text": "=", "parent": 82, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 27}}, {"id": 90, "type": "identifier", "text": "destroyVersionChecksumBytes", "parent": 82, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 55}}, {"id": 91, "type": "if_statement", "text": "if(initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived)){\n\t\treturn self;\n\t}", "parent": 18, "children": [92], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 27, "column": 2}}, {"id": 92, "type": "parenthesized_expression", "text": "(initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived))", "parent": 91, "children": [93], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 86}}, {"id": 93, "type": "call_expression", "text": "initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived)", "parent": 92, "children": [94, 95], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 85}}, {"id": 94, "type": "identifier", "text": "initializeVersionChecksumBytesFromString", "parent": 93, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 44}}, {"id": 95, "type": "argument_list", "text": "(self,string,cacheString,onErrorReceived)", "parent": 93, "children": [96, 97, 98, 99], "start_point": {"row": 25, "column": 44}, "end_point": {"row": 25, "column": 85}}, {"id": 96, "type": "identifier", "text": "self", "parent": 95, "children": [], "start_point": {"row": 25, "column": 45}, "end_point": {"row": 25, "column": 49}}, {"id": 97, "type": "identifier", "text": "string", "parent": 95, "children": [], "start_point": {"row": 25, "column": 50}, "end_point": {"row": 25, "column": 56}}, {"id": 98, "type": "identifier", "text": "cacheString", "parent": 95, "children": [], "start_point": {"row": 25, "column": 57}, "end_point": {"row": 25, "column": 68}}, {"id": 99, "type": "identifier", "text": "onErrorReceived", "parent": 95, "children": [], "start_point": {"row": 25, "column": 69}, "end_point": {"row": 25, "column": 84}}, {"id": 100, "type": "return_statement", "text": "return self;", "parent": 91, "children": [101], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 14}}, {"id": 101, "type": "identifier", "text": "self", "parent": 100, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 13}}, {"id": 102, "type": "call_expression", "text": "free(self)", "parent": 18, "children": [103, 104], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 11}}, {"id": 103, "type": "identifier", "text": "free", "parent": 102, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 5}}, {"id": 104, "type": "argument_list", "text": "(self)", "parent": 102, "children": [105], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 11}}, {"id": 105, "type": "identifier", "text": "self", "parent": 104, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 10}}, {"id": 106, "type": "return_statement", "text": "return NULL;", "parent": 18, "children": [107], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 13}}, {"id": 107, "type": "null", "text": "NULL", "parent": 106, "children": [108], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 12}}, {"id": 108, "type": "NULL", "text": "NULL", "parent": 107, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 12}}, {"id": 109, "type": "function_definition", "text": "uint8_t initializeVersionChecksumBytesFromString(VersionChecksumBytes * self,ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))\n{\n\t/* Cache string if needed */\n\tif (cacheString) {\n\t\tself->cachedString = string;\n\t\tincrementReferenceCount(string);\n\t} else {\n\t\tself->cachedString = NULL;\n\t}\n\n\tself->cacheString = cacheString;\n\t/* Get bytes from string conversion*/\n\tBigInt bytes;\n\tBigIntAlloc(&bytes, 25); /*25 is the number of bytes for bitcoin addresses.*/\n\tbytes=decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived);\n\n\tif (&bytes==NULL){\n\t\treturn FALSE;\n\t}\n\n\t/* Take over the bytes with the ByteArray*/\n\tif (! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)){\n\t\treturn FALSE;\n\t}\n\treverseBytes(getByteArray(self)); /* BigInt is in little-endian. Conversion needed to make bitcoin address the right way.*/\n\treturn TRUE;\n}", "parent": null, "children": [110, 111], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 110, "type": "primitive_type", "text": "uint8_t", "parent": 109, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 111, "type": "function_declarator", "text": "initializeVersionChecksumBytesFromString(VersionChecksumBytes * self,ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))", "parent": 109, "children": [112, 113], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 164}}, {"id": 112, "type": "identifier", "text": "initializeVersionChecksumBytesFromString", "parent": 111, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 48}}, {"id": 113, "type": "parameter_list", "text": "(VersionChecksumBytes * self,ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))", "parent": 111, "children": [114, 119, 124, 127], "start_point": {"row": 33, "column": 48}, "end_point": {"row": 33, "column": 164}}, {"id": 114, "type": "parameter_declaration", "text": "VersionChecksumBytes * self", "parent": 113, "children": [115, 116], "start_point": {"row": 33, "column": 49}, "end_point": {"row": 33, "column": 76}}, {"id": 115, "type": "type_identifier", "text": "VersionChecksumBytes", "parent": 114, "children": [], "start_point": {"row": 33, "column": 49}, "end_point": {"row": 33, "column": 69}}, {"id": 116, "type": "pointer_declarator", "text": "* self", "parent": 114, "children": [117, 118], "start_point": {"row": 33, "column": 70}, "end_point": {"row": 33, "column": 76}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 33, "column": 70}, "end_point": {"row": 33, "column": 71}}, {"id": 118, "type": "identifier", "text": "self", "parent": 116, "children": [], "start_point": {"row": 33, "column": 72}, "end_point": {"row": 33, "column": 76}}, {"id": 119, "type": "parameter_declaration", "text": "ByteArray * string", "parent": 113, "children": [120, 121], "start_point": {"row": 33, "column": 77}, "end_point": {"row": 33, "column": 95}}, {"id": 120, "type": "type_identifier", "text": "ByteArray", "parent": 119, "children": [], "start_point": {"row": 33, "column": 77}, "end_point": {"row": 33, "column": 86}}, {"id": 121, "type": "pointer_declarator", "text": "* string", "parent": 119, "children": [122, 123], "start_point": {"row": 33, "column": 87}, "end_point": {"row": 33, "column": 95}}, {"id": 122, "type": "*", "text": "*", "parent": 121, "children": [], "start_point": {"row": 33, "column": 87}, "end_point": {"row": 33, "column": 88}}, {"id": 123, "type": "identifier", "text": "string", "parent": 121, "children": [], "start_point": {"row": 33, "column": 89}, "end_point": {"row": 33, "column": 95}}, {"id": 124, "type": "parameter_declaration", "text": "uint8_t cacheString", "parent": 113, "children": [125, 126], "start_point": {"row": 33, "column": 96}, "end_point": {"row": 33, "column": 115}}, {"id": 125, "type": "primitive_type", "text": "uint8_t", "parent": 124, "children": [], "start_point": {"row": 33, "column": 96}, "end_point": {"row": 33, "column": 103}}, {"id": 126, "type": "identifier", "text": "cacheString", "parent": 124, "children": [], "start_point": {"row": 33, "column": 104}, "end_point": {"row": 33, "column": 115}}, {"id": 127, "type": "parameter_declaration", "text": "void (*onErrorReceived)(Error error,char *,...)", "parent": 113, "children": [128, 129], "start_point": {"row": 33, "column": 116}, "end_point": {"row": 33, "column": 163}}, {"id": 128, "type": "primitive_type", "text": "void", "parent": 127, "children": [], "start_point": {"row": 33, "column": 116}, "end_point": {"row": 33, "column": 120}}, {"id": 129, "type": "function_declarator", "text": "(*onErrorReceived)(Error error,char *,...)", "parent": 127, "children": [130, 134], "start_point": {"row": 33, "column": 121}, "end_point": {"row": 33, "column": 163}}, {"id": 130, "type": "parenthesized_declarator", "text": "(*onErrorReceived)", "parent": 129, "children": [131], "start_point": {"row": 33, "column": 121}, "end_point": {"row": 33, "column": 139}}, {"id": 131, "type": "pointer_declarator", "text": "*onErrorReceived", "parent": 130, "children": [132, 133], "start_point": {"row": 33, "column": 122}, "end_point": {"row": 33, "column": 138}}, {"id": 132, "type": "*", "text": "*", "parent": 131, "children": [], "start_point": {"row": 33, "column": 122}, "end_point": {"row": 33, "column": 123}}, {"id": 133, "type": "identifier", "text": "onErrorReceived", "parent": 131, "children": [], "start_point": {"row": 33, "column": 123}, "end_point": {"row": 33, "column": 138}}, {"id": 134, "type": "parameter_list", "text": "(Error error,char *,...)", "parent": 129, "children": [135, 138], "start_point": {"row": 33, "column": 139}, "end_point": {"row": 33, "column": 163}}, {"id": 135, "type": "parameter_declaration", "text": "Error error", "parent": 134, "children": [136, 137], "start_point": {"row": 33, "column": 140}, "end_point": {"row": 33, "column": 151}}, {"id": 136, "type": "type_identifier", "text": "Error", "parent": 135, "children": [], "start_point": {"row": 33, "column": 140}, "end_point": {"row": 33, "column": 145}}, {"id": 137, "type": "identifier", "text": "error", "parent": 135, "children": [], "start_point": {"row": 33, "column": 146}, "end_point": {"row": 33, "column": 151}}, {"id": 138, "type": "parameter_declaration", "text": "char *", "parent": 134, "children": [139, 140], "start_point": {"row": 33, "column": 152}, "end_point": {"row": 33, "column": 158}}, {"id": 139, "type": "primitive_type", "text": "char", "parent": 138, "children": [], "start_point": {"row": 33, "column": 152}, "end_point": {"row": 33, "column": 156}}, {"id": 140, "type": "abstract_pointer_declarator", "text": "*", "parent": 138, "children": [141], "start_point": {"row": 33, "column": 157}, "end_point": {"row": 33, "column": 158}}, {"id": 141, "type": "*", "text": "*", "parent": 140, "children": [], "start_point": {"row": 33, "column": 157}, "end_point": {"row": 33, "column": 158}}, {"id": 142, "type": "if_statement", "text": "if (cacheString) {\n\t\tself->cachedString = string;\n\t\tincrementReferenceCount(string);\n\t} else {\n\t\tself->cachedString = NULL;\n\t}", "parent": 109, "children": [143, 155], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 41, "column": 2}}, {"id": 143, "type": "parenthesized_expression", "text": "(cacheString)", "parent": 142, "children": [144], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 17}}, {"id": 144, "type": "identifier", "text": "cacheString", "parent": 143, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 16}}, {"id": 145, "type": "assignment_expression", "text": "self->cachedString = string", "parent": 142, "children": [146, 149, 150], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 29}}, {"id": 146, "type": "field_expression", "text": "self->cachedString", "parent": 145, "children": [147, 148], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 20}}, {"id": 147, "type": "identifier", "text": "self", "parent": 146, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 148, "type": "field_identifier", "text": "cachedString", "parent": 146, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 20}}, {"id": 149, "type": "=", "text": "=", "parent": 145, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 22}}, {"id": 150, "type": "identifier", "text": "string", "parent": 145, "children": [], "start_point": {"row": 37, "column": 23}, "end_point": {"row": 37, "column": 29}}, {"id": 151, "type": "call_expression", "text": "incrementReferenceCount(string)", "parent": 142, "children": [152, 153], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 33}}, {"id": 152, "type": "identifier", "text": "incrementReferenceCount", "parent": 151, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 25}}, {"id": 153, "type": "argument_list", "text": "(string)", "parent": 151, "children": [154], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 33}}, {"id": 154, "type": "identifier", "text": "string", "parent": 153, "children": [], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 38, "column": 32}}, {"id": 155, "type": "else_clause", "text": "else {\n\t\tself->cachedString = NULL;\n\t}", "parent": 142, "children": [], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 41, "column": 2}}, {"id": 156, "type": "assignment_expression", "text": "self->cachedString = NULL", "parent": 155, "children": [157, 160, 161], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 27}}, {"id": 157, "type": "field_expression", "text": "self->cachedString", "parent": 156, "children": [158, 159], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 20}}, {"id": 158, "type": "identifier", "text": "self", "parent": 157, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 6}}, {"id": 159, "type": "field_identifier", "text": "cachedString", "parent": 157, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 20}}, {"id": 160, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 22}}, {"id": 161, "type": "null", "text": "NULL", "parent": 156, "children": [162], "start_point": {"row": 40, "column": 23}, "end_point": {"row": 40, "column": 27}}, {"id": 162, "type": "NULL", "text": "NULL", "parent": 161, "children": [], "start_point": {"row": 40, "column": 23}, "end_point": {"row": 40, "column": 27}}, {"id": 163, "type": "assignment_expression", "text": "self->cacheString = cacheString", "parent": 109, "children": [164, 167, 168], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 32}}, {"id": 164, "type": "field_expression", "text": "self->cacheString", "parent": 163, "children": [165, 166], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 18}}, {"id": 165, "type": "identifier", "text": "self", "parent": 164, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 5}}, {"id": 166, "type": "field_identifier", "text": "cacheString", "parent": 164, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 18}}, {"id": 167, "type": "=", "text": "=", "parent": 163, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 20}}, {"id": 168, "type": "identifier", "text": "cacheString", "parent": 163, "children": [], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 32}}, {"id": 169, "type": "declaration", "text": "BigInt bytes;", "parent": 109, "children": [170, 171], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 14}}, {"id": 170, "type": "type_identifier", "text": "BigInt", "parent": 169, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 7}}, {"id": 171, "type": "identifier", "text": "bytes", "parent": 169, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 13}}, {"id": 172, "type": "call_expression", "text": "BigIntAlloc(&bytes, 25)", "parent": 109, "children": [173, 174], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 24}}, {"id": 173, "type": "identifier", "text": "BigIntAlloc", "parent": 172, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 12}}, {"id": 174, "type": "argument_list", "text": "(&bytes, 25)", "parent": 172, "children": [175, 177], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 24}}, {"id": 175, "type": "pointer_expression", "text": "&bytes", "parent": 174, "children": [176], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 19}}, {"id": 176, "type": "identifier", "text": "bytes", "parent": 175, "children": [], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 19}}, {"id": 177, "type": "number_literal", "text": "25", "parent": 174, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 23}}, {"id": 178, "type": "assignment_expression", "text": "bytes=decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived)", "parent": 109, "children": [179, 180, 181], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 77}}, {"id": 179, "type": "identifier", "text": "bytes", "parent": 178, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 6}}, {"id": 180, "type": "=", "text": "=", "parent": 178, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 7}}, {"id": 181, "type": "call_expression", "text": "decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived)", "parent": 178, "children": [182, 183], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 77}}, {"id": 182, "type": "identifier", "text": "decodeBase58Checked", "parent": 181, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 26}}, {"id": 183, "type": "argument_list", "text": "((char *)getByteArrayData(string), onErrorReceived)", "parent": 181, "children": [184, 193], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 77}}, {"id": 184, "type": "cast_expression", "text": "(char *)getByteArrayData(string)", "parent": 183, "children": [185, 189], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 59}}, {"id": 185, "type": "type_descriptor", "text": "char *", "parent": 184, "children": [186, 187], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 34}}, {"id": 186, "type": "primitive_type", "text": "char", "parent": 185, "children": [], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 32}}, {"id": 187, "type": "abstract_pointer_declarator", "text": "*", "parent": 185, "children": [188], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 34}}, {"id": 188, "type": "*", "text": "*", "parent": 187, "children": [], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 34}}, {"id": 189, "type": "call_expression", "text": "getByteArrayData(string)", "parent": 184, "children": [190, 191], "start_point": {"row": 47, "column": 35}, "end_point": {"row": 47, "column": 59}}, {"id": 190, "type": "identifier", "text": "getByteArrayData", "parent": 189, "children": [], "start_point": {"row": 47, "column": 35}, "end_point": {"row": 47, "column": 51}}, {"id": 191, "type": "argument_list", "text": "(string)", "parent": 189, "children": [192], "start_point": {"row": 47, "column": 51}, "end_point": {"row": 47, "column": 59}}, {"id": 192, "type": "identifier", "text": "string", "parent": 191, "children": [], "start_point": {"row": 47, "column": 52}, "end_point": {"row": 47, "column": 58}}, {"id": 193, "type": "identifier", "text": "onErrorReceived", "parent": 183, "children": [], "start_point": {"row": 47, "column": 61}, "end_point": {"row": 47, "column": 76}}, {"id": 194, "type": "if_statement", "text": "if (&bytes==NULL){\n\t\treturn FALSE;\n\t}", "parent": 109, "children": [195], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 51, "column": 2}}, {"id": 195, "type": "parenthesized_expression", "text": "(&bytes==NULL)", "parent": 194, "children": [196], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 18}}, {"id": 196, "type": "binary_expression", "text": "&bytes==NULL", "parent": 195, "children": [197, 199, 200], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 17}}, {"id": 197, "type": "pointer_expression", "text": "&bytes", "parent": 196, "children": [198], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 11}}, {"id": 198, "type": "identifier", "text": "bytes", "parent": 197, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 11}}, {"id": 199, "type": "==", "text": "==", "parent": 196, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 13}}, {"id": 200, "type": "null", "text": "NULL", "parent": 196, "children": [201], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 17}}, {"id": 201, "type": "NULL", "text": "NULL", "parent": 200, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 17}}, {"id": 202, "type": "return_statement", "text": "return FALSE;", "parent": 194, "children": [203], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 15}}, {"id": 203, "type": "false", "text": "FALSE", "parent": 202, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 14}}, {"id": 204, "type": "if_statement", "text": "if (! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)){\n\t\treturn FALSE;\n\t}", "parent": 109, "children": [205], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 56, "column": 2}}, {"id": 205, "type": "parenthesized_expression", "text": "(! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived))", "parent": 204, "children": [206], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 101}}, {"id": 206, "type": "unary_expression", "text": "! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)", "parent": 205, "children": [207, 208], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 100}}, {"id": 207, "type": "!", "text": "!", "parent": 206, "children": [], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 6}}, {"id": 208, "type": "call_expression", "text": "initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)", "parent": 206, "children": [209, 210], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 100}}, {"id": 209, "type": "identifier", "text": "initializeNewByteArrayFromData", "parent": 208, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 37}}, {"id": 210, "type": "argument_list", "text": "(getByteArray(self), bytes.data, bytes.length, onErrorReceived)", "parent": 208, "children": [211, 215, 218, 221], "start_point": {"row": 54, "column": 37}, "end_point": {"row": 54, "column": 100}}, {"id": 211, "type": "call_expression", "text": "getByteArray(self)", "parent": 210, "children": [212, 213], "start_point": {"row": 54, "column": 38}, "end_point": {"row": 54, "column": 56}}, {"id": 212, "type": "identifier", "text": "getByteArray", "parent": 211, "children": [], "start_point": {"row": 54, "column": 38}, "end_point": {"row": 54, "column": 50}}, {"id": 213, "type": "argument_list", "text": "(self)", "parent": 211, "children": [214], "start_point": {"row": 54, "column": 50}, "end_point": {"row": 54, "column": 56}}, {"id": 214, "type": "identifier", "text": "self", "parent": 213, "children": [], "start_point": {"row": 54, "column": 51}, "end_point": {"row": 54, "column": 55}}, {"id": 215, "type": "field_expression", "text": "bytes.data", "parent": 210, "children": [216, 217], "start_point": {"row": 54, "column": 58}, "end_point": {"row": 54, "column": 68}}, {"id": 216, "type": "identifier", "text": "bytes", "parent": 215, "children": [], "start_point": {"row": 54, "column": 58}, "end_point": {"row": 54, "column": 63}}, {"id": 217, "type": "field_identifier", "text": "data", "parent": 215, "children": [], "start_point": {"row": 54, "column": 64}, "end_point": {"row": 54, "column": 68}}, {"id": 218, "type": "field_expression", "text": "bytes.length", "parent": 210, "children": [219, 220], "start_point": {"row": 54, "column": 70}, "end_point": {"row": 54, "column": 82}}, {"id": 219, "type": "identifier", "text": "bytes", "parent": 218, "children": [], "start_point": {"row": 54, "column": 70}, "end_point": {"row": 54, "column": 75}}, {"id": 220, "type": "field_identifier", "text": "length", "parent": 218, "children": [], "start_point": {"row": 54, "column": 76}, "end_point": {"row": 54, "column": 82}}, {"id": 221, "type": "identifier", "text": "onErrorReceived", "parent": 210, "children": [], "start_point": {"row": 54, "column": 84}, "end_point": {"row": 54, "column": 99}}, {"id": 222, "type": "return_statement", "text": "return FALSE;", "parent": 204, "children": [223], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 15}}, {"id": 223, "type": "false", "text": "FALSE", "parent": 222, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 14}}, {"id": 224, "type": "call_expression", "text": "reverseBytes(getByteArray(self))", "parent": 109, "children": [225, 226], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 33}}, {"id": 225, "type": "identifier", "text": "reverseBytes", "parent": 224, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 13}}, {"id": 226, "type": "argument_list", "text": "(getByteArray(self))", "parent": 224, "children": [227], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 33}}, {"id": 227, "type": "call_expression", "text": "getByteArray(self)", "parent": 226, "children": [228, 229], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 32}}, {"id": 228, "type": "identifier", "text": "getByteArray", "parent": 227, "children": [], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 26}}, {"id": 229, "type": "argument_list", "text": "(self)", "parent": 227, "children": [230], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 32}}, {"id": 230, "type": "identifier", "text": "self", "parent": 229, "children": [], "start_point": {"row": 57, "column": 27}, "end_point": {"row": 57, "column": 31}}, {"id": 231, "type": "return_statement", "text": "return TRUE;", "parent": 109, "children": [232], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 13}}, {"id": 232, "type": "true", "text": "TRUE", "parent": 231, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 12}}, {"id": 233, "type": "function_definition", "text": "VersionChecksumBytes * createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...)){\n\tVersionChecksumBytes * self = malloc(sizeof(*self));\n\tif (! self) {\n\t\tonErrorReceived(ERROR_OUT_OF_MEMORY,\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\\n\",sizeof(*self));\n\t\treturn NULL;\n\t}\n\tgetObject(self)->destroy = destroyVersionChecksumBytes;\n\tif(initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived)){\n\t\treturn self;\n\t}\n\tfree(self);\n\treturn NULL;\n}", "parent": null, "children": [234, 235], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 234, "type": "type_identifier", "text": "VersionChecksumBytes", "parent": 233, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 20}}, {"id": 235, "type": "pointer_declarator", "text": "* createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...))", "parent": 233, "children": [236, 237], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 156}}, {"id": 236, "type": "*", "text": "*", "parent": 235, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 22}}, {"id": 237, "type": "function_declarator", "text": "createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...))", "parent": 235, "children": [238, 239], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 156}}, {"id": 238, "type": "identifier", "text": "createNewVersionChecksumBytesFromBytes", "parent": 237, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 61}}, {"id": 239, "type": "parameter_list", "text": "(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...))", "parent": 237, "children": [240, 245, 248, 251], "start_point": {"row": 62, "column": 61}, "end_point": {"row": 62, "column": 156}}, {"id": 240, "type": "parameter_declaration", "text": "uint8_t * bytes", "parent": 239, "children": [241, 242], "start_point": {"row": 62, "column": 62}, "end_point": {"row": 62, "column": 77}}, {"id": 241, "type": "primitive_type", "text": "uint8_t", "parent": 240, "children": [], "start_point": {"row": 62, "column": 62}, "end_point": {"row": 62, "column": 69}}, {"id": 242, "type": "pointer_declarator", "text": "* bytes", "parent": 240, "children": [243, 244], "start_point": {"row": 62, "column": 70}, "end_point": {"row": 62, "column": 77}}, {"id": 243, "type": "*", "text": "*", "parent": 242, "children": [], "start_point": {"row": 62, "column": 70}, "end_point": {"row": 62, "column": 71}}, {"id": 244, "type": "identifier", "text": "bytes", "parent": 242, "children": [], "start_point": {"row": 62, "column": 72}, "end_point": {"row": 62, "column": 77}}, {"id": 245, "type": "parameter_declaration", "text": "uint32_t size", "parent": 239, "children": [246, 247], "start_point": {"row": 62, "column": 78}, "end_point": {"row": 62, "column": 91}}, {"id": 246, "type": "primitive_type", "text": "uint32_t", "parent": 245, "children": [], "start_point": {"row": 62, "column": 78}, "end_point": {"row": 62, "column": 86}}, {"id": 247, "type": "identifier", "text": "size", "parent": 245, "children": [], "start_point": {"row": 62, "column": 87}, "end_point": {"row": 62, "column": 91}}, {"id": 248, "type": "parameter_declaration", "text": "int cacheString", "parent": 239, "children": [249, 250], "start_point": {"row": 62, "column": 92}, "end_point": {"row": 62, "column": 107}}, {"id": 249, "type": "primitive_type", "text": "int", "parent": 248, "children": [], "start_point": {"row": 62, "column": 92}, "end_point": {"row": 62, "column": 95}}, {"id": 250, "type": "identifier", "text": "cacheString", "parent": 248, "children": [], "start_point": {"row": 62, "column": 96}, "end_point": {"row": 62, "column": 107}}, {"id": 251, "type": "parameter_declaration", "text": "void (*onErrorReceived)(Error error,char *,...)", "parent": 239, "children": [252, 253], "start_point": {"row": 62, "column": 108}, "end_point": {"row": 62, "column": 155}}, {"id": 252, "type": "primitive_type", "text": "void", "parent": 251, "children": [], "start_point": {"row": 62, "column": 108}, "end_point": {"row": 62, "column": 112}}, {"id": 253, "type": "function_declarator", "text": "(*onErrorReceived)(Error error,char *,...)", "parent": 251, "children": [254, 258], "start_point": {"row": 62, "column": 113}, "end_point": {"row": 62, "column": 155}}, {"id": 254, "type": "parenthesized_declarator", "text": "(*onErrorReceived)", "parent": 253, "children": [255], "start_point": {"row": 62, "column": 113}, "end_point": {"row": 62, "column": 131}}, {"id": 255, "type": "pointer_declarator", "text": "*onErrorReceived", "parent": 254, "children": [256, 257], "start_point": {"row": 62, "column": 114}, "end_point": {"row": 62, "column": 130}}, {"id": 256, "type": "*", "text": "*", "parent": 255, "children": [], "start_point": {"row": 62, "column": 114}, "end_point": {"row": 62, "column": 115}}, {"id": 257, "type": "identifier", "text": "onErrorReceived", "parent": 255, "children": [], "start_point": {"row": 62, "column": 115}, "end_point": {"row": 62, "column": 130}}, {"id": 258, "type": "parameter_list", "text": "(Error error,char *,...)", "parent": 253, "children": [259, 262], "start_point": {"row": 62, "column": 131}, "end_point": {"row": 62, "column": 155}}, {"id": 259, "type": "parameter_declaration", "text": "Error error", "parent": 258, "children": [260, 261], "start_point": {"row": 62, "column": 132}, "end_point": {"row": 62, "column": 143}}, {"id": 260, "type": "type_identifier", "text": "Error", "parent": 259, "children": [], "start_point": {"row": 62, "column": 132}, "end_point": {"row": 62, "column": 137}}, {"id": 261, "type": "identifier", "text": "error", "parent": 259, "children": [], "start_point": {"row": 62, "column": 138}, "end_point": {"row": 62, "column": 143}}, {"id": 262, "type": "parameter_declaration", "text": "char *", "parent": 258, "children": [263, 264], "start_point": {"row": 62, "column": 144}, "end_point": {"row": 62, "column": 150}}, {"id": 263, "type": "primitive_type", "text": "char", "parent": 262, "children": [], "start_point": {"row": 62, "column": 144}, "end_point": {"row": 62, "column": 148}}, {"id": 264, "type": "abstract_pointer_declarator", "text": "*", "parent": 262, "children": [265], "start_point": {"row": 62, "column": 149}, "end_point": {"row": 62, "column": 150}}, {"id": 265, "type": "*", "text": "*", "parent": 264, "children": [], "start_point": {"row": 62, "column": 149}, "end_point": {"row": 62, "column": 150}}, {"id": 266, "type": "declaration", "text": "VersionChecksumBytes * self = malloc(sizeof(*self));", "parent": 233, "children": [267, 268], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 53}}, {"id": 267, "type": "type_identifier", "text": "VersionChecksumBytes", "parent": 266, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 21}}, {"id": 268, "type": "init_declarator", "text": "* self = malloc(sizeof(*self))", "parent": 266, "children": [269, 272, 273], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 52}}, {"id": 269, "type": "pointer_declarator", "text": "* self", "parent": 268, "children": [270, 271], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 28}}, {"id": 270, "type": "*", "text": "*", "parent": 269, "children": [], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 23}}, {"id": 271, "type": "identifier", "text": "self", "parent": 269, "children": [], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 28}}, {"id": 272, "type": "=", "text": "=", "parent": 268, "children": [], "start_point": {"row": 63, "column": 29}, "end_point": {"row": 63, "column": 30}}, {"id": 273, "type": "call_expression", "text": "malloc(sizeof(*self))", "parent": 268, "children": [274, 275], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 52}}, {"id": 274, "type": "identifier", "text": "malloc", "parent": 273, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 37}}, {"id": 275, "type": "argument_list", "text": "(sizeof(*self))", "parent": 273, "children": [276], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 52}}, {"id": 276, "type": "sizeof_expression", "text": "sizeof(*self)", "parent": 275, "children": [277], "start_point": {"row": 63, "column": 38}, "end_point": {"row": 63, "column": 51}}, {"id": 277, "type": "parenthesized_expression", "text": "(*self)", "parent": 276, "children": [278], "start_point": {"row": 63, "column": 44}, "end_point": {"row": 63, "column": 51}}, {"id": 278, "type": "pointer_expression", "text": "*self", "parent": 277, "children": [279, 280], "start_point": {"row": 63, "column": 45}, "end_point": {"row": 63, "column": 50}}, {"id": 279, "type": "*", "text": "*", "parent": 278, "children": [], "start_point": {"row": 63, "column": 45}, "end_point": {"row": 63, "column": 46}}, {"id": 280, "type": "identifier", "text": "self", "parent": 278, "children": [], "start_point": {"row": 63, "column": 46}, "end_point": {"row": 63, "column": 50}}, {"id": 281, "type": "if_statement", "text": "if (! self) {\n\t\tonErrorReceived(ERROR_OUT_OF_MEMORY,\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\\n\",sizeof(*self));\n\t\treturn NULL;\n\t}", "parent": 233, "children": [282], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 67, "column": 2}}, {"id": 282, "type": "parenthesized_expression", "text": "(! self)", "parent": 281, "children": [283], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 12}}, {"id": 283, "type": "unary_expression", "text": "! self", "parent": 282, "children": [284, 285], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 11}}, {"id": 284, "type": "!", "text": "!", "parent": 283, "children": [], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 6}}, {"id": 285, "type": "identifier", "text": "self", "parent": 283, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 11}}, {"id": 286, "type": "call_expression", "text": "onErrorReceived(ERROR_OUT_OF_MEMORY,\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\\n\",sizeof(*self))", "parent": 281, "children": [287, 288], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 127}}, {"id": 287, "type": "identifier", "text": "onErrorReceived", "parent": 286, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 17}}, {"id": 288, "type": "argument_list", "text": "(ERROR_OUT_OF_MEMORY,\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\\n\",sizeof(*self))", "parent": 286, "children": [289, 290, 292], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 127}}, {"id": 289, "type": "identifier", "text": "ERROR_OUT_OF_MEMORY", "parent": 288, "children": [], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 37}}, {"id": 290, "type": "string_literal", "text": "\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\\n\"", "parent": 288, "children": [291], "start_point": {"row": 65, "column": 38}, "end_point": {"row": 65, "column": 112}}, {"id": 291, "type": "escape_sequence", "text": "\\n", "parent": 290, "children": [], "start_point": {"row": 65, "column": 109}, "end_point": {"row": 65, "column": 111}}, {"id": 292, "type": "sizeof_expression", "text": "sizeof(*self)", "parent": 288, "children": [293], "start_point": {"row": 65, "column": 113}, "end_point": {"row": 65, "column": 126}}, {"id": 293, "type": "parenthesized_expression", "text": "(*self)", "parent": 292, "children": [294], "start_point": {"row": 65, "column": 119}, "end_point": {"row": 65, "column": 126}}, {"id": 294, "type": "pointer_expression", "text": "*self", "parent": 293, "children": [295, 296], "start_point": {"row": 65, "column": 120}, "end_point": {"row": 65, "column": 125}}, {"id": 295, "type": "*", "text": "*", "parent": 294, "children": [], "start_point": {"row": 65, "column": 120}, "end_point": {"row": 65, "column": 121}}, {"id": 296, "type": "identifier", "text": "self", "parent": 294, "children": [], "start_point": {"row": 65, "column": 121}, "end_point": {"row": 65, "column": 125}}, {"id": 297, "type": "return_statement", "text": "return NULL;", "parent": 281, "children": [298], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 14}}, {"id": 298, "type": "null", "text": "NULL", "parent": 297, "children": [299], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 13}}, {"id": 299, "type": "NULL", "text": "NULL", "parent": 298, "children": [], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 13}}, {"id": 300, "type": "assignment_expression", "text": "getObject(self)->destroy = destroyVersionChecksumBytes", "parent": 233, "children": [301, 307, 308], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 55}}, {"id": 301, "type": "field_expression", "text": "getObject(self)->destroy", "parent": 300, "children": [302, 306], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 25}}, {"id": 302, "type": "call_expression", "text": "getObject(self)", "parent": 301, "children": [303, 304], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 16}}, {"id": 303, "type": "identifier", "text": "getObject", "parent": 302, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 10}}, {"id": 304, "type": "argument_list", "text": "(self)", "parent": 302, "children": [305], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 16}}, {"id": 305, "type": "identifier", "text": "self", "parent": 304, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 15}}, {"id": 306, "type": "field_identifier", "text": "destroy", "parent": 301, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 25}}, {"id": 307, "type": "=", "text": "=", "parent": 300, "children": [], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 27}}, {"id": 308, "type": "identifier", "text": "destroyVersionChecksumBytes", "parent": 300, "children": [], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 55}}, {"id": 309, "type": "if_statement", "text": "if(initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived)){\n\t\treturn self;\n\t}", "parent": 233, "children": [310], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 71, "column": 2}}, {"id": 310, "type": "parenthesized_expression", "text": "(initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived))", "parent": 309, "children": [311], "start_point": {"row": 69, "column": 3}, "end_point": {"row": 69, "column": 89}}, {"id": 311, "type": "call_expression", "text": "initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived)", "parent": 310, "children": [312, 313], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 88}}, {"id": 312, "type": "identifier", "text": "initializeVersionChecksumBytesFromBytes", "parent": 311, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 43}}, {"id": 313, "type": "argument_list", "text": "(self,bytes,size,cacheString,onErrorReceived)", "parent": 311, "children": [314, 315, 316, 317, 318], "start_point": {"row": 69, "column": 43}, "end_point": {"row": 69, "column": 88}}, {"id": 314, "type": "identifier", "text": "self", "parent": 313, "children": [], "start_point": {"row": 69, "column": 44}, "end_point": {"row": 69, "column": 48}}, {"id": 315, "type": "identifier", "text": "bytes", "parent": 313, "children": [], "start_point": {"row": 69, "column": 49}, "end_point": {"row": 69, "column": 54}}, {"id": 316, "type": "identifier", "text": "size", "parent": 313, "children": [], "start_point": {"row": 69, "column": 55}, "end_point": {"row": 69, "column": 59}}, {"id": 317, "type": "identifier", "text": "cacheString", "parent": 313, "children": [], "start_point": {"row": 69, "column": 60}, "end_point": {"row": 69, "column": 71}}, {"id": 318, "type": "identifier", "text": "onErrorReceived", "parent": 313, "children": [], "start_point": {"row": 69, "column": 72}, "end_point": {"row": 69, "column": 87}}, {"id": 319, "type": "return_statement", "text": "return self;", "parent": 309, "children": [320], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 14}}, {"id": 320, "type": "identifier", "text": "self", "parent": 319, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 13}}, {"id": 321, "type": "call_expression", "text": "free(self)", "parent": 233, "children": [322, 323], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 11}}, {"id": 322, "type": "identifier", "text": "free", "parent": 321, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 5}}, {"id": 323, "type": "argument_list", "text": "(self)", "parent": 321, "children": [324], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 11}}, {"id": 324, "type": "identifier", "text": "self", "parent": 323, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 10}}, {"id": 325, "type": "return_statement", "text": "return NULL;", "parent": 233, "children": [326], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 13}}, {"id": 326, "type": "null", "text": "NULL", "parent": 325, "children": [327], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 12}}, {"id": 327, "type": "NULL", "text": "NULL", "parent": 326, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 12}}, {"id": 328, "type": "function_definition", "text": "uint8_t initializeVersionChecksumBytesFromBytes(VersionChecksumBytes * self,uint8_t * bytes,uint32_t size,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...)){\tself->cacheString = cacheString;\n\tself->cachedString = NULL;\n\tif (! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)){\n\t\treturn FALSE;\n\t}\n\treturn TRUE;\n}", "parent": null, "children": [329, 330], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 84, "column": 1}}, {"id": 329, "type": "primitive_type", "text": "uint8_t", "parent": 328, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 7}}, {"id": 330, "type": "function_declarator", "text": "initializeVersionChecksumBytesFromBytes(VersionChecksumBytes * self,uint8_t * bytes,uint32_t size,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))", "parent": 328, "children": [331, 332], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 174}}, {"id": 331, "type": "identifier", "text": "initializeVersionChecksumBytesFromBytes", "parent": 330, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 47}}, {"id": 332, "type": "parameter_list", "text": "(VersionChecksumBytes * self,uint8_t * bytes,uint32_t size,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))", "parent": 330, "children": [333, 338, 343, 346, 349], "start_point": {"row": 78, "column": 47}, "end_point": {"row": 78, "column": 174}}, {"id": 333, "type": "parameter_declaration", "text": "VersionChecksumBytes * self", "parent": 332, "children": [334, 335], "start_point": {"row": 78, "column": 48}, "end_point": {"row": 78, "column": 75}}, {"id": 334, "type": "type_identifier", "text": "VersionChecksumBytes", "parent": 333, "children": [], "start_point": {"row": 78, "column": 48}, "end_point": {"row": 78, "column": 68}}, {"id": 335, "type": "pointer_declarator", "text": "* self", "parent": 333, "children": [336, 337], "start_point": {"row": 78, "column": 69}, "end_point": {"row": 78, "column": 75}}, {"id": 336, "type": "*", "text": "*", "parent": 335, "children": [], "start_point": {"row": 78, "column": 69}, "end_point": {"row": 78, "column": 70}}, {"id": 337, "type": "identifier", "text": "self", "parent": 335, "children": [], "start_point": {"row": 78, "column": 71}, "end_point": {"row": 78, "column": 75}}, {"id": 338, "type": "parameter_declaration", "text": "uint8_t * bytes", "parent": 332, "children": [339, 340], "start_point": {"row": 78, "column": 76}, "end_point": {"row": 78, "column": 91}}, {"id": 339, "type": "primitive_type", "text": "uint8_t", "parent": 338, "children": [], "start_point": {"row": 78, "column": 76}, "end_point": {"row": 78, "column": 83}}, {"id": 340, "type": "pointer_declarator", "text": "* bytes", "parent": 338, "children": [341, 342], "start_point": {"row": 78, "column": 84}, "end_point": {"row": 78, "column": 91}}, {"id": 341, "type": "*", "text": "*", "parent": 340, "children": [], "start_point": {"row": 78, "column": 84}, "end_point": {"row": 78, "column": 85}}, {"id": 342, "type": "identifier", "text": "bytes", "parent": 340, "children": [], "start_point": {"row": 78, "column": 86}, "end_point": {"row": 78, "column": 91}}, {"id": 343, "type": "parameter_declaration", "text": "uint32_t size", "parent": 332, "children": [344, 345], "start_point": {"row": 78, "column": 92}, "end_point": {"row": 78, "column": 105}}, {"id": 344, "type": "primitive_type", "text": "uint32_t", "parent": 343, "children": [], "start_point": {"row": 78, "column": 92}, "end_point": {"row": 78, "column": 100}}, {"id": 345, "type": "identifier", "text": "size", "parent": 343, "children": [], "start_point": {"row": 78, "column": 101}, "end_point": {"row": 78, "column": 105}}, {"id": 346, "type": "parameter_declaration", "text": "uint8_t cacheString", "parent": 332, "children": [347, 348], "start_point": {"row": 78, "column": 106}, "end_point": {"row": 78, "column": 125}}, {"id": 347, "type": "primitive_type", "text": "uint8_t", "parent": 346, "children": [], "start_point": {"row": 78, "column": 106}, "end_point": {"row": 78, "column": 113}}, {"id": 348, "type": "identifier", "text": "cacheString", "parent": 346, "children": [], "start_point": {"row": 78, "column": 114}, "end_point": {"row": 78, "column": 125}}, {"id": 349, "type": "parameter_declaration", "text": "void (*onErrorReceived)(Error error,char *,...)", "parent": 332, "children": [350, 351], "start_point": {"row": 78, "column": 126}, "end_point": {"row": 78, "column": 173}}, {"id": 350, "type": "primitive_type", "text": "void", "parent": 349, "children": [], "start_point": {"row": 78, "column": 126}, "end_point": {"row": 78, "column": 130}}, {"id": 351, "type": "function_declarator", "text": "(*onErrorReceived)(Error error,char *,...)", "parent": 349, "children": [352, 356], "start_point": {"row": 78, "column": 131}, "end_point": {"row": 78, "column": 173}}, {"id": 352, "type": "parenthesized_declarator", "text": "(*onErrorReceived)", "parent": 351, "children": [353], "start_point": {"row": 78, "column": 131}, "end_point": {"row": 78, "column": 149}}, {"id": 353, "type": "pointer_declarator", "text": "*onErrorReceived", "parent": 352, "children": [354, 355], "start_point": {"row": 78, "column": 132}, "end_point": {"row": 78, "column": 148}}, {"id": 354, "type": "*", "text": "*", "parent": 353, "children": [], "start_point": {"row": 78, "column": 132}, "end_point": {"row": 78, "column": 133}}, {"id": 355, "type": "identifier", "text": "onErrorReceived", "parent": 353, "children": [], "start_point": {"row": 78, "column": 133}, "end_point": {"row": 78, "column": 148}}, {"id": 356, "type": "parameter_list", "text": "(Error error,char *,...)", "parent": 351, "children": [357, 360], "start_point": {"row": 78, "column": 149}, "end_point": {"row": 78, "column": 173}}, {"id": 357, "type": "parameter_declaration", "text": "Error error", "parent": 356, "children": [358, 359], "start_point": {"row": 78, "column": 150}, "end_point": {"row": 78, "column": 161}}, {"id": 358, "type": "type_identifier", "text": "Error", "parent": 357, "children": [], "start_point": {"row": 78, "column": 150}, "end_point": {"row": 78, "column": 155}}, {"id": 359, "type": "identifier", "text": "error", "parent": 357, "children": [], "start_point": {"row": 78, "column": 156}, "end_point": {"row": 78, "column": 161}}, {"id": 360, "type": "parameter_declaration", "text": "char *", "parent": 356, "children": [361, 362], "start_point": {"row": 78, "column": 162}, "end_point": {"row": 78, "column": 168}}, {"id": 361, "type": "primitive_type", "text": "char", "parent": 360, "children": [], "start_point": {"row": 78, "column": 162}, "end_point": {"row": 78, "column": 166}}, {"id": 362, "type": "abstract_pointer_declarator", "text": "*", "parent": 360, "children": [363], "start_point": {"row": 78, "column": 167}, "end_point": {"row": 78, "column": 168}}, {"id": 363, "type": "*", "text": "*", "parent": 362, "children": [], "start_point": {"row": 78, "column": 167}, "end_point": {"row": 78, "column": 168}}, {"id": 364, "type": "assignment_expression", "text": "self->cacheString = cacheString", "parent": 328, "children": [365, 368, 369], "start_point": {"row": 78, "column": 176}, "end_point": {"row": 78, "column": 207}}, {"id": 365, "type": "field_expression", "text": "self->cacheString", "parent": 364, "children": [366, 367], "start_point": {"row": 78, "column": 176}, "end_point": {"row": 78, "column": 193}}, {"id": 366, "type": "identifier", "text": "self", "parent": 365, "children": [], "start_point": {"row": 78, "column": 176}, "end_point": {"row": 78, "column": 180}}, {"id": 367, "type": "field_identifier", "text": "cacheString", "parent": 365, "children": [], "start_point": {"row": 78, "column": 182}, "end_point": {"row": 78, "column": 193}}, {"id": 368, "type": "=", "text": "=", "parent": 364, "children": [], "start_point": {"row": 78, "column": 194}, "end_point": {"row": 78, "column": 195}}, {"id": 369, "type": "identifier", "text": "cacheString", "parent": 364, "children": [], "start_point": {"row": 78, "column": 196}, "end_point": {"row": 78, "column": 207}}, {"id": 370, "type": "assignment_expression", "text": "self->cachedString = NULL", "parent": 328, "children": [371, 374, 375], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 26}}, {"id": 371, "type": "field_expression", "text": "self->cachedString", "parent": 370, "children": [372, 373], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 19}}, {"id": 372, "type": "identifier", "text": "self", "parent": 371, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 5}}, {"id": 373, "type": "field_identifier", "text": "cachedString", "parent": 371, "children": [], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 19}}, {"id": 374, "type": "=", "text": "=", "parent": 370, "children": [], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 21}}, {"id": 375, "type": "null", "text": "NULL", "parent": 370, "children": [376], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 26}}, {"id": 376, "type": "NULL", "text": "NULL", "parent": 375, "children": [], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 26}}, {"id": 377, "type": "if_statement", "text": "if (! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)){\n\t\treturn FALSE;\n\t}", "parent": 328, "children": [378], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 82, "column": 2}}, {"id": 378, "type": "parenthesized_expression", "text": "(! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived))", "parent": 377, "children": [379], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 88}}, {"id": 379, "type": "unary_expression", "text": "! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)", "parent": 378, "children": [380, 381], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 87}}, {"id": 380, "type": "!", "text": "!", "parent": 379, "children": [], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 6}}, {"id": 381, "type": "call_expression", "text": "initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)", "parent": 379, "children": [382, 383], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 87}}, {"id": 382, "type": "identifier", "text": "initializeNewByteArrayFromData", "parent": 381, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 37}}, {"id": 383, "type": "argument_list", "text": "(getByteArray(self), bytes, size, onErrorReceived)", "parent": 381, "children": [384, 388, 389, 390], "start_point": {"row": 80, "column": 37}, "end_point": {"row": 80, "column": 87}}, {"id": 384, "type": "call_expression", "text": "getByteArray(self)", "parent": 383, "children": [385, 386], "start_point": {"row": 80, "column": 38}, "end_point": {"row": 80, "column": 56}}, {"id": 385, "type": "identifier", "text": "getByteArray", "parent": 384, "children": [], "start_point": {"row": 80, "column": 38}, "end_point": {"row": 80, "column": 50}}, {"id": 386, "type": "argument_list", "text": "(self)", "parent": 384, "children": [387], "start_point": {"row": 80, "column": 50}, "end_point": {"row": 80, "column": 56}}, {"id": 387, "type": "identifier", "text": "self", "parent": 386, "children": [], "start_point": {"row": 80, "column": 51}, "end_point": {"row": 80, "column": 55}}, {"id": 388, "type": "identifier", "text": "bytes", "parent": 383, "children": [], "start_point": {"row": 80, "column": 58}, "end_point": {"row": 80, "column": 63}}, {"id": 389, "type": "identifier", "text": "size", "parent": 383, "children": [], "start_point": {"row": 80, "column": 65}, "end_point": {"row": 80, "column": 69}}, {"id": 390, "type": "identifier", "text": "onErrorReceived", "parent": 383, "children": [], "start_point": {"row": 80, "column": 71}, "end_point": {"row": 80, "column": 86}}, {"id": 391, "type": "return_statement", "text": "return FALSE;", "parent": 377, "children": [392], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 15}}, {"id": 392, "type": "false", "text": "FALSE", "parent": 391, "children": [], "start_point": {"row": 81, "column": 9}, "end_point": {"row": 81, "column": 14}}, {"id": 393, "type": "return_statement", "text": "return TRUE;", "parent": 328, "children": [394], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 13}}, {"id": 394, "type": "true", "text": "TRUE", "parent": 393, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 12}}, {"id": 395, "type": "function_definition", "text": "VersionChecksumBytes * getVersionChecksumBytes(void * self)\n{\n\tassert(self!=NULL);\n\n\treturn self;\n}", "parent": null, "children": [396, 397], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 93, "column": 1}}, {"id": 396, "type": "type_identifier", "text": "VersionChecksumBytes", "parent": 395, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 20}}, {"id": 397, "type": "pointer_declarator", "text": "* getVersionChecksumBytes(void * self)", "parent": 395, "children": [398, 399], "start_point": {"row": 88, "column": 21}, "end_point": {"row": 88, "column": 59}}, {"id": 398, "type": "*", "text": "*", "parent": 397, "children": [], "start_point": {"row": 88, "column": 21}, "end_point": {"row": 88, "column": 22}}, {"id": 399, "type": "function_declarator", "text": "getVersionChecksumBytes(void * self)", "parent": 397, "children": [400, 401], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 59}}, {"id": 400, "type": "identifier", "text": "getVersionChecksumBytes", "parent": 399, "children": [], "start_point": {"row": 88, "column": 23}, "end_point": {"row": 88, "column": 46}}, {"id": 401, "type": "parameter_list", "text": "(void * self)", "parent": 399, "children": [402], "start_point": {"row": 88, "column": 46}, "end_point": {"row": 88, "column": 59}}, {"id": 402, "type": "parameter_declaration", "text": "void * self", "parent": 401, "children": [403, 404], "start_point": {"row": 88, "column": 47}, "end_point": {"row": 88, "column": 58}}, {"id": 403, "type": "primitive_type", "text": "void", "parent": 402, "children": [], "start_point": {"row": 88, "column": 47}, "end_point": {"row": 88, "column": 51}}, {"id": 404, "type": "pointer_declarator", "text": "* self", "parent": 402, "children": [405, 406], "start_point": {"row": 88, "column": 52}, "end_point": {"row": 88, "column": 58}}, {"id": 405, "type": "*", "text": "*", "parent": 404, "children": [], "start_point": {"row": 88, "column": 52}, "end_point": {"row": 88, "column": 53}}, {"id": 406, "type": "identifier", "text": "self", "parent": 404, "children": [], "start_point": {"row": 88, "column": 54}, "end_point": {"row": 88, "column": 58}}, {"id": 407, "type": "call_expression", "text": "assert(self!=NULL)", "parent": 395, "children": [408, 409], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 19}}, {"id": 408, "type": "identifier", "text": "assert", "parent": 407, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 7}}, {"id": 409, "type": "argument_list", "text": "(self!=NULL)", "parent": 407, "children": [410], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 19}}, {"id": 410, "type": "binary_expression", "text": "self!=NULL", "parent": 409, "children": [411, 412, 413], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 18}}, {"id": 411, "type": "identifier", "text": "self", "parent": 410, "children": [], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 12}}, {"id": 412, "type": "!=", "text": "!=", "parent": 410, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 14}}, {"id": 413, "type": "null", "text": "NULL", "parent": 410, "children": [414], "start_point": {"row": 90, "column": 14}, "end_point": {"row": 90, "column": 18}}, {"id": 414, "type": "NULL", "text": "NULL", "parent": 413, "children": [], "start_point": {"row": 90, "column": 14}, "end_point": {"row": 90, "column": 18}}, {"id": 415, "type": "return_statement", "text": "return self;", "parent": 395, "children": [416], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 13}}, {"id": 416, "type": "identifier", "text": "self", "parent": 415, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 12}}, {"id": 417, "type": "function_definition", "text": "void destroyVersionChecksumBytes(void * vself){\n\tVersionChecksumBytes * self = vself;\n\tif (self->cachedString){\n\t\tdecrementReferenceCount(self->cachedString);\n\t}\n\tdestroyByteArray(getByteArray(self));\n}", "parent": null, "children": [418, 419], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 103, "column": 1}}, {"id": 418, "type": "primitive_type", "text": "void", "parent": 417, "children": [], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 4}}, {"id": 419, "type": "function_declarator", "text": "destroyVersionChecksumBytes(void * vself)", "parent": 417, "children": [420, 421], "start_point": {"row": 97, "column": 5}, "end_point": {"row": 97, "column": 46}}, {"id": 420, "type": "identifier", "text": "destroyVersionChecksumBytes", "parent": 419, "children": [], "start_point": {"row": 97, "column": 5}, "end_point": {"row": 97, "column": 32}}, {"id": 421, "type": "parameter_list", "text": "(void * vself)", "parent": 419, "children": [422], "start_point": {"row": 97, "column": 32}, "end_point": {"row": 97, "column": 46}}, {"id": 422, "type": "parameter_declaration", "text": "void * vself", "parent": 421, "children": [423, 424], "start_point": {"row": 97, "column": 33}, "end_point": {"row": 97, "column": 45}}, {"id": 423, "type": "primitive_type", "text": "void", "parent": 422, "children": [], "start_point": {"row": 97, "column": 33}, "end_point": {"row": 97, "column": 37}}, {"id": 424, "type": "pointer_declarator", "text": "* vself", "parent": 422, "children": [425, 426], "start_point": {"row": 97, "column": 38}, "end_point": {"row": 97, "column": 45}}, {"id": 425, "type": "*", "text": "*", "parent": 424, "children": [], "start_point": {"row": 97, "column": 38}, "end_point": {"row": 97, "column": 39}}, {"id": 426, "type": "identifier", "text": "vself", "parent": 424, "children": [], "start_point": {"row": 97, "column": 40}, "end_point": {"row": 97, "column": 45}}, {"id": 427, "type": "declaration", "text": "VersionChecksumBytes * self = vself;", "parent": 417, "children": [428, 429], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 37}}, {"id": 428, "type": "type_identifier", "text": "VersionChecksumBytes", "parent": 427, "children": [], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 21}}, {"id": 429, "type": "init_declarator", "text": "* self = vself", "parent": 427, "children": [430, 433, 434], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 36}}, {"id": 430, "type": "pointer_declarator", "text": "* self", "parent": 429, "children": [431, 432], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 28}}, {"id": 431, "type": "*", "text": "*", "parent": 430, "children": [], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 23}}, {"id": 432, "type": "identifier", "text": "self", "parent": 430, "children": [], "start_point": {"row": 98, "column": 24}, "end_point": {"row": 98, "column": 28}}, {"id": 433, "type": "=", "text": "=", "parent": 429, "children": [], "start_point": {"row": 98, "column": 29}, "end_point": {"row": 98, "column": 30}}, {"id": 434, "type": "identifier", "text": "vself", "parent": 429, "children": [], "start_point": {"row": 98, "column": 31}, "end_point": {"row": 98, "column": 36}}, {"id": 435, "type": "if_statement", "text": "if (self->cachedString){\n\t\tdecrementReferenceCount(self->cachedString);\n\t}", "parent": 417, "children": [436], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 101, "column": 2}}, {"id": 436, "type": "parenthesized_expression", "text": "(self->cachedString)", "parent": 435, "children": [437], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 24}}, {"id": 437, "type": "field_expression", "text": "self->cachedString", "parent": 436, "children": [438, 439], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 99, "column": 23}}, {"id": 438, "type": "identifier", "text": "self", "parent": 437, "children": [], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 99, "column": 9}}, {"id": 439, "type": "field_identifier", "text": "cachedString", "parent": 437, "children": [], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 23}}, {"id": 440, "type": "call_expression", "text": "decrementReferenceCount(self->cachedString)", "parent": 435, "children": [441, 442], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 45}}, {"id": 441, "type": "identifier", "text": "decrementReferenceCount", "parent": 440, "children": [], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 25}}, {"id": 442, "type": "argument_list", "text": "(self->cachedString)", "parent": 440, "children": [443], "start_point": {"row": 100, "column": 25}, "end_point": {"row": 100, "column": 45}}, {"id": 443, "type": "field_expression", "text": "self->cachedString", "parent": 442, "children": [444, 445], "start_point": {"row": 100, "column": 26}, "end_point": {"row": 100, "column": 44}}, {"id": 444, "type": "identifier", "text": "self", "parent": 443, "children": [], "start_point": {"row": 100, "column": 26}, "end_point": {"row": 100, "column": 30}}, {"id": 445, "type": "field_identifier", "text": "cachedString", "parent": 443, "children": [], "start_point": {"row": 100, "column": 32}, "end_point": {"row": 100, "column": 44}}, {"id": 446, "type": "call_expression", "text": "destroyByteArray(getByteArray(self))", "parent": 417, "children": [447, 448], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 37}}, {"id": 447, "type": "identifier", "text": "destroyByteArray", "parent": 446, "children": [], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 17}}, {"id": 448, "type": "argument_list", "text": "(getByteArray(self))", "parent": 446, "children": [449], "start_point": {"row": 102, "column": 17}, "end_point": {"row": 102, "column": 37}}, {"id": 449, "type": "call_expression", "text": "getByteArray(self)", "parent": 448, "children": [450, 451], "start_point": {"row": 102, "column": 18}, "end_point": {"row": 102, "column": 36}}, {"id": 450, "type": "identifier", "text": "getByteArray", "parent": 449, "children": [], "start_point": {"row": 102, "column": 18}, "end_point": {"row": 102, "column": 30}}, {"id": 451, "type": "argument_list", "text": "(self)", "parent": 449, "children": [452], "start_point": {"row": 102, "column": 30}, "end_point": {"row": 102, "column": 36}}, {"id": 452, "type": "identifier", "text": "self", "parent": 451, "children": [], "start_point": {"row": 102, "column": 31}, "end_point": {"row": 102, "column": 35}}, {"id": 453, "type": "function_definition", "text": "uint8_t getNetVersionByteForVersionChecksumBytes(VersionChecksumBytes * self){\n\n\treturn getByteFromByteArray(getByteArray(self), 0);\n}", "parent": null, "children": [454, 455], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 110, "column": 1}}, {"id": 454, "type": "primitive_type", "text": "uint8_t", "parent": 453, "children": [], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 7}}, {"id": 455, "type": "function_declarator", "text": "getNetVersionByteForVersionChecksumBytes(VersionChecksumBytes * self)", "parent": 453, "children": [456, 457], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 77}}, {"id": 456, "type": "identifier", "text": "getNetVersionByteForVersionChecksumBytes", "parent": 455, "children": [], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 48}}, {"id": 457, "type": "parameter_list", "text": "(VersionChecksumBytes * self)", "parent": 455, "children": [458], "start_point": {"row": 107, "column": 48}, "end_point": {"row": 107, "column": 77}}, {"id": 458, "type": "parameter_declaration", "text": "VersionChecksumBytes * self", "parent": 457, "children": [459, 460], "start_point": {"row": 107, "column": 49}, "end_point": {"row": 107, "column": 76}}, {"id": 459, "type": "type_identifier", "text": "VersionChecksumBytes", "parent": 458, "children": [], "start_point": {"row": 107, "column": 49}, "end_point": {"row": 107, "column": 69}}, {"id": 460, "type": "pointer_declarator", "text": "* self", "parent": 458, "children": [461, 462], "start_point": {"row": 107, "column": 70}, "end_point": {"row": 107, "column": 76}}, {"id": 461, "type": "*", "text": "*", "parent": 460, "children": [], "start_point": {"row": 107, "column": 70}, "end_point": {"row": 107, "column": 71}}, {"id": 462, "type": "identifier", "text": "self", "parent": 460, "children": [], "start_point": {"row": 107, "column": 72}, "end_point": {"row": 107, "column": 76}}, {"id": 463, "type": "return_statement", "text": "return getByteFromByteArray(getByteArray(self), 0);", "parent": 453, "children": [464], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 52}}, {"id": 464, "type": "call_expression", "text": "getByteFromByteArray(getByteArray(self), 0)", "parent": 463, "children": [465, 466], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 51}}, {"id": 465, "type": "identifier", "text": "getByteFromByteArray", "parent": 464, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 28}}, {"id": 466, "type": "argument_list", "text": "(getByteArray(self), 0)", "parent": 464, "children": [467, 471], "start_point": {"row": 109, "column": 28}, "end_point": {"row": 109, "column": 51}}, {"id": 467, "type": "call_expression", "text": "getByteArray(self)", "parent": 466, "children": [468, 469], "start_point": {"row": 109, "column": 29}, "end_point": {"row": 109, "column": 47}}, {"id": 468, "type": "identifier", "text": "getByteArray", "parent": 467, "children": [], "start_point": {"row": 109, "column": 29}, "end_point": {"row": 109, "column": 41}}, {"id": 469, "type": "argument_list", "text": "(self)", "parent": 467, "children": [470], "start_point": {"row": 109, "column": 41}, "end_point": {"row": 109, "column": 47}}, {"id": 470, "type": "identifier", "text": "self", "parent": 469, "children": [], "start_point": {"row": 109, "column": 42}, "end_point": {"row": 109, "column": 46}}, {"id": 471, "type": "number_literal", "text": "0", "parent": 466, "children": [], "start_point": {"row": 109, "column": 49}, "end_point": {"row": 109, "column": 50}}, {"id": 472, "type": "function_definition", "text": "ByteArray * getStringForVersionChecksumBytes(VersionChecksumBytes * self){\n\tif (self->cachedString) {\n\t\tincrementReferenceCount(self->cachedString);\n\t\treturn self->cachedString;\n\t} else {\n\t\treverseBytes(getByteArray(self));\n\n\t\tBigInt bytes;\n\t\tBigIntAlloc(&bytes, getByteArray(self)->length);\n\t\tbytes.length = getByteArray(self)->length;\n\t\tmemcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);\n\n\t\tchar * string = encodeBase58(bytes.data,bytes.length);\n\n\t\tif (! string){\n\t\t\treturn NULL;\n\t\t}\n\t\tByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);\n\t\tif (! str) {\n\t\t\tfree(string);\n\t\t\treturn NULL;\n\t\t}\n\t\treverseBytes(getByteArray(self));\n\t\tif (self->cacheString) {\n\t\t\tself->cachedString = str;\n\t\t\tincrementReferenceCount(str);\n\t\t}\n\n\t\treturn str;\n\t}\n}", "parent": null, "children": [473, 474], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 142, "column": 1}}, {"id": 473, "type": "type_identifier", "text": "ByteArray", "parent": 472, "children": [], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 112, "column": 9}}, {"id": 474, "type": "pointer_declarator", "text": "* getStringForVersionChecksumBytes(VersionChecksumBytes * self)", "parent": 472, "children": [475, 476], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 73}}, {"id": 475, "type": "*", "text": "*", "parent": 474, "children": [], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 11}}, {"id": 476, "type": "function_declarator", "text": "getStringForVersionChecksumBytes(VersionChecksumBytes * self)", "parent": 474, "children": [477, 478], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 73}}, {"id": 477, "type": "identifier", "text": "getStringForVersionChecksumBytes", "parent": 476, "children": [], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 44}}, {"id": 478, "type": "parameter_list", "text": "(VersionChecksumBytes * self)", "parent": 476, "children": [479], "start_point": {"row": 112, "column": 44}, "end_point": {"row": 112, "column": 73}}, {"id": 479, "type": "parameter_declaration", "text": "VersionChecksumBytes * self", "parent": 478, "children": [480, 481], "start_point": {"row": 112, "column": 45}, "end_point": {"row": 112, "column": 72}}, {"id": 480, "type": "type_identifier", "text": "VersionChecksumBytes", "parent": 479, "children": [], "start_point": {"row": 112, "column": 45}, "end_point": {"row": 112, "column": 65}}, {"id": 481, "type": "pointer_declarator", "text": "* self", "parent": 479, "children": [482, 483], "start_point": {"row": 112, "column": 66}, "end_point": {"row": 112, "column": 72}}, {"id": 482, "type": "*", "text": "*", "parent": 481, "children": [], "start_point": {"row": 112, "column": 66}, "end_point": {"row": 112, "column": 67}}, {"id": 483, "type": "identifier", "text": "self", "parent": 481, "children": [], "start_point": {"row": 112, "column": 68}, "end_point": {"row": 112, "column": 72}}, {"id": 484, "type": "if_statement", "text": "if (self->cachedString) {\n\t\tincrementReferenceCount(self->cachedString);\n\t\treturn self->cachedString;\n\t} else {\n\t\treverseBytes(getByteArray(self));\n\n\t\tBigInt bytes;\n\t\tBigIntAlloc(&bytes, getByteArray(self)->length);\n\t\tbytes.length = getByteArray(self)->length;\n\t\tmemcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);\n\n\t\tchar * string = encodeBase58(bytes.data,bytes.length);\n\n\t\tif (! string){\n\t\t\treturn NULL;\n\t\t}\n\t\tByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);\n\t\tif (! str) {\n\t\t\tfree(string);\n\t\t\treturn NULL;\n\t\t}\n\t\treverseBytes(getByteArray(self));\n\t\tif (self->cacheString) {\n\t\t\tself->cachedString = str;\n\t\t\tincrementReferenceCount(str);\n\t\t}\n\n\t\treturn str;\n\t}", "parent": 472, "children": [485, 499], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 141, "column": 2}}, {"id": 485, "type": "parenthesized_expression", "text": "(self->cachedString)", "parent": 484, "children": [486], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 24}}, {"id": 486, "type": "field_expression", "text": "self->cachedString", "parent": 485, "children": [487, 488], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 23}}, {"id": 487, "type": "identifier", "text": "self", "parent": 486, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 9}}, {"id": 488, "type": "field_identifier", "text": "cachedString", "parent": 486, "children": [], "start_point": {"row": 113, "column": 11}, "end_point": {"row": 113, "column": 23}}, {"id": 489, "type": "call_expression", "text": "incrementReferenceCount(self->cachedString)", "parent": 484, "children": [490, 491], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 45}}, {"id": 490, "type": "identifier", "text": "incrementReferenceCount", "parent": 489, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 25}}, {"id": 491, "type": "argument_list", "text": "(self->cachedString)", "parent": 489, "children": [492], "start_point": {"row": 114, "column": 25}, "end_point": {"row": 114, "column": 45}}, {"id": 492, "type": "field_expression", "text": "self->cachedString", "parent": 491, "children": [493, 494], "start_point": {"row": 114, "column": 26}, "end_point": {"row": 114, "column": 44}}, {"id": 493, "type": "identifier", "text": "self", "parent": 492, "children": [], "start_point": {"row": 114, "column": 26}, "end_point": {"row": 114, "column": 30}}, {"id": 494, "type": "field_identifier", "text": "cachedString", "parent": 492, "children": [], "start_point": {"row": 114, "column": 32}, "end_point": {"row": 114, "column": 44}}, {"id": 495, "type": "return_statement", "text": "return self->cachedString;", "parent": 484, "children": [496], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 28}}, {"id": 496, "type": "field_expression", "text": "self->cachedString", "parent": 495, "children": [497, 498], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 27}}, {"id": 497, "type": "identifier", "text": "self", "parent": 496, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 13}}, {"id": 498, "type": "field_identifier", "text": "cachedString", "parent": 496, "children": [], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 27}}, {"id": 499, "type": "else_clause", "text": "else {\n\t\treverseBytes(getByteArray(self));\n\n\t\tBigInt bytes;\n\t\tBigIntAlloc(&bytes, getByteArray(self)->length);\n\t\tbytes.length = getByteArray(self)->length;\n\t\tmemcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);\n\n\t\tchar * string = encodeBase58(bytes.data,bytes.length);\n\n\t\tif (! string){\n\t\t\treturn NULL;\n\t\t}\n\t\tByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);\n\t\tif (! str) {\n\t\t\tfree(string);\n\t\t\treturn NULL;\n\t\t}\n\t\treverseBytes(getByteArray(self));\n\t\tif (self->cacheString) {\n\t\t\tself->cachedString = str;\n\t\t\tincrementReferenceCount(str);\n\t\t}\n\n\t\treturn str;\n\t}", "parent": 484, "children": [], "start_point": {"row": 116, "column": 3}, "end_point": {"row": 141, "column": 2}}, {"id": 500, "type": "call_expression", "text": "reverseBytes(getByteArray(self))", "parent": 499, "children": [501, 502], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 34}}, {"id": 501, "type": "identifier", "text": "reverseBytes", "parent": 500, "children": [], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 14}}, {"id": 502, "type": "argument_list", "text": "(getByteArray(self))", "parent": 500, "children": [503], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 34}}, {"id": 503, "type": "call_expression", "text": "getByteArray(self)", "parent": 502, "children": [504, 505], "start_point": {"row": 117, "column": 15}, "end_point": {"row": 117, "column": 33}}, {"id": 504, "type": "identifier", "text": "getByteArray", "parent": 503, "children": [], "start_point": {"row": 117, "column": 15}, "end_point": {"row": 117, "column": 27}}, {"id": 505, "type": "argument_list", "text": "(self)", "parent": 503, "children": [506], "start_point": {"row": 117, "column": 27}, "end_point": {"row": 117, "column": 33}}, {"id": 506, "type": "identifier", "text": "self", "parent": 505, "children": [], "start_point": {"row": 117, "column": 28}, "end_point": {"row": 117, "column": 32}}, {"id": 507, "type": "declaration", "text": "BigInt bytes;", "parent": 499, "children": [508, 509], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 119, "column": 15}}, {"id": 508, "type": "type_identifier", "text": "BigInt", "parent": 507, "children": [], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 119, "column": 8}}, {"id": 509, "type": "identifier", "text": "bytes", "parent": 507, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 14}}, {"id": 510, "type": "call_expression", "text": "BigIntAlloc(&bytes, getByteArray(self)->length)", "parent": 499, "children": [511, 512], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 49}}, {"id": 511, "type": "identifier", "text": "BigIntAlloc", "parent": 510, "children": [], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 13}}, {"id": 512, "type": "argument_list", "text": "(&bytes, getByteArray(self)->length)", "parent": 510, "children": [513, 515], "start_point": {"row": 120, "column": 13}, "end_point": {"row": 120, "column": 49}}, {"id": 513, "type": "pointer_expression", "text": "&bytes", "parent": 512, "children": [514], "start_point": {"row": 120, "column": 14}, "end_point": {"row": 120, "column": 20}}, {"id": 514, "type": "identifier", "text": "bytes", "parent": 513, "children": [], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 20}}, {"id": 515, "type": "field_expression", "text": "getByteArray(self)->length", "parent": 512, "children": [516, 520], "start_point": {"row": 120, "column": 22}, "end_point": {"row": 120, "column": 48}}, {"id": 516, "type": "call_expression", "text": "getByteArray(self)", "parent": 515, "children": [517, 518], "start_point": {"row": 120, "column": 22}, "end_point": {"row": 120, "column": 40}}, {"id": 517, "type": "identifier", "text": "getByteArray", "parent": 516, "children": [], "start_point": {"row": 120, "column": 22}, "end_point": {"row": 120, "column": 34}}, {"id": 518, "type": "argument_list", "text": "(self)", "parent": 516, "children": [519], "start_point": {"row": 120, "column": 34}, "end_point": {"row": 120, "column": 40}}, {"id": 519, "type": "identifier", "text": "self", "parent": 518, "children": [], "start_point": {"row": 120, "column": 35}, "end_point": {"row": 120, "column": 39}}, {"id": 520, "type": "field_identifier", "text": "length", "parent": 515, "children": [], "start_point": {"row": 120, "column": 42}, "end_point": {"row": 120, "column": 48}}, {"id": 521, "type": "assignment_expression", "text": "bytes.length = getByteArray(self)->length", "parent": 499, "children": [522, 525, 526], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 43}}, {"id": 522, "type": "field_expression", "text": "bytes.length", "parent": 521, "children": [523, 524], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 14}}, {"id": 523, "type": "identifier", "text": "bytes", "parent": 522, "children": [], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 7}}, {"id": 524, "type": "field_identifier", "text": "length", "parent": 522, "children": [], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 14}}, {"id": 525, "type": "=", "text": "=", "parent": 521, "children": [], "start_point": {"row": 121, "column": 15}, "end_point": {"row": 121, "column": 16}}, {"id": 526, "type": "field_expression", "text": "getByteArray(self)->length", "parent": 521, "children": [527, 531], "start_point": {"row": 121, "column": 17}, "end_point": {"row": 121, "column": 43}}, {"id": 527, "type": "call_expression", "text": "getByteArray(self)", "parent": 526, "children": [528, 529], "start_point": {"row": 121, "column": 17}, "end_point": {"row": 121, "column": 35}}, {"id": 528, "type": "identifier", "text": "getByteArray", "parent": 527, "children": [], "start_point": {"row": 121, "column": 17}, "end_point": {"row": 121, "column": 29}}, {"id": 529, "type": "argument_list", "text": "(self)", "parent": 527, "children": [530], "start_point": {"row": 121, "column": 29}, "end_point": {"row": 121, "column": 35}}, {"id": 530, "type": "identifier", "text": "self", "parent": 529, "children": [], "start_point": {"row": 121, "column": 30}, "end_point": {"row": 121, "column": 34}}, {"id": 531, "type": "field_identifier", "text": "length", "parent": 526, "children": [], "start_point": {"row": 121, "column": 37}, "end_point": {"row": 121, "column": 43}}, {"id": 532, "type": "call_expression", "text": "memcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length)", "parent": 499, "children": [533, 534], "start_point": {"row": 122, "column": 2}, "end_point": {"row": 122, "column": 72}}, {"id": 533, "type": "identifier", "text": "memcpy", "parent": 532, "children": [], "start_point": {"row": 122, "column": 2}, "end_point": {"row": 122, "column": 8}}, {"id": 534, "type": "argument_list", "text": "(bytes.data, getByteArrayData(getByteArray(self)), bytes.length)", "parent": 532, "children": [535, 538, 545], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 72}}, {"id": 535, "type": "field_expression", "text": "bytes.data", "parent": 534, "children": [536, 537], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 19}}, {"id": 536, "type": "identifier", "text": "bytes", "parent": 535, "children": [], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 14}}, {"id": 537, "type": "field_identifier", "text": "data", "parent": 535, "children": [], "start_point": {"row": 122, "column": 15}, "end_point": {"row": 122, "column": 19}}, {"id": 538, "type": "call_expression", "text": "getByteArrayData(getByteArray(self))", "parent": 534, "children": [539, 540], "start_point": {"row": 122, "column": 21}, "end_point": {"row": 122, "column": 57}}, {"id": 539, "type": "identifier", "text": "getByteArrayData", "parent": 538, "children": [], "start_point": {"row": 122, "column": 21}, "end_point": {"row": 122, "column": 37}}, {"id": 540, "type": "argument_list", "text": "(getByteArray(self))", "parent": 538, "children": [541], "start_point": {"row": 122, "column": 37}, "end_point": {"row": 122, "column": 57}}, {"id": 541, "type": "call_expression", "text": "getByteArray(self)", "parent": 540, "children": [542, 543], "start_point": {"row": 122, "column": 38}, "end_point": {"row": 122, "column": 56}}, {"id": 542, "type": "identifier", "text": "getByteArray", "parent": 541, "children": [], "start_point": {"row": 122, "column": 38}, "end_point": {"row": 122, "column": 50}}, {"id": 543, "type": "argument_list", "text": "(self)", "parent": 541, "children": [544], "start_point": {"row": 122, "column": 50}, "end_point": {"row": 122, "column": 56}}, {"id": 544, "type": "identifier", "text": "self", "parent": 543, "children": [], "start_point": {"row": 122, "column": 51}, "end_point": {"row": 122, "column": 55}}, {"id": 545, "type": "field_expression", "text": "bytes.length", "parent": 534, "children": [546, 547], "start_point": {"row": 122, "column": 59}, "end_point": {"row": 122, "column": 71}}, {"id": 546, "type": "identifier", "text": "bytes", "parent": 545, "children": [], "start_point": {"row": 122, "column": 59}, "end_point": {"row": 122, "column": 64}}, {"id": 547, "type": "field_identifier", "text": "length", "parent": 545, "children": [], "start_point": {"row": 122, "column": 65}, "end_point": {"row": 122, "column": 71}}, {"id": 548, "type": "declaration", "text": "char * string = encodeBase58(bytes.data,bytes.length);", "parent": 499, "children": [549, 550], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 56}}, {"id": 549, "type": "primitive_type", "text": "char", "parent": 548, "children": [], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 6}}, {"id": 550, "type": "init_declarator", "text": "* string = encodeBase58(bytes.data,bytes.length)", "parent": 548, "children": [551, 554, 555], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 55}}, {"id": 551, "type": "pointer_declarator", "text": "* string", "parent": 550, "children": [552, 553], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 15}}, {"id": 552, "type": "*", "text": "*", "parent": 551, "children": [], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 8}}, {"id": 553, "type": "identifier", "text": "string", "parent": 551, "children": [], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 15}}, {"id": 554, "type": "=", "text": "=", "parent": 550, "children": [], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 17}}, {"id": 555, "type": "call_expression", "text": "encodeBase58(bytes.data,bytes.length)", "parent": 550, "children": [556, 557], "start_point": {"row": 124, "column": 18}, "end_point": {"row": 124, "column": 55}}, {"id": 556, "type": "identifier", "text": "encodeBase58", "parent": 555, "children": [], "start_point": {"row": 124, "column": 18}, "end_point": {"row": 124, "column": 30}}, {"id": 557, "type": "argument_list", "text": "(bytes.data,bytes.length)", "parent": 555, "children": [558, 561], "start_point": {"row": 124, "column": 30}, "end_point": {"row": 124, "column": 55}}, {"id": 558, "type": "field_expression", "text": "bytes.data", "parent": 557, "children": [559, 560], "start_point": {"row": 124, "column": 31}, "end_point": {"row": 124, "column": 41}}, {"id": 559, "type": "identifier", "text": "bytes", "parent": 558, "children": [], "start_point": {"row": 124, "column": 31}, "end_point": {"row": 124, "column": 36}}, {"id": 560, "type": "field_identifier", "text": "data", "parent": 558, "children": [], "start_point": {"row": 124, "column": 37}, "end_point": {"row": 124, "column": 41}}, {"id": 561, "type": "field_expression", "text": "bytes.length", "parent": 557, "children": [562, 563], "start_point": {"row": 124, "column": 42}, "end_point": {"row": 124, "column": 54}}, {"id": 562, "type": "identifier", "text": "bytes", "parent": 561, "children": [], "start_point": {"row": 124, "column": 42}, "end_point": {"row": 124, "column": 47}}, {"id": 563, "type": "field_identifier", "text": "length", "parent": 561, "children": [], "start_point": {"row": 124, "column": 48}, "end_point": {"row": 124, "column": 54}}, {"id": 564, "type": "if_statement", "text": "if (! string){\n\t\t\treturn NULL;\n\t\t}", "parent": 499, "children": [565], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 128, "column": 3}}, {"id": 565, "type": "parenthesized_expression", "text": "(! string)", "parent": 564, "children": [566], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 15}}, {"id": 566, "type": "unary_expression", "text": "! string", "parent": 565, "children": [567, 568], "start_point": {"row": 126, "column": 6}, "end_point": {"row": 126, "column": 14}}, {"id": 567, "type": "!", "text": "!", "parent": 566, "children": [], "start_point": {"row": 126, "column": 6}, "end_point": {"row": 126, "column": 7}}, {"id": 568, "type": "identifier", "text": "string", "parent": 566, "children": [], "start_point": {"row": 126, "column": 8}, "end_point": {"row": 126, "column": 14}}, {"id": 569, "type": "return_statement", "text": "return NULL;", "parent": 564, "children": [570], "start_point": {"row": 127, "column": 3}, "end_point": {"row": 127, "column": 15}}, {"id": 570, "type": "null", "text": "NULL", "parent": 569, "children": [571], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 14}}, {"id": 571, "type": "NULL", "text": "NULL", "parent": 570, "children": [], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 14}}, {"id": 572, "type": "declaration", "text": "ByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);", "parent": 499, "children": [573, 574], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 100}}, {"id": 573, "type": "type_identifier", "text": "ByteArray", "parent": 572, "children": [], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 11}}, {"id": 574, "type": "init_declarator", "text": "* str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived)", "parent": 572, "children": [575, 578, 579], "start_point": {"row": 129, "column": 12}, "end_point": {"row": 129, "column": 99}}, {"id": 575, "type": "pointer_declarator", "text": "* str", "parent": 574, "children": [576, 577], "start_point": {"row": 129, "column": 12}, "end_point": {"row": 129, "column": 17}}, {"id": 576, "type": "*", "text": "*", "parent": 575, "children": [], "start_point": {"row": 129, "column": 12}, "end_point": {"row": 129, "column": 13}}, {"id": 577, "type": "identifier", "text": "str", "parent": 575, "children": [], "start_point": {"row": 129, "column": 14}, "end_point": {"row": 129, "column": 17}}, {"id": 578, "type": "=", "text": "=", "parent": 574, "children": [], "start_point": {"row": 129, "column": 18}, "end_point": {"row": 129, "column": 19}}, {"id": 579, "type": "call_expression", "text": "createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived)", "parent": 574, "children": [580, 581], "start_point": {"row": 129, "column": 20}, "end_point": {"row": 129, "column": 99}}, {"id": 580, "type": "identifier", "text": "createNewByteArrayFromString", "parent": 579, "children": [], "start_point": {"row": 129, "column": 20}, "end_point": {"row": 129, "column": 48}}, {"id": 581, "type": "argument_list", "text": "(string, TRUE, getByteArray(self)->onErrorReceived)", "parent": 579, "children": [582, 583, 584], "start_point": {"row": 129, "column": 48}, "end_point": {"row": 129, "column": 99}}, {"id": 582, "type": "identifier", "text": "string", "parent": 581, "children": [], "start_point": {"row": 129, "column": 49}, "end_point": {"row": 129, "column": 55}}, {"id": 583, "type": "true", "text": "TRUE", "parent": 581, "children": [], "start_point": {"row": 129, "column": 57}, "end_point": {"row": 129, "column": 61}}, {"id": 584, "type": "field_expression", "text": "getByteArray(self)->onErrorReceived", "parent": 581, "children": [585, 589], "start_point": {"row": 129, "column": 63}, "end_point": {"row": 129, "column": 98}}, {"id": 585, "type": "call_expression", "text": "getByteArray(self)", "parent": 584, "children": [586, 587], "start_point": {"row": 129, "column": 63}, "end_point": {"row": 129, "column": 81}}, {"id": 586, "type": "identifier", "text": "getByteArray", "parent": 585, "children": [], "start_point": {"row": 129, "column": 63}, "end_point": {"row": 129, "column": 75}}, {"id": 587, "type": "argument_list", "text": "(self)", "parent": 585, "children": [588], "start_point": {"row": 129, "column": 75}, "end_point": {"row": 129, "column": 81}}, {"id": 588, "type": "identifier", "text": "self", "parent": 587, "children": [], "start_point": {"row": 129, "column": 76}, "end_point": {"row": 129, "column": 80}}, {"id": 589, "type": "field_identifier", "text": "onErrorReceived", "parent": 584, "children": [], "start_point": {"row": 129, "column": 83}, "end_point": {"row": 129, "column": 98}}, {"id": 590, "type": "if_statement", "text": "if (! str) {\n\t\t\tfree(string);\n\t\t\treturn NULL;\n\t\t}", "parent": 499, "children": [591], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 133, "column": 3}}, {"id": 591, "type": "parenthesized_expression", "text": "(! str)", "parent": 590, "children": [592], "start_point": {"row": 130, "column": 5}, "end_point": {"row": 130, "column": 12}}, {"id": 592, "type": "unary_expression", "text": "! str", "parent": 591, "children": [593, 594], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 11}}, {"id": 593, "type": "!", "text": "!", "parent": 592, "children": [], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 7}}, {"id": 594, "type": "identifier", "text": "str", "parent": 592, "children": [], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 11}}, {"id": 595, "type": "call_expression", "text": "free(string)", "parent": 590, "children": [596, 597], "start_point": {"row": 131, "column": 3}, "end_point": {"row": 131, "column": 15}}, {"id": 596, "type": "identifier", "text": "free", "parent": 595, "children": [], "start_point": {"row": 131, "column": 3}, "end_point": {"row": 131, "column": 7}}, {"id": 597, "type": "argument_list", "text": "(string)", "parent": 595, "children": [598], "start_point": {"row": 131, "column": 7}, "end_point": {"row": 131, "column": 15}}, {"id": 598, "type": "identifier", "text": "string", "parent": 597, "children": [], "start_point": {"row": 131, "column": 8}, "end_point": {"row": 131, "column": 14}}, {"id": 599, "type": "return_statement", "text": "return NULL;", "parent": 590, "children": [600], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 15}}, {"id": 600, "type": "null", "text": "NULL", "parent": 599, "children": [601], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 14}}, {"id": 601, "type": "NULL", "text": "NULL", "parent": 600, "children": [], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 14}}, {"id": 602, "type": "call_expression", "text": "reverseBytes(getByteArray(self))", "parent": 499, "children": [603, 604], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 34}}, {"id": 603, "type": "identifier", "text": "reverseBytes", "parent": 602, "children": [], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 14}}, {"id": 604, "type": "argument_list", "text": "(getByteArray(self))", "parent": 602, "children": [605], "start_point": {"row": 134, "column": 14}, "end_point": {"row": 134, "column": 34}}, {"id": 605, "type": "call_expression", "text": "getByteArray(self)", "parent": 604, "children": [606, 607], "start_point": {"row": 134, "column": 15}, "end_point": {"row": 134, "column": 33}}, {"id": 606, "type": "identifier", "text": "getByteArray", "parent": 605, "children": [], "start_point": {"row": 134, "column": 15}, "end_point": {"row": 134, "column": 27}}, {"id": 607, "type": "argument_list", "text": "(self)", "parent": 605, "children": [608], "start_point": {"row": 134, "column": 27}, "end_point": {"row": 134, "column": 33}}, {"id": 608, "type": "identifier", "text": "self", "parent": 607, "children": [], "start_point": {"row": 134, "column": 28}, "end_point": {"row": 134, "column": 32}}, {"id": 609, "type": "if_statement", "text": "if (self->cacheString) {\n\t\t\tself->cachedString = str;\n\t\t\tincrementReferenceCount(str);\n\t\t}", "parent": 499, "children": [610], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 138, "column": 3}}, {"id": 610, "type": "parenthesized_expression", "text": "(self->cacheString)", "parent": 609, "children": [611], "start_point": {"row": 135, "column": 5}, "end_point": {"row": 135, "column": 24}}, {"id": 611, "type": "field_expression", "text": "self->cacheString", "parent": 610, "children": [612, 613], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 23}}, {"id": 612, "type": "identifier", "text": "self", "parent": 611, "children": [], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 10}}, {"id": 613, "type": "field_identifier", "text": "cacheString", "parent": 611, "children": [], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 23}}, {"id": 614, "type": "assignment_expression", "text": "self->cachedString = str", "parent": 609, "children": [615, 618, 619], "start_point": {"row": 136, "column": 3}, "end_point": {"row": 136, "column": 27}}, {"id": 615, "type": "field_expression", "text": "self->cachedString", "parent": 614, "children": [616, 617], "start_point": {"row": 136, "column": 3}, "end_point": {"row": 136, "column": 21}}, {"id": 616, "type": "identifier", "text": "self", "parent": 615, "children": [], "start_point": {"row": 136, "column": 3}, "end_point": {"row": 136, "column": 7}}, {"id": 617, "type": "field_identifier", "text": "cachedString", "parent": 615, "children": [], "start_point": {"row": 136, "column": 9}, "end_point": {"row": 136, "column": 21}}, {"id": 618, "type": "=", "text": "=", "parent": 614, "children": [], "start_point": {"row": 136, "column": 22}, "end_point": {"row": 136, "column": 23}}, {"id": 619, "type": "identifier", "text": "str", "parent": 614, "children": [], "start_point": {"row": 136, "column": 24}, "end_point": {"row": 136, "column": 27}}, {"id": 620, "type": "call_expression", "text": "incrementReferenceCount(str)", "parent": 609, "children": [621, 622], "start_point": {"row": 137, "column": 3}, "end_point": {"row": 137, "column": 31}}, {"id": 621, "type": "identifier", "text": "incrementReferenceCount", "parent": 620, "children": [], "start_point": {"row": 137, "column": 3}, "end_point": {"row": 137, "column": 26}}, {"id": 622, "type": "argument_list", "text": "(str)", "parent": 620, "children": [623], "start_point": {"row": 137, "column": 26}, "end_point": {"row": 137, "column": 31}}, {"id": 623, "type": "identifier", "text": "str", "parent": 622, "children": [], "start_point": {"row": 137, "column": 27}, "end_point": {"row": 137, "column": 30}}, {"id": 624, "type": "return_statement", "text": "return str;", "parent": 499, "children": [625], "start_point": {"row": 140, "column": 2}, "end_point": {"row": 140, "column": 13}}, {"id": 625, "type": "identifier", "text": "str", "parent": 624, "children": [], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 12}}]}, "node_categories": {"declarations": {"functions": [18, 22, 35, 109, 111, 129, 233, 237, 253, 328, 330, 351, 395, 399, 417, 419, 453, 455, 472, 476], "variables": [25, 30, 33, 41, 44, 48, 114, 119, 124, 127, 135, 138, 169, 240, 245, 248, 251, 259, 262, 266, 333, 338, 343, 346, 349, 357, 360, 402, 422, 427, 458, 479, 507, 548, 572], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [55, 58, 59, 60, 64, 65, 68, 74, 75, 76, 83, 84, 92, 93, 102, 143, 146, 151, 157, 164, 172, 175, 181, 184, 189, 195, 196, 197, 205, 206, 208, 211, 215, 218, 224, 227, 273, 276, 277, 278, 282, 283, 286, 292, 293, 294, 301, 302, 310, 311, 321, 365, 371, 378, 379, 381, 384, 407, 410, 436, 437, 440, 443, 446, 449, 464, 467, 485, 486, 489, 492, 496, 500, 503, 510, 513, 515, 516, 522, 526, 527, 532, 535, 538, 541, 545, 555, 558, 561, 565, 566, 579, 584, 585, 591, 592, 595, 602, 605, 610, 611, 615, 620], "assignments": [82, 145, 156, 163, 178, 300, 364, 370, 521, 614], "loops": [], "conditionals": [19, 23, 26, 29, 32, 39, 42, 43, 49, 53, 56, 62, 63, 67, 69, 71, 78, 85, 87, 88, 90, 91, 94, 96, 97, 98, 99, 101, 103, 105, 112, 115, 118, 120, 123, 126, 133, 136, 137, 142, 144, 147, 148, 150, 152, 154, 158, 159, 165, 166, 168, 170, 171, 173, 176, 179, 182, 190, 192, 193, 194, 198, 204, 209, 212, 214, 216, 217, 219, 220, 221, 225, 228, 230, 234, 238, 244, 247, 250, 257, 260, 261, 267, 271, 274, 280, 281, 285, 287, 289, 296, 303, 305, 306, 308, 309, 312, 314, 315, 316, 317, 318, 320, 322, 324, 331, 334, 337, 342, 345, 348, 355, 358, 359, 366, 367, 369, 372, 373, 377, 382, 385, 387, 388, 389, 390, 396, 400, 406, 408, 411, 416, 420, 426, 428, 432, 434, 435, 438, 439, 441, 444, 445, 447, 450, 452, 456, 459, 462, 465, 468, 470, 473, 477, 480, 483, 484, 487, 488, 490, 493, 494, 497, 498, 501, 504, 506, 508, 509, 511, 514, 517, 519, 520, 523, 524, 528, 530, 531, 533, 536, 537, 539, 542, 544, 546, 547, 553, 556, 559, 560, 562, 563, 564, 568, 573, 577, 580, 582, 586, 588, 589, 590, 594, 596, 598, 603, 606, 608, 609, 612, 613, 616, 617, 619, 621, 623, 625], "returns": [79, 100, 106, 202, 222, 231, 297, 319, 325, 391, 393, 415, 463, 495, 569, 599, 624], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 72, 177, 290, 471], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "VersionChecksumBytes * createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheStrin"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheString,void (*onErrorReceive"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "(*onErrorReceived)(Error error,char *,...)"}, {"node_id": 109, "universal_type": "function", "name": "if", "text_snippet": "uint8_t initializeVersionChecksumBytesFromString(VersionChecksumBytes * self,ByteArray * string,uint"}, {"node_id": 111, "universal_type": "function", "name": "unknown", "text_snippet": "initializeVersionChecksumBytesFromString(VersionChecksumBytes * self,ByteArray * string,uint8_t cach"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "(*onErrorReceived)(Error error,char *,...)"}, {"node_id": 233, "universal_type": "function", "name": "unknown", "text_snippet": "VersionChecksumBytes * createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cach"}, {"node_id": 237, "universal_type": "function", "name": "unknown", "text_snippet": "createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorR"}, {"node_id": 253, "universal_type": "function", "name": "unknown", "text_snippet": "(*onErrorReceived)(Error error,char *,...)"}, {"node_id": 328, "universal_type": "function", "name": "unknown", "text_snippet": "uint8_t initializeVersionChecksumBytesFromBytes(VersionChecksumBytes * self,uint8_t * bytes,uint32_t"}, {"node_id": 330, "universal_type": "function", "name": "unknown", "text_snippet": "initializeVersionChecksumBytesFromBytes(VersionChecksumBytes * self,uint8_t * bytes,uint32_t size,ui"}, {"node_id": 351, "universal_type": "function", "name": "unknown", "text_snippet": "(*onErrorReceived)(Error error,char *,...)"}, {"node_id": 395, "universal_type": "function", "name": "unknown", "text_snippet": "VersionChecksumBytes * getVersionChecksumBytes(void * self)\n{\n\tassert(self!=NULL);\n\n\treturn self;\n}"}, {"node_id": 399, "universal_type": "function", "name": "unknown", "text_snippet": "getVersionChecksumBytes(void * self)"}, {"node_id": 417, "universal_type": "function", "name": "destroyVersionChecksumBytes", "text_snippet": "void destroyVersionChecksumBytes(void * vself){\n\tVersionChecksumBytes * self = vself;\n\tif (self->cac"}, {"node_id": 419, "universal_type": "function", "name": "unknown", "text_snippet": "destroyVersionChecksumBytes(void * vself)"}, {"node_id": 453, "universal_type": "function", "name": "unknown", "text_snippet": "uint8_t getNetVersionByteForVersionChecksumBytes(VersionChecksumBytes * self){\n\n\treturn getByteFromB"}, {"node_id": 455, "universal_type": "function", "name": "unknown", "text_snippet": "getNetVersionByteForVersionChecksumBytes(VersionChecksumBytes * self)"}, {"node_id": 472, "universal_type": "function", "name": "=", "text_snippet": "ByteArray * getStringForVersionChecksumBytes(VersionChecksumBytes * self){\n\tif (self->cachedString) "}, {"node_id": 476, "universal_type": "function", "name": "unknown", "text_snippet": "getStringForVersionChecksumBytes(VersionChecksumBytes * self)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"VersionChecksumBytes.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"../BigInt/BigInt.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"../Base58/Base58.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdlib.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <stdint.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <assert.h>\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "/*\n * VersionChecksumBytes.c\n *\n * Created on: 03/10/2012\n * Created by: <NAME>\n * Copyright (c) 2012 Bitcoin Project Team\n */\n\n#include \"VersionChecksumBytes.h\"\n#include \"../BigInt/BigInt.h\"\n#include \"../Base58/Base58.h\"\n#include <stdlib.h>\n#include <stdint.h>\n#include <assert.h>\n\n\nVersionChecksumBytes * createNewVersionChecksumBytesFromString(ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))\n{\n\tVersionChecksumBytes * self = malloc(sizeof(*self));\n\tif (! self) {\n\t\tonErrorReceived(ERROR_OUT_OF_MEMORY,\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromString\\n\",sizeof(*self));\n\t\treturn NULL;\n\t}\n\n\tgetObject(self)->destroy = destroyVersionChecksumBytes;\n\tif(initializeVersionChecksumBytesFromString(self,string,cacheString,onErrorReceived)){\n\t\treturn self;\n\t}\n\n\tfree(self);\n\treturn NULL;\n}\n\nuint8_t initializeVersionChecksumBytesFromString(VersionChecksumBytes * self,ByteArray * string,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...))\n{\n\t/* Cache string if needed */\n\tif (cacheString) {\n\t\tself->cachedString = string;\n\t\tincrementReferenceCount(string);\n\t} else {\n\t\tself->cachedString = NULL;\n\t}\n\n\tself->cacheString = cacheString;\n\t/* Get bytes from string conversion*/\n\tBigInt bytes;\n\tBigIntAlloc(&bytes, 25); /*25 is the number of bytes for bitcoin addresses.*/\n\tbytes=decodeBase58Checked((char *)getByteArrayData(string), onErrorReceived);\n\n\tif (&bytes==NULL){\n\t\treturn FALSE;\n\t}\n\n\t/* Take over the bytes with the ByteArray*/\n\tif (! initializeNewByteArrayFromData(getByteArray(self), bytes.data, bytes.length, onErrorReceived)){\n\t\treturn FALSE;\n\t}\n\treverseBytes(getByteArray(self)); /* BigInt is in little-endian. Conversion needed to make bitcoin address the right way.*/\n\treturn TRUE;\n}\n\n\nVersionChecksumBytes * createNewVersionChecksumBytesFromBytes(uint8_t * bytes,uint32_t size,int cacheString,void (*onErrorReceived)(Error error,char *,...)){\n\tVersionChecksumBytes * self = malloc(sizeof(*self));\n\tif (! self) {\n\t\tonErrorReceived(ERROR_OUT_OF_MEMORY,\"Cannot allocate %i bytes of memory in NewVersionChecksumBytesFromBytes\\n\",sizeof(*self));\n\t\treturn NULL;\n\t}\n\tgetObject(self)->destroy = destroyVersionChecksumBytes;\n\tif(initializeVersionChecksumBytesFromBytes(self,bytes,size,cacheString,onErrorReceived)){\n\t\treturn self;\n\t}\n\tfree(self);\n\treturn NULL;\n}\n\n\n\nuint8_t initializeVersionChecksumBytesFromBytes(VersionChecksumBytes * self,uint8_t * bytes,uint32_t size,uint8_t cacheString,void (*onErrorReceived)(Error error,char *,...)){\tself->cacheString = cacheString;\n\tself->cachedString = NULL;\n\tif (! initializeNewByteArrayFromData(getByteArray(self), bytes, size, onErrorReceived)){\n\t\treturn FALSE;\n\t}\n\treturn TRUE;\n}\n\n/* Object Getter */\n\nVersionChecksumBytes * getVersionChecksumBytes(void * self)\n{\n\tassert(self!=NULL);\n\n\treturn self;\n}\n\n\n\nvoid destroyVersionChecksumBytes(void * vself){\n\tVersionChecksumBytes * self = vself;\n\tif (self->cachedString){\n\t\tdecrementReferenceCount(self->cachedString);\n\t}\n\tdestroyByteArray(getByteArray(self));\n}\n\n/* Functions */\n\nuint8_t getNetVersionByteForVersionChecksumBytes(VersionChecksumBytes * self){\n\n\treturn getByteFromByteArray(getByteArray(self), 0);\n}\n\nByteArray * getStringForVersionChecksumBytes(VersionChecksumBytes * self){\n\tif (self->cachedString) {\n\t\tincrementReferenceCount(self->cachedString);\n\t\treturn self->cachedString;\n\t} else {\n\t\treverseBytes(getByteArray(self));\n\n\t\tBigInt bytes;\n\t\tBigIntAlloc(&bytes, getByteArray(self)->length);\n\t\tbytes.length = getByteArray(self)->length;\n\t\tmemcpy(bytes.data, getByteArrayData(getByteArray(self)), bytes.length);\n\n\t\tchar * string = encodeBase58(bytes.data,bytes.length);\n\n\t\tif (! string){\n\t\t\treturn NULL;\n\t\t}\n\t\tByteArray * str = createNewByteArrayFromString(string, TRUE, getByteArray(self)->onErrorReceived);\n\t\tif (! str) {\n\t\t\tfree(string);\n\t\t\treturn NULL;\n\t\t}\n\t\treverseBytes(getByteArray(self));\n\t\tif (self->cacheString) {\n\t\t\tself->cachedString = str;\n\t\t\tincrementReferenceCount(str);\n\t\t}\n\n\t\treturn str;\n\t}\n}\n\n"}
80,921
c
/* * Copyright (c) 2007, <NAME>, <NAME>, <NAME>, * <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: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 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. * * Neither the name of the Luleå University of Technology 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 OWNER 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 <assert.h> #include <string.h> #include <stdlib.h> #include <posix/env.h> #include <posix/ack.h> /** * \brief The ack structure. */ struct ack_t { /** * \brief ack lock. */ pthread_mutex_t lock; /** * \brief ack signal. */ pthread_cond_t signal; /** * \brief ack variable. */ sig_atomic_t acked; }; /** * \brief Create a new ack. * * \return The new ack, will not fail but call posix_panic(). */ ack_t *ack_new(void) { ack_t *ack; /* Allocate a new ack. */ ack = calloc(1, sizeof(ack_t)); if (!ack) posix_panic("Unable to allocate new ack.\n"); /* Create the lock. */ if (pthread_mutex_init(&ack->lock, NULL)) posix_panic("Unable to initialize ack lock.\n"); /* Create the signal condition. */ if (pthread_cond_init(&ack->signal, NULL)) posix_panic("Unable to initialize ack cond.\n"); /* Success. */ return ack; } /** * \brief Destroy an ack. * * \param ack The ack to destroy. */ void ack_delete(ack_t *ack) { assert(ack); /* Free the mallocs. */ free(ack); } /** * \brief Ack an ack. * * \param ack the ack to acknoledge. */ void ack_set(ack_t *ack) { /* Aquire the lock. */ if (pthread_mutex_lock(&ack->lock)) posix_panic("Unable to aquire ack lock.\n"); /* Set the acked to non-zero ie. acked. */ ack->acked++; /* Signal the change. */ if (pthread_cond_broadcast(&ack->signal)) posix_panic("Unable to signal acked state.\n"); /* Release the lock. */ if (pthread_mutex_unlock(&ack->lock)) posix_panic("Unable to release ack lock.\n"); } /** * \brief Reset an ack. * * \param ack The acknowledge struct to reset. */ void ack_clear(ack_t *ack) { assert(ack); /* Aquire the lock. */ if (pthread_mutex_lock(&ack->lock)) posix_panic("Unable to aquire ack lock.\n"); /* Set the acked to 0 ie. not acked. */ ack->acked = 0; /* Release the lock. */ if (pthread_mutex_unlock(&ack->lock)) posix_panic("Unable to release ack lock.\n"); } /** * \brief Wait for ack condition. * * \note * When we return we will have at least the number of acks * requested. * * \param ack The acknowledge struct to wait for. * \param last The number of acks to receive before returning. */ void ack_wait(ack_t *ack, int num) { assert(ack); /* Aquire the lock. */ if (pthread_mutex_lock(&ack->lock)) posix_panic("Unable to aquire ack lock.\n"); /* Wait until we get an acknoledgment. */ while (ack->acked < num) { /* Wait. */ if (pthread_cond_wait(&ack->signal, &ack->lock)) posix_panic("Unable to wait for ack.\n"); } /* Someone acknoledged us. */ if (pthread_mutex_unlock(&ack->lock)) posix_panic("Unable to release ack lock.\n"); } /** * \brief Check if ack is set. * * \param ack The acknowledge state to check. * \return zero if no ack was set, non-zero if ack was set. */ int ack_acked(ack_t *ack) { int acked; /* Aquire the lock. */ if (pthread_mutex_lock(&ack->lock)) posix_panic("Unable to aquire lock.\n"); /* Grab an ack if there was one. */ acked = ack->acked; /* Release the lock. */ if (pthread_mutex_unlock(&ack->lock)) posix_panic("Unable to release lock.\n"); return acked; }
27.41
167
(translation_unit) "/*\n * Copyright (c) 2007, <NAME>, <NAME>, <NAME>,\n * <NAME>.\n *\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 * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * 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 * * Neither the name of the Luleå University of Technology nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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 OF\n * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include <assert.h>\n#include <string.h>\n#include <stdlib.h>\n\n#include <posix/env.h>\n#include <posix/ack.h>\n\n/**\n * \brief The ack structure.\n */\nstruct ack_t\n{\n /**\n * \brief ack lock.\n */\n pthread_mutex_t lock;\n\n /**\n * \brief ack signal.\n */\n pthread_cond_t signal;\n\n /**\n * \brief ack variable.\n */\n sig_atomic_t acked;\n};\n\n\n/**\n * \brief Create a new ack.\n *\n * \return The new ack, will not fail but call posix_panic().\n */\nack_t *ack_new(void)\n{\n ack_t *ack;\n\n /* Allocate a new ack. */\n ack = calloc(1, sizeof(ack_t));\n if (!ack)\n posix_panic("Unable to allocate new ack.\n");\n\n /* Create the lock. */\n if (pthread_mutex_init(&ack->lock, NULL))\n posix_panic("Unable to initialize ack lock.\n");\n\n /* Create the signal condition. */\n if (pthread_cond_init(&ack->signal, NULL))\n posix_panic("Unable to initialize ack cond.\n");\n\n /* Success. */\n return ack;\n}\n\n/**\n * \brief Destroy an ack.\n *\n * \param ack The ack to destroy.\n */\nvoid ack_delete(ack_t *ack)\n{\n assert(ack);\n\n /* Free the mallocs. */\n free(ack);\n}\n\n/**\n * \brief Ack an ack.\n *\n * \param ack the ack to acknoledge.\n */\nvoid ack_set(ack_t *ack)\n{\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n\n /* Set the acked to non-zero ie. acked. */\n ack->acked++;\n\n /* Signal the change. */\n if (pthread_cond_broadcast(&ack->signal))\n posix_panic("Unable to signal acked state.\n");\n\n /* Release the lock. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n}\n\n/**\n * \brief Reset an ack.\n *\n * \param ack The acknowledge struct to reset.\n */\nvoid ack_clear(ack_t *ack)\n{\n assert(ack);\n\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n\n /* Set the acked to 0 ie. not acked. */\n ack->acked = 0;\n\n /* Release the lock. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n}\n\n/**\n * \brief Wait for ack condition.\n *\n * \note\n * When we return we will have at least the number of acks\n * requested.\n *\n * \param ack The acknowledge struct to wait for.\n * \param last The number of acks to receive before returning.\n */\nvoid ack_wait(ack_t *ack, int num)\n{\n assert(ack);\n\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n\n /* Wait until we get an acknoledgment. */\n while (ack->acked < num)\n {\n /* Wait. */\n if (pthread_cond_wait(&ack->signal, &ack->lock))\n posix_panic("Unable to wait for ack.\n");\n }\n\n /* Someone acknoledged us. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n}\n\n/**\n * \brief Check if ack is set.\n *\n * \param ack The acknowledge state to check.\n * \return zero if no ack was set, non-zero if ack was set.\n */\nint ack_acked(ack_t *ack)\n{\n int acked;\n\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire lock.\n");\n\n /* Grab an ack if there was one. */\n acked = ack->acked;\n\n /* Release the lock. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release lock.\n");\n\n return acked;\n}\n" (comment) "/*\n * Copyright (c) 2007, <NAME>, <NAME>, <NAME>,\n * <NAME>.\n *\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 * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * 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 * * Neither the name of the Luleå University of Technology nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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 OF\n * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n" (preproc_include) "include <assert.h>\n#" (#include) "include " (system_lib_string) "assert.h>\n" (preproc_include) "include <string.h>\n#" (#include) "include " (system_lib_string) "string.h>\n" (preproc_include) "include <stdlib.h>\n\n" (#include) "include " (system_lib_string) "stdlib.h>\n" (preproc_include) "include <posix/env.h>\n#" (#include) "include " (system_lib_string) "posix/env.h>\n" (preproc_include) "include <posix/ack.h>\n\n" (#include) "include " (system_lib_string) "posix/ack.h>\n" (comment) "**\n * \brief The ack structure.\n */\n" (struct_specifier) "truct ack_t\n{\n /**\n * \brief ack lock.\n */\n pthread_mutex_t lock;\n\n /**\n * \brief ack signal.\n */\n pthread_cond_t signal;\n\n /**\n * \brief ack variable.\n */\n sig_atomic_t acked;\n};" (struct) "truct " (type_identifier) "ck_t\n" (field_declaration_list) "\n /**\n * \brief ack lock.\n */\n pthread_mutex_t lock;\n\n /**\n * \brief ack signal.\n */\n pthread_cond_t signal;\n\n /**\n * \brief ack variable.\n */\n sig_atomic_t acked;\n};" ({) "\n" (comment) "**\n * \brief ack lock.\n */\n" (field_declaration) "thread_mutex_t lock;\n" (type_identifier) "thread_mutex_t " (field_identifier) "ock;" (;) "\n" (comment) "**\n * \brief ack signal.\n */\n" (field_declaration) "thread_cond_t signal;\n" (type_identifier) "thread_cond_t " (field_identifier) "ignal;" (;) "\n" (comment) "**\n * \brief ack variable.\n */\n" (field_declaration) "ig_atomic_t acked;\n" (type_identifier) "ig_atomic_t " (field_identifier) "cked;" (;) "\n" (}) ";" (;) "\n" (comment) "**\n * \brief Create a new ack.\n *\n * \return The new ack, will not fail but call posix_panic().\n */\n" (function_definition) "ck_t *ack_new(void)\n{\n ack_t *ack;\n\n /* Allocate a new ack. */\n ack = calloc(1, sizeof(ack_t));\n if (!ack)\n posix_panic("Unable to allocate new ack.\n");\n\n /* Create the lock. */\n if (pthread_mutex_init(&ack->lock, NULL))\n posix_panic("Unable to initialize ack lock.\n");\n\n /* Create the signal condition. */\n if (pthread_cond_init(&ack->signal, NULL))\n posix_panic("Unable to initialize ack cond.\n");\n\n /* Success. */\n return ack;\n}\n" (type_identifier) "ck_t " (pointer_declarator) "ack_new(void)\n" (*) "a" (function_declarator) "ck_new(void)\n" (identifier) "ck_new(" (parameter_list) "void)\n" (() "v" (parameter_declaration) "oid)" (primitive_type) "oid)" ()) "\n" (compound_statement) "\n ack_t *ack;\n\n /* Allocate a new ack. */\n ack = calloc(1, sizeof(ack_t));\n if (!ack)\n posix_panic("Unable to allocate new ack.\n");\n\n /* Create the lock. */\n if (pthread_mutex_init(&ack->lock, NULL))\n posix_panic("Unable to initialize ack lock.\n");\n\n /* Create the signal condition. */\n if (pthread_cond_init(&ack->signal, NULL))\n posix_panic("Unable to initialize ack cond.\n");\n\n /* Success. */\n return ack;\n}\n" ({) "\n" (declaration) "ck_t *ack;\n" (type_identifier) "ck_t " (pointer_declarator) "ack;" (*) "a" (identifier) "ck;" (;) "\n" (comment) "* Allocate a new ack. */\n" (expression_statement) "ck = calloc(1, sizeof(ack_t));\n" (assignment_expression) "ck = calloc(1, sizeof(ack_t));" (identifier) "ck " (=) " " (call_expression) "alloc(1, sizeof(ack_t));" (identifier) "alloc(" (argument_list) "1, sizeof(ack_t));" (() "1" (number_literal) "," (,) " " (sizeof_expression) "izeof(ack_t))" (sizeof) "izeof(" (parenthesized_expression) "ack_t))" (() "a" (identifier) "ck_t)" ()) ")" ()) ";" (;) "\n" (if_statement) "f (!ack)\n posix_panic("Unable to allocate new ack.\n");\n" (if) "f " (parenthesized_expression) "!ack)\n" (() "!" (unary_expression) "ack)" (!) "a" (identifier) "ck)" ()) "\n" (expression_statement) "osix_panic("Unable to allocate new ack.\n");\n" (call_expression) "osix_panic("Unable to allocate new ack.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to allocate new ack.\n");" (() """ (string_literal) "Unable to allocate new ack.\n")" (") "U" (string_content) "nable to allocate new ack.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (comment) "* Create the lock. */\n" (if_statement) "f (pthread_mutex_init(&ack->lock, NULL))\n posix_panic("Unable to initialize ack lock.\n");\n" (if) "f " (parenthesized_expression) "pthread_mutex_init(&ack->lock, NULL))\n" (() "p" (call_expression) "thread_mutex_init(&ack->lock, NULL))" (identifier) "thread_mutex_init(" (argument_list) "&ack->lock, NULL))" (() "&" (pointer_expression) "ack->lock," (&) "a" (field_expression) "ck->lock," (identifier) "ck-" (->) ">l" (field_identifier) "ock," (,) " " (null) "ULL)" (NULL) "ULL)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to initialize ack lock.\n");\n" (call_expression) "osix_panic("Unable to initialize ack lock.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to initialize ack lock.\n");" (() """ (string_literal) "Unable to initialize ack lock.\n")" (") "U" (string_content) "nable to initialize ack lock.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (comment) "* Create the signal condition. */\n" (if_statement) "f (pthread_cond_init(&ack->signal, NULL))\n posix_panic("Unable to initialize ack cond.\n");\n" (if) "f " (parenthesized_expression) "pthread_cond_init(&ack->signal, NULL))\n" (() "p" (call_expression) "thread_cond_init(&ack->signal, NULL))" (identifier) "thread_cond_init(" (argument_list) "&ack->signal, NULL))" (() "&" (pointer_expression) "ack->signal," (&) "a" (field_expression) "ck->signal," (identifier) "ck-" (->) ">s" (field_identifier) "ignal," (,) " " (null) "ULL)" (NULL) "ULL)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to initialize ack cond.\n");\n" (call_expression) "osix_panic("Unable to initialize ack cond.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to initialize ack cond.\n");" (() """ (string_literal) "Unable to initialize ack cond.\n")" (") "U" (string_content) "nable to initialize ack cond.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (comment) "* Success. */\n" (return_statement) "eturn ack;\n" (return) "eturn " (identifier) "ck;" (;) "\n" (}) "\n" (comment) "**\n * \brief Destroy an ack.\n *\n * \param ack The ack to destroy.\n */\n" (function_definition) "oid ack_delete(ack_t *ack)\n{\n assert(ack);\n\n /* Free the mallocs. */\n free(ack);\n}\n" (primitive_type) "oid " (function_declarator) "ck_delete(ack_t *ack)\n" (identifier) "ck_delete(" (parameter_list) "ack_t *ack)\n" (() "a" (parameter_declaration) "ck_t *ack)" (type_identifier) "ck_t " (pointer_declarator) "ack)" (*) "a" (identifier) "ck)" ()) "\n" (compound_statement) "\n assert(ack);\n\n /* Free the mallocs. */\n free(ack);\n}\n" ({) "\n" (expression_statement) "ssert(ack);\n" (call_expression) "ssert(ack);" (identifier) "ssert(" (argument_list) "ack);" (() "a" (identifier) "ck)" ()) ";" (;) "\n" (comment) "* Free the mallocs. */\n" (expression_statement) "ree(ack);\n" (call_expression) "ree(ack);" (identifier) "ree(" (argument_list) "ack);" (() "a" (identifier) "ck)" ()) ";" (;) "\n" (}) "\n" (comment) "**\n * \brief Ack an ack.\n *\n * \param ack the ack to acknoledge.\n */\n" (function_definition) "oid ack_set(ack_t *ack)\n{\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n\n /* Set the acked to non-zero ie. acked. */\n ack->acked++;\n\n /* Signal the change. */\n if (pthread_cond_broadcast(&ack->signal))\n posix_panic("Unable to signal acked state.\n");\n\n /* Release the lock. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n}\n" (primitive_type) "oid " (function_declarator) "ck_set(ack_t *ack)\n" (identifier) "ck_set(" (parameter_list) "ack_t *ack)\n" (() "a" (parameter_declaration) "ck_t *ack)" (type_identifier) "ck_t " (pointer_declarator) "ack)" (*) "a" (identifier) "ck)" ()) "\n" (compound_statement) "\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n\n /* Set the acked to non-zero ie. acked. */\n ack->acked++;\n\n /* Signal the change. */\n if (pthread_cond_broadcast(&ack->signal))\n posix_panic("Unable to signal acked state.\n");\n\n /* Release the lock. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n}\n" ({) "\n" (comment) "* Aquire the lock. */\n" (if_statement) "f (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n" (if) "f " (parenthesized_expression) "pthread_mutex_lock(&ack->lock))\n" (() "p" (call_expression) "thread_mutex_lock(&ack->lock))" (identifier) "thread_mutex_lock(" (argument_list) "&ack->lock))" (() "&" (pointer_expression) "ack->lock)" (&) "a" (field_expression) "ck->lock)" (identifier) "ck-" (->) ">l" (field_identifier) "ock)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to aquire ack lock.\n");\n" (call_expression) "osix_panic("Unable to aquire ack lock.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to aquire ack lock.\n");" (() """ (string_literal) "Unable to aquire ack lock.\n")" (") "U" (string_content) "nable to aquire ack lock.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (comment) "* Set the acked to non-zero ie. acked. */\n" (expression_statement) "ck->acked++;\n" (update_expression) "ck->acked++;" (field_expression) "ck->acked+" (identifier) "ck-" (->) ">a" (field_identifier) "cked+" (++) "+;" (;) "\n" (comment) "* Signal the change. */\n" (if_statement) "f (pthread_cond_broadcast(&ack->signal))\n posix_panic("Unable to signal acked state.\n");\n" (if) "f " (parenthesized_expression) "pthread_cond_broadcast(&ack->signal))\n" (() "p" (call_expression) "thread_cond_broadcast(&ack->signal))" (identifier) "thread_cond_broadcast(" (argument_list) "&ack->signal))" (() "&" (pointer_expression) "ack->signal)" (&) "a" (field_expression) "ck->signal)" (identifier) "ck-" (->) ">s" (field_identifier) "ignal)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to signal acked state.\n");\n" (call_expression) "osix_panic("Unable to signal acked state.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to signal acked state.\n");" (() """ (string_literal) "Unable to signal acked state.\n")" (") "U" (string_content) "nable to signal acked state.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (comment) "* Release the lock. */\n" (if_statement) "f (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n" (if) "f " (parenthesized_expression) "pthread_mutex_unlock(&ack->lock))\n" (() "p" (call_expression) "thread_mutex_unlock(&ack->lock))" (identifier) "thread_mutex_unlock(" (argument_list) "&ack->lock))" (() "&" (pointer_expression) "ack->lock)" (&) "a" (field_expression) "ck->lock)" (identifier) "ck-" (->) ">l" (field_identifier) "ock)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to release ack lock.\n");\n" (call_expression) "osix_panic("Unable to release ack lock.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to release ack lock.\n");" (() """ (string_literal) "Unable to release ack lock.\n")" (") "U" (string_content) "nable to release ack lock.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (}) "\n" (comment) "**\n * \brief Reset an ack.\n *\n * \param ack The acknowledge struct to reset.\n */\n" (function_definition) "oid ack_clear(ack_t *ack)\n{\n assert(ack);\n\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n\n /* Set the acked to 0 ie. not acked. */\n ack->acked = 0;\n\n /* Release the lock. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n}\n" (primitive_type) "oid " (function_declarator) "ck_clear(ack_t *ack)\n" (identifier) "ck_clear(" (parameter_list) "ack_t *ack)\n" (() "a" (parameter_declaration) "ck_t *ack)" (type_identifier) "ck_t " (pointer_declarator) "ack)" (*) "a" (identifier) "ck)" ()) "\n" (compound_statement) "\n assert(ack);\n\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n\n /* Set the acked to 0 ie. not acked. */\n ack->acked = 0;\n\n /* Release the lock. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n}\n" ({) "\n" (expression_statement) "ssert(ack);\n" (call_expression) "ssert(ack);" (identifier) "ssert(" (argument_list) "ack);" (() "a" (identifier) "ck)" ()) ";" (;) "\n" (comment) "* Aquire the lock. */\n" (if_statement) "f (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n" (if) "f " (parenthesized_expression) "pthread_mutex_lock(&ack->lock))\n" (() "p" (call_expression) "thread_mutex_lock(&ack->lock))" (identifier) "thread_mutex_lock(" (argument_list) "&ack->lock))" (() "&" (pointer_expression) "ack->lock)" (&) "a" (field_expression) "ck->lock)" (identifier) "ck-" (->) ">l" (field_identifier) "ock)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to aquire ack lock.\n");\n" (call_expression) "osix_panic("Unable to aquire ack lock.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to aquire ack lock.\n");" (() """ (string_literal) "Unable to aquire ack lock.\n")" (") "U" (string_content) "nable to aquire ack lock.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (comment) "* Set the acked to 0 ie. not acked. */\n" (expression_statement) "ck->acked = 0;\n" (assignment_expression) "ck->acked = 0;" (field_expression) "ck->acked " (identifier) "ck-" (->) ">a" (field_identifier) "cked " (=) " " (number_literal) ";" (;) "\n" (comment) "* Release the lock. */\n" (if_statement) "f (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n" (if) "f " (parenthesized_expression) "pthread_mutex_unlock(&ack->lock))\n" (() "p" (call_expression) "thread_mutex_unlock(&ack->lock))" (identifier) "thread_mutex_unlock(" (argument_list) "&ack->lock))" (() "&" (pointer_expression) "ack->lock)" (&) "a" (field_expression) "ck->lock)" (identifier) "ck-" (->) ">l" (field_identifier) "ock)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to release ack lock.\n");\n" (call_expression) "osix_panic("Unable to release ack lock.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to release ack lock.\n");" (() """ (string_literal) "Unable to release ack lock.\n")" (") "U" (string_content) "nable to release ack lock.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (}) "\n" (comment) "**\n * \brief Wait for ack condition.\n *\n * \note\n * When we return we will have at least the number of acks\n * requested.\n *\n * \param ack The acknowledge struct to wait for.\n * \param last The number of acks to receive before returning.\n */\n" (function_definition) "oid ack_wait(ack_t *ack, int num)\n{\n assert(ack);\n\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n\n /* Wait until we get an acknoledgment. */\n while (ack->acked < num)\n {\n /* Wait. */\n if (pthread_cond_wait(&ack->signal, &ack->lock))\n posix_panic("Unable to wait for ack.\n");\n }\n\n /* Someone acknoledged us. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n}\n" (primitive_type) "oid " (function_declarator) "ck_wait(ack_t *ack, int num)\n" (identifier) "ck_wait(" (parameter_list) "ack_t *ack, int num)\n" (() "a" (parameter_declaration) "ck_t *ack," (type_identifier) "ck_t " (pointer_declarator) "ack," (*) "a" (identifier) "ck," (,) " " (parameter_declaration) "nt num)" (primitive_type) "nt " (identifier) "um)" ()) "\n" (compound_statement) "\n assert(ack);\n\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n\n /* Wait until we get an acknoledgment. */\n while (ack->acked < num)\n {\n /* Wait. */\n if (pthread_cond_wait(&ack->signal, &ack->lock))\n posix_panic("Unable to wait for ack.\n");\n }\n\n /* Someone acknoledged us. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n}\n" ({) "\n" (expression_statement) "ssert(ack);\n" (call_expression) "ssert(ack);" (identifier) "ssert(" (argument_list) "ack);" (() "a" (identifier) "ck)" ()) ";" (;) "\n" (comment) "* Aquire the lock. */\n" (if_statement) "f (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire ack lock.\n");\n" (if) "f " (parenthesized_expression) "pthread_mutex_lock(&ack->lock))\n" (() "p" (call_expression) "thread_mutex_lock(&ack->lock))" (identifier) "thread_mutex_lock(" (argument_list) "&ack->lock))" (() "&" (pointer_expression) "ack->lock)" (&) "a" (field_expression) "ck->lock)" (identifier) "ck-" (->) ">l" (field_identifier) "ock)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to aquire ack lock.\n");\n" (call_expression) "osix_panic("Unable to aquire ack lock.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to aquire ack lock.\n");" (() """ (string_literal) "Unable to aquire ack lock.\n")" (") "U" (string_content) "nable to aquire ack lock.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (comment) "* Wait until we get an acknoledgment. */\n" (while_statement) "hile (ack->acked < num)\n {\n /* Wait. */\n if (pthread_cond_wait(&ack->signal, &ack->lock))\n posix_panic("Unable to wait for ack.\n");\n }\n" (while) "hile " (parenthesized_expression) "ack->acked < num)\n" (() "a" (binary_expression) "ck->acked < num)" (field_expression) "ck->acked " (identifier) "ck-" (->) ">a" (field_identifier) "cked " (<) " " (identifier) "um)" ()) "\n" (compound_statement) "\n /* Wait. */\n if (pthread_cond_wait(&ack->signal, &ack->lock))\n posix_panic("Unable to wait for ack.\n");\n }\n" ({) "\n" (comment) "* Wait. */\n" (if_statement) "f (pthread_cond_wait(&ack->signal, &ack->lock))\n posix_panic("Unable to wait for ack.\n");\n" (if) "f " (parenthesized_expression) "pthread_cond_wait(&ack->signal, &ack->lock))\n" (() "p" (call_expression) "thread_cond_wait(&ack->signal, &ack->lock))" (identifier) "thread_cond_wait(" (argument_list) "&ack->signal, &ack->lock))" (() "&" (pointer_expression) "ack->signal," (&) "a" (field_expression) "ck->signal," (identifier) "ck-" (->) ">s" (field_identifier) "ignal," (,) " " (pointer_expression) "ack->lock)" (&) "a" (field_expression) "ck->lock)" (identifier) "ck-" (->) ">l" (field_identifier) "ock)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to wait for ack.\n");\n" (call_expression) "osix_panic("Unable to wait for ack.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to wait for ack.\n");" (() """ (string_literal) "Unable to wait for ack.\n")" (") "U" (string_content) "nable to wait for ack.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (}) "\n" (comment) "* Someone acknoledged us. */\n" (if_statement) "f (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release ack lock.\n");\n" (if) "f " (parenthesized_expression) "pthread_mutex_unlock(&ack->lock))\n" (() "p" (call_expression) "thread_mutex_unlock(&ack->lock))" (identifier) "thread_mutex_unlock(" (argument_list) "&ack->lock))" (() "&" (pointer_expression) "ack->lock)" (&) "a" (field_expression) "ck->lock)" (identifier) "ck-" (->) ">l" (field_identifier) "ock)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to release ack lock.\n");\n" (call_expression) "osix_panic("Unable to release ack lock.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to release ack lock.\n");" (() """ (string_literal) "Unable to release ack lock.\n")" (") "U" (string_content) "nable to release ack lock.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (}) "\n" (comment) "**\n * \brief Check if ack is set.\n *\n * \param ack The acknowledge state to check.\n * \return zero if no ack was set, non-zero if ack was set.\n */\n" (function_definition) "nt ack_acked(ack_t *ack)\n{\n int acked;\n\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire lock.\n");\n\n /* Grab an ack if there was one. */\n acked = ack->acked;\n\n /* Release the lock. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release lock.\n");\n\n return acked;\n}\n" (primitive_type) "nt " (function_declarator) "ck_acked(ack_t *ack)\n" (identifier) "ck_acked(" (parameter_list) "ack_t *ack)\n" (() "a" (parameter_declaration) "ck_t *ack)" (type_identifier) "ck_t " (pointer_declarator) "ack)" (*) "a" (identifier) "ck)" ()) "\n" (compound_statement) "\n int acked;\n\n /* Aquire the lock. */\n if (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire lock.\n");\n\n /* Grab an ack if there was one. */\n acked = ack->acked;\n\n /* Release the lock. */\n if (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release lock.\n");\n\n return acked;\n}\n" ({) "\n" (declaration) "nt acked;\n" (primitive_type) "nt " (identifier) "cked;" (;) "\n" (comment) "* Aquire the lock. */\n" (if_statement) "f (pthread_mutex_lock(&ack->lock))\n posix_panic("Unable to aquire lock.\n");\n" (if) "f " (parenthesized_expression) "pthread_mutex_lock(&ack->lock))\n" (() "p" (call_expression) "thread_mutex_lock(&ack->lock))" (identifier) "thread_mutex_lock(" (argument_list) "&ack->lock))" (() "&" (pointer_expression) "ack->lock)" (&) "a" (field_expression) "ck->lock)" (identifier) "ck-" (->) ">l" (field_identifier) "ock)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to aquire lock.\n");\n" (call_expression) "osix_panic("Unable to aquire lock.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to aquire lock.\n");" (() """ (string_literal) "Unable to aquire lock.\n")" (") "U" (string_content) "nable to aquire lock.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (comment) "* Grab an ack if there was one. */\n" (expression_statement) "cked = ack->acked;\n" (assignment_expression) "cked = ack->acked;" (identifier) "cked " (=) " " (field_expression) "ck->acked;" (identifier) "ck-" (->) ">a" (field_identifier) "cked;" (;) "\n" (comment) "* Release the lock. */\n" (if_statement) "f (pthread_mutex_unlock(&ack->lock))\n posix_panic("Unable to release lock.\n");\n" (if) "f " (parenthesized_expression) "pthread_mutex_unlock(&ack->lock))\n" (() "p" (call_expression) "thread_mutex_unlock(&ack->lock))" (identifier) "thread_mutex_unlock(" (argument_list) "&ack->lock))" (() "&" (pointer_expression) "ack->lock)" (&) "a" (field_expression) "ck->lock)" (identifier) "ck-" (->) ">l" (field_identifier) "ock)" ()) ")" ()) "\n" (expression_statement) "osix_panic("Unable to release lock.\n");\n" (call_expression) "osix_panic("Unable to release lock.\n");" (identifier) "osix_panic(" (argument_list) ""Unable to release lock.\n");" (() """ (string_literal) "Unable to release lock.\n")" (") "U" (string_content) "nable to release lock.\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (return_statement) "eturn acked;\n" (return) "eturn " (identifier) "cked;" (;) "\n" (}) "\n"
636
0
{"language": "c", "success": true, "metadata": {"lines": 167, "avg_line_length": 27.41, "nodes": 367, "errors": 0, "source_hash": "d8637ecc8af0e18210f468b9c5d94529faccd896222af78816bd94003445711d", "categorized_nodes": 255}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "include <assert.h>\n#", "parent": null, "children": [1, 2], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 1, "type": "#include", "text": "include ", "parent": 0, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "assert.h>\n", "parent": 0, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "include <string.h>\n#", "parent": null, "children": [4, 5], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 4, "type": "#include", "text": "include ", "parent": 3, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "string.h>\n", "parent": 3, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "include <stdlib.h>\n\n", "parent": null, "children": [7, 8], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 7, "type": "#include", "text": "include ", "parent": 6, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "stdlib.h>\n", "parent": 6, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "include <posix/env.h>\n#", "parent": null, "children": [10, 11], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 10, "type": "#include", "text": "include ", "parent": 9, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "posix/env.h>\n", "parent": 9, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 22}}, {"id": 12, "type": "preproc_include", "text": "include <posix/ack.h>\n\n", "parent": null, "children": [13, 14], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 13, "type": "#include", "text": "include ", "parent": 12, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "posix/ack.h>\n", "parent": 12, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 22}}, {"id": 15, "type": "struct_specifier", "text": "truct ack_t\n{\n\t/**\n\t * \\brief ack lock.\n\t */\n\tpthread_mutex_t lock;\n\n\t/**\n\t * \\brief ack signal.\n\t */\n\tpthread_cond_t signal;\n\n\t/**\n\t * \\brief ack variable.\n\t */\n\tsig_atomic_t acked;\n};", "parent": null, "children": [16, 17], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 16, "type": "struct", "text": "truct ", "parent": 15, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 17, "type": "type_identifier", "text": "ck_t\n", "parent": 15, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 12}}, {"id": 18, "type": "field_declaration", "text": "thread_mutex_t lock;\n", "parent": 15, "children": [19, 20], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 22}}, {"id": 19, "type": "type_identifier", "text": "thread_mutex_t ", "parent": 18, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 16}}, {"id": 20, "type": "field_identifier", "text": "ock;", "parent": 18, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 21}}, {"id": 21, "type": "field_declaration", "text": "thread_cond_t signal;\n", "parent": 15, "children": [22, 23], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 23}}, {"id": 22, "type": "type_identifier", "text": "thread_cond_t ", "parent": 21, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 15}}, {"id": 23, "type": "field_identifier", "text": "ignal;", "parent": 21, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 22}}, {"id": 24, "type": "field_declaration", "text": "ig_atomic_t acked;\n", "parent": 15, "children": [25, 26], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 20}}, {"id": 25, "type": "type_identifier", "text": "ig_atomic_t ", "parent": 24, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 13}}, {"id": 26, "type": "field_identifier", "text": "cked;", "parent": 24, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 19}}, {"id": 27, "type": "function_definition", "text": "ck_t *ack_new(void)\n{\n\tack_t *ack;\n\n\t/* Allocate a new ack. */\n\tack = calloc(1, sizeof(ack_t));\n\tif (!ack)\n\t\tposix_panic(\"Unable to allocate new ack.\\n\");\n\n\t/* Create the lock. */\n\tif (pthread_mutex_init(&ack->lock, NULL))\n\t\tposix_panic(\"Unable to initialize ack lock.\\n\");\n\n\t/* Create the signal condition. */\n\tif (pthread_cond_init(&ack->signal, NULL))\n\t\tposix_panic(\"Unable to initialize ack cond.\\n\");\n\n\t/* Success. */\n\treturn ack;\n}\n", "parent": null, "children": [28, 29], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 83, "column": 1}}, {"id": 28, "type": "type_identifier", "text": "ck_t ", "parent": 27, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 5}}, {"id": 29, "type": "pointer_declarator", "text": "ack_new(void)\n", "parent": 27, "children": [30, 31], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 20}}, {"id": 30, "type": "*", "text": "a", "parent": 29, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 7}}, {"id": 31, "type": "function_declarator", "text": "ck_new(void)\n", "parent": 29, "children": [32, 33], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 20}}, {"id": 32, "type": "identifier", "text": "ck_new(", "parent": 31, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 14}}, {"id": 33, "type": "parameter_list", "text": "void)\n", "parent": 31, "children": [34], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 20}}, {"id": 34, "type": "parameter_declaration", "text": "oid)", "parent": 33, "children": [35], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 19}}, {"id": 35, "type": "primitive_type", "text": "oid)", "parent": 34, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 19}}, {"id": 36, "type": "declaration", "text": "ck_t *ack;\n", "parent": 27, "children": [37, 38], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 12}}, {"id": 37, "type": "type_identifier", "text": "ck_t ", "parent": 36, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 6}}, {"id": 38, "type": "pointer_declarator", "text": "ack;", "parent": 36, "children": [39, 40], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 11}}, {"id": 39, "type": "*", "text": "a", "parent": 38, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 8}}, {"id": 40, "type": "identifier", "text": "ck;", "parent": 38, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 11}}, {"id": 41, "type": "assignment_expression", "text": "ck = calloc(1, sizeof(ack_t));", "parent": 27, "children": [42, 43, 44], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 31}}, {"id": 42, "type": "identifier", "text": "ck ", "parent": 41, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 4}}, {"id": 43, "type": "=", "text": " ", "parent": 41, "children": [], "start_point": {"row": 69, "column": 5}, "end_point": {"row": 69, "column": 6}}, {"id": 44, "type": "call_expression", "text": "alloc(1, sizeof(ack_t));", "parent": 41, "children": [45, 46], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 31}}, {"id": 45, "type": "identifier", "text": "alloc(", "parent": 44, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 13}}, {"id": 46, "type": "argument_list", "text": "1, sizeof(ack_t));", "parent": 44, "children": [47], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 31}}, {"id": 47, "type": "sizeof_expression", "text": "izeof(ack_t))", "parent": 46, "children": [48, 49], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 30}}, {"id": 48, "type": "sizeof", "text": "izeof(", "parent": 47, "children": [], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 23}}, {"id": 49, "type": "parenthesized_expression", "text": "ack_t))", "parent": 47, "children": [50], "start_point": {"row": 69, "column": 23}, "end_point": {"row": 69, "column": 30}}, {"id": 50, "type": "identifier", "text": "ck_t)", "parent": 49, "children": [], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 29}}, {"id": 51, "type": "if_statement", "text": "f (!ack)\n\t\tposix_panic(\"Unable to allocate new ack.\\n\");\n", "parent": 27, "children": [52], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 71, "column": 47}}, {"id": 52, "type": "parenthesized_expression", "text": "!ack)\n", "parent": 51, "children": [53], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 10}}, {"id": 53, "type": "unary_expression", "text": "ack)", "parent": 52, "children": [54, 55], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 9}}, {"id": 54, "type": "!", "text": "a", "parent": 53, "children": [], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 6}}, {"id": 55, "type": "identifier", "text": "ck)", "parent": 53, "children": [], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 9}}, {"id": 56, "type": "call_expression", "text": "osix_panic(\"Unable to allocate new ack.\\n\");", "parent": 51, "children": [57, 58], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 46}}, {"id": 57, "type": "identifier", "text": "osix_panic(", "parent": 56, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 13}}, {"id": 58, "type": "argument_list", "text": "\"Unable to allocate new ack.\\n\");", "parent": 56, "children": [59], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 46}}, {"id": 59, "type": "string_literal", "text": "Unable to allocate new ack.\\n\")", "parent": 58, "children": [60], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 45}}, {"id": 60, "type": "escape_sequence", "text": "n\"", "parent": 59, "children": [], "start_point": {"row": 71, "column": 42}, "end_point": {"row": 71, "column": 44}}, {"id": 61, "type": "if_statement", "text": "f (pthread_mutex_init(&ack->lock, NULL))\n\t\tposix_panic(\"Unable to initialize ack lock.\\n\");\n", "parent": 27, "children": [62], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 75, "column": 50}}, {"id": 62, "type": "parenthesized_expression", "text": "pthread_mutex_init(&ack->lock, NULL))\n", "parent": 61, "children": [63], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 42}}, {"id": 63, "type": "call_expression", "text": "thread_mutex_init(&ack->lock, NULL))", "parent": 62, "children": [64, 65], "start_point": {"row": 74, "column": 5}, "end_point": {"row": 74, "column": 41}}, {"id": 64, "type": "identifier", "text": "thread_mutex_init(", "parent": 63, "children": [], "start_point": {"row": 74, "column": 5}, "end_point": {"row": 74, "column": 23}}, {"id": 65, "type": "argument_list", "text": "&ack->lock, NULL))", "parent": 63, "children": [66, 72], "start_point": {"row": 74, "column": 23}, "end_point": {"row": 74, "column": 41}}, {"id": 66, "type": "pointer_expression", "text": "ack->lock,", "parent": 65, "children": [67, 68], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 34}}, {"id": 67, "type": "&", "text": "a", "parent": 66, "children": [], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 25}}, {"id": 68, "type": "field_expression", "text": "ck->lock,", "parent": 66, "children": [69, 70, 71], "start_point": {"row": 74, "column": 25}, "end_point": {"row": 74, "column": 34}}, {"id": 69, "type": "identifier", "text": "ck-", "parent": 68, "children": [], "start_point": {"row": 74, "column": 25}, "end_point": {"row": 74, "column": 28}}, {"id": 70, "type": "->", "text": ">l", "parent": 68, "children": [], "start_point": {"row": 74, "column": 28}, "end_point": {"row": 74, "column": 30}}, {"id": 71, "type": "field_identifier", "text": "ock,", "parent": 68, "children": [], "start_point": {"row": 74, "column": 30}, "end_point": {"row": 74, "column": 34}}, {"id": 72, "type": "null", "text": "ULL)", "parent": 65, "children": [73], "start_point": {"row": 74, "column": 36}, "end_point": {"row": 74, "column": 40}}, {"id": 73, "type": "NULL", "text": "ULL)", "parent": 72, "children": [], "start_point": {"row": 74, "column": 36}, "end_point": {"row": 74, "column": 40}}, {"id": 74, "type": "call_expression", "text": "osix_panic(\"Unable to initialize ack lock.\\n\");", "parent": 61, "children": [75, 76], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 49}}, {"id": 75, "type": "identifier", "text": "osix_panic(", "parent": 74, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 13}}, {"id": 76, "type": "argument_list", "text": "\"Unable to initialize ack lock.\\n\");", "parent": 74, "children": [77], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 49}}, {"id": 77, "type": "string_literal", "text": "Unable to initialize ack lock.\\n\")", "parent": 76, "children": [78], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 48}}, {"id": 78, "type": "escape_sequence", "text": "n\"", "parent": 77, "children": [], "start_point": {"row": 75, "column": 45}, "end_point": {"row": 75, "column": 47}}, {"id": 79, "type": "if_statement", "text": "f (pthread_cond_init(&ack->signal, NULL))\n\t\tposix_panic(\"Unable to initialize ack cond.\\n\");\n", "parent": 27, "children": [80], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 79, "column": 50}}, {"id": 80, "type": "parenthesized_expression", "text": "pthread_cond_init(&ack->signal, NULL))\n", "parent": 79, "children": [81], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 43}}, {"id": 81, "type": "call_expression", "text": "thread_cond_init(&ack->signal, NULL))", "parent": 80, "children": [82, 83], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 42}}, {"id": 82, "type": "identifier", "text": "thread_cond_init(", "parent": 81, "children": [], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 22}}, {"id": 83, "type": "argument_list", "text": "&ack->signal, NULL))", "parent": 81, "children": [84, 90], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 42}}, {"id": 84, "type": "pointer_expression", "text": "ack->signal,", "parent": 83, "children": [85, 86], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 35}}, {"id": 85, "type": "&", "text": "a", "parent": 84, "children": [], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 24}}, {"id": 86, "type": "field_expression", "text": "ck->signal,", "parent": 84, "children": [87, 88, 89], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 35}}, {"id": 87, "type": "identifier", "text": "ck-", "parent": 86, "children": [], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 27}}, {"id": 88, "type": "->", "text": ">s", "parent": 86, "children": [], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 78, "column": 29}}, {"id": 89, "type": "field_identifier", "text": "ignal,", "parent": 86, "children": [], "start_point": {"row": 78, "column": 29}, "end_point": {"row": 78, "column": 35}}, {"id": 90, "type": "null", "text": "ULL)", "parent": 83, "children": [91], "start_point": {"row": 78, "column": 37}, "end_point": {"row": 78, "column": 41}}, {"id": 91, "type": "NULL", "text": "ULL)", "parent": 90, "children": [], "start_point": {"row": 78, "column": 37}, "end_point": {"row": 78, "column": 41}}, {"id": 92, "type": "call_expression", "text": "osix_panic(\"Unable to initialize ack cond.\\n\");", "parent": 79, "children": [93, 94], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 49}}, {"id": 93, "type": "identifier", "text": "osix_panic(", "parent": 92, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 13}}, {"id": 94, "type": "argument_list", "text": "\"Unable to initialize ack cond.\\n\");", "parent": 92, "children": [95], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 49}}, {"id": 95, "type": "string_literal", "text": "Unable to initialize ack cond.\\n\")", "parent": 94, "children": [96], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 48}}, {"id": 96, "type": "escape_sequence", "text": "n\"", "parent": 95, "children": [], "start_point": {"row": 79, "column": 45}, "end_point": {"row": 79, "column": 47}}, {"id": 97, "type": "return_statement", "text": "eturn ack;\n", "parent": 27, "children": [98], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 12}}, {"id": 98, "type": "identifier", "text": "ck;", "parent": 97, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 11}}, {"id": 99, "type": "function_definition", "text": "oid ack_delete(ack_t *ack)\n{\n\tassert(ack);\n\n\t/* Free the mallocs. */\n\tfree(ack);\n}\n", "parent": null, "children": [100, 101], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 96, "column": 1}}, {"id": 100, "type": "primitive_type", "text": "oid ", "parent": 99, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 4}}, {"id": 101, "type": "function_declarator", "text": "ck_delete(ack_t *ack)\n", "parent": 99, "children": [102, 103], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 27}}, {"id": 102, "type": "identifier", "text": "ck_delete(", "parent": 101, "children": [], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 15}}, {"id": 103, "type": "parameter_list", "text": "ack_t *ack)\n", "parent": 101, "children": [104], "start_point": {"row": 90, "column": 15}, "end_point": {"row": 90, "column": 27}}, {"id": 104, "type": "parameter_declaration", "text": "ck_t *ack)", "parent": 103, "children": [105, 106], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 26}}, {"id": 105, "type": "type_identifier", "text": "ck_t ", "parent": 104, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 21}}, {"id": 106, "type": "pointer_declarator", "text": "ack)", "parent": 104, "children": [107, 108], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 26}}, {"id": 107, "type": "*", "text": "a", "parent": 106, "children": [], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 23}}, {"id": 108, "type": "identifier", "text": "ck)", "parent": 106, "children": [], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 26}}, {"id": 109, "type": "call_expression", "text": "ssert(ack);", "parent": 99, "children": [110, 111], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 12}}, {"id": 110, "type": "identifier", "text": "ssert(", "parent": 109, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 7}}, {"id": 111, "type": "argument_list", "text": "ack);", "parent": 109, "children": [112], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 12}}, {"id": 112, "type": "identifier", "text": "ck)", "parent": 111, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 11}}, {"id": 113, "type": "call_expression", "text": "ree(ack);", "parent": 99, "children": [114, 115], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 10}}, {"id": 114, "type": "identifier", "text": "ree(", "parent": 113, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 5}}, {"id": 115, "type": "argument_list", "text": "ack);", "parent": 113, "children": [116], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 10}}, {"id": 116, "type": "identifier", "text": "ck)", "parent": 115, "children": [], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 9}}, {"id": 117, "type": "function_definition", "text": "oid ack_set(ack_t *ack)\n{\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire ack lock.\\n\");\n\n\t/* Set the acked to non-zero ie. acked. */\n\tack->acked++;\n\n\t/* Signal the change. */\n\tif (pthread_cond_broadcast(&ack->signal))\n\t\tposix_panic(\"Unable to signal acked state.\\n\");\n\n\t/* Release the lock. */\n\tif (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release ack lock.\\n\");\n}\n", "parent": null, "children": [118, 119], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 119, "column": 1}}, {"id": 118, "type": "primitive_type", "text": "oid ", "parent": 117, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 4}}, {"id": 119, "type": "function_declarator", "text": "ck_set(ack_t *ack)\n", "parent": 117, "children": [120, 121], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 24}}, {"id": 120, "type": "identifier", "text": "ck_set(", "parent": 119, "children": [], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 12}}, {"id": 121, "type": "parameter_list", "text": "ack_t *ack)\n", "parent": 119, "children": [122], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 103, "column": 24}}, {"id": 122, "type": "parameter_declaration", "text": "ck_t *ack)", "parent": 121, "children": [123, 124], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 23}}, {"id": 123, "type": "type_identifier", "text": "ck_t ", "parent": 122, "children": [], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 18}}, {"id": 124, "type": "pointer_declarator", "text": "ack)", "parent": 122, "children": [125, 126], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 23}}, {"id": 125, "type": "*", "text": "a", "parent": 124, "children": [], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 20}}, {"id": 126, "type": "identifier", "text": "ck)", "parent": 124, "children": [], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 23}}, {"id": 127, "type": "if_statement", "text": "f (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire ack lock.\\n\");\n", "parent": 117, "children": [128], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 107, "column": 46}}, {"id": 128, "type": "parenthesized_expression", "text": "pthread_mutex_lock(&ack->lock))\n", "parent": 127, "children": [129], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 36}}, {"id": 129, "type": "call_expression", "text": "thread_mutex_lock(&ack->lock))", "parent": 128, "children": [130, 131], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 35}}, {"id": 130, "type": "identifier", "text": "thread_mutex_lock(", "parent": 129, "children": [], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 23}}, {"id": 131, "type": "argument_list", "text": "&ack->lock))", "parent": 129, "children": [132], "start_point": {"row": 106, "column": 23}, "end_point": {"row": 106, "column": 35}}, {"id": 132, "type": "pointer_expression", "text": "ack->lock)", "parent": 131, "children": [133, 134], "start_point": {"row": 106, "column": 24}, "end_point": {"row": 106, "column": 34}}, {"id": 133, "type": "&", "text": "a", "parent": 132, "children": [], "start_point": {"row": 106, "column": 24}, "end_point": {"row": 106, "column": 25}}, {"id": 134, "type": "field_expression", "text": "ck->lock)", "parent": 132, "children": [135, 136, 137], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 34}}, {"id": 135, "type": "identifier", "text": "ck-", "parent": 134, "children": [], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 28}}, {"id": 136, "type": "->", "text": ">l", "parent": 134, "children": [], "start_point": {"row": 106, "column": 28}, "end_point": {"row": 106, "column": 30}}, {"id": 137, "type": "field_identifier", "text": "ock)", "parent": 134, "children": [], "start_point": {"row": 106, "column": 30}, "end_point": {"row": 106, "column": 34}}, {"id": 138, "type": "call_expression", "text": "osix_panic(\"Unable to aquire ack lock.\\n\");", "parent": 127, "children": [139, 140], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 45}}, {"id": 139, "type": "identifier", "text": "osix_panic(", "parent": 138, "children": [], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 13}}, {"id": 140, "type": "argument_list", "text": "\"Unable to aquire ack lock.\\n\");", "parent": 138, "children": [141], "start_point": {"row": 107, "column": 13}, "end_point": {"row": 107, "column": 45}}, {"id": 141, "type": "string_literal", "text": "Unable to aquire ack lock.\\n\")", "parent": 140, "children": [142], "start_point": {"row": 107, "column": 14}, "end_point": {"row": 107, "column": 44}}, {"id": 142, "type": "escape_sequence", "text": "n\"", "parent": 141, "children": [], "start_point": {"row": 107, "column": 41}, "end_point": {"row": 107, "column": 43}}, {"id": 143, "type": "update_expression", "text": "ck->acked++;", "parent": 117, "children": [144, 148], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 13}}, {"id": 144, "type": "field_expression", "text": "ck->acked+", "parent": 143, "children": [145, 146, 147], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 11}}, {"id": 145, "type": "identifier", "text": "ck-", "parent": 144, "children": [], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 4}}, {"id": 146, "type": "->", "text": ">a", "parent": 144, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 6}}, {"id": 147, "type": "field_identifier", "text": "cked+", "parent": 144, "children": [], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 11}}, {"id": 148, "type": "++", "text": "+;", "parent": 143, "children": [], "start_point": {"row": 110, "column": 11}, "end_point": {"row": 110, "column": 13}}, {"id": 149, "type": "if_statement", "text": "f (pthread_cond_broadcast(&ack->signal))\n\t\tposix_panic(\"Unable to signal acked state.\\n\");\n", "parent": 117, "children": [150], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 114, "column": 49}}, {"id": 150, "type": "parenthesized_expression", "text": "pthread_cond_broadcast(&ack->signal))\n", "parent": 149, "children": [151], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 42}}, {"id": 151, "type": "call_expression", "text": "thread_cond_broadcast(&ack->signal))", "parent": 150, "children": [152, 153], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 41}}, {"id": 152, "type": "identifier", "text": "thread_cond_broadcast(", "parent": 151, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 27}}, {"id": 153, "type": "argument_list", "text": "&ack->signal))", "parent": 151, "children": [154], "start_point": {"row": 113, "column": 27}, "end_point": {"row": 113, "column": 41}}, {"id": 154, "type": "pointer_expression", "text": "ack->signal)", "parent": 153, "children": [155, 156], "start_point": {"row": 113, "column": 28}, "end_point": {"row": 113, "column": 40}}, {"id": 155, "type": "&", "text": "a", "parent": 154, "children": [], "start_point": {"row": 113, "column": 28}, "end_point": {"row": 113, "column": 29}}, {"id": 156, "type": "field_expression", "text": "ck->signal)", "parent": 154, "children": [157, 158, 159], "start_point": {"row": 113, "column": 29}, "end_point": {"row": 113, "column": 40}}, {"id": 157, "type": "identifier", "text": "ck-", "parent": 156, "children": [], "start_point": {"row": 113, "column": 29}, "end_point": {"row": 113, "column": 32}}, {"id": 158, "type": "->", "text": ">s", "parent": 156, "children": [], "start_point": {"row": 113, "column": 32}, "end_point": {"row": 113, "column": 34}}, {"id": 159, "type": "field_identifier", "text": "ignal)", "parent": 156, "children": [], "start_point": {"row": 113, "column": 34}, "end_point": {"row": 113, "column": 40}}, {"id": 160, "type": "call_expression", "text": "osix_panic(\"Unable to signal acked state.\\n\");", "parent": 149, "children": [161, 162], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 48}}, {"id": 161, "type": "identifier", "text": "osix_panic(", "parent": 160, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 13}}, {"id": 162, "type": "argument_list", "text": "\"Unable to signal acked state.\\n\");", "parent": 160, "children": [163], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 48}}, {"id": 163, "type": "string_literal", "text": "Unable to signal acked state.\\n\")", "parent": 162, "children": [164], "start_point": {"row": 114, "column": 14}, "end_point": {"row": 114, "column": 47}}, {"id": 164, "type": "escape_sequence", "text": "n\"", "parent": 163, "children": [], "start_point": {"row": 114, "column": 44}, "end_point": {"row": 114, "column": 46}}, {"id": 165, "type": "if_statement", "text": "f (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release ack lock.\\n\");\n", "parent": 117, "children": [166], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 118, "column": 47}}, {"id": 166, "type": "parenthesized_expression", "text": "pthread_mutex_unlock(&ack->lock))\n", "parent": 165, "children": [167], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 38}}, {"id": 167, "type": "call_expression", "text": "thread_mutex_unlock(&ack->lock))", "parent": 166, "children": [168, 169], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 37}}, {"id": 168, "type": "identifier", "text": "thread_mutex_unlock(", "parent": 167, "children": [], "start_point": {"row": 117, "column": 5}, "end_point": {"row": 117, "column": 25}}, {"id": 169, "type": "argument_list", "text": "&ack->lock))", "parent": 167, "children": [170], "start_point": {"row": 117, "column": 25}, "end_point": {"row": 117, "column": 37}}, {"id": 170, "type": "pointer_expression", "text": "ack->lock)", "parent": 169, "children": [171, 172], "start_point": {"row": 117, "column": 26}, "end_point": {"row": 117, "column": 36}}, {"id": 171, "type": "&", "text": "a", "parent": 170, "children": [], "start_point": {"row": 117, "column": 26}, "end_point": {"row": 117, "column": 27}}, {"id": 172, "type": "field_expression", "text": "ck->lock)", "parent": 170, "children": [173, 174, 175], "start_point": {"row": 117, "column": 27}, "end_point": {"row": 117, "column": 36}}, {"id": 173, "type": "identifier", "text": "ck-", "parent": 172, "children": [], "start_point": {"row": 117, "column": 27}, "end_point": {"row": 117, "column": 30}}, {"id": 174, "type": "->", "text": ">l", "parent": 172, "children": [], "start_point": {"row": 117, "column": 30}, "end_point": {"row": 117, "column": 32}}, {"id": 175, "type": "field_identifier", "text": "ock)", "parent": 172, "children": [], "start_point": {"row": 117, "column": 32}, "end_point": {"row": 117, "column": 36}}, {"id": 176, "type": "call_expression", "text": "osix_panic(\"Unable to release ack lock.\\n\");", "parent": 165, "children": [177, 178], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 46}}, {"id": 177, "type": "identifier", "text": "osix_panic(", "parent": 176, "children": [], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 13}}, {"id": 178, "type": "argument_list", "text": "\"Unable to release ack lock.\\n\");", "parent": 176, "children": [179], "start_point": {"row": 118, "column": 13}, "end_point": {"row": 118, "column": 46}}, {"id": 179, "type": "string_literal", "text": "Unable to release ack lock.\\n\")", "parent": 178, "children": [180], "start_point": {"row": 118, "column": 14}, "end_point": {"row": 118, "column": 45}}, {"id": 180, "type": "escape_sequence", "text": "n\"", "parent": 179, "children": [], "start_point": {"row": 118, "column": 42}, "end_point": {"row": 118, "column": 44}}, {"id": 181, "type": "function_definition", "text": "oid ack_clear(ack_t *ack)\n{\n\tassert(ack);\n\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire ack lock.\\n\");\n\n\t/* Set the acked to 0 ie. not acked. */\n\tack->acked = 0;\n\n\t/* Release the lock. */\n\tif (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release ack lock.\\n\");\n}\n", "parent": null, "children": [182, 183], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 140, "column": 1}}, {"id": 182, "type": "primitive_type", "text": "oid ", "parent": 181, "children": [], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 126, "column": 4}}, {"id": 183, "type": "function_declarator", "text": "ck_clear(ack_t *ack)\n", "parent": 181, "children": [184, 185], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 26}}, {"id": 184, "type": "identifier", "text": "ck_clear(", "parent": 183, "children": [], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 14}}, {"id": 185, "type": "parameter_list", "text": "ack_t *ack)\n", "parent": 183, "children": [186], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 26}}, {"id": 186, "type": "parameter_declaration", "text": "ck_t *ack)", "parent": 185, "children": [187, 188], "start_point": {"row": 126, "column": 15}, "end_point": {"row": 126, "column": 25}}, {"id": 187, "type": "type_identifier", "text": "ck_t ", "parent": 186, "children": [], "start_point": {"row": 126, "column": 15}, "end_point": {"row": 126, "column": 20}}, {"id": 188, "type": "pointer_declarator", "text": "ack)", "parent": 186, "children": [189, 190], "start_point": {"row": 126, "column": 21}, "end_point": {"row": 126, "column": 25}}, {"id": 189, "type": "*", "text": "a", "parent": 188, "children": [], "start_point": {"row": 126, "column": 21}, "end_point": {"row": 126, "column": 22}}, {"id": 190, "type": "identifier", "text": "ck)", "parent": 188, "children": [], "start_point": {"row": 126, "column": 22}, "end_point": {"row": 126, "column": 25}}, {"id": 191, "type": "call_expression", "text": "ssert(ack);", "parent": 181, "children": [192, 193], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 12}}, {"id": 192, "type": "identifier", "text": "ssert(", "parent": 191, "children": [], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 7}}, {"id": 193, "type": "argument_list", "text": "ack);", "parent": 191, "children": [194], "start_point": {"row": 128, "column": 7}, "end_point": {"row": 128, "column": 12}}, {"id": 194, "type": "identifier", "text": "ck)", "parent": 193, "children": [], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 11}}, {"id": 195, "type": "if_statement", "text": "f (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire ack lock.\\n\");\n", "parent": 181, "children": [196], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 132, "column": 46}}, {"id": 196, "type": "parenthesized_expression", "text": "pthread_mutex_lock(&ack->lock))\n", "parent": 195, "children": [197], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 36}}, {"id": 197, "type": "call_expression", "text": "thread_mutex_lock(&ack->lock))", "parent": 196, "children": [198, 199], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 35}}, {"id": 198, "type": "identifier", "text": "thread_mutex_lock(", "parent": 197, "children": [], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 23}}, {"id": 199, "type": "argument_list", "text": "&ack->lock))", "parent": 197, "children": [200], "start_point": {"row": 131, "column": 23}, "end_point": {"row": 131, "column": 35}}, {"id": 200, "type": "pointer_expression", "text": "ack->lock)", "parent": 199, "children": [201, 202], "start_point": {"row": 131, "column": 24}, "end_point": {"row": 131, "column": 34}}, {"id": 201, "type": "&", "text": "a", "parent": 200, "children": [], "start_point": {"row": 131, "column": 24}, "end_point": {"row": 131, "column": 25}}, {"id": 202, "type": "field_expression", "text": "ck->lock)", "parent": 200, "children": [203, 204, 205], "start_point": {"row": 131, "column": 25}, "end_point": {"row": 131, "column": 34}}, {"id": 203, "type": "identifier", "text": "ck-", "parent": 202, "children": [], "start_point": {"row": 131, "column": 25}, "end_point": {"row": 131, "column": 28}}, {"id": 204, "type": "->", "text": ">l", "parent": 202, "children": [], "start_point": {"row": 131, "column": 28}, "end_point": {"row": 131, "column": 30}}, {"id": 205, "type": "field_identifier", "text": "ock)", "parent": 202, "children": [], "start_point": {"row": 131, "column": 30}, "end_point": {"row": 131, "column": 34}}, {"id": 206, "type": "call_expression", "text": "osix_panic(\"Unable to aquire ack lock.\\n\");", "parent": 195, "children": [207, 208], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 45}}, {"id": 207, "type": "identifier", "text": "osix_panic(", "parent": 206, "children": [], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 13}}, {"id": 208, "type": "argument_list", "text": "\"Unable to aquire ack lock.\\n\");", "parent": 206, "children": [209], "start_point": {"row": 132, "column": 13}, "end_point": {"row": 132, "column": 45}}, {"id": 209, "type": "string_literal", "text": "Unable to aquire ack lock.\\n\")", "parent": 208, "children": [210], "start_point": {"row": 132, "column": 14}, "end_point": {"row": 132, "column": 44}}, {"id": 210, "type": "escape_sequence", "text": "n\"", "parent": 209, "children": [], "start_point": {"row": 132, "column": 41}, "end_point": {"row": 132, "column": 43}}, {"id": 211, "type": "assignment_expression", "text": "ck->acked = 0;", "parent": 181, "children": [212, 216], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 15}}, {"id": 212, "type": "field_expression", "text": "ck->acked ", "parent": 211, "children": [213, 214, 215], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 11}}, {"id": 213, "type": "identifier", "text": "ck-", "parent": 212, "children": [], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 4}}, {"id": 214, "type": "->", "text": ">a", "parent": 212, "children": [], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 6}}, {"id": 215, "type": "field_identifier", "text": "cked ", "parent": 212, "children": [], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 135, "column": 11}}, {"id": 216, "type": "=", "text": " ", "parent": 211, "children": [], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 13}}, {"id": 217, "type": "if_statement", "text": "f (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release ack lock.\\n\");\n", "parent": 181, "children": [218], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 139, "column": 47}}, {"id": 218, "type": "parenthesized_expression", "text": "pthread_mutex_unlock(&ack->lock))\n", "parent": 217, "children": [219], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 38}}, {"id": 219, "type": "call_expression", "text": "thread_mutex_unlock(&ack->lock))", "parent": 218, "children": [220, 221], "start_point": {"row": 138, "column": 5}, "end_point": {"row": 138, "column": 37}}, {"id": 220, "type": "identifier", "text": "thread_mutex_unlock(", "parent": 219, "children": [], "start_point": {"row": 138, "column": 5}, "end_point": {"row": 138, "column": 25}}, {"id": 221, "type": "argument_list", "text": "&ack->lock))", "parent": 219, "children": [222], "start_point": {"row": 138, "column": 25}, "end_point": {"row": 138, "column": 37}}, {"id": 222, "type": "pointer_expression", "text": "ack->lock)", "parent": 221, "children": [223, 224], "start_point": {"row": 138, "column": 26}, "end_point": {"row": 138, "column": 36}}, {"id": 223, "type": "&", "text": "a", "parent": 222, "children": [], "start_point": {"row": 138, "column": 26}, "end_point": {"row": 138, "column": 27}}, {"id": 224, "type": "field_expression", "text": "ck->lock)", "parent": 222, "children": [225, 226, 227], "start_point": {"row": 138, "column": 27}, "end_point": {"row": 138, "column": 36}}, {"id": 225, "type": "identifier", "text": "ck-", "parent": 224, "children": [], "start_point": {"row": 138, "column": 27}, "end_point": {"row": 138, "column": 30}}, {"id": 226, "type": "->", "text": ">l", "parent": 224, "children": [], "start_point": {"row": 138, "column": 30}, "end_point": {"row": 138, "column": 32}}, {"id": 227, "type": "field_identifier", "text": "ock)", "parent": 224, "children": [], "start_point": {"row": 138, "column": 32}, "end_point": {"row": 138, "column": 36}}, {"id": 228, "type": "call_expression", "text": "osix_panic(\"Unable to release ack lock.\\n\");", "parent": 217, "children": [229, 230], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 139, "column": 46}}, {"id": 229, "type": "identifier", "text": "osix_panic(", "parent": 228, "children": [], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 139, "column": 13}}, {"id": 230, "type": "argument_list", "text": "\"Unable to release ack lock.\\n\");", "parent": 228, "children": [231], "start_point": {"row": 139, "column": 13}, "end_point": {"row": 139, "column": 46}}, {"id": 231, "type": "string_literal", "text": "Unable to release ack lock.\\n\")", "parent": 230, "children": [232], "start_point": {"row": 139, "column": 14}, "end_point": {"row": 139, "column": 45}}, {"id": 232, "type": "escape_sequence", "text": "n\"", "parent": 231, "children": [], "start_point": {"row": 139, "column": 42}, "end_point": {"row": 139, "column": 44}}, {"id": 233, "type": "function_definition", "text": "oid ack_wait(ack_t *ack, int num)\n{\n\tassert(ack);\n\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire ack lock.\\n\");\n\n\t/* Wait until we get an acknoledgment. */\n\twhile (ack->acked < num)\n\t{\n\t\t/* Wait. */\n\t\tif (pthread_cond_wait(&ack->signal, &ack->lock))\n\t\t\tposix_panic(\"Unable to wait for ack.\\n\");\n\t}\n\n\t/* Someone acknoledged us. */\n\tif (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release ack lock.\\n\");\n}\n", "parent": null, "children": [234, 235], "start_point": {"row": 152, "column": 0}, "end_point": {"row": 171, "column": 1}}, {"id": 234, "type": "primitive_type", "text": "oid ", "parent": 233, "children": [], "start_point": {"row": 152, "column": 0}, "end_point": {"row": 152, "column": 4}}, {"id": 235, "type": "function_declarator", "text": "ck_wait(ack_t *ack, int num)\n", "parent": 233, "children": [236, 237], "start_point": {"row": 152, "column": 5}, "end_point": {"row": 152, "column": 34}}, {"id": 236, "type": "identifier", "text": "ck_wait(", "parent": 235, "children": [], "start_point": {"row": 152, "column": 5}, "end_point": {"row": 152, "column": 13}}, {"id": 237, "type": "parameter_list", "text": "ack_t *ack, int num)\n", "parent": 235, "children": [238, 243], "start_point": {"row": 152, "column": 13}, "end_point": {"row": 152, "column": 34}}, {"id": 238, "type": "parameter_declaration", "text": "ck_t *ack,", "parent": 237, "children": [239, 240], "start_point": {"row": 152, "column": 14}, "end_point": {"row": 152, "column": 24}}, {"id": 239, "type": "type_identifier", "text": "ck_t ", "parent": 238, "children": [], "start_point": {"row": 152, "column": 14}, "end_point": {"row": 152, "column": 19}}, {"id": 240, "type": "pointer_declarator", "text": "ack,", "parent": 238, "children": [241, 242], "start_point": {"row": 152, "column": 20}, "end_point": {"row": 152, "column": 24}}, {"id": 241, "type": "*", "text": "a", "parent": 240, "children": [], "start_point": {"row": 152, "column": 20}, "end_point": {"row": 152, "column": 21}}, {"id": 242, "type": "identifier", "text": "ck,", "parent": 240, "children": [], "start_point": {"row": 152, "column": 21}, "end_point": {"row": 152, "column": 24}}, {"id": 243, "type": "parameter_declaration", "text": "nt num)", "parent": 237, "children": [244, 245], "start_point": {"row": 152, "column": 26}, "end_point": {"row": 152, "column": 33}}, {"id": 244, "type": "primitive_type", "text": "nt ", "parent": 243, "children": [], "start_point": {"row": 152, "column": 26}, "end_point": {"row": 152, "column": 29}}, {"id": 245, "type": "identifier", "text": "um)", "parent": 243, "children": [], "start_point": {"row": 152, "column": 30}, "end_point": {"row": 152, "column": 33}}, {"id": 246, "type": "call_expression", "text": "ssert(ack);", "parent": 233, "children": [247, 248], "start_point": {"row": 154, "column": 1}, "end_point": {"row": 154, "column": 12}}, {"id": 247, "type": "identifier", "text": "ssert(", "parent": 246, "children": [], "start_point": {"row": 154, "column": 1}, "end_point": {"row": 154, "column": 7}}, {"id": 248, "type": "argument_list", "text": "ack);", "parent": 246, "children": [249], "start_point": {"row": 154, "column": 7}, "end_point": {"row": 154, "column": 12}}, {"id": 249, "type": "identifier", "text": "ck)", "parent": 248, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 11}}, {"id": 250, "type": "if_statement", "text": "f (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire ack lock.\\n\");\n", "parent": 233, "children": [251], "start_point": {"row": 157, "column": 1}, "end_point": {"row": 158, "column": 46}}, {"id": 251, "type": "parenthesized_expression", "text": "pthread_mutex_lock(&ack->lock))\n", "parent": 250, "children": [252], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 36}}, {"id": 252, "type": "call_expression", "text": "thread_mutex_lock(&ack->lock))", "parent": 251, "children": [253, 254], "start_point": {"row": 157, "column": 5}, "end_point": {"row": 157, "column": 35}}, {"id": 253, "type": "identifier", "text": "thread_mutex_lock(", "parent": 252, "children": [], "start_point": {"row": 157, "column": 5}, "end_point": {"row": 157, "column": 23}}, {"id": 254, "type": "argument_list", "text": "&ack->lock))", "parent": 252, "children": [255], "start_point": {"row": 157, "column": 23}, "end_point": {"row": 157, "column": 35}}, {"id": 255, "type": "pointer_expression", "text": "ack->lock)", "parent": 254, "children": [256, 257], "start_point": {"row": 157, "column": 24}, "end_point": {"row": 157, "column": 34}}, {"id": 256, "type": "&", "text": "a", "parent": 255, "children": [], "start_point": {"row": 157, "column": 24}, "end_point": {"row": 157, "column": 25}}, {"id": 257, "type": "field_expression", "text": "ck->lock)", "parent": 255, "children": [258, 259, 260], "start_point": {"row": 157, "column": 25}, "end_point": {"row": 157, "column": 34}}, {"id": 258, "type": "identifier", "text": "ck-", "parent": 257, "children": [], "start_point": {"row": 157, "column": 25}, "end_point": {"row": 157, "column": 28}}, {"id": 259, "type": "->", "text": ">l", "parent": 257, "children": [], "start_point": {"row": 157, "column": 28}, "end_point": {"row": 157, "column": 30}}, {"id": 260, "type": "field_identifier", "text": "ock)", "parent": 257, "children": [], "start_point": {"row": 157, "column": 30}, "end_point": {"row": 157, "column": 34}}, {"id": 261, "type": "call_expression", "text": "osix_panic(\"Unable to aquire ack lock.\\n\");", "parent": 250, "children": [262, 263], "start_point": {"row": 158, "column": 2}, "end_point": {"row": 158, "column": 45}}, {"id": 262, "type": "identifier", "text": "osix_panic(", "parent": 261, "children": [], "start_point": {"row": 158, "column": 2}, "end_point": {"row": 158, "column": 13}}, {"id": 263, "type": "argument_list", "text": "\"Unable to aquire ack lock.\\n\");", "parent": 261, "children": [264], "start_point": {"row": 158, "column": 13}, "end_point": {"row": 158, "column": 45}}, {"id": 264, "type": "string_literal", "text": "Unable to aquire ack lock.\\n\")", "parent": 263, "children": [265], "start_point": {"row": 158, "column": 14}, "end_point": {"row": 158, "column": 44}}, {"id": 265, "type": "escape_sequence", "text": "n\"", "parent": 264, "children": [], "start_point": {"row": 158, "column": 41}, "end_point": {"row": 158, "column": 43}}, {"id": 266, "type": "while_statement", "text": "hile (ack->acked < num)\n\t{\n\t\t/* Wait. */\n\t\tif (pthread_cond_wait(&ack->signal, &ack->lock))\n\t\t\tposix_panic(\"Unable to wait for ack.\\n\");\n\t}\n", "parent": 233, "children": [267], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 166, "column": 2}}, {"id": 267, "type": "parenthesized_expression", "text": "ack->acked < num)\n", "parent": 266, "children": [268], "start_point": {"row": 161, "column": 7}, "end_point": {"row": 161, "column": 25}}, {"id": 268, "type": "binary_expression", "text": "ck->acked < num)", "parent": 267, "children": [269, 273, 274], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 24}}, {"id": 269, "type": "field_expression", "text": "ck->acked ", "parent": 268, "children": [270, 271, 272], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 18}}, {"id": 270, "type": "identifier", "text": "ck-", "parent": 269, "children": [], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 11}}, {"id": 271, "type": "->", "text": ">a", "parent": 269, "children": [], "start_point": {"row": 161, "column": 11}, "end_point": {"row": 161, "column": 13}}, {"id": 272, "type": "field_identifier", "text": "cked ", "parent": 269, "children": [], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 18}}, {"id": 273, "type": "<", "text": " ", "parent": 268, "children": [], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 20}}, {"id": 274, "type": "identifier", "text": "um)", "parent": 268, "children": [], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 24}}, {"id": 275, "type": "if_statement", "text": "f (pthread_cond_wait(&ack->signal, &ack->lock))\n\t\t\tposix_panic(\"Unable to wait for ack.\\n\");\n", "parent": 266, "children": [276], "start_point": {"row": 164, "column": 2}, "end_point": {"row": 165, "column": 44}}, {"id": 276, "type": "parenthesized_expression", "text": "pthread_cond_wait(&ack->signal, &ack->lock))\n", "parent": 275, "children": [277], "start_point": {"row": 164, "column": 5}, "end_point": {"row": 164, "column": 50}}, {"id": 277, "type": "call_expression", "text": "thread_cond_wait(&ack->signal, &ack->lock))", "parent": 276, "children": [278, 279], "start_point": {"row": 164, "column": 6}, "end_point": {"row": 164, "column": 49}}, {"id": 278, "type": "identifier", "text": "thread_cond_wait(", "parent": 277, "children": [], "start_point": {"row": 164, "column": 6}, "end_point": {"row": 164, "column": 23}}, {"id": 279, "type": "argument_list", "text": "&ack->signal, &ack->lock))", "parent": 277, "children": [280, 286], "start_point": {"row": 164, "column": 23}, "end_point": {"row": 164, "column": 49}}, {"id": 280, "type": "pointer_expression", "text": "ack->signal,", "parent": 279, "children": [281, 282], "start_point": {"row": 164, "column": 24}, "end_point": {"row": 164, "column": 36}}, {"id": 281, "type": "&", "text": "a", "parent": 280, "children": [], "start_point": {"row": 164, "column": 24}, "end_point": {"row": 164, "column": 25}}, {"id": 282, "type": "field_expression", "text": "ck->signal,", "parent": 280, "children": [283, 284, 285], "start_point": {"row": 164, "column": 25}, "end_point": {"row": 164, "column": 36}}, {"id": 283, "type": "identifier", "text": "ck-", "parent": 282, "children": [], "start_point": {"row": 164, "column": 25}, "end_point": {"row": 164, "column": 28}}, {"id": 284, "type": "->", "text": ">s", "parent": 282, "children": [], "start_point": {"row": 164, "column": 28}, "end_point": {"row": 164, "column": 30}}, {"id": 285, "type": "field_identifier", "text": "ignal,", "parent": 282, "children": [], "start_point": {"row": 164, "column": 30}, "end_point": {"row": 164, "column": 36}}, {"id": 286, "type": "pointer_expression", "text": "ack->lock)", "parent": 279, "children": [287, 288], "start_point": {"row": 164, "column": 38}, "end_point": {"row": 164, "column": 48}}, {"id": 287, "type": "&", "text": "a", "parent": 286, "children": [], "start_point": {"row": 164, "column": 38}, "end_point": {"row": 164, "column": 39}}, {"id": 288, "type": "field_expression", "text": "ck->lock)", "parent": 286, "children": [289, 290, 291], "start_point": {"row": 164, "column": 39}, "end_point": {"row": 164, "column": 48}}, {"id": 289, "type": "identifier", "text": "ck-", "parent": 288, "children": [], "start_point": {"row": 164, "column": 39}, "end_point": {"row": 164, "column": 42}}, {"id": 290, "type": "->", "text": ">l", "parent": 288, "children": [], "start_point": {"row": 164, "column": 42}, "end_point": {"row": 164, "column": 44}}, {"id": 291, "type": "field_identifier", "text": "ock)", "parent": 288, "children": [], "start_point": {"row": 164, "column": 44}, "end_point": {"row": 164, "column": 48}}, {"id": 292, "type": "call_expression", "text": "osix_panic(\"Unable to wait for ack.\\n\");", "parent": 275, "children": [293, 294], "start_point": {"row": 165, "column": 3}, "end_point": {"row": 165, "column": 43}}, {"id": 293, "type": "identifier", "text": "osix_panic(", "parent": 292, "children": [], "start_point": {"row": 165, "column": 3}, "end_point": {"row": 165, "column": 14}}, {"id": 294, "type": "argument_list", "text": "\"Unable to wait for ack.\\n\");", "parent": 292, "children": [295], "start_point": {"row": 165, "column": 14}, "end_point": {"row": 165, "column": 43}}, {"id": 295, "type": "string_literal", "text": "Unable to wait for ack.\\n\")", "parent": 294, "children": [296], "start_point": {"row": 165, "column": 15}, "end_point": {"row": 165, "column": 42}}, {"id": 296, "type": "escape_sequence", "text": "n\"", "parent": 295, "children": [], "start_point": {"row": 165, "column": 39}, "end_point": {"row": 165, "column": 41}}, {"id": 297, "type": "if_statement", "text": "f (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release ack lock.\\n\");\n", "parent": 233, "children": [298], "start_point": {"row": 169, "column": 1}, "end_point": {"row": 170, "column": 47}}, {"id": 298, "type": "parenthesized_expression", "text": "pthread_mutex_unlock(&ack->lock))\n", "parent": 297, "children": [299], "start_point": {"row": 169, "column": 4}, "end_point": {"row": 169, "column": 38}}, {"id": 299, "type": "call_expression", "text": "thread_mutex_unlock(&ack->lock))", "parent": 298, "children": [300, 301], "start_point": {"row": 169, "column": 5}, "end_point": {"row": 169, "column": 37}}, {"id": 300, "type": "identifier", "text": "thread_mutex_unlock(", "parent": 299, "children": [], "start_point": {"row": 169, "column": 5}, "end_point": {"row": 169, "column": 25}}, {"id": 301, "type": "argument_list", "text": "&ack->lock))", "parent": 299, "children": [302], "start_point": {"row": 169, "column": 25}, "end_point": {"row": 169, "column": 37}}, {"id": 302, "type": "pointer_expression", "text": "ack->lock)", "parent": 301, "children": [303, 304], "start_point": {"row": 169, "column": 26}, "end_point": {"row": 169, "column": 36}}, {"id": 303, "type": "&", "text": "a", "parent": 302, "children": [], "start_point": {"row": 169, "column": 26}, "end_point": {"row": 169, "column": 27}}, {"id": 304, "type": "field_expression", "text": "ck->lock)", "parent": 302, "children": [305, 306, 307], "start_point": {"row": 169, "column": 27}, "end_point": {"row": 169, "column": 36}}, {"id": 305, "type": "identifier", "text": "ck-", "parent": 304, "children": [], "start_point": {"row": 169, "column": 27}, "end_point": {"row": 169, "column": 30}}, {"id": 306, "type": "->", "text": ">l", "parent": 304, "children": [], "start_point": {"row": 169, "column": 30}, "end_point": {"row": 169, "column": 32}}, {"id": 307, "type": "field_identifier", "text": "ock)", "parent": 304, "children": [], "start_point": {"row": 169, "column": 32}, "end_point": {"row": 169, "column": 36}}, {"id": 308, "type": "call_expression", "text": "osix_panic(\"Unable to release ack lock.\\n\");", "parent": 297, "children": [309, 310], "start_point": {"row": 170, "column": 2}, "end_point": {"row": 170, "column": 46}}, {"id": 309, "type": "identifier", "text": "osix_panic(", "parent": 308, "children": [], "start_point": {"row": 170, "column": 2}, "end_point": {"row": 170, "column": 13}}, {"id": 310, "type": "argument_list", "text": "\"Unable to release ack lock.\\n\");", "parent": 308, "children": [311], "start_point": {"row": 170, "column": 13}, "end_point": {"row": 170, "column": 46}}, {"id": 311, "type": "string_literal", "text": "Unable to release ack lock.\\n\")", "parent": 310, "children": [312], "start_point": {"row": 170, "column": 14}, "end_point": {"row": 170, "column": 45}}, {"id": 312, "type": "escape_sequence", "text": "n\"", "parent": 311, "children": [], "start_point": {"row": 170, "column": 42}, "end_point": {"row": 170, "column": 44}}, {"id": 313, "type": "function_definition", "text": "nt ack_acked(ack_t *ack)\n{\n\tint acked;\n\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire lock.\\n\");\n\n\t/* Grab an ack if there was one. */\n\tacked = ack->acked;\n\n\t/* Release the lock. */\n\tif (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release lock.\\n\");\n\n\treturn acked;\n}\n", "parent": null, "children": [314, 315], "start_point": {"row": 179, "column": 0}, "end_point": {"row": 195, "column": 1}}, {"id": 314, "type": "primitive_type", "text": "nt ", "parent": 313, "children": [], "start_point": {"row": 179, "column": 0}, "end_point": {"row": 179, "column": 3}}, {"id": 315, "type": "function_declarator", "text": "ck_acked(ack_t *ack)\n", "parent": 313, "children": [316, 317], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 25}}, {"id": 316, "type": "identifier", "text": "ck_acked(", "parent": 315, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 13}}, {"id": 317, "type": "parameter_list", "text": "ack_t *ack)\n", "parent": 315, "children": [318], "start_point": {"row": 179, "column": 13}, "end_point": {"row": 179, "column": 25}}, {"id": 318, "type": "parameter_declaration", "text": "ck_t *ack)", "parent": 317, "children": [319, 320], "start_point": {"row": 179, "column": 14}, "end_point": {"row": 179, "column": 24}}, {"id": 319, "type": "type_identifier", "text": "ck_t ", "parent": 318, "children": [], "start_point": {"row": 179, "column": 14}, "end_point": {"row": 179, "column": 19}}, {"id": 320, "type": "pointer_declarator", "text": "ack)", "parent": 318, "children": [321, 322], "start_point": {"row": 179, "column": 20}, "end_point": {"row": 179, "column": 24}}, {"id": 321, "type": "*", "text": "a", "parent": 320, "children": [], "start_point": {"row": 179, "column": 20}, "end_point": {"row": 179, "column": 21}}, {"id": 322, "type": "identifier", "text": "ck)", "parent": 320, "children": [], "start_point": {"row": 179, "column": 21}, "end_point": {"row": 179, "column": 24}}, {"id": 323, "type": "declaration", "text": "nt acked;\n", "parent": 313, "children": [324, 325], "start_point": {"row": 181, "column": 1}, "end_point": {"row": 181, "column": 11}}, {"id": 324, "type": "primitive_type", "text": "nt ", "parent": 323, "children": [], "start_point": {"row": 181, "column": 1}, "end_point": {"row": 181, "column": 4}}, {"id": 325, "type": "identifier", "text": "cked;", "parent": 323, "children": [], "start_point": {"row": 181, "column": 5}, "end_point": {"row": 181, "column": 10}}, {"id": 326, "type": "if_statement", "text": "f (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire lock.\\n\");\n", "parent": 313, "children": [327], "start_point": {"row": 184, "column": 1}, "end_point": {"row": 185, "column": 42}}, {"id": 327, "type": "parenthesized_expression", "text": "pthread_mutex_lock(&ack->lock))\n", "parent": 326, "children": [328], "start_point": {"row": 184, "column": 4}, "end_point": {"row": 184, "column": 36}}, {"id": 328, "type": "call_expression", "text": "thread_mutex_lock(&ack->lock))", "parent": 327, "children": [329, 330], "start_point": {"row": 184, "column": 5}, "end_point": {"row": 184, "column": 35}}, {"id": 329, "type": "identifier", "text": "thread_mutex_lock(", "parent": 328, "children": [], "start_point": {"row": 184, "column": 5}, "end_point": {"row": 184, "column": 23}}, {"id": 330, "type": "argument_list", "text": "&ack->lock))", "parent": 328, "children": [331], "start_point": {"row": 184, "column": 23}, "end_point": {"row": 184, "column": 35}}, {"id": 331, "type": "pointer_expression", "text": "ack->lock)", "parent": 330, "children": [332, 333], "start_point": {"row": 184, "column": 24}, "end_point": {"row": 184, "column": 34}}, {"id": 332, "type": "&", "text": "a", "parent": 331, "children": [], "start_point": {"row": 184, "column": 24}, "end_point": {"row": 184, "column": 25}}, {"id": 333, "type": "field_expression", "text": "ck->lock)", "parent": 331, "children": [334, 335, 336], "start_point": {"row": 184, "column": 25}, "end_point": {"row": 184, "column": 34}}, {"id": 334, "type": "identifier", "text": "ck-", "parent": 333, "children": [], "start_point": {"row": 184, "column": 25}, "end_point": {"row": 184, "column": 28}}, {"id": 335, "type": "->", "text": ">l", "parent": 333, "children": [], "start_point": {"row": 184, "column": 28}, "end_point": {"row": 184, "column": 30}}, {"id": 336, "type": "field_identifier", "text": "ock)", "parent": 333, "children": [], "start_point": {"row": 184, "column": 30}, "end_point": {"row": 184, "column": 34}}, {"id": 337, "type": "call_expression", "text": "osix_panic(\"Unable to aquire lock.\\n\");", "parent": 326, "children": [338, 339], "start_point": {"row": 185, "column": 2}, "end_point": {"row": 185, "column": 41}}, {"id": 338, "type": "identifier", "text": "osix_panic(", "parent": 337, "children": [], "start_point": {"row": 185, "column": 2}, "end_point": {"row": 185, "column": 13}}, {"id": 339, "type": "argument_list", "text": "\"Unable to aquire lock.\\n\");", "parent": 337, "children": [340], "start_point": {"row": 185, "column": 13}, "end_point": {"row": 185, "column": 41}}, {"id": 340, "type": "string_literal", "text": "Unable to aquire lock.\\n\")", "parent": 339, "children": [341], "start_point": {"row": 185, "column": 14}, "end_point": {"row": 185, "column": 40}}, {"id": 341, "type": "escape_sequence", "text": "n\"", "parent": 340, "children": [], "start_point": {"row": 185, "column": 37}, "end_point": {"row": 185, "column": 39}}, {"id": 342, "type": "assignment_expression", "text": "cked = ack->acked;", "parent": 313, "children": [343, 344, 345], "start_point": {"row": 188, "column": 1}, "end_point": {"row": 188, "column": 19}}, {"id": 343, "type": "identifier", "text": "cked ", "parent": 342, "children": [], "start_point": {"row": 188, "column": 1}, "end_point": {"row": 188, "column": 6}}, {"id": 344, "type": "=", "text": " ", "parent": 342, "children": [], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 8}}, {"id": 345, "type": "field_expression", "text": "ck->acked;", "parent": 342, "children": [346, 347, 348], "start_point": {"row": 188, "column": 9}, "end_point": {"row": 188, "column": 19}}, {"id": 346, "type": "identifier", "text": "ck-", "parent": 345, "children": [], "start_point": {"row": 188, "column": 9}, "end_point": {"row": 188, "column": 12}}, {"id": 347, "type": "->", "text": ">a", "parent": 345, "children": [], "start_point": {"row": 188, "column": 12}, "end_point": {"row": 188, "column": 14}}, {"id": 348, "type": "field_identifier", "text": "cked;", "parent": 345, "children": [], "start_point": {"row": 188, "column": 14}, "end_point": {"row": 188, "column": 19}}, {"id": 349, "type": "if_statement", "text": "f (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release lock.\\n\");\n", "parent": 313, "children": [350], "start_point": {"row": 191, "column": 1}, "end_point": {"row": 192, "column": 43}}, {"id": 350, "type": "parenthesized_expression", "text": "pthread_mutex_unlock(&ack->lock))\n", "parent": 349, "children": [351], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 38}}, {"id": 351, "type": "call_expression", "text": "thread_mutex_unlock(&ack->lock))", "parent": 350, "children": [352, 353], "start_point": {"row": 191, "column": 5}, "end_point": {"row": 191, "column": 37}}, {"id": 352, "type": "identifier", "text": "thread_mutex_unlock(", "parent": 351, "children": [], "start_point": {"row": 191, "column": 5}, "end_point": {"row": 191, "column": 25}}, {"id": 353, "type": "argument_list", "text": "&ack->lock))", "parent": 351, "children": [354], "start_point": {"row": 191, "column": 25}, "end_point": {"row": 191, "column": 37}}, {"id": 354, "type": "pointer_expression", "text": "ack->lock)", "parent": 353, "children": [355, 356], "start_point": {"row": 191, "column": 26}, "end_point": {"row": 191, "column": 36}}, {"id": 355, "type": "&", "text": "a", "parent": 354, "children": [], "start_point": {"row": 191, "column": 26}, "end_point": {"row": 191, "column": 27}}, {"id": 356, "type": "field_expression", "text": "ck->lock)", "parent": 354, "children": [357, 358, 359], "start_point": {"row": 191, "column": 27}, "end_point": {"row": 191, "column": 36}}, {"id": 357, "type": "identifier", "text": "ck-", "parent": 356, "children": [], "start_point": {"row": 191, "column": 27}, "end_point": {"row": 191, "column": 30}}, {"id": 358, "type": "->", "text": ">l", "parent": 356, "children": [], "start_point": {"row": 191, "column": 30}, "end_point": {"row": 191, "column": 32}}, {"id": 359, "type": "field_identifier", "text": "ock)", "parent": 356, "children": [], "start_point": {"row": 191, "column": 32}, "end_point": {"row": 191, "column": 36}}, {"id": 360, "type": "call_expression", "text": "osix_panic(\"Unable to release lock.\\n\");", "parent": 349, "children": [361, 362], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 42}}, {"id": 361, "type": "identifier", "text": "osix_panic(", "parent": 360, "children": [], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 13}}, {"id": 362, "type": "argument_list", "text": "\"Unable to release lock.\\n\");", "parent": 360, "children": [363], "start_point": {"row": 192, "column": 13}, "end_point": {"row": 192, "column": 42}}, {"id": 363, "type": "string_literal", "text": "Unable to release lock.\\n\")", "parent": 362, "children": [364], "start_point": {"row": 192, "column": 14}, "end_point": {"row": 192, "column": 41}}, {"id": 364, "type": "escape_sequence", "text": "n\"", "parent": 363, "children": [], "start_point": {"row": 192, "column": 38}, "end_point": {"row": 192, "column": 40}}, {"id": 365, "type": "return_statement", "text": "eturn acked;\n", "parent": 313, "children": [366], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 194, "column": 14}}, {"id": 366, "type": "identifier", "text": "cked;", "parent": 365, "children": [], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 13}}]}, "node_categories": {"declarations": {"functions": [27, 31, 99, 101, 117, 119, 181, 183, 233, 235, 313, 315], "variables": [18, 21, 24, 34, 36, 104, 122, 186, 238, 243, 318, 323], "classes": [15, 16], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [44, 47, 49, 52, 53, 56, 62, 63, 66, 68, 74, 80, 81, 84, 86, 92, 109, 113, 128, 129, 132, 134, 138, 143, 144, 150, 151, 154, 156, 160, 166, 167, 170, 172, 176, 191, 196, 197, 200, 202, 206, 212, 218, 219, 222, 224, 228, 246, 251, 252, 255, 257, 261, 267, 268, 269, 276, 277, 280, 282, 286, 288, 292, 298, 299, 302, 304, 308, 327, 328, 331, 333, 337, 345, 350, 351, 354, 356, 360], "assignments": [41, 211, 342], "loops": [266], "conditionals": [17, 19, 20, 22, 23, 25, 26, 28, 32, 37, 40, 42, 45, 50, 51, 55, 57, 61, 64, 69, 71, 75, 79, 82, 87, 89, 93, 98, 102, 105, 108, 110, 112, 114, 116, 120, 123, 126, 127, 130, 135, 137, 139, 145, 147, 149, 152, 157, 159, 161, 165, 168, 173, 175, 177, 184, 187, 190, 192, 194, 195, 198, 203, 205, 207, 213, 215, 217, 220, 225, 227, 229, 236, 239, 242, 245, 247, 249, 250, 253, 258, 260, 262, 270, 272, 274, 275, 278, 283, 285, 289, 291, 293, 297, 300, 305, 307, 309, 316, 319, 322, 325, 326, 329, 334, 336, 338, 343, 346, 348, 349, 352, 357, 359, 361, 366], "returns": [97, 365], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 59, 77, 95, 141, 163, 179, 209, 231, 264, 295, 311, 340, 363], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "ck_t *ack_new(void)\n{\n\tack_t *ack;\n\n\t/* Allocate a new ack. */\n\tack = calloc(1, sizeof(ack_t));\n\tif "}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "ck_new(void)\n"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "oid ack_delete(ack_t *ack)\n{\n\tassert(ack);\n\n\t/* Free the mallocs. */\n\tfree(ack);\n}\n"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "ck_delete(ack_t *ack)\n"}, {"node_id": 117, "universal_type": "function", "name": "unknown", "text_snippet": "oid ack_set(ack_t *ack)\n{\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic"}, {"node_id": 119, "universal_type": "function", "name": "unknown", "text_snippet": "ck_set(ack_t *ack)\n"}, {"node_id": 181, "universal_type": "function", "name": "unknown", "text_snippet": "oid ack_clear(ack_t *ack)\n{\n\tassert(ack);\n\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->loc"}, {"node_id": 183, "universal_type": "function", "name": "unknown", "text_snippet": "ck_clear(ack_t *ack)\n"}, {"node_id": 233, "universal_type": "function", "name": "num)", "text_snippet": "oid ack_wait(ack_t *ack, int num)\n{\n\tassert(ack);\n\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&"}, {"node_id": 235, "universal_type": "function", "name": "num)", "text_snippet": "ck_wait(ack_t *ack, int num)\n"}, {"node_id": 313, "universal_type": "function", "name": "acked;", "text_snippet": "nt ack_acked(ack_t *ack)\n{\n\tint acked;\n\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->lock))"}, {"node_id": 315, "universal_type": "function", "name": "unknown", "text_snippet": "ck_acked(ack_t *ack)\n"}], "class_declarations": [{"node_id": 15, "universal_type": "class", "name": "unknown", "text_snippet": "truct ack_t\n{\n\t/**\n\t * \\brief ack lock.\n\t */\n\tpthread_mutex_t lock;\n\n\t/**\n\t * \\brief ack signal.\n\t *"}, {"node_id": 16, "universal_type": "class", "name": "unknown", "text_snippet": "truct "}], "import_statements": [{"node_id": 0, "text": "include <assert.h>\n#"}, {"node_id": 1, "text": "include "}, {"node_id": 3, "text": "include <string.h>\n#"}, {"node_id": 4, "text": "include "}, {"node_id": 6, "text": "include <stdlib.h>\n\n"}, {"node_id": 7, "text": "include "}, {"node_id": 9, "text": "include <posix/env.h>\n#"}, {"node_id": 10, "text": "include "}, {"node_id": 12, "text": "include <posix/ack.h>\n\n"}, {"node_id": 13, "text": "include "}]}, "original_source_code": "/*\n * Copyright (c) 2007, <NAME>, <NAME>, <NAME>,\n * <NAME>.\n *\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 * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * 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 * * Neither the name of the Lule\u00e5 University of Technology nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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 OF\n * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include <assert.h>\n#include <string.h>\n#include <stdlib.h>\n\n#include <posix/env.h>\n#include <posix/ack.h>\n\n/**\n * \\brief The ack structure.\n */\nstruct ack_t\n{\n\t/**\n\t * \\brief ack lock.\n\t */\n\tpthread_mutex_t lock;\n\n\t/**\n\t * \\brief ack signal.\n\t */\n\tpthread_cond_t signal;\n\n\t/**\n\t * \\brief ack variable.\n\t */\n\tsig_atomic_t acked;\n};\n\n\n/**\n * \\brief Create a new ack.\n *\n * \\return The new ack, will not fail but call posix_panic().\n */\nack_t *ack_new(void)\n{\n\tack_t *ack;\n\n\t/* Allocate a new ack. */\n\tack = calloc(1, sizeof(ack_t));\n\tif (!ack)\n\t\tposix_panic(\"Unable to allocate new ack.\\n\");\n\n\t/* Create the lock. */\n\tif (pthread_mutex_init(&ack->lock, NULL))\n\t\tposix_panic(\"Unable to initialize ack lock.\\n\");\n\n\t/* Create the signal condition. */\n\tif (pthread_cond_init(&ack->signal, NULL))\n\t\tposix_panic(\"Unable to initialize ack cond.\\n\");\n\n\t/* Success. */\n\treturn ack;\n}\n\n/**\n * \\brief Destroy an ack.\n *\n * \\param ack The ack to destroy.\n */\nvoid ack_delete(ack_t *ack)\n{\n\tassert(ack);\n\n\t/* Free the mallocs. */\n\tfree(ack);\n}\n\n/**\n * \\brief Ack an ack.\n *\n * \\param ack the ack to acknoledge.\n */\nvoid ack_set(ack_t *ack)\n{\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire ack lock.\\n\");\n\n\t/* Set the acked to non-zero ie. acked. */\n\tack->acked++;\n\n\t/* Signal the change. */\n\tif (pthread_cond_broadcast(&ack->signal))\n\t\tposix_panic(\"Unable to signal acked state.\\n\");\n\n\t/* Release the lock. */\n\tif (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release ack lock.\\n\");\n}\n\n/**\n * \\brief Reset an ack.\n *\n * \\param ack The acknowledge struct to reset.\n */\nvoid ack_clear(ack_t *ack)\n{\n\tassert(ack);\n\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire ack lock.\\n\");\n\n\t/* Set the acked to 0 ie. not acked. */\n\tack->acked = 0;\n\n\t/* Release the lock. */\n\tif (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release ack lock.\\n\");\n}\n\n/**\n * \\brief Wait for ack condition.\n *\n * \\note\n * \tWhen we return we will have at least the number of acks\n * \trequested.\n *\n * \\param ack The acknowledge struct to wait for.\n * \\param last The number of acks to receive before returning.\n */\nvoid ack_wait(ack_t *ack, int num)\n{\n\tassert(ack);\n\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire ack lock.\\n\");\n\n\t/* Wait until we get an acknoledgment. */\n\twhile (ack->acked < num)\n\t{\n\t\t/* Wait. */\n\t\tif (pthread_cond_wait(&ack->signal, &ack->lock))\n\t\t\tposix_panic(\"Unable to wait for ack.\\n\");\n\t}\n\n\t/* Someone acknoledged us. */\n\tif (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release ack lock.\\n\");\n}\n\n/**\n * \\brief Check if ack is set.\n *\n * \\param ack The acknowledge state to check.\n * \\return zero if no ack was set, non-zero if ack was set.\n */\nint ack_acked(ack_t *ack)\n{\n\tint acked;\n\n\t/* Aquire the lock. */\n\tif (pthread_mutex_lock(&ack->lock))\n\t\tposix_panic(\"Unable to aquire lock.\\n\");\n\n\t/* Grab an ack if there was one. */\n\tacked = ack->acked;\n\n\t/* Release the lock. */\n\tif (pthread_mutex_unlock(&ack->lock))\n\t\tposix_panic(\"Unable to release lock.\\n\");\n\n\treturn acked;\n}\n"}
80,922
c
/* $NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $ */ /* * Copyright (c) 1997 by <NAME> * NASA AMES Research Center. * All rights reserved. * * Based in part upon a prototype version by <NAME> * Copyright (c) 1996, 1998 by <NAME>. * * 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 immediately at the beginning of the file, without modification, * 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. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. */ /* * Autoconfiguration and support routines for the TurboLaser System Bus * found on AlphaServer 8200 and 8400 systems. */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ __KERNEL_RCSID(0, "$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $"); #include "opt_multiprocessor.h" #include <sys/param.h> #include <sys/systm.h> #include <sys/device.h> #include <sys/malloc.h> #include <machine/autoconf.h> #include <machine/rpb.h> #include <machine/pte.h> #include <machine/alpha.h> #include <alpha/alpha/cpuvar.h> #include <alpha/tlsb/tlsbreg.h> #include <alpha/tlsb/tlsbvar.h> #include "locators.h" extern int cputype; #define KV(_addr) ((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr))) static int tlsbmatch __P((struct device *, struct cfdata *, void *)); static void tlsbattach __P((struct device *, struct device *, void *)); struct cfattach tlsb_ca = { sizeof (struct device), tlsbmatch, tlsbattach }; extern struct cfdriver tlsb_cd; static int tlsbprint __P((void *, const char *)); static int tlsbsubmatch __P((struct device *, struct cfdata *, void *)); static char *tlsb_node_type_str __P((u_int32_t)); /* * There can be only one TurboLaser, and we'll overload it * with a bitmap of found turbo laser nodes. Note that * these are just the actual hard TL node IDS that we * discover here, not the virtual IDs that get assigned * to CPUs. During TLSB specific error handling we * only need to know which actual TLSB slots have boards * in them (irrespective of how many CPUs they have). */ int tlsb_found; static int tlsbprint(aux, pnp) void *aux; const char *pnp; { struct tlsb_dev_attach_args *tap = aux; if (pnp) printf("%s at %s node %d", tlsb_node_type_str(tap->ta_dtype), pnp, tap->ta_node); else printf(" node %d: %s", tap->ta_node, tlsb_node_type_str(tap->ta_dtype)); return (UNCONF); } static int tlsbsubmatch(parent, cf, aux) struct device *parent; struct cfdata *cf; void *aux; { struct tlsb_dev_attach_args *tap = aux; if (cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT && cf->cf_loc[TLSBCF_NODE] != tap->ta_node) return (0); return ((*cf->cf_attach->ca_match)(parent, cf, aux)); } static int tlsbmatch(parent, cf, aux) struct device *parent; struct cfdata *cf; void *aux; { struct mainbus_attach_args *ma = aux; /* Make sure we're looking for a TurboLaser. */ if (strcmp(ma->ma_name, tlsb_cd.cd_name) != 0) return (0); /* * Only one instance of TurboLaser allowed, * and only available on 21000 processor type * platforms. */ if ((cputype != ST_DEC_21000) || tlsb_found) return (0); return (1); } static void tlsbattach(parent, self, aux) struct device *parent; struct device *self; void *aux; { struct tlsb_dev_attach_args ta; u_int32_t tldev; int node; printf("\n"); /* * Attempt to find all devices on the bus, including * CPUs, memory modules, and I/O modules. */ /* * Sigh. I would like to just start off nicely, * but I need to treat I/O modules differently- * The highest priority I/O node has to be in * node #8, and I want to find it *first*, since * it will have the primary disks (most likely) * on it. */ for (node = 0; node <= TLSB_NODE_MAX; ++node) { /* * Check for invalid address. This may not really * be necessary, but what the heck... */ if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))) continue; tldev = TLSB_GET_NODEREG(node, TLDEV); if (tldev == 0) { /* Nothing at this node. */ continue; } /* * Store up that we found something at this node. * We do this so that we don't have to do something * silly at fault time like try a 'baddadr'... */ tlsb_found |= (1 << node); if (TLDEV_ISIOPORT(tldev)) continue; /* not interested right now */ ta.ta_node = node; ta.ta_dtype = TLDEV_DTYPE(tldev); ta.ta_swrev = TLDEV_SWREV(tldev); ta.ta_hwrev = TLDEV_HWREV(tldev); /* * Deal with hooking CPU instances to TurboLaser nodes. */ if (TLDEV_ISCPU(tldev)) { printf("%s node %d: %s\n", self->dv_xname, node, tlsb_node_type_str(tldev)); } /* * Attach any children nodes, including a CPU's GBus */ config_found_sm(self, &ta, tlsbprint, tlsbsubmatch); } /* * *Now* search for I/O nodes (in descending order) */ while (--node > 0) { if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))) continue; tldev = TLSB_GET_NODEREG(node, TLDEV); if (tldev == 0) { continue; } if (TLDEV_ISIOPORT(tldev)) { #if defined(MULTIPROCESSOR) /* * XXX Eventually, we want to select a secondary * XXX processor on which to field interrupts for * XXX this node. However, we just send them to * XXX the primary CPU for now. * * XXX Maybe multiple CPUs? Does the hardware * XXX round-robin, or check the length of the * XXX per-CPU interrupt queue? */ printf("%s node %d: routing interrupts to %s\n", self->dv_xname, node, cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname); TLSB_PUT_NODEREG(node, TLCPUMASK, (1UL << hwrpb->rpb_primary_cpu_id)); #else /* * Make sure interrupts are sent to the primary CPU. */ TLSB_PUT_NODEREG(node, TLCPUMASK, (1UL << hwrpb->rpb_primary_cpu_id)); #endif /* MULTIPROCESSOR */ ta.ta_node = node; ta.ta_dtype = TLDEV_DTYPE(tldev); ta.ta_swrev = TLDEV_SWREV(tldev); ta.ta_hwrev = TLDEV_HWREV(tldev); config_found_sm(self, &ta, tlsbprint, tlsbsubmatch); } } } static char * tlsb_node_type_str(dtype) u_int32_t dtype; { static char tlsb_line[64]; switch (dtype & TLDEV_DTYPE_MASK) { case TLDEV_DTYPE_KFTHA: return ("KFTHA I/O interface"); case TLDEV_DTYPE_KFTIA: return ("KFTIA I/O interface"); case TLDEV_DTYPE_MS7CC: return ("MS7CC Memory Module"); case TLDEV_DTYPE_SCPU4: return ("Single CPU, 4MB cache"); case TLDEV_DTYPE_SCPU16: return ("Single CPU, 16MB cache"); case TLDEV_DTYPE_DCPU4: return ("Dual CPU, 4MB cache"); case TLDEV_DTYPE_DCPU16: return ("Dual CPU, 16MB cache"); default: bzero(tlsb_line, sizeof(tlsb_line)); sprintf(tlsb_line, "unknown, dtype 0x%x", dtype); return (tlsb_line); } /* NOTREACHED */ }
31.2
245
(translation_unit) "/* $NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $ */\n/*\n * Copyright (c) 1997 by <NAME>\n * NASA AMES Research Center.\n * All rights reserved.\n *\n * Based in part upon a prototype version by <NAME>\n * Copyright (c) 1996, 1998 by <NAME>.\n *\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 immediately at the beginning of the file, without modification,\n * 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 * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n * 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 AUTHOR OR CONTRIBUTORS BE LIABLE FOR\n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n */\n\n/*\n * Autoconfiguration and support routines for the TurboLaser System Bus\n * found on AlphaServer 8200 and 8400 systems.\n */\n\n#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */\n\n__KERNEL_RCSID(0, "$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $");\n\n#include "opt_multiprocessor.h"\n\n#include <sys/param.h>\n#include <sys/systm.h>\n#include <sys/device.h>\n#include <sys/malloc.h>\n\n#include <machine/autoconf.h>\n#include <machine/rpb.h>\n#include <machine/pte.h>\n#include <machine/alpha.h>\n\n#include <alpha/alpha/cpuvar.h>\n\n#include <alpha/tlsb/tlsbreg.h>\n#include <alpha/tlsb/tlsbvar.h>\n\n#include "locators.h"\n\nextern int cputype;\n\n#define KV(_addr) ((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))\n\nstatic int tlsbmatch __P((struct device *, struct cfdata *, void *));\nstatic void tlsbattach __P((struct device *, struct device *, void *));\n\nstruct cfattach tlsb_ca = {\n sizeof (struct device), tlsbmatch, tlsbattach\n};\n\nextern struct cfdriver tlsb_cd;\n\nstatic int tlsbprint __P((void *, const char *));\nstatic int tlsbsubmatch __P((struct device *, struct cfdata *, void *));\nstatic char *tlsb_node_type_str __P((u_int32_t));\n\n/*\n * There can be only one TurboLaser, and we'll overload it\n * with a bitmap of found turbo laser nodes. Note that\n * these are just the actual hard TL node IDS that we\n * discover here, not the virtual IDs that get assigned\n * to CPUs. During TLSB specific error handling we\n * only need to know which actual TLSB slots have boards\n * in them (irrespective of how many CPUs they have).\n */\nint tlsb_found;\n\nstatic int\ntlsbprint(aux, pnp)\n void *aux;\n const char *pnp;\n{\n struct tlsb_dev_attach_args *tap = aux;\n\n if (pnp)\n printf("%s at %s node %d", tlsb_node_type_str(tap->ta_dtype),\n pnp, tap->ta_node);\n else\n printf(" node %d: %s", tap->ta_node,\n tlsb_node_type_str(tap->ta_dtype));\n\n return (UNCONF);\n}\n\nstatic int\ntlsbsubmatch(parent, cf, aux)\n struct device *parent;\n struct cfdata *cf;\n void *aux;\n{\n struct tlsb_dev_attach_args *tap = aux;\n\n if (cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n cf->cf_loc[TLSBCF_NODE] != tap->ta_node)\n return (0);\n\n return ((*cf->cf_attach->ca_match)(parent, cf, aux));\n}\n\nstatic int\ntlsbmatch(parent, cf, aux)\n struct device *parent;\n struct cfdata *cf;\n void *aux;\n{\n struct mainbus_attach_args *ma = aux;\n\n /* Make sure we're looking for a TurboLaser. */\n if (strcmp(ma->ma_name, tlsb_cd.cd_name) != 0)\n return (0);\n\n /*\n * Only one instance of TurboLaser allowed,\n * and only available on 21000 processor type\n * platforms.\n */\n if ((cputype != ST_DEC_21000) || tlsb_found)\n return (0);\n\n return (1);\n}\n\nstatic void\ntlsbattach(parent, self, aux)\n struct device *parent;\n struct device *self;\n void *aux;\n{\n struct tlsb_dev_attach_args ta;\n u_int32_t tldev;\n int node;\n\n printf("\n");\n\n /*\n * Attempt to find all devices on the bus, including\n * CPUs, memory modules, and I/O modules.\n */\n\n /*\n * Sigh. I would like to just start off nicely,\n * but I need to treat I/O modules differently-\n * The highest priority I/O node has to be in\n * node #8, and I want to find it *first*, since\n * it will have the primary disks (most likely)\n * on it.\n */\n for (node = 0; node <= TLSB_NODE_MAX; ++node) {\n /*\n * Check for invalid address. This may not really\n * be necessary, but what the heck...\n */\n if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;\n tldev = TLSB_GET_NODEREG(node, TLDEV);\n if (tldev == 0) {\n /* Nothing at this node. */\n continue;\n }\n /*\n * Store up that we found something at this node.\n * We do this so that we don't have to do something\n * silly at fault time like try a 'baddadr'...\n */\n tlsb_found |= (1 << node);\n if (TLDEV_ISIOPORT(tldev))\n continue; /* not interested right now */\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n\n /*\n * Deal with hooking CPU instances to TurboLaser nodes.\n */\n if (TLDEV_ISCPU(tldev)) {\n printf("%s node %d: %s\n", self->dv_xname,\n node, tlsb_node_type_str(tldev));\n }\n /*\n * Attach any children nodes, including a CPU's GBus\n */\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }\n /*\n * *Now* search for I/O nodes (in descending order)\n */\n while (--node > 0) {\n if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;\n tldev = TLSB_GET_NODEREG(node, TLDEV);\n if (tldev == 0) {\n continue;\n }\n if (TLDEV_ISIOPORT(tldev)) {\n#if defined(MULTIPROCESSOR)\n /*\n * XXX Eventually, we want to select a secondary\n * XXX processor on which to field interrupts for\n * XXX this node. However, we just send them to\n * XXX the primary CPU for now.\n *\n * XXX Maybe multiple CPUs? Does the hardware\n * XXX round-robin, or check the length of the\n * XXX per-CPU interrupt queue?\n */\n printf("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n /*\n * Make sure interrupts are sent to the primary CPU.\n */\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }\n }\n}\n\nstatic char *\ntlsb_node_type_str(dtype)\n u_int32_t dtype;\n{\n static char tlsb_line[64];\n\n switch (dtype & TLDEV_DTYPE_MASK) {\n case TLDEV_DTYPE_KFTHA:\n return ("KFTHA I/O interface");\n\n case TLDEV_DTYPE_KFTIA:\n return ("KFTIA I/O interface");\n\n case TLDEV_DTYPE_MS7CC:\n return ("MS7CC Memory Module");\n\n case TLDEV_DTYPE_SCPU4:\n return ("Single CPU, 4MB cache");\n\n case TLDEV_DTYPE_SCPU16:\n return ("Single CPU, 16MB cache");\n\n case TLDEV_DTYPE_DCPU4:\n return ("Dual CPU, 4MB cache");\n\n case TLDEV_DTYPE_DCPU16:\n return ("Dual CPU, 16MB cache");\n\n default:\n bzero(tlsb_line, sizeof(tlsb_line));\n sprintf(tlsb_line, "unknown, dtype 0x%x", dtype);\n return (tlsb_line);\n }\n /* NOTREACHED */\n}\n" (comment) "/* $NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $ */" (comment) "/*\n * Copyright (c) 1997 by <NAME>\n * NASA AMES Research Center.\n * All rights reserved.\n *\n * Based in part upon a prototype version by <NAME>\n * Copyright (c) 1996, 1998 by <NAME>.\n *\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 immediately at the beginning of the file, without modification,\n * 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 * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n * 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 AUTHOR OR CONTRIBUTORS BE LIABLE FOR\n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n */" (comment) "/*\n * Autoconfiguration and support routines for the TurboLaser System Bus\n * found on AlphaServer 8200 and 8400 systems.\n */" (preproc_include) "#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */\n" (#include) "#include" (system_lib_string) "<sys/cdefs.h>" (comment) "/* RCS ID & Copyright macro defns */" (expression_statement) "__KERNEL_RCSID(0, "$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $");" (call_expression) "__KERNEL_RCSID(0, "$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $")" (identifier) "__KERNEL_RCSID" (argument_list) "(0, "$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $")" (() "(" (number_literal) "0" (,) "," (string_literal) ""$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $"" (") """ (string_content) "$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $" (") """ ()) ")" (;) ";" (preproc_include) "#include "opt_multiprocessor.h"\n" (#include) "#include" (string_literal) ""opt_multiprocessor.h"" (") """ (string_content) "opt_multiprocessor.h" (") """ (preproc_include) "#include <sys/param.h>\n" (#include) "#include" (system_lib_string) "<sys/param.h>" (preproc_include) "#include <sys/systm.h>\n" (#include) "#include" (system_lib_string) "<sys/systm.h>" (preproc_include) "#include <sys/device.h>\n" (#include) "#include" (system_lib_string) "<sys/device.h>" (preproc_include) "#include <sys/malloc.h>\n" (#include) "#include" (system_lib_string) "<sys/malloc.h>" (preproc_include) "#include <machine/autoconf.h>\n" (#include) "#include" (system_lib_string) "<machine/autoconf.h>" (preproc_include) "#include <machine/rpb.h>\n" (#include) "#include" (system_lib_string) "<machine/rpb.h>" (preproc_include) "#include <machine/pte.h>\n" (#include) "#include" (system_lib_string) "<machine/pte.h>" (preproc_include) "#include <machine/alpha.h>\n" (#include) "#include" (system_lib_string) "<machine/alpha.h>" (preproc_include) "#include <alpha/alpha/cpuvar.h>\n" (#include) "#include" (system_lib_string) "<alpha/alpha/cpuvar.h>" (preproc_include) "#include <alpha/tlsb/tlsbreg.h>\n" (#include) "#include" (system_lib_string) "<alpha/tlsb/tlsbreg.h>" (preproc_include) "#include <alpha/tlsb/tlsbvar.h>\n" (#include) "#include" (system_lib_string) "<alpha/tlsb/tlsbvar.h>" (preproc_include) "#include "locators.h"\n" (#include) "#include" (string_literal) ""locators.h"" (") """ (string_content) "locators.h" (") """ (declaration) "extern int cputype;" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "int" (identifier) "cputype" (;) ";" (preproc_function_def) "#define KV(_addr) ((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))\n" (#define) "#define" (identifier) "KV" (preproc_params) "(_addr)" (() "(" (identifier) "_addr" ()) ")" (preproc_arg) "((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))" (declaration) "static int tlsbmatch" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (identifier) "tlsbmatch" (;) "" (expression_statement) "__P((struct device *, struct cfdata *, void *));" (call_expression) "__P((struct device *, struct cfdata *, void *))" (identifier) "__P" (argument_list) "((struct device *, struct cfdata *, void *))" (() "(" (cast_expression) "(struct device *, struct cfdata *, void *)" (() "(" (ERROR) "struct device *, struct cfdata *," (type_descriptor) "struct device *" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "struct cfdata *" (struct_specifier) "struct cfdata" (struct) "struct" (type_identifier) "cfdata" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "" ()) ")" (;) ";" (declaration) "static void tlsbattach" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (identifier) "tlsbattach" (;) "" (expression_statement) "__P((struct device *, struct device *, void *));" (call_expression) "__P((struct device *, struct device *, void *))" (identifier) "__P" (argument_list) "((struct device *, struct device *, void *))" (() "(" (cast_expression) "(struct device *, struct device *, void *)" (() "(" (ERROR) "struct device *, struct device *," (type_descriptor) "struct device *" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "struct device *" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "" ()) ")" (;) ";" (declaration) "struct cfattach tlsb_ca = {\n sizeof (struct device), tlsbmatch, tlsbattach\n};" (struct_specifier) "struct cfattach" (struct) "struct" (type_identifier) "cfattach" (init_declarator) "tlsb_ca = {\n sizeof (struct device), tlsbmatch, tlsbattach\n}" (identifier) "tlsb_ca" (=) "=" (initializer_list) "{\n sizeof (struct device), tlsbmatch, tlsbattach\n}" ({) "{" (sizeof_expression) "sizeof (struct device)" (sizeof) "sizeof" (() "(" (type_descriptor) "struct device" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" ()) ")" (,) "," (identifier) "tlsbmatch" (,) "," (identifier) "tlsbattach" (}) "}" (;) ";" (declaration) "extern struct cfdriver tlsb_cd;" (storage_class_specifier) "extern" (extern) "extern" (struct_specifier) "struct cfdriver" (struct) "struct" (type_identifier) "cfdriver" (identifier) "tlsb_cd" (;) ";" (declaration) "static int tlsbprint" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (identifier) "tlsbprint" (;) "" (expression_statement) "__P((void *, const char *));" (call_expression) "__P((void *, const char *))" (identifier) "__P" (argument_list) "((void *, const char *))" (() "(" (cast_expression) "(void *, const char *)" (() "(" (ERROR) "void *," (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "const char *" (type_qualifier) "const" (const) "const" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "" ()) ")" (;) ";" (declaration) "static int tlsbsubmatch" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (identifier) "tlsbsubmatch" (;) "" (expression_statement) "__P((struct device *, struct cfdata *, void *));" (call_expression) "__P((struct device *, struct cfdata *, void *))" (identifier) "__P" (argument_list) "((struct device *, struct cfdata *, void *))" (() "(" (cast_expression) "(struct device *, struct cfdata *, void *)" (() "(" (ERROR) "struct device *, struct cfdata *," (type_descriptor) "struct device *" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "struct cfdata *" (struct_specifier) "struct cfdata" (struct) "struct" (type_identifier) "cfdata" (abstract_pointer_declarator) "*" (*) "*" (,) "," (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "" ()) ")" (;) ";" (declaration) "static char *tlsb_node_type_str" (storage_class_specifier) "static" (static) "static" (primitive_type) "char" (pointer_declarator) "*tlsb_node_type_str" (*) "*" (identifier) "tlsb_node_type_str" (;) "" (expression_statement) "__P((u_int32_t));" (call_expression) "__P((u_int32_t))" (identifier) "__P" (argument_list) "((u_int32_t))" (() "(" (parenthesized_expression) "(u_int32_t)" (() "(" (identifier) "u_int32_t" ()) ")" ()) ")" (;) ";" (comment) "/*\n * There can be only one TurboLaser, and we'll overload it\n * with a bitmap of found turbo laser nodes. Note that\n * these are just the actual hard TL node IDS that we\n * discover here, not the virtual IDs that get assigned\n * to CPUs. During TLSB specific error handling we\n * only need to know which actual TLSB slots have boards\n * in them (irrespective of how many CPUs they have).\n */" (declaration) "int tlsb_found;" (primitive_type) "int" (identifier) "tlsb_found" (;) ";" (function_definition) "static int\ntlsbprint(aux, pnp)\n void *aux;\n const char *pnp;\n{\n struct tlsb_dev_attach_args *tap = aux;\n\n if (pnp)\n printf("%s at %s node %d", tlsb_node_type_str(tap->ta_dtype),\n pnp, tap->ta_node);\n else\n printf(" node %d: %s", tap->ta_node,\n tlsb_node_type_str(tap->ta_dtype));\n\n return (UNCONF);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "tlsbprint(aux, pnp)" (identifier) "tlsbprint" (parameter_list) "(aux, pnp)" (() "(" (identifier) "aux" (,) "," (identifier) "pnp" ()) ")" (declaration) "void *aux;" (primitive_type) "void" (pointer_declarator) "*aux" (*) "*" (identifier) "aux" (;) ";" (declaration) "const char *pnp;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*pnp" (*) "*" (identifier) "pnp" (;) ";" (compound_statement) "{\n struct tlsb_dev_attach_args *tap = aux;\n\n if (pnp)\n printf("%s at %s node %d", tlsb_node_type_str(tap->ta_dtype),\n pnp, tap->ta_node);\n else\n printf(" node %d: %s", tap->ta_node,\n tlsb_node_type_str(tap->ta_dtype));\n\n return (UNCONF);\n}" ({) "{" (declaration) "struct tlsb_dev_attach_args *tap = aux;" (struct_specifier) "struct tlsb_dev_attach_args" (struct) "struct" (type_identifier) "tlsb_dev_attach_args" (init_declarator) "*tap = aux" (pointer_declarator) "*tap" (*) "*" (identifier) "tap" (=) "=" (identifier) "aux" (;) ";" (if_statement) "if (pnp)\n printf("%s at %s node %d", tlsb_node_type_str(tap->ta_dtype),\n pnp, tap->ta_node);\n else\n printf(" node %d: %s", tap->ta_node,\n tlsb_node_type_str(tap->ta_dtype));" (if) "if" (parenthesized_expression) "(pnp)" (() "(" (identifier) "pnp" ()) ")" (expression_statement) "printf("%s at %s node %d", tlsb_node_type_str(tap->ta_dtype),\n pnp, tap->ta_node);" (call_expression) "printf("%s at %s node %d", tlsb_node_type_str(tap->ta_dtype),\n pnp, tap->ta_node)" (identifier) "printf" (argument_list) "("%s at %s node %d", tlsb_node_type_str(tap->ta_dtype),\n pnp, tap->ta_node)" (() "(" (string_literal) ""%s at %s node %d"" (") """ (string_content) "%s at %s node %d" (") """ (,) "," (call_expression) "tlsb_node_type_str(tap->ta_dtype)" (identifier) "tlsb_node_type_str" (argument_list) "(tap->ta_dtype)" (() "(" (field_expression) "tap->ta_dtype" (identifier) "tap" (->) "->" (field_identifier) "ta_dtype" ()) ")" (,) "," (identifier) "pnp" (,) "," (field_expression) "tap->ta_node" (identifier) "tap" (->) "->" (field_identifier) "ta_node" ()) ")" (;) ";" (else_clause) "else\n printf(" node %d: %s", tap->ta_node,\n tlsb_node_type_str(tap->ta_dtype));" (else) "else" (expression_statement) "printf(" node %d: %s", tap->ta_node,\n tlsb_node_type_str(tap->ta_dtype));" (call_expression) "printf(" node %d: %s", tap->ta_node,\n tlsb_node_type_str(tap->ta_dtype))" (identifier) "printf" (argument_list) "(" node %d: %s", tap->ta_node,\n tlsb_node_type_str(tap->ta_dtype))" (() "(" (string_literal) "" node %d: %s"" (") """ (string_content) " node %d: %s" (") """ (,) "," (field_expression) "tap->ta_node" (identifier) "tap" (->) "->" (field_identifier) "ta_node" (,) "," (call_expression) "tlsb_node_type_str(tap->ta_dtype)" (identifier) "tlsb_node_type_str" (argument_list) "(tap->ta_dtype)" (() "(" (field_expression) "tap->ta_dtype" (identifier) "tap" (->) "->" (field_identifier) "ta_dtype" ()) ")" ()) ")" (;) ";" (return_statement) "return (UNCONF);" (return) "return" (parenthesized_expression) "(UNCONF)" (() "(" (identifier) "UNCONF" ()) ")" (;) ";" (}) "}" (function_definition) "static int\ntlsbsubmatch(parent, cf, aux)\n struct device *parent;\n struct cfdata *cf;\n void *aux;\n{\n struct tlsb_dev_attach_args *tap = aux;\n\n if (cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n cf->cf_loc[TLSBCF_NODE] != tap->ta_node)\n return (0);\n\n return ((*cf->cf_attach->ca_match)(parent, cf, aux));\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "tlsbsubmatch(parent, cf, aux)" (identifier) "tlsbsubmatch" (parameter_list) "(parent, cf, aux)" (() "(" (identifier) "parent" (,) "," (identifier) "cf" (,) "," (identifier) "aux" ()) ")" (declaration) "struct device *parent;" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" (;) ";" (declaration) "struct cfdata *cf;" (struct_specifier) "struct cfdata" (struct) "struct" (type_identifier) "cfdata" (pointer_declarator) "*cf" (*) "*" (identifier) "cf" (;) ";" (declaration) "void *aux;" (primitive_type) "void" (pointer_declarator) "*aux" (*) "*" (identifier) "aux" (;) ";" (compound_statement) "{\n struct tlsb_dev_attach_args *tap = aux;\n\n if (cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n cf->cf_loc[TLSBCF_NODE] != tap->ta_node)\n return (0);\n\n return ((*cf->cf_attach->ca_match)(parent, cf, aux));\n}" ({) "{" (declaration) "struct tlsb_dev_attach_args *tap = aux;" (struct_specifier) "struct tlsb_dev_attach_args" (struct) "struct" (type_identifier) "tlsb_dev_attach_args" (init_declarator) "*tap = aux" (pointer_declarator) "*tap" (*) "*" (identifier) "tap" (=) "=" (identifier) "aux" (;) ";" (if_statement) "if (cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n cf->cf_loc[TLSBCF_NODE] != tap->ta_node)\n return (0);" (if) "if" (parenthesized_expression) "(cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n cf->cf_loc[TLSBCF_NODE] != tap->ta_node)" (() "(" (binary_expression) "cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n cf->cf_loc[TLSBCF_NODE] != tap->ta_node" (binary_expression) "cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT" (subscript_expression) "cf->cf_loc[TLSBCF_NODE]" (field_expression) "cf->cf_loc" (identifier) "cf" (->) "->" (field_identifier) "cf_loc" ([) "[" (identifier) "TLSBCF_NODE" (]) "]" (!=) "!=" (identifier) "TLSBCF_NODE_DEFAULT" (&&) "&&" (binary_expression) "cf->cf_loc[TLSBCF_NODE] != tap->ta_node" (subscript_expression) "cf->cf_loc[TLSBCF_NODE]" (field_expression) "cf->cf_loc" (identifier) "cf" (->) "->" (field_identifier) "cf_loc" ([) "[" (identifier) "TLSBCF_NODE" (]) "]" (!=) "!=" (field_expression) "tap->ta_node" (identifier) "tap" (->) "->" (field_identifier) "ta_node" ()) ")" (return_statement) "return (0);" (return) "return" (parenthesized_expression) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (return_statement) "return ((*cf->cf_attach->ca_match)(parent, cf, aux));" (return) "return" (parenthesized_expression) "((*cf->cf_attach->ca_match)(parent, cf, aux))" (() "(" (call_expression) "(*cf->cf_attach->ca_match)(parent, cf, aux)" (parenthesized_expression) "(*cf->cf_attach->ca_match)" (() "(" (pointer_expression) "*cf->cf_attach->ca_match" (*) "*" (field_expression) "cf->cf_attach->ca_match" (field_expression) "cf->cf_attach" (identifier) "cf" (->) "->" (field_identifier) "cf_attach" (->) "->" (field_identifier) "ca_match" ()) ")" (argument_list) "(parent, cf, aux)" (() "(" (identifier) "parent" (,) "," (identifier) "cf" (,) "," (identifier) "aux" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "static int\ntlsbmatch(parent, cf, aux)\n struct device *parent;\n struct cfdata *cf;\n void *aux;\n{\n struct mainbus_attach_args *ma = aux;\n\n /* Make sure we're looking for a TurboLaser. */\n if (strcmp(ma->ma_name, tlsb_cd.cd_name) != 0)\n return (0);\n\n /*\n * Only one instance of TurboLaser allowed,\n * and only available on 21000 processor type\n * platforms.\n */\n if ((cputype != ST_DEC_21000) || tlsb_found)\n return (0);\n\n return (1);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "tlsbmatch(parent, cf, aux)" (identifier) "tlsbmatch" (parameter_list) "(parent, cf, aux)" (() "(" (identifier) "parent" (,) "," (identifier) "cf" (,) "," (identifier) "aux" ()) ")" (declaration) "struct device *parent;" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" (;) ";" (declaration) "struct cfdata *cf;" (struct_specifier) "struct cfdata" (struct) "struct" (type_identifier) "cfdata" (pointer_declarator) "*cf" (*) "*" (identifier) "cf" (;) ";" (declaration) "void *aux;" (primitive_type) "void" (pointer_declarator) "*aux" (*) "*" (identifier) "aux" (;) ";" (compound_statement) "{\n struct mainbus_attach_args *ma = aux;\n\n /* Make sure we're looking for a TurboLaser. */\n if (strcmp(ma->ma_name, tlsb_cd.cd_name) != 0)\n return (0);\n\n /*\n * Only one instance of TurboLaser allowed,\n * and only available on 21000 processor type\n * platforms.\n */\n if ((cputype != ST_DEC_21000) || tlsb_found)\n return (0);\n\n return (1);\n}" ({) "{" (declaration) "struct mainbus_attach_args *ma = aux;" (struct_specifier) "struct mainbus_attach_args" (struct) "struct" (type_identifier) "mainbus_attach_args" (init_declarator) "*ma = aux" (pointer_declarator) "*ma" (*) "*" (identifier) "ma" (=) "=" (identifier) "aux" (;) ";" (comment) "/* Make sure we're looking for a TurboLaser. */" (if_statement) "if (strcmp(ma->ma_name, tlsb_cd.cd_name) != 0)\n return (0);" (if) "if" (parenthesized_expression) "(strcmp(ma->ma_name, tlsb_cd.cd_name) != 0)" (() "(" (binary_expression) "strcmp(ma->ma_name, tlsb_cd.cd_name) != 0" (call_expression) "strcmp(ma->ma_name, tlsb_cd.cd_name)" (identifier) "strcmp" (argument_list) "(ma->ma_name, tlsb_cd.cd_name)" (() "(" (field_expression) "ma->ma_name" (identifier) "ma" (->) "->" (field_identifier) "ma_name" (,) "," (field_expression) "tlsb_cd.cd_name" (identifier) "tlsb_cd" (.) "." (field_identifier) "cd_name" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (return_statement) "return (0);" (return) "return" (parenthesized_expression) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (comment) "/*\n * Only one instance of TurboLaser allowed,\n * and only available on 21000 processor type\n * platforms.\n */" (if_statement) "if ((cputype != ST_DEC_21000) || tlsb_found)\n return (0);" (if) "if" (parenthesized_expression) "((cputype != ST_DEC_21000) || tlsb_found)" (() "(" (binary_expression) "(cputype != ST_DEC_21000) || tlsb_found" (parenthesized_expression) "(cputype != ST_DEC_21000)" (() "(" (binary_expression) "cputype != ST_DEC_21000" (identifier) "cputype" (!=) "!=" (identifier) "ST_DEC_21000" ()) ")" (||) "||" (identifier) "tlsb_found" ()) ")" (return_statement) "return (0);" (return) "return" (parenthesized_expression) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (return_statement) "return (1);" (return) "return" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (function_definition) "static void\ntlsbattach(parent, self, aux)\n struct device *parent;\n struct device *self;\n void *aux;\n{\n struct tlsb_dev_attach_args ta;\n u_int32_t tldev;\n int node;\n\n printf("\n");\n\n /*\n * Attempt to find all devices on the bus, including\n * CPUs, memory modules, and I/O modules.\n */\n\n /*\n * Sigh. I would like to just start off nicely,\n * but I need to treat I/O modules differently-\n * The highest priority I/O node has to be in\n * node #8, and I want to find it *first*, since\n * it will have the primary disks (most likely)\n * on it.\n */\n for (node = 0; node <= TLSB_NODE_MAX; ++node) {\n /*\n * Check for invalid address. This may not really\n * be necessary, but what the heck...\n */\n if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;\n tldev = TLSB_GET_NODEREG(node, TLDEV);\n if (tldev == 0) {\n /* Nothing at this node. */\n continue;\n }\n /*\n * Store up that we found something at this node.\n * We do this so that we don't have to do something\n * silly at fault time like try a 'baddadr'...\n */\n tlsb_found |= (1 << node);\n if (TLDEV_ISIOPORT(tldev))\n continue; /* not interested right now */\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n\n /*\n * Deal with hooking CPU instances to TurboLaser nodes.\n */\n if (TLDEV_ISCPU(tldev)) {\n printf("%s node %d: %s\n", self->dv_xname,\n node, tlsb_node_type_str(tldev));\n }\n /*\n * Attach any children nodes, including a CPU's GBus\n */\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }\n /*\n * *Now* search for I/O nodes (in descending order)\n */\n while (--node > 0) {\n if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;\n tldev = TLSB_GET_NODEREG(node, TLDEV);\n if (tldev == 0) {\n continue;\n }\n if (TLDEV_ISIOPORT(tldev)) {\n#if defined(MULTIPROCESSOR)\n /*\n * XXX Eventually, we want to select a secondary\n * XXX processor on which to field interrupts for\n * XXX this node. However, we just send them to\n * XXX the primary CPU for now.\n *\n * XXX Maybe multiple CPUs? Does the hardware\n * XXX round-robin, or check the length of the\n * XXX per-CPU interrupt queue?\n */\n printf("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n /*\n * Make sure interrupts are sent to the primary CPU.\n */\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "tlsbattach(parent, self, aux)" (identifier) "tlsbattach" (parameter_list) "(parent, self, aux)" (() "(" (identifier) "parent" (,) "," (identifier) "self" (,) "," (identifier) "aux" ()) ")" (declaration) "struct device *parent;" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" (;) ";" (declaration) "struct device *self;" (struct_specifier) "struct device" (struct) "struct" (type_identifier) "device" (pointer_declarator) "*self" (*) "*" (identifier) "self" (;) ";" (declaration) "void *aux;" (primitive_type) "void" (pointer_declarator) "*aux" (*) "*" (identifier) "aux" (;) ";" (compound_statement) "{\n struct tlsb_dev_attach_args ta;\n u_int32_t tldev;\n int node;\n\n printf("\n");\n\n /*\n * Attempt to find all devices on the bus, including\n * CPUs, memory modules, and I/O modules.\n */\n\n /*\n * Sigh. I would like to just start off nicely,\n * but I need to treat I/O modules differently-\n * The highest priority I/O node has to be in\n * node #8, and I want to find it *first*, since\n * it will have the primary disks (most likely)\n * on it.\n */\n for (node = 0; node <= TLSB_NODE_MAX; ++node) {\n /*\n * Check for invalid address. This may not really\n * be necessary, but what the heck...\n */\n if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;\n tldev = TLSB_GET_NODEREG(node, TLDEV);\n if (tldev == 0) {\n /* Nothing at this node. */\n continue;\n }\n /*\n * Store up that we found something at this node.\n * We do this so that we don't have to do something\n * silly at fault time like try a 'baddadr'...\n */\n tlsb_found |= (1 << node);\n if (TLDEV_ISIOPORT(tldev))\n continue; /* not interested right now */\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n\n /*\n * Deal with hooking CPU instances to TurboLaser nodes.\n */\n if (TLDEV_ISCPU(tldev)) {\n printf("%s node %d: %s\n", self->dv_xname,\n node, tlsb_node_type_str(tldev));\n }\n /*\n * Attach any children nodes, including a CPU's GBus\n */\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }\n /*\n * *Now* search for I/O nodes (in descending order)\n */\n while (--node > 0) {\n if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;\n tldev = TLSB_GET_NODEREG(node, TLDEV);\n if (tldev == 0) {\n continue;\n }\n if (TLDEV_ISIOPORT(tldev)) {\n#if defined(MULTIPROCESSOR)\n /*\n * XXX Eventually, we want to select a secondary\n * XXX processor on which to field interrupts for\n * XXX this node. However, we just send them to\n * XXX the primary CPU for now.\n *\n * XXX Maybe multiple CPUs? Does the hardware\n * XXX round-robin, or check the length of the\n * XXX per-CPU interrupt queue?\n */\n printf("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n /*\n * Make sure interrupts are sent to the primary CPU.\n */\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }\n }\n}" ({) "{" (declaration) "struct tlsb_dev_attach_args ta;" (struct_specifier) "struct tlsb_dev_attach_args" (struct) "struct" (type_identifier) "tlsb_dev_attach_args" (identifier) "ta" (;) ";" (declaration) "u_int32_t tldev;" (type_identifier) "u_int32_t" (identifier) "tldev" (;) ";" (declaration) "int node;" (primitive_type) "int" (identifier) "node" (;) ";" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (comment) "/*\n * Attempt to find all devices on the bus, including\n * CPUs, memory modules, and I/O modules.\n */" (comment) "/*\n * Sigh. I would like to just start off nicely,\n * but I need to treat I/O modules differently-\n * The highest priority I/O node has to be in\n * node #8, and I want to find it *first*, since\n * it will have the primary disks (most likely)\n * on it.\n */" (for_statement) "for (node = 0; node <= TLSB_NODE_MAX; ++node) {\n /*\n * Check for invalid address. This may not really\n * be necessary, but what the heck...\n */\n if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;\n tldev = TLSB_GET_NODEREG(node, TLDEV);\n if (tldev == 0) {\n /* Nothing at this node. */\n continue;\n }\n /*\n * Store up that we found something at this node.\n * We do this so that we don't have to do something\n * silly at fault time like try a 'baddadr'...\n */\n tlsb_found |= (1 << node);\n if (TLDEV_ISIOPORT(tldev))\n continue; /* not interested right now */\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n\n /*\n * Deal with hooking CPU instances to TurboLaser nodes.\n */\n if (TLDEV_ISCPU(tldev)) {\n printf("%s node %d: %s\n", self->dv_xname,\n node, tlsb_node_type_str(tldev));\n }\n /*\n * Attach any children nodes, including a CPU's GBus\n */\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }" (for) "for" (() "(" (assignment_expression) "node = 0" (identifier) "node" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "node <= TLSB_NODE_MAX" (identifier) "node" (<=) "<=" (identifier) "TLSB_NODE_MAX" (;) ";" (update_expression) "++node" (++) "++" (identifier) "node" ()) ")" (compound_statement) "{\n /*\n * Check for invalid address. This may not really\n * be necessary, but what the heck...\n */\n if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;\n tldev = TLSB_GET_NODEREG(node, TLDEV);\n if (tldev == 0) {\n /* Nothing at this node. */\n continue;\n }\n /*\n * Store up that we found something at this node.\n * We do this so that we don't have to do something\n * silly at fault time like try a 'baddadr'...\n */\n tlsb_found |= (1 << node);\n if (TLDEV_ISIOPORT(tldev))\n continue; /* not interested right now */\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n\n /*\n * Deal with hooking CPU instances to TurboLaser nodes.\n */\n if (TLDEV_ISCPU(tldev)) {\n printf("%s node %d: %s\n", self->dv_xname,\n node, tlsb_node_type_str(tldev));\n }\n /*\n * Attach any children nodes, including a CPU's GBus\n */\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }" ({) "{" (comment) "/*\n * Check for invalid address. This may not really\n * be necessary, but what the heck...\n */" (if_statement) "if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;" (if) "if" (parenthesized_expression) "(badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))" (() "(" (call_expression) "badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))" (identifier) "badaddr" (argument_list) "(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))" (() "(" (call_expression) "TLSB_NODE_REG_ADDR(node, TLDEV)" (identifier) "TLSB_NODE_REG_ADDR" (argument_list) "(node, TLDEV)" (() "(" (identifier) "node" (,) "," (identifier) "TLDEV" ()) ")" (,) "," (sizeof_expression) "sizeof(u_int32_t)" (sizeof) "sizeof" (parenthesized_expression) "(u_int32_t)" (() "(" (identifier) "u_int32_t" ()) ")" ()) ")" ()) ")" (continue_statement) "continue;" (continue) "continue" (;) ";" (expression_statement) "tldev = TLSB_GET_NODEREG(node, TLDEV);" (assignment_expression) "tldev = TLSB_GET_NODEREG(node, TLDEV)" (identifier) "tldev" (=) "=" (call_expression) "TLSB_GET_NODEREG(node, TLDEV)" (identifier) "TLSB_GET_NODEREG" (argument_list) "(node, TLDEV)" (() "(" (identifier) "node" (,) "," (identifier) "TLDEV" ()) ")" (;) ";" (if_statement) "if (tldev == 0) {\n /* Nothing at this node. */\n continue;\n }" (if) "if" (parenthesized_expression) "(tldev == 0)" (() "(" (binary_expression) "tldev == 0" (identifier) "tldev" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n /* Nothing at this node. */\n continue;\n }" ({) "{" (comment) "/* Nothing at this node. */" (continue_statement) "continue;" (continue) "continue" (;) ";" (}) "}" (comment) "/*\n * Store up that we found something at this node.\n * We do this so that we don't have to do something\n * silly at fault time like try a 'baddadr'...\n */" (expression_statement) "tlsb_found |= (1 << node);" (assignment_expression) "tlsb_found |= (1 << node)" (identifier) "tlsb_found" (|=) "|=" (parenthesized_expression) "(1 << node)" (() "(" (binary_expression) "1 << node" (number_literal) "1" (<<) "<<" (identifier) "node" ()) ")" (;) ";" (if_statement) "if (TLDEV_ISIOPORT(tldev))\n continue;" (if) "if" (parenthesized_expression) "(TLDEV_ISIOPORT(tldev))" (() "(" (call_expression) "TLDEV_ISIOPORT(tldev)" (identifier) "TLDEV_ISIOPORT" (argument_list) "(tldev)" (() "(" (identifier) "tldev" ()) ")" ()) ")" (continue_statement) "continue;" (continue) "continue" (;) ";" (comment) "/* not interested right now */" (expression_statement) "ta.ta_node = node;" (assignment_expression) "ta.ta_node = node" (field_expression) "ta.ta_node" (identifier) "ta" (.) "." (field_identifier) "ta_node" (=) "=" (identifier) "node" (;) ";" (expression_statement) "ta.ta_dtype = TLDEV_DTYPE(tldev);" (assignment_expression) "ta.ta_dtype = TLDEV_DTYPE(tldev)" (field_expression) "ta.ta_dtype" (identifier) "ta" (.) "." (field_identifier) "ta_dtype" (=) "=" (call_expression) "TLDEV_DTYPE(tldev)" (identifier) "TLDEV_DTYPE" (argument_list) "(tldev)" (() "(" (identifier) "tldev" ()) ")" (;) ";" (expression_statement) "ta.ta_swrev = TLDEV_SWREV(tldev);" (assignment_expression) "ta.ta_swrev = TLDEV_SWREV(tldev)" (field_expression) "ta.ta_swrev" (identifier) "ta" (.) "." (field_identifier) "ta_swrev" (=) "=" (call_expression) "TLDEV_SWREV(tldev)" (identifier) "TLDEV_SWREV" (argument_list) "(tldev)" (() "(" (identifier) "tldev" ()) ")" (;) ";" (expression_statement) "ta.ta_hwrev = TLDEV_HWREV(tldev);" (assignment_expression) "ta.ta_hwrev = TLDEV_HWREV(tldev)" (field_expression) "ta.ta_hwrev" (identifier) "ta" (.) "." (field_identifier) "ta_hwrev" (=) "=" (call_expression) "TLDEV_HWREV(tldev)" (identifier) "TLDEV_HWREV" (argument_list) "(tldev)" (() "(" (identifier) "tldev" ()) ")" (;) ";" (comment) "/*\n * Deal with hooking CPU instances to TurboLaser nodes.\n */" (if_statement) "if (TLDEV_ISCPU(tldev)) {\n printf("%s node %d: %s\n", self->dv_xname,\n node, tlsb_node_type_str(tldev));\n }" (if) "if" (parenthesized_expression) "(TLDEV_ISCPU(tldev))" (() "(" (call_expression) "TLDEV_ISCPU(tldev)" (identifier) "TLDEV_ISCPU" (argument_list) "(tldev)" (() "(" (identifier) "tldev" ()) ")" ()) ")" (compound_statement) "{\n printf("%s node %d: %s\n", self->dv_xname,\n node, tlsb_node_type_str(tldev));\n }" ({) "{" (expression_statement) "printf("%s node %d: %s\n", self->dv_xname,\n node, tlsb_node_type_str(tldev));" (call_expression) "printf("%s node %d: %s\n", self->dv_xname,\n node, tlsb_node_type_str(tldev))" (identifier) "printf" (argument_list) "("%s node %d: %s\n", self->dv_xname,\n node, tlsb_node_type_str(tldev))" (() "(" (string_literal) ""%s node %d: %s\n"" (") """ (string_content) "%s node %d: %s" (escape_sequence) "\n" (") """ (,) "," (field_expression) "self->dv_xname" (identifier) "self" (->) "->" (field_identifier) "dv_xname" (,) "," (identifier) "node" (,) "," (call_expression) "tlsb_node_type_str(tldev)" (identifier) "tlsb_node_type_str" (argument_list) "(tldev)" (() "(" (identifier) "tldev" ()) ")" ()) ")" (;) ";" (}) "}" (comment) "/*\n * Attach any children nodes, including a CPU's GBus\n */" (expression_statement) "config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);" (call_expression) "config_found_sm(self, &ta, tlsbprint, tlsbsubmatch)" (identifier) "config_found_sm" (argument_list) "(self, &ta, tlsbprint, tlsbsubmatch)" (() "(" (identifier) "self" (,) "," (pointer_expression) "&ta" (&) "&" (identifier) "ta" (,) "," (identifier) "tlsbprint" (,) "," (identifier) "tlsbsubmatch" ()) ")" (;) ";" (}) "}" (comment) "/*\n * *Now* search for I/O nodes (in descending order)\n */" (while_statement) "while (--node > 0) {\n if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;\n tldev = TLSB_GET_NODEREG(node, TLDEV);\n if (tldev == 0) {\n continue;\n }\n if (TLDEV_ISIOPORT(tldev)) {\n#if defined(MULTIPROCESSOR)\n /*\n * XXX Eventually, we want to select a secondary\n * XXX processor on which to field interrupts for\n * XXX this node. However, we just send them to\n * XXX the primary CPU for now.\n *\n * XXX Maybe multiple CPUs? Does the hardware\n * XXX round-robin, or check the length of the\n * XXX per-CPU interrupt queue?\n */\n printf("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n /*\n * Make sure interrupts are sent to the primary CPU.\n */\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }\n }" (while) "while" (parenthesized_expression) "(--node > 0)" (() "(" (binary_expression) "--node > 0" (update_expression) "--node" (--) "--" (identifier) "node" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;\n tldev = TLSB_GET_NODEREG(node, TLDEV);\n if (tldev == 0) {\n continue;\n }\n if (TLDEV_ISIOPORT(tldev)) {\n#if defined(MULTIPROCESSOR)\n /*\n * XXX Eventually, we want to select a secondary\n * XXX processor on which to field interrupts for\n * XXX this node. However, we just send them to\n * XXX the primary CPU for now.\n *\n * XXX Maybe multiple CPUs? Does the hardware\n * XXX round-robin, or check the length of the\n * XXX per-CPU interrupt queue?\n */\n printf("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n /*\n * Make sure interrupts are sent to the primary CPU.\n */\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }\n }" ({) "{" (if_statement) "if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n continue;" (if) "if" (parenthesized_expression) "(badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))" (() "(" (call_expression) "badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))" (identifier) "badaddr" (argument_list) "(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))" (() "(" (call_expression) "TLSB_NODE_REG_ADDR(node, TLDEV)" (identifier) "TLSB_NODE_REG_ADDR" (argument_list) "(node, TLDEV)" (() "(" (identifier) "node" (,) "," (identifier) "TLDEV" ()) ")" (,) "," (sizeof_expression) "sizeof(u_int32_t)" (sizeof) "sizeof" (parenthesized_expression) "(u_int32_t)" (() "(" (identifier) "u_int32_t" ()) ")" ()) ")" ()) ")" (continue_statement) "continue;" (continue) "continue" (;) ";" (expression_statement) "tldev = TLSB_GET_NODEREG(node, TLDEV);" (assignment_expression) "tldev = TLSB_GET_NODEREG(node, TLDEV)" (identifier) "tldev" (=) "=" (call_expression) "TLSB_GET_NODEREG(node, TLDEV)" (identifier) "TLSB_GET_NODEREG" (argument_list) "(node, TLDEV)" (() "(" (identifier) "node" (,) "," (identifier) "TLDEV" ()) ")" (;) ";" (if_statement) "if (tldev == 0) {\n continue;\n }" (if) "if" (parenthesized_expression) "(tldev == 0)" (() "(" (binary_expression) "tldev == 0" (identifier) "tldev" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n continue;\n }" ({) "{" (continue_statement) "continue;" (continue) "continue" (;) ";" (}) "}" (if_statement) "if (TLDEV_ISIOPORT(tldev)) {\n#if defined(MULTIPROCESSOR)\n /*\n * XXX Eventually, we want to select a secondary\n * XXX processor on which to field interrupts for\n * XXX this node. However, we just send them to\n * XXX the primary CPU for now.\n *\n * XXX Maybe multiple CPUs? Does the hardware\n * XXX round-robin, or check the length of the\n * XXX per-CPU interrupt queue?\n */\n printf("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n /*\n * Make sure interrupts are sent to the primary CPU.\n */\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }" (if) "if" (parenthesized_expression) "(TLDEV_ISIOPORT(tldev))" (() "(" (call_expression) "TLDEV_ISIOPORT(tldev)" (identifier) "TLDEV_ISIOPORT" (argument_list) "(tldev)" (() "(" (identifier) "tldev" ()) ")" ()) ")" (compound_statement) "{\n#if defined(MULTIPROCESSOR)\n /*\n * XXX Eventually, we want to select a secondary\n * XXX processor on which to field interrupts for\n * XXX this node. However, we just send them to\n * XXX the primary CPU for now.\n *\n * XXX Maybe multiple CPUs? Does the hardware\n * XXX round-robin, or check the length of the\n * XXX per-CPU interrupt queue?\n */\n printf("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n /*\n * Make sure interrupts are sent to the primary CPU.\n */\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n ta.ta_node = node;\n ta.ta_dtype = TLDEV_DTYPE(tldev);\n ta.ta_swrev = TLDEV_SWREV(tldev);\n ta.ta_hwrev = TLDEV_HWREV(tldev);\n config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n }" ({) "{" (preproc_if) "#if defined(MULTIPROCESSOR)\n /*\n * XXX Eventually, we want to select a secondary\n * XXX processor on which to field interrupts for\n * XXX this node. However, we just send them to\n * XXX the primary CPU for now.\n *\n * XXX Maybe multiple CPUs? Does the hardware\n * XXX round-robin, or check the length of the\n * XXX per-CPU interrupt queue?\n */\n printf("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n /*\n * Make sure interrupts are sent to the primary CPU.\n */\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));\n#endif" (#if) "#if" (preproc_defined) "defined(MULTIPROCESSOR)" (defined) "defined" (() "(" (identifier) "MULTIPROCESSOR" ()) ")" ( ) "\n" (comment) "/*\n * XXX Eventually, we want to select a secondary\n * XXX processor on which to field interrupts for\n * XXX this node. However, we just send them to\n * XXX the primary CPU for now.\n *\n * XXX Maybe multiple CPUs? Does the hardware\n * XXX round-robin, or check the length of the\n * XXX per-CPU interrupt queue?\n */" (expression_statement) "printf("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);" (call_expression) "printf("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname)" (identifier) "printf" (argument_list) "("%s node %d: routing interrupts to %s\n",\n self->dv_xname, node,\n cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname)" (() "(" (string_literal) ""%s node %d: routing interrupts to %s\n"" (") """ (string_content) "%s node %d: routing interrupts to %s" (escape_sequence) "\n" (") """ (,) "," (field_expression) "self->dv_xname" (identifier) "self" (->) "->" (field_identifier) "dv_xname" (,) "," (identifier) "node" (,) "," (field_expression) "cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname" (field_expression) "cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev" (subscript_expression) "cpu_info[hwrpb->rpb_primary_cpu_id]" (identifier) "cpu_info" ([) "[" (field_expression) "hwrpb->rpb_primary_cpu_id" (identifier) "hwrpb" (->) "->" (field_identifier) "rpb_primary_cpu_id" (]) "]" (.) "." (field_identifier) "ci_dev" (->) "->" (field_identifier) "dv_xname" ()) ")" (;) ";" (expression_statement) "TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));" (call_expression) "TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id))" (identifier) "TLSB_PUT_NODEREG" (argument_list) "(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id))" (() "(" (identifier) "node" (,) "," (identifier) "TLCPUMASK" (,) "," (parenthesized_expression) "(1UL << hwrpb->rpb_primary_cpu_id)" (() "(" (binary_expression) "1UL << hwrpb->rpb_primary_cpu_id" (number_literal) "1UL" (<<) "<<" (field_expression) "hwrpb->rpb_primary_cpu_id" (identifier) "hwrpb" (->) "->" (field_identifier) "rpb_primary_cpu_id" ()) ")" ()) ")" (;) ";" (preproc_else) "#else\n /*\n * Make sure interrupts are sent to the primary CPU.\n */\n TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));" (#else) "#else" (comment) "/*\n * Make sure interrupts are sent to the primary CPU.\n */" (expression_statement) "TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id));" (call_expression) "TLSB_PUT_NODEREG(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id))" (identifier) "TLSB_PUT_NODEREG" (argument_list) "(node, TLCPUMASK,\n (1UL << hwrpb->rpb_primary_cpu_id))" (() "(" (identifier) "node" (,) "," (identifier) "TLCPUMASK" (,) "," (parenthesized_expression) "(1UL << hwrpb->rpb_primary_cpu_id)" (() "(" (binary_expression) "1UL << hwrpb->rpb_primary_cpu_id" (number_literal) "1UL" (<<) "<<" (field_expression) "hwrpb->rpb_primary_cpu_id" (identifier) "hwrpb" (->) "->" (field_identifier) "rpb_primary_cpu_id" ()) ")" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* MULTIPROCESSOR */" (expression_statement) "ta.ta_node = node;" (assignment_expression) "ta.ta_node = node" (field_expression) "ta.ta_node" (identifier) "ta" (.) "." (field_identifier) "ta_node" (=) "=" (identifier) "node" (;) ";" (expression_statement) "ta.ta_dtype = TLDEV_DTYPE(tldev);" (assignment_expression) "ta.ta_dtype = TLDEV_DTYPE(tldev)" (field_expression) "ta.ta_dtype" (identifier) "ta" (.) "." (field_identifier) "ta_dtype" (=) "=" (call_expression) "TLDEV_DTYPE(tldev)" (identifier) "TLDEV_DTYPE" (argument_list) "(tldev)" (() "(" (identifier) "tldev" ()) ")" (;) ";" (expression_statement) "ta.ta_swrev = TLDEV_SWREV(tldev);" (assignment_expression) "ta.ta_swrev = TLDEV_SWREV(tldev)" (field_expression) "ta.ta_swrev" (identifier) "ta" (.) "." (field_identifier) "ta_swrev" (=) "=" (call_expression) "TLDEV_SWREV(tldev)" (identifier) "TLDEV_SWREV" (argument_list) "(tldev)" (() "(" (identifier) "tldev" ()) ")" (;) ";" (expression_statement) "ta.ta_hwrev = TLDEV_HWREV(tldev);" (assignment_expression) "ta.ta_hwrev = TLDEV_HWREV(tldev)" (field_expression) "ta.ta_hwrev" (identifier) "ta" (.) "." (field_identifier) "ta_hwrev" (=) "=" (call_expression) "TLDEV_HWREV(tldev)" (identifier) "TLDEV_HWREV" (argument_list) "(tldev)" (() "(" (identifier) "tldev" ()) ")" (;) ";" (expression_statement) "config_found_sm(self, &ta, tlsbprint, tlsbsubmatch);" (call_expression) "config_found_sm(self, &ta, tlsbprint, tlsbsubmatch)" (identifier) "config_found_sm" (argument_list) "(self, &ta, tlsbprint, tlsbsubmatch)" (() "(" (identifier) "self" (,) "," (pointer_expression) "&ta" (&) "&" (identifier) "ta" (,) "," (identifier) "tlsbprint" (,) "," (identifier) "tlsbsubmatch" ()) ")" (;) ";" (}) "}" (}) "}" (}) "}" (declaration) "static char *\ntlsb_node_type_str(dtype)\n u_int32_t dtype;" (storage_class_specifier) "static" (static) "static" (primitive_type) "char" (pointer_declarator) "*\ntlsb_node_type_str(dtype)\n u_int32_t dtype" (*) "*" (function_declarator) "tlsb_node_type_str(dtype)\n u_int32_t dtype" (identifier) "tlsb_node_type_str" (parameter_list) "(dtype)" (() "(" (parameter_declaration) "dtype" (type_identifier) "dtype" ()) ")" (identifier) "u_int32_t" (identifier) "dtype" (;) ";" (compound_statement) "{\n static char tlsb_line[64];\n\n switch (dtype & TLDEV_DTYPE_MASK) {\n case TLDEV_DTYPE_KFTHA:\n return ("KFTHA I/O interface");\n\n case TLDEV_DTYPE_KFTIA:\n return ("KFTIA I/O interface");\n\n case TLDEV_DTYPE_MS7CC:\n return ("MS7CC Memory Module");\n\n case TLDEV_DTYPE_SCPU4:\n return ("Single CPU, 4MB cache");\n\n case TLDEV_DTYPE_SCPU16:\n return ("Single CPU, 16MB cache");\n\n case TLDEV_DTYPE_DCPU4:\n return ("Dual CPU, 4MB cache");\n\n case TLDEV_DTYPE_DCPU16:\n return ("Dual CPU, 16MB cache");\n\n default:\n bzero(tlsb_line, sizeof(tlsb_line));\n sprintf(tlsb_line, "unknown, dtype 0x%x", dtype);\n return (tlsb_line);\n }\n /* NOTREACHED */\n}" ({) "{" (declaration) "static char tlsb_line[64];" (storage_class_specifier) "static" (static) "static" (primitive_type) "char" (array_declarator) "tlsb_line[64]" (identifier) "tlsb_line" ([) "[" (number_literal) "64" (]) "]" (;) ";" (switch_statement) "switch (dtype & TLDEV_DTYPE_MASK) {\n case TLDEV_DTYPE_KFTHA:\n return ("KFTHA I/O interface");\n\n case TLDEV_DTYPE_KFTIA:\n return ("KFTIA I/O interface");\n\n case TLDEV_DTYPE_MS7CC:\n return ("MS7CC Memory Module");\n\n case TLDEV_DTYPE_SCPU4:\n return ("Single CPU, 4MB cache");\n\n case TLDEV_DTYPE_SCPU16:\n return ("Single CPU, 16MB cache");\n\n case TLDEV_DTYPE_DCPU4:\n return ("Dual CPU, 4MB cache");\n\n case TLDEV_DTYPE_DCPU16:\n return ("Dual CPU, 16MB cache");\n\n default:\n bzero(tlsb_line, sizeof(tlsb_line));\n sprintf(tlsb_line, "unknown, dtype 0x%x", dtype);\n return (tlsb_line);\n }" (switch) "switch" (parenthesized_expression) "(dtype & TLDEV_DTYPE_MASK)" (() "(" (binary_expression) "dtype & TLDEV_DTYPE_MASK" (identifier) "dtype" (&) "&" (identifier) "TLDEV_DTYPE_MASK" ()) ")" (compound_statement) "{\n case TLDEV_DTYPE_KFTHA:\n return ("KFTHA I/O interface");\n\n case TLDEV_DTYPE_KFTIA:\n return ("KFTIA I/O interface");\n\n case TLDEV_DTYPE_MS7CC:\n return ("MS7CC Memory Module");\n\n case TLDEV_DTYPE_SCPU4:\n return ("Single CPU, 4MB cache");\n\n case TLDEV_DTYPE_SCPU16:\n return ("Single CPU, 16MB cache");\n\n case TLDEV_DTYPE_DCPU4:\n return ("Dual CPU, 4MB cache");\n\n case TLDEV_DTYPE_DCPU16:\n return ("Dual CPU, 16MB cache");\n\n default:\n bzero(tlsb_line, sizeof(tlsb_line));\n sprintf(tlsb_line, "unknown, dtype 0x%x", dtype);\n return (tlsb_line);\n }" ({) "{" (case_statement) "case TLDEV_DTYPE_KFTHA:\n return ("KFTHA I/O interface");" (case) "case" (identifier) "TLDEV_DTYPE_KFTHA" (:) ":" (return_statement) "return ("KFTHA I/O interface");" (return) "return" (parenthesized_expression) "("KFTHA I/O interface")" (() "(" (string_literal) ""KFTHA I/O interface"" (") """ (string_content) "KFTHA I/O interface" (") """ ()) ")" (;) ";" (case_statement) "case TLDEV_DTYPE_KFTIA:\n return ("KFTIA I/O interface");" (case) "case" (identifier) "TLDEV_DTYPE_KFTIA" (:) ":" (return_statement) "return ("KFTIA I/O interface");" (return) "return" (parenthesized_expression) "("KFTIA I/O interface")" (() "(" (string_literal) ""KFTIA I/O interface"" (") """ (string_content) "KFTIA I/O interface" (") """ ()) ")" (;) ";" (case_statement) "case TLDEV_DTYPE_MS7CC:\n return ("MS7CC Memory Module");" (case) "case" (identifier) "TLDEV_DTYPE_MS7CC" (:) ":" (return_statement) "return ("MS7CC Memory Module");" (return) "return" (parenthesized_expression) "("MS7CC Memory Module")" (() "(" (string_literal) ""MS7CC Memory Module"" (") """ (string_content) "MS7CC Memory Module" (") """ ()) ")" (;) ";" (case_statement) "case TLDEV_DTYPE_SCPU4:\n return ("Single CPU, 4MB cache");" (case) "case" (identifier) "TLDEV_DTYPE_SCPU4" (:) ":" (return_statement) "return ("Single CPU, 4MB cache");" (return) "return" (parenthesized_expression) "("Single CPU, 4MB cache")" (() "(" (string_literal) ""Single CPU, 4MB cache"" (") """ (string_content) "Single CPU, 4MB cache" (") """ ()) ")" (;) ";" (case_statement) "case TLDEV_DTYPE_SCPU16:\n return ("Single CPU, 16MB cache");" (case) "case" (identifier) "TLDEV_DTYPE_SCPU16" (:) ":" (return_statement) "return ("Single CPU, 16MB cache");" (return) "return" (parenthesized_expression) "("Single CPU, 16MB cache")" (() "(" (string_literal) ""Single CPU, 16MB cache"" (") """ (string_content) "Single CPU, 16MB cache" (") """ ()) ")" (;) ";" (case_statement) "case TLDEV_DTYPE_DCPU4:\n return ("Dual CPU, 4MB cache");" (case) "case" (identifier) "TLDEV_DTYPE_DCPU4" (:) ":" (return_statement) "return ("Dual CPU, 4MB cache");" (return) "return" (parenthesized_expression) "("Dual CPU, 4MB cache")" (() "(" (string_literal) ""Dual CPU, 4MB cache"" (") """ (string_content) "Dual CPU, 4MB cache" (") """ ()) ")" (;) ";" (case_statement) "case TLDEV_DTYPE_DCPU16:\n return ("Dual CPU, 16MB cache");" (case) "case" (identifier) "TLDEV_DTYPE_DCPU16" (:) ":" (return_statement) "return ("Dual CPU, 16MB cache");" (return) "return" (parenthesized_expression) "("Dual CPU, 16MB cache")" (() "(" (string_literal) ""Dual CPU, 16MB cache"" (") """ (string_content) "Dual CPU, 16MB cache" (") """ ()) ")" (;) ";" (case_statement) "default:\n bzero(tlsb_line, sizeof(tlsb_line));\n sprintf(tlsb_line, "unknown, dtype 0x%x", dtype);\n return (tlsb_line);" (default) "default" (:) ":" (expression_statement) "bzero(tlsb_line, sizeof(tlsb_line));" (call_expression) "bzero(tlsb_line, sizeof(tlsb_line))" (identifier) "bzero" (argument_list) "(tlsb_line, sizeof(tlsb_line))" (() "(" (identifier) "tlsb_line" (,) "," (sizeof_expression) "sizeof(tlsb_line)" (sizeof) "sizeof" (parenthesized_expression) "(tlsb_line)" (() "(" (identifier) "tlsb_line" ()) ")" ()) ")" (;) ";" (expression_statement) "sprintf(tlsb_line, "unknown, dtype 0x%x", dtype);" (call_expression) "sprintf(tlsb_line, "unknown, dtype 0x%x", dtype)" (identifier) "sprintf" (argument_list) "(tlsb_line, "unknown, dtype 0x%x", dtype)" (() "(" (identifier) "tlsb_line" (,) "," (string_literal) ""unknown, dtype 0x%x"" (") """ (string_content) "unknown, dtype 0x%x" (") """ (,) "," (identifier) "dtype" ()) ")" (;) ";" (return_statement) "return (tlsb_line);" (return) "return" (parenthesized_expression) "(tlsb_line)" (() "(" (identifier) "tlsb_line" ()) ")" (;) ";" (}) "}" (comment) "/* NOTREACHED */" (}) "}"
1,310
4
{"language": "c", "success": true, "metadata": {"lines": 245, "avg_line_length": 31.2, "nodes": 774, "errors": 0, "source_hash": "00b43b595f49d4b5cdc5dcb6b81f561350e97e8933464b43876223412da132f7", "categorized_nodes": 575}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <sys/cdefs.h>\t\t\t/* RCS ID & Copyright macro defns */\n", "parent": null, "children": [1, 2], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<sys/cdefs.h>", "parent": 0, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 22}}, {"id": 3, "type": "call_expression", "text": "__KERNEL_RCSID(0, \"$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $\")", "parent": null, "children": [4, 5], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 77}}, {"id": 4, "type": "identifier", "text": "__KERNEL_RCSID", "parent": 3, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 14}}, {"id": 5, "type": "argument_list", "text": "(0, \"$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $\")", "parent": 3, "children": [6, 7], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 77}}, {"id": 6, "type": "number_literal", "text": "0", "parent": 5, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 16}}, {"id": 7, "type": "string_literal", "text": "\"$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $\"", "parent": 5, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 76}}, {"id": 8, "type": "preproc_include", "text": "#include \"opt_multiprocessor.h\"\n", "parent": null, "children": [9, 10], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 9, "type": "#include", "text": "#include", "parent": 8, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 8}}, {"id": 10, "type": "string_literal", "text": "\"opt_multiprocessor.h\"", "parent": 8, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 31}}, {"id": 11, "type": "preproc_include", "text": "#include <sys/param.h>\n", "parent": null, "children": [12, 13], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 0}}, {"id": 12, "type": "#include", "text": "#include", "parent": 11, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 8}}, {"id": 13, "type": "system_lib_string", "text": "<sys/param.h>", "parent": 11, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 22}}, {"id": 14, "type": "preproc_include", "text": "#include <sys/systm.h>\n", "parent": null, "children": [15, 16], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 0}}, {"id": 15, "type": "#include", "text": "#include", "parent": 14, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 8}}, {"id": 16, "type": "system_lib_string", "text": "<sys/systm.h>", "parent": 14, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 22}}, {"id": 17, "type": "preproc_include", "text": "#include <sys/device.h>\n", "parent": null, "children": [18, 19], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 48, "column": 0}}, {"id": 18, "type": "#include", "text": "#include", "parent": 17, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 8}}, {"id": 19, "type": "system_lib_string", "text": "<sys/device.h>", "parent": 17, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 23}}, {"id": 20, "type": "preproc_include", "text": "#include <sys/malloc.h>\n", "parent": null, "children": [21, 22], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 0}}, {"id": 21, "type": "#include", "text": "#include", "parent": 20, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 8}}, {"id": 22, "type": "system_lib_string", "text": "<sys/malloc.h>", "parent": 20, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 23}}, {"id": 23, "type": "preproc_include", "text": "#include <machine/autoconf.h>\n", "parent": null, "children": [24, 25], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 0}}, {"id": 24, "type": "#include", "text": "#include", "parent": 23, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 8}}, {"id": 25, "type": "system_lib_string", "text": "<machine/autoconf.h>", "parent": 23, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 29}}, {"id": 26, "type": "preproc_include", "text": "#include <machine/rpb.h>\n", "parent": null, "children": [27, 28], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 52, "column": 0}}, {"id": 27, "type": "#include", "text": "#include", "parent": 26, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 8}}, {"id": 28, "type": "system_lib_string", "text": "<machine/rpb.h>", "parent": 26, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 24}}, {"id": 29, "type": "preproc_include", "text": "#include <machine/pte.h>\n", "parent": null, "children": [30, 31], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 0}}, {"id": 30, "type": "#include", "text": "#include", "parent": 29, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 8}}, {"id": 31, "type": "system_lib_string", "text": "<machine/pte.h>", "parent": 29, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 24}}, {"id": 32, "type": "preproc_include", "text": "#include <machine/alpha.h>\n", "parent": null, "children": [33, 34], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 54, "column": 0}}, {"id": 33, "type": "#include", "text": "#include", "parent": 32, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 8}}, {"id": 34, "type": "system_lib_string", "text": "<machine/alpha.h>", "parent": 32, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 26}}, {"id": 35, "type": "preproc_include", "text": "#include <alpha/alpha/cpuvar.h>\n", "parent": null, "children": [36, 37], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 56, "column": 0}}, {"id": 36, "type": "#include", "text": "#include", "parent": 35, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 8}}, {"id": 37, "type": "system_lib_string", "text": "<alpha/alpha/cpuvar.h>", "parent": 35, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 31}}, {"id": 38, "type": "preproc_include", "text": "#include <alpha/tlsb/tlsbreg.h>\n", "parent": null, "children": [39, 40], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 58, "column": 0}}, {"id": 39, "type": "#include", "text": "#include", "parent": 38, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 8}}, {"id": 40, "type": "system_lib_string", "text": "<alpha/tlsb/tlsbreg.h>", "parent": 38, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 31}}, {"id": 41, "type": "preproc_include", "text": "#include <alpha/tlsb/tlsbvar.h>\n", "parent": null, "children": [42, 43], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 59, "column": 0}}, {"id": 42, "type": "#include", "text": "#include", "parent": 41, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 8}}, {"id": 43, "type": "system_lib_string", "text": "<alpha/tlsb/tlsbvar.h>", "parent": 41, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 31}}, {"id": 44, "type": "preproc_include", "text": "#include \"locators.h\"\n", "parent": null, "children": [45, 46], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 0}}, {"id": 45, "type": "#include", "text": "#include", "parent": 44, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 8}}, {"id": 46, "type": "string_literal", "text": "\"locators.h\"", "parent": 44, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 21}}, {"id": 47, "type": "declaration", "text": "extern int\tcputype;", "parent": null, "children": [48, 50, 51], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 19}}, {"id": 48, "type": "storage_class_specifier", "text": "extern", "parent": 47, "children": [49], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 6}}, {"id": 49, "type": "extern", "text": "extern", "parent": 48, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 6}}, {"id": 50, "type": "primitive_type", "text": "int", "parent": 47, "children": [], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 10}}, {"id": 51, "type": "identifier", "text": "cputype", "parent": 47, "children": [], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 18}}, {"id": 52, "type": "preproc_function_def", "text": "#define KV(_addr)\t((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))\n", "parent": null, "children": [53, 54, 55, 57], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 65, "column": 0}}, {"id": 53, "type": "#define", "text": "#define", "parent": 52, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 7}}, {"id": 54, "type": "identifier", "text": "KV", "parent": 52, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 10}}, {"id": 55, "type": "preproc_params", "text": "(_addr)", "parent": 52, "children": [56], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 17}}, {"id": 56, "type": "identifier", "text": "_addr", "parent": 55, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 16}}, {"id": 57, "type": "preproc_arg", "text": "((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))", "parent": 52, "children": [], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 57}}, {"id": 58, "type": "declaration", "text": "static int\ttlsbmatch", "parent": null, "children": [59, 60], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 20}}, {"id": 59, "type": "primitive_type", "text": "int", "parent": 58, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 10}}, {"id": 60, "type": "identifier", "text": "tlsbmatch", "parent": 58, "children": [], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 20}}, {"id": 61, "type": "call_expression", "text": "__P((struct device *, struct cfdata *, void *))", "parent": null, "children": [62, 63], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 68}}, {"id": 62, "type": "identifier", "text": "__P", "parent": 61, "children": [], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 24}}, {"id": 63, "type": "argument_list", "text": "((struct device *, struct cfdata *, void *))", "parent": 61, "children": [64], "start_point": {"row": 66, "column": 24}, "end_point": {"row": 66, "column": 68}}, {"id": 64, "type": "cast_expression", "text": "(struct device *, struct cfdata *, void *)", "parent": 63, "children": [65, 78, 82], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 67}}, {"id": 65, "type": "ERROR", "text": "struct device *, struct cfdata *,", "parent": 64, "children": [66, 72], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 59}}, {"id": 66, "type": "type_descriptor", "text": "struct device *", "parent": 65, "children": [67, 70], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 41}}, {"id": 67, "type": "struct_specifier", "text": "struct device", "parent": 66, "children": [68, 69], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 39}}, {"id": 68, "type": "struct", "text": "struct", "parent": 67, "children": [], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 32}}, {"id": 69, "type": "type_identifier", "text": "device", "parent": 67, "children": [], "start_point": {"row": 66, "column": 33}, "end_point": {"row": 66, "column": 39}}, {"id": 70, "type": "abstract_pointer_declarator", "text": "*", "parent": 66, "children": [71], "start_point": {"row": 66, "column": 40}, "end_point": {"row": 66, "column": 41}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 66, "column": 40}, "end_point": {"row": 66, "column": 41}}, {"id": 72, "type": "type_descriptor", "text": "struct cfdata *", "parent": 65, "children": [73, 76], "start_point": {"row": 66, "column": 43}, "end_point": {"row": 66, "column": 58}}, {"id": 73, "type": "struct_specifier", "text": "struct cfdata", "parent": 72, "children": [74, 75], "start_point": {"row": 66, "column": 43}, "end_point": {"row": 66, "column": 56}}, {"id": 74, "type": "struct", "text": "struct", "parent": 73, "children": [], "start_point": {"row": 66, "column": 43}, "end_point": {"row": 66, "column": 49}}, {"id": 75, "type": "type_identifier", "text": "cfdata", "parent": 73, "children": [], "start_point": {"row": 66, "column": 50}, "end_point": {"row": 66, "column": 56}}, {"id": 76, "type": "abstract_pointer_declarator", "text": "*", "parent": 72, "children": [77], "start_point": {"row": 66, "column": 57}, "end_point": {"row": 66, "column": 58}}, {"id": 77, "type": "*", "text": "*", "parent": 76, "children": [], "start_point": {"row": 66, "column": 57}, "end_point": {"row": 66, "column": 58}}, {"id": 78, "type": "type_descriptor", "text": "void *", "parent": 64, "children": [79, 80], "start_point": {"row": 66, "column": 60}, "end_point": {"row": 66, "column": 66}}, {"id": 79, "type": "primitive_type", "text": "void", "parent": 78, "children": [], "start_point": {"row": 66, "column": 60}, "end_point": {"row": 66, "column": 64}}, {"id": 80, "type": "abstract_pointer_declarator", "text": "*", "parent": 78, "children": [81], "start_point": {"row": 66, "column": 65}, "end_point": {"row": 66, "column": 66}}, {"id": 81, "type": "*", "text": "*", "parent": 80, "children": [], "start_point": {"row": 66, "column": 65}, "end_point": {"row": 66, "column": 66}}, {"id": 82, "type": "identifier", "text": "", "parent": 64, "children": [], "start_point": {"row": 66, "column": 67}, "end_point": {"row": 66, "column": 67}}, {"id": 83, "type": "declaration", "text": "static void\ttlsbattach", "parent": null, "children": [84, 85], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 22}}, {"id": 84, "type": "primitive_type", "text": "void", "parent": 83, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 11}}, {"id": 85, "type": "identifier", "text": "tlsbattach", "parent": 83, "children": [], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 22}}, {"id": 86, "type": "call_expression", "text": "__P((struct device *, struct device *, void *))", "parent": null, "children": [87, 88], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 70}}, {"id": 87, "type": "identifier", "text": "__P", "parent": 86, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 26}}, {"id": 88, "type": "argument_list", "text": "((struct device *, struct device *, void *))", "parent": 86, "children": [89], "start_point": {"row": 67, "column": 26}, "end_point": {"row": 67, "column": 70}}, {"id": 89, "type": "cast_expression", "text": "(struct device *, struct device *, void *)", "parent": 88, "children": [90, 103, 107], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 69}}, {"id": 90, "type": "ERROR", "text": "struct device *, struct device *,", "parent": 89, "children": [91, 97], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 61}}, {"id": 91, "type": "type_descriptor", "text": "struct device *", "parent": 90, "children": [92, 95], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 43}}, {"id": 92, "type": "struct_specifier", "text": "struct device", "parent": 91, "children": [93, 94], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 41}}, {"id": 93, "type": "struct", "text": "struct", "parent": 92, "children": [], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 34}}, {"id": 94, "type": "type_identifier", "text": "device", "parent": 92, "children": [], "start_point": {"row": 67, "column": 35}, "end_point": {"row": 67, "column": 41}}, {"id": 95, "type": "abstract_pointer_declarator", "text": "*", "parent": 91, "children": [96], "start_point": {"row": 67, "column": 42}, "end_point": {"row": 67, "column": 43}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 67, "column": 42}, "end_point": {"row": 67, "column": 43}}, {"id": 97, "type": "type_descriptor", "text": "struct device *", "parent": 90, "children": [98, 101], "start_point": {"row": 67, "column": 45}, "end_point": {"row": 67, "column": 60}}, {"id": 98, "type": "struct_specifier", "text": "struct device", "parent": 97, "children": [99, 100], "start_point": {"row": 67, "column": 45}, "end_point": {"row": 67, "column": 58}}, {"id": 99, "type": "struct", "text": "struct", "parent": 98, "children": [], "start_point": {"row": 67, "column": 45}, "end_point": {"row": 67, "column": 51}}, {"id": 100, "type": "type_identifier", "text": "device", "parent": 98, "children": [], "start_point": {"row": 67, "column": 52}, "end_point": {"row": 67, "column": 58}}, {"id": 101, "type": "abstract_pointer_declarator", "text": "*", "parent": 97, "children": [102], "start_point": {"row": 67, "column": 59}, "end_point": {"row": 67, "column": 60}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 67, "column": 59}, "end_point": {"row": 67, "column": 60}}, {"id": 103, "type": "type_descriptor", "text": "void *", "parent": 89, "children": [104, 105], "start_point": {"row": 67, "column": 62}, "end_point": {"row": 67, "column": 68}}, {"id": 104, "type": "primitive_type", "text": "void", "parent": 103, "children": [], "start_point": {"row": 67, "column": 62}, "end_point": {"row": 67, "column": 66}}, {"id": 105, "type": "abstract_pointer_declarator", "text": "*", "parent": 103, "children": [106], "start_point": {"row": 67, "column": 67}, "end_point": {"row": 67, "column": 68}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 67, "column": 67}, "end_point": {"row": 67, "column": 68}}, {"id": 107, "type": "identifier", "text": "", "parent": 89, "children": [], "start_point": {"row": 67, "column": 69}, "end_point": {"row": 67, "column": 69}}, {"id": 108, "type": "declaration", "text": "struct cfattach tlsb_ca = {\n\tsizeof (struct device), tlsbmatch, tlsbattach\n};", "parent": null, "children": [109, 112], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 71, "column": 2}}, {"id": 109, "type": "struct_specifier", "text": "struct cfattach", "parent": 108, "children": [110, 111], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 15}}, {"id": 110, "type": "struct", "text": "struct", "parent": 109, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 111, "type": "type_identifier", "text": "cfattach", "parent": 109, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 15}}, {"id": 112, "type": "init_declarator", "text": "tlsb_ca = {\n\tsizeof (struct device), tlsbmatch, tlsbattach\n}", "parent": 108, "children": [113, 114, 115], "start_point": {"row": 69, "column": 16}, "end_point": {"row": 71, "column": 1}}, {"id": 113, "type": "identifier", "text": "tlsb_ca", "parent": 112, "children": [], "start_point": {"row": 69, "column": 16}, "end_point": {"row": 69, "column": 23}}, {"id": 114, "type": "=", "text": "=", "parent": 112, "children": [], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 25}}, {"id": 115, "type": "initializer_list", "text": "{\n\tsizeof (struct device), tlsbmatch, tlsbattach\n}", "parent": 112, "children": [116, 121, 122], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 71, "column": 1}}, {"id": 116, "type": "sizeof_expression", "text": "sizeof (struct device)", "parent": 115, "children": [117], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 23}}, {"id": 117, "type": "type_descriptor", "text": "struct device", "parent": 116, "children": [118], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 22}}, {"id": 118, "type": "struct_specifier", "text": "struct device", "parent": 117, "children": [119, 120], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 22}}, {"id": 119, "type": "struct", "text": "struct", "parent": 118, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 15}}, {"id": 120, "type": "type_identifier", "text": "device", "parent": 118, "children": [], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 22}}, {"id": 121, "type": "identifier", "text": "tlsbmatch", "parent": 115, "children": [], "start_point": {"row": 70, "column": 25}, "end_point": {"row": 70, "column": 34}}, {"id": 122, "type": "identifier", "text": "tlsbattach", "parent": 115, "children": [], "start_point": {"row": 70, "column": 36}, "end_point": {"row": 70, "column": 46}}, {"id": 123, "type": "declaration", "text": "extern struct cfdriver tlsb_cd;", "parent": null, "children": [124, 126, 129], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 31}}, {"id": 124, "type": "storage_class_specifier", "text": "extern", "parent": 123, "children": [125], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 6}}, {"id": 125, "type": "extern", "text": "extern", "parent": 124, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 6}}, {"id": 126, "type": "struct_specifier", "text": "struct cfdriver", "parent": 123, "children": [127, 128], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 22}}, {"id": 127, "type": "struct", "text": "struct", "parent": 126, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 13}}, {"id": 128, "type": "type_identifier", "text": "cfdriver", "parent": 126, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 22}}, {"id": 129, "type": "identifier", "text": "tlsb_cd", "parent": 123, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 30}}, {"id": 130, "type": "declaration", "text": "static int\ttlsbprint", "parent": null, "children": [131, 132], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 20}}, {"id": 131, "type": "primitive_type", "text": "int", "parent": 130, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 10}}, {"id": 132, "type": "identifier", "text": "tlsbprint", "parent": 130, "children": [], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 20}}, {"id": 133, "type": "call_expression", "text": "__P((void *, const char *))", "parent": null, "children": [134, 135], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 48}}, {"id": 134, "type": "identifier", "text": "__P", "parent": 133, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 24}}, {"id": 135, "type": "argument_list", "text": "((void *, const char *))", "parent": 133, "children": [136], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 48}}, {"id": 136, "type": "cast_expression", "text": "(void *, const char *)", "parent": 135, "children": [137, 142, 146], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 47}}, {"id": 137, "type": "ERROR", "text": "void *,", "parent": 136, "children": [138], "start_point": {"row": 75, "column": 26}, "end_point": {"row": 75, "column": 33}}, {"id": 138, "type": "type_descriptor", "text": "void *", "parent": 137, "children": [139, 140], "start_point": {"row": 75, "column": 26}, "end_point": {"row": 75, "column": 32}}, {"id": 139, "type": "primitive_type", "text": "void", "parent": 138, "children": [], "start_point": {"row": 75, "column": 26}, "end_point": {"row": 75, "column": 30}}, {"id": 140, "type": "abstract_pointer_declarator", "text": "*", "parent": 138, "children": [141], "start_point": {"row": 75, "column": 31}, "end_point": {"row": 75, "column": 32}}, {"id": 141, "type": "*", "text": "*", "parent": 140, "children": [], "start_point": {"row": 75, "column": 31}, "end_point": {"row": 75, "column": 32}}, {"id": 142, "type": "type_descriptor", "text": "const char *", "parent": 136, "children": [143, 144], "start_point": {"row": 75, "column": 34}, "end_point": {"row": 75, "column": 46}}, {"id": 143, "type": "primitive_type", "text": "char", "parent": 142, "children": [], "start_point": {"row": 75, "column": 40}, "end_point": {"row": 75, "column": 44}}, {"id": 144, "type": "abstract_pointer_declarator", "text": "*", "parent": 142, "children": [145], "start_point": {"row": 75, "column": 45}, "end_point": {"row": 75, "column": 46}}, {"id": 145, "type": "*", "text": "*", "parent": 144, "children": [], "start_point": {"row": 75, "column": 45}, "end_point": {"row": 75, "column": 46}}, {"id": 146, "type": "identifier", "text": "", "parent": 136, "children": [], "start_point": {"row": 75, "column": 47}, "end_point": {"row": 75, "column": 47}}, {"id": 147, "type": "declaration", "text": "static int\ttlsbsubmatch", "parent": null, "children": [148, 149], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 23}}, {"id": 148, "type": "primitive_type", "text": "int", "parent": 147, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 10}}, {"id": 149, "type": "identifier", "text": "tlsbsubmatch", "parent": 147, "children": [], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 23}}, {"id": 150, "type": "call_expression", "text": "__P((struct device *, struct cfdata *, void *))", "parent": null, "children": [151, 152], "start_point": {"row": 76, "column": 24}, "end_point": {"row": 76, "column": 71}}, {"id": 151, "type": "identifier", "text": "__P", "parent": 150, "children": [], "start_point": {"row": 76, "column": 24}, "end_point": {"row": 76, "column": 27}}, {"id": 152, "type": "argument_list", "text": "((struct device *, struct cfdata *, void *))", "parent": 150, "children": [153], "start_point": {"row": 76, "column": 27}, "end_point": {"row": 76, "column": 71}}, {"id": 153, "type": "cast_expression", "text": "(struct device *, struct cfdata *, void *)", "parent": 152, "children": [154, 167, 171], "start_point": {"row": 76, "column": 28}, "end_point": {"row": 76, "column": 70}}, {"id": 154, "type": "ERROR", "text": "struct device *, struct cfdata *,", "parent": 153, "children": [155, 161], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 62}}, {"id": 155, "type": "type_descriptor", "text": "struct device *", "parent": 154, "children": [156, 159], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 44}}, {"id": 156, "type": "struct_specifier", "text": "struct device", "parent": 155, "children": [157, 158], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 42}}, {"id": 157, "type": "struct", "text": "struct", "parent": 156, "children": [], "start_point": {"row": 76, "column": 29}, "end_point": {"row": 76, "column": 35}}, {"id": 158, "type": "type_identifier", "text": "device", "parent": 156, "children": [], "start_point": {"row": 76, "column": 36}, "end_point": {"row": 76, "column": 42}}, {"id": 159, "type": "abstract_pointer_declarator", "text": "*", "parent": 155, "children": [160], "start_point": {"row": 76, "column": 43}, "end_point": {"row": 76, "column": 44}}, {"id": 160, "type": "*", "text": "*", "parent": 159, "children": [], "start_point": {"row": 76, "column": 43}, "end_point": {"row": 76, "column": 44}}, {"id": 161, "type": "type_descriptor", "text": "struct cfdata *", "parent": 154, "children": [162, 165], "start_point": {"row": 76, "column": 46}, "end_point": {"row": 76, "column": 61}}, {"id": 162, "type": "struct_specifier", "text": "struct cfdata", "parent": 161, "children": [163, 164], "start_point": {"row": 76, "column": 46}, "end_point": {"row": 76, "column": 59}}, {"id": 163, "type": "struct", "text": "struct", "parent": 162, "children": [], "start_point": {"row": 76, "column": 46}, "end_point": {"row": 76, "column": 52}}, {"id": 164, "type": "type_identifier", "text": "cfdata", "parent": 162, "children": [], "start_point": {"row": 76, "column": 53}, "end_point": {"row": 76, "column": 59}}, {"id": 165, "type": "abstract_pointer_declarator", "text": "*", "parent": 161, "children": [166], "start_point": {"row": 76, "column": 60}, "end_point": {"row": 76, "column": 61}}, {"id": 166, "type": "*", "text": "*", "parent": 165, "children": [], "start_point": {"row": 76, "column": 60}, "end_point": {"row": 76, "column": 61}}, {"id": 167, "type": "type_descriptor", "text": "void *", "parent": 153, "children": [168, 169], "start_point": {"row": 76, "column": 63}, "end_point": {"row": 76, "column": 69}}, {"id": 168, "type": "primitive_type", "text": "void", "parent": 167, "children": [], "start_point": {"row": 76, "column": 63}, "end_point": {"row": 76, "column": 67}}, {"id": 169, "type": "abstract_pointer_declarator", "text": "*", "parent": 167, "children": [170], "start_point": {"row": 76, "column": 68}, "end_point": {"row": 76, "column": 69}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 76, "column": 68}, "end_point": {"row": 76, "column": 69}}, {"id": 171, "type": "identifier", "text": "", "parent": 153, "children": [], "start_point": {"row": 76, "column": 70}, "end_point": {"row": 76, "column": 70}}, {"id": 172, "type": "declaration", "text": "static char\t*tlsb_node_type_str", "parent": null, "children": [173, 174], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 31}}, {"id": 173, "type": "primitive_type", "text": "char", "parent": 172, "children": [], "start_point": {"row": 77, "column": 7}, "end_point": {"row": 77, "column": 11}}, {"id": 174, "type": "pointer_declarator", "text": "*tlsb_node_type_str", "parent": 172, "children": [175, 176], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 31}}, {"id": 175, "type": "*", "text": "*", "parent": 174, "children": [], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 13}}, {"id": 176, "type": "identifier", "text": "tlsb_node_type_str", "parent": 174, "children": [], "start_point": {"row": 77, "column": 13}, "end_point": {"row": 77, "column": 31}}, {"id": 177, "type": "call_expression", "text": "__P((u_int32_t))", "parent": null, "children": [178, 179], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 48}}, {"id": 178, "type": "identifier", "text": "__P", "parent": 177, "children": [], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 35}}, {"id": 179, "type": "argument_list", "text": "((u_int32_t))", "parent": 177, "children": [180], "start_point": {"row": 77, "column": 35}, "end_point": {"row": 77, "column": 48}}, {"id": 180, "type": "parenthesized_expression", "text": "(u_int32_t)", "parent": 179, "children": [181], "start_point": {"row": 77, "column": 36}, "end_point": {"row": 77, "column": 47}}, {"id": 181, "type": "identifier", "text": "u_int32_t", "parent": 180, "children": [], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 46}}, {"id": 182, "type": "declaration", "text": "int\ttlsb_found;", "parent": null, "children": [183, 184], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 15}}, {"id": 183, "type": "primitive_type", "text": "int", "parent": 182, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 3}}, {"id": 184, "type": "identifier", "text": "tlsb_found", "parent": 182, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 14}}, {"id": 185, "type": "function_definition", "text": "static int\ntlsbprint(aux, pnp)\n\tvoid *aux;\n\tconst char *pnp;\n{\n\tstruct tlsb_dev_attach_args *tap = aux;\n\n\tif (pnp)\n\t\tprintf(\"%s at %s node %d\", tlsb_node_type_str(tap->ta_dtype),\n\t\t pnp, tap->ta_node);\n\telse\n\t\tprintf(\" node %d: %s\", tap->ta_node,\n\t\t tlsb_node_type_str(tap->ta_dtype));\n\n\treturn (UNCONF);\n}", "parent": null, "children": [186, 187, 192, 197], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 105, "column": 1}}, {"id": 186, "type": "primitive_type", "text": "int", "parent": 185, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 10}}, {"id": 187, "type": "function_declarator", "text": "tlsbprint(aux, pnp)", "parent": 185, "children": [188, 189], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 19}}, {"id": 188, "type": "identifier", "text": "tlsbprint", "parent": 187, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 9}}, {"id": 189, "type": "parameter_list", "text": "(aux, pnp)", "parent": 187, "children": [190, 191], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 19}}, {"id": 190, "type": "identifier", "text": "aux", "parent": 189, "children": [], "start_point": {"row": 91, "column": 10}, "end_point": {"row": 91, "column": 13}}, {"id": 191, "type": "identifier", "text": "pnp", "parent": 189, "children": [], "start_point": {"row": 91, "column": 15}, "end_point": {"row": 91, "column": 18}}, {"id": 192, "type": "declaration", "text": "void *aux;", "parent": 185, "children": [193, 194], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 11}}, {"id": 193, "type": "primitive_type", "text": "void", "parent": 192, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 5}}, {"id": 194, "type": "pointer_declarator", "text": "*aux", "parent": 192, "children": [195, 196], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 92, "column": 10}}, {"id": 195, "type": "*", "text": "*", "parent": 194, "children": [], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 92, "column": 7}}, {"id": 196, "type": "identifier", "text": "aux", "parent": 194, "children": [], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 10}}, {"id": 197, "type": "declaration", "text": "const char *pnp;", "parent": 185, "children": [198, 199], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 17}}, {"id": 198, "type": "primitive_type", "text": "char", "parent": 197, "children": [], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 11}}, {"id": 199, "type": "pointer_declarator", "text": "*pnp", "parent": 197, "children": [200, 201], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 16}}, {"id": 200, "type": "*", "text": "*", "parent": 199, "children": [], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 13}}, {"id": 201, "type": "identifier", "text": "pnp", "parent": 199, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 16}}, {"id": 202, "type": "declaration", "text": "struct tlsb_dev_attach_args *tap = aux;", "parent": 185, "children": [203, 206], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 40}}, {"id": 203, "type": "struct_specifier", "text": "struct tlsb_dev_attach_args", "parent": 202, "children": [204, 205], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 28}}, {"id": 204, "type": "struct", "text": "struct", "parent": 203, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 7}}, {"id": 205, "type": "type_identifier", "text": "tlsb_dev_attach_args", "parent": 203, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 28}}, {"id": 206, "type": "init_declarator", "text": "*tap = aux", "parent": 202, "children": [207, 210, 211], "start_point": {"row": 95, "column": 29}, "end_point": {"row": 95, "column": 39}}, {"id": 207, "type": "pointer_declarator", "text": "*tap", "parent": 206, "children": [208, 209], "start_point": {"row": 95, "column": 29}, "end_point": {"row": 95, "column": 33}}, {"id": 208, "type": "*", "text": "*", "parent": 207, "children": [], "start_point": {"row": 95, "column": 29}, "end_point": {"row": 95, "column": 30}}, {"id": 209, "type": "identifier", "text": "tap", "parent": 207, "children": [], "start_point": {"row": 95, "column": 30}, "end_point": {"row": 95, "column": 33}}, {"id": 210, "type": "=", "text": "=", "parent": 206, "children": [], "start_point": {"row": 95, "column": 34}, "end_point": {"row": 95, "column": 35}}, {"id": 211, "type": "identifier", "text": "aux", "parent": 206, "children": [], "start_point": {"row": 95, "column": 36}, "end_point": {"row": 95, "column": 39}}, {"id": 212, "type": "if_statement", "text": "if (pnp)\n\t\tprintf(\"%s at %s node %d\", tlsb_node_type_str(tap->ta_dtype),\n\t\t pnp, tap->ta_node);\n\telse\n\t\tprintf(\" node %d: %s\", tap->ta_node,\n\t\t tlsb_node_type_str(tap->ta_dtype));", "parent": 185, "children": [213, 229], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 102, "column": 41}}, {"id": 213, "type": "parenthesized_expression", "text": "(pnp)", "parent": 212, "children": [214], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 9}}, {"id": 214, "type": "identifier", "text": "pnp", "parent": 213, "children": [], "start_point": {"row": 97, "column": 5}, "end_point": {"row": 97, "column": 8}}, {"id": 215, "type": "call_expression", "text": "printf(\"%s at %s node %d\", tlsb_node_type_str(tap->ta_dtype),\n\t\t pnp, tap->ta_node)", "parent": 212, "children": [216, 217], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 99, "column": 24}}, {"id": 216, "type": "identifier", "text": "printf", "parent": 215, "children": [], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 8}}, {"id": 217, "type": "argument_list", "text": "(\"%s at %s node %d\", tlsb_node_type_str(tap->ta_dtype),\n\t\t pnp, tap->ta_node)", "parent": 215, "children": [218, 219, 225, 226], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 99, "column": 24}}, {"id": 218, "type": "string_literal", "text": "\"%s at %s node %d\"", "parent": 217, "children": [], "start_point": {"row": 98, "column": 9}, "end_point": {"row": 98, "column": 27}}, {"id": 219, "type": "call_expression", "text": "tlsb_node_type_str(tap->ta_dtype)", "parent": 217, "children": [220, 221], "start_point": {"row": 98, "column": 29}, "end_point": {"row": 98, "column": 62}}, {"id": 220, "type": "identifier", "text": "tlsb_node_type_str", "parent": 219, "children": [], "start_point": {"row": 98, "column": 29}, "end_point": {"row": 98, "column": 47}}, {"id": 221, "type": "argument_list", "text": "(tap->ta_dtype)", "parent": 219, "children": [222], "start_point": {"row": 98, "column": 47}, "end_point": {"row": 98, "column": 62}}, {"id": 222, "type": "field_expression", "text": "tap->ta_dtype", "parent": 221, "children": [223, 224], "start_point": {"row": 98, "column": 48}, "end_point": {"row": 98, "column": 61}}, {"id": 223, "type": "identifier", "text": "tap", "parent": 222, "children": [], "start_point": {"row": 98, "column": 48}, "end_point": {"row": 98, "column": 51}}, {"id": 224, "type": "field_identifier", "text": "ta_dtype", "parent": 222, "children": [], "start_point": {"row": 98, "column": 53}, "end_point": {"row": 98, "column": 61}}, {"id": 225, "type": "identifier", "text": "pnp", "parent": 217, "children": [], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 9}}, {"id": 226, "type": "field_expression", "text": "tap->ta_node", "parent": 217, "children": [227, 228], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 23}}, {"id": 227, "type": "identifier", "text": "tap", "parent": 226, "children": [], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 14}}, {"id": 228, "type": "field_identifier", "text": "ta_node", "parent": 226, "children": [], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 23}}, {"id": 229, "type": "else_clause", "text": "else\n\t\tprintf(\" node %d: %s\", tap->ta_node,\n\t\t tlsb_node_type_str(tap->ta_dtype));", "parent": 212, "children": [], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 102, "column": 41}}, {"id": 230, "type": "call_expression", "text": "printf(\" node %d: %s\", tap->ta_node,\n\t\t tlsb_node_type_str(tap->ta_dtype))", "parent": 229, "children": [231, 232], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 102, "column": 40}}, {"id": 231, "type": "identifier", "text": "printf", "parent": 230, "children": [], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 8}}, {"id": 232, "type": "argument_list", "text": "(\" node %d: %s\", tap->ta_node,\n\t\t tlsb_node_type_str(tap->ta_dtype))", "parent": 230, "children": [233, 234, 237], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 102, "column": 40}}, {"id": 233, "type": "string_literal", "text": "\" node %d: %s\"", "parent": 232, "children": [], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 23}}, {"id": 234, "type": "field_expression", "text": "tap->ta_node", "parent": 232, "children": [235, 236], "start_point": {"row": 101, "column": 25}, "end_point": {"row": 101, "column": 37}}, {"id": 235, "type": "identifier", "text": "tap", "parent": 234, "children": [], "start_point": {"row": 101, "column": 25}, "end_point": {"row": 101, "column": 28}}, {"id": 236, "type": "field_identifier", "text": "ta_node", "parent": 234, "children": [], "start_point": {"row": 101, "column": 30}, "end_point": {"row": 101, "column": 37}}, {"id": 237, "type": "call_expression", "text": "tlsb_node_type_str(tap->ta_dtype)", "parent": 232, "children": [238, 239], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 39}}, {"id": 238, "type": "identifier", "text": "tlsb_node_type_str", "parent": 237, "children": [], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 24}}, {"id": 239, "type": "argument_list", "text": "(tap->ta_dtype)", "parent": 237, "children": [240], "start_point": {"row": 102, "column": 24}, "end_point": {"row": 102, "column": 39}}, {"id": 240, "type": "field_expression", "text": "tap->ta_dtype", "parent": 239, "children": [241, 242], "start_point": {"row": 102, "column": 25}, "end_point": {"row": 102, "column": 38}}, {"id": 241, "type": "identifier", "text": "tap", "parent": 240, "children": [], "start_point": {"row": 102, "column": 25}, "end_point": {"row": 102, "column": 28}}, {"id": 242, "type": "field_identifier", "text": "ta_dtype", "parent": 240, "children": [], "start_point": {"row": 102, "column": 30}, "end_point": {"row": 102, "column": 38}}, {"id": 243, "type": "return_statement", "text": "return (UNCONF);", "parent": 185, "children": [244], "start_point": {"row": 104, "column": 1}, "end_point": {"row": 104, "column": 17}}, {"id": 244, "type": "parenthesized_expression", "text": "(UNCONF)", "parent": 243, "children": [245], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 16}}, {"id": 245, "type": "identifier", "text": "UNCONF", "parent": 244, "children": [], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 15}}, {"id": 246, "type": "function_definition", "text": "static int\ntlsbsubmatch(parent, cf, aux)\n\tstruct device *parent;\n\tstruct cfdata *cf;\n\tvoid *aux;\n{\n\tstruct tlsb_dev_attach_args *tap = aux;\n\n\tif (cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n\t cf->cf_loc[TLSBCF_NODE] != tap->ta_node)\n\t\treturn (0);\n\n\treturn ((*cf->cf_attach->ca_match)(parent, cf, aux));\n}", "parent": null, "children": [247, 248, 254, 261, 268], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 120, "column": 1}}, {"id": 247, "type": "primitive_type", "text": "int", "parent": 246, "children": [], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 10}}, {"id": 248, "type": "function_declarator", "text": "tlsbsubmatch(parent, cf, aux)", "parent": 246, "children": [249, 250], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 29}}, {"id": 249, "type": "identifier", "text": "tlsbsubmatch", "parent": 248, "children": [], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 12}}, {"id": 250, "type": "parameter_list", "text": "(parent, cf, aux)", "parent": 248, "children": [251, 252, 253], "start_point": {"row": 108, "column": 12}, "end_point": {"row": 108, "column": 29}}, {"id": 251, "type": "identifier", "text": "parent", "parent": 250, "children": [], "start_point": {"row": 108, "column": 13}, "end_point": {"row": 108, "column": 19}}, {"id": 252, "type": "identifier", "text": "cf", "parent": 250, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 23}}, {"id": 253, "type": "identifier", "text": "aux", "parent": 250, "children": [], "start_point": {"row": 108, "column": 25}, "end_point": {"row": 108, "column": 28}}, {"id": 254, "type": "declaration", "text": "struct device *parent;", "parent": 246, "children": [255, 258], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 23}}, {"id": 255, "type": "struct_specifier", "text": "struct device", "parent": 254, "children": [256, 257], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 14}}, {"id": 256, "type": "struct", "text": "struct", "parent": 255, "children": [], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 7}}, {"id": 257, "type": "type_identifier", "text": "device", "parent": 255, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 14}}, {"id": 258, "type": "pointer_declarator", "text": "*parent", "parent": 254, "children": [259, 260], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 22}}, {"id": 259, "type": "*", "text": "*", "parent": 258, "children": [], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 16}}, {"id": 260, "type": "identifier", "text": "parent", "parent": 258, "children": [], "start_point": {"row": 109, "column": 16}, "end_point": {"row": 109, "column": 22}}, {"id": 261, "type": "declaration", "text": "struct cfdata *cf;", "parent": 246, "children": [262, 265], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 19}}, {"id": 262, "type": "struct_specifier", "text": "struct cfdata", "parent": 261, "children": [263, 264], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 14}}, {"id": 263, "type": "struct", "text": "struct", "parent": 262, "children": [], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 7}}, {"id": 264, "type": "type_identifier", "text": "cfdata", "parent": 262, "children": [], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 14}}, {"id": 265, "type": "pointer_declarator", "text": "*cf", "parent": 261, "children": [266, 267], "start_point": {"row": 110, "column": 15}, "end_point": {"row": 110, "column": 18}}, {"id": 266, "type": "*", "text": "*", "parent": 265, "children": [], "start_point": {"row": 110, "column": 15}, "end_point": {"row": 110, "column": 16}}, {"id": 267, "type": "identifier", "text": "cf", "parent": 265, "children": [], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 18}}, {"id": 268, "type": "declaration", "text": "void *aux;", "parent": 246, "children": [269, 270], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 11}}, {"id": 269, "type": "primitive_type", "text": "void", "parent": 268, "children": [], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 5}}, {"id": 270, "type": "pointer_declarator", "text": "*aux", "parent": 268, "children": [271, 272], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 10}}, {"id": 271, "type": "*", "text": "*", "parent": 270, "children": [], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 7}}, {"id": 272, "type": "identifier", "text": "aux", "parent": 270, "children": [], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 10}}, {"id": 273, "type": "declaration", "text": "struct tlsb_dev_attach_args *tap = aux;", "parent": 246, "children": [274, 277], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 40}}, {"id": 274, "type": "struct_specifier", "text": "struct tlsb_dev_attach_args", "parent": 273, "children": [275, 276], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 28}}, {"id": 275, "type": "struct", "text": "struct", "parent": 274, "children": [], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 7}}, {"id": 276, "type": "type_identifier", "text": "tlsb_dev_attach_args", "parent": 274, "children": [], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 113, "column": 28}}, {"id": 277, "type": "init_declarator", "text": "*tap = aux", "parent": 273, "children": [278, 281, 282], "start_point": {"row": 113, "column": 29}, "end_point": {"row": 113, "column": 39}}, {"id": 278, "type": "pointer_declarator", "text": "*tap", "parent": 277, "children": [279, 280], "start_point": {"row": 113, "column": 29}, "end_point": {"row": 113, "column": 33}}, {"id": 279, "type": "*", "text": "*", "parent": 278, "children": [], "start_point": {"row": 113, "column": 29}, "end_point": {"row": 113, "column": 30}}, {"id": 280, "type": "identifier", "text": "tap", "parent": 278, "children": [], "start_point": {"row": 113, "column": 30}, "end_point": {"row": 113, "column": 33}}, {"id": 281, "type": "=", "text": "=", "parent": 277, "children": [], "start_point": {"row": 113, "column": 34}, "end_point": {"row": 113, "column": 35}}, {"id": 282, "type": "identifier", "text": "aux", "parent": 277, "children": [], "start_point": {"row": 113, "column": 36}, "end_point": {"row": 113, "column": 39}}, {"id": 283, "type": "if_statement", "text": "if (cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n\t cf->cf_loc[TLSBCF_NODE] != tap->ta_node)\n\t\treturn (0);", "parent": 246, "children": [284, 305], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 117, "column": 13}}, {"id": 284, "type": "parenthesized_expression", "text": "(cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n\t cf->cf_loc[TLSBCF_NODE] != tap->ta_node)", "parent": 283, "children": [285], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 116, "column": 45}}, {"id": 285, "type": "binary_expression", "text": "cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n\t cf->cf_loc[TLSBCF_NODE] != tap->ta_node", "parent": 284, "children": [286, 294, 295], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 116, "column": 44}}, {"id": 286, "type": "binary_expression", "text": "cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT", "parent": 285, "children": [287, 292, 293], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 115, "column": 51}}, {"id": 287, "type": "subscript_expression", "text": "cf->cf_loc[TLSBCF_NODE]", "parent": 286, "children": [288, 291], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 115, "column": 28}}, {"id": 288, "type": "field_expression", "text": "cf->cf_loc", "parent": 287, "children": [289, 290], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 115, "column": 15}}, {"id": 289, "type": "identifier", "text": "cf", "parent": 288, "children": [], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 115, "column": 7}}, {"id": 290, "type": "field_identifier", "text": "cf_loc", "parent": 288, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 15}}, {"id": 291, "type": "identifier", "text": "TLSBCF_NODE", "parent": 287, "children": [], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 27}}, {"id": 292, "type": "!=", "text": "!=", "parent": 286, "children": [], "start_point": {"row": 115, "column": 29}, "end_point": {"row": 115, "column": 31}}, {"id": 293, "type": "identifier", "text": "TLSBCF_NODE_DEFAULT", "parent": 286, "children": [], "start_point": {"row": 115, "column": 32}, "end_point": {"row": 115, "column": 51}}, {"id": 294, "type": "&&", "text": "&&", "parent": 285, "children": [], "start_point": {"row": 115, "column": 52}, "end_point": {"row": 115, "column": 54}}, {"id": 295, "type": "binary_expression", "text": "cf->cf_loc[TLSBCF_NODE] != tap->ta_node", "parent": 285, "children": [296, 301, 302], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 44}}, {"id": 296, "type": "subscript_expression", "text": "cf->cf_loc[TLSBCF_NODE]", "parent": 295, "children": [297, 300], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 28}}, {"id": 297, "type": "field_expression", "text": "cf->cf_loc", "parent": 296, "children": [298, 299], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 15}}, {"id": 298, "type": "identifier", "text": "cf", "parent": 297, "children": [], "start_point": {"row": 116, "column": 5}, "end_point": {"row": 116, "column": 7}}, {"id": 299, "type": "field_identifier", "text": "cf_loc", "parent": 297, "children": [], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 15}}, {"id": 300, "type": "identifier", "text": "TLSBCF_NODE", "parent": 296, "children": [], "start_point": {"row": 116, "column": 16}, "end_point": {"row": 116, "column": 27}}, {"id": 301, "type": "!=", "text": "!=", "parent": 295, "children": [], "start_point": {"row": 116, "column": 29}, "end_point": {"row": 116, "column": 31}}, {"id": 302, "type": "field_expression", "text": "tap->ta_node", "parent": 295, "children": [303, 304], "start_point": {"row": 116, "column": 32}, "end_point": {"row": 116, "column": 44}}, {"id": 303, "type": "identifier", "text": "tap", "parent": 302, "children": [], "start_point": {"row": 116, "column": 32}, "end_point": {"row": 116, "column": 35}}, {"id": 304, "type": "field_identifier", "text": "ta_node", "parent": 302, "children": [], "start_point": {"row": 116, "column": 37}, "end_point": {"row": 116, "column": 44}}, {"id": 305, "type": "return_statement", "text": "return (0);", "parent": 283, "children": [306], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 13}}, {"id": 306, "type": "parenthesized_expression", "text": "(0)", "parent": 305, "children": [307], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 12}}, {"id": 307, "type": "number_literal", "text": "0", "parent": 306, "children": [], "start_point": {"row": 117, "column": 10}, "end_point": {"row": 117, "column": 11}}, {"id": 308, "type": "return_statement", "text": "return ((*cf->cf_attach->ca_match)(parent, cf, aux));", "parent": 246, "children": [309], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 54}}, {"id": 309, "type": "parenthesized_expression", "text": "((*cf->cf_attach->ca_match)(parent, cf, aux))", "parent": 308, "children": [310], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 119, "column": 53}}, {"id": 310, "type": "call_expression", "text": "(*cf->cf_attach->ca_match)(parent, cf, aux)", "parent": 309, "children": [311, 319], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 52}}, {"id": 311, "type": "parenthesized_expression", "text": "(*cf->cf_attach->ca_match)", "parent": 310, "children": [312], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 35}}, {"id": 312, "type": "pointer_expression", "text": "*cf->cf_attach->ca_match", "parent": 311, "children": [313, 314], "start_point": {"row": 119, "column": 10}, "end_point": {"row": 119, "column": 34}}, {"id": 313, "type": "*", "text": "*", "parent": 312, "children": [], "start_point": {"row": 119, "column": 10}, "end_point": {"row": 119, "column": 11}}, {"id": 314, "type": "field_expression", "text": "cf->cf_attach->ca_match", "parent": 312, "children": [315, 318], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 34}}, {"id": 315, "type": "field_expression", "text": "cf->cf_attach", "parent": 314, "children": [316, 317], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 24}}, {"id": 316, "type": "identifier", "text": "cf", "parent": 315, "children": [], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 13}}, {"id": 317, "type": "field_identifier", "text": "cf_attach", "parent": 315, "children": [], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 24}}, {"id": 318, "type": "field_identifier", "text": "ca_match", "parent": 314, "children": [], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 34}}, {"id": 319, "type": "argument_list", "text": "(parent, cf, aux)", "parent": 310, "children": [320, 321, 322], "start_point": {"row": 119, "column": 35}, "end_point": {"row": 119, "column": 52}}, {"id": 320, "type": "identifier", "text": "parent", "parent": 319, "children": [], "start_point": {"row": 119, "column": 36}, "end_point": {"row": 119, "column": 42}}, {"id": 321, "type": "identifier", "text": "cf", "parent": 319, "children": [], "start_point": {"row": 119, "column": 44}, "end_point": {"row": 119, "column": 46}}, {"id": 322, "type": "identifier", "text": "aux", "parent": 319, "children": [], "start_point": {"row": 119, "column": 48}, "end_point": {"row": 119, "column": 51}}, {"id": 323, "type": "function_definition", "text": "static int\ntlsbmatch(parent, cf, aux)\n\tstruct device *parent;\n\tstruct cfdata *cf;\n\tvoid *aux;\n{\n\tstruct mainbus_attach_args *ma = aux;\n\n\t/* Make sure we're looking for a TurboLaser. */\n\tif (strcmp(ma->ma_name, tlsb_cd.cd_name) != 0)\n\t\treturn (0);\n\n\t/*\n\t * Only one instance of TurboLaser allowed,\n\t * and only available on 21000 processor type\n\t * platforms.\n\t */\n\tif ((cputype != ST_DEC_21000) || tlsb_found)\n\t\treturn (0);\n\n\treturn (1);\n}", "parent": null, "children": [324, 325, 331, 338, 345], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 143, "column": 1}}, {"id": 324, "type": "primitive_type", "text": "int", "parent": 323, "children": [], "start_point": {"row": 122, "column": 7}, "end_point": {"row": 122, "column": 10}}, {"id": 325, "type": "function_declarator", "text": "tlsbmatch(parent, cf, aux)", "parent": 323, "children": [326, 327], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 26}}, {"id": 326, "type": "identifier", "text": "tlsbmatch", "parent": 325, "children": [], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 9}}, {"id": 327, "type": "parameter_list", "text": "(parent, cf, aux)", "parent": 325, "children": [328, 329, 330], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 26}}, {"id": 328, "type": "identifier", "text": "parent", "parent": 327, "children": [], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 16}}, {"id": 329, "type": "identifier", "text": "cf", "parent": 327, "children": [], "start_point": {"row": 123, "column": 18}, "end_point": {"row": 123, "column": 20}}, {"id": 330, "type": "identifier", "text": "aux", "parent": 327, "children": [], "start_point": {"row": 123, "column": 22}, "end_point": {"row": 123, "column": 25}}, {"id": 331, "type": "declaration", "text": "struct device *parent;", "parent": 323, "children": [332, 335], "start_point": {"row": 124, "column": 1}, "end_point": {"row": 124, "column": 23}}, {"id": 332, "type": "struct_specifier", "text": "struct device", "parent": 331, "children": [333, 334], "start_point": {"row": 124, "column": 1}, "end_point": {"row": 124, "column": 14}}, {"id": 333, "type": "struct", "text": "struct", "parent": 332, "children": [], "start_point": {"row": 124, "column": 1}, "end_point": {"row": 124, "column": 7}}, {"id": 334, "type": "type_identifier", "text": "device", "parent": 332, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 14}}, {"id": 335, "type": "pointer_declarator", "text": "*parent", "parent": 331, "children": [336, 337], "start_point": {"row": 124, "column": 15}, "end_point": {"row": 124, "column": 22}}, {"id": 336, "type": "*", "text": "*", "parent": 335, "children": [], "start_point": {"row": 124, "column": 15}, "end_point": {"row": 124, "column": 16}}, {"id": 337, "type": "identifier", "text": "parent", "parent": 335, "children": [], "start_point": {"row": 124, "column": 16}, "end_point": {"row": 124, "column": 22}}, {"id": 338, "type": "declaration", "text": "struct cfdata *cf;", "parent": 323, "children": [339, 342], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 19}}, {"id": 339, "type": "struct_specifier", "text": "struct cfdata", "parent": 338, "children": [340, 341], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 14}}, {"id": 340, "type": "struct", "text": "struct", "parent": 339, "children": [], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 7}}, {"id": 341, "type": "type_identifier", "text": "cfdata", "parent": 339, "children": [], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 14}}, {"id": 342, "type": "pointer_declarator", "text": "*cf", "parent": 338, "children": [343, 344], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 18}}, {"id": 343, "type": "*", "text": "*", "parent": 342, "children": [], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 16}}, {"id": 344, "type": "identifier", "text": "cf", "parent": 342, "children": [], "start_point": {"row": 125, "column": 16}, "end_point": {"row": 125, "column": 18}}, {"id": 345, "type": "declaration", "text": "void *aux;", "parent": 323, "children": [346, 347], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 11}}, {"id": 346, "type": "primitive_type", "text": "void", "parent": 345, "children": [], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 5}}, {"id": 347, "type": "pointer_declarator", "text": "*aux", "parent": 345, "children": [348, 349], "start_point": {"row": 126, "column": 6}, "end_point": {"row": 126, "column": 10}}, {"id": 348, "type": "*", "text": "*", "parent": 347, "children": [], "start_point": {"row": 126, "column": 6}, "end_point": {"row": 126, "column": 7}}, {"id": 349, "type": "identifier", "text": "aux", "parent": 347, "children": [], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 10}}, {"id": 350, "type": "declaration", "text": "struct mainbus_attach_args *ma = aux;", "parent": 323, "children": [351, 354], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 38}}, {"id": 351, "type": "struct_specifier", "text": "struct mainbus_attach_args", "parent": 350, "children": [352, 353], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 27}}, {"id": 352, "type": "struct", "text": "struct", "parent": 351, "children": [], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 7}}, {"id": 353, "type": "type_identifier", "text": "mainbus_attach_args", "parent": 351, "children": [], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 27}}, {"id": 354, "type": "init_declarator", "text": "*ma = aux", "parent": 350, "children": [355, 358, 359], "start_point": {"row": 128, "column": 28}, "end_point": {"row": 128, "column": 37}}, {"id": 355, "type": "pointer_declarator", "text": "*ma", "parent": 354, "children": [356, 357], "start_point": {"row": 128, "column": 28}, "end_point": {"row": 128, "column": 31}}, {"id": 356, "type": "*", "text": "*", "parent": 355, "children": [], "start_point": {"row": 128, "column": 28}, "end_point": {"row": 128, "column": 29}}, {"id": 357, "type": "identifier", "text": "ma", "parent": 355, "children": [], "start_point": {"row": 128, "column": 29}, "end_point": {"row": 128, "column": 31}}, {"id": 358, "type": "=", "text": "=", "parent": 354, "children": [], "start_point": {"row": 128, "column": 32}, "end_point": {"row": 128, "column": 33}}, {"id": 359, "type": "identifier", "text": "aux", "parent": 354, "children": [], "start_point": {"row": 128, "column": 34}, "end_point": {"row": 128, "column": 37}}, {"id": 360, "type": "if_statement", "text": "if (strcmp(ma->ma_name, tlsb_cd.cd_name) != 0)\n\t\treturn (0);", "parent": 323, "children": [361, 374], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 132, "column": 13}}, {"id": 361, "type": "parenthesized_expression", "text": "(strcmp(ma->ma_name, tlsb_cd.cd_name) != 0)", "parent": 360, "children": [362], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 47}}, {"id": 362, "type": "binary_expression", "text": "strcmp(ma->ma_name, tlsb_cd.cd_name) != 0", "parent": 361, "children": [363, 372, 373], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 46}}, {"id": 363, "type": "call_expression", "text": "strcmp(ma->ma_name, tlsb_cd.cd_name)", "parent": 362, "children": [364, 365], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 41}}, {"id": 364, "type": "identifier", "text": "strcmp", "parent": 363, "children": [], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 11}}, {"id": 365, "type": "argument_list", "text": "(ma->ma_name, tlsb_cd.cd_name)", "parent": 363, "children": [366, 369], "start_point": {"row": 131, "column": 11}, "end_point": {"row": 131, "column": 41}}, {"id": 366, "type": "field_expression", "text": "ma->ma_name", "parent": 365, "children": [367, 368], "start_point": {"row": 131, "column": 12}, "end_point": {"row": 131, "column": 23}}, {"id": 367, "type": "identifier", "text": "ma", "parent": 366, "children": [], "start_point": {"row": 131, "column": 12}, "end_point": {"row": 131, "column": 14}}, {"id": 368, "type": "field_identifier", "text": "ma_name", "parent": 366, "children": [], "start_point": {"row": 131, "column": 16}, "end_point": {"row": 131, "column": 23}}, {"id": 369, "type": "field_expression", "text": "tlsb_cd.cd_name", "parent": 365, "children": [370, 371], "start_point": {"row": 131, "column": 25}, "end_point": {"row": 131, "column": 40}}, {"id": 370, "type": "identifier", "text": "tlsb_cd", "parent": 369, "children": [], "start_point": {"row": 131, "column": 25}, "end_point": {"row": 131, "column": 32}}, {"id": 371, "type": "field_identifier", "text": "cd_name", "parent": 369, "children": [], "start_point": {"row": 131, "column": 33}, "end_point": {"row": 131, "column": 40}}, {"id": 372, "type": "!=", "text": "!=", "parent": 362, "children": [], "start_point": {"row": 131, "column": 42}, "end_point": {"row": 131, "column": 44}}, {"id": 373, "type": "number_literal", "text": "0", "parent": 362, "children": [], "start_point": {"row": 131, "column": 45}, "end_point": {"row": 131, "column": 46}}, {"id": 374, "type": "return_statement", "text": "return (0);", "parent": 360, "children": [375], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 13}}, {"id": 375, "type": "parenthesized_expression", "text": "(0)", "parent": 374, "children": [376], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 12}}, {"id": 376, "type": "number_literal", "text": "0", "parent": 375, "children": [], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 11}}, {"id": 377, "type": "if_statement", "text": "if ((cputype != ST_DEC_21000) || tlsb_found)\n\t\treturn (0);", "parent": 323, "children": [378, 387], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 140, "column": 13}}, {"id": 378, "type": "parenthesized_expression", "text": "((cputype != ST_DEC_21000) || tlsb_found)", "parent": 377, "children": [379], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 45}}, {"id": 379, "type": "binary_expression", "text": "(cputype != ST_DEC_21000) || tlsb_found", "parent": 378, "children": [380, 385, 386], "start_point": {"row": 139, "column": 5}, "end_point": {"row": 139, "column": 44}}, {"id": 380, "type": "parenthesized_expression", "text": "(cputype != ST_DEC_21000)", "parent": 379, "children": [381], "start_point": {"row": 139, "column": 5}, "end_point": {"row": 139, "column": 30}}, {"id": 381, "type": "binary_expression", "text": "cputype != ST_DEC_21000", "parent": 380, "children": [382, 383, 384], "start_point": {"row": 139, "column": 6}, "end_point": {"row": 139, "column": 29}}, {"id": 382, "type": "identifier", "text": "cputype", "parent": 381, "children": [], "start_point": {"row": 139, "column": 6}, "end_point": {"row": 139, "column": 13}}, {"id": 383, "type": "!=", "text": "!=", "parent": 381, "children": [], "start_point": {"row": 139, "column": 14}, "end_point": {"row": 139, "column": 16}}, {"id": 384, "type": "identifier", "text": "ST_DEC_21000", "parent": 381, "children": [], "start_point": {"row": 139, "column": 17}, "end_point": {"row": 139, "column": 29}}, {"id": 385, "type": "||", "text": "||", "parent": 379, "children": [], "start_point": {"row": 139, "column": 31}, "end_point": {"row": 139, "column": 33}}, {"id": 386, "type": "identifier", "text": "tlsb_found", "parent": 379, "children": [], "start_point": {"row": 139, "column": 34}, "end_point": {"row": 139, "column": 44}}, {"id": 387, "type": "return_statement", "text": "return (0);", "parent": 377, "children": [388], "start_point": {"row": 140, "column": 2}, "end_point": {"row": 140, "column": 13}}, {"id": 388, "type": "parenthesized_expression", "text": "(0)", "parent": 387, "children": [389], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 12}}, {"id": 389, "type": "number_literal", "text": "0", "parent": 388, "children": [], "start_point": {"row": 140, "column": 10}, "end_point": {"row": 140, "column": 11}}, {"id": 390, "type": "return_statement", "text": "return (1);", "parent": 323, "children": [391], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 12}}, {"id": 391, "type": "parenthesized_expression", "text": "(1)", "parent": 390, "children": [392], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 11}}, {"id": 392, "type": "number_literal", "text": "1", "parent": 391, "children": [], "start_point": {"row": 142, "column": 9}, "end_point": {"row": 142, "column": 10}}, {"id": 393, "type": "function_definition", "text": "static void\ntlsbattach(parent, self, aux)\n\tstruct device *parent;\n\tstruct device *self;\n\tvoid *aux;\n{\n\tstruct tlsb_dev_attach_args ta;\n\tu_int32_t tldev;\n\tint node;\n\n\tprintf(\"\\n\");\n\n\t/*\n\t * Attempt to find all devices on the bus, including\n\t * CPUs, memory modules, and I/O modules.\n\t */\n\n\t/*\n\t * Sigh. I would like to just start off nicely,\n\t * but I need to treat I/O modules differently-\n\t * The highest priority I/O node has to be in\n\t * node #8, and I want to find it *first*, since\n\t * it will have the primary disks (most likely)\n\t * on it.\n\t */\n\tfor (node = 0; node <= TLSB_NODE_MAX; ++node) {\n\t\t/*\n\t\t * Check for invalid address. This may not really\n\t\t * be necessary, but what the heck...\n\t\t */\n\t\tif (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n\t\t\tcontinue;\n\t\ttldev = TLSB_GET_NODEREG(node, TLDEV);\n\t\tif (tldev == 0) {\n\t\t\t/* Nothing at this node. */\n\t\t\tcontinue;\n\t\t}\n\t\t/*\n\t\t * Store up that we found something at this node.\n\t\t * We do this so that we don't have to do something\n\t\t * silly at fault time like try a 'baddadr'...\n\t\t */\n\t\ttlsb_found |= (1 << node);\n\t\tif (TLDEV_ISIOPORT(tldev))\n\t\t\tcontinue;\t/* not interested right now */\n\t\tta.ta_node = node;\n\t\tta.ta_dtype = TLDEV_DTYPE(tldev);\n\t\tta.ta_swrev = TLDEV_SWREV(tldev);\n\t\tta.ta_hwrev = TLDEV_HWREV(tldev);\n\n\t\t/*\n\t\t * Deal with hooking CPU instances to TurboLaser nodes.\n\t\t */\n\t\tif (TLDEV_ISCPU(tldev)) {\n\t\t\tprintf(\"%s node %d: %s\\n\", self->dv_xname,\n\t\t\t node, tlsb_node_type_str(tldev));\n\t\t}\n\t\t/*\n\t\t * Attach any children nodes, including a CPU's GBus\n\t\t */\n\t\tconfig_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n\t}\n\t/*\n\t * *Now* search for I/O nodes (in descending order)\n\t */\n\twhile (--node > 0) {\n\t\tif (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n\t\t\tcontinue;\n\t\ttldev = TLSB_GET_NODEREG(node, TLDEV);\n\t\tif (tldev == 0) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (TLDEV_ISIOPORT(tldev)) {\n#if defined(MULTIPROCESSOR)\n\t\t\t/*\n\t\t\t * XXX Eventually, we want to select a secondary\n\t\t\t * XXX processor on which to field interrupts for\n\t\t\t * XXX this node. However, we just send them to\n\t\t\t * XXX the primary CPU for now.\n\t\t\t *\n\t\t\t * XXX Maybe multiple CPUs? Does the hardware\n\t\t\t * XXX round-robin, or check the length of the\n\t\t\t * XXX per-CPU interrupt queue?\n\t\t\t */\n\t\t\tprintf(\"%s node %d: routing interrupts to %s\\n\",\n\t\t\t self->dv_xname, node,\n\t\t\t cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n\t\t\t/*\n\t\t\t * Make sure interrupts are sent to the primary CPU.\n\t\t\t */\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n\t\t\tta.ta_node = node;\n\t\t\tta.ta_dtype = TLDEV_DTYPE(tldev);\n\t\t\tta.ta_swrev = TLDEV_SWREV(tldev);\n\t\t\tta.ta_hwrev = TLDEV_HWREV(tldev);\n\t\t\tconfig_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n\t\t}\n\t}\n}", "parent": null, "children": [394, 395, 401, 408, 415], "start_point": {"row": 145, "column": 0}, "end_point": {"row": 249, "column": 1}}, {"id": 394, "type": "primitive_type", "text": "void", "parent": 393, "children": [], "start_point": {"row": 145, "column": 7}, "end_point": {"row": 145, "column": 11}}, {"id": 395, "type": "function_declarator", "text": "tlsbattach(parent, self, aux)", "parent": 393, "children": [396, 397], "start_point": {"row": 146, "column": 0}, "end_point": {"row": 146, "column": 29}}, {"id": 396, "type": "identifier", "text": "tlsbattach", "parent": 395, "children": [], "start_point": {"row": 146, "column": 0}, "end_point": {"row": 146, "column": 10}}, {"id": 397, "type": "parameter_list", "text": "(parent, self, aux)", "parent": 395, "children": [398, 399, 400], "start_point": {"row": 146, "column": 10}, "end_point": {"row": 146, "column": 29}}, {"id": 398, "type": "identifier", "text": "parent", "parent": 397, "children": [], "start_point": {"row": 146, "column": 11}, "end_point": {"row": 146, "column": 17}}, {"id": 399, "type": "identifier", "text": "self", "parent": 397, "children": [], "start_point": {"row": 146, "column": 19}, "end_point": {"row": 146, "column": 23}}, {"id": 400, "type": "identifier", "text": "aux", "parent": 397, "children": [], "start_point": {"row": 146, "column": 25}, "end_point": {"row": 146, "column": 28}}, {"id": 401, "type": "declaration", "text": "struct device *parent;", "parent": 393, "children": [402, 405], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 147, "column": 23}}, {"id": 402, "type": "struct_specifier", "text": "struct device", "parent": 401, "children": [403, 404], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 147, "column": 14}}, {"id": 403, "type": "struct", "text": "struct", "parent": 402, "children": [], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 147, "column": 7}}, {"id": 404, "type": "type_identifier", "text": "device", "parent": 402, "children": [], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 14}}, {"id": 405, "type": "pointer_declarator", "text": "*parent", "parent": 401, "children": [406, 407], "start_point": {"row": 147, "column": 15}, "end_point": {"row": 147, "column": 22}}, {"id": 406, "type": "*", "text": "*", "parent": 405, "children": [], "start_point": {"row": 147, "column": 15}, "end_point": {"row": 147, "column": 16}}, {"id": 407, "type": "identifier", "text": "parent", "parent": 405, "children": [], "start_point": {"row": 147, "column": 16}, "end_point": {"row": 147, "column": 22}}, {"id": 408, "type": "declaration", "text": "struct device *self;", "parent": 393, "children": [409, 412], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 148, "column": 21}}, {"id": 409, "type": "struct_specifier", "text": "struct device", "parent": 408, "children": [410, 411], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 148, "column": 14}}, {"id": 410, "type": "struct", "text": "struct", "parent": 409, "children": [], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 148, "column": 7}}, {"id": 411, "type": "type_identifier", "text": "device", "parent": 409, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 14}}, {"id": 412, "type": "pointer_declarator", "text": "*self", "parent": 408, "children": [413, 414], "start_point": {"row": 148, "column": 15}, "end_point": {"row": 148, "column": 20}}, {"id": 413, "type": "*", "text": "*", "parent": 412, "children": [], "start_point": {"row": 148, "column": 15}, "end_point": {"row": 148, "column": 16}}, {"id": 414, "type": "identifier", "text": "self", "parent": 412, "children": [], "start_point": {"row": 148, "column": 16}, "end_point": {"row": 148, "column": 20}}, {"id": 415, "type": "declaration", "text": "void *aux;", "parent": 393, "children": [416, 417], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 11}}, {"id": 416, "type": "primitive_type", "text": "void", "parent": 415, "children": [], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 5}}, {"id": 417, "type": "pointer_declarator", "text": "*aux", "parent": 415, "children": [418, 419], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 10}}, {"id": 418, "type": "*", "text": "*", "parent": 417, "children": [], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 7}}, {"id": 419, "type": "identifier", "text": "aux", "parent": 417, "children": [], "start_point": {"row": 149, "column": 7}, "end_point": {"row": 149, "column": 10}}, {"id": 420, "type": "declaration", "text": "struct tlsb_dev_attach_args ta;", "parent": 393, "children": [421, 424], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 151, "column": 32}}, {"id": 421, "type": "struct_specifier", "text": "struct tlsb_dev_attach_args", "parent": 420, "children": [422, 423], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 151, "column": 28}}, {"id": 422, "type": "struct", "text": "struct", "parent": 421, "children": [], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 151, "column": 7}}, {"id": 423, "type": "type_identifier", "text": "tlsb_dev_attach_args", "parent": 421, "children": [], "start_point": {"row": 151, "column": 8}, "end_point": {"row": 151, "column": 28}}, {"id": 424, "type": "identifier", "text": "ta", "parent": 420, "children": [], "start_point": {"row": 151, "column": 29}, "end_point": {"row": 151, "column": 31}}, {"id": 425, "type": "declaration", "text": "u_int32_t tldev;", "parent": 393, "children": [426, 427], "start_point": {"row": 152, "column": 1}, "end_point": {"row": 152, "column": 17}}, {"id": 426, "type": "type_identifier", "text": "u_int32_t", "parent": 425, "children": [], "start_point": {"row": 152, "column": 1}, "end_point": {"row": 152, "column": 10}}, {"id": 427, "type": "identifier", "text": "tldev", "parent": 425, "children": [], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 16}}, {"id": 428, "type": "declaration", "text": "int node;", "parent": 393, "children": [429, 430], "start_point": {"row": 153, "column": 1}, "end_point": {"row": 153, "column": 10}}, {"id": 429, "type": "primitive_type", "text": "int", "parent": 428, "children": [], "start_point": {"row": 153, "column": 1}, "end_point": {"row": 153, "column": 4}}, {"id": 430, "type": "identifier", "text": "node", "parent": 428, "children": [], "start_point": {"row": 153, "column": 5}, "end_point": {"row": 153, "column": 9}}, {"id": 431, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 393, "children": [432, 433], "start_point": {"row": 155, "column": 1}, "end_point": {"row": 155, "column": 13}}, {"id": 432, "type": "identifier", "text": "printf", "parent": 431, "children": [], "start_point": {"row": 155, "column": 1}, "end_point": {"row": 155, "column": 7}}, {"id": 433, "type": "argument_list", "text": "(\"\\n\")", "parent": 431, "children": [434], "start_point": {"row": 155, "column": 7}, "end_point": {"row": 155, "column": 13}}, {"id": 434, "type": "string_literal", "text": "\"\\n\"", "parent": 433, "children": [435], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 12}}, {"id": 435, "type": "escape_sequence", "text": "\\n", "parent": 434, "children": [], "start_point": {"row": 155, "column": 9}, "end_point": {"row": 155, "column": 11}}, {"id": 436, "type": "for_statement", "text": "for (node = 0; node <= TLSB_NODE_MAX; ++node) {\n\t\t/*\n\t\t * Check for invalid address. This may not really\n\t\t * be necessary, but what the heck...\n\t\t */\n\t\tif (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n\t\t\tcontinue;\n\t\ttldev = TLSB_GET_NODEREG(node, TLDEV);\n\t\tif (tldev == 0) {\n\t\t\t/* Nothing at this node. */\n\t\t\tcontinue;\n\t\t}\n\t\t/*\n\t\t * Store up that we found something at this node.\n\t\t * We do this so that we don't have to do something\n\t\t * silly at fault time like try a 'baddadr'...\n\t\t */\n\t\ttlsb_found |= (1 << node);\n\t\tif (TLDEV_ISIOPORT(tldev))\n\t\t\tcontinue;\t/* not interested right now */\n\t\tta.ta_node = node;\n\t\tta.ta_dtype = TLDEV_DTYPE(tldev);\n\t\tta.ta_swrev = TLDEV_SWREV(tldev);\n\t\tta.ta_hwrev = TLDEV_HWREV(tldev);\n\n\t\t/*\n\t\t * Deal with hooking CPU instances to TurboLaser nodes.\n\t\t */\n\t\tif (TLDEV_ISCPU(tldev)) {\n\t\t\tprintf(\"%s node %d: %s\\n\", self->dv_xname,\n\t\t\t node, tlsb_node_type_str(tldev));\n\t\t}\n\t\t/*\n\t\t * Attach any children nodes, including a CPU's GBus\n\t\t */\n\t\tconfig_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n\t}", "parent": 393, "children": [437, 441, 445], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 206, "column": 2}}, {"id": 437, "type": "assignment_expression", "text": "node = 0", "parent": 436, "children": [438, 439, 440], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 14}}, {"id": 438, "type": "identifier", "text": "node", "parent": 437, "children": [], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 10}}, {"id": 439, "type": "=", "text": "=", "parent": 437, "children": [], "start_point": {"row": 170, "column": 11}, "end_point": {"row": 170, "column": 12}}, {"id": 440, "type": "number_literal", "text": "0", "parent": 437, "children": [], "start_point": {"row": 170, "column": 13}, "end_point": {"row": 170, "column": 14}}, {"id": 441, "type": "binary_expression", "text": "node <= TLSB_NODE_MAX", "parent": 436, "children": [442, 443, 444], "start_point": {"row": 170, "column": 16}, "end_point": {"row": 170, "column": 37}}, {"id": 442, "type": "identifier", "text": "node", "parent": 441, "children": [], "start_point": {"row": 170, "column": 16}, "end_point": {"row": 170, "column": 20}}, {"id": 443, "type": "<=", "text": "<=", "parent": 441, "children": [], "start_point": {"row": 170, "column": 21}, "end_point": {"row": 170, "column": 23}}, {"id": 444, "type": "identifier", "text": "TLSB_NODE_MAX", "parent": 441, "children": [], "start_point": {"row": 170, "column": 24}, "end_point": {"row": 170, "column": 37}}, {"id": 445, "type": "update_expression", "text": "++node", "parent": 436, "children": [446, 447], "start_point": {"row": 170, "column": 39}, "end_point": {"row": 170, "column": 45}}, {"id": 446, "type": "++", "text": "++", "parent": 445, "children": [], "start_point": {"row": 170, "column": 39}, "end_point": {"row": 170, "column": 41}}, {"id": 447, "type": "identifier", "text": "node", "parent": 445, "children": [], "start_point": {"row": 170, "column": 41}, "end_point": {"row": 170, "column": 45}}, {"id": 448, "type": "if_statement", "text": "if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n\t\t\tcontinue;", "parent": 436, "children": [449, 461], "start_point": {"row": 175, "column": 2}, "end_point": {"row": 176, "column": 12}}, {"id": 449, "type": "parenthesized_expression", "text": "(badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))", "parent": 448, "children": [450], "start_point": {"row": 175, "column": 5}, "end_point": {"row": 175, "column": 66}}, {"id": 450, "type": "call_expression", "text": "badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))", "parent": 449, "children": [451, 452], "start_point": {"row": 175, "column": 6}, "end_point": {"row": 175, "column": 65}}, {"id": 451, "type": "identifier", "text": "badaddr", "parent": 450, "children": [], "start_point": {"row": 175, "column": 6}, "end_point": {"row": 175, "column": 13}}, {"id": 452, "type": "argument_list", "text": "(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))", "parent": 450, "children": [453, 458], "start_point": {"row": 175, "column": 13}, "end_point": {"row": 175, "column": 65}}, {"id": 453, "type": "call_expression", "text": "TLSB_NODE_REG_ADDR(node, TLDEV)", "parent": 452, "children": [454, 455], "start_point": {"row": 175, "column": 14}, "end_point": {"row": 175, "column": 45}}, {"id": 454, "type": "identifier", "text": "TLSB_NODE_REG_ADDR", "parent": 453, "children": [], "start_point": {"row": 175, "column": 14}, "end_point": {"row": 175, "column": 32}}, {"id": 455, "type": "argument_list", "text": "(node, TLDEV)", "parent": 453, "children": [456, 457], "start_point": {"row": 175, "column": 32}, "end_point": {"row": 175, "column": 45}}, {"id": 456, "type": "identifier", "text": "node", "parent": 455, "children": [], "start_point": {"row": 175, "column": 33}, "end_point": {"row": 175, "column": 37}}, {"id": 457, "type": "identifier", "text": "TLDEV", "parent": 455, "children": [], "start_point": {"row": 175, "column": 39}, "end_point": {"row": 175, "column": 44}}, {"id": 458, "type": "sizeof_expression", "text": "sizeof(u_int32_t)", "parent": 452, "children": [459], "start_point": {"row": 175, "column": 47}, "end_point": {"row": 175, "column": 64}}, {"id": 459, "type": "parenthesized_expression", "text": "(u_int32_t)", "parent": 458, "children": [460], "start_point": {"row": 175, "column": 53}, "end_point": {"row": 175, "column": 64}}, {"id": 460, "type": "identifier", "text": "u_int32_t", "parent": 459, "children": [], "start_point": {"row": 175, "column": 54}, "end_point": {"row": 175, "column": 63}}, {"id": 461, "type": "continue_statement", "text": "continue;", "parent": 448, "children": [462], "start_point": {"row": 176, "column": 3}, "end_point": {"row": 176, "column": 12}}, {"id": 462, "type": "continue", "text": "continue", "parent": 461, "children": [], "start_point": {"row": 176, "column": 3}, "end_point": {"row": 176, "column": 11}}, {"id": 463, "type": "assignment_expression", "text": "tldev = TLSB_GET_NODEREG(node, TLDEV)", "parent": 436, "children": [464, 465, 466], "start_point": {"row": 177, "column": 2}, "end_point": {"row": 177, "column": 39}}, {"id": 464, "type": "identifier", "text": "tldev", "parent": 463, "children": [], "start_point": {"row": 177, "column": 2}, "end_point": {"row": 177, "column": 7}}, {"id": 465, "type": "=", "text": "=", "parent": 463, "children": [], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 9}}, {"id": 466, "type": "call_expression", "text": "TLSB_GET_NODEREG(node, TLDEV)", "parent": 463, "children": [467, 468], "start_point": {"row": 177, "column": 10}, "end_point": {"row": 177, "column": 39}}, {"id": 467, "type": "identifier", "text": "TLSB_GET_NODEREG", "parent": 466, "children": [], "start_point": {"row": 177, "column": 10}, "end_point": {"row": 177, "column": 26}}, {"id": 468, "type": "argument_list", "text": "(node, TLDEV)", "parent": 466, "children": [469, 470], "start_point": {"row": 177, "column": 26}, "end_point": {"row": 177, "column": 39}}, {"id": 469, "type": "identifier", "text": "node", "parent": 468, "children": [], "start_point": {"row": 177, "column": 27}, "end_point": {"row": 177, "column": 31}}, {"id": 470, "type": "identifier", "text": "TLDEV", "parent": 468, "children": [], "start_point": {"row": 177, "column": 33}, "end_point": {"row": 177, "column": 38}}, {"id": 471, "type": "if_statement", "text": "if (tldev == 0) {\n\t\t\t/* Nothing at this node. */\n\t\t\tcontinue;\n\t\t}", "parent": 436, "children": [472], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 181, "column": 3}}, {"id": 472, "type": "parenthesized_expression", "text": "(tldev == 0)", "parent": 471, "children": [473], "start_point": {"row": 178, "column": 5}, "end_point": {"row": 178, "column": 17}}, {"id": 473, "type": "binary_expression", "text": "tldev == 0", "parent": 472, "children": [474, 475, 476], "start_point": {"row": 178, "column": 6}, "end_point": {"row": 178, "column": 16}}, {"id": 474, "type": "identifier", "text": "tldev", "parent": 473, "children": [], "start_point": {"row": 178, "column": 6}, "end_point": {"row": 178, "column": 11}}, {"id": 475, "type": "==", "text": "==", "parent": 473, "children": [], "start_point": {"row": 178, "column": 12}, "end_point": {"row": 178, "column": 14}}, {"id": 476, "type": "number_literal", "text": "0", "parent": 473, "children": [], "start_point": {"row": 178, "column": 15}, "end_point": {"row": 178, "column": 16}}, {"id": 477, "type": "continue_statement", "text": "continue;", "parent": 471, "children": [478], "start_point": {"row": 180, "column": 3}, "end_point": {"row": 180, "column": 12}}, {"id": 478, "type": "continue", "text": "continue", "parent": 477, "children": [], "start_point": {"row": 180, "column": 3}, "end_point": {"row": 180, "column": 11}}, {"id": 479, "type": "assignment_expression", "text": "tlsb_found |= (1 << node)", "parent": 436, "children": [480, 481, 482], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 27}}, {"id": 480, "type": "identifier", "text": "tlsb_found", "parent": 479, "children": [], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 12}}, {"id": 481, "type": "|=", "text": "|=", "parent": 479, "children": [], "start_point": {"row": 187, "column": 13}, "end_point": {"row": 187, "column": 15}}, {"id": 482, "type": "parenthesized_expression", "text": "(1 << node)", "parent": 479, "children": [483], "start_point": {"row": 187, "column": 16}, "end_point": {"row": 187, "column": 27}}, {"id": 483, "type": "binary_expression", "text": "1 << node", "parent": 482, "children": [484, 485, 486], "start_point": {"row": 187, "column": 17}, "end_point": {"row": 187, "column": 26}}, {"id": 484, "type": "number_literal", "text": "1", "parent": 483, "children": [], "start_point": {"row": 187, "column": 17}, "end_point": {"row": 187, "column": 18}}, {"id": 485, "type": "<<", "text": "<<", "parent": 483, "children": [], "start_point": {"row": 187, "column": 19}, "end_point": {"row": 187, "column": 21}}, {"id": 486, "type": "identifier", "text": "node", "parent": 483, "children": [], "start_point": {"row": 187, "column": 22}, "end_point": {"row": 187, "column": 26}}, {"id": 487, "type": "if_statement", "text": "if (TLDEV_ISIOPORT(tldev))\n\t\t\tcontinue;", "parent": 436, "children": [488, 493], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 189, "column": 12}}, {"id": 488, "type": "parenthesized_expression", "text": "(TLDEV_ISIOPORT(tldev))", "parent": 487, "children": [489], "start_point": {"row": 188, "column": 5}, "end_point": {"row": 188, "column": 28}}, {"id": 489, "type": "call_expression", "text": "TLDEV_ISIOPORT(tldev)", "parent": 488, "children": [490, 491], "start_point": {"row": 188, "column": 6}, "end_point": {"row": 188, "column": 27}}, {"id": 490, "type": "identifier", "text": "TLDEV_ISIOPORT", "parent": 489, "children": [], "start_point": {"row": 188, "column": 6}, "end_point": {"row": 188, "column": 20}}, {"id": 491, "type": "argument_list", "text": "(tldev)", "parent": 489, "children": [492], "start_point": {"row": 188, "column": 20}, "end_point": {"row": 188, "column": 27}}, {"id": 492, "type": "identifier", "text": "tldev", "parent": 491, "children": [], "start_point": {"row": 188, "column": 21}, "end_point": {"row": 188, "column": 26}}, {"id": 493, "type": "continue_statement", "text": "continue;", "parent": 487, "children": [494], "start_point": {"row": 189, "column": 3}, "end_point": {"row": 189, "column": 12}}, {"id": 494, "type": "continue", "text": "continue", "parent": 493, "children": [], "start_point": {"row": 189, "column": 3}, "end_point": {"row": 189, "column": 11}}, {"id": 495, "type": "assignment_expression", "text": "ta.ta_node = node", "parent": 436, "children": [496, 499, 500], "start_point": {"row": 190, "column": 2}, "end_point": {"row": 190, "column": 19}}, {"id": 496, "type": "field_expression", "text": "ta.ta_node", "parent": 495, "children": [497, 498], "start_point": {"row": 190, "column": 2}, "end_point": {"row": 190, "column": 12}}, {"id": 497, "type": "identifier", "text": "ta", "parent": 496, "children": [], "start_point": {"row": 190, "column": 2}, "end_point": {"row": 190, "column": 4}}, {"id": 498, "type": "field_identifier", "text": "ta_node", "parent": 496, "children": [], "start_point": {"row": 190, "column": 5}, "end_point": {"row": 190, "column": 12}}, {"id": 499, "type": "=", "text": "=", "parent": 495, "children": [], "start_point": {"row": 190, "column": 13}, "end_point": {"row": 190, "column": 14}}, {"id": 500, "type": "identifier", "text": "node", "parent": 495, "children": [], "start_point": {"row": 190, "column": 15}, "end_point": {"row": 190, "column": 19}}, {"id": 501, "type": "assignment_expression", "text": "ta.ta_dtype = TLDEV_DTYPE(tldev)", "parent": 436, "children": [502, 505, 506], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 34}}, {"id": 502, "type": "field_expression", "text": "ta.ta_dtype", "parent": 501, "children": [503, 504], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 13}}, {"id": 503, "type": "identifier", "text": "ta", "parent": 502, "children": [], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 4}}, {"id": 504, "type": "field_identifier", "text": "ta_dtype", "parent": 502, "children": [], "start_point": {"row": 191, "column": 5}, "end_point": {"row": 191, "column": 13}}, {"id": 505, "type": "=", "text": "=", "parent": 501, "children": [], "start_point": {"row": 191, "column": 14}, "end_point": {"row": 191, "column": 15}}, {"id": 506, "type": "call_expression", "text": "TLDEV_DTYPE(tldev)", "parent": 501, "children": [507, 508], "start_point": {"row": 191, "column": 16}, "end_point": {"row": 191, "column": 34}}, {"id": 507, "type": "identifier", "text": "TLDEV_DTYPE", "parent": 506, "children": [], "start_point": {"row": 191, "column": 16}, "end_point": {"row": 191, "column": 27}}, {"id": 508, "type": "argument_list", "text": "(tldev)", "parent": 506, "children": [509], "start_point": {"row": 191, "column": 27}, "end_point": {"row": 191, "column": 34}}, {"id": 509, "type": "identifier", "text": "tldev", "parent": 508, "children": [], "start_point": {"row": 191, "column": 28}, "end_point": {"row": 191, "column": 33}}, {"id": 510, "type": "assignment_expression", "text": "ta.ta_swrev = TLDEV_SWREV(tldev)", "parent": 436, "children": [511, 514, 515], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 34}}, {"id": 511, "type": "field_expression", "text": "ta.ta_swrev", "parent": 510, "children": [512, 513], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 13}}, {"id": 512, "type": "identifier", "text": "ta", "parent": 511, "children": [], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 4}}, {"id": 513, "type": "field_identifier", "text": "ta_swrev", "parent": 511, "children": [], "start_point": {"row": 192, "column": 5}, "end_point": {"row": 192, "column": 13}}, {"id": 514, "type": "=", "text": "=", "parent": 510, "children": [], "start_point": {"row": 192, "column": 14}, "end_point": {"row": 192, "column": 15}}, {"id": 515, "type": "call_expression", "text": "TLDEV_SWREV(tldev)", "parent": 510, "children": [516, 517], "start_point": {"row": 192, "column": 16}, "end_point": {"row": 192, "column": 34}}, {"id": 516, "type": "identifier", "text": "TLDEV_SWREV", "parent": 515, "children": [], "start_point": {"row": 192, "column": 16}, "end_point": {"row": 192, "column": 27}}, {"id": 517, "type": "argument_list", "text": "(tldev)", "parent": 515, "children": [518], "start_point": {"row": 192, "column": 27}, "end_point": {"row": 192, "column": 34}}, {"id": 518, "type": "identifier", "text": "tldev", "parent": 517, "children": [], "start_point": {"row": 192, "column": 28}, "end_point": {"row": 192, "column": 33}}, {"id": 519, "type": "assignment_expression", "text": "ta.ta_hwrev = TLDEV_HWREV(tldev)", "parent": 436, "children": [520, 523, 524], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 34}}, {"id": 520, "type": "field_expression", "text": "ta.ta_hwrev", "parent": 519, "children": [521, 522], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 13}}, {"id": 521, "type": "identifier", "text": "ta", "parent": 520, "children": [], "start_point": {"row": 193, "column": 2}, "end_point": {"row": 193, "column": 4}}, {"id": 522, "type": "field_identifier", "text": "ta_hwrev", "parent": 520, "children": [], "start_point": {"row": 193, "column": 5}, "end_point": {"row": 193, "column": 13}}, {"id": 523, "type": "=", "text": "=", "parent": 519, "children": [], "start_point": {"row": 193, "column": 14}, "end_point": {"row": 193, "column": 15}}, {"id": 524, "type": "call_expression", "text": "TLDEV_HWREV(tldev)", "parent": 519, "children": [525, 526], "start_point": {"row": 193, "column": 16}, "end_point": {"row": 193, "column": 34}}, {"id": 525, "type": "identifier", "text": "TLDEV_HWREV", "parent": 524, "children": [], "start_point": {"row": 193, "column": 16}, "end_point": {"row": 193, "column": 27}}, {"id": 526, "type": "argument_list", "text": "(tldev)", "parent": 524, "children": [527], "start_point": {"row": 193, "column": 27}, "end_point": {"row": 193, "column": 34}}, {"id": 527, "type": "identifier", "text": "tldev", "parent": 526, "children": [], "start_point": {"row": 193, "column": 28}, "end_point": {"row": 193, "column": 33}}, {"id": 528, "type": "if_statement", "text": "if (TLDEV_ISCPU(tldev)) {\n\t\t\tprintf(\"%s node %d: %s\\n\", self->dv_xname,\n\t\t\t node, tlsb_node_type_str(tldev));\n\t\t}", "parent": 436, "children": [529], "start_point": {"row": 198, "column": 2}, "end_point": {"row": 201, "column": 3}}, {"id": 529, "type": "parenthesized_expression", "text": "(TLDEV_ISCPU(tldev))", "parent": 528, "children": [530], "start_point": {"row": 198, "column": 5}, "end_point": {"row": 198, "column": 25}}, {"id": 530, "type": "call_expression", "text": "TLDEV_ISCPU(tldev)", "parent": 529, "children": [531, 532], "start_point": {"row": 198, "column": 6}, "end_point": {"row": 198, "column": 24}}, {"id": 531, "type": "identifier", "text": "TLDEV_ISCPU", "parent": 530, "children": [], "start_point": {"row": 198, "column": 6}, "end_point": {"row": 198, "column": 17}}, {"id": 532, "type": "argument_list", "text": "(tldev)", "parent": 530, "children": [533], "start_point": {"row": 198, "column": 17}, "end_point": {"row": 198, "column": 24}}, {"id": 533, "type": "identifier", "text": "tldev", "parent": 532, "children": [], "start_point": {"row": 198, "column": 18}, "end_point": {"row": 198, "column": 23}}, {"id": 534, "type": "call_expression", "text": "printf(\"%s node %d: %s\\n\", self->dv_xname,\n\t\t\t node, tlsb_node_type_str(tldev))", "parent": 528, "children": [535, 536], "start_point": {"row": 199, "column": 3}, "end_point": {"row": 200, "column": 39}}, {"id": 535, "type": "identifier", "text": "printf", "parent": 534, "children": [], "start_point": {"row": 199, "column": 3}, "end_point": {"row": 199, "column": 9}}, {"id": 536, "type": "argument_list", "text": "(\"%s node %d: %s\\n\", self->dv_xname,\n\t\t\t node, tlsb_node_type_str(tldev))", "parent": 534, "children": [537, 539, 542, 543], "start_point": {"row": 199, "column": 9}, "end_point": {"row": 200, "column": 39}}, {"id": 537, "type": "string_literal", "text": "\"%s node %d: %s\\n\"", "parent": 536, "children": [538], "start_point": {"row": 199, "column": 10}, "end_point": {"row": 199, "column": 28}}, {"id": 538, "type": "escape_sequence", "text": "\\n", "parent": 537, "children": [], "start_point": {"row": 199, "column": 25}, "end_point": {"row": 199, "column": 27}}, {"id": 539, "type": "field_expression", "text": "self->dv_xname", "parent": 536, "children": [540, 541], "start_point": {"row": 199, "column": 30}, "end_point": {"row": 199, "column": 44}}, {"id": 540, "type": "identifier", "text": "self", "parent": 539, "children": [], "start_point": {"row": 199, "column": 30}, "end_point": {"row": 199, "column": 34}}, {"id": 541, "type": "field_identifier", "text": "dv_xname", "parent": 539, "children": [], "start_point": {"row": 199, "column": 36}, "end_point": {"row": 199, "column": 44}}, {"id": 542, "type": "identifier", "text": "node", "parent": 536, "children": [], "start_point": {"row": 200, "column": 7}, "end_point": {"row": 200, "column": 11}}, {"id": 543, "type": "call_expression", "text": "tlsb_node_type_str(tldev)", "parent": 536, "children": [544, 545], "start_point": {"row": 200, "column": 13}, "end_point": {"row": 200, "column": 38}}, {"id": 544, "type": "identifier", "text": "tlsb_node_type_str", "parent": 543, "children": [], "start_point": {"row": 200, "column": 13}, "end_point": {"row": 200, "column": 31}}, {"id": 545, "type": "argument_list", "text": "(tldev)", "parent": 543, "children": [546], "start_point": {"row": 200, "column": 31}, "end_point": {"row": 200, "column": 38}}, {"id": 546, "type": "identifier", "text": "tldev", "parent": 545, "children": [], "start_point": {"row": 200, "column": 32}, "end_point": {"row": 200, "column": 37}}, {"id": 547, "type": "call_expression", "text": "config_found_sm(self, &ta, tlsbprint, tlsbsubmatch)", "parent": 436, "children": [548, 549], "start_point": {"row": 205, "column": 2}, "end_point": {"row": 205, "column": 53}}, {"id": 548, "type": "identifier", "text": "config_found_sm", "parent": 547, "children": [], "start_point": {"row": 205, "column": 2}, "end_point": {"row": 205, "column": 17}}, {"id": 549, "type": "argument_list", "text": "(self, &ta, tlsbprint, tlsbsubmatch)", "parent": 547, "children": [550, 551, 553, 554], "start_point": {"row": 205, "column": 17}, "end_point": {"row": 205, "column": 53}}, {"id": 550, "type": "identifier", "text": "self", "parent": 549, "children": [], "start_point": {"row": 205, "column": 18}, "end_point": {"row": 205, "column": 22}}, {"id": 551, "type": "pointer_expression", "text": "&ta", "parent": 549, "children": [552], "start_point": {"row": 205, "column": 24}, "end_point": {"row": 205, "column": 27}}, {"id": 552, "type": "identifier", "text": "ta", "parent": 551, "children": [], "start_point": {"row": 205, "column": 25}, "end_point": {"row": 205, "column": 27}}, {"id": 553, "type": "identifier", "text": "tlsbprint", "parent": 549, "children": [], "start_point": {"row": 205, "column": 29}, "end_point": {"row": 205, "column": 38}}, {"id": 554, "type": "identifier", "text": "tlsbsubmatch", "parent": 549, "children": [], "start_point": {"row": 205, "column": 40}, "end_point": {"row": 205, "column": 52}}, {"id": 555, "type": "while_statement", "text": "while (--node > 0) {\n\t\tif (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n\t\t\tcontinue;\n\t\ttldev = TLSB_GET_NODEREG(node, TLDEV);\n\t\tif (tldev == 0) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (TLDEV_ISIOPORT(tldev)) {\n#if defined(MULTIPROCESSOR)\n\t\t\t/*\n\t\t\t * XXX Eventually, we want to select a secondary\n\t\t\t * XXX processor on which to field interrupts for\n\t\t\t * XXX this node. However, we just send them to\n\t\t\t * XXX the primary CPU for now.\n\t\t\t *\n\t\t\t * XXX Maybe multiple CPUs? Does the hardware\n\t\t\t * XXX round-robin, or check the length of the\n\t\t\t * XXX per-CPU interrupt queue?\n\t\t\t */\n\t\t\tprintf(\"%s node %d: routing interrupts to %s\\n\",\n\t\t\t self->dv_xname, node,\n\t\t\t cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n\t\t\t/*\n\t\t\t * Make sure interrupts are sent to the primary CPU.\n\t\t\t */\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n\t\t\tta.ta_node = node;\n\t\t\tta.ta_dtype = TLDEV_DTYPE(tldev);\n\t\t\tta.ta_swrev = TLDEV_SWREV(tldev);\n\t\t\tta.ta_hwrev = TLDEV_HWREV(tldev);\n\t\t\tconfig_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n\t\t}\n\t}", "parent": 393, "children": [556], "start_point": {"row": 210, "column": 1}, "end_point": {"row": 248, "column": 2}}, {"id": 556, "type": "parenthesized_expression", "text": "(--node > 0)", "parent": 555, "children": [557], "start_point": {"row": 210, "column": 7}, "end_point": {"row": 210, "column": 19}}, {"id": 557, "type": "binary_expression", "text": "--node > 0", "parent": 556, "children": [558, 561, 562], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 18}}, {"id": 558, "type": "update_expression", "text": "--node", "parent": 557, "children": [559, 560], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 14}}, {"id": 559, "type": "--", "text": "--", "parent": 558, "children": [], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 10}}, {"id": 560, "type": "identifier", "text": "node", "parent": 558, "children": [], "start_point": {"row": 210, "column": 10}, "end_point": {"row": 210, "column": 14}}, {"id": 561, "type": ">", "text": ">", "parent": 557, "children": [], "start_point": {"row": 210, "column": 15}, "end_point": {"row": 210, "column": 16}}, {"id": 562, "type": "number_literal", "text": "0", "parent": 557, "children": [], "start_point": {"row": 210, "column": 17}, "end_point": {"row": 210, "column": 18}}, {"id": 563, "type": "if_statement", "text": "if (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n\t\t\tcontinue;", "parent": 555, "children": [564, 576], "start_point": {"row": 211, "column": 2}, "end_point": {"row": 212, "column": 12}}, {"id": 564, "type": "parenthesized_expression", "text": "(badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))", "parent": 563, "children": [565], "start_point": {"row": 211, "column": 5}, "end_point": {"row": 211, "column": 66}}, {"id": 565, "type": "call_expression", "text": "badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))", "parent": 564, "children": [566, 567], "start_point": {"row": 211, "column": 6}, "end_point": {"row": 211, "column": 65}}, {"id": 566, "type": "identifier", "text": "badaddr", "parent": 565, "children": [], "start_point": {"row": 211, "column": 6}, "end_point": {"row": 211, "column": 13}}, {"id": 567, "type": "argument_list", "text": "(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t))", "parent": 565, "children": [568, 573], "start_point": {"row": 211, "column": 13}, "end_point": {"row": 211, "column": 65}}, {"id": 568, "type": "call_expression", "text": "TLSB_NODE_REG_ADDR(node, TLDEV)", "parent": 567, "children": [569, 570], "start_point": {"row": 211, "column": 14}, "end_point": {"row": 211, "column": 45}}, {"id": 569, "type": "identifier", "text": "TLSB_NODE_REG_ADDR", "parent": 568, "children": [], "start_point": {"row": 211, "column": 14}, "end_point": {"row": 211, "column": 32}}, {"id": 570, "type": "argument_list", "text": "(node, TLDEV)", "parent": 568, "children": [571, 572], "start_point": {"row": 211, "column": 32}, "end_point": {"row": 211, "column": 45}}, {"id": 571, "type": "identifier", "text": "node", "parent": 570, "children": [], "start_point": {"row": 211, "column": 33}, "end_point": {"row": 211, "column": 37}}, {"id": 572, "type": "identifier", "text": "TLDEV", "parent": 570, "children": [], "start_point": {"row": 211, "column": 39}, "end_point": {"row": 211, "column": 44}}, {"id": 573, "type": "sizeof_expression", "text": "sizeof(u_int32_t)", "parent": 567, "children": [574], "start_point": {"row": 211, "column": 47}, "end_point": {"row": 211, "column": 64}}, {"id": 574, "type": "parenthesized_expression", "text": "(u_int32_t)", "parent": 573, "children": [575], "start_point": {"row": 211, "column": 53}, "end_point": {"row": 211, "column": 64}}, {"id": 575, "type": "identifier", "text": "u_int32_t", "parent": 574, "children": [], "start_point": {"row": 211, "column": 54}, "end_point": {"row": 211, "column": 63}}, {"id": 576, "type": "continue_statement", "text": "continue;", "parent": 563, "children": [577], "start_point": {"row": 212, "column": 3}, "end_point": {"row": 212, "column": 12}}, {"id": 577, "type": "continue", "text": "continue", "parent": 576, "children": [], "start_point": {"row": 212, "column": 3}, "end_point": {"row": 212, "column": 11}}, {"id": 578, "type": "assignment_expression", "text": "tldev = TLSB_GET_NODEREG(node, TLDEV)", "parent": 555, "children": [579, 580, 581], "start_point": {"row": 213, "column": 2}, "end_point": {"row": 213, "column": 39}}, {"id": 579, "type": "identifier", "text": "tldev", "parent": 578, "children": [], "start_point": {"row": 213, "column": 2}, "end_point": {"row": 213, "column": 7}}, {"id": 580, "type": "=", "text": "=", "parent": 578, "children": [], "start_point": {"row": 213, "column": 8}, "end_point": {"row": 213, "column": 9}}, {"id": 581, "type": "call_expression", "text": "TLSB_GET_NODEREG(node, TLDEV)", "parent": 578, "children": [582, 583], "start_point": {"row": 213, "column": 10}, "end_point": {"row": 213, "column": 39}}, {"id": 582, "type": "identifier", "text": "TLSB_GET_NODEREG", "parent": 581, "children": [], "start_point": {"row": 213, "column": 10}, "end_point": {"row": 213, "column": 26}}, {"id": 583, "type": "argument_list", "text": "(node, TLDEV)", "parent": 581, "children": [584, 585], "start_point": {"row": 213, "column": 26}, "end_point": {"row": 213, "column": 39}}, {"id": 584, "type": "identifier", "text": "node", "parent": 583, "children": [], "start_point": {"row": 213, "column": 27}, "end_point": {"row": 213, "column": 31}}, {"id": 585, "type": "identifier", "text": "TLDEV", "parent": 583, "children": [], "start_point": {"row": 213, "column": 33}, "end_point": {"row": 213, "column": 38}}, {"id": 586, "type": "if_statement", "text": "if (tldev == 0) {\n\t\t\tcontinue;\n\t\t}", "parent": 555, "children": [587], "start_point": {"row": 214, "column": 2}, "end_point": {"row": 216, "column": 3}}, {"id": 587, "type": "parenthesized_expression", "text": "(tldev == 0)", "parent": 586, "children": [588], "start_point": {"row": 214, "column": 5}, "end_point": {"row": 214, "column": 17}}, {"id": 588, "type": "binary_expression", "text": "tldev == 0", "parent": 587, "children": [589, 590, 591], "start_point": {"row": 214, "column": 6}, "end_point": {"row": 214, "column": 16}}, {"id": 589, "type": "identifier", "text": "tldev", "parent": 588, "children": [], "start_point": {"row": 214, "column": 6}, "end_point": {"row": 214, "column": 11}}, {"id": 590, "type": "==", "text": "==", "parent": 588, "children": [], "start_point": {"row": 214, "column": 12}, "end_point": {"row": 214, "column": 14}}, {"id": 591, "type": "number_literal", "text": "0", "parent": 588, "children": [], "start_point": {"row": 214, "column": 15}, "end_point": {"row": 214, "column": 16}}, {"id": 592, "type": "continue_statement", "text": "continue;", "parent": 586, "children": [593], "start_point": {"row": 215, "column": 3}, "end_point": {"row": 215, "column": 12}}, {"id": 593, "type": "continue", "text": "continue", "parent": 592, "children": [], "start_point": {"row": 215, "column": 3}, "end_point": {"row": 215, "column": 11}}, {"id": 594, "type": "if_statement", "text": "if (TLDEV_ISIOPORT(tldev)) {\n#if defined(MULTIPROCESSOR)\n\t\t\t/*\n\t\t\t * XXX Eventually, we want to select a secondary\n\t\t\t * XXX processor on which to field interrupts for\n\t\t\t * XXX this node. However, we just send them to\n\t\t\t * XXX the primary CPU for now.\n\t\t\t *\n\t\t\t * XXX Maybe multiple CPUs? Does the hardware\n\t\t\t * XXX round-robin, or check the length of the\n\t\t\t * XXX per-CPU interrupt queue?\n\t\t\t */\n\t\t\tprintf(\"%s node %d: routing interrupts to %s\\n\",\n\t\t\t self->dv_xname, node,\n\t\t\t cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n\t\t\t/*\n\t\t\t * Make sure interrupts are sent to the primary CPU.\n\t\t\t */\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n\t\t\tta.ta_node = node;\n\t\t\tta.ta_dtype = TLDEV_DTYPE(tldev);\n\t\t\tta.ta_swrev = TLDEV_SWREV(tldev);\n\t\t\tta.ta_hwrev = TLDEV_HWREV(tldev);\n\t\t\tconfig_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n\t\t}", "parent": 555, "children": [595], "start_point": {"row": 217, "column": 2}, "end_point": {"row": 247, "column": 3}}, {"id": 595, "type": "parenthesized_expression", "text": "(TLDEV_ISIOPORT(tldev))", "parent": 594, "children": [596], "start_point": {"row": 217, "column": 5}, "end_point": {"row": 217, "column": 28}}, {"id": 596, "type": "call_expression", "text": "TLDEV_ISIOPORT(tldev)", "parent": 595, "children": [597, 598], "start_point": {"row": 217, "column": 6}, "end_point": {"row": 217, "column": 27}}, {"id": 597, "type": "identifier", "text": "TLDEV_ISIOPORT", "parent": 596, "children": [], "start_point": {"row": 217, "column": 6}, "end_point": {"row": 217, "column": 20}}, {"id": 598, "type": "argument_list", "text": "(tldev)", "parent": 596, "children": [599], "start_point": {"row": 217, "column": 20}, "end_point": {"row": 217, "column": 27}}, {"id": 599, "type": "identifier", "text": "tldev", "parent": 598, "children": [], "start_point": {"row": 217, "column": 21}, "end_point": {"row": 217, "column": 26}}, {"id": 600, "type": "preproc_if", "text": "#if defined(MULTIPROCESSOR)\n\t\t\t/*\n\t\t\t * XXX Eventually, we want to select a secondary\n\t\t\t * XXX processor on which to field interrupts for\n\t\t\t * XXX this node. However, we just send them to\n\t\t\t * XXX the primary CPU for now.\n\t\t\t *\n\t\t\t * XXX Maybe multiple CPUs? Does the hardware\n\t\t\t * XXX round-robin, or check the length of the\n\t\t\t * XXX per-CPU interrupt queue?\n\t\t\t */\n\t\t\tprintf(\"%s node %d: routing interrupts to %s\\n\",\n\t\t\t self->dv_xname, node,\n\t\t\t cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n\t\t\t/*\n\t\t\t * Make sure interrupts are sent to the primary CPU.\n\t\t\t */\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));\n#endif", "parent": 594, "children": [601, 602, 605, 636, 650], "start_point": {"row": 218, "column": 0}, "end_point": {"row": 240, "column": 6}}, {"id": 601, "type": "#if", "text": "#if", "parent": 600, "children": [], "start_point": {"row": 218, "column": 0}, "end_point": {"row": 218, "column": 3}}, {"id": 602, "type": "preproc_defined", "text": "defined(MULTIPROCESSOR)", "parent": 600, "children": [603, 604], "start_point": {"row": 218, "column": 4}, "end_point": {"row": 218, "column": 27}}, {"id": 603, "type": "defined", "text": "defined", "parent": 602, "children": [], "start_point": {"row": 218, "column": 4}, "end_point": {"row": 218, "column": 11}}, {"id": 604, "type": "identifier", "text": "MULTIPROCESSOR", "parent": 602, "children": [], "start_point": {"row": 218, "column": 12}, "end_point": {"row": 218, "column": 26}}, {"id": 605, "type": "\n", "text": "\n", "parent": 600, "children": [], "start_point": {"row": 218, "column": 27}, "end_point": {"row": 219, "column": 0}}, {"id": 606, "type": "call_expression", "text": "printf(\"%s node %d: routing interrupts to %s\\n\",\n\t\t\t self->dv_xname, node,\n\t\t\t cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname)", "parent": 600, "children": [607, 608], "start_point": {"row": 229, "column": 3}, "end_point": {"row": 231, "column": 58}}, {"id": 607, "type": "identifier", "text": "printf", "parent": 606, "children": [], "start_point": {"row": 229, "column": 3}, "end_point": {"row": 229, "column": 9}}, {"id": 608, "type": "argument_list", "text": "(\"%s node %d: routing interrupts to %s\\n\",\n\t\t\t self->dv_xname, node,\n\t\t\t cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname)", "parent": 606, "children": [609, 611, 614, 615], "start_point": {"row": 229, "column": 9}, "end_point": {"row": 231, "column": 58}}, {"id": 609, "type": "string_literal", "text": "\"%s node %d: routing interrupts to %s\\n\"", "parent": 608, "children": [610], "start_point": {"row": 229, "column": 10}, "end_point": {"row": 229, "column": 50}}, {"id": 610, "type": "escape_sequence", "text": "\\n", "parent": 609, "children": [], "start_point": {"row": 229, "column": 47}, "end_point": {"row": 229, "column": 49}}, {"id": 611, "type": "field_expression", "text": "self->dv_xname", "parent": 608, "children": [612, 613], "start_point": {"row": 230, "column": 5}, "end_point": {"row": 230, "column": 19}}, {"id": 612, "type": "identifier", "text": "self", "parent": 611, "children": [], "start_point": {"row": 230, "column": 5}, "end_point": {"row": 230, "column": 9}}, {"id": 613, "type": "field_identifier", "text": "dv_xname", "parent": 611, "children": [], "start_point": {"row": 230, "column": 11}, "end_point": {"row": 230, "column": 19}}, {"id": 614, "type": "identifier", "text": "node", "parent": 608, "children": [], "start_point": {"row": 230, "column": 21}, "end_point": {"row": 230, "column": 25}}, {"id": 615, "type": "field_expression", "text": "cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname", "parent": 608, "children": [616, 623], "start_point": {"row": 231, "column": 5}, "end_point": {"row": 231, "column": 57}}, {"id": 616, "type": "field_expression", "text": "cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev", "parent": 615, "children": [617, 622], "start_point": {"row": 231, "column": 5}, "end_point": {"row": 231, "column": 47}}, {"id": 617, "type": "subscript_expression", "text": "cpu_info[hwrpb->rpb_primary_cpu_id]", "parent": 616, "children": [618, 619], "start_point": {"row": 231, "column": 5}, "end_point": {"row": 231, "column": 40}}, {"id": 618, "type": "identifier", "text": "cpu_info", "parent": 617, "children": [], "start_point": {"row": 231, "column": 5}, "end_point": {"row": 231, "column": 13}}, {"id": 619, "type": "field_expression", "text": "hwrpb->rpb_primary_cpu_id", "parent": 617, "children": [620, 621], "start_point": {"row": 231, "column": 14}, "end_point": {"row": 231, "column": 39}}, {"id": 620, "type": "identifier", "text": "hwrpb", "parent": 619, "children": [], "start_point": {"row": 231, "column": 14}, "end_point": {"row": 231, "column": 19}}, {"id": 621, "type": "field_identifier", "text": "rpb_primary_cpu_id", "parent": 619, "children": [], "start_point": {"row": 231, "column": 21}, "end_point": {"row": 231, "column": 39}}, {"id": 622, "type": "field_identifier", "text": "ci_dev", "parent": 616, "children": [], "start_point": {"row": 231, "column": 41}, "end_point": {"row": 231, "column": 47}}, {"id": 623, "type": "field_identifier", "text": "dv_xname", "parent": 615, "children": [], "start_point": {"row": 231, "column": 49}, "end_point": {"row": 231, "column": 57}}, {"id": 624, "type": "call_expression", "text": "TLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id))", "parent": 600, "children": [625, 626], "start_point": {"row": 232, "column": 3}, "end_point": {"row": 233, "column": 42}}, {"id": 625, "type": "identifier", "text": "TLSB_PUT_NODEREG", "parent": 624, "children": [], "start_point": {"row": 232, "column": 3}, "end_point": {"row": 232, "column": 19}}, {"id": 626, "type": "argument_list", "text": "(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id))", "parent": 624, "children": [627, 628, 629], "start_point": {"row": 232, "column": 19}, "end_point": {"row": 233, "column": 42}}, {"id": 627, "type": "identifier", "text": "node", "parent": 626, "children": [], "start_point": {"row": 232, "column": 20}, "end_point": {"row": 232, "column": 24}}, {"id": 628, "type": "identifier", "text": "TLCPUMASK", "parent": 626, "children": [], "start_point": {"row": 232, "column": 26}, "end_point": {"row": 232, "column": 35}}, {"id": 629, "type": "parenthesized_expression", "text": "(1UL << hwrpb->rpb_primary_cpu_id)", "parent": 626, "children": [630], "start_point": {"row": 233, "column": 7}, "end_point": {"row": 233, "column": 41}}, {"id": 630, "type": "binary_expression", "text": "1UL << hwrpb->rpb_primary_cpu_id", "parent": 629, "children": [631, 632, 633], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 40}}, {"id": 631, "type": "number_literal", "text": "1UL", "parent": 630, "children": [], "start_point": {"row": 233, "column": 8}, "end_point": {"row": 233, "column": 11}}, {"id": 632, "type": "<<", "text": "<<", "parent": 630, "children": [], "start_point": {"row": 233, "column": 12}, "end_point": {"row": 233, "column": 14}}, {"id": 633, "type": "field_expression", "text": "hwrpb->rpb_primary_cpu_id", "parent": 630, "children": [634, 635], "start_point": {"row": 233, "column": 15}, "end_point": {"row": 233, "column": 40}}, {"id": 634, "type": "identifier", "text": "hwrpb", "parent": 633, "children": [], "start_point": {"row": 233, "column": 15}, "end_point": {"row": 233, "column": 20}}, {"id": 635, "type": "field_identifier", "text": "rpb_primary_cpu_id", "parent": 633, "children": [], "start_point": {"row": 233, "column": 22}, "end_point": {"row": 233, "column": 40}}, {"id": 636, "type": "preproc_else", "text": "#else\n\t\t\t/*\n\t\t\t * Make sure interrupts are sent to the primary CPU.\n\t\t\t */\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));", "parent": 600, "children": [637], "start_point": {"row": 234, "column": 0}, "end_point": {"row": 239, "column": 43}}, {"id": 637, "type": "#else", "text": "#else", "parent": 636, "children": [], "start_point": {"row": 234, "column": 0}, "end_point": {"row": 234, "column": 5}}, {"id": 638, "type": "call_expression", "text": "TLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id))", "parent": 636, "children": [639, 640], "start_point": {"row": 238, "column": 3}, "end_point": {"row": 239, "column": 42}}, {"id": 639, "type": "identifier", "text": "TLSB_PUT_NODEREG", "parent": 638, "children": [], "start_point": {"row": 238, "column": 3}, "end_point": {"row": 238, "column": 19}}, {"id": 640, "type": "argument_list", "text": "(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id))", "parent": 638, "children": [641, 642, 643], "start_point": {"row": 238, "column": 19}, "end_point": {"row": 239, "column": 42}}, {"id": 641, "type": "identifier", "text": "node", "parent": 640, "children": [], "start_point": {"row": 238, "column": 20}, "end_point": {"row": 238, "column": 24}}, {"id": 642, "type": "identifier", "text": "TLCPUMASK", "parent": 640, "children": [], "start_point": {"row": 238, "column": 26}, "end_point": {"row": 238, "column": 35}}, {"id": 643, "type": "parenthesized_expression", "text": "(1UL << hwrpb->rpb_primary_cpu_id)", "parent": 640, "children": [644], "start_point": {"row": 239, "column": 7}, "end_point": {"row": 239, "column": 41}}, {"id": 644, "type": "binary_expression", "text": "1UL << hwrpb->rpb_primary_cpu_id", "parent": 643, "children": [645, 646, 647], "start_point": {"row": 239, "column": 8}, "end_point": {"row": 239, "column": 40}}, {"id": 645, "type": "number_literal", "text": "1UL", "parent": 644, "children": [], "start_point": {"row": 239, "column": 8}, "end_point": {"row": 239, "column": 11}}, {"id": 646, "type": "<<", "text": "<<", "parent": 644, "children": [], "start_point": {"row": 239, "column": 12}, "end_point": {"row": 239, "column": 14}}, {"id": 647, "type": "field_expression", "text": "hwrpb->rpb_primary_cpu_id", "parent": 644, "children": [648, 649], "start_point": {"row": 239, "column": 15}, "end_point": {"row": 239, "column": 40}}, {"id": 648, "type": "identifier", "text": "hwrpb", "parent": 647, "children": [], "start_point": {"row": 239, "column": 15}, "end_point": {"row": 239, "column": 20}}, {"id": 649, "type": "field_identifier", "text": "rpb_primary_cpu_id", "parent": 647, "children": [], "start_point": {"row": 239, "column": 22}, "end_point": {"row": 239, "column": 40}}, {"id": 650, "type": "#endif", "text": "#endif", "parent": 600, "children": [], "start_point": {"row": 240, "column": 0}, "end_point": {"row": 240, "column": 6}}, {"id": 651, "type": "assignment_expression", "text": "ta.ta_node = node", "parent": 594, "children": [652, 655, 656], "start_point": {"row": 242, "column": 3}, "end_point": {"row": 242, "column": 20}}, {"id": 652, "type": "field_expression", "text": "ta.ta_node", "parent": 651, "children": [653, 654], "start_point": {"row": 242, "column": 3}, "end_point": {"row": 242, "column": 13}}, {"id": 653, "type": "identifier", "text": "ta", "parent": 652, "children": [], "start_point": {"row": 242, "column": 3}, "end_point": {"row": 242, "column": 5}}, {"id": 654, "type": "field_identifier", "text": "ta_node", "parent": 652, "children": [], "start_point": {"row": 242, "column": 6}, "end_point": {"row": 242, "column": 13}}, {"id": 655, "type": "=", "text": "=", "parent": 651, "children": [], "start_point": {"row": 242, "column": 14}, "end_point": {"row": 242, "column": 15}}, {"id": 656, "type": "identifier", "text": "node", "parent": 651, "children": [], "start_point": {"row": 242, "column": 16}, "end_point": {"row": 242, "column": 20}}, {"id": 657, "type": "assignment_expression", "text": "ta.ta_dtype = TLDEV_DTYPE(tldev)", "parent": 594, "children": [658, 661, 662], "start_point": {"row": 243, "column": 3}, "end_point": {"row": 243, "column": 35}}, {"id": 658, "type": "field_expression", "text": "ta.ta_dtype", "parent": 657, "children": [659, 660], "start_point": {"row": 243, "column": 3}, "end_point": {"row": 243, "column": 14}}, {"id": 659, "type": "identifier", "text": "ta", "parent": 658, "children": [], "start_point": {"row": 243, "column": 3}, "end_point": {"row": 243, "column": 5}}, {"id": 660, "type": "field_identifier", "text": "ta_dtype", "parent": 658, "children": [], "start_point": {"row": 243, "column": 6}, "end_point": {"row": 243, "column": 14}}, {"id": 661, "type": "=", "text": "=", "parent": 657, "children": [], "start_point": {"row": 243, "column": 15}, "end_point": {"row": 243, "column": 16}}, {"id": 662, "type": "call_expression", "text": "TLDEV_DTYPE(tldev)", "parent": 657, "children": [663, 664], "start_point": {"row": 243, "column": 17}, "end_point": {"row": 243, "column": 35}}, {"id": 663, "type": "identifier", "text": "TLDEV_DTYPE", "parent": 662, "children": [], "start_point": {"row": 243, "column": 17}, "end_point": {"row": 243, "column": 28}}, {"id": 664, "type": "argument_list", "text": "(tldev)", "parent": 662, "children": [665], "start_point": {"row": 243, "column": 28}, "end_point": {"row": 243, "column": 35}}, {"id": 665, "type": "identifier", "text": "tldev", "parent": 664, "children": [], "start_point": {"row": 243, "column": 29}, "end_point": {"row": 243, "column": 34}}, {"id": 666, "type": "assignment_expression", "text": "ta.ta_swrev = TLDEV_SWREV(tldev)", "parent": 594, "children": [667, 670, 671], "start_point": {"row": 244, "column": 3}, "end_point": {"row": 244, "column": 35}}, {"id": 667, "type": "field_expression", "text": "ta.ta_swrev", "parent": 666, "children": [668, 669], "start_point": {"row": 244, "column": 3}, "end_point": {"row": 244, "column": 14}}, {"id": 668, "type": "identifier", "text": "ta", "parent": 667, "children": [], "start_point": {"row": 244, "column": 3}, "end_point": {"row": 244, "column": 5}}, {"id": 669, "type": "field_identifier", "text": "ta_swrev", "parent": 667, "children": [], "start_point": {"row": 244, "column": 6}, "end_point": {"row": 244, "column": 14}}, {"id": 670, "type": "=", "text": "=", "parent": 666, "children": [], "start_point": {"row": 244, "column": 15}, "end_point": {"row": 244, "column": 16}}, {"id": 671, "type": "call_expression", "text": "TLDEV_SWREV(tldev)", "parent": 666, "children": [672, 673], "start_point": {"row": 244, "column": 17}, "end_point": {"row": 244, "column": 35}}, {"id": 672, "type": "identifier", "text": "TLDEV_SWREV", "parent": 671, "children": [], "start_point": {"row": 244, "column": 17}, "end_point": {"row": 244, "column": 28}}, {"id": 673, "type": "argument_list", "text": "(tldev)", "parent": 671, "children": [674], "start_point": {"row": 244, "column": 28}, "end_point": {"row": 244, "column": 35}}, {"id": 674, "type": "identifier", "text": "tldev", "parent": 673, "children": [], "start_point": {"row": 244, "column": 29}, "end_point": {"row": 244, "column": 34}}, {"id": 675, "type": "assignment_expression", "text": "ta.ta_hwrev = TLDEV_HWREV(tldev)", "parent": 594, "children": [676, 679, 680], "start_point": {"row": 245, "column": 3}, "end_point": {"row": 245, "column": 35}}, {"id": 676, "type": "field_expression", "text": "ta.ta_hwrev", "parent": 675, "children": [677, 678], "start_point": {"row": 245, "column": 3}, "end_point": {"row": 245, "column": 14}}, {"id": 677, "type": "identifier", "text": "ta", "parent": 676, "children": [], "start_point": {"row": 245, "column": 3}, "end_point": {"row": 245, "column": 5}}, {"id": 678, "type": "field_identifier", "text": "ta_hwrev", "parent": 676, "children": [], "start_point": {"row": 245, "column": 6}, "end_point": {"row": 245, "column": 14}}, {"id": 679, "type": "=", "text": "=", "parent": 675, "children": [], "start_point": {"row": 245, "column": 15}, "end_point": {"row": 245, "column": 16}}, {"id": 680, "type": "call_expression", "text": "TLDEV_HWREV(tldev)", "parent": 675, "children": [681, 682], "start_point": {"row": 245, "column": 17}, "end_point": {"row": 245, "column": 35}}, {"id": 681, "type": "identifier", "text": "TLDEV_HWREV", "parent": 680, "children": [], "start_point": {"row": 245, "column": 17}, "end_point": {"row": 245, "column": 28}}, {"id": 682, "type": "argument_list", "text": "(tldev)", "parent": 680, "children": [683], "start_point": {"row": 245, "column": 28}, "end_point": {"row": 245, "column": 35}}, {"id": 683, "type": "identifier", "text": "tldev", "parent": 682, "children": [], "start_point": {"row": 245, "column": 29}, "end_point": {"row": 245, "column": 34}}, {"id": 684, "type": "call_expression", "text": "config_found_sm(self, &ta, tlsbprint, tlsbsubmatch)", "parent": 594, "children": [685, 686], "start_point": {"row": 246, "column": 3}, "end_point": {"row": 246, "column": 54}}, {"id": 685, "type": "identifier", "text": "config_found_sm", "parent": 684, "children": [], "start_point": {"row": 246, "column": 3}, "end_point": {"row": 246, "column": 18}}, {"id": 686, "type": "argument_list", "text": "(self, &ta, tlsbprint, tlsbsubmatch)", "parent": 684, "children": [687, 688, 690, 691], "start_point": {"row": 246, "column": 18}, "end_point": {"row": 246, "column": 54}}, {"id": 687, "type": "identifier", "text": "self", "parent": 686, "children": [], "start_point": {"row": 246, "column": 19}, "end_point": {"row": 246, "column": 23}}, {"id": 688, "type": "pointer_expression", "text": "&ta", "parent": 686, "children": [689], "start_point": {"row": 246, "column": 25}, "end_point": {"row": 246, "column": 28}}, {"id": 689, "type": "identifier", "text": "ta", "parent": 688, "children": [], "start_point": {"row": 246, "column": 26}, "end_point": {"row": 246, "column": 28}}, {"id": 690, "type": "identifier", "text": "tlsbprint", "parent": 686, "children": [], "start_point": {"row": 246, "column": 30}, "end_point": {"row": 246, "column": 39}}, {"id": 691, "type": "identifier", "text": "tlsbsubmatch", "parent": 686, "children": [], "start_point": {"row": 246, "column": 41}, "end_point": {"row": 246, "column": 53}}, {"id": 692, "type": "declaration", "text": "static char *\ntlsb_node_type_str(dtype)\n\tu_int32_t dtype;", "parent": null, "children": [693, 694], "start_point": {"row": 251, "column": 0}, "end_point": {"row": 253, "column": 17}}, {"id": 693, "type": "primitive_type", "text": "char", "parent": 692, "children": [], "start_point": {"row": 251, "column": 7}, "end_point": {"row": 251, "column": 11}}, {"id": 694, "type": "pointer_declarator", "text": "*\ntlsb_node_type_str(dtype)\n\tu_int32_t dtype", "parent": 692, "children": [695, 696], "start_point": {"row": 251, "column": 12}, "end_point": {"row": 253, "column": 16}}, {"id": 695, "type": "*", "text": "*", "parent": 694, "children": [], "start_point": {"row": 251, "column": 12}, "end_point": {"row": 251, "column": 13}}, {"id": 696, "type": "function_declarator", "text": "tlsb_node_type_str(dtype)\n\tu_int32_t dtype", "parent": 694, "children": [697, 698, 701, 702], "start_point": {"row": 252, "column": 0}, "end_point": {"row": 253, "column": 16}}, {"id": 697, "type": "identifier", "text": "tlsb_node_type_str", "parent": 696, "children": [], "start_point": {"row": 252, "column": 0}, "end_point": {"row": 252, "column": 18}}, {"id": 698, "type": "parameter_list", "text": "(dtype)", "parent": 696, "children": [699], "start_point": {"row": 252, "column": 18}, "end_point": {"row": 252, "column": 25}}, {"id": 699, "type": "parameter_declaration", "text": "dtype", "parent": 698, "children": [700], "start_point": {"row": 252, "column": 19}, "end_point": {"row": 252, "column": 24}}, {"id": 700, "type": "type_identifier", "text": "dtype", "parent": 699, "children": [], "start_point": {"row": 252, "column": 19}, "end_point": {"row": 252, "column": 24}}, {"id": 701, "type": "identifier", "text": "u_int32_t", "parent": 696, "children": [], "start_point": {"row": 253, "column": 1}, "end_point": {"row": 253, "column": 10}}, {"id": 702, "type": "identifier", "text": "dtype", "parent": 696, "children": [], "start_point": {"row": 253, "column": 11}, "end_point": {"row": 253, "column": 16}}, {"id": 703, "type": "declaration", "text": "static char\ttlsb_line[64];", "parent": null, "children": [704, 705], "start_point": {"row": 255, "column": 1}, "end_point": {"row": 255, "column": 27}}, {"id": 704, "type": "primitive_type", "text": "char", "parent": 703, "children": [], "start_point": {"row": 255, "column": 8}, "end_point": {"row": 255, "column": 12}}, {"id": 705, "type": "array_declarator", "text": "tlsb_line[64]", "parent": 703, "children": [706, 707], "start_point": {"row": 255, "column": 13}, "end_point": {"row": 255, "column": 26}}, {"id": 706, "type": "identifier", "text": "tlsb_line", "parent": 705, "children": [], "start_point": {"row": 255, "column": 13}, "end_point": {"row": 255, "column": 22}}, {"id": 707, "type": "number_literal", "text": "64", "parent": 705, "children": [], "start_point": {"row": 255, "column": 23}, "end_point": {"row": 255, "column": 25}}, {"id": 708, "type": "switch_statement", "text": "switch (dtype & TLDEV_DTYPE_MASK) {\n\tcase TLDEV_DTYPE_KFTHA:\n\t\treturn (\"KFTHA I/O interface\");\n\n\tcase TLDEV_DTYPE_KFTIA:\n\t\treturn (\"KFTIA I/O interface\");\n\n\tcase TLDEV_DTYPE_MS7CC:\n\t\treturn (\"MS7CC Memory Module\");\n\n\tcase TLDEV_DTYPE_SCPU4:\n\t\treturn (\"Single CPU, 4MB cache\");\n\n\tcase TLDEV_DTYPE_SCPU16:\n\t\treturn (\"Single CPU, 16MB cache\");\n\n\tcase TLDEV_DTYPE_DCPU4:\n\t\treturn (\"Dual CPU, 4MB cache\");\n\n\tcase TLDEV_DTYPE_DCPU16:\n\t\treturn (\"Dual CPU, 16MB cache\");\n\n\tdefault:\n\t\tbzero(tlsb_line, sizeof(tlsb_line));\n\t\tsprintf(tlsb_line, \"unknown, dtype 0x%x\", dtype);\n\t\treturn (tlsb_line);\n\t}", "parent": null, "children": [709, 710], "start_point": {"row": 257, "column": 1}, "end_point": {"row": 283, "column": 2}}, {"id": 709, "type": "switch", "text": "switch", "parent": 708, "children": [], "start_point": {"row": 257, "column": 1}, "end_point": {"row": 257, "column": 7}}, {"id": 710, "type": "parenthesized_expression", "text": "(dtype & TLDEV_DTYPE_MASK)", "parent": 708, "children": [711], "start_point": {"row": 257, "column": 8}, "end_point": {"row": 257, "column": 34}}, {"id": 711, "type": "binary_expression", "text": "dtype & TLDEV_DTYPE_MASK", "parent": 710, "children": [712, 713], "start_point": {"row": 257, "column": 9}, "end_point": {"row": 257, "column": 33}}, {"id": 712, "type": "identifier", "text": "dtype", "parent": 711, "children": [], "start_point": {"row": 257, "column": 9}, "end_point": {"row": 257, "column": 14}}, {"id": 713, "type": "identifier", "text": "TLDEV_DTYPE_MASK", "parent": 711, "children": [], "start_point": {"row": 257, "column": 17}, "end_point": {"row": 257, "column": 33}}, {"id": 714, "type": "case_statement", "text": "case TLDEV_DTYPE_KFTHA:\n\t\treturn (\"KFTHA I/O interface\");", "parent": 708, "children": [715, 716, 717], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 259, "column": 33}}, {"id": 715, "type": "case", "text": "case", "parent": 714, "children": [], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 258, "column": 5}}, {"id": 716, "type": "identifier", "text": "TLDEV_DTYPE_KFTHA", "parent": 714, "children": [], "start_point": {"row": 258, "column": 6}, "end_point": {"row": 258, "column": 23}}, {"id": 717, "type": "return_statement", "text": "return (\"KFTHA I/O interface\");", "parent": 714, "children": [718], "start_point": {"row": 259, "column": 2}, "end_point": {"row": 259, "column": 33}}, {"id": 718, "type": "parenthesized_expression", "text": "(\"KFTHA I/O interface\")", "parent": 717, "children": [719], "start_point": {"row": 259, "column": 9}, "end_point": {"row": 259, "column": 32}}, {"id": 719, "type": "string_literal", "text": "\"KFTHA I/O interface\"", "parent": 718, "children": [], "start_point": {"row": 259, "column": 10}, "end_point": {"row": 259, "column": 31}}, {"id": 720, "type": "case_statement", "text": "case TLDEV_DTYPE_KFTIA:\n\t\treturn (\"KFTIA I/O interface\");", "parent": 708, "children": [721, 722, 723], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 262, "column": 33}}, {"id": 721, "type": "case", "text": "case", "parent": 720, "children": [], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 261, "column": 5}}, {"id": 722, "type": "identifier", "text": "TLDEV_DTYPE_KFTIA", "parent": 720, "children": [], "start_point": {"row": 261, "column": 6}, "end_point": {"row": 261, "column": 23}}, {"id": 723, "type": "return_statement", "text": "return (\"KFTIA I/O interface\");", "parent": 720, "children": [724], "start_point": {"row": 262, "column": 2}, "end_point": {"row": 262, "column": 33}}, {"id": 724, "type": "parenthesized_expression", "text": "(\"KFTIA I/O interface\")", "parent": 723, "children": [725], "start_point": {"row": 262, "column": 9}, "end_point": {"row": 262, "column": 32}}, {"id": 725, "type": "string_literal", "text": "\"KFTIA I/O interface\"", "parent": 724, "children": [], "start_point": {"row": 262, "column": 10}, "end_point": {"row": 262, "column": 31}}, {"id": 726, "type": "case_statement", "text": "case TLDEV_DTYPE_MS7CC:\n\t\treturn (\"MS7CC Memory Module\");", "parent": 708, "children": [727, 728, 729], "start_point": {"row": 264, "column": 1}, "end_point": {"row": 265, "column": 33}}, {"id": 727, "type": "case", "text": "case", "parent": 726, "children": [], "start_point": {"row": 264, "column": 1}, "end_point": {"row": 264, "column": 5}}, {"id": 728, "type": "identifier", "text": "TLDEV_DTYPE_MS7CC", "parent": 726, "children": [], "start_point": {"row": 264, "column": 6}, "end_point": {"row": 264, "column": 23}}, {"id": 729, "type": "return_statement", "text": "return (\"MS7CC Memory Module\");", "parent": 726, "children": [730], "start_point": {"row": 265, "column": 2}, "end_point": {"row": 265, "column": 33}}, {"id": 730, "type": "parenthesized_expression", "text": "(\"MS7CC Memory Module\")", "parent": 729, "children": [731], "start_point": {"row": 265, "column": 9}, "end_point": {"row": 265, "column": 32}}, {"id": 731, "type": "string_literal", "text": "\"MS7CC Memory Module\"", "parent": 730, "children": [], "start_point": {"row": 265, "column": 10}, "end_point": {"row": 265, "column": 31}}, {"id": 732, "type": "case_statement", "text": "case TLDEV_DTYPE_SCPU4:\n\t\treturn (\"Single CPU, 4MB cache\");", "parent": 708, "children": [733, 734, 735], "start_point": {"row": 267, "column": 1}, "end_point": {"row": 268, "column": 35}}, {"id": 733, "type": "case", "text": "case", "parent": 732, "children": [], "start_point": {"row": 267, "column": 1}, "end_point": {"row": 267, "column": 5}}, {"id": 734, "type": "identifier", "text": "TLDEV_DTYPE_SCPU4", "parent": 732, "children": [], "start_point": {"row": 267, "column": 6}, "end_point": {"row": 267, "column": 23}}, {"id": 735, "type": "return_statement", "text": "return (\"Single CPU, 4MB cache\");", "parent": 732, "children": [736], "start_point": {"row": 268, "column": 2}, "end_point": {"row": 268, "column": 35}}, {"id": 736, "type": "parenthesized_expression", "text": "(\"Single CPU, 4MB cache\")", "parent": 735, "children": [737], "start_point": {"row": 268, "column": 9}, "end_point": {"row": 268, "column": 34}}, {"id": 737, "type": "string_literal", "text": "\"Single CPU, 4MB cache\"", "parent": 736, "children": [], "start_point": {"row": 268, "column": 10}, "end_point": {"row": 268, "column": 33}}, {"id": 738, "type": "case_statement", "text": "case TLDEV_DTYPE_SCPU16:\n\t\treturn (\"Single CPU, 16MB cache\");", "parent": 708, "children": [739, 740, 741], "start_point": {"row": 270, "column": 1}, "end_point": {"row": 271, "column": 36}}, {"id": 739, "type": "case", "text": "case", "parent": 738, "children": [], "start_point": {"row": 270, "column": 1}, "end_point": {"row": 270, "column": 5}}, {"id": 740, "type": "identifier", "text": "TLDEV_DTYPE_SCPU16", "parent": 738, "children": [], "start_point": {"row": 270, "column": 6}, "end_point": {"row": 270, "column": 24}}, {"id": 741, "type": "return_statement", "text": "return (\"Single CPU, 16MB cache\");", "parent": 738, "children": [742], "start_point": {"row": 271, "column": 2}, "end_point": {"row": 271, "column": 36}}, {"id": 742, "type": "parenthesized_expression", "text": "(\"Single CPU, 16MB cache\")", "parent": 741, "children": [743], "start_point": {"row": 271, "column": 9}, "end_point": {"row": 271, "column": 35}}, {"id": 743, "type": "string_literal", "text": "\"Single CPU, 16MB cache\"", "parent": 742, "children": [], "start_point": {"row": 271, "column": 10}, "end_point": {"row": 271, "column": 34}}, {"id": 744, "type": "case_statement", "text": "case TLDEV_DTYPE_DCPU4:\n\t\treturn (\"Dual CPU, 4MB cache\");", "parent": 708, "children": [745, 746, 747], "start_point": {"row": 273, "column": 1}, "end_point": {"row": 274, "column": 33}}, {"id": 745, "type": "case", "text": "case", "parent": 744, "children": [], "start_point": {"row": 273, "column": 1}, "end_point": {"row": 273, "column": 5}}, {"id": 746, "type": "identifier", "text": "TLDEV_DTYPE_DCPU4", "parent": 744, "children": [], "start_point": {"row": 273, "column": 6}, "end_point": {"row": 273, "column": 23}}, {"id": 747, "type": "return_statement", "text": "return (\"Dual CPU, 4MB cache\");", "parent": 744, "children": [748], "start_point": {"row": 274, "column": 2}, "end_point": {"row": 274, "column": 33}}, {"id": 748, "type": "parenthesized_expression", "text": "(\"Dual CPU, 4MB cache\")", "parent": 747, "children": [749], "start_point": {"row": 274, "column": 9}, "end_point": {"row": 274, "column": 32}}, {"id": 749, "type": "string_literal", "text": "\"Dual CPU, 4MB cache\"", "parent": 748, "children": [], "start_point": {"row": 274, "column": 10}, "end_point": {"row": 274, "column": 31}}, {"id": 750, "type": "case_statement", "text": "case TLDEV_DTYPE_DCPU16:\n\t\treturn (\"Dual CPU, 16MB cache\");", "parent": 708, "children": [751, 752, 753], "start_point": {"row": 276, "column": 1}, "end_point": {"row": 277, "column": 34}}, {"id": 751, "type": "case", "text": "case", "parent": 750, "children": [], "start_point": {"row": 276, "column": 1}, "end_point": {"row": 276, "column": 5}}, {"id": 752, "type": "identifier", "text": "TLDEV_DTYPE_DCPU16", "parent": 750, "children": [], "start_point": {"row": 276, "column": 6}, "end_point": {"row": 276, "column": 24}}, {"id": 753, "type": "return_statement", "text": "return (\"Dual CPU, 16MB cache\");", "parent": 750, "children": [754], "start_point": {"row": 277, "column": 2}, "end_point": {"row": 277, "column": 34}}, {"id": 754, "type": "parenthesized_expression", "text": "(\"Dual CPU, 16MB cache\")", "parent": 753, "children": [755], "start_point": {"row": 277, "column": 9}, "end_point": {"row": 277, "column": 33}}, {"id": 755, "type": "string_literal", "text": "\"Dual CPU, 16MB cache\"", "parent": 754, "children": [], "start_point": {"row": 277, "column": 10}, "end_point": {"row": 277, "column": 32}}, {"id": 756, "type": "case_statement", "text": "default:\n\t\tbzero(tlsb_line, sizeof(tlsb_line));\n\t\tsprintf(tlsb_line, \"unknown, dtype 0x%x\", dtype);\n\t\treturn (tlsb_line);", "parent": 708, "children": [757, 771], "start_point": {"row": 279, "column": 1}, "end_point": {"row": 282, "column": 21}}, {"id": 757, "type": "default", "text": "default", "parent": 756, "children": [], "start_point": {"row": 279, "column": 1}, "end_point": {"row": 279, "column": 8}}, {"id": 758, "type": "call_expression", "text": "bzero(tlsb_line, sizeof(tlsb_line))", "parent": 756, "children": [759, 760], "start_point": {"row": 280, "column": 2}, "end_point": {"row": 280, "column": 37}}, {"id": 759, "type": "identifier", "text": "bzero", "parent": 758, "children": [], "start_point": {"row": 280, "column": 2}, "end_point": {"row": 280, "column": 7}}, {"id": 760, "type": "argument_list", "text": "(tlsb_line, sizeof(tlsb_line))", "parent": 758, "children": [761, 762], "start_point": {"row": 280, "column": 7}, "end_point": {"row": 280, "column": 37}}, {"id": 761, "type": "identifier", "text": "tlsb_line", "parent": 760, "children": [], "start_point": {"row": 280, "column": 8}, "end_point": {"row": 280, "column": 17}}, {"id": 762, "type": "sizeof_expression", "text": "sizeof(tlsb_line)", "parent": 760, "children": [763], "start_point": {"row": 280, "column": 19}, "end_point": {"row": 280, "column": 36}}, {"id": 763, "type": "parenthesized_expression", "text": "(tlsb_line)", "parent": 762, "children": [764], "start_point": {"row": 280, "column": 25}, "end_point": {"row": 280, "column": 36}}, {"id": 764, "type": "identifier", "text": "tlsb_line", "parent": 763, "children": [], "start_point": {"row": 280, "column": 26}, "end_point": {"row": 280, "column": 35}}, {"id": 765, "type": "call_expression", "text": "sprintf(tlsb_line, \"unknown, dtype 0x%x\", dtype)", "parent": 756, "children": [766, 767], "start_point": {"row": 281, "column": 2}, "end_point": {"row": 281, "column": 50}}, {"id": 766, "type": "identifier", "text": "sprintf", "parent": 765, "children": [], "start_point": {"row": 281, "column": 2}, "end_point": {"row": 281, "column": 9}}, {"id": 767, "type": "argument_list", "text": "(tlsb_line, \"unknown, dtype 0x%x\", dtype)", "parent": 765, "children": [768, 769, 770], "start_point": {"row": 281, "column": 9}, "end_point": {"row": 281, "column": 50}}, {"id": 768, "type": "identifier", "text": "tlsb_line", "parent": 767, "children": [], "start_point": {"row": 281, "column": 10}, "end_point": {"row": 281, "column": 19}}, {"id": 769, "type": "string_literal", "text": "\"unknown, dtype 0x%x\"", "parent": 767, "children": [], "start_point": {"row": 281, "column": 21}, "end_point": {"row": 281, "column": 42}}, {"id": 770, "type": "identifier", "text": "dtype", "parent": 767, "children": [], "start_point": {"row": 281, "column": 44}, "end_point": {"row": 281, "column": 49}}, {"id": 771, "type": "return_statement", "text": "return (tlsb_line);", "parent": 756, "children": [772], "start_point": {"row": 282, "column": 2}, "end_point": {"row": 282, "column": 21}}, {"id": 772, "type": "parenthesized_expression", "text": "(tlsb_line)", "parent": 771, "children": [773], "start_point": {"row": 282, "column": 9}, "end_point": {"row": 282, "column": 20}}, {"id": 773, "type": "identifier", "text": "tlsb_line", "parent": 772, "children": [], "start_point": {"row": 282, "column": 10}, "end_point": {"row": 282, "column": 19}}]}, "node_categories": {"declarations": {"functions": [52, 185, 187, 246, 248, 323, 325, 393, 395, 696], "variables": [47, 58, 83, 108, 123, 130, 147, 172, 182, 192, 197, 202, 254, 261, 268, 273, 331, 338, 345, 350, 401, 408, 415, 420, 425, 428, 692, 699, 703], "classes": [48, 67, 68, 73, 74, 92, 93, 98, 99, 109, 110, 118, 119, 124, 126, 127, 156, 157, 162, 163, 203, 204, 255, 256, 262, 263, 274, 275, 332, 333, 339, 340, 351, 352, 402, 403, 409, 410, 421, 422], "imports": [0, 1, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 23, 24, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45], "modules": [], "enums": []}, "statements": {"expressions": [3, 61, 64, 86, 89, 116, 133, 136, 150, 153, 177, 180, 213, 215, 219, 222, 226, 230, 234, 237, 240, 244, 284, 285, 286, 287, 288, 295, 296, 297, 302, 306, 309, 310, 311, 312, 314, 315, 361, 362, 363, 366, 369, 375, 378, 379, 380, 381, 388, 391, 431, 441, 445, 449, 450, 453, 458, 459, 466, 472, 473, 482, 483, 488, 489, 496, 502, 506, 511, 515, 520, 524, 529, 530, 534, 539, 543, 547, 551, 556, 557, 558, 564, 565, 568, 573, 574, 581, 587, 588, 595, 596, 606, 611, 615, 616, 617, 619, 624, 629, 630, 633, 638, 643, 644, 647, 652, 658, 662, 667, 671, 676, 680, 684, 688, 710, 711, 718, 724, 730, 736, 742, 748, 754, 758, 762, 763, 765, 772], "assignments": [437, 463, 479, 495, 501, 510, 519, 578, 651, 657, 666, 675], "loops": [436, 555], "conditionals": [4, 51, 54, 56, 60, 62, 69, 75, 82, 85, 87, 94, 100, 107, 111, 113, 120, 121, 122, 128, 129, 132, 134, 146, 149, 151, 158, 164, 171, 176, 178, 181, 184, 188, 190, 191, 196, 201, 205, 209, 211, 212, 214, 216, 220, 223, 224, 225, 227, 228, 231, 235, 236, 238, 241, 242, 245, 249, 251, 252, 253, 257, 260, 264, 267, 272, 276, 280, 282, 283, 289, 290, 291, 293, 298, 299, 300, 303, 304, 316, 317, 318, 320, 321, 322, 326, 328, 329, 330, 334, 337, 341, 344, 349, 353, 357, 359, 360, 364, 367, 368, 370, 371, 377, 382, 384, 386, 396, 398, 399, 400, 404, 407, 411, 414, 419, 423, 424, 426, 427, 430, 432, 438, 442, 444, 447, 448, 451, 454, 456, 457, 460, 464, 467, 469, 470, 471, 474, 480, 486, 487, 490, 492, 497, 498, 500, 503, 504, 507, 509, 512, 513, 516, 518, 521, 522, 525, 527, 528, 531, 533, 535, 540, 541, 542, 544, 546, 548, 550, 552, 553, 554, 560, 563, 566, 569, 571, 572, 575, 579, 582, 584, 585, 586, 589, 594, 597, 599, 600, 601, 604, 607, 612, 613, 614, 618, 620, 621, 622, 623, 625, 627, 628, 634, 635, 639, 641, 642, 648, 649, 650, 653, 654, 656, 659, 660, 663, 665, 668, 669, 672, 674, 677, 678, 681, 683, 685, 687, 689, 690, 691, 697, 700, 701, 702, 706, 708, 709, 712, 713, 714, 715, 716, 720, 721, 722, 726, 727, 728, 732, 733, 734, 738, 739, 740, 744, 745, 746, 750, 751, 752, 756, 759, 761, 764, 766, 768, 770, 773], "returns": [243, 305, 308, 374, 387, 390, 717, 723, 729, 735, 741, 747, 753, 771], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 6, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 218, 233, 307, 373, 376, 389, 392, 434, 440, 476, 484, 537, 562, 591, 609, 631, 645, 707, 719, 725, 731, 737, 743, 749, 755, 769], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 52, "universal_type": "function", "name": "unknown", "text_snippet": "#define KV(_addr)\t((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))\n"}, {"node_id": 185, "universal_type": "function", "name": "tlsbprint", "text_snippet": "static int\ntlsbprint(aux, pnp)\n\tvoid *aux;\n\tconst char *pnp;\n{\n\tstruct tlsb_dev_attach_args *tap = a"}, {"node_id": 187, "universal_type": "function", "name": "unknown", "text_snippet": "tlsbprint(aux, pnp)"}, {"node_id": 246, "universal_type": "function", "name": "tlsbsubmatch", "text_snippet": "static int\ntlsbsubmatch(parent, cf, aux)\n\tstruct device *parent;\n\tstruct cfdata *cf;\n\tvoid *aux;\n{\n\t"}, {"node_id": 248, "universal_type": "function", "name": "unknown", "text_snippet": "tlsbsubmatch(parent, cf, aux)"}, {"node_id": 323, "universal_type": "function", "name": "tlsbmatch", "text_snippet": "static int\ntlsbmatch(parent, cf, aux)\n\tstruct device *parent;\n\tstruct cfdata *cf;\n\tvoid *aux;\n{\n\tstr"}, {"node_id": 325, "universal_type": "function", "name": "unknown", "text_snippet": "tlsbmatch(parent, cf, aux)"}, {"node_id": 393, "universal_type": "function", "name": "tlsbattach", "text_snippet": "static void\ntlsbattach(parent, self, aux)\n\tstruct device *parent;\n\tstruct device *self;\n\tvoid *aux;\n"}, {"node_id": 395, "universal_type": "function", "name": "unknown", "text_snippet": "tlsbattach(parent, self, aux)"}, {"node_id": 696, "universal_type": "function", "name": "unknown", "text_snippet": "tlsb_node_type_str(dtype)\n\tu_int32_t dtype"}], "class_declarations": [{"node_id": 48, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 67, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 68, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 73, "universal_type": "class", "name": "cfdata", "text_snippet": "struct cfdata"}, {"node_id": 74, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 92, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 93, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 98, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 99, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 109, "universal_type": "class", "name": "cfattach", "text_snippet": "struct cfattach"}, {"node_id": 110, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 118, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 119, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 124, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 126, "universal_type": "class", "name": "cfdriver", "text_snippet": "struct cfdriver"}, {"node_id": 127, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 156, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 157, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 162, "universal_type": "class", "name": "cfdata", "text_snippet": "struct cfdata"}, {"node_id": 163, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 203, "universal_type": "class", "name": "tlsb_dev_attach_args", "text_snippet": "struct tlsb_dev_attach_args"}, {"node_id": 204, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 255, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 256, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 262, "universal_type": "class", "name": "cfdata", "text_snippet": "struct cfdata"}, {"node_id": 263, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 274, "universal_type": "class", "name": "tlsb_dev_attach_args", "text_snippet": "struct tlsb_dev_attach_args"}, {"node_id": 275, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 332, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 333, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 339, "universal_type": "class", "name": "cfdata", "text_snippet": "struct cfdata"}, {"node_id": 340, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 351, "universal_type": "class", "name": "mainbus_attach_args", "text_snippet": "struct mainbus_attach_args"}, {"node_id": 352, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 402, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 403, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 409, "universal_type": "class", "name": "device", "text_snippet": "struct device"}, {"node_id": 410, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 421, "universal_type": "class", "name": "tlsb_dev_attach_args", "text_snippet": "struct tlsb_dev_attach_args"}, {"node_id": 422, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <sys/cdefs.h>\t\t\t/* RCS ID & Copyright macro defns */\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 8, "text": "#include \"opt_multiprocessor.h\"\n"}, {"node_id": 9, "text": "#include"}, {"node_id": 11, "text": "#include <sys/param.h>\n"}, {"node_id": 12, "text": "#include"}, {"node_id": 14, "text": "#include <sys/systm.h>\n"}, {"node_id": 15, "text": "#include"}, {"node_id": 17, "text": "#include <sys/device.h>\n"}, {"node_id": 18, "text": "#include"}, {"node_id": 20, "text": "#include <sys/malloc.h>\n"}, {"node_id": 21, "text": "#include"}, {"node_id": 23, "text": "#include <machine/autoconf.h>\n"}, {"node_id": 24, "text": "#include"}, {"node_id": 26, "text": "#include <machine/rpb.h>\n"}, {"node_id": 27, "text": "#include"}, {"node_id": 29, "text": "#include <machine/pte.h>\n"}, {"node_id": 30, "text": "#include"}, {"node_id": 32, "text": "#include <machine/alpha.h>\n"}, {"node_id": 33, "text": "#include"}, {"node_id": 35, "text": "#include <alpha/alpha/cpuvar.h>\n"}, {"node_id": 36, "text": "#include"}, {"node_id": 38, "text": "#include <alpha/tlsb/tlsbreg.h>\n"}, {"node_id": 39, "text": "#include"}, {"node_id": 41, "text": "#include <alpha/tlsb/tlsbvar.h>\n"}, {"node_id": 42, "text": "#include"}, {"node_id": 44, "text": "#include \"locators.h\"\n"}, {"node_id": 45, "text": "#include"}]}, "original_source_code": "/* $NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $ */\n/*\n * Copyright (c) 1997 by <NAME>\n * NASA AMES Research Center.\n * All rights reserved.\n *\n * Based in part upon a prototype version by <NAME>\n * Copyright (c) 1996, 1998 by <NAME>.\n *\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 immediately at the beginning of the file, without modification,\n * 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 * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n * 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 AUTHOR OR CONTRIBUTORS BE LIABLE FOR\n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n */\n\n/*\n * Autoconfiguration and support routines for the TurboLaser System Bus\n * found on AlphaServer 8200 and 8400 systems.\n */\n\n#include <sys/cdefs.h>\t\t\t/* RCS ID & Copyright macro defns */\n\n__KERNEL_RCSID(0, \"$NetBSD: tlsb.c,v 1.17 1999/02/23 03:20:04 thorpej Exp $\");\n\n#include \"opt_multiprocessor.h\"\n\n#include <sys/param.h>\n#include <sys/systm.h>\n#include <sys/device.h>\n#include <sys/malloc.h>\n\n#include <machine/autoconf.h>\n#include <machine/rpb.h>\n#include <machine/pte.h>\n#include <machine/alpha.h>\n\n#include <alpha/alpha/cpuvar.h>\n\n#include <alpha/tlsb/tlsbreg.h>\n#include <alpha/tlsb/tlsbvar.h>\n\n#include \"locators.h\"\n\nextern int\tcputype;\n\n#define KV(_addr)\t((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))\n\nstatic int\ttlsbmatch __P((struct device *, struct cfdata *, void *));\nstatic void\ttlsbattach __P((struct device *, struct device *, void *));\n\nstruct cfattach tlsb_ca = {\n\tsizeof (struct device), tlsbmatch, tlsbattach\n};\n\nextern struct cfdriver tlsb_cd;\n\nstatic int\ttlsbprint __P((void *, const char *));\nstatic int\ttlsbsubmatch __P((struct device *, struct cfdata *, void *));\nstatic char\t*tlsb_node_type_str __P((u_int32_t));\n\n/*\n * There can be only one TurboLaser, and we'll overload it\n * with a bitmap of found turbo laser nodes. Note that\n * these are just the actual hard TL node IDS that we\n * discover here, not the virtual IDs that get assigned\n * to CPUs. During TLSB specific error handling we\n * only need to know which actual TLSB slots have boards\n * in them (irrespective of how many CPUs they have).\n */\nint\ttlsb_found;\n\nstatic int\ntlsbprint(aux, pnp)\n\tvoid *aux;\n\tconst char *pnp;\n{\n\tstruct tlsb_dev_attach_args *tap = aux;\n\n\tif (pnp)\n\t\tprintf(\"%s at %s node %d\", tlsb_node_type_str(tap->ta_dtype),\n\t\t pnp, tap->ta_node);\n\telse\n\t\tprintf(\" node %d: %s\", tap->ta_node,\n\t\t tlsb_node_type_str(tap->ta_dtype));\n\n\treturn (UNCONF);\n}\n\nstatic int\ntlsbsubmatch(parent, cf, aux)\n\tstruct device *parent;\n\tstruct cfdata *cf;\n\tvoid *aux;\n{\n\tstruct tlsb_dev_attach_args *tap = aux;\n\n\tif (cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&\n\t cf->cf_loc[TLSBCF_NODE] != tap->ta_node)\n\t\treturn (0);\n\n\treturn ((*cf->cf_attach->ca_match)(parent, cf, aux));\n}\n\nstatic int\ntlsbmatch(parent, cf, aux)\n\tstruct device *parent;\n\tstruct cfdata *cf;\n\tvoid *aux;\n{\n\tstruct mainbus_attach_args *ma = aux;\n\n\t/* Make sure we're looking for a TurboLaser. */\n\tif (strcmp(ma->ma_name, tlsb_cd.cd_name) != 0)\n\t\treturn (0);\n\n\t/*\n\t * Only one instance of TurboLaser allowed,\n\t * and only available on 21000 processor type\n\t * platforms.\n\t */\n\tif ((cputype != ST_DEC_21000) || tlsb_found)\n\t\treturn (0);\n\n\treturn (1);\n}\n\nstatic void\ntlsbattach(parent, self, aux)\n\tstruct device *parent;\n\tstruct device *self;\n\tvoid *aux;\n{\n\tstruct tlsb_dev_attach_args ta;\n\tu_int32_t tldev;\n\tint node;\n\n\tprintf(\"\\n\");\n\n\t/*\n\t * Attempt to find all devices on the bus, including\n\t * CPUs, memory modules, and I/O modules.\n\t */\n\n\t/*\n\t * Sigh. I would like to just start off nicely,\n\t * but I need to treat I/O modules differently-\n\t * The highest priority I/O node has to be in\n\t * node #8, and I want to find it *first*, since\n\t * it will have the primary disks (most likely)\n\t * on it.\n\t */\n\tfor (node = 0; node <= TLSB_NODE_MAX; ++node) {\n\t\t/*\n\t\t * Check for invalid address. This may not really\n\t\t * be necessary, but what the heck...\n\t\t */\n\t\tif (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n\t\t\tcontinue;\n\t\ttldev = TLSB_GET_NODEREG(node, TLDEV);\n\t\tif (tldev == 0) {\n\t\t\t/* Nothing at this node. */\n\t\t\tcontinue;\n\t\t}\n\t\t/*\n\t\t * Store up that we found something at this node.\n\t\t * We do this so that we don't have to do something\n\t\t * silly at fault time like try a 'baddadr'...\n\t\t */\n\t\ttlsb_found |= (1 << node);\n\t\tif (TLDEV_ISIOPORT(tldev))\n\t\t\tcontinue;\t/* not interested right now */\n\t\tta.ta_node = node;\n\t\tta.ta_dtype = TLDEV_DTYPE(tldev);\n\t\tta.ta_swrev = TLDEV_SWREV(tldev);\n\t\tta.ta_hwrev = TLDEV_HWREV(tldev);\n\n\t\t/*\n\t\t * Deal with hooking CPU instances to TurboLaser nodes.\n\t\t */\n\t\tif (TLDEV_ISCPU(tldev)) {\n\t\t\tprintf(\"%s node %d: %s\\n\", self->dv_xname,\n\t\t\t node, tlsb_node_type_str(tldev));\n\t\t}\n\t\t/*\n\t\t * Attach any children nodes, including a CPU's GBus\n\t\t */\n\t\tconfig_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n\t}\n\t/*\n\t * *Now* search for I/O nodes (in descending order)\n\t */\n\twhile (--node > 0) {\n\t\tif (badaddr(TLSB_NODE_REG_ADDR(node, TLDEV), sizeof(u_int32_t)))\n\t\t\tcontinue;\n\t\ttldev = TLSB_GET_NODEREG(node, TLDEV);\n\t\tif (tldev == 0) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (TLDEV_ISIOPORT(tldev)) {\n#if defined(MULTIPROCESSOR)\n\t\t\t/*\n\t\t\t * XXX Eventually, we want to select a secondary\n\t\t\t * XXX processor on which to field interrupts for\n\t\t\t * XXX this node. However, we just send them to\n\t\t\t * XXX the primary CPU for now.\n\t\t\t *\n\t\t\t * XXX Maybe multiple CPUs? Does the hardware\n\t\t\t * XXX round-robin, or check the length of the\n\t\t\t * XXX per-CPU interrupt queue?\n\t\t\t */\n\t\t\tprintf(\"%s node %d: routing interrupts to %s\\n\",\n\t\t\t self->dv_xname, node,\n\t\t\t cpu_info[hwrpb->rpb_primary_cpu_id].ci_dev->dv_xname);\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));\n#else\n\t\t\t/*\n\t\t\t * Make sure interrupts are sent to the primary CPU.\n\t\t\t */\n\t\t\tTLSB_PUT_NODEREG(node, TLCPUMASK,\n\t\t\t (1UL << hwrpb->rpb_primary_cpu_id));\n#endif /* MULTIPROCESSOR */\n\n\t\t\tta.ta_node = node;\n\t\t\tta.ta_dtype = TLDEV_DTYPE(tldev);\n\t\t\tta.ta_swrev = TLDEV_SWREV(tldev);\n\t\t\tta.ta_hwrev = TLDEV_HWREV(tldev);\n\t\t\tconfig_found_sm(self, &ta, tlsbprint, tlsbsubmatch);\n\t\t}\n\t}\n}\n\nstatic char *\ntlsb_node_type_str(dtype)\n\tu_int32_t dtype;\n{\n\tstatic char\ttlsb_line[64];\n\n\tswitch (dtype & TLDEV_DTYPE_MASK) {\n\tcase TLDEV_DTYPE_KFTHA:\n\t\treturn (\"KFTHA I/O interface\");\n\n\tcase TLDEV_DTYPE_KFTIA:\n\t\treturn (\"KFTIA I/O interface\");\n\n\tcase TLDEV_DTYPE_MS7CC:\n\t\treturn (\"MS7CC Memory Module\");\n\n\tcase TLDEV_DTYPE_SCPU4:\n\t\treturn (\"Single CPU, 4MB cache\");\n\n\tcase TLDEV_DTYPE_SCPU16:\n\t\treturn (\"Single CPU, 16MB cache\");\n\n\tcase TLDEV_DTYPE_DCPU4:\n\t\treturn (\"Dual CPU, 4MB cache\");\n\n\tcase TLDEV_DTYPE_DCPU16:\n\t\treturn (\"Dual CPU, 16MB cache\");\n\n\tdefault:\n\t\tbzero(tlsb_line, sizeof(tlsb_line));\n\t\tsprintf(tlsb_line, \"unknown, dtype 0x%x\", dtype);\n\t\treturn (tlsb_line);\n\t}\n\t/* NOTREACHED */\n}\n"}
80,923
c
#include<stdio.h> int main() { int marks[50],count = 0; printf("Enter marks between 0 -20 \n"); for (int i = 0; i<50; i++) { scanf("%d",&marks[i]); } for(int i = 0;i<=20;i++) { count = 0; for(int j = 0;j<50;j++) { if(marks[j] == i) { count++; } } printf("The frequency of %d marks is %d",i,count); } }
19.68
22
(translation_unit) "#include<stdio.h> \nint main() \n{ \n int marks[50],count = 0; \n printf("Enter marks between 0 -20 \n"); \n for (int i = 0; i<50; i++) \n { \n scanf("%d",&marks[i]); \n } \n for(int i = 0;i<=20;i++) \n { \n count = 0; \n for(int j = 0;j<50;j++) \n { \n if(marks[j] == i) \n { \n count++; \n } \n } \n printf("The frequency of %d marks is %d",i,count); \n } \n} \n" (preproc_include) "#include<stdio.h> \n" (#include) "#include" (system_lib_string) "<stdio.h>" (function_definition) "int main() \n{ \n int marks[50],count = 0; \n printf("Enter marks between 0 -20 \n"); \n for (int i = 0; i<50; i++) \n { \n scanf("%d",&marks[i]); \n } \n for(int i = 0;i<=20;i++) \n { \n count = 0; \n for(int j = 0;j<50;j++) \n { \n if(marks[j] == i) \n { \n count++; \n } \n } \n printf("The frequency of %d marks is %d",i,count); \n } \n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n int marks[50],count = 0; \n printf("Enter marks between 0 -20 \n"); \n for (int i = 0; i<50; i++) \n { \n scanf("%d",&marks[i]); \n } \n for(int i = 0;i<=20;i++) \n { \n count = 0; \n for(int j = 0;j<50;j++) \n { \n if(marks[j] == i) \n { \n count++; \n } \n } \n printf("The frequency of %d marks is %d",i,count); \n } \n}" ({) "{" (declaration) "int marks[50],count = 0;" (primitive_type) "int" (array_declarator) "marks[50]" (identifier) "marks" ([) "[" (number_literal) "50" (]) "]" (,) "," (init_declarator) "count = 0" (identifier) "count" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "printf("Enter marks between 0 -20 \n");" (call_expression) "printf("Enter marks between 0 -20 \n")" (identifier) "printf" (argument_list) "("Enter marks between 0 -20 \n")" (() "(" (string_literal) ""Enter marks between 0 -20 \n"" (") """ (string_content) "Enter marks between 0 -20 " (escape_sequence) "\n" (") """ ()) ")" (;) ";" (for_statement) "for (int i = 0; i<50; i++) \n { \n scanf("%d",&marks[i]); \n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<50" (identifier) "i" (<) "<" (number_literal) "50" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{ \n scanf("%d",&marks[i]); \n }" ({) "{" (expression_statement) "scanf("%d",&marks[i]);" (call_expression) "scanf("%d",&marks[i])" (identifier) "scanf" (argument_list) "("%d",&marks[i])" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (pointer_expression) "&marks[i]" (&) "&" (subscript_expression) "marks[i]" (identifier) "marks" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (for_statement) "for(int i = 0;i<=20;i++) \n { \n count = 0; \n for(int j = 0;j<50;j++) \n { \n if(marks[j] == i) \n { \n count++; \n } \n } \n printf("The frequency of %d marks is %d",i,count); \n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<=20" (identifier) "i" (<=) "<=" (number_literal) "20" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{ \n count = 0; \n for(int j = 0;j<50;j++) \n { \n if(marks[j] == i) \n { \n count++; \n } \n } \n printf("The frequency of %d marks is %d",i,count); \n }" ({) "{" (expression_statement) "count = 0;" (assignment_expression) "count = 0" (identifier) "count" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for(int j = 0;j<50;j++) \n { \n if(marks[j] == i) \n { \n count++; \n } \n }" (for) "for" (() "(" (declaration) "int j = 0;" (primitive_type) "int" (init_declarator) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j<50" (identifier) "j" (<) "<" (number_literal) "50" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{ \n if(marks[j] == i) \n { \n count++; \n } \n }" ({) "{" (if_statement) "if(marks[j] == i) \n { \n count++; \n }" (if) "if" (parenthesized_expression) "(marks[j] == i)" (() "(" (binary_expression) "marks[j] == i" (subscript_expression) "marks[j]" (identifier) "marks" ([) "[" (identifier) "j" (]) "]" (==) "==" (identifier) "i" ()) ")" (compound_statement) "{ \n count++; \n }" ({) "{" (expression_statement) "count++;" (update_expression) "count++" (identifier) "count" (++) "++" (;) ";" (}) "}" (}) "}" (expression_statement) "printf("The frequency of %d marks is %d",i,count);" (call_expression) "printf("The frequency of %d marks is %d",i,count)" (identifier) "printf" (argument_list) "("The frequency of %d marks is %d",i,count)" (() "(" (string_literal) ""The frequency of %d marks is %d"" (") """ (string_content) "The frequency of %d marks is %d" (") """ (,) "," (identifier) "i" (,) "," (identifier) "count" ()) ")" (;) ";" (}) "}" (}) "}"
166
0
{"language": "c", "success": true, "metadata": {"lines": 22, "avg_line_length": 19.68, "nodes": 93, "errors": 0, "source_hash": "2f12251b2d025a89392f88301fcdd16568a59071436011c2fc76dd3a2243d556", "categorized_nodes": 65}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>\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": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 17}}, {"id": 3, "type": "function_definition", "text": "int main()\r\n{\r\n int marks[50],count = 0;\r\n printf(\"Enter marks between 0 -20 \\n\");\r\n for (int i = 0; i<50; i++)\r\n {\r\n scanf(\"%d\",&marks[i]);\r\n }\r\n for(int i = 0;i<=20;i++)\r\n {\r\n count = 0;\r\n for(int j = 0;j<50;j++)\r\n {\r\n if(marks[j] == i)\r\n {\r\n count++;\r\n }\r\n }\r\n printf(\"The frequency of %d marks is %d\",i,count);\r\n }\r\n}", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 3}}, {"id": 5, "type": "function_declarator", "text": "main()", "parent": 3, "children": [6, 7], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 10}}, {"id": 6, "type": "identifier", "text": "main", "parent": 5, "children": [], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 8}}, {"id": 7, "type": "parameter_list", "text": "()", "parent": 5, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 10}}, {"id": 8, "type": "declaration", "text": "int marks[50],count = 0;", "parent": 3, "children": [9, 10, 13], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 28}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 7}}, {"id": 10, "type": "array_declarator", "text": "marks[50]", "parent": 8, "children": [11, 12], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 17}}, {"id": 11, "type": "identifier", "text": "marks", "parent": 10, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 13}}, {"id": 12, "type": "number_literal", "text": "50", "parent": 10, "children": [], "start_point": {"row": 3, "column": 14}, "end_point": {"row": 3, "column": 16}}, {"id": 13, "type": "init_declarator", "text": "count = 0", "parent": 8, "children": [14, 15, 16], "start_point": {"row": 3, "column": 18}, "end_point": {"row": 3, "column": 27}}, {"id": 14, "type": "identifier", "text": "count", "parent": 13, "children": [], "start_point": {"row": 3, "column": 18}, "end_point": {"row": 3, "column": 23}}, {"id": 15, "type": "=", "text": "=", "parent": 13, "children": [], "start_point": {"row": 3, "column": 24}, "end_point": {"row": 3, "column": 25}}, {"id": 16, "type": "number_literal", "text": "0", "parent": 13, "children": [], "start_point": {"row": 3, "column": 26}, "end_point": {"row": 3, "column": 27}}, {"id": 17, "type": "call_expression", "text": "printf(\"Enter marks between 0 -20 \\n\")", "parent": 3, "children": [18, 19], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 42}}, {"id": 18, "type": "identifier", "text": "printf", "parent": 17, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 10}}, {"id": 19, "type": "argument_list", "text": "(\"Enter marks between 0 -20 \\n\")", "parent": 17, "children": [20], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 4, "column": 42}}, {"id": 20, "type": "string_literal", "text": "\"Enter marks between 0 -20 \\n\"", "parent": 19, "children": [21], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 41}}, {"id": 21, "type": "escape_sequence", "text": "\\n", "parent": 20, "children": [], "start_point": {"row": 4, "column": 38}, "end_point": {"row": 4, "column": 40}}, {"id": 22, "type": "for_statement", "text": "for (int i = 0; i<50; i++)\r\n {\r\n scanf(\"%d\",&marks[i]);\r\n }", "parent": 3, "children": [23, 29, 33], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 8, "column": 5}}, {"id": 23, "type": "declaration", "text": "int i = 0;", "parent": 22, "children": [24, 25], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 19}}, {"id": 24, "type": "primitive_type", "text": "int", "parent": 23, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 12}}, {"id": 25, "type": "init_declarator", "text": "i = 0", "parent": 23, "children": [26, 27, 28], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 18}}, {"id": 26, "type": "identifier", "text": "i", "parent": 25, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 14}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 5, "column": 15}, "end_point": {"row": 5, "column": 16}}, {"id": 28, "type": "number_literal", "text": "0", "parent": 25, "children": [], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 18}}, {"id": 29, "type": "binary_expression", "text": "i<50", "parent": 22, "children": [30, 31, 32], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 24}}, {"id": 30, "type": "identifier", "text": "i", "parent": 29, "children": [], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 21}}, {"id": 31, "type": "<", "text": "<", "parent": 29, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 22}}, {"id": 32, "type": "number_literal", "text": "50", "parent": 29, "children": [], "start_point": {"row": 5, "column": 22}, "end_point": {"row": 5, "column": 24}}, {"id": 33, "type": "update_expression", "text": "i++", "parent": 22, "children": [34, 35], "start_point": {"row": 5, "column": 26}, "end_point": {"row": 5, "column": 29}}, {"id": 34, "type": "identifier", "text": "i", "parent": 33, "children": [], "start_point": {"row": 5, "column": 26}, "end_point": {"row": 5, "column": 27}}, {"id": 35, "type": "++", "text": "++", "parent": 33, "children": [], "start_point": {"row": 5, "column": 27}, "end_point": {"row": 5, "column": 29}}, {"id": 36, "type": "call_expression", "text": "scanf(\"%d\",&marks[i])", "parent": 22, "children": [37, 38], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 29}}, {"id": 37, "type": "identifier", "text": "scanf", "parent": 36, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 13}}, {"id": 38, "type": "argument_list", "text": "(\"%d\",&marks[i])", "parent": 36, "children": [39, 40], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 29}}, {"id": 39, "type": "string_literal", "text": "\"%d\"", "parent": 38, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 18}}, {"id": 40, "type": "pointer_expression", "text": "&marks[i]", "parent": 38, "children": [41], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 28}}, {"id": 41, "type": "subscript_expression", "text": "marks[i]", "parent": 40, "children": [42, 43], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 28}}, {"id": 42, "type": "identifier", "text": "marks", "parent": 41, "children": [], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 25}}, {"id": 43, "type": "identifier", "text": "i", "parent": 41, "children": [], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 27}}, {"id": 44, "type": "for_statement", "text": "for(int i = 0;i<=20;i++)\r\n {\r\n count = 0;\r\n for(int j = 0;j<50;j++)\r\n {\r\n if(marks[j] == i)\r\n {\r\n count++;\r\n }\r\n }\r\n printf(\"The frequency of %d marks is %d\",i,count);\r\n }", "parent": 3, "children": [45, 51, 55], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 20, "column": 5}}, {"id": 45, "type": "declaration", "text": "int i = 0;", "parent": 44, "children": [46, 47], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 18}}, {"id": 46, "type": "primitive_type", "text": "int", "parent": 45, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 11}}, {"id": 47, "type": "init_declarator", "text": "i = 0", "parent": 45, "children": [48, 49, 50], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 17}}, {"id": 48, "type": "identifier", "text": "i", "parent": 47, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 13}}, {"id": 49, "type": "=", "text": "=", "parent": 47, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 15}}, {"id": 50, "type": "number_literal", "text": "0", "parent": 47, "children": [], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 17}}, {"id": 51, "type": "binary_expression", "text": "i<=20", "parent": 44, "children": [52, 53, 54], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 23}}, {"id": 52, "type": "identifier", "text": "i", "parent": 51, "children": [], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 19}}, {"id": 53, "type": "<=", "text": "<=", "parent": 51, "children": [], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 21}}, {"id": 54, "type": "number_literal", "text": "20", "parent": 51, "children": [], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 23}}, {"id": 55, "type": "update_expression", "text": "i++", "parent": 44, "children": [56, 57], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 27}}, {"id": 56, "type": "identifier", "text": "i", "parent": 55, "children": [], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 25}}, {"id": 57, "type": "++", "text": "++", "parent": 55, "children": [], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 27}}, {"id": 58, "type": "assignment_expression", "text": "count = 0", "parent": 44, "children": [59, 60, 61], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 17}}, {"id": 59, "type": "identifier", "text": "count", "parent": 58, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 13}}, {"id": 60, "type": "=", "text": "=", "parent": 58, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 15}}, {"id": 61, "type": "number_literal", "text": "0", "parent": 58, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 17}}, {"id": 62, "type": "for_statement", "text": "for(int j = 0;j<50;j++)\r\n {\r\n if(marks[j] == i)\r\n {\r\n count++;\r\n }\r\n }", "parent": 44, "children": [63, 69, 73], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 18, "column": 9}}, {"id": 63, "type": "declaration", "text": "int j = 0;", "parent": 62, "children": [64, 65], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 22}}, {"id": 64, "type": "primitive_type", "text": "int", "parent": 63, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 15}}, {"id": 65, "type": "init_declarator", "text": "j = 0", "parent": 63, "children": [66, 67, 68], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 21}}, {"id": 66, "type": "identifier", "text": "j", "parent": 65, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 17}}, {"id": 67, "type": "=", "text": "=", "parent": 65, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 19}}, {"id": 68, "type": "number_literal", "text": "0", "parent": 65, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 21}}, {"id": 69, "type": "binary_expression", "text": "j<50", "parent": 62, "children": [70, 71, 72], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 26}}, {"id": 70, "type": "identifier", "text": "j", "parent": 69, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 23}}, {"id": 71, "type": "<", "text": "<", "parent": 69, "children": [], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 24}}, {"id": 72, "type": "number_literal", "text": "50", "parent": 69, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 26}}, {"id": 73, "type": "update_expression", "text": "j++", "parent": 62, "children": [74, 75], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 30}}, {"id": 74, "type": "identifier", "text": "j", "parent": 73, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 28}}, {"id": 75, "type": "++", "text": "++", "parent": 73, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 30}}, {"id": 76, "type": "if_statement", "text": "if(marks[j] == i)\r\n {\r\n count++;\r\n }", "parent": 62, "children": [77], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 17, "column": 13}}, {"id": 77, "type": "parenthesized_expression", "text": "(marks[j] == i)", "parent": 76, "children": [78], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 29}}, {"id": 78, "type": "binary_expression", "text": "marks[j] == i", "parent": 77, "children": [79, 82, 83], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 28}}, {"id": 79, "type": "subscript_expression", "text": "marks[j]", "parent": 78, "children": [80, 81], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 23}}, {"id": 80, "type": "identifier", "text": "marks", "parent": 79, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 20}}, {"id": 81, "type": "identifier", "text": "j", "parent": 79, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 22}}, {"id": 82, "type": "==", "text": "==", "parent": 78, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 26}}, {"id": 83, "type": "identifier", "text": "i", "parent": 78, "children": [], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 28}}, {"id": 84, "type": "update_expression", "text": "count++", "parent": 76, "children": [85, 86], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 23}}, {"id": 85, "type": "identifier", "text": "count", "parent": 84, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 21}}, {"id": 86, "type": "++", "text": "++", "parent": 84, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 23}}, {"id": 87, "type": "call_expression", "text": "printf(\"The frequency of %d marks is %d\",i,count)", "parent": 44, "children": [88, 89], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 57}}, {"id": 88, "type": "identifier", "text": "printf", "parent": 87, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 14}}, {"id": 89, "type": "argument_list", "text": "(\"The frequency of %d marks is %d\",i,count)", "parent": 87, "children": [90, 91, 92], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 57}}, {"id": 90, "type": "string_literal", "text": "\"The frequency of %d marks is %d\"", "parent": 89, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 48}}, {"id": 91, "type": "identifier", "text": "i", "parent": 89, "children": [], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 50}}, {"id": 92, "type": "identifier", "text": "count", "parent": 89, "children": [], "start_point": {"row": 19, "column": 51}, "end_point": {"row": 19, "column": 56}}]}, "node_categories": {"declarations": {"functions": [3, 5], "variables": [8, 23, 45, 63], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [17, 29, 33, 36, 40, 41, 51, 55, 69, 73, 77, 78, 79, 84, 87], "assignments": [58], "loops": [22, 44, 62], "conditionals": [6, 11, 14, 18, 26, 30, 34, 37, 42, 43, 48, 52, 56, 59, 66, 70, 74, 76, 80, 81, 83, 85, 88, 91, 92], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 12, 16, 20, 28, 32, 39, 50, 54, 61, 68, 72, 90], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "main", "text_snippet": "int main()\r\n{\r\n int marks[50],count = 0;\r\n printf(\"Enter marks between 0 -20 \\n\");\r\n for (i"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>\r\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include<stdio.h>\r\nint main()\r\n{\r\n int marks[50],count = 0;\r\n printf(\"Enter marks between 0 -20 \\n\");\r\n for (int i = 0; i<50; i++)\r\n {\r\n scanf(\"%d\",&marks[i]);\r\n }\r\n for(int i = 0;i<=20;i++)\r\n {\r\n count = 0;\r\n for(int j = 0;j<50;j++)\r\n {\r\n if(marks[j] == i)\r\n {\r\n count++;\r\n }\r\n }\r\n printf(\"The frequency of %d marks is %d\",i,count);\r\n }\r\n}\r\n"}
80,924
c
#pragma once #include <functional> #include <set> #include <list> // Invokable class Invokable : public CWnd { DECLARE_DYNAMIC(Invokable) public: Invokable(); virtual ~Invokable(); bool Invoke(const std::function<void(bool)> & f); protected: afx_msg LRESULT OnInvoke(WPARAM wParam, LPARAM lParam); DECLARE_MESSAGE_MAP() private: CRITICAL_SECTION cs; public: private: std::list<std::function<void(bool)> > _funcList; public: afx_msg void OnDestroy(); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); };
20.5
24
(translation_unit) "#pragma once\n\n#include <functional>\n#include <set>\n#include <list>\n\n// Invokable\n\nclass Invokable : public CWnd\n{\n DECLARE_DYNAMIC(Invokable)\n\npublic:\n Invokable();\n virtual ~Invokable();\n bool Invoke(const std::function<void(bool)> & f);\n\nprotected:\n afx_msg LRESULT OnInvoke(WPARAM wParam, LPARAM lParam);\n DECLARE_MESSAGE_MAP()\n\nprivate:\n CRITICAL_SECTION cs;\npublic:\n\nprivate:\n std::list<std::function<void(bool)> > _funcList;\n\npublic:\n afx_msg void OnDestroy();\n afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);\n};\n\n\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <functional>\n" (#include) "#include" (system_lib_string) "<functional>" (preproc_include) "#include <set>\n" (#include) "#include" (system_lib_string) "<set>" (preproc_include) "#include <list>\n" (#include) "#include" (system_lib_string) "<list>" (comment) "// Invokable" (function_definition) "class Invokable : public CWnd\n{\n DECLARE_DYNAMIC(Invokable)\n\npublic:\n Invokable();\n virtual ~Invokable();\n bool Invoke(const std::function<void(bool)> & f);\n\nprotected:\n afx_msg LRESULT OnInvoke(WPARAM wParam, LPARAM lParam);\n DECLARE_MESSAGE_MAP()\n\nprivate:\n CRITICAL_SECTION cs;\npublic:\n\nprivate:\n std::list<std::function<void(bool)> > _funcList;\n\npublic:\n afx_msg void OnDestroy();\n afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);\n}" (type_identifier) "class" (identifier) "Invokable" (ERROR) ": public CWnd" (:) ":" (identifier) "public" (identifier) "CWnd" (compound_statement) "{\n DECLARE_DYNAMIC(Invokable)\n\npublic:\n Invokable();\n virtual ~Invokable();\n bool Invoke(const std::function<void(bool)> & f);\n\nprotected:\n afx_msg LRESULT OnInvoke(WPARAM wParam, LPARAM lParam);\n DECLARE_MESSAGE_MAP()\n\nprivate:\n CRITICAL_SECTION cs;\npublic:\n\nprivate:\n std::list<std::function<void(bool)> > _funcList;\n\npublic:\n afx_msg void OnDestroy();\n afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);\n}" ({) "{" (declaration) "DECLARE_DYNAMIC(Invokable)\n\npublic:\n Invokable();" (macro_type_specifier) "DECLARE_DYNAMIC(Invokable)" (identifier) "DECLARE_DYNAMIC" (() "(" (type_descriptor) "Invokable" (type_identifier) "Invokable" ()) ")" (ERROR) "public:" (identifier) "public" (:) ":" (function_declarator) "Invokable()" (identifier) "Invokable" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual ~Invokable();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "Invokable()" (identifier) "Invokable" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool Invoke(const std::function<void(bool)> & f);" (primitive_type) "bool" (function_declarator) "Invoke(const std::function<void(bool)> & f)" (identifier) "Invoke" (parameter_list) "(const std::function<void(bool)> & f)" (() "(" (ERROR) "const std::function<" (parameter_declaration) "const std::function" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::" (:) ":" (:) ":" (identifier) "function" (<) "<" (parameter_declaration) "void(bool)" (primitive_type) "void" (abstract_function_declarator) "(bool)" (parameter_list) "(bool)" (() "(" (parameter_declaration) "bool" (primitive_type) "bool" ()) ")" (ERROR) "> & f" (>) ">" (&) "&" (identifier) "f" ()) ")" (;) ";" (labeled_statement) "protected:\n afx_msg LRESULT OnInvoke(WPARAM wParam, LPARAM lParam);" (statement_identifier) "protected" (:) ":" (declaration) "afx_msg LRESULT OnInvoke(WPARAM wParam, LPARAM lParam);" (type_identifier) "afx_msg" (ERROR) "LRESULT" (identifier) "LRESULT" (function_declarator) "OnInvoke(WPARAM wParam, LPARAM lParam)" (identifier) "OnInvoke" (parameter_list) "(WPARAM wParam, LPARAM lParam)" (() "(" (parameter_declaration) "WPARAM wParam" (type_identifier) "WPARAM" (identifier) "wParam" (,) "," (parameter_declaration) "LPARAM lParam" (type_identifier) "LPARAM" (identifier) "lParam" ()) ")" (;) ";" (expression_statement) "DECLARE_MESSAGE_MAP()" (call_expression) "DECLARE_MESSAGE_MAP()" (identifier) "DECLARE_MESSAGE_MAP" (argument_list) "()" (() "(" ()) ")" (;) "" (labeled_statement) "private:\n CRITICAL_SECTION cs;" (statement_identifier) "private" (:) ":" (declaration) "CRITICAL_SECTION cs;" (type_identifier) "CRITICAL_SECTION" (identifier) "cs" (;) ";" (labeled_statement) "public:\n\nprivate:\n std::list<std::function<void(bool)> > _funcList;" (statement_identifier) "public" (:) ":" (labeled_statement) "private:\n std::list<std::function<void(bool)> > _funcList;" (statement_identifier) "private" (:) ":" (expression_statement) "std::list<std::function<void(bool)> > _funcList;" (binary_expression) "std::list<std::function<void(bool)> > _funcList" (identifier) "std" (ERROR) "::list<std::function<void(bool)>" (:) ":" (:) ":" (binary_expression) "list<std" (identifier) "list" (<) "<" (identifier) "std" (:) ":" (:) ":" (binary_expression) "function<void(bool)" (identifier) "function" (<) "<" (call_expression) "void(bool)" (identifier) "void" (argument_list) "(bool)" (() "(" (identifier) "bool" ()) ")" (>) ">" (>) ">" (identifier) "_funcList" (;) ";" (labeled_statement) "public:\n afx_msg void OnDestroy();" (statement_identifier) "public" (:) ":" (declaration) "afx_msg void OnDestroy();" (type_identifier) "afx_msg" (ERROR) "void" (identifier) "void" (function_declarator) "OnDestroy()" (identifier) "OnDestroy" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);" (type_identifier) "afx_msg" (ERROR) "int" (identifier) "int" (function_declarator) "OnCreate(LPCREATESTRUCT lpCreateStruct)" (identifier) "OnCreate" (parameter_list) "(LPCREATESTRUCT lpCreateStruct)" (() "(" (parameter_declaration) "LPCREATESTRUCT lpCreateStruct" (type_identifier) "LPCREATESTRUCT" (identifier) "lpCreateStruct" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
173
10
{"language": "c", "success": true, "metadata": {"lines": 24, "avg_line_length": 20.5, "nodes": 107, "errors": 0, "source_hash": "21c0dc653d4f9058c52707fdd2d4b8f04ee04ea06c2be29a8621335f8a6f28b3", "categorized_nodes": 71}, "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 <functional>\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": "<functional>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include <set>\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": "<set>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 14}}, {"id": 9, "type": "preproc_include", "text": "#include <list>\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": "<list>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 15}}, {"id": 12, "type": "function_definition", "text": "class Invokable : public CWnd\n{\n\tDECLARE_DYNAMIC(Invokable)\n\npublic:\n\tInvokable();\n\tvirtual ~Invokable();\n\tbool Invoke(const std::function<void(bool)> & f);\n\nprotected:\n\tafx_msg LRESULT OnInvoke(WPARAM wParam, LPARAM lParam);\n\tDECLARE_MESSAGE_MAP()\n\nprivate:\n\tCRITICAL_SECTION cs;\npublic:\n\nprivate:\n\tstd::list<std::function<void(bool)> > _funcList;\n\npublic:\n\tafx_msg void OnDestroy();\n\tafx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);\n}", "parent": null, "children": [13, 14], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 13, "type": "identifier", "text": "Invokable", "parent": 12, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 15}}, {"id": 14, "type": "ERROR", "text": ": public CWnd", "parent": 12, "children": [15], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 29}}, {"id": 15, "type": "identifier", "text": "CWnd", "parent": 14, "children": [], "start_point": {"row": 8, "column": 25}, "end_point": {"row": 8, "column": 29}}, {"id": 16, "type": "declaration", "text": "DECLARE_DYNAMIC(Invokable)\n\npublic:\n\tInvokable();", "parent": 12, "children": [17, 21, 22], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 13, "column": 13}}, {"id": 17, "type": "macro_type_specifier", "text": "DECLARE_DYNAMIC(Invokable)", "parent": 16, "children": [18, 19], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 27}}, {"id": 18, "type": "identifier", "text": "DECLARE_DYNAMIC", "parent": 17, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 16}}, {"id": 19, "type": "type_descriptor", "text": "Invokable", "parent": 17, "children": [20], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 26}}, {"id": 20, "type": "type_identifier", "text": "Invokable", "parent": 19, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 26}}, {"id": 21, "type": "ERROR", "text": "public:", "parent": 16, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 22, "type": "function_declarator", "text": "Invokable()", "parent": 16, "children": [23, 24], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 12}}, {"id": 23, "type": "identifier", "text": "Invokable", "parent": 22, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 10}}, {"id": 24, "type": "parameter_list", "text": "()", "parent": 22, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 12}}, {"id": 25, "type": "declaration", "text": "virtual ~Invokable();", "parent": 12, "children": [26, 27, 29], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 22}}, {"id": 26, "type": "type_identifier", "text": "virtual", "parent": 25, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 8}}, {"id": 27, "type": "ERROR", "text": "~", "parent": 25, "children": [28], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 10}}, {"id": 28, "type": "~", "text": "~", "parent": 27, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 10}}, {"id": 29, "type": "function_declarator", "text": "Invokable()", "parent": 25, "children": [30, 31], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 21}}, {"id": 30, "type": "identifier", "text": "Invokable", "parent": 29, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 19}}, {"id": 31, "type": "parameter_list", "text": "()", "parent": 29, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 21}}, {"id": 32, "type": "declaration", "text": "bool Invoke(const std::function<void(bool)> & f);", "parent": 12, "children": [33, 34], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 50}}, {"id": 33, "type": "primitive_type", "text": "bool", "parent": 32, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 5}}, {"id": 34, "type": "function_declarator", "text": "Invoke(const std::function<void(bool)> & f)", "parent": 32, "children": [35, 36], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 49}}, {"id": 35, "type": "identifier", "text": "Invoke", "parent": 34, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 12}}, {"id": 36, "type": "parameter_list", "text": "(const std::function<void(bool)> & f)", "parent": 34, "children": [37, 41, 47], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 49}}, {"id": 37, "type": "ERROR", "text": "const std::function<", "parent": 36, "children": [38, 40], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 33}}, {"id": 38, "type": "parameter_declaration", "text": "const std::function", "parent": 37, "children": [39], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 32}}, {"id": 39, "type": "type_identifier", "text": "std", "parent": 38, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 22}}, {"id": 40, "type": "<", "text": "<", "parent": 37, "children": [], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 33}}, {"id": 41, "type": "parameter_declaration", "text": "void(bool)", "parent": 36, "children": [42, 43], "start_point": {"row": 15, "column": 33}, "end_point": {"row": 15, "column": 43}}, {"id": 42, "type": "primitive_type", "text": "void", "parent": 41, "children": [], "start_point": {"row": 15, "column": 33}, "end_point": {"row": 15, "column": 37}}, {"id": 43, "type": "abstract_function_declarator", "text": "(bool)", "parent": 41, "children": [44], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 43}}, {"id": 44, "type": "parameter_list", "text": "(bool)", "parent": 43, "children": [45], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 43}}, {"id": 45, "type": "parameter_declaration", "text": "bool", "parent": 44, "children": [46], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 42}}, {"id": 46, "type": "primitive_type", "text": "bool", "parent": 45, "children": [], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 42}}, {"id": 47, "type": "ERROR", "text": "> & f", "parent": 36, "children": [48, 49], "start_point": {"row": 15, "column": 43}, "end_point": {"row": 15, "column": 48}}, {"id": 48, "type": ">", "text": ">", "parent": 47, "children": [], "start_point": {"row": 15, "column": 43}, "end_point": {"row": 15, "column": 44}}, {"id": 49, "type": "identifier", "text": "f", "parent": 47, "children": [], "start_point": {"row": 15, "column": 47}, "end_point": {"row": 15, "column": 48}}, {"id": 50, "type": "labeled_statement", "text": "protected:\n\tafx_msg LRESULT OnInvoke(WPARAM wParam, LPARAM lParam);", "parent": 12, "children": [51], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 56}}, {"id": 51, "type": "declaration", "text": "afx_msg LRESULT OnInvoke(WPARAM wParam, LPARAM lParam);", "parent": 50, "children": [52, 53, 55], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 56}}, {"id": 52, "type": "type_identifier", "text": "afx_msg", "parent": 51, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 8}}, {"id": 53, "type": "ERROR", "text": "LRESULT", "parent": 51, "children": [54], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 16}}, {"id": 54, "type": "identifier", "text": "LRESULT", "parent": 53, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 16}}, {"id": 55, "type": "function_declarator", "text": "OnInvoke(WPARAM wParam, LPARAM lParam)", "parent": 51, "children": [56, 57], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 55}}, {"id": 56, "type": "identifier", "text": "OnInvoke", "parent": 55, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 25}}, {"id": 57, "type": "parameter_list", "text": "(WPARAM wParam, LPARAM lParam)", "parent": 55, "children": [58, 61], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 55}}, {"id": 58, "type": "parameter_declaration", "text": "WPARAM wParam", "parent": 57, "children": [59, 60], "start_point": {"row": 18, "column": 26}, "end_point": {"row": 18, "column": 39}}, {"id": 59, "type": "type_identifier", "text": "WPARAM", "parent": 58, "children": [], "start_point": {"row": 18, "column": 26}, "end_point": {"row": 18, "column": 32}}, {"id": 60, "type": "identifier", "text": "wParam", "parent": 58, "children": [], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 39}}, {"id": 61, "type": "parameter_declaration", "text": "LPARAM lParam", "parent": 57, "children": [62, 63], "start_point": {"row": 18, "column": 41}, "end_point": {"row": 18, "column": 54}}, {"id": 62, "type": "type_identifier", "text": "LPARAM", "parent": 61, "children": [], "start_point": {"row": 18, "column": 41}, "end_point": {"row": 18, "column": 47}}, {"id": 63, "type": "identifier", "text": "lParam", "parent": 61, "children": [], "start_point": {"row": 18, "column": 48}, "end_point": {"row": 18, "column": 54}}, {"id": 64, "type": "call_expression", "text": "DECLARE_MESSAGE_MAP()", "parent": 12, "children": [65, 66], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 22}}, {"id": 65, "type": "identifier", "text": "DECLARE_MESSAGE_MAP", "parent": 64, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 20}}, {"id": 66, "type": "argument_list", "text": "()", "parent": 64, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 22}}, {"id": 67, "type": "labeled_statement", "text": "private:\n\tCRITICAL_SECTION cs;", "parent": 12, "children": [68], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 21}}, {"id": 68, "type": "declaration", "text": "CRITICAL_SECTION cs;", "parent": 67, "children": [69, 70], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 21}}, {"id": 69, "type": "type_identifier", "text": "CRITICAL_SECTION", "parent": 68, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 17}}, {"id": 70, "type": "identifier", "text": "cs", "parent": 68, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 20}}, {"id": 71, "type": "labeled_statement", "text": "public:\n\nprivate:\n\tstd::list<std::function<void(bool)> > _funcList;", "parent": 12, "children": [72], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 26, "column": 49}}, {"id": 72, "type": "labeled_statement", "text": "private:\n\tstd::list<std::function<void(bool)> > _funcList;", "parent": 71, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 49}}, {"id": 73, "type": "binary_expression", "text": "std::list<std::function<void(bool)> > _funcList", "parent": 72, "children": [74, 75, 87, 88], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 48}}, {"id": 74, "type": "identifier", "text": "std", "parent": 73, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 4}}, {"id": 75, "type": "ERROR", "text": "::list<std::function<void(bool)>", "parent": 73, "children": [76, 80, 86], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 36}}, {"id": 76, "type": "binary_expression", "text": "list<std", "parent": 75, "children": [77, 78, 79], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 14}}, {"id": 77, "type": "identifier", "text": "list", "parent": 76, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 10}}, {"id": 78, "type": "<", "text": "<", "parent": 76, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 11}}, {"id": 79, "type": "identifier", "text": "std", "parent": 76, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 14}}, {"id": 80, "type": "binary_expression", "text": "function<void(bool)", "parent": 75, "children": [81, 82], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 35}}, {"id": 81, "type": "<", "text": "<", "parent": 80, "children": [], "start_point": {"row": 26, "column": 24}, "end_point": {"row": 26, "column": 25}}, {"id": 82, "type": "call_expression", "text": "void(bool)", "parent": 80, "children": [83, 84], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 35}}, {"id": 83, "type": "identifier", "text": "void", "parent": 82, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 29}}, {"id": 84, "type": "argument_list", "text": "(bool)", "parent": 82, "children": [85], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 35}}, {"id": 85, "type": "identifier", "text": "bool", "parent": 84, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 34}}, {"id": 86, "type": ">", "text": ">", "parent": 75, "children": [], "start_point": {"row": 26, "column": 35}, "end_point": {"row": 26, "column": 36}}, {"id": 87, "type": ">", "text": ">", "parent": 73, "children": [], "start_point": {"row": 26, "column": 37}, "end_point": {"row": 26, "column": 38}}, {"id": 88, "type": "identifier", "text": "_funcList", "parent": 73, "children": [], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 48}}, {"id": 89, "type": "labeled_statement", "text": "public:\n\tafx_msg void OnDestroy();", "parent": 12, "children": [90], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 26}}, {"id": 90, "type": "declaration", "text": "afx_msg void OnDestroy();", "parent": 89, "children": [91, 92, 94], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 26}}, {"id": 91, "type": "type_identifier", "text": "afx_msg", "parent": 90, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 8}}, {"id": 92, "type": "ERROR", "text": "void", "parent": 90, "children": [93], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 13}}, {"id": 93, "type": "identifier", "text": "void", "parent": 92, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 13}}, {"id": 94, "type": "function_declarator", "text": "OnDestroy()", "parent": 90, "children": [95, 96], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 25}}, {"id": 95, "type": "identifier", "text": "OnDestroy", "parent": 94, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 23}}, {"id": 96, "type": "parameter_list", "text": "()", "parent": 94, "children": [], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 25}}, {"id": 97, "type": "declaration", "text": "afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);", "parent": 12, "children": [98, 99, 101], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 53}}, {"id": 98, "type": "type_identifier", "text": "afx_msg", "parent": 97, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 8}}, {"id": 99, "type": "ERROR", "text": "int", "parent": 97, "children": [100], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 12}}, {"id": 100, "type": "identifier", "text": "int", "parent": 99, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 12}}, {"id": 101, "type": "function_declarator", "text": "OnCreate(LPCREATESTRUCT lpCreateStruct)", "parent": 97, "children": [102, 103], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 52}}, {"id": 102, "type": "identifier", "text": "OnCreate", "parent": 101, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 21}}, {"id": 103, "type": "parameter_list", "text": "(LPCREATESTRUCT lpCreateStruct)", "parent": 101, "children": [104], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 52}}, {"id": 104, "type": "parameter_declaration", "text": "LPCREATESTRUCT lpCreateStruct", "parent": 103, "children": [105, 106], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 51}}, {"id": 105, "type": "type_identifier", "text": "LPCREATESTRUCT", "parent": 104, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 36}}, {"id": 106, "type": "identifier", "text": "lpCreateStruct", "parent": 104, "children": [], "start_point": {"row": 30, "column": 37}, "end_point": {"row": 30, "column": 51}}]}, "node_categories": {"declarations": {"functions": [12, 22, 29, 34, 43, 55, 94, 101], "variables": [16, 25, 32, 38, 41, 45, 51, 58, 61, 68, 90, 97, 104], "classes": [], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [64, 73, 76, 80, 82], "assignments": [], "loops": [], "conditionals": [13, 15, 17, 18, 20, 23, 26, 30, 35, 39, 49, 52, 54, 56, 59, 60, 62, 63, 65, 69, 70, 74, 77, 79, 83, 85, 88, 91, 93, 95, 98, 100, 102, 105, 106], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "Invokable", "text_snippet": "class Invokable : public CWnd\n{\n\tDECLARE_DYNAMIC(Invokable)\n\npublic:\n\tInvokable();\n\tvirtual ~Invokab"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "Invokable()"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "Invokable()"}, {"node_id": 34, "universal_type": "function", "name": "unknown", "text_snippet": "Invoke(const std::function<void(bool)> & f)"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "(bool)"}, {"node_id": 55, "universal_type": "function", "name": "unknown", "text_snippet": "OnInvoke(WPARAM wParam, LPARAM lParam)"}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "OnDestroy()"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "OnCreate(LPCREATESTRUCT lpCreateStruct)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <functional>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <set>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <list>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <functional>\n#include <set>\n#include <list>\n\n// Invokable\n\nclass Invokable : public CWnd\n{\n\tDECLARE_DYNAMIC(Invokable)\n\npublic:\n\tInvokable();\n\tvirtual ~Invokable();\n\tbool Invoke(const std::function<void(bool)> & f);\n\nprotected:\n\tafx_msg LRESULT OnInvoke(WPARAM wParam, LPARAM lParam);\n\tDECLARE_MESSAGE_MAP()\n\nprivate:\n\tCRITICAL_SECTION cs;\npublic:\n\nprivate:\n\tstd::list<std::function<void(bool)> > _funcList;\n\npublic:\n\tafx_msg void OnDestroy();\n\tafx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);\n};\n\n\n"}
80,925
c
/* * Modified from * http://stackoverflow.com/a/11044337/2206385 */ #include <string> #include <algorithm> // find struct Uri { public: std::string QueryString, Path, Protocol, Host, Port; static Uri Parse(const std::string &uri) { Uri result; typedef std::string::const_iterator iterator_t; if (uri.length() == 0) return result; iterator_t uriEnd = uri.end(); // Get query start iterator_t queryStart = std::find(uri.begin(), uriEnd, '?'); // Protocol iterator_t protocolStart = uri.begin(); // "://" iterator_t protocolEnd = std::find(protocolStart, uriEnd, ':'); if (protocolEnd != uriEnd) { std::string prot = &*(protocolEnd); if ((prot.length() > 3) && (prot.substr(0, 3) == "://")) { result.Protocol = std::string(protocolStart, protocolEnd); protocolEnd += 3; // :// } else { // No protocol protocolEnd = uri.begin(); } } else { // No protocol protocolEnd = uri.begin(); } // Host iterator_t hostStart = protocolEnd; // Get pathStart iterator_t pathStart = std::find(hostStart, uriEnd, '/'); // Check for port iterator_t hostEnd = std::find(protocolEnd, (pathStart != uriEnd) ? pathStart : queryStart, ':'); if (!result.Protocol.empty()) { result.Host = std::string(hostStart, hostEnd); } // Port if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) { // We have a port hostEnd++; iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart; result.Port = std::string(hostEnd, portEnd); } // Path if (pathStart != uriEnd) { result.Path = std::string(pathStart, queryStart); } // Query if (queryStart != uriEnd) { result.QueryString = std::string(queryStart, uri.end()); } return result; } };
33.27
62
(translation_unit) "/*\n * Modified from\n * http://stackoverflow.com/a/11044337/2206385\n */\n#include <string>\n#include <algorithm> // find\n\nstruct Uri {\n public:\n std::string QueryString, Path, Protocol, Host, Port;\n\n static Uri Parse(const std::string &uri) {\n Uri result;\n\n typedef std::string::const_iterator iterator_t;\n\n if (uri.length() == 0)\n return result;\n\n iterator_t uriEnd = uri.end();\n\n // Get query start\n iterator_t queryStart = std::find(uri.begin(), uriEnd, '?');\n\n // Protocol\n iterator_t protocolStart = uri.begin();\n // "://"\n iterator_t protocolEnd = std::find(protocolStart, uriEnd, ':');\n\n if (protocolEnd != uriEnd) {\n std::string prot = &*(protocolEnd);\n if ((prot.length() > 3) && (prot.substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) {\n // We have a port\n hostEnd++;\n iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart;\n result.Port = std::string(hostEnd, portEnd);\n }\n // Path\n if (pathStart != uriEnd) {\n result.Path = std::string(pathStart, queryStart);\n }\n // Query\n if (queryStart != uriEnd) {\n result.QueryString = std::string(queryStart, uri.end());\n }\n return result;\n\n }\n};" (comment) "/*\n * Modified from\n * http://stackoverflow.com/a/11044337/2206385\n */" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include <algorithm> // find\n" (#include) "#include" (system_lib_string) "<algorithm>" (comment) "// find" (function_definition) "struct Uri {\n public:\n std::string QueryString, Path, Protocol, Host, Port;\n\n static Uri Parse(const std::string &uri) {\n Uri result;\n\n typedef std::string::const_iterator iterator_t;\n\n if (uri.length() == 0)\n return result;\n\n iterator_t uriEnd = uri.end();\n\n // Get query start\n iterator_t queryStart = std::find(uri.begin(), uriEnd, '?');\n\n // Protocol\n iterator_t protocolStart = uri.begin();\n // "://"\n iterator_t protocolEnd = std::find(protocolStart, uriEnd, ':');\n\n if (protocolEnd != uriEnd) {\n std::string prot = &*(protocolEnd);\n if ((prot.length() > 3) && (prot.substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) {\n // We have a port\n hostEnd++;\n iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart;\n result.Port = std::string(hostEnd, portEnd);\n }\n // Path\n if (pathStart != uriEnd) {\n result.Path = std::string(pathStart, queryStart);\n }" (struct_specifier) "struct Uri {\n public:\n std::string QueryString, Path, Protocol, Host, Port;\n\n static Uri Parse(const std::string &uri) {\n Uri result;\n\n typedef std::string::const_iterator iterator_t;\n\n if (uri.length() == 0)\n return result;\n\n iterator_t uriEnd = uri.end();\n\n // Get query start\n iterator_t queryStart = std::find(uri.begin(), uriEnd, '?');\n\n // Protocol\n iterator_t protocolStart = uri.begin();\n // "://"\n iterator_t protocolEnd = std::find(protocolStart, uriEnd, ':');\n\n if (protocolEnd != uriEnd) {\n std::string prot = &*(protocolEnd);\n if ((prot.length() > 3) && (prot.substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) {\n // We have a port\n hostEnd++;\n iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart;\n result.Port = std::string(hostEnd, portEnd);\n }" (struct) "struct" (type_identifier) "Uri" (field_declaration_list) "{\n public:\n std::string QueryString, Path, Protocol, Host, Port;\n\n static Uri Parse(const std::string &uri) {\n Uri result;\n\n typedef std::string::const_iterator iterator_t;\n\n if (uri.length() == 0)\n return result;\n\n iterator_t uriEnd = uri.end();\n\n // Get query start\n iterator_t queryStart = std::find(uri.begin(), uriEnd, '?');\n\n // Protocol\n iterator_t protocolStart = uri.begin();\n // "://"\n iterator_t protocolEnd = std::find(protocolStart, uriEnd, ':');\n\n if (protocolEnd != uriEnd) {\n std::string prot = &*(protocolEnd);\n if ((prot.length() > 3) && (prot.substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) {\n // We have a port\n hostEnd++;\n iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart;\n result.Port = std::string(hostEnd, portEnd);\n }" ({) "{" (field_declaration) "public:\n std::string QueryString, Path, Protocol, Host, Port;" (type_identifier) "public" (ERROR) ":" (:) ":" (field_identifier) "std" (bitfield_clause) "::string QueryString" (:) ":" (ERROR) ":string" (:) ":" (identifier) "string" (identifier) "QueryString" (,) "," (field_identifier) "Path" (,) "," (field_identifier) "Protocol" (,) "," (field_identifier) "Host" (,) "," (field_identifier) "Port" (;) ";" (field_declaration) "static Uri Parse(const std::string &uri) {\n Uri result;" (storage_class_specifier) "static" (static) "static" (type_identifier) "Uri" (field_identifier) "Parse" (ERROR) "(const std:" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "std" (:) ":" (bitfield_clause) ":string &uri) {\n Uri result" (:) ":" (ERROR) "string &uri) {\n Uri" (binary_expression) "string &uri" (identifier) "string" (&) "&" (identifier) "uri" ()) ")" ({) "{" (identifier) "Uri" (identifier) "result" (;) ";" (field_declaration) "typedef std::string::const_iterator" (type_identifier) "typedef" (field_identifier) "std" (ERROR) "::string:" (:) ":" (bitfield_clause) ":string" (:) ":" (identifier) "string" (:) ":" (bitfield_clause) ":const_iterator" (:) ":" (identifier) "const_iterator" (;) "" (field_declaration) "iterator_t;" (type_identifier) "iterator_t" (;) ";" (field_declaration) "if (uri.length() == 0)\n return result;" (macro_type_specifier) "if (uri.length()" (identifier) "if" (() "(" (type_descriptor) "uri" (type_identifier) "uri" (ERROR) ".length(" (.) "." (identifier) "length" (() "(" ()) ")" (ERROR) "== 0)\n return" (==) "==" (number_literal) "0" ()) ")" (return) "return" (field_identifier) "result" (;) ";" (field_declaration) "iterator_t uriEnd = uri.end();" (type_identifier) "iterator_t" (ERROR) "uriEnd = uri." (field_identifier) "uriEnd" (=) "=" (identifier) "uri" (.) "." (function_declarator) "end()" (field_identifier) "end" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Get query start" (field_declaration) "iterator_t queryStart = std::find(uri.begin(), uriEnd, '?');" (type_identifier) "iterator_t" (field_identifier) "queryStart" (ERROR) "= std:" (=) "=" (identifier) "std" (:) ":" (bitfield_clause) ":find(uri.begin(), uriEnd, '?')" (:) ":" (call_expression) "find(uri.begin(), uriEnd, '?')" (identifier) "find" (argument_list) "(uri.begin(), uriEnd, '?')" (() "(" (call_expression) "uri.begin()" (field_expression) "uri.begin" (identifier) "uri" (.) "." (field_identifier) "begin" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "uriEnd" (,) "," (char_literal) "'?'" (') "'" (character) "?" (') "'" ()) ")" (;) ";" (comment) "// Protocol" (field_declaration) "iterator_t protocolStart = uri.begin();" (type_identifier) "iterator_t" (ERROR) "protocolStart = uri." (field_identifier) "protocolStart" (=) "=" (identifier) "uri" (.) "." (function_declarator) "begin()" (field_identifier) "begin" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// "://"" (field_declaration) "iterator_t protocolEnd = std::find(protocolStart, uriEnd, ':');" (type_identifier) "iterator_t" (field_identifier) "protocolEnd" (ERROR) "= std:" (=) "=" (identifier) "std" (:) ":" (bitfield_clause) ":find(protocolStart, uriEnd, ':')" (:) ":" (call_expression) "find(protocolStart, uriEnd, ':')" (identifier) "find" (argument_list) "(protocolStart, uriEnd, ':')" (() "(" (identifier) "protocolStart" (,) "," (identifier) "uriEnd" (,) "," (char_literal) "':'" (') "'" (character) ":" (') "'" ()) ")" (;) ";" (field_declaration) "if (protocolEnd != uriEnd) {\n std::string prot = &*(protocolEnd);" (macro_type_specifier) "if (protocolEnd != uriEnd)" (identifier) "if" (() "(" (type_descriptor) "protocolEnd" (type_identifier) "protocolEnd" (ERROR) "!= uriEnd" (!=) "!=" (identifier) "uriEnd" ()) ")" (ERROR) "{" ({) "{" (field_identifier) "std" (bitfield_clause) "::string prot = &*(protocolEnd)" (:) ":" (ERROR) ":string" (:) ":" (identifier) "string" (assignment_expression) "prot = &*(protocolEnd)" (identifier) "prot" (=) "=" (pointer_expression) "&*(protocolEnd)" (&) "&" (pointer_expression) "*(protocolEnd)" (*) "*" (parenthesized_expression) "(protocolEnd)" (() "(" (identifier) "protocolEnd" ()) ")" (;) ";" (field_declaration) "if ((prot.length() > 3) && (prot.substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) {\n // We have a port\n hostEnd++;" (type_identifier) "if" (parenthesized_declarator) "((prot.length() > 3) && (prot.substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')" (() "(" (array_declarator) "(prot.length() > 3) && (prot.substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0]" (function_declarator) "(prot.length() > 3) && (prot.substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))" (parenthesized_declarator) "(prot.length() > 3)" (() "(" (ERROR) "prot." (field_identifier) "prot" (.) "." (function_declarator) "length()" (field_identifier) "length" (parameter_list) "()" (() "(" ()) ")" (ERROR) "> 3" (>) ">" (number_literal) "3" ()) ")" (ERROR) "&&" (&&) "&&" (parameter_list) "(prot.substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))" (() "(" (parameter_declaration) "prot.substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd)" (type_identifier) "prot" (ERROR) "." (.) "." (function_declarator) "substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd)" (function_declarator) "substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd)" (function_declarator) "substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd)" (function_declarator) "substr(0, 3) == "://")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':')" (identifier) "substr" (parameter_list) "(0, 3)" (() "(" (ERROR) "0, 3" (number_literal) "0" (,) "," (number_literal) "3" ()) ")" (ERROR) "== ":" (==) "==" (") """ (:) ":" (comment) "//")) {" (identifier) "result" (ERROR) "." (.) "." (identifier) "Protocol" (ERROR) "=" (=) "=" (identifier) "std" (ERROR) "::" (:) ":" (:) ":" (call_expression) "string(protocolStart, protocolEnd)" (identifier) "string" (argument_list) "(protocolStart, protocolEnd)" (() "(" (identifier) "protocolStart" (,) "," (identifier) "protocolEnd" ()) ")" (ERROR) ";" (;) ";" (identifier) "protocolEnd" (ERROR) "+= 3; // ://\n } else {" (+=) "+=" (number_literal) "3" (;) ";" (comment) "// ://" (}) "}" (else) "else" ({) "{" (comment) "// No protocol" (identifier) "protocolEnd" (ERROR) "=" (=) "=" (identifier) "uri" (ERROR) "." (.) "." (call_expression) "begin()" (identifier) "begin" (argument_list) "()" (() "(" ()) ")" (ERROR) ";\n }\n } else {" (;) ";" (}) "}" (}) "}" (else) "else" ({) "{" (comment) "// No protocol" (identifier) "protocolEnd" (ERROR) "=" (=) "=" (identifier) "uri" (ERROR) "." (.) "." (call_expression) "begin()" (identifier) "begin" (argument_list) "()" (() "(" ()) ")" (ERROR) ";\n }" (;) ";" (}) "}" (comment) "// Host" (identifier) "iterator_t" (identifier) "hostStart" (ERROR) "=" (=) "=" (identifier) "protocolEnd" (ERROR) ";" (;) ";" (comment) "// Get pathStart" (identifier) "iterator_t" (identifier) "pathStart" (ERROR) "=" (=) "=" (identifier) "std" (ERROR) "::" (:) ":" (:) ":" (call_expression) "find(hostStart, uriEnd, '/')" (identifier) "find" (argument_list) "(hostStart, uriEnd, '/')" (() "(" (identifier) "hostStart" (,) "," (identifier) "uriEnd" (,) "," (char_literal) "'/'" (') "'" (character) "/" (') "'" ()) ")" (ERROR) ";" (;) ";" (comment) "// Check for port" (identifier) "iterator_t" (identifier) "hostEnd" (ERROR) "=" (=) "=" (identifier) "std" (ERROR) "::" (:) ":" (:) ":" (call_expression) "find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':')" (identifier) "find" (argument_list) "(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':')" (() "(" (identifier) "protocolEnd" (,) "," (parenthesized_expression) "(pathStart != uriEnd)" (() "(" (binary_expression) "pathStart != uriEnd" (identifier) "pathStart" (!=) "!=" (identifier) "uriEnd" ()) ")" (ERROR) "? pathStart : queryStart" (?) "?" (identifier) "pathStart" (:) ":" (identifier) "queryStart" (,) "," (char_literal) "':'" (') "'" (character) ":" (') "'" ()) ")" (ERROR) ";\n\n if" (;) ";" (if) "if" (parameter_list) "(!result.Protocol.empty())" (() "(" (ERROR) "!" (!) "!" (parameter_declaration) "result.Protocol.empty()" (type_identifier) "result" (ERROR) ".Protocol." (.) "." (identifier) "Protocol" (.) "." (function_declarator) "empty()" (identifier) "empty" (parameter_list) "()" (() "(" ()) ")" ()) ")" (ERROR) "{" ({) "{" (identifier) "result" (ERROR) "." (.) "." (identifier) "Host" (ERROR) "=" (=) "=" (identifier) "std" (ERROR) "::" (:) ":" (:) ":" (call_expression) "string(hostStart, hostEnd)" (identifier) "string" (argument_list) "(hostStart, hostEnd)" (() "(" (identifier) "hostStart" (,) "," (identifier) "hostEnd" ()) ")" (ERROR) ";\n }\n // Port\n if (" (;) ";" (}) "}" (comment) "// Port" (if) "if" (() "(" (parameter_list) "(hostEnd != uriEnd)" (() "(" (parameter_declaration) "hostEnd != uriEnd" (type_identifier) "hostEnd" (ERROR) "!=" (!=) "!=" (identifier) "uriEnd" ()) ")" (ERROR) "&&" (&&) "&&" (parameter_list) "((&*(hostEnd)" (() "(" (ERROR) "(&*(" (() "(" (&) "&" (*) "*" (() "(" (parameter_declaration) "hostEnd" (type_identifier) "hostEnd" ()) ")" ()) ")" ([) "[" (number_literal) "0" (]) "]" (ERROR) "== ':'" (==) "==" (') "'" (:) ":" (') "'" ()) ")" (ERROR) ") {\n // We have a port\n hostEnd++" ()) ")" ({) "{" (comment) "// We have a port" (identifier) "hostEnd" (++) "++" (;) ";" (field_declaration) "iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart;" (type_identifier) "iterator_t" (function_declarator) "portEnd = (pathStart != uriEnd)" (field_identifier) "portEnd" (ERROR) "=" (=) "=" (parameter_list) "(pathStart != uriEnd)" (() "(" (parameter_declaration) "pathStart != uriEnd" (type_identifier) "pathStart" (ERROR) "!=" (!=) "!=" (identifier) "uriEnd" ()) ")" (ERROR) "? pathStart" (?) "?" (identifier) "pathStart" (bitfield_clause) ": queryStart" (:) ":" (identifier) "queryStart" (;) ";" (field_declaration) "result.Port = std::string(hostEnd, portEnd);" (type_identifier) "result" (ERROR) ".Port =" (.) "." (field_identifier) "Port" (=) "=" (field_identifier) "std" (ERROR) ":" (:) ":" (bitfield_clause) ":string(hostEnd, portEnd)" (:) ":" (call_expression) "string(hostEnd, portEnd)" (identifier) "string" (argument_list) "(hostEnd, portEnd)" (() "(" (identifier) "hostEnd" (,) "," (identifier) "portEnd" ()) ")" (;) ";" (}) "}" (comment) "// Path" (function_declarator) "if (pathStart != uriEnd)" (identifier) "if" (parameter_list) "(pathStart != uriEnd)" (() "(" (parameter_declaration) "pathStart != uriEnd" (type_identifier) "pathStart" (ERROR) "!=" (!=) "!=" (identifier) "uriEnd" ()) ")" (compound_statement) "{\n result.Path = std::string(pathStart, queryStart);\n }" ({) "{" (ERROR) "result.Path = std::" (assignment_expression) "result.Path = std" (field_expression) "result.Path" (identifier) "result" (.) "." (field_identifier) "Path" (=) "=" (identifier) "std" (:) ":" (:) ":" (expression_statement) "string(pathStart, queryStart);" (call_expression) "string(pathStart, queryStart)" (identifier) "string" (argument_list) "(pathStart, queryStart)" (() "(" (identifier) "pathStart" (,) "," (identifier) "queryStart" ()) ")" (;) ";" (}) "}" (comment) "// Query" (if_statement) "if (queryStart != uriEnd) {\n result.QueryString = std::string(queryStart, uri.end());\n }" (if) "if" (parenthesized_expression) "(queryStart != uriEnd)" (() "(" (binary_expression) "queryStart != uriEnd" (identifier) "queryStart" (!=) "!=" (identifier) "uriEnd" ()) ")" (compound_statement) "{\n result.QueryString = std::string(queryStart, uri.end());\n }" ({) "{" (ERROR) "result.QueryString = std::" (assignment_expression) "result.QueryString = std" (field_expression) "result.QueryString" (identifier) "result" (.) "." (field_identifier) "QueryString" (=) "=" (identifier) "std" (:) ":" (:) ":" (expression_statement) "string(queryStart, uri.end());" (call_expression) "string(queryStart, uri.end())" (identifier) "string" (argument_list) "(queryStart, uri.end())" (() "(" (identifier) "queryStart" (,) "," (call_expression) "uri.end()" (field_expression) "uri.end" (identifier) "uri" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (return_statement) "return result;" (return) "return" (identifier) "result" (;) ";" (ERROR) "}\n}" (}) "}" (}) "}" (expression_statement) ";" (;) ";"
583
61
{"language": "c", "success": true, "metadata": {"lines": 62, "avg_line_length": 33.27, "nodes": 333, "errors": 0, "source_hash": "da0f69a3c370e1db2e499ce3e85c252ffb759da0f0ce8ed88a3e346f186f69ae", "categorized_nodes": 212}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <string>\n", "parent": null, "children": [1, 2], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<string>", "parent": 0, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 17}}, {"id": 3, "type": "preproc_include", "text": "#include <algorithm> // find\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": "system_lib_string", "text": "<algorithm>", "parent": 3, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 20}}, {"id": 6, "type": "function_definition", "text": "struct Uri {\n public:\n std::string QueryString, Path, Protocol, Host, Port;\n\n static Uri Parse(const std::string &uri) {\n Uri result;\n\n typedef std::string::const_iterator iterator_t;\n\n if (uri.length() == 0)\n return result;\n\n iterator_t uriEnd = uri.end();\n\n // Get query start\n iterator_t queryStart = std::find(uri.begin(), uriEnd, '?');\n\n // Protocol\n iterator_t protocolStart = uri.begin();\n // \"://\"\n iterator_t protocolEnd = std::find(protocolStart, uriEnd, ':');\n\n if (protocolEnd != uriEnd) {\n std::string prot = &*(protocolEnd);\n if ((prot.length() > 3) && (prot.substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) {\n // We have a port\n hostEnd++;\n iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart;\n result.Port = std::string(hostEnd, portEnd);\n }\n // Path\n if (pathStart != uriEnd) {\n result.Path = std::string(pathStart, queryStart);\n }", "parent": null, "children": [7, 290], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 64, "column": 9}}, {"id": 7, "type": "struct_specifier", "text": "struct Uri {\n public:\n std::string QueryString, Path, Protocol, Host, Port;\n\n static Uri Parse(const std::string &uri) {\n Uri result;\n\n typedef std::string::const_iterator iterator_t;\n\n if (uri.length() == 0)\n return result;\n\n iterator_t uriEnd = uri.end();\n\n // Get query start\n iterator_t queryStart = std::find(uri.begin(), uriEnd, '?');\n\n // Protocol\n iterator_t protocolStart = uri.begin();\n // \"://\"\n iterator_t protocolEnd = std::find(protocolStart, uriEnd, ':');\n\n if (protocolEnd != uriEnd) {\n std::string prot = &*(protocolEnd);\n if ((prot.length() > 3) && (prot.substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) {\n // We have a port\n hostEnd++;\n iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart;\n result.Port = std::string(hostEnd, portEnd);\n }", "parent": 6, "children": [8, 9], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 60, "column": 9}}, {"id": 8, "type": "struct", "text": "struct", "parent": 7, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 6}}, {"id": 9, "type": "type_identifier", "text": "Uri", "parent": 7, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 10}}, {"id": 10, "type": "field_declaration", "text": "public:\n std::string QueryString, Path, Protocol, Host, Port;", "parent": 7, "children": [11, 12, 16, 17, 18, 19], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 9, "column": 60}}, {"id": 11, "type": "field_identifier", "text": "std", "parent": 10, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 11}}, {"id": 12, "type": "bitfield_clause", "text": "::string QueryString", "parent": 10, "children": [13, 15], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 31}}, {"id": 13, "type": "ERROR", "text": ":string", "parent": 12, "children": [14], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 19}}, {"id": 14, "type": "identifier", "text": "string", "parent": 13, "children": [], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 19}}, {"id": 15, "type": "identifier", "text": "QueryString", "parent": 12, "children": [], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 31}}, {"id": 16, "type": "field_identifier", "text": "Path", "parent": 10, "children": [], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 37}}, {"id": 17, "type": "field_identifier", "text": "Protocol", "parent": 10, "children": [], "start_point": {"row": 9, "column": 39}, "end_point": {"row": 9, "column": 47}}, {"id": 18, "type": "field_identifier", "text": "Host", "parent": 10, "children": [], "start_point": {"row": 9, "column": 49}, "end_point": {"row": 9, "column": 53}}, {"id": 19, "type": "field_identifier", "text": "Port", "parent": 10, "children": [], "start_point": {"row": 9, "column": 55}, "end_point": {"row": 9, "column": 59}}, {"id": 20, "type": "field_declaration", "text": "static Uri Parse(const std::string &uri) {\n Uri result;", "parent": 7, "children": [21, 22, 23, 25], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 12, "column": 19}}, {"id": 21, "type": "type_identifier", "text": "Uri", "parent": 20, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 14}}, {"id": 22, "type": "field_identifier", "text": "Parse", "parent": 20, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 20}}, {"id": 23, "type": "ERROR", "text": "(const std:", "parent": 20, "children": [24], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 31}}, {"id": 24, "type": "type_identifier", "text": "std", "parent": 23, "children": [], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 30}}, {"id": 25, "type": "bitfield_clause", "text": ":string &uri) {\n Uri result", "parent": 20, "children": [26, 31], "start_point": {"row": 11, "column": 31}, "end_point": {"row": 12, "column": 18}}, {"id": 26, "type": "ERROR", "text": "string &uri) {\n Uri", "parent": 25, "children": [27, 30], "start_point": {"row": 11, "column": 32}, "end_point": {"row": 12, "column": 11}}, {"id": 27, "type": "binary_expression", "text": "string &uri", "parent": 26, "children": [28, 29], "start_point": {"row": 11, "column": 32}, "end_point": {"row": 11, "column": 43}}, {"id": 28, "type": "identifier", "text": "string", "parent": 27, "children": [], "start_point": {"row": 11, "column": 32}, "end_point": {"row": 11, "column": 38}}, {"id": 29, "type": "identifier", "text": "uri", "parent": 27, "children": [], "start_point": {"row": 11, "column": 40}, "end_point": {"row": 11, "column": 43}}, {"id": 30, "type": "identifier", "text": "Uri", "parent": 26, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 11}}, {"id": 31, "type": "identifier", "text": "result", "parent": 25, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 18}}, {"id": 32, "type": "field_declaration", "text": "typedef std::string::const_iterator", "parent": 7, "children": [33, 34, 35, 38], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 43}}, {"id": 33, "type": "type_identifier", "text": "typedef", "parent": 32, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 15}}, {"id": 34, "type": "field_identifier", "text": "std", "parent": 32, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 19}}, {"id": 35, "type": "ERROR", "text": "::string:", "parent": 32, "children": [36], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 28}}, {"id": 36, "type": "bitfield_clause", "text": ":string", "parent": 35, "children": [37], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 27}}, {"id": 37, "type": "identifier", "text": "string", "parent": 36, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 27}}, {"id": 38, "type": "bitfield_clause", "text": ":const_iterator", "parent": 32, "children": [39], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 43}}, {"id": 39, "type": "identifier", "text": "const_iterator", "parent": 38, "children": [], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 43}}, {"id": 40, "type": "field_declaration", "text": "iterator_t;", "parent": 7, "children": [41], "start_point": {"row": 14, "column": 44}, "end_point": {"row": 14, "column": 55}}, {"id": 41, "type": "type_identifier", "text": "iterator_t", "parent": 40, "children": [], "start_point": {"row": 14, "column": 44}, "end_point": {"row": 14, "column": 54}}, {"id": 42, "type": "field_declaration", "text": "if (uri.length() == 0)\n return result;", "parent": 7, "children": [43, 48, 51], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 17, "column": 26}}, {"id": 43, "type": "macro_type_specifier", "text": "if (uri.length()", "parent": 42, "children": [44, 46], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 24}}, {"id": 44, "type": "type_descriptor", "text": "uri", "parent": 43, "children": [45], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 15}}, {"id": 45, "type": "type_identifier", "text": "uri", "parent": 44, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 15}}, {"id": 46, "type": "ERROR", "text": ".length(", "parent": 43, "children": [47], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 23}}, {"id": 47, "type": "identifier", "text": "length", "parent": 46, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 22}}, {"id": 48, "type": "ERROR", "text": "== 0)\n return", "parent": 42, "children": [49, 50], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 17, "column": 18}}, {"id": 49, "type": "==", "text": "==", "parent": 48, "children": [], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 27}}, {"id": 50, "type": "number_literal", "text": "0", "parent": 48, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 29}}, {"id": 51, "type": "field_identifier", "text": "result", "parent": 42, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 25}}, {"id": 52, "type": "field_declaration", "text": "iterator_t uriEnd = uri.end();", "parent": 7, "children": [53, 54, 58], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 38}}, {"id": 53, "type": "type_identifier", "text": "iterator_t", "parent": 52, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 18}}, {"id": 54, "type": "ERROR", "text": "uriEnd = uri.", "parent": 52, "children": [55, 56, 57], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 32}}, {"id": 55, "type": "field_identifier", "text": "uriEnd", "parent": 54, "children": [], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 25}}, {"id": 56, "type": "=", "text": "=", "parent": 54, "children": [], "start_point": {"row": 19, "column": 26}, "end_point": {"row": 19, "column": 27}}, {"id": 57, "type": "identifier", "text": "uri", "parent": 54, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 31}}, {"id": 58, "type": "function_declarator", "text": "end()", "parent": 52, "children": [59], "start_point": {"row": 19, "column": 32}, "end_point": {"row": 19, "column": 37}}, {"id": 59, "type": "parameter_list", "text": "()", "parent": 58, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 37}}, {"id": 60, "type": "field_declaration", "text": "iterator_t queryStart = std::find(uri.begin(), uriEnd, '?');", "parent": 7, "children": [61, 62, 63, 66], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 68}}, {"id": 61, "type": "type_identifier", "text": "iterator_t", "parent": 60, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 18}}, {"id": 62, "type": "field_identifier", "text": "queryStart", "parent": 60, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 29}}, {"id": 63, "type": "ERROR", "text": "= std:", "parent": 60, "children": [64, 65], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 36}}, {"id": 64, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 31}}, {"id": 65, "type": "identifier", "text": "std", "parent": 63, "children": [], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 35}}, {"id": 66, "type": "bitfield_clause", "text": ":find(uri.begin(), uriEnd, '?')", "parent": 60, "children": [67], "start_point": {"row": 22, "column": 36}, "end_point": {"row": 22, "column": 67}}, {"id": 67, "type": "call_expression", "text": "find(uri.begin(), uriEnd, '?')", "parent": 66, "children": [68, 69], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 67}}, {"id": 68, "type": "identifier", "text": "find", "parent": 67, "children": [], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 41}}, {"id": 69, "type": "argument_list", "text": "(uri.begin(), uriEnd, '?')", "parent": 67, "children": [70, 74, 75], "start_point": {"row": 22, "column": 41}, "end_point": {"row": 22, "column": 67}}, {"id": 70, "type": "call_expression", "text": "uri.begin()", "parent": 69, "children": [71, 73], "start_point": {"row": 22, "column": 42}, "end_point": {"row": 22, "column": 53}}, {"id": 71, "type": "field_expression", "text": "uri.begin", "parent": 70, "children": [72], "start_point": {"row": 22, "column": 42}, "end_point": {"row": 22, "column": 51}}, {"id": 72, "type": "identifier", "text": "uri", "parent": 71, "children": [], "start_point": {"row": 22, "column": 42}, "end_point": {"row": 22, "column": 45}}, {"id": 73, "type": "argument_list", "text": "()", "parent": 70, "children": [], "start_point": {"row": 22, "column": 51}, "end_point": {"row": 22, "column": 53}}, {"id": 74, "type": "identifier", "text": "uriEnd", "parent": 69, "children": [], "start_point": {"row": 22, "column": 55}, "end_point": {"row": 22, "column": 61}}, {"id": 75, "type": "char_literal", "text": "'?'", "parent": 69, "children": [76, 77, 78], "start_point": {"row": 22, "column": 63}, "end_point": {"row": 22, "column": 66}}, {"id": 76, "type": "'", "text": "'", "parent": 75, "children": [], "start_point": {"row": 22, "column": 63}, "end_point": {"row": 22, "column": 64}}, {"id": 77, "type": "character", "text": "?", "parent": 75, "children": [], "start_point": {"row": 22, "column": 64}, "end_point": {"row": 22, "column": 65}}, {"id": 78, "type": "'", "text": "'", "parent": 75, "children": [], "start_point": {"row": 22, "column": 65}, "end_point": {"row": 22, "column": 66}}, {"id": 79, "type": "field_declaration", "text": "iterator_t protocolStart = uri.begin();", "parent": 7, "children": [80, 81, 85], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 47}}, {"id": 80, "type": "type_identifier", "text": "iterator_t", "parent": 79, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 18}}, {"id": 81, "type": "ERROR", "text": "protocolStart = uri.", "parent": 79, "children": [82, 83, 84], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 39}}, {"id": 82, "type": "field_identifier", "text": "protocolStart", "parent": 81, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 32}}, {"id": 83, "type": "=", "text": "=", "parent": 81, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 34}}, {"id": 84, "type": "identifier", "text": "uri", "parent": 81, "children": [], "start_point": {"row": 25, "column": 35}, "end_point": {"row": 25, "column": 38}}, {"id": 85, "type": "function_declarator", "text": "begin()", "parent": 79, "children": [86], "start_point": {"row": 25, "column": 39}, "end_point": {"row": 25, "column": 46}}, {"id": 86, "type": "parameter_list", "text": "()", "parent": 85, "children": [], "start_point": {"row": 25, "column": 44}, "end_point": {"row": 25, "column": 46}}, {"id": 87, "type": "field_declaration", "text": "iterator_t protocolEnd = std::find(protocolStart, uriEnd, ':');", "parent": 7, "children": [88, 89, 90, 93], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 71}}, {"id": 88, "type": "type_identifier", "text": "iterator_t", "parent": 87, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 18}}, {"id": 89, "type": "field_identifier", "text": "protocolEnd", "parent": 87, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 30}}, {"id": 90, "type": "ERROR", "text": "= std:", "parent": 87, "children": [91, 92], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 37}}, {"id": 91, "type": "=", "text": "=", "parent": 90, "children": [], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 32}}, {"id": 92, "type": "identifier", "text": "std", "parent": 90, "children": [], "start_point": {"row": 27, "column": 33}, "end_point": {"row": 27, "column": 36}}, {"id": 93, "type": "bitfield_clause", "text": ":find(protocolStart, uriEnd, ':')", "parent": 87, "children": [94], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 27, "column": 70}}, {"id": 94, "type": "call_expression", "text": "find(protocolStart, uriEnd, ':')", "parent": 93, "children": [95, 96], "start_point": {"row": 27, "column": 38}, "end_point": {"row": 27, "column": 70}}, {"id": 95, "type": "identifier", "text": "find", "parent": 94, "children": [], "start_point": {"row": 27, "column": 38}, "end_point": {"row": 27, "column": 42}}, {"id": 96, "type": "argument_list", "text": "(protocolStart, uriEnd, ':')", "parent": 94, "children": [97, 98, 99], "start_point": {"row": 27, "column": 42}, "end_point": {"row": 27, "column": 70}}, {"id": 97, "type": "identifier", "text": "protocolStart", "parent": 96, "children": [], "start_point": {"row": 27, "column": 43}, "end_point": {"row": 27, "column": 56}}, {"id": 98, "type": "identifier", "text": "uriEnd", "parent": 96, "children": [], "start_point": {"row": 27, "column": 58}, "end_point": {"row": 27, "column": 64}}, {"id": 99, "type": "char_literal", "text": "':'", "parent": 96, "children": [100, 101], "start_point": {"row": 27, "column": 66}, "end_point": {"row": 27, "column": 69}}, {"id": 100, "type": "'", "text": "'", "parent": 99, "children": [], "start_point": {"row": 27, "column": 66}, "end_point": {"row": 27, "column": 67}}, {"id": 101, "type": "'", "text": "'", "parent": 99, "children": [], "start_point": {"row": 27, "column": 68}, "end_point": {"row": 27, "column": 69}}, {"id": 102, "type": "field_declaration", "text": "if (protocolEnd != uriEnd) {\n std::string prot = &*(protocolEnd);", "parent": 7, "children": [103, 109, 110], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 30, "column": 47}}, {"id": 103, "type": "macro_type_specifier", "text": "if (protocolEnd != uriEnd)", "parent": 102, "children": [104, 106], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 34}}, {"id": 104, "type": "type_descriptor", "text": "protocolEnd", "parent": 103, "children": [105], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 23}}, {"id": 105, "type": "type_identifier", "text": "protocolEnd", "parent": 104, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 23}}, {"id": 106, "type": "ERROR", "text": "!= uriEnd", "parent": 103, "children": [107, 108], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 33}}, {"id": 107, "type": "!=", "text": "!=", "parent": 106, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 26}}, {"id": 108, "type": "identifier", "text": "uriEnd", "parent": 106, "children": [], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 33}}, {"id": 109, "type": "field_identifier", "text": "std", "parent": 102, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 15}}, {"id": 110, "type": "bitfield_clause", "text": "::string prot = &*(protocolEnd)", "parent": 102, "children": [111, 113], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 46}}, {"id": 111, "type": "ERROR", "text": ":string", "parent": 110, "children": [112], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 23}}, {"id": 112, "type": "identifier", "text": "string", "parent": 111, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 23}}, {"id": 113, "type": "assignment_expression", "text": "prot = &*(protocolEnd)", "parent": 110, "children": [114, 115, 116], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 46}}, {"id": 114, "type": "identifier", "text": "prot", "parent": 113, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 28}}, {"id": 115, "type": "=", "text": "=", "parent": 113, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 30}}, {"id": 116, "type": "pointer_expression", "text": "&*(protocolEnd)", "parent": 113, "children": [117], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 46}}, {"id": 117, "type": "pointer_expression", "text": "*(protocolEnd)", "parent": 116, "children": [118, 119], "start_point": {"row": 30, "column": 32}, "end_point": {"row": 30, "column": 46}}, {"id": 118, "type": "*", "text": "*", "parent": 117, "children": [], "start_point": {"row": 30, "column": 32}, "end_point": {"row": 30, "column": 33}}, {"id": 119, "type": "parenthesized_expression", "text": "(protocolEnd)", "parent": 117, "children": [120], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 46}}, {"id": 120, "type": "identifier", "text": "protocolEnd", "parent": 119, "children": [], "start_point": {"row": 30, "column": 34}, "end_point": {"row": 30, "column": 45}}, {"id": 121, "type": "field_declaration", "text": "if ((prot.length() > 3) && (prot.substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) {\n // We have a port\n hostEnd++;", "parent": 7, "children": [122, 258], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 57, "column": 22}}, {"id": 122, "type": "parenthesized_declarator", "text": "((prot.length() > 3) && (prot.substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')", "parent": 121, "children": [123, 254], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 55, "column": 60}}, {"id": 123, "type": "array_declarator", "text": "(prot.length() > 3) && (prot.substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0]", "parent": 122, "children": [124, 253], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 55, "column": 52}}, {"id": 124, "type": "function_declarator", "text": "(prot.length() > 3) && (prot.substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))", "parent": 123, "children": [125, 134, 136], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 55, "column": 49}}, {"id": 125, "type": "parenthesized_declarator", "text": "(prot.length() > 3)", "parent": 124, "children": [126, 128, 131], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 35}}, {"id": 126, "type": "ERROR", "text": "prot.", "parent": 125, "children": [127], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 22}}, {"id": 127, "type": "field_identifier", "text": "prot", "parent": 126, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 21}}, {"id": 128, "type": "function_declarator", "text": "length()", "parent": 125, "children": [129, 130], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 30}}, {"id": 129, "type": "field_identifier", "text": "length", "parent": 128, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 28}}, {"id": 130, "type": "parameter_list", "text": "()", "parent": 128, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 30}}, {"id": 131, "type": "ERROR", "text": "> 3", "parent": 125, "children": [132, 133], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 34}}, {"id": 132, "type": ">", "text": ">", "parent": 131, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 32}}, {"id": 133, "type": "number_literal", "text": "3", "parent": 131, "children": [], "start_point": {"row": 31, "column": 33}, "end_point": {"row": 31, "column": 34}}, {"id": 134, "type": "ERROR", "text": "&&", "parent": 124, "children": [135], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 38}}, {"id": 135, "type": "&&", "text": "&&", "parent": 134, "children": [], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 38}}, {"id": 136, "type": "parameter_list", "text": "(prot.substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))", "parent": 124, "children": [137], "start_point": {"row": 31, "column": 39}, "end_point": {"row": 55, "column": 49}}, {"id": 137, "type": "parameter_declaration", "text": "prot.substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd)", "parent": 136, "children": [138, 139], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 55, "column": 48}}, {"id": 138, "type": "type_identifier", "text": "prot", "parent": 137, "children": [], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 44}}, {"id": 139, "type": "function_declarator", "text": "substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd)", "parent": 137, "children": [140, 246, 248], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 55, "column": 48}}, {"id": 140, "type": "function_declarator", "text": "substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd)", "parent": 139, "children": [141, 239, 240], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 55, "column": 31}}, {"id": 141, "type": "function_declarator", "text": "substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd)", "parent": 140, "children": [142, 218, 219, 229, 230, 231, 233, 234], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 52, "column": 57}}, {"id": 142, "type": "function_declarator", "text": "substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':')", "parent": 141, "children": [143, 144, 148, 150, 151, 152, 154, 155, 160, 161, 164, 165, 167, 168, 170, 171, 172, 174, 175, 177, 178, 179, 180, 182, 183, 184, 185, 187, 188, 197, 198, 199, 201, 202], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 49, "column": 64}}, {"id": 143, "type": "identifier", "text": "substr", "parent": 142, "children": [], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 31, "column": 51}}, {"id": 144, "type": "parameter_list", "text": "(0, 3)", "parent": 142, "children": [145], "start_point": {"row": 31, "column": 51}, "end_point": {"row": 31, "column": 57}}, {"id": 145, "type": "ERROR", "text": "0, 3", "parent": 144, "children": [146, 147], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 56}}, {"id": 146, "type": "number_literal", "text": "0", "parent": 145, "children": [], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 53}}, {"id": 147, "type": "number_literal", "text": "3", "parent": 145, "children": [], "start_point": {"row": 31, "column": 55}, "end_point": {"row": 31, "column": 56}}, {"id": 148, "type": "ERROR", "text": "== \":", "parent": 142, "children": [149], "start_point": {"row": 31, "column": 58}, "end_point": {"row": 31, "column": 63}}, {"id": 149, "type": "==", "text": "==", "parent": 148, "children": [], "start_point": {"row": 31, "column": 58}, "end_point": {"row": 31, "column": 60}}, {"id": 150, "type": "identifier", "text": "result", "parent": 142, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 22}}, {"id": 151, "type": "identifier", "text": "Protocol", "parent": 142, "children": [], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 31}}, {"id": 152, "type": "ERROR", "text": "=", "parent": 142, "children": [153], "start_point": {"row": 32, "column": 32}, "end_point": {"row": 32, "column": 33}}, {"id": 153, "type": "=", "text": "=", "parent": 152, "children": [], "start_point": {"row": 32, "column": 32}, "end_point": {"row": 32, "column": 33}}, {"id": 154, "type": "identifier", "text": "std", "parent": 142, "children": [], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 37}}, {"id": 155, "type": "call_expression", "text": "string(protocolStart, protocolEnd)", "parent": 142, "children": [156, 157], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 73}}, {"id": 156, "type": "identifier", "text": "string", "parent": 155, "children": [], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 45}}, {"id": 157, "type": "argument_list", "text": "(protocolStart, protocolEnd)", "parent": 155, "children": [158, 159], "start_point": {"row": 32, "column": 45}, "end_point": {"row": 32, "column": 73}}, {"id": 158, "type": "identifier", "text": "protocolStart", "parent": 157, "children": [], "start_point": {"row": 32, "column": 46}, "end_point": {"row": 32, "column": 59}}, {"id": 159, "type": "identifier", "text": "protocolEnd", "parent": 157, "children": [], "start_point": {"row": 32, "column": 61}, "end_point": {"row": 32, "column": 72}}, {"id": 160, "type": "identifier", "text": "protocolEnd", "parent": 142, "children": [], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 27}}, {"id": 161, "type": "ERROR", "text": "+= 3; // ://\n } else {", "parent": 142, "children": [162, 163], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 34, "column": 20}}, {"id": 162, "type": "+=", "text": "+=", "parent": 161, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 30}}, {"id": 163, "type": "number_literal", "text": "3", "parent": 161, "children": [], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 32}}, {"id": 164, "type": "identifier", "text": "protocolEnd", "parent": 142, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 27}}, {"id": 165, "type": "ERROR", "text": "=", "parent": 142, "children": [166], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 29}}, {"id": 166, "type": "=", "text": "=", "parent": 165, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 29}}, {"id": 167, "type": "identifier", "text": "uri", "parent": 142, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 33}}, {"id": 168, "type": "call_expression", "text": "begin()", "parent": 142, "children": [169], "start_point": {"row": 36, "column": 34}, "end_point": {"row": 36, "column": 41}}, {"id": 169, "type": "argument_list", "text": "()", "parent": 168, "children": [], "start_point": {"row": 36, "column": 39}, "end_point": {"row": 36, "column": 41}}, {"id": 170, "type": "ERROR", "text": ";\n }\n } else {", "parent": 142, "children": [], "start_point": {"row": 36, "column": 41}, "end_point": {"row": 38, "column": 16}}, {"id": 171, "type": "identifier", "text": "protocolEnd", "parent": 142, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 23}}, {"id": 172, "type": "ERROR", "text": "=", "parent": 142, "children": [173], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 25}}, {"id": 173, "type": "=", "text": "=", "parent": 172, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 25}}, {"id": 174, "type": "identifier", "text": "uri", "parent": 142, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 29}}, {"id": 175, "type": "call_expression", "text": "begin()", "parent": 142, "children": [176], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 37}}, {"id": 176, "type": "argument_list", "text": "()", "parent": 175, "children": [], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 37}}, {"id": 177, "type": "ERROR", "text": ";\n }", "parent": 142, "children": [], "start_point": {"row": 40, "column": 37}, "end_point": {"row": 41, "column": 9}}, {"id": 178, "type": "identifier", "text": "iterator_t", "parent": 142, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 18}}, {"id": 179, "type": "identifier", "text": "hostStart", "parent": 142, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 28}}, {"id": 180, "type": "ERROR", "text": "=", "parent": 142, "children": [181], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 30}}, {"id": 181, "type": "=", "text": "=", "parent": 180, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 30}}, {"id": 182, "type": "identifier", "text": "protocolEnd", "parent": 142, "children": [], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 42}}, {"id": 183, "type": "identifier", "text": "iterator_t", "parent": 142, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 18}}, {"id": 184, "type": "identifier", "text": "pathStart", "parent": 142, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 28}}, {"id": 185, "type": "ERROR", "text": "=", "parent": 142, "children": [186], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 30}}, {"id": 186, "type": "=", "text": "=", "parent": 185, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 30}}, {"id": 187, "type": "identifier", "text": "std", "parent": 142, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 34}}, {"id": 188, "type": "call_expression", "text": "find(hostStart, uriEnd, '/')", "parent": 142, "children": [189, 190], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 64}}, {"id": 189, "type": "identifier", "text": "find", "parent": 188, "children": [], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 40}}, {"id": 190, "type": "argument_list", "text": "(hostStart, uriEnd, '/')", "parent": 188, "children": [191, 192, 193], "start_point": {"row": 46, "column": 40}, "end_point": {"row": 46, "column": 64}}, {"id": 191, "type": "identifier", "text": "hostStart", "parent": 190, "children": [], "start_point": {"row": 46, "column": 41}, "end_point": {"row": 46, "column": 50}}, {"id": 192, "type": "identifier", "text": "uriEnd", "parent": 190, "children": [], "start_point": {"row": 46, "column": 52}, "end_point": {"row": 46, "column": 58}}, {"id": 193, "type": "char_literal", "text": "'/'", "parent": 190, "children": [194, 195, 196], "start_point": {"row": 46, "column": 60}, "end_point": {"row": 46, "column": 63}}, {"id": 194, "type": "'", "text": "'", "parent": 193, "children": [], "start_point": {"row": 46, "column": 60}, "end_point": {"row": 46, "column": 61}}, {"id": 195, "type": "character", "text": "/", "parent": 193, "children": [], "start_point": {"row": 46, "column": 61}, "end_point": {"row": 46, "column": 62}}, {"id": 196, "type": "'", "text": "'", "parent": 193, "children": [], "start_point": {"row": 46, "column": 62}, "end_point": {"row": 46, "column": 63}}, {"id": 197, "type": "identifier", "text": "iterator_t", "parent": 142, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 18}}, {"id": 198, "type": "identifier", "text": "hostEnd", "parent": 142, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 26}}, {"id": 199, "type": "ERROR", "text": "=", "parent": 142, "children": [200], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 28}}, {"id": 200, "type": "=", "text": "=", "parent": 199, "children": [], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 28}}, {"id": 201, "type": "identifier", "text": "std", "parent": 142, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 32}}, {"id": 202, "type": "call_expression", "text": "find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':')", "parent": 142, "children": [203, 204], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 49, "column": 64}}, {"id": 203, "type": "identifier", "text": "find", "parent": 202, "children": [], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 38}}, {"id": 204, "type": "argument_list", "text": "(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':')", "parent": 202, "children": [205, 206, 211, 215], "start_point": {"row": 48, "column": 38}, "end_point": {"row": 49, "column": 64}}, {"id": 205, "type": "identifier", "text": "protocolEnd", "parent": 204, "children": [], "start_point": {"row": 48, "column": 39}, "end_point": {"row": 48, "column": 50}}, {"id": 206, "type": "parenthesized_expression", "text": "(pathStart != uriEnd)", "parent": 204, "children": [207], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 33}}, {"id": 207, "type": "binary_expression", "text": "pathStart != uriEnd", "parent": 206, "children": [208, 209, 210], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 32}}, {"id": 208, "type": "identifier", "text": "pathStart", "parent": 207, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 22}}, {"id": 209, "type": "!=", "text": "!=", "parent": 207, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 25}}, {"id": 210, "type": "identifier", "text": "uriEnd", "parent": 207, "children": [], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 32}}, {"id": 211, "type": "ERROR", "text": "? pathStart : queryStart", "parent": 204, "children": [212, 213, 214], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 58}}, {"id": 212, "type": "?", "text": "?", "parent": 211, "children": [], "start_point": {"row": 49, "column": 34}, "end_point": {"row": 49, "column": 35}}, {"id": 213, "type": "identifier", "text": "pathStart", "parent": 211, "children": [], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 45}}, {"id": 214, "type": "identifier", "text": "queryStart", "parent": 211, "children": [], "start_point": {"row": 49, "column": 48}, "end_point": {"row": 49, "column": 58}}, {"id": 215, "type": "char_literal", "text": "':'", "parent": 204, "children": [216, 217], "start_point": {"row": 49, "column": 60}, "end_point": {"row": 49, "column": 63}}, {"id": 216, "type": "'", "text": "'", "parent": 215, "children": [], "start_point": {"row": 49, "column": 60}, "end_point": {"row": 49, "column": 61}}, {"id": 217, "type": "'", "text": "'", "parent": 215, "children": [], "start_point": {"row": 49, "column": 62}, "end_point": {"row": 49, "column": 63}}, {"id": 218, "type": "ERROR", "text": ";\n\n if", "parent": 141, "children": [], "start_point": {"row": 49, "column": 64}, "end_point": {"row": 51, "column": 10}}, {"id": 219, "type": "parameter_list", "text": "(!result.Protocol.empty())", "parent": 141, "children": [220, 222], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 37}}, {"id": 220, "type": "ERROR", "text": "!", "parent": 219, "children": [221], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 13}}, {"id": 221, "type": "!", "text": "!", "parent": 220, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 13}}, {"id": 222, "type": "parameter_declaration", "text": "result.Protocol.empty()", "parent": 219, "children": [223, 224, 226], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 36}}, {"id": 223, "type": "type_identifier", "text": "result", "parent": 222, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 19}}, {"id": 224, "type": "ERROR", "text": ".Protocol.", "parent": 222, "children": [225], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 29}}, {"id": 225, "type": "identifier", "text": "Protocol", "parent": 224, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 28}}, {"id": 226, "type": "function_declarator", "text": "empty()", "parent": 222, "children": [227, 228], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 36}}, {"id": 227, "type": "identifier", "text": "empty", "parent": 226, "children": [], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 34}}, {"id": 228, "type": "parameter_list", "text": "()", "parent": 226, "children": [], "start_point": {"row": 51, "column": 34}, "end_point": {"row": 51, "column": 36}}, {"id": 229, "type": "identifier", "text": "result", "parent": 141, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 18}}, {"id": 230, "type": "identifier", "text": "Host", "parent": 141, "children": [], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 23}}, {"id": 231, "type": "ERROR", "text": "=", "parent": 141, "children": [232], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 25}}, {"id": 232, "type": "=", "text": "=", "parent": 231, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 25}}, {"id": 233, "type": "identifier", "text": "std", "parent": 141, "children": [], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 29}}, {"id": 234, "type": "call_expression", "text": "string(hostStart, hostEnd)", "parent": 141, "children": [235, 236], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 57}}, {"id": 235, "type": "identifier", "text": "string", "parent": 234, "children": [], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 37}}, {"id": 236, "type": "argument_list", "text": "(hostStart, hostEnd)", "parent": 234, "children": [237, 238], "start_point": {"row": 52, "column": 37}, "end_point": {"row": 52, "column": 57}}, {"id": 237, "type": "identifier", "text": "hostStart", "parent": 236, "children": [], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 47}}, {"id": 238, "type": "identifier", "text": "hostEnd", "parent": 236, "children": [], "start_point": {"row": 52, "column": 49}, "end_point": {"row": 52, "column": 56}}, {"id": 239, "type": "ERROR", "text": ";\n }\n // Port\n if (", "parent": 140, "children": [], "start_point": {"row": 52, "column": 57}, "end_point": {"row": 55, "column": 12}}, {"id": 240, "type": "parameter_list", "text": "(hostEnd != uriEnd)", "parent": 140, "children": [241], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 31}}, {"id": 241, "type": "parameter_declaration", "text": "hostEnd != uriEnd", "parent": 240, "children": [242, 243, 245], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 30}}, {"id": 242, "type": "type_identifier", "text": "hostEnd", "parent": 241, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 20}}, {"id": 243, "type": "ERROR", "text": "!=", "parent": 241, "children": [244], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 23}}, {"id": 244, "type": "!=", "text": "!=", "parent": 243, "children": [], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 23}}, {"id": 245, "type": "identifier", "text": "uriEnd", "parent": 241, "children": [], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 30}}, {"id": 246, "type": "ERROR", "text": "&&", "parent": 139, "children": [247], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 34}}, {"id": 247, "type": "&&", "text": "&&", "parent": 246, "children": [], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 34}}, {"id": 248, "type": "parameter_list", "text": "((&*(hostEnd)", "parent": 139, "children": [249, 251], "start_point": {"row": 55, "column": 35}, "end_point": {"row": 55, "column": 48}}, {"id": 249, "type": "ERROR", "text": "(&*(", "parent": 248, "children": [250], "start_point": {"row": 55, "column": 36}, "end_point": {"row": 55, "column": 40}}, {"id": 250, "type": "*", "text": "*", "parent": 249, "children": [], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 39}}, {"id": 251, "type": "parameter_declaration", "text": "hostEnd", "parent": 248, "children": [252], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 47}}, {"id": 252, "type": "type_identifier", "text": "hostEnd", "parent": 251, "children": [], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 47}}, {"id": 253, "type": "number_literal", "text": "0", "parent": 123, "children": [], "start_point": {"row": 55, "column": 50}, "end_point": {"row": 55, "column": 51}}, {"id": 254, "type": "ERROR", "text": "== ':'", "parent": 122, "children": [255, 256, 257], "start_point": {"row": 55, "column": 53}, "end_point": {"row": 55, "column": 59}}, {"id": 255, "type": "==", "text": "==", "parent": 254, "children": [], "start_point": {"row": 55, "column": 53}, "end_point": {"row": 55, "column": 55}}, {"id": 256, "type": "'", "text": "'", "parent": 254, "children": [], "start_point": {"row": 55, "column": 56}, "end_point": {"row": 55, "column": 57}}, {"id": 257, "type": "'", "text": "'", "parent": 254, "children": [], "start_point": {"row": 55, "column": 58}, "end_point": {"row": 55, "column": 59}}, {"id": 258, "type": "ERROR", "text": ") {\n // We have a port\n hostEnd++", "parent": 121, "children": [259, 260], "start_point": {"row": 55, "column": 60}, "end_point": {"row": 57, "column": 21}}, {"id": 259, "type": "identifier", "text": "hostEnd", "parent": 258, "children": [], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 19}}, {"id": 260, "type": "++", "text": "++", "parent": 258, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 21}}, {"id": 261, "type": "field_declaration", "text": "iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart;", "parent": 7, "children": [262, 263, 273, 276], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 80}}, {"id": 262, "type": "type_identifier", "text": "iterator_t", "parent": 261, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 22}}, {"id": 263, "type": "function_declarator", "text": "portEnd = (pathStart != uriEnd)", "parent": 261, "children": [264, 265, 267], "start_point": {"row": 58, "column": 23}, "end_point": {"row": 58, "column": 54}}, {"id": 264, "type": "field_identifier", "text": "portEnd", "parent": 263, "children": [], "start_point": {"row": 58, "column": 23}, "end_point": {"row": 58, "column": 30}}, {"id": 265, "type": "ERROR", "text": "=", "parent": 263, "children": [266], "start_point": {"row": 58, "column": 31}, "end_point": {"row": 58, "column": 32}}, {"id": 266, "type": "=", "text": "=", "parent": 265, "children": [], "start_point": {"row": 58, "column": 31}, "end_point": {"row": 58, "column": 32}}, {"id": 267, "type": "parameter_list", "text": "(pathStart != uriEnd)", "parent": 263, "children": [268], "start_point": {"row": 58, "column": 33}, "end_point": {"row": 58, "column": 54}}, {"id": 268, "type": "parameter_declaration", "text": "pathStart != uriEnd", "parent": 267, "children": [269, 270, 272], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 58, "column": 53}}, {"id": 269, "type": "type_identifier", "text": "pathStart", "parent": 268, "children": [], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 58, "column": 43}}, {"id": 270, "type": "ERROR", "text": "!=", "parent": 268, "children": [271], "start_point": {"row": 58, "column": 44}, "end_point": {"row": 58, "column": 46}}, {"id": 271, "type": "!=", "text": "!=", "parent": 270, "children": [], "start_point": {"row": 58, "column": 44}, "end_point": {"row": 58, "column": 46}}, {"id": 272, "type": "identifier", "text": "uriEnd", "parent": 268, "children": [], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 58, "column": 53}}, {"id": 273, "type": "ERROR", "text": "? pathStart", "parent": 261, "children": [274, 275], "start_point": {"row": 58, "column": 55}, "end_point": {"row": 58, "column": 66}}, {"id": 274, "type": "?", "text": "?", "parent": 273, "children": [], "start_point": {"row": 58, "column": 55}, "end_point": {"row": 58, "column": 56}}, {"id": 275, "type": "identifier", "text": "pathStart", "parent": 273, "children": [], "start_point": {"row": 58, "column": 57}, "end_point": {"row": 58, "column": 66}}, {"id": 276, "type": "bitfield_clause", "text": ": queryStart", "parent": 261, "children": [277], "start_point": {"row": 58, "column": 67}, "end_point": {"row": 58, "column": 79}}, {"id": 277, "type": "identifier", "text": "queryStart", "parent": 276, "children": [], "start_point": {"row": 58, "column": 69}, "end_point": {"row": 58, "column": 79}}, {"id": 278, "type": "field_declaration", "text": "result.Port = std::string(hostEnd, portEnd);", "parent": 7, "children": [279, 280, 283, 284], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 56}}, {"id": 279, "type": "type_identifier", "text": "result", "parent": 278, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 18}}, {"id": 280, "type": "ERROR", "text": ".Port =", "parent": 278, "children": [281, 282], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 25}}, {"id": 281, "type": "field_identifier", "text": "Port", "parent": 280, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 23}}, {"id": 282, "type": "=", "text": "=", "parent": 280, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 25}}, {"id": 283, "type": "field_identifier", "text": "std", "parent": 278, "children": [], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 29}}, {"id": 284, "type": "bitfield_clause", "text": ":string(hostEnd, portEnd)", "parent": 278, "children": [285], "start_point": {"row": 59, "column": 30}, "end_point": {"row": 59, "column": 55}}, {"id": 285, "type": "call_expression", "text": "string(hostEnd, portEnd)", "parent": 284, "children": [286, 287], "start_point": {"row": 59, "column": 31}, "end_point": {"row": 59, "column": 55}}, {"id": 286, "type": "identifier", "text": "string", "parent": 285, "children": [], "start_point": {"row": 59, "column": 31}, "end_point": {"row": 59, "column": 37}}, {"id": 287, "type": "argument_list", "text": "(hostEnd, portEnd)", "parent": 285, "children": [288, 289], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 55}}, {"id": 288, "type": "identifier", "text": "hostEnd", "parent": 287, "children": [], "start_point": {"row": 59, "column": 38}, "end_point": {"row": 59, "column": 45}}, {"id": 289, "type": "identifier", "text": "portEnd", "parent": 287, "children": [], "start_point": {"row": 59, "column": 47}, "end_point": {"row": 59, "column": 54}}, {"id": 290, "type": "function_declarator", "text": "if (pathStart != uriEnd)", "parent": 6, "children": [291], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 32}}, {"id": 291, "type": "parameter_list", "text": "(pathStart != uriEnd)", "parent": 290, "children": [292], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 32}}, {"id": 292, "type": "parameter_declaration", "text": "pathStart != uriEnd", "parent": 291, "children": [293, 294, 296], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 31}}, {"id": 293, "type": "type_identifier", "text": "pathStart", "parent": 292, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 21}}, {"id": 294, "type": "ERROR", "text": "!=", "parent": 292, "children": [295], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 24}}, {"id": 295, "type": "!=", "text": "!=", "parent": 294, "children": [], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 24}}, {"id": 296, "type": "identifier", "text": "uriEnd", "parent": 292, "children": [], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 31}}, {"id": 297, "type": "ERROR", "text": "result.Path = std::", "parent": 6, "children": [298], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 31}}, {"id": 298, "type": "assignment_expression", "text": "result.Path = std", "parent": 297, "children": [299, 302, 303], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 29}}, {"id": 299, "type": "field_expression", "text": "result.Path", "parent": 298, "children": [300, 301], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 23}}, {"id": 300, "type": "identifier", "text": "result", "parent": 299, "children": [], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 18}}, {"id": 301, "type": "field_identifier", "text": "Path", "parent": 299, "children": [], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 23}}, {"id": 302, "type": "=", "text": "=", "parent": 298, "children": [], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 25}}, {"id": 303, "type": "identifier", "text": "std", "parent": 298, "children": [], "start_point": {"row": 63, "column": 26}, "end_point": {"row": 63, "column": 29}}, {"id": 304, "type": "call_expression", "text": "string(pathStart, queryStart)", "parent": 6, "children": [305, 306], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 60}}, {"id": 305, "type": "identifier", "text": "string", "parent": 304, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 37}}, {"id": 306, "type": "argument_list", "text": "(pathStart, queryStart)", "parent": 304, "children": [307, 308], "start_point": {"row": 63, "column": 37}, "end_point": {"row": 63, "column": 60}}, {"id": 307, "type": "identifier", "text": "pathStart", "parent": 306, "children": [], "start_point": {"row": 63, "column": 38}, "end_point": {"row": 63, "column": 47}}, {"id": 308, "type": "identifier", "text": "queryStart", "parent": 306, "children": [], "start_point": {"row": 63, "column": 49}, "end_point": {"row": 63, "column": 59}}, {"id": 309, "type": "if_statement", "text": "if (queryStart != uriEnd) {\n result.QueryString = std::string(queryStart, uri.end());\n }", "parent": null, "children": [310], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 68, "column": 9}}, {"id": 310, "type": "parenthesized_expression", "text": "(queryStart != uriEnd)", "parent": 309, "children": [311], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 33}}, {"id": 311, "type": "binary_expression", "text": "queryStart != uriEnd", "parent": 310, "children": [312, 313, 314], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 32}}, {"id": 312, "type": "identifier", "text": "queryStart", "parent": 311, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 22}}, {"id": 313, "type": "!=", "text": "!=", "parent": 311, "children": [], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 25}}, {"id": 314, "type": "identifier", "text": "uriEnd", "parent": 311, "children": [], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 32}}, {"id": 315, "type": "ERROR", "text": "result.QueryString = std::", "parent": 309, "children": [316], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 38}}, {"id": 316, "type": "assignment_expression", "text": "result.QueryString = std", "parent": 315, "children": [317, 320, 321], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 36}}, {"id": 317, "type": "field_expression", "text": "result.QueryString", "parent": 316, "children": [318, 319], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 30}}, {"id": 318, "type": "identifier", "text": "result", "parent": 317, "children": [], "start_point": {"row": 67, "column": 12}, "end_point": {"row": 67, "column": 18}}, {"id": 319, "type": "field_identifier", "text": "QueryString", "parent": 317, "children": [], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 30}}, {"id": 320, "type": "=", "text": "=", "parent": 316, "children": [], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 32}}, {"id": 321, "type": "identifier", "text": "std", "parent": 316, "children": [], "start_point": {"row": 67, "column": 33}, "end_point": {"row": 67, "column": 36}}, {"id": 322, "type": "call_expression", "text": "string(queryStart, uri.end())", "parent": 309, "children": [323, 324], "start_point": {"row": 67, "column": 38}, "end_point": {"row": 67, "column": 67}}, {"id": 323, "type": "identifier", "text": "string", "parent": 322, "children": [], "start_point": {"row": 67, "column": 38}, "end_point": {"row": 67, "column": 44}}, {"id": 324, "type": "argument_list", "text": "(queryStart, uri.end())", "parent": 322, "children": [325, 326], "start_point": {"row": 67, "column": 44}, "end_point": {"row": 67, "column": 67}}, {"id": 325, "type": "identifier", "text": "queryStart", "parent": 324, "children": [], "start_point": {"row": 67, "column": 45}, "end_point": {"row": 67, "column": 55}}, {"id": 326, "type": "call_expression", "text": "uri.end()", "parent": 324, "children": [327, 329], "start_point": {"row": 67, "column": 57}, "end_point": {"row": 67, "column": 66}}, {"id": 327, "type": "field_expression", "text": "uri.end", "parent": 326, "children": [328], "start_point": {"row": 67, "column": 57}, "end_point": {"row": 67, "column": 64}}, {"id": 328, "type": "identifier", "text": "uri", "parent": 327, "children": [], "start_point": {"row": 67, "column": 57}, "end_point": {"row": 67, "column": 60}}, {"id": 329, "type": "argument_list", "text": "()", "parent": 326, "children": [], "start_point": {"row": 67, "column": 64}, "end_point": {"row": 67, "column": 66}}, {"id": 330, "type": "return_statement", "text": "return result;", "parent": null, "children": [331], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 22}}, {"id": 331, "type": "identifier", "text": "result", "parent": 330, "children": [], "start_point": {"row": 69, "column": 15}, "end_point": {"row": 69, "column": 21}}, {"id": 332, "type": "ERROR", "text": "}\n}", "parent": null, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 72, "column": 1}}]}, "node_categories": {"declarations": {"functions": [6, 58, 85, 124, 128, 139, 140, 141, 142, 226, 263, 290], "variables": [10, 20, 32, 40, 42, 52, 60, 79, 87, 102, 121, 137, 222, 241, 251, 261, 268, 278, 292], "classes": [7, 8], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [27, 67, 70, 71, 94, 116, 117, 119, 155, 168, 175, 188, 202, 206, 207, 234, 285, 299, 304, 310, 311, 317, 322, 326, 327], "assignments": [113, 298, 316], "loops": [], "conditionals": [9, 11, 14, 15, 16, 17, 18, 19, 21, 22, 24, 28, 29, 30, 31, 33, 34, 37, 39, 41, 43, 45, 47, 51, 53, 55, 57, 61, 62, 65, 68, 72, 74, 80, 82, 84, 88, 89, 92, 95, 97, 98, 103, 105, 108, 109, 112, 114, 120, 127, 129, 138, 143, 150, 151, 154, 156, 158, 159, 160, 164, 167, 171, 174, 178, 179, 182, 183, 184, 187, 189, 191, 192, 197, 198, 201, 203, 205, 208, 210, 213, 214, 223, 225, 227, 229, 230, 233, 235, 237, 238, 242, 245, 252, 259, 262, 264, 269, 272, 275, 277, 279, 281, 283, 286, 288, 289, 293, 296, 300, 301, 303, 305, 307, 308, 309, 312, 314, 318, 319, 321, 323, 325, 328, 331], "returns": [330], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 50, 75, 99, 133, 146, 147, 163, 193, 215, 253], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [12, 25, 36, 38, 66, 93, 110, 276, 284]}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "Uri", "text_snippet": "struct Uri {\n public:\n std::string QueryString, Path, Protocol, Host, Port;\n\n static Ur"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "end()"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "begin()"}, {"node_id": 124, "universal_type": "function", "name": "unknown", "text_snippet": "(prot.length() > 3) && (prot.substr(0, 3) == \"://\")) {\n result.Protocol = std::string"}, {"node_id": 128, "universal_type": "function", "name": "unknown", "text_snippet": "length()"}, {"node_id": 139, "universal_type": "function", "name": "unknown", "text_snippet": "substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);"}, {"node_id": 141, "universal_type": "function", "name": "unknown", "text_snippet": "substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);"}, {"node_id": 142, "universal_type": "function", "name": "unknown", "text_snippet": "substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);"}, {"node_id": 226, "universal_type": "function", "name": "unknown", "text_snippet": "empty()"}, {"node_id": 263, "universal_type": "function", "name": "unknown", "text_snippet": "portEnd = (pathStart != uriEnd)"}, {"node_id": 290, "universal_type": "function", "name": "unknown", "text_snippet": "if (pathStart != uriEnd)"}], "class_declarations": [{"node_id": 7, "universal_type": "class", "name": "Uri", "text_snippet": "struct Uri {\n public:\n std::string QueryString, Path, Protocol, Host, Port;\n\n static Ur"}, {"node_id": 8, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <string>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <algorithm> // find\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "/*\n * Modified from\n * http://stackoverflow.com/a/11044337/2206385\n */\n#include <string>\n#include <algorithm> // find\n\nstruct Uri {\n public:\n std::string QueryString, Path, Protocol, Host, Port;\n\n static Uri Parse(const std::string &uri) {\n Uri result;\n\n typedef std::string::const_iterator iterator_t;\n\n if (uri.length() == 0)\n return result;\n\n iterator_t uriEnd = uri.end();\n\n // Get query start\n iterator_t queryStart = std::find(uri.begin(), uriEnd, '?');\n\n // Protocol\n iterator_t protocolStart = uri.begin();\n // \"://\"\n iterator_t protocolEnd = std::find(protocolStart, uriEnd, ':');\n\n if (protocolEnd != uriEnd) {\n std::string prot = &*(protocolEnd);\n if ((prot.length() > 3) && (prot.substr(0, 3) == \"://\")) {\n result.Protocol = std::string(protocolStart, protocolEnd);\n protocolEnd += 3; // ://\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n } else {\n // No protocol\n protocolEnd = uri.begin();\n }\n\n // Host\n iterator_t hostStart = protocolEnd;\n // Get pathStart\n iterator_t pathStart = std::find(hostStart, uriEnd, '/');\n // Check for port\n iterator_t hostEnd = std::find(protocolEnd,\n (pathStart != uriEnd) ? pathStart : queryStart, ':');\n\n if (!result.Protocol.empty()) {\n result.Host = std::string(hostStart, hostEnd);\n }\n // Port\n if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) {\n // We have a port\n hostEnd++;\n iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart;\n result.Port = std::string(hostEnd, portEnd);\n }\n // Path\n if (pathStart != uriEnd) {\n result.Path = std::string(pathStart, queryStart);\n }\n // Query\n if (queryStart != uriEnd) {\n result.QueryString = std::string(queryStart, uri.end());\n }\n return result;\n\n }\n};"}
80,926
c
// // ImageStore.h // iNaturalist // // Created by <NAME> on 2/20/12. // Copyright (c) 2012 iNaturalist. All rights reserved. // #import <Foundation/Foundation.h> #import <AssetsLibrary/AssetsLibrary.h> enum { ImageStoreOriginalSize = 0, ImageStoreSquareSize = 1, ImageStoreSmallSize = 2, ImageStoreMediumSize = 3, ImageStoreLargeSize = 4 }; #define radians( degrees ) ( degrees * M_PI / 180 ) @interface ImageStore : NSObject @property (nonatomic, strong) NSMutableDictionary *dictionary; + (ImageStore *)sharedImageStore; - (UIImage *)find:(NSString *)key forSize:(int)size; - (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error; - (void)destroy:(NSString *)key; - (NSString *)createKey; - (NSString *)pathForKey:(NSString *)key; - (NSString *)pathForKey:(NSString *)key forSize:(int)size; - (NSString *)keyForKey:(NSString *)key forSize:(int)size; - (UIImage *)iconicTaxonImageForName:(NSString *)name; - (void)makeExpiring:(NSString *)imgKey; - (NSString *)usageStatsString; - (void)clearEntireStore; + (NSArray *)assetCollectionSubtypes; + (UIImage *)imageWithImage:(UIImage *)image squashedToFillSize:(CGSize)size; - (void)cleanupImageStoreUsingValidPhotoKeys:(NSArray *)validPhotoKeys syncedPhotoKeys:(NSArray *)syncedPhotoKeys allowedExecutionTime:(NSTimeInterval)allowedExecutionSeconds; @end
37.05
37
(translation_unit) "//\n// ImageStore.h\n// iNaturalist\n//\n// Created by <NAME> on 2/20/12.\n// Copyright (c) 2012 iNaturalist. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <AssetsLibrary/AssetsLibrary.h>\n\nenum {\n ImageStoreOriginalSize = 0,\n ImageStoreSquareSize = 1,\n ImageStoreSmallSize = 2,\n ImageStoreMediumSize = 3,\n ImageStoreLargeSize = 4\n};\n\n#define radians( degrees ) ( degrees * M_PI / 180 )\n\n@interface ImageStore : NSObject\n@property (nonatomic, strong) NSMutableDictionary *dictionary;\n+ (ImageStore *)sharedImageStore;\n- (UIImage *)find:(NSString *)key forSize:(int)size;\n- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error;\n- (void)destroy:(NSString *)key;\n- (NSString *)createKey;\n- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name;\n- (void)makeExpiring:(NSString *)imgKey;\n- (NSString *)usageStatsString;\n- (void)clearEntireStore;\n+ (NSArray *)assetCollectionSubtypes;\n+ (UIImage *)imageWithImage:(UIImage *)image squashedToFillSize:(CGSize)size;\n\n- (void)cleanupImageStoreUsingValidPhotoKeys:(NSArray *)validPhotoKeys\n syncedPhotoKeys:(NSArray *)syncedPhotoKeys\n allowedExecutionTime:(NSTimeInterval)allowedExecutionSeconds;\n\n@end\n" (comment) "//" (comment) "// ImageStore.h" (comment) "// iNaturalist" (comment) "//" (comment) "// Created by <NAME> on 2/20/12." (comment) "// Copyright (c) 2012 iNaturalist. All rights reserved." (comment) "//" (preproc_call) "#import <Foundation/Foundation.h>\n" (preproc_directive) "#import" (preproc_arg) "<Foundation/Foundation.h>" (preproc_call) "#import <AssetsLibrary/AssetsLibrary.h>\n" (preproc_directive) "#import" (preproc_arg) "<AssetsLibrary/AssetsLibrary.h>" (enum_specifier) "enum {\n ImageStoreOriginalSize = 0,\n ImageStoreSquareSize = 1,\n ImageStoreSmallSize = 2,\n ImageStoreMediumSize = 3,\n ImageStoreLargeSize = 4\n}" (enum) "enum" (enumerator_list) "{\n ImageStoreOriginalSize = 0,\n ImageStoreSquareSize = 1,\n ImageStoreSmallSize = 2,\n ImageStoreMediumSize = 3,\n ImageStoreLargeSize = 4\n}" ({) "{" (enumerator) "ImageStoreOriginalSize = 0" (identifier) "ImageStoreOriginalSize" (=) "=" (number_literal) "0" (,) "," (enumerator) "ImageStoreSquareSize = 1" (identifier) "ImageStoreSquareSize" (=) "=" (number_literal) "1" (,) "," (enumerator) "ImageStoreSmallSize = 2" (identifier) "ImageStoreSmallSize" (=) "=" (number_literal) "2" (,) "," (enumerator) "ImageStoreMediumSize = 3" (identifier) "ImageStoreMediumSize" (=) "=" (number_literal) "3" (,) "," (enumerator) "ImageStoreLargeSize = 4" (identifier) "ImageStoreLargeSize" (=) "=" (number_literal) "4" (}) "}" (;) ";" (preproc_function_def) "#define radians( degrees ) ( degrees * M_PI / 180 )\n" (#define) "#define" (identifier) "radians" (preproc_params) "( degrees )" (() "(" (identifier) "degrees" ()) ")" (preproc_arg) "( degrees * M_PI / 180 )" (ERROR) "@interface ImageStore : NSObject\n@property (nonatomic, strong) NSMutableDictionary *dictionary;" (ERROR) "@" (type_identifier) "interface" (function_declarator) "ImageStore : NSObject\n@property (nonatomic, strong)" (identifier) "ImageStore" (ERROR) ": NSObject\n@property" (:) ":" (identifier) "NSObject" (ERROR) "@" (identifier) "property" (parameter_list) "(nonatomic, strong)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "strong" ()) ")" (declaration) "NSMutableDictionary *dictionary;" (type_identifier) "NSMutableDictionary" (pointer_declarator) "*dictionary" (*) "*" (identifier) "dictionary" (;) ";" (expression_statement) "+ (ImageStore *)sharedImageStore;" (unary_expression) "+ (ImageStore *)sharedImageStore" (+) "+" (cast_expression) "(ImageStore *)sharedImageStore" (() "(" (type_descriptor) "ImageStore *" (type_identifier) "ImageStore" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "sharedImageStore" (;) ";" (ERROR) "- (UIImage *)find:(NSString *)key forSize:(int)" (binary_expression) "- (UIImage *)find:(NSString *)key forSize" (unary_expression) "- (UIImage *)find" (-) "-" (cast_expression) "(UIImage *)find" (() "(" (type_descriptor) "UIImage *" (type_identifier) "UIImage" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "find" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")key" ()) ")" (identifier) "key" (identifier) "forSize" (:) ":" (() "(" (primitive_type) "int" ()) ")" (expression_statement) "size;" (identifier) "size" (;) ";" (expression_statement) "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error;\n- (void)destroy:(NSString *)key;" (update_expression) "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error;\n- (void)destroy:(NSString *)key" (binary_expression) "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error;\n- (void)destroy:(NSString *)key" (binary_expression) "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error;\n- (void)destroy" (binary_expression) "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error" (binary_expression) "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error" (binary_expression) "- (BOOL)storeImage:(UIImage *)image forKey" (unary_expression) "- (BOOL)storeImage" (-) "-" (cast_expression) "(BOOL)storeImage" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "storeImage" (ERROR) ":(UIImage" (:) ":" (() "(" (identifier) "UIImage" (*) "*" (ERROR) ")image" ()) ")" (identifier) "image" (identifier) "forKey" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")key" ()) ")" (identifier) "key" (identifier) "error" (ERROR) ":(NSError" (:) ":" (() "(" (identifier) "NSError" (*) "*" (pointer_expression) "*)error" (*) "*" (ERROR) ")" ()) ")" (identifier) "error" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(void)destroy" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "destroy" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "key" (--) "" (;) ";" (expression_statement) "- (NSString *)createKey;" (unary_expression) "- (NSString *)createKey" (-) "-" (cast_expression) "(NSString *)createKey" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "createKey" (;) ";" (expression_statement) "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name;\n- (void)makeExpiring:(NSString *)imgKey;" (update_expression) "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name;\n- (void)makeExpiring:(NSString *)imgKey" (binary_expression) "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name;\n- (void)makeExpiring:(NSString *)imgKey" (binary_expression) "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name;\n- (void)makeExpiring" (binary_expression) "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name" (binary_expression) "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName" (binary_expression) "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize" (binary_expression) "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey" (binary_expression) "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize" (binary_expression) "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey" (binary_expression) "- (NSString *)pathForKey:(NSString *)key" (unary_expression) "- (NSString *)pathForKey" (-) "-" (cast_expression) "(NSString *)pathForKey" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "pathForKey" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "key" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(NSString *)pathForKey" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "pathForKey" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")key" ()) ")" (identifier) "key" (identifier) "forSize" (ERROR) ":(int)size;" (:) ":" (() "(" (primitive_type) "int" ()) ")" (identifier) "size" (;) ";" (-) "-" (cast_expression) "(NSString *)keyForKey" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "keyForKey" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")key" ()) ")" (identifier) "key" (identifier) "forSize" (ERROR) ":(int)size;" (:) ":" (() "(" (primitive_type) "int" ()) ")" (identifier) "size" (;) ";" (-) "-" (cast_expression) "(UIImage *)iconicTaxonImageForName" (() "(" (type_descriptor) "UIImage *" (type_identifier) "UIImage" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "iconicTaxonImageForName" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "name" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(void)makeExpiring" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "makeExpiring" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "imgKey" (--) "" (;) ";" (expression_statement) "- (NSString *)usageStatsString;" (unary_expression) "- (NSString *)usageStatsString" (-) "-" (cast_expression) "(NSString *)usageStatsString" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "usageStatsString" (;) ";" (expression_statement) "- (void)clearEntireStore;" (unary_expression) "- (void)clearEntireStore" (-) "-" (cast_expression) "(void)clearEntireStore" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "clearEntireStore" (;) ";" (expression_statement) "+ (NSArray *)assetCollectionSubtypes;" (unary_expression) "+ (NSArray *)assetCollectionSubtypes" (+) "+" (cast_expression) "(NSArray *)assetCollectionSubtypes" (() "(" (type_descriptor) "NSArray *" (type_identifier) "NSArray" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "assetCollectionSubtypes" (;) ";" (ERROR) "+ (UIImage *)imageWithImage:(UIImage *)image squashedToFillSize:(CGSize)" (binary_expression) "+ (UIImage *)imageWithImage:(UIImage *)image squashedToFillSize" (unary_expression) "+ (UIImage *)imageWithImage" (+) "+" (cast_expression) "(UIImage *)imageWithImage" (() "(" (type_descriptor) "UIImage *" (type_identifier) "UIImage" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "imageWithImage" (ERROR) ":(UIImage" (:) ":" (() "(" (identifier) "UIImage" (*) "*" (ERROR) ")image" ()) ")" (identifier) "image" (identifier) "squashedToFillSize" (:) ":" (() "(" (identifier) "CGSize" ()) ")" (expression_statement) "size;" (identifier) "size" (;) ";" (ERROR) "- (void)cleanupImageStoreUsingValidPhotoKeys:(NSArray *)validPhotoKeys\n syncedPhotoKeys:(NSArray *)syncedPhotoKeys\n allowedExecutionTime:(NSTimeInterval)allowedExecutionSeconds;\n\n@end" (binary_expression) "- (void)cleanupImageStoreUsingValidPhotoKeys:(NSArray *)validPhotoKeys\n syncedPhotoKeys:(NSArray *)syncedPhotoKeys\n allowedExecutionTime" (binary_expression) "- (void)cleanupImageStoreUsingValidPhotoKeys:(NSArray *)validPhotoKeys\n syncedPhotoKeys" (unary_expression) "- (void)cleanupImageStoreUsingValidPhotoKeys" (-) "-" (cast_expression) "(void)cleanupImageStoreUsingValidPhotoKeys" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "cleanupImageStoreUsingValidPhotoKeys" (ERROR) ":(NSArray" (:) ":" (() "(" (identifier) "NSArray" (*) "*" (ERROR) ")validPhotoKeys" ()) ")" (identifier) "validPhotoKeys" (identifier) "syncedPhotoKeys" (ERROR) ":(NSArray" (:) ":" (() "(" (identifier) "NSArray" (*) "*" (ERROR) ")syncedPhotoKeys" ()) ")" (identifier) "syncedPhotoKeys" (identifier) "allowedExecutionTime" (:) ":" (() "(" (identifier) "NSTimeInterval" ()) ")" (identifier) "allowedExecutionSeconds" (;) ";" (ERROR) "@" (identifier) "end"
404
39
{"language": "c", "success": true, "metadata": {"lines": 37, "avg_line_length": 37.05, "nodes": 265, "errors": 0, "source_hash": "b2b5d1855b67d0aaa59c1588822a432418b84027cf2e02a745d41f23030d7bf3", "categorized_nodes": 146}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <Foundation/Foundation.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": "<Foundation/Foundation.h>", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "preproc_call", "text": "#import <AssetsLibrary/AssetsLibrary.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "#import", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "<AssetsLibrary/AssetsLibrary.h>", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 39}}, {"id": 6, "type": "enum_specifier", "text": "enum {\n ImageStoreOriginalSize = 0,\n ImageStoreSquareSize = 1,\n ImageStoreSmallSize = 2,\n ImageStoreMediumSize = 3,\n ImageStoreLargeSize = 4\n}", "parent": null, "children": [7, 8], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 7, "type": "enum", "text": "enum", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 4}}, {"id": 8, "type": "enumerator_list", "text": "{\n ImageStoreOriginalSize = 0,\n ImageStoreSquareSize = 1,\n ImageStoreSmallSize = 2,\n ImageStoreMediumSize = 3,\n ImageStoreLargeSize = 4\n}", "parent": 6, "children": [9, 13, 17, 21, 25], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 17, "column": 1}}, {"id": 9, "type": "enumerator", "text": "ImageStoreOriginalSize = 0", "parent": 8, "children": [10, 11, 12], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 30}}, {"id": 10, "type": "identifier", "text": "ImageStoreOriginalSize", "parent": 9, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 26}}, {"id": 11, "type": "=", "text": "=", "parent": 9, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 28}}, {"id": 12, "type": "number_literal", "text": "0", "parent": 9, "children": [], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 30}}, {"id": 13, "type": "enumerator", "text": "ImageStoreSquareSize = 1", "parent": 8, "children": [14, 15, 16], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 28}}, {"id": 14, "type": "identifier", "text": "ImageStoreSquareSize", "parent": 13, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 24}}, {"id": 15, "type": "=", "text": "=", "parent": 13, "children": [], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 26}}, {"id": 16, "type": "number_literal", "text": "1", "parent": 13, "children": [], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 28}}, {"id": 17, "type": "enumerator", "text": "ImageStoreSmallSize = 2", "parent": 8, "children": [18, 19, 20], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 27}}, {"id": 18, "type": "identifier", "text": "ImageStoreSmallSize", "parent": 17, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 23}}, {"id": 19, "type": "=", "text": "=", "parent": 17, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 25}}, {"id": 20, "type": "number_literal", "text": "2", "parent": 17, "children": [], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 27}}, {"id": 21, "type": "enumerator", "text": "ImageStoreMediumSize = 3", "parent": 8, "children": [22, 23, 24], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 28}}, {"id": 22, "type": "identifier", "text": "ImageStoreMediumSize", "parent": 21, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 24}}, {"id": 23, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 26}}, {"id": 24, "type": "number_literal", "text": "3", "parent": 21, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 28}}, {"id": 25, "type": "enumerator", "text": "ImageStoreLargeSize = 4", "parent": 8, "children": [26, 27, 28], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 27}}, {"id": 26, "type": "identifier", "text": "ImageStoreLargeSize", "parent": 25, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 23}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 25}}, {"id": 28, "type": "number_literal", "text": "4", "parent": 25, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 27}}, {"id": 29, "type": "preproc_function_def", "text": "#define radians( degrees ) ( degrees * M_PI / 180 )\n", "parent": null, "children": [30, 31, 32, 34], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 30, "type": "#define", "text": "#define", "parent": 29, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 31, "type": "identifier", "text": "radians", "parent": 29, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 15}}, {"id": 32, "type": "preproc_params", "text": "( degrees )", "parent": 29, "children": [33], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 26}}, {"id": 33, "type": "identifier", "text": "degrees", "parent": 32, "children": [], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 24}}, {"id": 34, "type": "preproc_arg", "text": "( degrees * M_PI / 180 )", "parent": 29, "children": [], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 51}}, {"id": 35, "type": "ERROR", "text": "@interface ImageStore : NSObject\n@property (nonatomic, strong) NSMutableDictionary *dictionary;", "parent": null, "children": [36, 37, 38, 47], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 62}}, {"id": 36, "type": "ERROR", "text": "@", "parent": 35, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 37, "type": "type_identifier", "text": "interface", "parent": 35, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 10}}, {"id": 38, "type": "function_declarator", "text": "ImageStore : NSObject\n@property (nonatomic, strong)", "parent": 35, "children": [39, 40, 44], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 22, "column": 29}}, {"id": 39, "type": "identifier", "text": "ImageStore", "parent": 38, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 21}}, {"id": 40, "type": "ERROR", "text": ": NSObject\n@property", "parent": 38, "children": [41, 42, 43], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 22, "column": 9}}, {"id": 41, "type": "identifier", "text": "NSObject", "parent": 40, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 32}}, {"id": 42, "type": "ERROR", "text": "@", "parent": 40, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 43, "type": "identifier", "text": "property", "parent": 40, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 9}}, {"id": 44, "type": "parameter_list", "text": "(nonatomic, strong)", "parent": 38, "children": [45, 46], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 29}}, {"id": 45, "type": "identifier", "text": "nonatomic", "parent": 44, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 20}}, {"id": 46, "type": "identifier", "text": "strong", "parent": 44, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 28}}, {"id": 47, "type": "declaration", "text": "NSMutableDictionary *dictionary;", "parent": 35, "children": [48, 49], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 62}}, {"id": 48, "type": "type_identifier", "text": "NSMutableDictionary", "parent": 47, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 49}}, {"id": 49, "type": "pointer_declarator", "text": "*dictionary", "parent": 47, "children": [50, 51], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 61}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 51}}, {"id": 51, "type": "identifier", "text": "dictionary", "parent": 49, "children": [], "start_point": {"row": 22, "column": 51}, "end_point": {"row": 22, "column": 61}}, {"id": 52, "type": "unary_expression", "text": "+ (ImageStore *)sharedImageStore", "parent": null, "children": [53, 54], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 32}}, {"id": 53, "type": "+", "text": "+", "parent": 52, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 54, "type": "cast_expression", "text": "(ImageStore *)sharedImageStore", "parent": 52, "children": [55, 59], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 32}}, {"id": 55, "type": "type_descriptor", "text": "ImageStore *", "parent": 54, "children": [56, 57], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 15}}, {"id": 56, "type": "type_identifier", "text": "ImageStore", "parent": 55, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 13}}, {"id": 57, "type": "abstract_pointer_declarator", "text": "*", "parent": 55, "children": [58], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 15}}, {"id": 58, "type": "*", "text": "*", "parent": 57, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 15}}, {"id": 59, "type": "identifier", "text": "sharedImageStore", "parent": 54, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 32}}, {"id": 60, "type": "ERROR", "text": "- (UIImage *)find:(NSString *)key forSize:(int)", "parent": null, "children": [61, 76], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 47}}, {"id": 61, "type": "binary_expression", "text": "- (UIImage *)find:(NSString *)key forSize", "parent": 60, "children": [62, 70, 72, 73, 75], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 41}}, {"id": 62, "type": "unary_expression", "text": "- (UIImage *)find", "parent": 61, "children": [63, 64], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 17}}, {"id": 63, "type": "-", "text": "-", "parent": 62, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 64, "type": "cast_expression", "text": "(UIImage *)find", "parent": 62, "children": [65, 69], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 17}}, {"id": 65, "type": "type_descriptor", "text": "UIImage *", "parent": 64, "children": [66, 67], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 12}}, {"id": 66, "type": "type_identifier", "text": "UIImage", "parent": 65, "children": [], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 10}}, {"id": 67, "type": "abstract_pointer_declarator", "text": "*", "parent": 65, "children": [68], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 12}}, {"id": 68, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 12}}, {"id": 69, "type": "identifier", "text": "find", "parent": 64, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 17}}, {"id": 70, "type": "ERROR", "text": ":(NSString", "parent": 61, "children": [71], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 27}}, {"id": 71, "type": "identifier", "text": "NSString", "parent": 70, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 27}}, {"id": 72, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 29}}, {"id": 73, "type": "ERROR", "text": ")key", "parent": 61, "children": [74], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 33}}, {"id": 74, "type": "identifier", "text": "key", "parent": 73, "children": [], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 33}}, {"id": 75, "type": "identifier", "text": "forSize", "parent": 61, "children": [], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 41}}, {"id": 76, "type": "primitive_type", "text": "int", "parent": 60, "children": [], "start_point": {"row": 24, "column": 43}, "end_point": {"row": 24, "column": 46}}, {"id": 77, "type": "identifier", "text": "size", "parent": null, "children": [], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 51}}, {"id": 78, "type": "update_expression", "text": "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error;\n- (void)destroy:(NSString *)key", "parent": null, "children": [79, 117], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 31}}, {"id": 79, "type": "binary_expression", "text": "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error;\n- (void)destroy:(NSString *)key", "parent": 78, "children": [80, 113, 115, 116], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 31}}, {"id": 80, "type": "binary_expression", "text": "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error;\n- (void)destroy", "parent": 79, "children": [81, 108, 109], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 15}}, {"id": 81, "type": "binary_expression", "text": "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error", "parent": 80, "children": [82, 102, 104, 105], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 82}}, {"id": 82, "type": "binary_expression", "text": "- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error", "parent": 81, "children": [83, 96, 98, 99, 101], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 64}}, {"id": 83, "type": "binary_expression", "text": "- (BOOL)storeImage:(UIImage *)image forKey", "parent": 82, "children": [84, 90, 92, 93, 95], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 42}}, {"id": 84, "type": "unary_expression", "text": "- (BOOL)storeImage", "parent": 83, "children": [85, 86], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 18}}, {"id": 85, "type": "-", "text": "-", "parent": 84, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 86, "type": "cast_expression", "text": "(BOOL)storeImage", "parent": 84, "children": [87, 89], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 18}}, {"id": 87, "type": "type_descriptor", "text": "BOOL", "parent": 86, "children": [88], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 88, "type": "type_identifier", "text": "BOOL", "parent": 87, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 89, "type": "identifier", "text": "storeImage", "parent": 86, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 18}}, {"id": 90, "type": "ERROR", "text": ":(UIImage", "parent": 83, "children": [91], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 27}}, {"id": 91, "type": "identifier", "text": "UIImage", "parent": 90, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 27}}, {"id": 92, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 29}}, {"id": 93, "type": "ERROR", "text": ")image", "parent": 83, "children": [94], "start_point": {"row": 25, "column": 29}, "end_point": {"row": 25, "column": 35}}, {"id": 94, "type": "identifier", "text": "image", "parent": 93, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 35}}, {"id": 95, "type": "identifier", "text": "forKey", "parent": 83, "children": [], "start_point": {"row": 25, "column": 36}, "end_point": {"row": 25, "column": 42}}, {"id": 96, "type": "ERROR", "text": ":(NSString", "parent": 82, "children": [97], "start_point": {"row": 25, "column": 42}, "end_point": {"row": 25, "column": 52}}, {"id": 97, "type": "identifier", "text": "NSString", "parent": 96, "children": [], "start_point": {"row": 25, "column": 44}, "end_point": {"row": 25, "column": 52}}, {"id": 98, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 25, "column": 53}, "end_point": {"row": 25, "column": 54}}, {"id": 99, "type": "ERROR", "text": ")key", "parent": 82, "children": [100], "start_point": {"row": 25, "column": 54}, "end_point": {"row": 25, "column": 58}}, {"id": 100, "type": "identifier", "text": "key", "parent": 99, "children": [], "start_point": {"row": 25, "column": 55}, "end_point": {"row": 25, "column": 58}}, {"id": 101, "type": "identifier", "text": "error", "parent": 82, "children": [], "start_point": {"row": 25, "column": 59}, "end_point": {"row": 25, "column": 64}}, {"id": 102, "type": "ERROR", "text": ":(NSError", "parent": 81, "children": [103], "start_point": {"row": 25, "column": 64}, "end_point": {"row": 25, "column": 73}}, {"id": 103, "type": "identifier", "text": "NSError", "parent": 102, "children": [], "start_point": {"row": 25, "column": 66}, "end_point": {"row": 25, "column": 73}}, {"id": 104, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 25, "column": 74}, "end_point": {"row": 25, "column": 75}}, {"id": 105, "type": "pointer_expression", "text": "*)error", "parent": 81, "children": [106, 107], "start_point": {"row": 25, "column": 75}, "end_point": {"row": 25, "column": 82}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 25, "column": 75}, "end_point": {"row": 25, "column": 76}}, {"id": 107, "type": "identifier", "text": "error", "parent": 105, "children": [], "start_point": {"row": 25, "column": 77}, "end_point": {"row": 25, "column": 82}}, {"id": 108, "type": "-", "text": "-", "parent": 80, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 109, "type": "cast_expression", "text": "(void)destroy", "parent": 80, "children": [110, 112], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 15}}, {"id": 110, "type": "type_descriptor", "text": "void", "parent": 109, "children": [111], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 7}}, {"id": 111, "type": "primitive_type", "text": "void", "parent": 110, "children": [], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 7}}, {"id": 112, "type": "identifier", "text": "destroy", "parent": 109, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 15}}, {"id": 113, "type": "ERROR", "text": ":(NSString", "parent": 79, "children": [114], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 25}}, {"id": 114, "type": "identifier", "text": "NSString", "parent": 113, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 25}}, {"id": 115, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 27}}, {"id": 116, "type": "identifier", "text": "key", "parent": 79, "children": [], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 31}}, {"id": 117, "type": "--", "text": "", "parent": 78, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 31}}, {"id": 118, "type": "unary_expression", "text": "- (NSString *)createKey", "parent": null, "children": [119, 120], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 23}}, {"id": 119, "type": "-", "text": "-", "parent": 118, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 120, "type": "cast_expression", "text": "(NSString *)createKey", "parent": 118, "children": [121, 125], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 23}}, {"id": 121, "type": "type_descriptor", "text": "NSString *", "parent": 120, "children": [122, 123], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 13}}, {"id": 122, "type": "type_identifier", "text": "NSString", "parent": 121, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 11}}, {"id": 123, "type": "abstract_pointer_declarator", "text": "*", "parent": 121, "children": [124], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 13}}, {"id": 124, "type": "*", "text": "*", "parent": 123, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 13}}, {"id": 125, "type": "identifier", "text": "createKey", "parent": 120, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 23}}, {"id": 126, "type": "update_expression", "text": "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name;\n- (void)makeExpiring:(NSString *)imgKey", "parent": null, "children": [127, 200], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 32, "column": 39}}, {"id": 127, "type": "binary_expression", "text": "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name;\n- (void)makeExpiring:(NSString *)imgKey", "parent": 126, "children": [128, 196, 198, 199], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 32, "column": 39}}, {"id": 128, "type": "binary_expression", "text": "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name;\n- (void)makeExpiring", "parent": 127, "children": [129, 191, 192], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 32, "column": 20}}, {"id": 129, "type": "binary_expression", "text": "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name", "parent": 128, "children": [130, 187, 189, 190], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 31, "column": 53}}, {"id": 130, "type": "binary_expression", "text": "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName", "parent": 129, "children": [131, 177, 180, 181], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 31, "column": 36}}, {"id": 131, "type": "binary_expression", "text": "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize", "parent": 130, "children": [132, 171, 173, 174, 176], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 30, "column": 47}}, {"id": 132, "type": "binary_expression", "text": "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey", "parent": 131, "children": [133, 161, 164, 165], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 30, "column": 23}}, {"id": 133, "type": "binary_expression", "text": "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize", "parent": 132, "children": [134, 155, 157, 158, 160], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 48}}, {"id": 134, "type": "binary_expression", "text": "- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey", "parent": 133, "children": [135, 148, 149], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 24}}, {"id": 135, "type": "binary_expression", "text": "- (NSString *)pathForKey:(NSString *)key", "parent": 134, "children": [136, 144, 146, 147], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 40}}, {"id": 136, "type": "unary_expression", "text": "- (NSString *)pathForKey", "parent": 135, "children": [137, 138], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 24}}, {"id": 137, "type": "-", "text": "-", "parent": 136, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 138, "type": "cast_expression", "text": "(NSString *)pathForKey", "parent": 136, "children": [139, 143], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 24}}, {"id": 139, "type": "type_descriptor", "text": "NSString *", "parent": 138, "children": [140, 141], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 13}}, {"id": 140, "type": "type_identifier", "text": "NSString", "parent": 139, "children": [], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 11}}, {"id": 141, "type": "abstract_pointer_declarator", "text": "*", "parent": 139, "children": [142], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 13}}, {"id": 142, "type": "*", "text": "*", "parent": 141, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 13}}, {"id": 143, "type": "identifier", "text": "pathForKey", "parent": 138, "children": [], "start_point": {"row": 28, "column": 14}, "end_point": {"row": 28, "column": 24}}, {"id": 144, "type": "ERROR", "text": ":(NSString", "parent": 135, "children": [145], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 34}}, {"id": 145, "type": "identifier", "text": "NSString", "parent": 144, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 34}}, {"id": 146, "type": "*", "text": "*", "parent": 135, "children": [], "start_point": {"row": 28, "column": 35}, "end_point": {"row": 28, "column": 36}}, {"id": 147, "type": "identifier", "text": "key", "parent": 135, "children": [], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 40}}, {"id": 148, "type": "-", "text": "-", "parent": 134, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 149, "type": "cast_expression", "text": "(NSString *)pathForKey", "parent": 134, "children": [150, 154], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 24}}, {"id": 150, "type": "type_descriptor", "text": "NSString *", "parent": 149, "children": [151, 152], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 13}}, {"id": 151, "type": "type_identifier", "text": "NSString", "parent": 150, "children": [], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 11}}, {"id": 152, "type": "abstract_pointer_declarator", "text": "*", "parent": 150, "children": [153], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 13}}, {"id": 153, "type": "*", "text": "*", "parent": 152, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 13}}, {"id": 154, "type": "identifier", "text": "pathForKey", "parent": 149, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 24}}, {"id": 155, "type": "ERROR", "text": ":(NSString", "parent": 133, "children": [156], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 34}}, {"id": 156, "type": "identifier", "text": "NSString", "parent": 155, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 34}}, {"id": 157, "type": "*", "text": "*", "parent": 133, "children": [], "start_point": {"row": 29, "column": 35}, "end_point": {"row": 29, "column": 36}}, {"id": 158, "type": "ERROR", "text": ")key", "parent": 133, "children": [159], "start_point": {"row": 29, "column": 36}, "end_point": {"row": 29, "column": 40}}, {"id": 159, "type": "identifier", "text": "key", "parent": 158, "children": [], "start_point": {"row": 29, "column": 37}, "end_point": {"row": 29, "column": 40}}, {"id": 160, "type": "identifier", "text": "forSize", "parent": 133, "children": [], "start_point": {"row": 29, "column": 41}, "end_point": {"row": 29, "column": 48}}, {"id": 161, "type": "ERROR", "text": ":(int)size;", "parent": 132, "children": [162, 163], "start_point": {"row": 29, "column": 48}, "end_point": {"row": 29, "column": 59}}, {"id": 162, "type": "primitive_type", "text": "int", "parent": 161, "children": [], "start_point": {"row": 29, "column": 50}, "end_point": {"row": 29, "column": 53}}, {"id": 163, "type": "identifier", "text": "size", "parent": 161, "children": [], "start_point": {"row": 29, "column": 54}, "end_point": {"row": 29, "column": 58}}, {"id": 164, "type": "-", "text": "-", "parent": 132, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 165, "type": "cast_expression", "text": "(NSString *)keyForKey", "parent": 132, "children": [166, 170], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 23}}, {"id": 166, "type": "type_descriptor", "text": "NSString *", "parent": 165, "children": [167, 168], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 13}}, {"id": 167, "type": "type_identifier", "text": "NSString", "parent": 166, "children": [], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 11}}, {"id": 168, "type": "abstract_pointer_declarator", "text": "*", "parent": 166, "children": [169], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 13}}, {"id": 169, "type": "*", "text": "*", "parent": 168, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 13}}, {"id": 170, "type": "identifier", "text": "keyForKey", "parent": 165, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 23}}, {"id": 171, "type": "ERROR", "text": ":(NSString", "parent": 131, "children": [172], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 33}}, {"id": 172, "type": "identifier", "text": "NSString", "parent": 171, "children": [], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 33}}, {"id": 173, "type": "*", "text": "*", "parent": 131, "children": [], "start_point": {"row": 30, "column": 34}, "end_point": {"row": 30, "column": 35}}, {"id": 174, "type": "ERROR", "text": ")key", "parent": 131, "children": [175], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 39}}, {"id": 175, "type": "identifier", "text": "key", "parent": 174, "children": [], "start_point": {"row": 30, "column": 36}, "end_point": {"row": 30, "column": 39}}, {"id": 176, "type": "identifier", "text": "forSize", "parent": 131, "children": [], "start_point": {"row": 30, "column": 40}, "end_point": {"row": 30, "column": 47}}, {"id": 177, "type": "ERROR", "text": ":(int)size;", "parent": 130, "children": [178, 179], "start_point": {"row": 30, "column": 47}, "end_point": {"row": 30, "column": 58}}, {"id": 178, "type": "primitive_type", "text": "int", "parent": 177, "children": [], "start_point": {"row": 30, "column": 49}, "end_point": {"row": 30, "column": 52}}, {"id": 179, "type": "identifier", "text": "size", "parent": 177, "children": [], "start_point": {"row": 30, "column": 53}, "end_point": {"row": 30, "column": 57}}, {"id": 180, "type": "-", "text": "-", "parent": 130, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 181, "type": "cast_expression", "text": "(UIImage *)iconicTaxonImageForName", "parent": 130, "children": [182, 186], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 36}}, {"id": 182, "type": "type_descriptor", "text": "UIImage *", "parent": 181, "children": [183, 184], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 12}}, {"id": 183, "type": "type_identifier", "text": "UIImage", "parent": 182, "children": [], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 10}}, {"id": 184, "type": "abstract_pointer_declarator", "text": "*", "parent": 182, "children": [185], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 12}}, {"id": 185, "type": "*", "text": "*", "parent": 184, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 12}}, {"id": 186, "type": "identifier", "text": "iconicTaxonImageForName", "parent": 181, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 36}}, {"id": 187, "type": "ERROR", "text": ":(NSString", "parent": 129, "children": [188], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 46}}, {"id": 188, "type": "identifier", "text": "NSString", "parent": 187, "children": [], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 46}}, {"id": 189, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 31, "column": 47}, "end_point": {"row": 31, "column": 48}}, {"id": 190, "type": "identifier", "text": "name", "parent": 129, "children": [], "start_point": {"row": 31, "column": 49}, "end_point": {"row": 31, "column": 53}}, {"id": 191, "type": "-", "text": "-", "parent": 128, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 1}}, {"id": 192, "type": "cast_expression", "text": "(void)makeExpiring", "parent": 128, "children": [193, 195], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 20}}, {"id": 193, "type": "type_descriptor", "text": "void", "parent": 192, "children": [194], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 32, "column": 7}}, {"id": 194, "type": "primitive_type", "text": "void", "parent": 193, "children": [], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 32, "column": 7}}, {"id": 195, "type": "identifier", "text": "makeExpiring", "parent": 192, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 20}}, {"id": 196, "type": "ERROR", "text": ":(NSString", "parent": 127, "children": [197], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 30}}, {"id": 197, "type": "identifier", "text": "NSString", "parent": 196, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 30}}, {"id": 198, "type": "*", "text": "*", "parent": 127, "children": [], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 32}}, {"id": 199, "type": "identifier", "text": "imgKey", "parent": 127, "children": [], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 39}}, {"id": 200, "type": "--", "text": "", "parent": 126, "children": [], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 39}}, {"id": 201, "type": "unary_expression", "text": "- (NSString *)usageStatsString", "parent": null, "children": [202, 203], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 30}}, {"id": 202, "type": "-", "text": "-", "parent": 201, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 203, "type": "cast_expression", "text": "(NSString *)usageStatsString", "parent": 201, "children": [204, 208], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 30}}, {"id": 204, "type": "type_descriptor", "text": "NSString *", "parent": 203, "children": [205, 206], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 13}}, {"id": 205, "type": "type_identifier", "text": "NSString", "parent": 204, "children": [], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 11}}, {"id": 206, "type": "abstract_pointer_declarator", "text": "*", "parent": 204, "children": [207], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 13}}, {"id": 207, "type": "*", "text": "*", "parent": 206, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 13}}, {"id": 208, "type": "identifier", "text": "usageStatsString", "parent": 203, "children": [], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 30}}, {"id": 209, "type": "unary_expression", "text": "- (void)clearEntireStore", "parent": null, "children": [210, 211], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 24}}, {"id": 210, "type": "-", "text": "-", "parent": 209, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 211, "type": "cast_expression", "text": "(void)clearEntireStore", "parent": 209, "children": [212, 214], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 24}}, {"id": 212, "type": "type_descriptor", "text": "void", "parent": 211, "children": [213], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 7}}, {"id": 213, "type": "primitive_type", "text": "void", "parent": 212, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 7}}, {"id": 214, "type": "identifier", "text": "clearEntireStore", "parent": 211, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 24}}, {"id": 215, "type": "unary_expression", "text": "+ (NSArray *)assetCollectionSubtypes", "parent": null, "children": [216, 217], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 36}}, {"id": 216, "type": "+", "text": "+", "parent": 215, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 217, "type": "cast_expression", "text": "(NSArray *)assetCollectionSubtypes", "parent": 215, "children": [218, 222], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 36}}, {"id": 218, "type": "type_descriptor", "text": "NSArray *", "parent": 217, "children": [219, 220], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 12}}, {"id": 219, "type": "type_identifier", "text": "NSArray", "parent": 218, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 10}}, {"id": 220, "type": "abstract_pointer_declarator", "text": "*", "parent": 218, "children": [221], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 12}}, {"id": 221, "type": "*", "text": "*", "parent": 220, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 12}}, {"id": 222, "type": "identifier", "text": "assetCollectionSubtypes", "parent": 217, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 36}}, {"id": 223, "type": "ERROR", "text": "+ (UIImage *)imageWithImage:(UIImage *)image squashedToFillSize:(CGSize)", "parent": null, "children": [224, 239], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 72}}, {"id": 224, "type": "binary_expression", "text": "+ (UIImage *)imageWithImage:(UIImage *)image squashedToFillSize", "parent": 223, "children": [225, 233, 235, 236, 238], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 63}}, {"id": 225, "type": "unary_expression", "text": "+ (UIImage *)imageWithImage", "parent": 224, "children": [226, 227], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 27}}, {"id": 226, "type": "+", "text": "+", "parent": 225, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 227, "type": "cast_expression", "text": "(UIImage *)imageWithImage", "parent": 225, "children": [228, 232], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 27}}, {"id": 228, "type": "type_descriptor", "text": "UIImage *", "parent": 227, "children": [229, 230], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 12}}, {"id": 229, "type": "type_identifier", "text": "UIImage", "parent": 228, "children": [], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 10}}, {"id": 230, "type": "abstract_pointer_declarator", "text": "*", "parent": 228, "children": [231], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 12}}, {"id": 231, "type": "*", "text": "*", "parent": 230, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 12}}, {"id": 232, "type": "identifier", "text": "imageWithImage", "parent": 227, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 27}}, {"id": 233, "type": "ERROR", "text": ":(UIImage", "parent": 224, "children": [234], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 36}}, {"id": 234, "type": "identifier", "text": "UIImage", "parent": 233, "children": [], "start_point": {"row": 36, "column": 29}, "end_point": {"row": 36, "column": 36}}, {"id": 235, "type": "*", "text": "*", "parent": 224, "children": [], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 38}}, {"id": 236, "type": "ERROR", "text": ")image", "parent": 224, "children": [237], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 44}}, {"id": 237, "type": "identifier", "text": "image", "parent": 236, "children": [], "start_point": {"row": 36, "column": 39}, "end_point": {"row": 36, "column": 44}}, {"id": 238, "type": "identifier", "text": "squashedToFillSize", "parent": 224, "children": [], "start_point": {"row": 36, "column": 45}, "end_point": {"row": 36, "column": 63}}, {"id": 239, "type": "identifier", "text": "CGSize", "parent": 223, "children": [], "start_point": {"row": 36, "column": 65}, "end_point": {"row": 36, "column": 71}}, {"id": 240, "type": "identifier", "text": "size", "parent": null, "children": [], "start_point": {"row": 36, "column": 72}, "end_point": {"row": 36, "column": 76}}, {"id": 241, "type": "ERROR", "text": "- (void)cleanupImageStoreUsingValidPhotoKeys:(NSArray *)validPhotoKeys\n syncedPhotoKeys:(NSArray *)syncedPhotoKeys\n allowedExecutionTime:(NSTimeInterval)allowedExecutionSeconds;\n\n@end", "parent": null, "children": [242, 262, 263, 264], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 42, "column": 4}}, {"id": 242, "type": "binary_expression", "text": "- (void)cleanupImageStoreUsingValidPhotoKeys:(NSArray *)validPhotoKeys\n syncedPhotoKeys:(NSArray *)syncedPhotoKeys\n allowedExecutionTime", "parent": 241, "children": [243, 256, 258, 259, 261], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 40, "column": 44}}, {"id": 243, "type": "binary_expression", "text": "- (void)cleanupImageStoreUsingValidPhotoKeys:(NSArray *)validPhotoKeys\n syncedPhotoKeys", "parent": 242, "children": [244, 250, 252, 253, 255], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 44}}, {"id": 244, "type": "unary_expression", "text": "- (void)cleanupImageStoreUsingValidPhotoKeys", "parent": 243, "children": [245, 246], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 44}}, {"id": 245, "type": "-", "text": "-", "parent": 244, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 246, "type": "cast_expression", "text": "(void)cleanupImageStoreUsingValidPhotoKeys", "parent": 244, "children": [247, 249], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 44}}, {"id": 247, "type": "type_descriptor", "text": "void", "parent": 246, "children": [248], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 7}}, {"id": 248, "type": "primitive_type", "text": "void", "parent": 247, "children": [], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 7}}, {"id": 249, "type": "identifier", "text": "cleanupImageStoreUsingValidPhotoKeys", "parent": 246, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 44}}, {"id": 250, "type": "ERROR", "text": ":(NSArray", "parent": 243, "children": [251], "start_point": {"row": 38, "column": 44}, "end_point": {"row": 38, "column": 53}}, {"id": 251, "type": "identifier", "text": "NSArray", "parent": 250, "children": [], "start_point": {"row": 38, "column": 46}, "end_point": {"row": 38, "column": 53}}, {"id": 252, "type": "*", "text": "*", "parent": 243, "children": [], "start_point": {"row": 38, "column": 54}, "end_point": {"row": 38, "column": 55}}, {"id": 253, "type": "ERROR", "text": ")validPhotoKeys", "parent": 243, "children": [254], "start_point": {"row": 38, "column": 55}, "end_point": {"row": 38, "column": 70}}, {"id": 254, "type": "identifier", "text": "validPhotoKeys", "parent": 253, "children": [], "start_point": {"row": 38, "column": 56}, "end_point": {"row": 38, "column": 70}}, {"id": 255, "type": "identifier", "text": "syncedPhotoKeys", "parent": 243, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 44}}, {"id": 256, "type": "ERROR", "text": ":(NSArray", "parent": 242, "children": [257], "start_point": {"row": 39, "column": 44}, "end_point": {"row": 39, "column": 53}}, {"id": 257, "type": "identifier", "text": "NSArray", "parent": 256, "children": [], "start_point": {"row": 39, "column": 46}, "end_point": {"row": 39, "column": 53}}, {"id": 258, "type": "*", "text": "*", "parent": 242, "children": [], "start_point": {"row": 39, "column": 54}, "end_point": {"row": 39, "column": 55}}, {"id": 259, "type": "ERROR", "text": ")syncedPhotoKeys", "parent": 242, "children": [260], "start_point": {"row": 39, "column": 55}, "end_point": {"row": 39, "column": 71}}, {"id": 260, "type": "identifier", "text": "syncedPhotoKeys", "parent": 259, "children": [], "start_point": {"row": 39, "column": 56}, "end_point": {"row": 39, "column": 71}}, {"id": 261, "type": "identifier", "text": "allowedExecutionTime", "parent": 242, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 44}}, {"id": 262, "type": "identifier", "text": "NSTimeInterval", "parent": 241, "children": [], "start_point": {"row": 40, "column": 46}, "end_point": {"row": 40, "column": 60}}, {"id": 263, "type": "identifier", "text": "allowedExecutionSeconds", "parent": 241, "children": [], "start_point": {"row": 40, "column": 61}, "end_point": {"row": 40, "column": 84}}, {"id": 264, "type": "ERROR", "text": "@", "parent": 241, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 1}}]}, "node_categories": {"declarations": {"functions": [29, 38], "variables": [47], "classes": [], "imports": [], "modules": [], "enums": [6, 7, 8, 9, 13, 17, 21, 25]}, "statements": {"expressions": [52, 54, 61, 62, 64, 78, 79, 80, 81, 82, 83, 84, 86, 105, 109, 118, 120, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 138, 149, 165, 181, 192, 201, 203, 209, 211, 215, 217, 224, 225, 227, 242, 243, 244, 246], "assignments": [], "loops": [], "conditionals": [10, 14, 18, 22, 26, 31, 33, 37, 39, 41, 43, 45, 46, 48, 51, 56, 59, 66, 69, 71, 74, 75, 77, 88, 89, 91, 94, 95, 97, 100, 101, 103, 107, 112, 114, 116, 122, 125, 140, 143, 145, 147, 151, 154, 156, 159, 160, 163, 167, 170, 172, 175, 176, 179, 183, 186, 188, 190, 195, 197, 199, 205, 208, 214, 219, 222, 229, 232, 234, 237, 238, 239, 240, 249, 251, 254, 255, 257, 260, 261, 262, 263], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3], "literals": [12, 16, 20, 24, 28], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "#define radians( degrees ) ( degrees * M_PI / 180 )\n"}, {"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "ImageStore : NSObject\n@property (nonatomic, strong)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// ImageStore.h\n// iNaturalist\n//\n// Created by <NAME> on 2/20/12.\n// Copyright (c) 2012 iNaturalist. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <AssetsLibrary/AssetsLibrary.h>\n\nenum {\n ImageStoreOriginalSize = 0,\n ImageStoreSquareSize = 1,\n ImageStoreSmallSize = 2,\n ImageStoreMediumSize = 3,\n ImageStoreLargeSize = 4\n};\n\n#define radians( degrees ) ( degrees * M_PI / 180 )\n\n@interface ImageStore : NSObject\n@property (nonatomic, strong) NSMutableDictionary *dictionary;\n+ (ImageStore *)sharedImageStore;\n- (UIImage *)find:(NSString *)key forSize:(int)size;\n- (BOOL)storeImage:(UIImage *)image forKey:(NSString *)key error:(NSError **)error;\n- (void)destroy:(NSString *)key;\n- (NSString *)createKey;\n- (NSString *)pathForKey:(NSString *)key;\n- (NSString *)pathForKey:(NSString *)key forSize:(int)size;\n- (NSString *)keyForKey:(NSString *)key forSize:(int)size;\n- (UIImage *)iconicTaxonImageForName:(NSString *)name;\n- (void)makeExpiring:(NSString *)imgKey;\n- (NSString *)usageStatsString;\n- (void)clearEntireStore;\n+ (NSArray *)assetCollectionSubtypes;\n+ (UIImage *)imageWithImage:(UIImage *)image squashedToFillSize:(CGSize)size;\n\n- (void)cleanupImageStoreUsingValidPhotoKeys:(NSArray *)validPhotoKeys\n syncedPhotoKeys:(NSArray *)syncedPhotoKeys\n allowedExecutionTime:(NSTimeInterval)allowedExecutionSeconds;\n\n@end\n"}
80,927
c
#pragma once #include <Config/ConfigProps.h> #include <Config/EnvironmentType.h> #include <Common/Util/BitUtil.h> #include <Common/Util/FileUtil.h> #include <json/json.h> #include <cstdint> #include <string> class WalletConfig { public: WalletConfig(const Json::Value& json, const EEnvironmentType environment, const fs::path& dataPath) { if (environment == EEnvironmentType::MAINNET) { m_listenPort = 3415; // TODO: Read value m_ownerPort = 3420; // TODO: Read value m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>); m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>); } else { m_listenPort = 13415; m_ownerPort = 13420; m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>); m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>); } m_walletPath = FileUtil::ToPath(dataPath.u8string() + "WALLET/"); FileUtil::CreateDirectories(m_walletPath); m_databaseType = "SQLITE"; m_minimumConfirmations = 10; m_enableGrinbox = false; if (json.isMember(ConfigProps::Wallet::WALLET)) { const Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET]; m_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString(); m_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt(); m_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool(); } } const fs::path& GetWalletDirectory() const { return m_walletPath; } const std::string& GetDatabaseType() const { return m_databaseType; } uint32_t GetListenPort() const { return m_listenPort; } uint32_t GetOwnerPort() const { return m_ownerPort; } uint32_t GetPublicKeyVersion() const { return m_publicKeyVersion; } uint32_t GetPrivateKeyVersion() const { return m_privateKeyVersion; } uint32_t GetMinimumConfirmations() const { return m_minimumConfirmations; } bool IsGrinboxEnabled() const { return m_enableGrinbox; } private: fs::path m_walletPath; std::string m_databaseType; uint32_t m_listenPort; uint32_t m_ownerPort; uint32_t m_publicKeyVersion; uint32_t m_privateKeyVersion; uint32_t m_minimumConfirmations; bool m_enableGrinbox; };
35.72
58
(translation_unit) "#pragma once\n\n#include <Config/ConfigProps.h>\n#include <Config/EnvironmentType.h>\n#include <Common/Util/BitUtil.h>\n#include <Common/Util/FileUtil.h>\n#include <json/json.h>\n#include <cstdint>\n#include <string>\n\nclass WalletConfig\n{\npublic:\n WalletConfig(const Json::Value& json, const EEnvironmentType environment, const fs::path& dataPath)\n {\n if (environment == EEnvironmentType::MAINNET)\n {\n m_listenPort = 3415; // TODO: Read value\n m_ownerPort = 3420; // TODO: Read value\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }\n else\n {\n m_listenPort = 13415;\n m_ownerPort = 13420;\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }\n\n m_walletPath = FileUtil::ToPath(dataPath.u8string() + "WALLET/");\n FileUtil::CreateDirectories(m_walletPath);\n\n m_databaseType = "SQLITE";\n m_minimumConfirmations = 10;\n m_enableGrinbox = false;\n if (json.isMember(ConfigProps::Wallet::WALLET))\n {\n const Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];\n\n m_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString();\n m_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt();\n m_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool();\n }\n }\n\n const fs::path& GetWalletDirectory() const { return m_walletPath; }\n const std::string& GetDatabaseType() const { return m_databaseType; }\n uint32_t GetListenPort() const { return m_listenPort; }\n uint32_t GetOwnerPort() const { return m_ownerPort; }\n uint32_t GetPublicKeyVersion() const { return m_publicKeyVersion; }\n uint32_t GetPrivateKeyVersion() const { return m_privateKeyVersion; }\n uint32_t GetMinimumConfirmations() const { return m_minimumConfirmations; }\n bool IsGrinboxEnabled() const { return m_enableGrinbox; }\n\nprivate:\n fs::path m_walletPath;\n std::string m_databaseType;\n uint32_t m_listenPort;\n uint32_t m_ownerPort;\n uint32_t m_publicKeyVersion;\n uint32_t m_privateKeyVersion;\n uint32_t m_minimumConfirmations;\n bool m_enableGrinbox;\n};\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <Config/ConfigProps.h>\n" (#include) "#include" (system_lib_string) "<Config/ConfigProps.h>" (preproc_include) "#include <Config/EnvironmentType.h>\n" (#include) "#include" (system_lib_string) "<Config/EnvironmentType.h>" (preproc_include) "#include <Common/Util/BitUtil.h>\n" (#include) "#include" (system_lib_string) "<Common/Util/BitUtil.h>" (preproc_include) "#include <Common/Util/FileUtil.h>\n" (#include) "#include" (system_lib_string) "<Common/Util/FileUtil.h>" (preproc_include) "#include <json/json.h>\n" (#include) "#include" (system_lib_string) "<json/json.h>" (preproc_include) "#include <cstdint>\n" (#include) "#include" (system_lib_string) "<cstdint>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (function_definition) "class WalletConfig\n{\npublic:\n WalletConfig(const Json::Value& json, const EEnvironmentType environment, const fs::path& dataPath)\n {\n if (environment == EEnvironmentType::MAINNET)\n {\n m_listenPort = 3415; // TODO: Read value\n m_ownerPort = 3420; // TODO: Read value\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }\n else\n {\n m_listenPort = 13415;\n m_ownerPort = 13420;\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }\n\n m_walletPath = FileUtil::ToPath(dataPath.u8string() + "WALLET/");\n FileUtil::CreateDirectories(m_walletPath);\n\n m_databaseType = "SQLITE";\n m_minimumConfirmations = 10;\n m_enableGrinbox = false;\n if (json.isMember(ConfigProps::Wallet::WALLET))\n {\n const Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];\n\n m_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString();\n m_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt();\n m_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool();\n }\n }\n\n const fs::path& GetWalletDirectory() const { return m_walletPath; }\n const std::string& GetDatabaseType() const { return m_databaseType; }\n uint32_t GetListenPort() const { return m_listenPort; }\n uint32_t GetOwnerPort() const { return m_ownerPort; }\n uint32_t GetPublicKeyVersion() const { return m_publicKeyVersion; }\n uint32_t GetPrivateKeyVersion() const { return m_privateKeyVersion; }\n uint32_t GetMinimumConfirmations() const { return m_minimumConfirmations; }\n bool IsGrinboxEnabled() const { return m_enableGrinbox; }\n\nprivate:\n fs::path m_walletPath;\n std::string m_databaseType;\n uint32_t m_listenPort;\n uint32_t m_ownerPort;\n uint32_t m_publicKeyVersion;\n uint32_t m_privateKeyVersion;\n uint32_t m_minimumConfirmations;\n bool m_enableGrinbox;\n}" (type_identifier) "class" (identifier) "WalletConfig" (compound_statement) "{\npublic:\n WalletConfig(const Json::Value& json, const EEnvironmentType environment, const fs::path& dataPath)\n {\n if (environment == EEnvironmentType::MAINNET)\n {\n m_listenPort = 3415; // TODO: Read value\n m_ownerPort = 3420; // TODO: Read value\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }\n else\n {\n m_listenPort = 13415;\n m_ownerPort = 13420;\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }\n\n m_walletPath = FileUtil::ToPath(dataPath.u8string() + "WALLET/");\n FileUtil::CreateDirectories(m_walletPath);\n\n m_databaseType = "SQLITE";\n m_minimumConfirmations = 10;\n m_enableGrinbox = false;\n if (json.isMember(ConfigProps::Wallet::WALLET))\n {\n const Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];\n\n m_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString();\n m_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt();\n m_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool();\n }\n }\n\n const fs::path& GetWalletDirectory() const { return m_walletPath; }\n const std::string& GetDatabaseType() const { return m_databaseType; }\n uint32_t GetListenPort() const { return m_listenPort; }\n uint32_t GetOwnerPort() const { return m_ownerPort; }\n uint32_t GetPublicKeyVersion() const { return m_publicKeyVersion; }\n uint32_t GetPrivateKeyVersion() const { return m_privateKeyVersion; }\n uint32_t GetMinimumConfirmations() const { return m_minimumConfirmations; }\n bool IsGrinboxEnabled() const { return m_enableGrinbox; }\n\nprivate:\n fs::path m_walletPath;\n std::string m_databaseType;\n uint32_t m_listenPort;\n uint32_t m_ownerPort;\n uint32_t m_publicKeyVersion;\n uint32_t m_privateKeyVersion;\n uint32_t m_minimumConfirmations;\n bool m_enableGrinbox;\n}" ({) "{" (labeled_statement) "public:\n WalletConfig(const Json::Value& json, const" (statement_identifier) "public" (:) ":" (labeled_statement) "WalletConfig(const Json::Value& json, const" (statement_identifier) "WalletConfig" (ERROR) "(const Json:" (() "(" (type_descriptor) "const Json" (type_qualifier) "const" (const) "const" (type_identifier) "Json" (:) ":" (:) ":" (expression_statement) "Value& json, const" (comma_expression) "Value& json, const" (binary_expression) "Value& json" (identifier) "Value" (&) "&" (identifier) "json" (,) "," (identifier) "const" (;) "" (ERROR) "EEnvironmentType environment, const fs::path& dataPath)" (type_identifier) "EEnvironmentType" (identifier) "environment" (,) "," (ERROR) "const fs::path&" (identifier) "const" (identifier) "fs" (:) ":" (:) ":" (identifier) "path" (&) "&" (identifier) "dataPath" ()) ")" (compound_statement) "{\n if (environment == EEnvironmentType::MAINNET)\n {\n m_listenPort = 3415; // TODO: Read value\n m_ownerPort = 3420; // TODO: Read value\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }\n else\n {\n m_listenPort = 13415;\n m_ownerPort = 13420;\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }\n\n m_walletPath = FileUtil::ToPath(dataPath.u8string() + "WALLET/");\n FileUtil::CreateDirectories(m_walletPath);\n\n m_databaseType = "SQLITE";\n m_minimumConfirmations = 10;\n m_enableGrinbox = false;\n if (json.isMember(ConfigProps::Wallet::WALLET))\n {\n const Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];\n\n m_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString();\n m_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt();\n m_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool();\n }\n }" ({) "{" (if_statement) "if (environment == EEnvironmentType::MAINNET)\n {\n m_listenPort = 3415; // TODO: Read value\n m_ownerPort = 3420; // TODO: Read value\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }\n else\n {\n m_listenPort = 13415;\n m_ownerPort = 13420;\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }" (if) "if" (parenthesized_expression) "(environment == EEnvironmentType::MAINNET)" (() "(" (binary_expression) "environment == EEnvironmentType" (identifier) "environment" (==) "==" (identifier) "EEnvironmentType" (ERROR) "::MAINNET" (:) ":" (:) ":" (identifier) "MAINNET" ()) ")" (compound_statement) "{\n m_listenPort = 3415; // TODO: Read value\n m_ownerPort = 3420; // TODO: Read value\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }" ({) "{" (expression_statement) "m_listenPort = 3415;" (assignment_expression) "m_listenPort = 3415" (identifier) "m_listenPort" (=) "=" (number_literal) "3415" (;) ";" (comment) "// TODO: Read value" (expression_statement) "m_ownerPort = 3420;" (assignment_expression) "m_ownerPort = 3420" (identifier) "m_ownerPort" (=) "=" (number_literal) "3420" (;) ";" (comment) "// TODO: Read value" (ERROR) "m_privateKeyVersion = BitUtil::" (assignment_expression) "m_privateKeyVersion = BitUtil" (identifier) "m_privateKeyVersion" (=) "=" (identifier) "BitUtil" (:) ":" (:) ":" (expression_statement) "ConvertToU32(<KEY>);" (binary_expression) "ConvertToU32(<KEY" (identifier) "ConvertToU32" (ERROR) "(" (() "(" (<) "<" (identifier) "KEY" (ERROR) ">)" (>) ">" ()) ")" (;) ";" (ERROR) "m_publicKeyVersion = BitUtil::" (assignment_expression) "m_publicKeyVersion = BitUtil" (identifier) "m_publicKeyVersion" (=) "=" (identifier) "BitUtil" (:) ":" (:) ":" (expression_statement) "ConvertToU32(<KEY>);" (binary_expression) "ConvertToU32(<KEY" (identifier) "ConvertToU32" (ERROR) "(" (() "(" (<) "<" (identifier) "KEY" (ERROR) ">)" (>) ">" ()) ")" (;) ";" (}) "}" (else_clause) "else\n {\n m_listenPort = 13415;\n m_ownerPort = 13420;\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }" (else) "else" (compound_statement) "{\n m_listenPort = 13415;\n m_ownerPort = 13420;\n m_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n m_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n }" ({) "{" (expression_statement) "m_listenPort = 13415;" (assignment_expression) "m_listenPort = 13415" (identifier) "m_listenPort" (=) "=" (number_literal) "13415" (;) ";" (expression_statement) "m_ownerPort = 13420;" (assignment_expression) "m_ownerPort = 13420" (identifier) "m_ownerPort" (=) "=" (number_literal) "13420" (;) ";" (ERROR) "m_privateKeyVersion = BitUtil::" (assignment_expression) "m_privateKeyVersion = BitUtil" (identifier) "m_privateKeyVersion" (=) "=" (identifier) "BitUtil" (:) ":" (:) ":" (expression_statement) "ConvertToU32(<KEY>);" (binary_expression) "ConvertToU32(<KEY" (identifier) "ConvertToU32" (ERROR) "(" (() "(" (<) "<" (identifier) "KEY" (ERROR) ">)" (>) ">" ()) ")" (;) ";" (ERROR) "m_publicKeyVersion = BitUtil::" (assignment_expression) "m_publicKeyVersion = BitUtil" (identifier) "m_publicKeyVersion" (=) "=" (identifier) "BitUtil" (:) ":" (:) ":" (expression_statement) "ConvertToU32(<KEY>);" (binary_expression) "ConvertToU32(<KEY" (identifier) "ConvertToU32" (ERROR) "(" (() "(" (<) "<" (identifier) "KEY" (ERROR) ">)" (>) ">" ()) ")" (;) ";" (}) "}" (ERROR) "m_walletPath = FileUtil::" (assignment_expression) "m_walletPath = FileUtil" (identifier) "m_walletPath" (=) "=" (identifier) "FileUtil" (:) ":" (:) ":" (expression_statement) "ToPath(dataPath.u8string() + "WALLET/");" (call_expression) "ToPath(dataPath.u8string() + "WALLET/")" (identifier) "ToPath" (argument_list) "(dataPath.u8string() + "WALLET/")" (() "(" (binary_expression) "dataPath.u8string() + "WALLET/"" (call_expression) "dataPath.u8string()" (field_expression) "dataPath.u8string" (identifier) "dataPath" (.) "." (field_identifier) "u8string" (argument_list) "()" (() "(" ()) ")" (+) "+" (string_literal) ""WALLET/"" (") """ (string_content) "WALLET/" (") """ ()) ")" (;) ";" (labeled_statement) "FileUtil::CreateDirectories(m_walletPath);" (statement_identifier) "FileUtil" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "CreateDirectories(m_walletPath);" (call_expression) "CreateDirectories(m_walletPath)" (identifier) "CreateDirectories" (argument_list) "(m_walletPath)" (() "(" (identifier) "m_walletPath" ()) ")" (;) ";" (expression_statement) "m_databaseType = "SQLITE";" (assignment_expression) "m_databaseType = "SQLITE"" (identifier) "m_databaseType" (=) "=" (string_literal) ""SQLITE"" (") """ (string_content) "SQLITE" (") """ (;) ";" (expression_statement) "m_minimumConfirmations = 10;" (assignment_expression) "m_minimumConfirmations = 10" (identifier) "m_minimumConfirmations" (=) "=" (number_literal) "10" (;) ";" (expression_statement) "m_enableGrinbox = false;" (assignment_expression) "m_enableGrinbox = false" (identifier) "m_enableGrinbox" (=) "=" (false) "false" (;) ";" (if_statement) "if (json.isMember(ConfigProps::Wallet::WALLET))\n {\n const Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];\n\n m_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString();\n m_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt();\n m_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool();\n }" (if) "if" (parenthesized_expression) "(json.isMember(ConfigProps::Wallet::WALLET))" (() "(" (call_expression) "json.isMember(ConfigProps::Wallet::WALLET)" (field_expression) "json.isMember" (identifier) "json" (.) "." (field_identifier) "isMember" (argument_list) "(ConfigProps::Wallet::WALLET)" (() "(" (identifier) "ConfigProps" (ERROR) "::Wallet::WALLET" (:) ":" (:) ":" (identifier) "Wallet" (:) ":" (:) ":" (identifier) "WALLET" ()) ")" ()) ")" (compound_statement) "{\n const Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];\n\n m_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString();\n m_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt();\n m_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool();\n }" ({) "{" (declaration) "const Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];" (type_qualifier) "const" (const) "const" (type_identifier) "Json" (ERROR) "::Value&" (:) ":" (:) ":" (identifier) "Value" (&) "&" (init_declarator) "walletJSON = json[ConfigProps::Wallet::WALLET]" (identifier) "walletJSON" (=) "=" (subscript_expression) "json[ConfigProps::Wallet::WALLET]" (identifier) "json" ([) "[" (identifier) "ConfigProps" (ERROR) "::Wallet::WALLET" (:) ":" (:) ":" (identifier) "Wallet" (:) ":" (:) ":" (identifier) "WALLET" (]) "]" (;) ";" (expression_statement) "m_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString();" (assignment_expression) "m_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString()" (identifier) "m_databaseType" (=) "=" (call_expression) "walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString()" (field_expression) "walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE").asString" (call_expression) "walletJSON.get(ConfigProps::Wallet::DATABASE, "SQLITE")" (field_expression) "walletJSON.get" (identifier) "walletJSON" (.) "." (field_identifier) "get" (argument_list) "(ConfigProps::Wallet::DATABASE, "SQLITE")" (() "(" (identifier) "ConfigProps" (ERROR) "::Wallet::DATABASE" (:) ":" (:) ":" (identifier) "Wallet" (:) ":" (:) ":" (identifier) "DATABASE" (,) "," (string_literal) ""SQLITE"" (") """ (string_content) "SQLITE" (") """ ()) ")" (.) "." (field_identifier) "asString" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "m_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt();" (assignment_expression) "m_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt()" (identifier) "m_minimumConfirmations" (=) "=" (call_expression) "walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt()" (field_expression) "walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt" (call_expression) "walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10)" (field_expression) "walletJSON.get" (identifier) "walletJSON" (.) "." (field_identifier) "get" (argument_list) "(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10)" (() "(" (ERROR) "ConfigProps::Wallet::" (identifier) "ConfigProps" (:) ":" (:) ":" (identifier) "Wallet" (:) ":" (:) ":" (identifier) "MIN_CONFIRMATIONS" (,) "," (number_literal) "10" ()) ")" (.) "." (field_identifier) "asUInt" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "m_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool();" (assignment_expression) "m_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool()" (identifier) "m_enableGrinbox" (=) "=" (call_expression) "walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool()" (field_expression) "walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool" (call_expression) "walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false)" (field_expression) "walletJSON.get" (identifier) "walletJSON" (.) "." (field_identifier) "get" (argument_list) "(ConfigProps::Wallet::ENABLE_GRINBOX, false)" (() "(" (ERROR) "ConfigProps::Wallet::" (identifier) "ConfigProps" (:) ":" (:) ":" (identifier) "Wallet" (:) ":" (:) ":" (identifier) "ENABLE_GRINBOX" (,) "," (false) "false" ()) ")" (.) "." (field_identifier) "asBool" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (}) "}" (ERROR) "const fs::path& GetWalletDirectory() const" (type_qualifier) "const" (const) "const" (type_identifier) "fs" (ERROR) "::path&" (:) ":" (:) ":" (identifier) "path" (&) "&" (function_declarator) "GetWalletDirectory()" (identifier) "GetWalletDirectory" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_walletPath; }" ({) "{" (return_statement) "return m_walletPath;" (return) "return" (identifier) "m_walletPath" (;) ";" (}) "}" (ERROR) "const std::string& GetDatabaseType() const" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (function_declarator) "GetDatabaseType()" (identifier) "GetDatabaseType" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_databaseType; }" ({) "{" (return_statement) "return m_databaseType;" (return) "return" (identifier) "m_databaseType" (;) ";" (}) "}" (ERROR) "uint32_t GetListenPort() const" (primitive_type) "uint32_t" (function_declarator) "GetListenPort()" (identifier) "GetListenPort" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_listenPort; }" ({) "{" (return_statement) "return m_listenPort;" (return) "return" (identifier) "m_listenPort" (;) ";" (}) "}" (ERROR) "uint32_t GetOwnerPort() const" (primitive_type) "uint32_t" (function_declarator) "GetOwnerPort()" (identifier) "GetOwnerPort" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_ownerPort; }" ({) "{" (return_statement) "return m_ownerPort;" (return) "return" (identifier) "m_ownerPort" (;) ";" (}) "}" (ERROR) "uint32_t GetPublicKeyVersion() const" (primitive_type) "uint32_t" (function_declarator) "GetPublicKeyVersion()" (identifier) "GetPublicKeyVersion" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_publicKeyVersion; }" ({) "{" (return_statement) "return m_publicKeyVersion;" (return) "return" (identifier) "m_publicKeyVersion" (;) ";" (}) "}" (ERROR) "uint32_t GetPrivateKeyVersion() const" (primitive_type) "uint32_t" (function_declarator) "GetPrivateKeyVersion()" (identifier) "GetPrivateKeyVersion" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_privateKeyVersion; }" ({) "{" (return_statement) "return m_privateKeyVersion;" (return) "return" (identifier) "m_privateKeyVersion" (;) ";" (}) "}" (ERROR) "uint32_t GetMinimumConfirmations() const" (primitive_type) "uint32_t" (function_declarator) "GetMinimumConfirmations()" (identifier) "GetMinimumConfirmations" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_minimumConfirmations; }" ({) "{" (return_statement) "return m_minimumConfirmations;" (return) "return" (identifier) "m_minimumConfirmations" (;) ";" (}) "}" (ERROR) "bool IsGrinboxEnabled() const" (primitive_type) "bool" (function_declarator) "IsGrinboxEnabled()" (identifier) "IsGrinboxEnabled" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_enableGrinbox; }" ({) "{" (return_statement) "return m_enableGrinbox;" (return) "return" (identifier) "m_enableGrinbox" (;) ";" (}) "}" (labeled_statement) "private:\n fs::path m_walletPath;" (statement_identifier) "private" (:) ":" (labeled_statement) "fs::path m_walletPath;" (statement_identifier) "fs" (:) ":" (ERROR) ":" (:) ":" (declaration) "path m_walletPath;" (type_identifier) "path" (identifier) "m_walletPath" (;) ";" (labeled_statement) "std::string m_databaseType;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string m_databaseType;" (type_identifier) "string" (identifier) "m_databaseType" (;) ";" (declaration) "uint32_t m_listenPort;" (primitive_type) "uint32_t" (identifier) "m_listenPort" (;) ";" (declaration) "uint32_t m_ownerPort;" (primitive_type) "uint32_t" (identifier) "m_ownerPort" (;) ";" (declaration) "uint32_t m_publicKeyVersion;" (primitive_type) "uint32_t" (identifier) "m_publicKeyVersion" (;) ";" (declaration) "uint32_t m_privateKeyVersion;" (primitive_type) "uint32_t" (identifier) "m_privateKeyVersion" (;) ";" (declaration) "uint32_t m_minimumConfirmations;" (primitive_type) "uint32_t" (identifier) "m_minimumConfirmations" (;) ";" (declaration) "bool m_enableGrinbox;" (primitive_type) "bool" (identifier) "m_enableGrinbox" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
581
36
{"language": "c", "success": true, "metadata": {"lines": 58, "avg_line_length": 35.72, "nodes": 310, "errors": 0, "source_hash": "493b65d3fbbc8efb73410e7f9c58e3b07af1dd7021037d2444d14b791f6da32c", "categorized_nodes": 212}, "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 <Config/ConfigProps.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": "<Config/ConfigProps.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 31}}, {"id": 6, "type": "preproc_include", "text": "#include <Config/EnvironmentType.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": "<Config/EnvironmentType.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 35}}, {"id": 9, "type": "preproc_include", "text": "#include <Common/Util/BitUtil.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": "<Common/Util/BitUtil.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 32}}, {"id": 12, "type": "preproc_include", "text": "#include <Common/Util/FileUtil.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": "<Common/Util/FileUtil.h>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 33}}, {"id": 15, "type": "preproc_include", "text": "#include <json/json.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": "<json/json.h>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 22}}, {"id": 18, "type": "preproc_include", "text": "#include <cstdint>\n", "parent": null, "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": "system_lib_string", "text": "<cstdint>", "parent": 18, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 21, "type": "preproc_include", "text": "#include <string>\n", "parent": null, "children": [22, 23], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<string>", "parent": 21, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 17}}, {"id": 24, "type": "function_definition", "text": "class WalletConfig\n{\npublic:\n\tWalletConfig(const Json::Value& json, const EEnvironmentType environment, const fs::path& dataPath)\n\t{\n\t\tif (environment == EEnvironmentType::MAINNET)\n\t\t{\n\t\t\tm_listenPort = 3415; // TODO: Read value\n\t\t\tm_ownerPort = 3420; // TODO: Read value\n\t\t\tm_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t\tm_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_listenPort = 13415;\n\t\t\tm_ownerPort = 13420;\n\t\t\tm_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t\tm_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t}\n\n\t\tm_walletPath = FileUtil::ToPath(dataPath.u8string() + \"WALLET/\");\n\t\tFileUtil::CreateDirectories(m_walletPath);\n\n\t\tm_databaseType = \"SQLITE\";\n\t\tm_minimumConfirmations = 10;\n\t\tm_enableGrinbox = false;\n\t\tif (json.isMember(ConfigProps::Wallet::WALLET))\n\t\t{\n\t\t\tconst Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];\n\n\t\t\tm_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, \"SQLITE\").asString();\n\t\t\tm_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt();\n\t\t\tm_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool();\n\t\t}\n\t}\n\n\tconst fs::path& GetWalletDirectory() const { return m_walletPath; }\n\tconst std::string& GetDatabaseType() const { return m_databaseType; }\n\tuint32_t GetListenPort() const { return m_listenPort; }\n\tuint32_t GetOwnerPort() const { return m_ownerPort; }\n\tuint32_t GetPublicKeyVersion() const { return m_publicKeyVersion; }\n\tuint32_t GetPrivateKeyVersion() const { return m_privateKeyVersion; }\n\tuint32_t GetMinimumConfirmations() const { return m_minimumConfirmations; }\n\tbool IsGrinboxEnabled() const { return m_enableGrinbox; }\n\nprivate:\n\tfs::path m_walletPath;\n\tstd::string m_databaseType;\n\tuint32_t m_listenPort;\n\tuint32_t m_ownerPort;\n\tuint32_t m_publicKeyVersion;\n\tuint32_t m_privateKeyVersion;\n\tuint32_t m_minimumConfirmations;\n\tbool m_enableGrinbox;\n}", "parent": null, "children": [25], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 25, "type": "identifier", "text": "WalletConfig", "parent": 24, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 18}}, {"id": 26, "type": "labeled_statement", "text": "public:\n\tWalletConfig(const Json::Value& json, const", "parent": 24, "children": [27], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 44}}, {"id": 27, "type": "labeled_statement", "text": "WalletConfig(const Json::Value& json, const", "parent": 26, "children": [28, 29], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 44}}, {"id": 28, "type": "statement_identifier", "text": "WalletConfig", "parent": 27, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 13}}, {"id": 29, "type": "ERROR", "text": "(const Json:", "parent": 27, "children": [30], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 25}}, {"id": 30, "type": "type_descriptor", "text": "const Json", "parent": 29, "children": [31], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 24}}, {"id": 31, "type": "type_identifier", "text": "Json", "parent": 30, "children": [], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 24}}, {"id": 32, "type": "comma_expression", "text": "Value& json, const", "parent": 27, "children": [33], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 44}}, {"id": 33, "type": "binary_expression", "text": "Value& json", "parent": 32, "children": [34, 35], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 37}}, {"id": 34, "type": "identifier", "text": "Value", "parent": 33, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 31}}, {"id": 35, "type": "identifier", "text": "json", "parent": 33, "children": [], "start_point": {"row": 13, "column": 33}, "end_point": {"row": 13, "column": 37}}, {"id": 36, "type": "ERROR", "text": "EEnvironmentType environment, const fs::path& dataPath)", "parent": 24, "children": [37, 38, 39, 42], "start_point": {"row": 13, "column": 45}, "end_point": {"row": 13, "column": 100}}, {"id": 37, "type": "type_identifier", "text": "EEnvironmentType", "parent": 36, "children": [], "start_point": {"row": 13, "column": 45}, "end_point": {"row": 13, "column": 61}}, {"id": 38, "type": "identifier", "text": "environment", "parent": 36, "children": [], "start_point": {"row": 13, "column": 62}, "end_point": {"row": 13, "column": 73}}, {"id": 39, "type": "ERROR", "text": "const fs::path&", "parent": 36, "children": [40, 41], "start_point": {"row": 13, "column": 75}, "end_point": {"row": 13, "column": 90}}, {"id": 40, "type": "identifier", "text": "fs", "parent": 39, "children": [], "start_point": {"row": 13, "column": 81}, "end_point": {"row": 13, "column": 83}}, {"id": 41, "type": "identifier", "text": "path", "parent": 39, "children": [], "start_point": {"row": 13, "column": 85}, "end_point": {"row": 13, "column": 89}}, {"id": 42, "type": "identifier", "text": "dataPath", "parent": 36, "children": [], "start_point": {"row": 13, "column": 91}, "end_point": {"row": 13, "column": 99}}, {"id": 43, "type": "if_statement", "text": "if (environment == EEnvironmentType::MAINNET)\n\t\t{\n\t\t\tm_listenPort = 3415; // TODO: Read value\n\t\t\tm_ownerPort = 3420; // TODO: Read value\n\t\t\tm_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t\tm_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_listenPort = 13415;\n\t\t\tm_ownerPort = 13420;\n\t\t\tm_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t\tm_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t}", "parent": 24, "children": [44, 81], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 28, "column": 3}}, {"id": 44, "type": "parenthesized_expression", "text": "(environment == EEnvironmentType::MAINNET)", "parent": 43, "children": [45, 49], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 47}}, {"id": 45, "type": "binary_expression", "text": "environment == EEnvironmentType", "parent": 44, "children": [46, 47, 48], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 37}}, {"id": 46, "type": "identifier", "text": "environment", "parent": 45, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 17}}, {"id": 47, "type": "==", "text": "==", "parent": 45, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 20}}, {"id": 48, "type": "identifier", "text": "EEnvironmentType", "parent": 45, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 37}}, {"id": 49, "type": "ERROR", "text": "::MAINNET", "parent": 44, "children": [50], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 46}}, {"id": 50, "type": "identifier", "text": "MAINNET", "parent": 49, "children": [], "start_point": {"row": 15, "column": 39}, "end_point": {"row": 15, "column": 46}}, {"id": 51, "type": "assignment_expression", "text": "m_listenPort = 3415", "parent": 43, "children": [52, 53, 54], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 22}}, {"id": 52, "type": "identifier", "text": "m_listenPort", "parent": 51, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 15}}, {"id": 53, "type": "=", "text": "=", "parent": 51, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 17}}, {"id": 54, "type": "number_literal", "text": "3415", "parent": 51, "children": [], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 22}}, {"id": 55, "type": "assignment_expression", "text": "m_ownerPort = 3420", "parent": 43, "children": [56, 57, 58], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 21}}, {"id": 56, "type": "identifier", "text": "m_ownerPort", "parent": 55, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 14}}, {"id": 57, "type": "=", "text": "=", "parent": 55, "children": [], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 16}}, {"id": 58, "type": "number_literal", "text": "3420", "parent": 55, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 21}}, {"id": 59, "type": "ERROR", "text": "m_privateKeyVersion = BitUtil::", "parent": 43, "children": [60], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 34}}, {"id": 60, "type": "assignment_expression", "text": "m_privateKeyVersion = BitUtil", "parent": 59, "children": [61, 62, 63], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 32}}, {"id": 61, "type": "identifier", "text": "m_privateKeyVersion", "parent": 60, "children": [], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 22}}, {"id": 62, "type": "=", "text": "=", "parent": 60, "children": [], "start_point": {"row": 19, "column": 23}, "end_point": {"row": 19, "column": 24}}, {"id": 63, "type": "identifier", "text": "BitUtil", "parent": 60, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 32}}, {"id": 64, "type": "binary_expression", "text": "ConvertToU32(<KEY", "parent": 43, "children": [65, 66, 67], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 51}}, {"id": 65, "type": "identifier", "text": "ConvertToU32", "parent": 64, "children": [], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 46}}, {"id": 66, "type": "<", "text": "<", "parent": 64, "children": [], "start_point": {"row": 19, "column": 47}, "end_point": {"row": 19, "column": 48}}, {"id": 67, "type": "identifier", "text": "KEY", "parent": 64, "children": [], "start_point": {"row": 19, "column": 48}, "end_point": {"row": 19, "column": 51}}, {"id": 68, "type": "ERROR", "text": ">)", "parent": 43, "children": [69], "start_point": {"row": 19, "column": 51}, "end_point": {"row": 19, "column": 53}}, {"id": 69, "type": ">", "text": ">", "parent": 68, "children": [], "start_point": {"row": 19, "column": 51}, "end_point": {"row": 19, "column": 52}}, {"id": 70, "type": "ERROR", "text": "m_publicKeyVersion = BitUtil::", "parent": 43, "children": [71], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 33}}, {"id": 71, "type": "assignment_expression", "text": "m_publicKeyVersion = BitUtil", "parent": 70, "children": [72, 73, 74], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 31}}, {"id": 72, "type": "identifier", "text": "m_publicKeyVersion", "parent": 71, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 21}}, {"id": 73, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 23}}, {"id": 74, "type": "identifier", "text": "BitUtil", "parent": 71, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 31}}, {"id": 75, "type": "binary_expression", "text": "ConvertToU32(<KEY", "parent": 43, "children": [76, 77, 78], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 50}}, {"id": 76, "type": "identifier", "text": "ConvertToU32", "parent": 75, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 45}}, {"id": 77, "type": "<", "text": "<", "parent": 75, "children": [], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 47}}, {"id": 78, "type": "identifier", "text": "KEY", "parent": 75, "children": [], "start_point": {"row": 20, "column": 47}, "end_point": {"row": 20, "column": 50}}, {"id": 79, "type": "ERROR", "text": ">)", "parent": 43, "children": [80], "start_point": {"row": 20, "column": 50}, "end_point": {"row": 20, "column": 52}}, {"id": 80, "type": ">", "text": ">", "parent": 79, "children": [], "start_point": {"row": 20, "column": 50}, "end_point": {"row": 20, "column": 51}}, {"id": 81, "type": "else_clause", "text": "else\n\t\t{\n\t\t\tm_listenPort = 13415;\n\t\t\tm_ownerPort = 13420;\n\t\t\tm_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t\tm_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t}", "parent": 43, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 28, "column": 3}}, {"id": 82, "type": "assignment_expression", "text": "m_listenPort = 13415", "parent": 81, "children": [83, 84, 85], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 23}}, {"id": 83, "type": "identifier", "text": "m_listenPort", "parent": 82, "children": [], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 15}}, {"id": 84, "type": "=", "text": "=", "parent": 82, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 17}}, {"id": 85, "type": "number_literal", "text": "13415", "parent": 82, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 23}}, {"id": 86, "type": "assignment_expression", "text": "m_ownerPort = 13420", "parent": 81, "children": [87, 88, 89], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 22}}, {"id": 87, "type": "identifier", "text": "m_ownerPort", "parent": 86, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 14}}, {"id": 88, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 16}}, {"id": 89, "type": "number_literal", "text": "13420", "parent": 86, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 22}}, {"id": 90, "type": "ERROR", "text": "m_privateKeyVersion = BitUtil::", "parent": 81, "children": [91], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 34}}, {"id": 91, "type": "assignment_expression", "text": "m_privateKeyVersion = BitUtil", "parent": 90, "children": [92, 93, 94], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 32}}, {"id": 92, "type": "identifier", "text": "m_privateKeyVersion", "parent": 91, "children": [], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 22}}, {"id": 93, "type": "=", "text": "=", "parent": 91, "children": [], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 24}}, {"id": 94, "type": "identifier", "text": "BitUtil", "parent": 91, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 32}}, {"id": 95, "type": "binary_expression", "text": "ConvertToU32(<KEY", "parent": 81, "children": [96, 97, 98], "start_point": {"row": 26, "column": 34}, "end_point": {"row": 26, "column": 51}}, {"id": 96, "type": "identifier", "text": "ConvertToU32", "parent": 95, "children": [], "start_point": {"row": 26, "column": 34}, "end_point": {"row": 26, "column": 46}}, {"id": 97, "type": "<", "text": "<", "parent": 95, "children": [], "start_point": {"row": 26, "column": 47}, "end_point": {"row": 26, "column": 48}}, {"id": 98, "type": "identifier", "text": "KEY", "parent": 95, "children": [], "start_point": {"row": 26, "column": 48}, "end_point": {"row": 26, "column": 51}}, {"id": 99, "type": "ERROR", "text": ">)", "parent": 81, "children": [100], "start_point": {"row": 26, "column": 51}, "end_point": {"row": 26, "column": 53}}, {"id": 100, "type": ">", "text": ">", "parent": 99, "children": [], "start_point": {"row": 26, "column": 51}, "end_point": {"row": 26, "column": 52}}, {"id": 101, "type": "ERROR", "text": "m_publicKeyVersion = BitUtil::", "parent": 81, "children": [102], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 33}}, {"id": 102, "type": "assignment_expression", "text": "m_publicKeyVersion = BitUtil", "parent": 101, "children": [103, 104, 105], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 31}}, {"id": 103, "type": "identifier", "text": "m_publicKeyVersion", "parent": 102, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 21}}, {"id": 104, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 23}}, {"id": 105, "type": "identifier", "text": "BitUtil", "parent": 102, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 31}}, {"id": 106, "type": "binary_expression", "text": "ConvertToU32(<KEY", "parent": 81, "children": [107, 108, 109], "start_point": {"row": 27, "column": 33}, "end_point": {"row": 27, "column": 50}}, {"id": 107, "type": "identifier", "text": "ConvertToU32", "parent": 106, "children": [], "start_point": {"row": 27, "column": 33}, "end_point": {"row": 27, "column": 45}}, {"id": 108, "type": "<", "text": "<", "parent": 106, "children": [], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 47}}, {"id": 109, "type": "identifier", "text": "KEY", "parent": 106, "children": [], "start_point": {"row": 27, "column": 47}, "end_point": {"row": 27, "column": 50}}, {"id": 110, "type": "ERROR", "text": ">)", "parent": 81, "children": [111], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 52}}, {"id": 111, "type": ">", "text": ">", "parent": 110, "children": [], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 51}}, {"id": 112, "type": "ERROR", "text": "m_walletPath = FileUtil::", "parent": 24, "children": [113], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 27}}, {"id": 113, "type": "assignment_expression", "text": "m_walletPath = FileUtil", "parent": 112, "children": [114, 115, 116], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 25}}, {"id": 114, "type": "identifier", "text": "m_walletPath", "parent": 113, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 14}}, {"id": 115, "type": "=", "text": "=", "parent": 113, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 16}}, {"id": 116, "type": "identifier", "text": "FileUtil", "parent": 113, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 25}}, {"id": 117, "type": "call_expression", "text": "ToPath(dataPath.u8string() + \"WALLET/\")", "parent": 24, "children": [118, 119], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 66}}, {"id": 118, "type": "identifier", "text": "ToPath", "parent": 117, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 33}}, {"id": 119, "type": "argument_list", "text": "(dataPath.u8string() + \"WALLET/\")", "parent": 117, "children": [120], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 66}}, {"id": 120, "type": "binary_expression", "text": "dataPath.u8string() + \"WALLET/\"", "parent": 119, "children": [121, 126, 127], "start_point": {"row": 30, "column": 34}, "end_point": {"row": 30, "column": 65}}, {"id": 121, "type": "call_expression", "text": "dataPath.u8string()", "parent": 120, "children": [122, 125], "start_point": {"row": 30, "column": 34}, "end_point": {"row": 30, "column": 53}}, {"id": 122, "type": "field_expression", "text": "dataPath.u8string", "parent": 121, "children": [123, 124], "start_point": {"row": 30, "column": 34}, "end_point": {"row": 30, "column": 51}}, {"id": 123, "type": "identifier", "text": "dataPath", "parent": 122, "children": [], "start_point": {"row": 30, "column": 34}, "end_point": {"row": 30, "column": 42}}, {"id": 124, "type": "field_identifier", "text": "u8string", "parent": 122, "children": [], "start_point": {"row": 30, "column": 43}, "end_point": {"row": 30, "column": 51}}, {"id": 125, "type": "argument_list", "text": "()", "parent": 121, "children": [], "start_point": {"row": 30, "column": 51}, "end_point": {"row": 30, "column": 53}}, {"id": 126, "type": "+", "text": "+", "parent": 120, "children": [], "start_point": {"row": 30, "column": 54}, "end_point": {"row": 30, "column": 55}}, {"id": 127, "type": "string_literal", "text": "\"WALLET/\"", "parent": 120, "children": [], "start_point": {"row": 30, "column": 56}, "end_point": {"row": 30, "column": 65}}, {"id": 128, "type": "labeled_statement", "text": "FileUtil::CreateDirectories(m_walletPath);", "parent": 24, "children": [129], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 44}}, {"id": 129, "type": "statement_identifier", "text": "FileUtil", "parent": 128, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 10}}, {"id": 130, "type": "call_expression", "text": "CreateDirectories(m_walletPath)", "parent": 128, "children": [131, 132], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 43}}, {"id": 131, "type": "identifier", "text": "CreateDirectories", "parent": 130, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 29}}, {"id": 132, "type": "argument_list", "text": "(m_walletPath)", "parent": 130, "children": [133], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 43}}, {"id": 133, "type": "identifier", "text": "m_walletPath", "parent": 132, "children": [], "start_point": {"row": 31, "column": 30}, "end_point": {"row": 31, "column": 42}}, {"id": 134, "type": "assignment_expression", "text": "m_databaseType = \"SQLITE\"", "parent": 24, "children": [135, 136, 137], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 27}}, {"id": 135, "type": "identifier", "text": "m_databaseType", "parent": 134, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 16}}, {"id": 136, "type": "=", "text": "=", "parent": 134, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 18}}, {"id": 137, "type": "string_literal", "text": "\"SQLITE\"", "parent": 134, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 27}}, {"id": 138, "type": "assignment_expression", "text": "m_minimumConfirmations = 10", "parent": 24, "children": [139, 140, 141], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 29}}, {"id": 139, "type": "identifier", "text": "m_minimumConfirmations", "parent": 138, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 24}}, {"id": 140, "type": "=", "text": "=", "parent": 138, "children": [], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 26}}, {"id": 141, "type": "number_literal", "text": "10", "parent": 138, "children": [], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 29}}, {"id": 142, "type": "assignment_expression", "text": "m_enableGrinbox = false", "parent": 24, "children": [143, 144, 145], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 25}}, {"id": 143, "type": "identifier", "text": "m_enableGrinbox", "parent": 142, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 17}}, {"id": 144, "type": "=", "text": "=", "parent": 142, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 19}}, {"id": 145, "type": "false", "text": "false", "parent": 142, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 25}}, {"id": 146, "type": "if_statement", "text": "if (json.isMember(ConfigProps::Wallet::WALLET))\n\t\t{\n\t\t\tconst Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];\n\n\t\t\tm_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, \"SQLITE\").asString();\n\t\t\tm_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt();\n\t\t\tm_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool();\n\t\t}", "parent": 24, "children": [147], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 43, "column": 3}}, {"id": 147, "type": "parenthesized_expression", "text": "(json.isMember(ConfigProps::Wallet::WALLET))", "parent": 146, "children": [148], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 49}}, {"id": 148, "type": "call_expression", "text": "json.isMember(ConfigProps::Wallet::WALLET)", "parent": 147, "children": [149, 152], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 48}}, {"id": 149, "type": "field_expression", "text": "json.isMember", "parent": 148, "children": [150, 151], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 19}}, {"id": 150, "type": "identifier", "text": "json", "parent": 149, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 10}}, {"id": 151, "type": "field_identifier", "text": "isMember", "parent": 149, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 19}}, {"id": 152, "type": "argument_list", "text": "(ConfigProps::Wallet::WALLET)", "parent": 148, "children": [153, 154], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 48}}, {"id": 153, "type": "identifier", "text": "ConfigProps", "parent": 152, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 31}}, {"id": 154, "type": "ERROR", "text": "::Wallet::WALLET", "parent": 152, "children": [155, 156], "start_point": {"row": 36, "column": 31}, "end_point": {"row": 36, "column": 47}}, {"id": 155, "type": "identifier", "text": "Wallet", "parent": 154, "children": [], "start_point": {"row": 36, "column": 33}, "end_point": {"row": 36, "column": 39}}, {"id": 156, "type": "identifier", "text": "WALLET", "parent": 154, "children": [], "start_point": {"row": 36, "column": 41}, "end_point": {"row": 36, "column": 47}}, {"id": 157, "type": "declaration", "text": "const Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];", "parent": 146, "children": [158, 159, 161], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 69}}, {"id": 158, "type": "type_identifier", "text": "Json", "parent": 157, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 13}}, {"id": 159, "type": "ERROR", "text": "::Value&", "parent": 157, "children": [160], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 21}}, {"id": 160, "type": "identifier", "text": "Value", "parent": 159, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 20}}, {"id": 161, "type": "init_declarator", "text": "walletJSON = json[ConfigProps::Wallet::WALLET]", "parent": 157, "children": [162, 163, 164], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 68}}, {"id": 162, "type": "identifier", "text": "walletJSON", "parent": 161, "children": [], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 32}}, {"id": 163, "type": "=", "text": "=", "parent": 161, "children": [], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 34}}, {"id": 164, "type": "subscript_expression", "text": "json[ConfigProps::Wallet::WALLET]", "parent": 161, "children": [165, 166, 167], "start_point": {"row": 38, "column": 35}, "end_point": {"row": 38, "column": 68}}, {"id": 165, "type": "identifier", "text": "json", "parent": 164, "children": [], "start_point": {"row": 38, "column": 35}, "end_point": {"row": 38, "column": 39}}, {"id": 166, "type": "identifier", "text": "ConfigProps", "parent": 164, "children": [], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 51}}, {"id": 167, "type": "ERROR", "text": "::Wallet::WALLET", "parent": 164, "children": [168, 169], "start_point": {"row": 38, "column": 51}, "end_point": {"row": 38, "column": 67}}, {"id": 168, "type": "identifier", "text": "Wallet", "parent": 167, "children": [], "start_point": {"row": 38, "column": 53}, "end_point": {"row": 38, "column": 59}}, {"id": 169, "type": "identifier", "text": "WALLET", "parent": 167, "children": [], "start_point": {"row": 38, "column": 61}, "end_point": {"row": 38, "column": 67}}, {"id": 170, "type": "assignment_expression", "text": "m_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, \"SQLITE\").asString()", "parent": 146, "children": [171, 172, 173], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 86}}, {"id": 171, "type": "identifier", "text": "m_databaseType", "parent": 170, "children": [], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 17}}, {"id": 172, "type": "=", "text": "=", "parent": 170, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 19}}, {"id": 173, "type": "call_expression", "text": "walletJSON.get(ConfigProps::Wallet::DATABASE, \"SQLITE\").asString()", "parent": 170, "children": [174, 186], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 86}}, {"id": 174, "type": "field_expression", "text": "walletJSON.get(ConfigProps::Wallet::DATABASE, \"SQLITE\").asString", "parent": 173, "children": [175, 185], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 84}}, {"id": 175, "type": "call_expression", "text": "walletJSON.get(ConfigProps::Wallet::DATABASE, \"SQLITE\")", "parent": 174, "children": [176, 179], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 75}}, {"id": 176, "type": "field_expression", "text": "walletJSON.get", "parent": 175, "children": [177, 178], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 34}}, {"id": 177, "type": "identifier", "text": "walletJSON", "parent": 176, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 30}}, {"id": 178, "type": "field_identifier", "text": "get", "parent": 176, "children": [], "start_point": {"row": 40, "column": 31}, "end_point": {"row": 40, "column": 34}}, {"id": 179, "type": "argument_list", "text": "(ConfigProps::Wallet::DATABASE, \"SQLITE\")", "parent": 175, "children": [180, 181, 184], "start_point": {"row": 40, "column": 34}, "end_point": {"row": 40, "column": 75}}, {"id": 180, "type": "identifier", "text": "ConfigProps", "parent": 179, "children": [], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 46}}, {"id": 181, "type": "ERROR", "text": "::Wallet::DATABASE", "parent": 179, "children": [182, 183], "start_point": {"row": 40, "column": 46}, "end_point": {"row": 40, "column": 64}}, {"id": 182, "type": "identifier", "text": "Wallet", "parent": 181, "children": [], "start_point": {"row": 40, "column": 48}, "end_point": {"row": 40, "column": 54}}, {"id": 183, "type": "identifier", "text": "DATABASE", "parent": 181, "children": [], "start_point": {"row": 40, "column": 56}, "end_point": {"row": 40, "column": 64}}, {"id": 184, "type": "string_literal", "text": "\"SQLITE\"", "parent": 179, "children": [], "start_point": {"row": 40, "column": 66}, "end_point": {"row": 40, "column": 74}}, {"id": 185, "type": "field_identifier", "text": "asString", "parent": 174, "children": [], "start_point": {"row": 40, "column": 76}, "end_point": {"row": 40, "column": 84}}, {"id": 186, "type": "argument_list", "text": "()", "parent": 173, "children": [], "start_point": {"row": 40, "column": 84}, "end_point": {"row": 40, "column": 86}}, {"id": 187, "type": "assignment_expression", "text": "m_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt()", "parent": 146, "children": [188, 189, 190], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 95}}, {"id": 188, "type": "identifier", "text": "m_minimumConfirmations", "parent": 187, "children": [], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 25}}, {"id": 189, "type": "=", "text": "=", "parent": 187, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 27}}, {"id": 190, "type": "call_expression", "text": "walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt()", "parent": 187, "children": [191, 203], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 95}}, {"id": 191, "type": "field_expression", "text": "walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt", "parent": 190, "children": [192, 202], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 93}}, {"id": 192, "type": "call_expression", "text": "walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10)", "parent": 191, "children": [193, 196], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 86}}, {"id": 193, "type": "field_expression", "text": "walletJSON.get", "parent": 192, "children": [194, 195], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 42}}, {"id": 194, "type": "identifier", "text": "walletJSON", "parent": 193, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 38}}, {"id": 195, "type": "field_identifier", "text": "get", "parent": 193, "children": [], "start_point": {"row": 41, "column": 39}, "end_point": {"row": 41, "column": 42}}, {"id": 196, "type": "argument_list", "text": "(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10)", "parent": 192, "children": [197, 200, 201], "start_point": {"row": 41, "column": 42}, "end_point": {"row": 41, "column": 86}}, {"id": 197, "type": "ERROR", "text": "ConfigProps::Wallet::", "parent": 196, "children": [198, 199], "start_point": {"row": 41, "column": 43}, "end_point": {"row": 41, "column": 64}}, {"id": 198, "type": "identifier", "text": "ConfigProps", "parent": 197, "children": [], "start_point": {"row": 41, "column": 43}, "end_point": {"row": 41, "column": 54}}, {"id": 199, "type": "identifier", "text": "Wallet", "parent": 197, "children": [], "start_point": {"row": 41, "column": 56}, "end_point": {"row": 41, "column": 62}}, {"id": 200, "type": "identifier", "text": "MIN_CONFIRMATIONS", "parent": 196, "children": [], "start_point": {"row": 41, "column": 64}, "end_point": {"row": 41, "column": 81}}, {"id": 201, "type": "number_literal", "text": "10", "parent": 196, "children": [], "start_point": {"row": 41, "column": 83}, "end_point": {"row": 41, "column": 85}}, {"id": 202, "type": "field_identifier", "text": "asUInt", "parent": 191, "children": [], "start_point": {"row": 41, "column": 87}, "end_point": {"row": 41, "column": 93}}, {"id": 203, "type": "argument_list", "text": "()", "parent": 190, "children": [], "start_point": {"row": 41, "column": 93}, "end_point": {"row": 41, "column": 95}}, {"id": 204, "type": "assignment_expression", "text": "m_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool()", "parent": 146, "children": [205, 206, 207], "start_point": {"row": 42, "column": 3}, "end_point": {"row": 42, "column": 88}}, {"id": 205, "type": "identifier", "text": "m_enableGrinbox", "parent": 204, "children": [], "start_point": {"row": 42, "column": 3}, "end_point": {"row": 42, "column": 18}}, {"id": 206, "type": "=", "text": "=", "parent": 204, "children": [], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 20}}, {"id": 207, "type": "call_expression", "text": "walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool()", "parent": 204, "children": [208, 220], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 88}}, {"id": 208, "type": "field_expression", "text": "walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool", "parent": 207, "children": [209, 219], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 86}}, {"id": 209, "type": "call_expression", "text": "walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false)", "parent": 208, "children": [210, 213], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 79}}, {"id": 210, "type": "field_expression", "text": "walletJSON.get", "parent": 209, "children": [211, 212], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 35}}, {"id": 211, "type": "identifier", "text": "walletJSON", "parent": 210, "children": [], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 31}}, {"id": 212, "type": "field_identifier", "text": "get", "parent": 210, "children": [], "start_point": {"row": 42, "column": 32}, "end_point": {"row": 42, "column": 35}}, {"id": 213, "type": "argument_list", "text": "(ConfigProps::Wallet::ENABLE_GRINBOX, false)", "parent": 209, "children": [214, 217, 218], "start_point": {"row": 42, "column": 35}, "end_point": {"row": 42, "column": 79}}, {"id": 214, "type": "ERROR", "text": "ConfigProps::Wallet::", "parent": 213, "children": [215, 216], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 57}}, {"id": 215, "type": "identifier", "text": "ConfigProps", "parent": 214, "children": [], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 47}}, {"id": 216, "type": "identifier", "text": "Wallet", "parent": 214, "children": [], "start_point": {"row": 42, "column": 49}, "end_point": {"row": 42, "column": 55}}, {"id": 217, "type": "identifier", "text": "ENABLE_GRINBOX", "parent": 213, "children": [], "start_point": {"row": 42, "column": 57}, "end_point": {"row": 42, "column": 71}}, {"id": 218, "type": "false", "text": "false", "parent": 213, "children": [], "start_point": {"row": 42, "column": 73}, "end_point": {"row": 42, "column": 78}}, {"id": 219, "type": "field_identifier", "text": "asBool", "parent": 208, "children": [], "start_point": {"row": 42, "column": 80}, "end_point": {"row": 42, "column": 86}}, {"id": 220, "type": "argument_list", "text": "()", "parent": 207, "children": [], "start_point": {"row": 42, "column": 86}, "end_point": {"row": 42, "column": 88}}, {"id": 221, "type": "ERROR", "text": "const fs::path& GetWalletDirectory() const", "parent": 24, "children": [222, 223, 225], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 43}}, {"id": 222, "type": "type_identifier", "text": "fs", "parent": 221, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 9}}, {"id": 223, "type": "ERROR", "text": "::path&", "parent": 221, "children": [224], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 16}}, {"id": 224, "type": "identifier", "text": "path", "parent": 223, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 15}}, {"id": 225, "type": "function_declarator", "text": "GetWalletDirectory()", "parent": 221, "children": [226, 227], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 37}}, {"id": 226, "type": "identifier", "text": "GetWalletDirectory", "parent": 225, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 35}}, {"id": 227, "type": "parameter_list", "text": "()", "parent": 225, "children": [], "start_point": {"row": 46, "column": 35}, "end_point": {"row": 46, "column": 37}}, {"id": 228, "type": "return_statement", "text": "return m_walletPath;", "parent": 24, "children": [229], "start_point": {"row": 46, "column": 46}, "end_point": {"row": 46, "column": 66}}, {"id": 229, "type": "identifier", "text": "m_walletPath", "parent": 228, "children": [], "start_point": {"row": 46, "column": 53}, "end_point": {"row": 46, "column": 65}}, {"id": 230, "type": "ERROR", "text": "const std::string& GetDatabaseType() const", "parent": 24, "children": [231, 232, 234], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 43}}, {"id": 231, "type": "type_identifier", "text": "std", "parent": 230, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 10}}, {"id": 232, "type": "ERROR", "text": "::string&", "parent": 230, "children": [233], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 19}}, {"id": 233, "type": "identifier", "text": "string", "parent": 232, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 18}}, {"id": 234, "type": "function_declarator", "text": "GetDatabaseType()", "parent": 230, "children": [235, 236], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 37}}, {"id": 235, "type": "identifier", "text": "GetDatabaseType", "parent": 234, "children": [], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 35}}, {"id": 236, "type": "parameter_list", "text": "()", "parent": 234, "children": [], "start_point": {"row": 47, "column": 35}, "end_point": {"row": 47, "column": 37}}, {"id": 237, "type": "return_statement", "text": "return m_databaseType;", "parent": 24, "children": [238], "start_point": {"row": 47, "column": 46}, "end_point": {"row": 47, "column": 68}}, {"id": 238, "type": "identifier", "text": "m_databaseType", "parent": 237, "children": [], "start_point": {"row": 47, "column": 53}, "end_point": {"row": 47, "column": 67}}, {"id": 239, "type": "ERROR", "text": "uint32_t GetListenPort() const", "parent": 24, "children": [240, 241], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 31}}, {"id": 240, "type": "primitive_type", "text": "uint32_t", "parent": 239, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 9}}, {"id": 241, "type": "function_declarator", "text": "GetListenPort()", "parent": 239, "children": [242, 243], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 25}}, {"id": 242, "type": "identifier", "text": "GetListenPort", "parent": 241, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 23}}, {"id": 243, "type": "parameter_list", "text": "()", "parent": 241, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 25}}, {"id": 244, "type": "return_statement", "text": "return m_listenPort;", "parent": 24, "children": [245], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 54}}, {"id": 245, "type": "identifier", "text": "m_listenPort", "parent": 244, "children": [], "start_point": {"row": 48, "column": 41}, "end_point": {"row": 48, "column": 53}}, {"id": 246, "type": "ERROR", "text": "uint32_t GetOwnerPort() const", "parent": 24, "children": [247, 248], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 30}}, {"id": 247, "type": "primitive_type", "text": "uint32_t", "parent": 246, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 9}}, {"id": 248, "type": "function_declarator", "text": "GetOwnerPort()", "parent": 246, "children": [249, 250], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 24}}, {"id": 249, "type": "identifier", "text": "GetOwnerPort", "parent": 248, "children": [], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 22}}, {"id": 250, "type": "parameter_list", "text": "()", "parent": 248, "children": [], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 24}}, {"id": 251, "type": "return_statement", "text": "return m_ownerPort;", "parent": 24, "children": [252], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 52}}, {"id": 252, "type": "identifier", "text": "m_ownerPort", "parent": 251, "children": [], "start_point": {"row": 49, "column": 40}, "end_point": {"row": 49, "column": 51}}, {"id": 253, "type": "ERROR", "text": "uint32_t GetPublicKeyVersion() const", "parent": 24, "children": [254, 255], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 37}}, {"id": 254, "type": "primitive_type", "text": "uint32_t", "parent": 253, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 9}}, {"id": 255, "type": "function_declarator", "text": "GetPublicKeyVersion()", "parent": 253, "children": [256, 257], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 31}}, {"id": 256, "type": "identifier", "text": "GetPublicKeyVersion", "parent": 255, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 29}}, {"id": 257, "type": "parameter_list", "text": "()", "parent": 255, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 31}}, {"id": 258, "type": "return_statement", "text": "return m_publicKeyVersion;", "parent": 24, "children": [259], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 66}}, {"id": 259, "type": "identifier", "text": "m_publicKeyVersion", "parent": 258, "children": [], "start_point": {"row": 50, "column": 47}, "end_point": {"row": 50, "column": 65}}, {"id": 260, "type": "ERROR", "text": "uint32_t GetPrivateKeyVersion() const", "parent": 24, "children": [261, 262], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 38}}, {"id": 261, "type": "primitive_type", "text": "uint32_t", "parent": 260, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 9}}, {"id": 262, "type": "function_declarator", "text": "GetPrivateKeyVersion()", "parent": 260, "children": [263, 264], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 32}}, {"id": 263, "type": "identifier", "text": "GetPrivateKeyVersion", "parent": 262, "children": [], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 30}}, {"id": 264, "type": "parameter_list", "text": "()", "parent": 262, "children": [], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 32}}, {"id": 265, "type": "return_statement", "text": "return m_privateKeyVersion;", "parent": 24, "children": [266], "start_point": {"row": 51, "column": 41}, "end_point": {"row": 51, "column": 68}}, {"id": 266, "type": "identifier", "text": "m_privateKeyVersion", "parent": 265, "children": [], "start_point": {"row": 51, "column": 48}, "end_point": {"row": 51, "column": 67}}, {"id": 267, "type": "ERROR", "text": "uint32_t GetMinimumConfirmations() const", "parent": 24, "children": [268, 269], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 41}}, {"id": 268, "type": "primitive_type", "text": "uint32_t", "parent": 267, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 9}}, {"id": 269, "type": "function_declarator", "text": "GetMinimumConfirmations()", "parent": 267, "children": [270, 271], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 35}}, {"id": 270, "type": "identifier", "text": "GetMinimumConfirmations", "parent": 269, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 33}}, {"id": 271, "type": "parameter_list", "text": "()", "parent": 269, "children": [], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 35}}, {"id": 272, "type": "return_statement", "text": "return m_minimumConfirmations;", "parent": 24, "children": [273], "start_point": {"row": 52, "column": 44}, "end_point": {"row": 52, "column": 74}}, {"id": 273, "type": "identifier", "text": "m_minimumConfirmations", "parent": 272, "children": [], "start_point": {"row": 52, "column": 51}, "end_point": {"row": 52, "column": 73}}, {"id": 274, "type": "ERROR", "text": "bool IsGrinboxEnabled() const", "parent": 24, "children": [275, 276], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 30}}, {"id": 275, "type": "primitive_type", "text": "bool", "parent": 274, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 5}}, {"id": 276, "type": "function_declarator", "text": "IsGrinboxEnabled()", "parent": 274, "children": [277, 278], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 24}}, {"id": 277, "type": "identifier", "text": "IsGrinboxEnabled", "parent": 276, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 22}}, {"id": 278, "type": "parameter_list", "text": "()", "parent": 276, "children": [], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 24}}, {"id": 279, "type": "return_statement", "text": "return m_enableGrinbox;", "parent": 24, "children": [280], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 56}}, {"id": 280, "type": "identifier", "text": "m_enableGrinbox", "parent": 279, "children": [], "start_point": {"row": 53, "column": 40}, "end_point": {"row": 53, "column": 55}}, {"id": 281, "type": "labeled_statement", "text": "private:\n\tfs::path m_walletPath;", "parent": 24, "children": [282], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 56, "column": 23}}, {"id": 282, "type": "labeled_statement", "text": "fs::path m_walletPath;", "parent": 281, "children": [283, 284], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 23}}, {"id": 283, "type": "statement_identifier", "text": "fs", "parent": 282, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 3}}, {"id": 284, "type": "declaration", "text": "path m_walletPath;", "parent": 282, "children": [285, 286], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 23}}, {"id": 285, "type": "type_identifier", "text": "path", "parent": 284, "children": [], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 9}}, {"id": 286, "type": "identifier", "text": "m_walletPath", "parent": 284, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 22}}, {"id": 287, "type": "labeled_statement", "text": "std::string m_databaseType;", "parent": 24, "children": [288, 289], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 28}}, {"id": 288, "type": "statement_identifier", "text": "std", "parent": 287, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 4}}, {"id": 289, "type": "declaration", "text": "string m_databaseType;", "parent": 287, "children": [290, 291], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 28}}, {"id": 290, "type": "type_identifier", "text": "string", "parent": 289, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 12}}, {"id": 291, "type": "identifier", "text": "m_databaseType", "parent": 289, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 27}}, {"id": 292, "type": "declaration", "text": "uint32_t m_listenPort;", "parent": 24, "children": [293, 294], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 23}}, {"id": 293, "type": "primitive_type", "text": "uint32_t", "parent": 292, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 9}}, {"id": 294, "type": "identifier", "text": "m_listenPort", "parent": 292, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 22}}, {"id": 295, "type": "declaration", "text": "uint32_t m_ownerPort;", "parent": 24, "children": [296, 297], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 22}}, {"id": 296, "type": "primitive_type", "text": "uint32_t", "parent": 295, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 9}}, {"id": 297, "type": "identifier", "text": "m_ownerPort", "parent": 295, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 21}}, {"id": 298, "type": "declaration", "text": "uint32_t m_publicKeyVersion;", "parent": 24, "children": [299, 300], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 29}}, {"id": 299, "type": "primitive_type", "text": "uint32_t", "parent": 298, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 9}}, {"id": 300, "type": "identifier", "text": "m_publicKeyVersion", "parent": 298, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 28}}, {"id": 301, "type": "declaration", "text": "uint32_t m_privateKeyVersion;", "parent": 24, "children": [302, 303], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 30}}, {"id": 302, "type": "primitive_type", "text": "uint32_t", "parent": 301, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 9}}, {"id": 303, "type": "identifier", "text": "m_privateKeyVersion", "parent": 301, "children": [], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 29}}, {"id": 304, "type": "declaration", "text": "uint32_t m_minimumConfirmations;", "parent": 24, "children": [305, 306], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 33}}, {"id": 305, "type": "primitive_type", "text": "uint32_t", "parent": 304, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 9}}, {"id": 306, "type": "identifier", "text": "m_minimumConfirmations", "parent": 304, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 32}}, {"id": 307, "type": "declaration", "text": "bool m_enableGrinbox;", "parent": 24, "children": [308, 309], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 22}}, {"id": 308, "type": "primitive_type", "text": "bool", "parent": 307, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 5}}, {"id": 309, "type": "identifier", "text": "m_enableGrinbox", "parent": 307, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 21}}]}, "node_categories": {"declarations": {"functions": [24, 225, 234, 241, 248, 255, 262, 269, 276], "variables": [157, 284, 289, 292, 295, 298, 301, 304, 307], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22], "modules": [], "enums": []}, "statements": {"expressions": [32, 33, 44, 45, 64, 75, 95, 106, 117, 120, 121, 122, 130, 147, 148, 149, 164, 173, 174, 175, 176, 190, 191, 192, 193, 207, 208, 209, 210], "assignments": [51, 55, 60, 71, 82, 86, 91, 102, 113, 134, 138, 142, 170, 187, 204], "loops": [], "conditionals": [25, 28, 31, 34, 35, 37, 38, 40, 41, 42, 43, 46, 48, 50, 52, 56, 61, 63, 65, 67, 72, 74, 76, 78, 83, 87, 92, 94, 96, 98, 103, 105, 107, 109, 114, 116, 118, 123, 124, 129, 131, 133, 135, 139, 143, 146, 150, 151, 153, 155, 156, 158, 160, 162, 165, 166, 168, 169, 171, 177, 178, 180, 182, 183, 185, 188, 194, 195, 198, 199, 200, 202, 205, 211, 212, 215, 216, 217, 219, 222, 224, 226, 229, 231, 233, 235, 238, 242, 245, 249, 252, 256, 259, 263, 266, 270, 273, 277, 280, 283, 285, 286, 288, 290, 291, 294, 297, 300, 303, 306, 309], "returns": [228, 237, 244, 251, 258, 265, 272, 279], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17, 20, 23, 54, 58, 85, 89, 127, 137, 141, 184, 201], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 24, "universal_type": "function", "name": "WalletConfig", "text_snippet": "class WalletConfig\n{\npublic:\n\tWalletConfig(const Json::Value& json, const EEnvironmentType environme"}, {"node_id": 225, "universal_type": "function", "name": "unknown", "text_snippet": "GetWalletDirectory()"}, {"node_id": 234, "universal_type": "function", "name": "unknown", "text_snippet": "GetDatabaseType()"}, {"node_id": 241, "universal_type": "function", "name": "unknown", "text_snippet": "GetListenPort()"}, {"node_id": 248, "universal_type": "function", "name": "unknown", "text_snippet": "GetOwnerPort()"}, {"node_id": 255, "universal_type": "function", "name": "unknown", "text_snippet": "GetPublicKeyVersion()"}, {"node_id": 262, "universal_type": "function", "name": "unknown", "text_snippet": "GetPrivateKeyVersion()"}, {"node_id": 269, "universal_type": "function", "name": "unknown", "text_snippet": "GetMinimumConfirmations()"}, {"node_id": 276, "universal_type": "function", "name": "unknown", "text_snippet": "IsGrinboxEnabled()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <Config/ConfigProps.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <Config/EnvironmentType.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <Common/Util/BitUtil.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <Common/Util/FileUtil.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <json/json.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <cstdint>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <string>\n"}, {"node_id": 22, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <Config/ConfigProps.h>\n#include <Config/EnvironmentType.h>\n#include <Common/Util/BitUtil.h>\n#include <Common/Util/FileUtil.h>\n#include <json/json.h>\n#include <cstdint>\n#include <string>\n\nclass WalletConfig\n{\npublic:\n\tWalletConfig(const Json::Value& json, const EEnvironmentType environment, const fs::path& dataPath)\n\t{\n\t\tif (environment == EEnvironmentType::MAINNET)\n\t\t{\n\t\t\tm_listenPort = 3415; // TODO: Read value\n\t\t\tm_ownerPort = 3420; // TODO: Read value\n\t\t\tm_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t\tm_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_listenPort = 13415;\n\t\t\tm_ownerPort = 13420;\n\t\t\tm_privateKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t\tm_publicKeyVersion = BitUtil::ConvertToU32(<KEY>);\n\t\t}\n\n\t\tm_walletPath = FileUtil::ToPath(dataPath.u8string() + \"WALLET/\");\n\t\tFileUtil::CreateDirectories(m_walletPath);\n\n\t\tm_databaseType = \"SQLITE\";\n\t\tm_minimumConfirmations = 10;\n\t\tm_enableGrinbox = false;\n\t\tif (json.isMember(ConfigProps::Wallet::WALLET))\n\t\t{\n\t\t\tconst Json::Value& walletJSON = json[ConfigProps::Wallet::WALLET];\n\n\t\t\tm_databaseType = walletJSON.get(ConfigProps::Wallet::DATABASE, \"SQLITE\").asString();\n\t\t\tm_minimumConfirmations = walletJSON.get(ConfigProps::Wallet::MIN_CONFIRMATIONS, 10).asUInt();\n\t\t\tm_enableGrinbox = walletJSON.get(ConfigProps::Wallet::ENABLE_GRINBOX, false).asBool();\n\t\t}\n\t}\n\n\tconst fs::path& GetWalletDirectory() const { return m_walletPath; }\n\tconst std::string& GetDatabaseType() const { return m_databaseType; }\n\tuint32_t GetListenPort() const { return m_listenPort; }\n\tuint32_t GetOwnerPort() const { return m_ownerPort; }\n\tuint32_t GetPublicKeyVersion() const { return m_publicKeyVersion; }\n\tuint32_t GetPrivateKeyVersion() const { return m_privateKeyVersion; }\n\tuint32_t GetMinimumConfirmations() const { return m_minimumConfirmations; }\n\tbool IsGrinboxEnabled() const { return m_enableGrinbox; }\n\nprivate:\n\tfs::path m_walletPath;\n\tstd::string m_databaseType;\n\tuint32_t m_listenPort;\n\tuint32_t m_ownerPort;\n\tuint32_t m_publicKeyVersion;\n\tuint32_t m_privateKeyVersion;\n\tuint32_t m_minimumConfirmations;\n\tbool m_enableGrinbox;\n};\n"}
80,928
c
/* // Copyright (c) 2018-2019 Intel Corporation // // 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. */ #ifdef OC_SECURITY #include "oc_sp.h" #include "oc_api.h" #include "oc_core_res.h" #include "oc_pki.h" #include "oc_pstat.h" #include "oc_store.h" #ifdef OC_DYNAMIC_ALLOCATION #include "port/oc_assert.h" #include <stdlib.h> static oc_sec_sp_t *sp; static oc_sec_sp_t *sp_mfg_default; #else /* OC_DYNAMIC_ALLOCATION */ static oc_sec_sp_t sp[OC_MAX_NUM_DEVICES]; static oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES]; #endif /* !OC_DYNAMIC_ALLOCATION */ #define OC_SP_BASELINE_OID "1.3.6.1.4.1.51414.0.0.1.0" #define OC_SP_BLACK_OID "1.3.6.1.4.1.51414.0.0.2.0" #define OC_SP_BLUE_OID "1.3.6.1.4.1.51414.0.0.3.0" #define OC_SP_PURPLE_OID "1.3.6.1.4.1.51414.0.0.4.0" void oc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles, oc_sp_types_t current_profile, int mfg_credid) { sp_mfg_default[device].supported_profiles |= supported_profiles; sp_mfg_default[device].current_profile = current_profile; sp_mfg_default[device].credid = mfg_credid; sp[device] = sp_mfg_default[device]; } void oc_sec_sp_init(void) { #ifdef OC_DYNAMIC_ALLOCATION sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t)); if (!sp) { oc_abort("Insufficient memory"); } sp_mfg_default = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t)); if (!sp_mfg_default) { oc_abort("Insufficient memory"); } #endif /* OC_DYNAMIC_ALLOCATION */ size_t device; for (device = 0; device < oc_core_get_num_devices(); device++) { sp_mfg_default[device].current_profile = OC_SP_BASELINE; sp_mfg_default[device].supported_profiles = OC_SP_BASELINE; sp_mfg_default[device].credid = -1; } } void oc_sec_sp_free(void) { #ifdef OC_DYNAMIC_ALLOCATION if (sp) { free(sp); } if (sp_mfg_default) { free(sp_mfg_default); } #endif /* OC_DYNAMIC_ALLOCATION */ } void oc_sec_sp_default(size_t device) { sp[device] = sp_mfg_default[device]; } static oc_sp_types_t string_to_sp(const char *sp_string) { oc_sp_types_t sp = 0; if (strlen(sp_string) == strlen(OC_SP_BASELINE_OID) && memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0) { sp = OC_SP_BASELINE; } else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) && memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) { sp = OC_SP_BLACK; } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) && memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) { sp = OC_SP_BLUE; } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) && memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) == 0) { sp = OC_SP_PURPLE; } return sp; } bool oc_sec_decode_sp(oc_rep_t *rep, size_t device) { oc_sec_pstat_t *pstat = oc_sec_get_pstat(device); if (pstat->s == OC_DOS_RFNOP) { return false; } while (rep != NULL) { size_t len = oc_string_len(rep->name); switch (rep->type) { case OC_REP_STRING: if (len == 14 && memcmp("currentprofile", oc_string(rep->name), 14) == 0) { oc_sp_types_t current_profile = string_to_sp(oc_string(rep->value.string)); if ((current_profile & sp[device].supported_profiles) == 0) { return false; } sp[device].current_profile = current_profile; } break; case OC_REP_STRING_ARRAY: if (len == 17 && memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) { oc_sp_types_t supported_profiles = 0; size_t profile; for (profile = 0; profile < oc_string_array_get_allocated_size(rep->value.array); profile++) { const char *p = oc_string_array_get_item(rep->value.array, profile); supported_profiles |= string_to_sp(p); } sp[device].supported_profiles = supported_profiles; } break; default: return false; break; } rep = rep->next; } return true; } static const char * sp_to_string(oc_sp_types_t sp_type) { switch (sp_type) { case OC_SP_BASELINE: return OC_SP_BASELINE_OID; case OC_SP_BLACK: return OC_SP_BLACK_OID; case OC_SP_BLUE: return OC_SP_BLUE_OID; case OC_SP_PURPLE: return OC_SP_PURPLE_OID; } return NULL; } void oc_sec_encode_sp(size_t device) { oc_rep_start_root_object(); oc_process_baseline_interface( oc_core_get_resource_by_index(OCF_SEC_SP, device)); oc_rep_set_text_string(root, currentprofile, sp_to_string(sp[device].current_profile)); oc_rep_set_array(root, supportedprofiles); if ((sp[device].supported_profiles & OC_SP_BASELINE) != 0) { oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE)); } if ((sp[device].supported_profiles & OC_SP_BLACK) != 0) { oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK)); } if ((sp[device].supported_profiles & OC_SP_BLUE) != 0) { oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE)); } if ((sp[device].supported_profiles & OC_SP_PURPLE) != 0) { oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE)); } oc_rep_close_array(root, supportedprofiles); oc_rep_end_root_object(); } oc_sec_sp_t * oc_sec_get_sp(size_t device) { return &sp[device]; } void get_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data) { (void)data; switch (iface_mask) { case OC_IF_BASELINE: { oc_sec_encode_sp(request->resource->device); oc_send_response(request, OC_STATUS_OK); } break; default: break; } } void post_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data) { (void)iface_mask; (void)data; size_t device = request->resource->device; if (oc_sec_decode_sp(request->request_payload, device)) { oc_send_response(request, OC_STATUS_CHANGED); request->response->response_buffer->response_length = 0; oc_sec_dump_sp(device); } else { oc_send_response(request, OC_STATUS_BAD_REQUEST); } } #endif /* OC_SECURITY */
29.64
217
(translation_unit) "/*\n// Copyright (c) 2018-2019 Intel Corporation\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\n#ifdef OC_SECURITY\n#include "oc_sp.h"\n#include "oc_api.h"\n#include "oc_core_res.h"\n#include "oc_pki.h"\n#include "oc_pstat.h"\n#include "oc_store.h"\n#ifdef OC_DYNAMIC_ALLOCATION\n#include "port/oc_assert.h"\n#include <stdlib.h>\nstatic oc_sec_sp_t *sp;\nstatic oc_sec_sp_t *sp_mfg_default;\n#else /* OC_DYNAMIC_ALLOCATION */\nstatic oc_sec_sp_t sp[OC_MAX_NUM_DEVICES];\nstatic oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES];\n#endif /* !OC_DYNAMIC_ALLOCATION */\n\n#define OC_SP_BASELINE_OID "1.3.6.1.4.1.51414.0.0.1.0"\n#define OC_SP_BLACK_OID "1.3.6.1.4.1.51414.0.0.2.0"\n#define OC_SP_BLUE_OID "1.3.6.1.4.1.51414.0.0.3.0"\n#define OC_SP_PURPLE_OID "1.3.6.1.4.1.51414.0.0.4.0"\n\nvoid\noc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles,\n oc_sp_types_t current_profile, int mfg_credid)\n{\n sp_mfg_default[device].supported_profiles |= supported_profiles;\n sp_mfg_default[device].current_profile = current_profile;\n sp_mfg_default[device].credid = mfg_credid;\n sp[device] = sp_mfg_default[device];\n}\n\nvoid\noc_sec_sp_init(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp) {\n oc_abort("Insufficient memory");\n }\n sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp_mfg_default) {\n oc_abort("Insufficient memory");\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n size_t device;\n for (device = 0; device < oc_core_get_num_devices(); device++) {\n sp_mfg_default[device].current_profile = OC_SP_BASELINE;\n sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;\n sp_mfg_default[device].credid = -1;\n }\n}\n\nvoid\noc_sec_sp_free(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n if (sp) {\n free(sp);\n }\n if (sp_mfg_default) {\n free(sp_mfg_default);\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n}\n\nvoid\noc_sec_sp_default(size_t device)\n{\n sp[device] = sp_mfg_default[device];\n}\n\nstatic oc_sp_types_t\nstring_to_sp(const char *sp_string)\n{\n oc_sp_types_t sp = 0;\n if (strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0) {\n sp = OC_SP_BASELINE;\n } else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }\n return sp;\n}\n\nbool\noc_sec_decode_sp(oc_rep_t *rep, size_t device)\n{\n oc_sec_pstat_t *pstat = oc_sec_get_pstat(device);\n if (pstat->s == OC_DOS_RFNOP) {\n return false;\n }\n while (rep != NULL) {\n size_t len = oc_string_len(rep->name);\n switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }\n rep = rep->next;\n }\n return true;\n}\n\nstatic const char *\nsp_to_string(oc_sp_types_t sp_type)\n{\n switch (sp_type) {\n case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;\n case OC_SP_BLACK:\n return OC_SP_BLACK_OID;\n case OC_SP_BLUE:\n return OC_SP_BLUE_OID;\n case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;\n }\n return NULL;\n}\n\nvoid\noc_sec_encode_sp(size_t device)\n{\n oc_rep_start_root_object();\n oc_process_baseline_interface(\n oc_core_get_resource_by_index(OCF_SEC_SP, device));\n oc_rep_set_text_string(root, currentprofile,\n sp_to_string(sp[device].current_profile));\n oc_rep_set_array(root, supportedprofiles);\n if ((sp[device].supported_profiles & OC_SP_BASELINE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));\n }\n if ((sp[device].supported_profiles & OC_SP_BLACK) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));\n }\n if ((sp[device].supported_profiles & OC_SP_BLUE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));\n }\n if ((sp[device].supported_profiles & OC_SP_PURPLE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));\n }\n oc_rep_close_array(root, supportedprofiles);\n oc_rep_end_root_object();\n}\n\noc_sec_sp_t *\noc_sec_get_sp(size_t device)\n{\n return &sp[device];\n}\n\nvoid\nget_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)data;\n switch (iface_mask) {\n case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;\n default:\n break;\n }\n}\n\nvoid\npost_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)iface_mask;\n (void)data;\n size_t device = request->resource->device;\n if (oc_sec_decode_sp(request->request_payload, device)) {\n oc_send_response(request, OC_STATUS_CHANGED);\n request->response->response_buffer->response_length = 0;\n oc_sec_dump_sp(device);\n } else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }\n}\n\n#endif /* OC_SECURITY */\n" (comment) "/*\n// Copyright (c) 2018-2019 Intel Corporation\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) "#ifdef OC_SECURITY\n#include "oc_sp.h"\n#include "oc_api.h"\n#include "oc_core_res.h"\n#include "oc_pki.h"\n#include "oc_pstat.h"\n#include "oc_store.h"\n#ifdef OC_DYNAMIC_ALLOCATION\n#include "port/oc_assert.h"\n#include <stdlib.h>\nstatic oc_sec_sp_t *sp;\nstatic oc_sec_sp_t *sp_mfg_default;\n#else /* OC_DYNAMIC_ALLOCATION */\nstatic oc_sec_sp_t sp[OC_MAX_NUM_DEVICES];\nstatic oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES];\n#endif /* !OC_DYNAMIC_ALLOCATION */\n\n#define OC_SP_BASELINE_OID "1.3.6.1.4.1.51414.0.0.1.0"\n#define OC_SP_BLACK_OID "1.3.6.1.4.1.51414.0.0.2.0"\n#define OC_SP_BLUE_OID "1.3.6.1.4.1.51414.0.0.3.0"\n#define OC_SP_PURPLE_OID "1.3.6.1.4.1.51414.0.0.4.0"\n\nvoid\noc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles,\n oc_sp_types_t current_profile, int mfg_credid)\n{\n sp_mfg_default[device].supported_profiles |= supported_profiles;\n sp_mfg_default[device].current_profile = current_profile;\n sp_mfg_default[device].credid = mfg_credid;\n sp[device] = sp_mfg_default[device];\n}\n\nvoid\noc_sec_sp_init(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp) {\n oc_abort("Insufficient memory");\n }\n sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp_mfg_default) {\n oc_abort("Insufficient memory");\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n size_t device;\n for (device = 0; device < oc_core_get_num_devices(); device++) {\n sp_mfg_default[device].current_profile = OC_SP_BASELINE;\n sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;\n sp_mfg_default[device].credid = -1;\n }\n}\n\nvoid\noc_sec_sp_free(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n if (sp) {\n free(sp);\n }\n if (sp_mfg_default) {\n free(sp_mfg_default);\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n}\n\nvoid\noc_sec_sp_default(size_t device)\n{\n sp[device] = sp_mfg_default[device];\n}\n\nstatic oc_sp_types_t\nstring_to_sp(const char *sp_string)\n{\n oc_sp_types_t sp = 0;\n if (strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0) {\n sp = OC_SP_BASELINE;\n } else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }\n return sp;\n}\n\nbool\noc_sec_decode_sp(oc_rep_t *rep, size_t device)\n{\n oc_sec_pstat_t *pstat = oc_sec_get_pstat(device);\n if (pstat->s == OC_DOS_RFNOP) {\n return false;\n }\n while (rep != NULL) {\n size_t len = oc_string_len(rep->name);\n switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }\n rep = rep->next;\n }\n return true;\n}\n\nstatic const char *\nsp_to_string(oc_sp_types_t sp_type)\n{\n switch (sp_type) {\n case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;\n case OC_SP_BLACK:\n return OC_SP_BLACK_OID;\n case OC_SP_BLUE:\n return OC_SP_BLUE_OID;\n case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;\n }\n return NULL;\n}\n\nvoid\noc_sec_encode_sp(size_t device)\n{\n oc_rep_start_root_object();\n oc_process_baseline_interface(\n oc_core_get_resource_by_index(OCF_SEC_SP, device));\n oc_rep_set_text_string(root, currentprofile,\n sp_to_string(sp[device].current_profile));\n oc_rep_set_array(root, supportedprofiles);\n if ((sp[device].supported_profiles & OC_SP_BASELINE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));\n }\n if ((sp[device].supported_profiles & OC_SP_BLACK) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));\n }\n if ((sp[device].supported_profiles & OC_SP_BLUE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));\n }\n if ((sp[device].supported_profiles & OC_SP_PURPLE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));\n }\n oc_rep_close_array(root, supportedprofiles);\n oc_rep_end_root_object();\n}\n\noc_sec_sp_t *\noc_sec_get_sp(size_t device)\n{\n return &sp[device];\n}\n\nvoid\nget_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)data;\n switch (iface_mask) {\n case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;\n default:\n break;\n }\n}\n\nvoid\npost_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)iface_mask;\n (void)data;\n size_t device = request->resource->device;\n if (oc_sec_decode_sp(request->request_payload, device)) {\n oc_send_response(request, OC_STATUS_CHANGED);\n request->response->response_buffer->response_length = 0;\n oc_sec_dump_sp(device);\n } else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }\n}\n\n#endif" (#ifdef) "#ifdef" (identifier) "OC_SECURITY" (preproc_include) "#include "oc_sp.h"\n" (#include) "#include" (string_literal) ""oc_sp.h"" (") """ (string_content) "oc_sp.h" (") """ (preproc_include) "#include "oc_api.h"\n" (#include) "#include" (string_literal) ""oc_api.h"" (") """ (string_content) "oc_api.h" (") """ (preproc_include) "#include "oc_core_res.h"\n" (#include) "#include" (string_literal) ""oc_core_res.h"" (") """ (string_content) "oc_core_res.h" (") """ (preproc_include) "#include "oc_pki.h"\n" (#include) "#include" (string_literal) ""oc_pki.h"" (") """ (string_content) "oc_pki.h" (") """ (preproc_include) "#include "oc_pstat.h"\n" (#include) "#include" (string_literal) ""oc_pstat.h"" (") """ (string_content) "oc_pstat.h" (") """ (preproc_include) "#include "oc_store.h"\n" (#include) "#include" (string_literal) ""oc_store.h"" (") """ (string_content) "oc_store.h" (") """ (preproc_ifdef) "#ifdef OC_DYNAMIC_ALLOCATION\n#include "port/oc_assert.h"\n#include <stdlib.h>\nstatic oc_sec_sp_t *sp;\nstatic oc_sec_sp_t *sp_mfg_default;\n#else /* OC_DYNAMIC_ALLOCATION */\nstatic oc_sec_sp_t sp[OC_MAX_NUM_DEVICES];\nstatic oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES];\n#endif" (#ifdef) "#ifdef" (identifier) "OC_DYNAMIC_ALLOCATION" (preproc_include) "#include "port/oc_assert.h"\n" (#include) "#include" (string_literal) ""port/oc_assert.h"" (") """ (string_content) "port/oc_assert.h" (") """ (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (declaration) "static oc_sec_sp_t *sp;" (storage_class_specifier) "static" (static) "static" (type_identifier) "oc_sec_sp_t" (pointer_declarator) "*sp" (*) "*" (identifier) "sp" (;) ";" (declaration) "static oc_sec_sp_t *sp_mfg_default;" (storage_class_specifier) "static" (static) "static" (type_identifier) "oc_sec_sp_t" (pointer_declarator) "*sp_mfg_default" (*) "*" (identifier) "sp_mfg_default" (;) ";" (preproc_else) "#else /* OC_DYNAMIC_ALLOCATION */\nstatic oc_sec_sp_t sp[OC_MAX_NUM_DEVICES];\nstatic oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES];" (#else) "#else" (comment) "/* OC_DYNAMIC_ALLOCATION */" (declaration) "static oc_sec_sp_t sp[OC_MAX_NUM_DEVICES];" (storage_class_specifier) "static" (static) "static" (type_identifier) "oc_sec_sp_t" (array_declarator) "sp[OC_MAX_NUM_DEVICES]" (identifier) "sp" ([) "[" (identifier) "OC_MAX_NUM_DEVICES" (]) "]" (;) ";" (declaration) "static oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES];" (storage_class_specifier) "static" (static) "static" (type_identifier) "oc_sec_sp_t" (array_declarator) "sp_mfg_default[OC_MAX_NUM_DEVICES]" (identifier) "sp_mfg_default" ([) "[" (identifier) "OC_MAX_NUM_DEVICES" (]) "]" (;) ";" (#endif) "#endif" (comment) "/* !OC_DYNAMIC_ALLOCATION */" (preproc_def) "#define OC_SP_BASELINE_OID "1.3.6.1.4.1.51414.0.0.1.0"\n" (#define) "#define" (identifier) "OC_SP_BASELINE_OID" (preproc_arg) ""1.3.6.1.4.1.51414.0.0.1.0"" (preproc_def) "#define OC_SP_BLACK_OID "1.3.6.1.4.1.51414.0.0.2.0"\n" (#define) "#define" (identifier) "OC_SP_BLACK_OID" (preproc_arg) ""1.3.6.1.4.1.51414.0.0.2.0"" (preproc_def) "#define OC_SP_BLUE_OID "1.3.6.1.4.1.51414.0.0.3.0"\n" (#define) "#define" (identifier) "OC_SP_BLUE_OID" (preproc_arg) ""1.3.6.1.4.1.51414.0.0.3.0"" (preproc_def) "#define OC_SP_PURPLE_OID "1.3.6.1.4.1.51414.0.0.4.0"\n" (#define) "#define" (identifier) "OC_SP_PURPLE_OID" (preproc_arg) ""1.3.6.1.4.1.51414.0.0.4.0"" (function_definition) "void\noc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles,\n oc_sp_types_t current_profile, int mfg_credid)\n{\n sp_mfg_default[device].supported_profiles |= supported_profiles;\n sp_mfg_default[device].current_profile = current_profile;\n sp_mfg_default[device].credid = mfg_credid;\n sp[device] = sp_mfg_default[device];\n}" (primitive_type) "void" (function_declarator) "oc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles,\n oc_sp_types_t current_profile, int mfg_credid)" (identifier) "oc_pki_set_security_profile" (parameter_list) "(size_t device, oc_sp_types_t supported_profiles,\n oc_sp_types_t current_profile, int mfg_credid)" (() "(" (parameter_declaration) "size_t device" (primitive_type) "size_t" (identifier) "device" (,) "," (parameter_declaration) "oc_sp_types_t supported_profiles" (type_identifier) "oc_sp_types_t" (identifier) "supported_profiles" (,) "," (parameter_declaration) "oc_sp_types_t current_profile" (type_identifier) "oc_sp_types_t" (identifier) "current_profile" (,) "," (parameter_declaration) "int mfg_credid" (primitive_type) "int" (identifier) "mfg_credid" ()) ")" (compound_statement) "{\n sp_mfg_default[device].supported_profiles |= supported_profiles;\n sp_mfg_default[device].current_profile = current_profile;\n sp_mfg_default[device].credid = mfg_credid;\n sp[device] = sp_mfg_default[device];\n}" ({) "{" (expression_statement) "sp_mfg_default[device].supported_profiles |= supported_profiles;" (assignment_expression) "sp_mfg_default[device].supported_profiles |= supported_profiles" (field_expression) "sp_mfg_default[device].supported_profiles" (subscript_expression) "sp_mfg_default[device]" (identifier) "sp_mfg_default" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "supported_profiles" (|=) "|=" (identifier) "supported_profiles" (;) ";" (expression_statement) "sp_mfg_default[device].current_profile = current_profile;" (assignment_expression) "sp_mfg_default[device].current_profile = current_profile" (field_expression) "sp_mfg_default[device].current_profile" (subscript_expression) "sp_mfg_default[device]" (identifier) "sp_mfg_default" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "current_profile" (=) "=" (identifier) "current_profile" (;) ";" (expression_statement) "sp_mfg_default[device].credid = mfg_credid;" (assignment_expression) "sp_mfg_default[device].credid = mfg_credid" (field_expression) "sp_mfg_default[device].credid" (subscript_expression) "sp_mfg_default[device]" (identifier) "sp_mfg_default" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "credid" (=) "=" (identifier) "mfg_credid" (;) ";" (expression_statement) "sp[device] = sp_mfg_default[device];" (assignment_expression) "sp[device] = sp_mfg_default[device]" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (=) "=" (subscript_expression) "sp_mfg_default[device]" (identifier) "sp_mfg_default" ([) "[" (identifier) "device" (]) "]" (;) ";" (}) "}" (function_definition) "void\noc_sec_sp_init(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp) {\n oc_abort("Insufficient memory");\n }\n sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp_mfg_default) {\n oc_abort("Insufficient memory");\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n size_t device;\n for (device = 0; device < oc_core_get_num_devices(); device++) {\n sp_mfg_default[device].current_profile = OC_SP_BASELINE;\n sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;\n sp_mfg_default[device].credid = -1;\n }\n}" (primitive_type) "void" (function_declarator) "oc_sec_sp_init(void)" (identifier) "oc_sec_sp_init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n#ifdef OC_DYNAMIC_ALLOCATION\n sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp) {\n oc_abort("Insufficient memory");\n }\n sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp_mfg_default) {\n oc_abort("Insufficient memory");\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n size_t device;\n for (device = 0; device < oc_core_get_num_devices(); device++) {\n sp_mfg_default[device].current_profile = OC_SP_BASELINE;\n sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;\n sp_mfg_default[device].credid = -1;\n }\n}" ({) "{" (preproc_ifdef) "#ifdef OC_DYNAMIC_ALLOCATION\n sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp) {\n oc_abort("Insufficient memory");\n }\n sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp_mfg_default) {\n oc_abort("Insufficient memory");\n }\n#endif" (#ifdef) "#ifdef" (identifier) "OC_DYNAMIC_ALLOCATION" (expression_statement) "sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));" (assignment_expression) "sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))" (identifier) "sp" (=) "=" (cast_expression) "(oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))" (() "(" (type_descriptor) "oc_sec_sp_t *" (type_identifier) "oc_sec_sp_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))" (identifier) "calloc" (argument_list) "(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))" (() "(" (call_expression) "oc_core_get_num_devices()" (identifier) "oc_core_get_num_devices" (argument_list) "()" (() "(" ()) ")" (,) "," (sizeof_expression) "sizeof(oc_sec_sp_t)" (sizeof) "sizeof" (parenthesized_expression) "(oc_sec_sp_t)" (() "(" (identifier) "oc_sec_sp_t" ()) ")" ()) ")" (;) ";" (if_statement) "if (!sp) {\n oc_abort("Insufficient memory");\n }" (if) "if" (parenthesized_expression) "(!sp)" (() "(" (unary_expression) "!sp" (!) "!" (identifier) "sp" ()) ")" (compound_statement) "{\n oc_abort("Insufficient memory");\n }" ({) "{" (expression_statement) "oc_abort("Insufficient memory");" (call_expression) "oc_abort("Insufficient memory")" (identifier) "oc_abort" (argument_list) "("Insufficient memory")" (() "(" (string_literal) ""Insufficient memory"" (") """ (string_content) "Insufficient memory" (") """ ()) ")" (;) ";" (}) "}" (expression_statement) "sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));" (assignment_expression) "sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))" (identifier) "sp_mfg_default" (=) "=" (cast_expression) "(oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))" (() "(" (type_descriptor) "oc_sec_sp_t *" (type_identifier) "oc_sec_sp_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))" (identifier) "calloc" (argument_list) "(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))" (() "(" (call_expression) "oc_core_get_num_devices()" (identifier) "oc_core_get_num_devices" (argument_list) "()" (() "(" ()) ")" (,) "," (sizeof_expression) "sizeof(oc_sec_sp_t)" (sizeof) "sizeof" (parenthesized_expression) "(oc_sec_sp_t)" (() "(" (identifier) "oc_sec_sp_t" ()) ")" ()) ")" (;) ";" (if_statement) "if (!sp_mfg_default) {\n oc_abort("Insufficient memory");\n }" (if) "if" (parenthesized_expression) "(!sp_mfg_default)" (() "(" (unary_expression) "!sp_mfg_default" (!) "!" (identifier) "sp_mfg_default" ()) ")" (compound_statement) "{\n oc_abort("Insufficient memory");\n }" ({) "{" (expression_statement) "oc_abort("Insufficient memory");" (call_expression) "oc_abort("Insufficient memory")" (identifier) "oc_abort" (argument_list) "("Insufficient memory")" (() "(" (string_literal) ""Insufficient memory"" (") """ (string_content) "Insufficient memory" (") """ ()) ")" (;) ";" (}) "}" (#endif) "#endif" (comment) "/* OC_DYNAMIC_ALLOCATION */" (declaration) "size_t device;" (primitive_type) "size_t" (identifier) "device" (;) ";" (for_statement) "for (device = 0; device < oc_core_get_num_devices(); device++) {\n sp_mfg_default[device].current_profile = OC_SP_BASELINE;\n sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;\n sp_mfg_default[device].credid = -1;\n }" (for) "for" (() "(" (assignment_expression) "device = 0" (identifier) "device" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "device < oc_core_get_num_devices()" (identifier) "device" (<) "<" (call_expression) "oc_core_get_num_devices()" (identifier) "oc_core_get_num_devices" (argument_list) "()" (() "(" ()) ")" (;) ";" (update_expression) "device++" (identifier) "device" (++) "++" ()) ")" (compound_statement) "{\n sp_mfg_default[device].current_profile = OC_SP_BASELINE;\n sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;\n sp_mfg_default[device].credid = -1;\n }" ({) "{" (expression_statement) "sp_mfg_default[device].current_profile = OC_SP_BASELINE;" (assignment_expression) "sp_mfg_default[device].current_profile = OC_SP_BASELINE" (field_expression) "sp_mfg_default[device].current_profile" (subscript_expression) "sp_mfg_default[device]" (identifier) "sp_mfg_default" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "current_profile" (=) "=" (identifier) "OC_SP_BASELINE" (;) ";" (expression_statement) "sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;" (assignment_expression) "sp_mfg_default[device].supported_profiles = OC_SP_BASELINE" (field_expression) "sp_mfg_default[device].supported_profiles" (subscript_expression) "sp_mfg_default[device]" (identifier) "sp_mfg_default" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "supported_profiles" (=) "=" (identifier) "OC_SP_BASELINE" (;) ";" (expression_statement) "sp_mfg_default[device].credid = -1;" (assignment_expression) "sp_mfg_default[device].credid = -1" (field_expression) "sp_mfg_default[device].credid" (subscript_expression) "sp_mfg_default[device]" (identifier) "sp_mfg_default" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "credid" (=) "=" (number_literal) "-1" (;) ";" (}) "}" (}) "}" (function_definition) "void\noc_sec_sp_free(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n if (sp) {\n free(sp);\n }\n if (sp_mfg_default) {\n free(sp_mfg_default);\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n}" (primitive_type) "void" (function_declarator) "oc_sec_sp_free(void)" (identifier) "oc_sec_sp_free" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n#ifdef OC_DYNAMIC_ALLOCATION\n if (sp) {\n free(sp);\n }\n if (sp_mfg_default) {\n free(sp_mfg_default);\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n}" ({) "{" (preproc_ifdef) "#ifdef OC_DYNAMIC_ALLOCATION\n if (sp) {\n free(sp);\n }\n if (sp_mfg_default) {\n free(sp_mfg_default);\n }\n#endif" (#ifdef) "#ifdef" (identifier) "OC_DYNAMIC_ALLOCATION" (if_statement) "if (sp) {\n free(sp);\n }" (if) "if" (parenthesized_expression) "(sp)" (() "(" (identifier) "sp" ()) ")" (compound_statement) "{\n free(sp);\n }" ({) "{" (expression_statement) "free(sp);" (call_expression) "free(sp)" (identifier) "free" (argument_list) "(sp)" (() "(" (identifier) "sp" ()) ")" (;) ";" (}) "}" (if_statement) "if (sp_mfg_default) {\n free(sp_mfg_default);\n }" (if) "if" (parenthesized_expression) "(sp_mfg_default)" (() "(" (identifier) "sp_mfg_default" ()) ")" (compound_statement) "{\n free(sp_mfg_default);\n }" ({) "{" (expression_statement) "free(sp_mfg_default);" (call_expression) "free(sp_mfg_default)" (identifier) "free" (argument_list) "(sp_mfg_default)" (() "(" (identifier) "sp_mfg_default" ()) ")" (;) ";" (}) "}" (#endif) "#endif" (comment) "/* OC_DYNAMIC_ALLOCATION */" (}) "}" (function_definition) "void\noc_sec_sp_default(size_t device)\n{\n sp[device] = sp_mfg_default[device];\n}" (primitive_type) "void" (function_declarator) "oc_sec_sp_default(size_t device)" (identifier) "oc_sec_sp_default" (parameter_list) "(size_t device)" (() "(" (parameter_declaration) "size_t device" (primitive_type) "size_t" (identifier) "device" ()) ")" (compound_statement) "{\n sp[device] = sp_mfg_default[device];\n}" ({) "{" (expression_statement) "sp[device] = sp_mfg_default[device];" (assignment_expression) "sp[device] = sp_mfg_default[device]" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (=) "=" (subscript_expression) "sp_mfg_default[device]" (identifier) "sp_mfg_default" ([) "[" (identifier) "device" (]) "]" (;) ";" (}) "}" (function_definition) "static oc_sp_types_t\nstring_to_sp(const char *sp_string)\n{\n oc_sp_types_t sp = 0;\n if (strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0) {\n sp = OC_SP_BASELINE;\n } else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }\n return sp;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "oc_sp_types_t" (function_declarator) "string_to_sp(const char *sp_string)" (identifier) "string_to_sp" (parameter_list) "(const char *sp_string)" (() "(" (parameter_declaration) "const char *sp_string" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*sp_string" (*) "*" (identifier) "sp_string" ()) ")" (compound_statement) "{\n oc_sp_types_t sp = 0;\n if (strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0) {\n sp = OC_SP_BASELINE;\n } else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }\n return sp;\n}" ({) "{" (declaration) "oc_sp_types_t sp = 0;" (type_identifier) "oc_sp_types_t" (init_declarator) "sp = 0" (identifier) "sp" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if (strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0) {\n sp = OC_SP_BASELINE;\n } else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }" (if) "if" (parenthesized_expression) "(strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0)" (() "(" (binary_expression) "strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0" (binary_expression) "strlen(sp_string) == strlen(OC_SP_BASELINE_OID)" (call_expression) "strlen(sp_string)" (identifier) "strlen" (argument_list) "(sp_string)" (() "(" (identifier) "sp_string" ()) ")" (==) "==" (call_expression) "strlen(OC_SP_BASELINE_OID)" (identifier) "strlen" (argument_list) "(OC_SP_BASELINE_OID)" (() "(" (identifier) "OC_SP_BASELINE_OID" ()) ")" (&&) "&&" (binary_expression) "memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0" (call_expression) "memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID))" (identifier) "memcmp" (argument_list) "(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID))" (() "(" (identifier) "OC_SP_BASELINE_OID" (,) "," (identifier) "sp_string" (,) "," (call_expression) "strlen(OC_SP_BASELINE_OID)" (identifier) "strlen" (argument_list) "(OC_SP_BASELINE_OID)" (() "(" (identifier) "OC_SP_BASELINE_OID" ()) ")" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n sp = OC_SP_BASELINE;\n }" ({) "{" (expression_statement) "sp = OC_SP_BASELINE;" (assignment_expression) "sp = OC_SP_BASELINE" (identifier) "sp" (=) "=" (identifier) "OC_SP_BASELINE" (;) ";" (}) "}" (else_clause) "else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }" (else) "else" (if_statement) "if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }" (if) "if" (parenthesized_expression) "(strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0)" (() "(" (binary_expression) "strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0" (binary_expression) "strlen(sp_string) == strlen(OC_SP_BLACK_OID)" (call_expression) "strlen(sp_string)" (identifier) "strlen" (argument_list) "(sp_string)" (() "(" (identifier) "sp_string" ()) ")" (==) "==" (call_expression) "strlen(OC_SP_BLACK_OID)" (identifier) "strlen" (argument_list) "(OC_SP_BLACK_OID)" (() "(" (identifier) "OC_SP_BLACK_OID" ()) ")" (&&) "&&" (binary_expression) "memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0" (call_expression) "memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID))" (identifier) "memcmp" (argument_list) "(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID))" (() "(" (identifier) "OC_SP_BLACK_OID" (,) "," (identifier) "sp_string" (,) "," (call_expression) "strlen(OC_SP_BLACK_OID)" (identifier) "strlen" (argument_list) "(OC_SP_BLACK_OID)" (() "(" (identifier) "OC_SP_BLACK_OID" ()) ")" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n sp = OC_SP_BLACK;\n }" ({) "{" (expression_statement) "sp = OC_SP_BLACK;" (assignment_expression) "sp = OC_SP_BLACK" (identifier) "sp" (=) "=" (identifier) "OC_SP_BLACK" (;) ";" (}) "}" (else_clause) "else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }" (else) "else" (if_statement) "if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }" (if) "if" (parenthesized_expression) "(strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0)" (() "(" (binary_expression) "strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0" (binary_expression) "strlen(sp_string) == strlen(OC_SP_BLUE_OID)" (call_expression) "strlen(sp_string)" (identifier) "strlen" (argument_list) "(sp_string)" (() "(" (identifier) "sp_string" ()) ")" (==) "==" (call_expression) "strlen(OC_SP_BLUE_OID)" (identifier) "strlen" (argument_list) "(OC_SP_BLUE_OID)" (() "(" (identifier) "OC_SP_BLUE_OID" ()) ")" (&&) "&&" (binary_expression) "memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0" (call_expression) "memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID))" (identifier) "memcmp" (argument_list) "(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID))" (() "(" (identifier) "OC_SP_BLUE_OID" (,) "," (identifier) "sp_string" (,) "," (call_expression) "strlen(OC_SP_BLUE_OID)" (identifier) "strlen" (argument_list) "(OC_SP_BLUE_OID)" (() "(" (identifier) "OC_SP_BLUE_OID" ()) ")" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n sp = OC_SP_BLUE;\n }" ({) "{" (expression_statement) "sp = OC_SP_BLUE;" (assignment_expression) "sp = OC_SP_BLUE" (identifier) "sp" (=) "=" (identifier) "OC_SP_BLUE" (;) ";" (}) "}" (else_clause) "else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }" (else) "else" (if_statement) "if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }" (if) "if" (parenthesized_expression) "(strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0)" (() "(" (binary_expression) "strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0" (binary_expression) "strlen(sp_string) == strlen(OC_SP_PURPLE_OID)" (call_expression) "strlen(sp_string)" (identifier) "strlen" (argument_list) "(sp_string)" (() "(" (identifier) "sp_string" ()) ")" (==) "==" (call_expression) "strlen(OC_SP_PURPLE_OID)" (identifier) "strlen" (argument_list) "(OC_SP_PURPLE_OID)" (() "(" (identifier) "OC_SP_PURPLE_OID" ()) ")" (&&) "&&" (binary_expression) "memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0" (call_expression) "memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID))" (identifier) "memcmp" (argument_list) "(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID))" (() "(" (identifier) "OC_SP_PURPLE_OID" (,) "," (identifier) "sp_string" (,) "," (call_expression) "strlen(OC_SP_PURPLE_OID)" (identifier) "strlen" (argument_list) "(OC_SP_PURPLE_OID)" (() "(" (identifier) "OC_SP_PURPLE_OID" ()) ")" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n sp = OC_SP_PURPLE;\n }" ({) "{" (expression_statement) "sp = OC_SP_PURPLE;" (assignment_expression) "sp = OC_SP_PURPLE" (identifier) "sp" (=) "=" (identifier) "OC_SP_PURPLE" (;) ";" (}) "}" (return_statement) "return sp;" (return) "return" (identifier) "sp" (;) ";" (}) "}" (function_definition) "bool\noc_sec_decode_sp(oc_rep_t *rep, size_t device)\n{\n oc_sec_pstat_t *pstat = oc_sec_get_pstat(device);\n if (pstat->s == OC_DOS_RFNOP) {\n return false;\n }\n while (rep != NULL) {\n size_t len = oc_string_len(rep->name);\n switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }\n rep = rep->next;\n }\n return true;\n}" (primitive_type) "bool" (function_declarator) "oc_sec_decode_sp(oc_rep_t *rep, size_t device)" (identifier) "oc_sec_decode_sp" (parameter_list) "(oc_rep_t *rep, size_t device)" (() "(" (parameter_declaration) "oc_rep_t *rep" (type_identifier) "oc_rep_t" (pointer_declarator) "*rep" (*) "*" (identifier) "rep" (,) "," (parameter_declaration) "size_t device" (primitive_type) "size_t" (identifier) "device" ()) ")" (compound_statement) "{\n oc_sec_pstat_t *pstat = oc_sec_get_pstat(device);\n if (pstat->s == OC_DOS_RFNOP) {\n return false;\n }\n while (rep != NULL) {\n size_t len = oc_string_len(rep->name);\n switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }\n rep = rep->next;\n }\n return true;\n}" ({) "{" (declaration) "oc_sec_pstat_t *pstat = oc_sec_get_pstat(device);" (type_identifier) "oc_sec_pstat_t" (init_declarator) "*pstat = oc_sec_get_pstat(device)" (pointer_declarator) "*pstat" (*) "*" (identifier) "pstat" (=) "=" (call_expression) "oc_sec_get_pstat(device)" (identifier) "oc_sec_get_pstat" (argument_list) "(device)" (() "(" (identifier) "device" ()) ")" (;) ";" (if_statement) "if (pstat->s == OC_DOS_RFNOP) {\n return false;\n }" (if) "if" (parenthesized_expression) "(pstat->s == OC_DOS_RFNOP)" (() "(" (binary_expression) "pstat->s == OC_DOS_RFNOP" (field_expression) "pstat->s" (identifier) "pstat" (->) "->" (field_identifier) "s" (==) "==" (identifier) "OC_DOS_RFNOP" ()) ")" (compound_statement) "{\n return false;\n }" ({) "{" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (while_statement) "while (rep != NULL) {\n size_t len = oc_string_len(rep->name);\n switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }\n rep = rep->next;\n }" (while) "while" (parenthesized_expression) "(rep != NULL)" (() "(" (binary_expression) "rep != NULL" (identifier) "rep" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n size_t len = oc_string_len(rep->name);\n switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }\n rep = rep->next;\n }" ({) "{" (declaration) "size_t len = oc_string_len(rep->name);" (primitive_type) "size_t" (init_declarator) "len = oc_string_len(rep->name)" (identifier) "len" (=) "=" (call_expression) "oc_string_len(rep->name)" (identifier) "oc_string_len" (argument_list) "(rep->name)" (() "(" (field_expression) "rep->name" (identifier) "rep" (->) "->" (field_identifier) "name" ()) ")" (;) ";" (switch_statement) "switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }" (switch) "switch" (parenthesized_expression) "(rep->type)" (() "(" (field_expression) "rep->type" (identifier) "rep" (->) "->" (field_identifier) "type" ()) ")" (compound_statement) "{\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }" ({) "{" (case_statement) "case OC_REP_STRING:\n if (len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;" (case) "case" (identifier) "OC_REP_STRING" (:) ":" (if_statement) "if (len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }" (if) "if" (parenthesized_expression) "(len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0)" (() "(" (binary_expression) "len == 14 &&\n memcmp("currentprofile", oc_string(rep->name), 14) == 0" (binary_expression) "len == 14" (identifier) "len" (==) "==" (number_literal) "14" (&&) "&&" (binary_expression) "memcmp("currentprofile", oc_string(rep->name), 14) == 0" (call_expression) "memcmp("currentprofile", oc_string(rep->name), 14)" (identifier) "memcmp" (argument_list) "("currentprofile", oc_string(rep->name), 14)" (() "(" (string_literal) ""currentprofile"" (") """ (string_content) "currentprofile" (") """ (,) "," (call_expression) "oc_string(rep->name)" (identifier) "oc_string" (argument_list) "(rep->name)" (() "(" (field_expression) "rep->name" (identifier) "rep" (->) "->" (field_identifier) "name" ()) ")" (,) "," (number_literal) "14" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }" ({) "{" (declaration) "oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));" (type_identifier) "oc_sp_types_t" (init_declarator) "current_profile =\n string_to_sp(oc_string(rep->value.string))" (identifier) "current_profile" (=) "=" (call_expression) "string_to_sp(oc_string(rep->value.string))" (identifier) "string_to_sp" (argument_list) "(oc_string(rep->value.string))" (() "(" (call_expression) "oc_string(rep->value.string)" (identifier) "oc_string" (argument_list) "(rep->value.string)" (() "(" (field_expression) "rep->value.string" (field_expression) "rep->value" (identifier) "rep" (->) "->" (field_identifier) "value" (.) "." (field_identifier) "string" ()) ")" ()) ")" (;) ";" (if_statement) "if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }" (if) "if" (parenthesized_expression) "((current_profile & sp[device].supported_profiles) == 0)" (() "(" (binary_expression) "(current_profile & sp[device].supported_profiles) == 0" (parenthesized_expression) "(current_profile & sp[device].supported_profiles)" (() "(" (binary_expression) "current_profile & sp[device].supported_profiles" (identifier) "current_profile" (&) "&" (field_expression) "sp[device].supported_profiles" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "supported_profiles" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n return false;\n }" ({) "{" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (expression_statement) "sp[device].current_profile = current_profile;" (assignment_expression) "sp[device].current_profile = current_profile" (field_expression) "sp[device].current_profile" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "current_profile" (=) "=" (identifier) "current_profile" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;" (case) "case" (identifier) "OC_REP_STRING_ARRAY" (:) ":" (if_statement) "if (len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }" (if) "if" (parenthesized_expression) "(len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0)" (() "(" (binary_expression) "len == 17 &&\n memcmp("supportedprofiles", oc_string(rep->name), 17) == 0" (binary_expression) "len == 17" (identifier) "len" (==) "==" (number_literal) "17" (&&) "&&" (binary_expression) "memcmp("supportedprofiles", oc_string(rep->name), 17) == 0" (call_expression) "memcmp("supportedprofiles", oc_string(rep->name), 17)" (identifier) "memcmp" (argument_list) "("supportedprofiles", oc_string(rep->name), 17)" (() "(" (string_literal) ""supportedprofiles"" (") """ (string_content) "supportedprofiles" (") """ (,) "," (call_expression) "oc_string(rep->name)" (identifier) "oc_string" (argument_list) "(rep->name)" (() "(" (field_expression) "rep->name" (identifier) "rep" (->) "->" (field_identifier) "name" ()) ")" (,) "," (number_literal) "17" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }" ({) "{" (declaration) "oc_sp_types_t supported_profiles = 0;" (type_identifier) "oc_sp_types_t" (init_declarator) "supported_profiles = 0" (identifier) "supported_profiles" (=) "=" (number_literal) "0" (;) ";" (declaration) "size_t profile;" (primitive_type) "size_t" (identifier) "profile" (;) ";" (for_statement) "for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }" (for) "for" (() "(" (assignment_expression) "profile = 0" (identifier) "profile" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "profile < oc_string_array_get_allocated_size(rep->value.array)" (identifier) "profile" (<) "<" (call_expression) "oc_string_array_get_allocated_size(rep->value.array)" (identifier) "oc_string_array_get_allocated_size" (argument_list) "(rep->value.array)" (() "(" (field_expression) "rep->value.array" (field_expression) "rep->value" (identifier) "rep" (->) "->" (field_identifier) "value" (.) "." (field_identifier) "array" ()) ")" (;) ";" (update_expression) "profile++" (identifier) "profile" (++) "++" ()) ")" (compound_statement) "{\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }" ({) "{" (declaration) "const char *p = oc_string_array_get_item(rep->value.array, profile);" (type_qualifier) "const" (const) "const" (primitive_type) "char" (init_declarator) "*p = oc_string_array_get_item(rep->value.array, profile)" (pointer_declarator) "*p" (*) "*" (identifier) "p" (=) "=" (call_expression) "oc_string_array_get_item(rep->value.array, profile)" (identifier) "oc_string_array_get_item" (argument_list) "(rep->value.array, profile)" (() "(" (field_expression) "rep->value.array" (field_expression) "rep->value" (identifier) "rep" (->) "->" (field_identifier) "value" (.) "." (field_identifier) "array" (,) "," (identifier) "profile" ()) ")" (;) ";" (expression_statement) "supported_profiles |= string_to_sp(p);" (assignment_expression) "supported_profiles |= string_to_sp(p)" (identifier) "supported_profiles" (|=) "|=" (call_expression) "string_to_sp(p)" (identifier) "string_to_sp" (argument_list) "(p)" (() "(" (identifier) "p" ()) ")" (;) ";" (}) "}" (expression_statement) "sp[device].supported_profiles = supported_profiles;" (assignment_expression) "sp[device].supported_profiles = supported_profiles" (field_expression) "sp[device].supported_profiles" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "supported_profiles" (=) "=" (identifier) "supported_profiles" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n return false;\n break;" (default) "default" (:) ":" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "rep = rep->next;" (assignment_expression) "rep = rep->next" (identifier) "rep" (=) "=" (field_expression) "rep->next" (identifier) "rep" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (function_definition) "static const char *\nsp_to_string(oc_sp_types_t sp_type)\n{\n switch (sp_type) {\n case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;\n case OC_SP_BLACK:\n return OC_SP_BLACK_OID;\n case OC_SP_BLUE:\n return OC_SP_BLUE_OID;\n case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;\n }\n return NULL;\n}" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*\nsp_to_string(oc_sp_types_t sp_type)" (*) "*" (function_declarator) "sp_to_string(oc_sp_types_t sp_type)" (identifier) "sp_to_string" (parameter_list) "(oc_sp_types_t sp_type)" (() "(" (parameter_declaration) "oc_sp_types_t sp_type" (type_identifier) "oc_sp_types_t" (identifier) "sp_type" ()) ")" (compound_statement) "{\n switch (sp_type) {\n case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;\n case OC_SP_BLACK:\n return OC_SP_BLACK_OID;\n case OC_SP_BLUE:\n return OC_SP_BLUE_OID;\n case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;\n }\n return NULL;\n}" ({) "{" (switch_statement) "switch (sp_type) {\n case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;\n case OC_SP_BLACK:\n return OC_SP_BLACK_OID;\n case OC_SP_BLUE:\n return OC_SP_BLUE_OID;\n case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;\n }" (switch) "switch" (parenthesized_expression) "(sp_type)" (() "(" (identifier) "sp_type" ()) ")" (compound_statement) "{\n case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;\n case OC_SP_BLACK:\n return OC_SP_BLACK_OID;\n case OC_SP_BLUE:\n return OC_SP_BLUE_OID;\n case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;\n }" ({) "{" (case_statement) "case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;" (case) "case" (identifier) "OC_SP_BASELINE" (:) ":" (return_statement) "return OC_SP_BASELINE_OID;" (return) "return" (identifier) "OC_SP_BASELINE_OID" (;) ";" (case_statement) "case OC_SP_BLACK:\n return OC_SP_BLACK_OID;" (case) "case" (identifier) "OC_SP_BLACK" (:) ":" (return_statement) "return OC_SP_BLACK_OID;" (return) "return" (identifier) "OC_SP_BLACK_OID" (;) ";" (case_statement) "case OC_SP_BLUE:\n return OC_SP_BLUE_OID;" (case) "case" (identifier) "OC_SP_BLUE" (:) ":" (return_statement) "return OC_SP_BLUE_OID;" (return) "return" (identifier) "OC_SP_BLUE_OID" (;) ";" (case_statement) "case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;" (case) "case" (identifier) "OC_SP_PURPLE" (:) ":" (return_statement) "return OC_SP_PURPLE_OID;" (return) "return" (identifier) "OC_SP_PURPLE_OID" (;) ";" (}) "}" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (function_definition) "void\noc_sec_encode_sp(size_t device)\n{\n oc_rep_start_root_object();\n oc_process_baseline_interface(\n oc_core_get_resource_by_index(OCF_SEC_SP, device));\n oc_rep_set_text_string(root, currentprofile,\n sp_to_string(sp[device].current_profile));\n oc_rep_set_array(root, supportedprofiles);\n if ((sp[device].supported_profiles & OC_SP_BASELINE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));\n }\n if ((sp[device].supported_profiles & OC_SP_BLACK) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));\n }\n if ((sp[device].supported_profiles & OC_SP_BLUE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));\n }\n if ((sp[device].supported_profiles & OC_SP_PURPLE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));\n }\n oc_rep_close_array(root, supportedprofiles);\n oc_rep_end_root_object();\n}" (primitive_type) "void" (function_declarator) "oc_sec_encode_sp(size_t device)" (identifier) "oc_sec_encode_sp" (parameter_list) "(size_t device)" (() "(" (parameter_declaration) "size_t device" (primitive_type) "size_t" (identifier) "device" ()) ")" (compound_statement) "{\n oc_rep_start_root_object();\n oc_process_baseline_interface(\n oc_core_get_resource_by_index(OCF_SEC_SP, device));\n oc_rep_set_text_string(root, currentprofile,\n sp_to_string(sp[device].current_profile));\n oc_rep_set_array(root, supportedprofiles);\n if ((sp[device].supported_profiles & OC_SP_BASELINE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));\n }\n if ((sp[device].supported_profiles & OC_SP_BLACK) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));\n }\n if ((sp[device].supported_profiles & OC_SP_BLUE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));\n }\n if ((sp[device].supported_profiles & OC_SP_PURPLE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));\n }\n oc_rep_close_array(root, supportedprofiles);\n oc_rep_end_root_object();\n}" ({) "{" (expression_statement) "oc_rep_start_root_object();" (call_expression) "oc_rep_start_root_object()" (identifier) "oc_rep_start_root_object" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "oc_process_baseline_interface(\n oc_core_get_resource_by_index(OCF_SEC_SP, device));" (call_expression) "oc_process_baseline_interface(\n oc_core_get_resource_by_index(OCF_SEC_SP, device))" (identifier) "oc_process_baseline_interface" (argument_list) "(\n oc_core_get_resource_by_index(OCF_SEC_SP, device))" (() "(" (call_expression) "oc_core_get_resource_by_index(OCF_SEC_SP, device)" (identifier) "oc_core_get_resource_by_index" (argument_list) "(OCF_SEC_SP, device)" (() "(" (identifier) "OCF_SEC_SP" (,) "," (identifier) "device" ()) ")" ()) ")" (;) ";" (expression_statement) "oc_rep_set_text_string(root, currentprofile,\n sp_to_string(sp[device].current_profile));" (call_expression) "oc_rep_set_text_string(root, currentprofile,\n sp_to_string(sp[device].current_profile))" (identifier) "oc_rep_set_text_string" (argument_list) "(root, currentprofile,\n sp_to_string(sp[device].current_profile))" (() "(" (identifier) "root" (,) "," (identifier) "currentprofile" (,) "," (call_expression) "sp_to_string(sp[device].current_profile)" (identifier) "sp_to_string" (argument_list) "(sp[device].current_profile)" (() "(" (field_expression) "sp[device].current_profile" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "current_profile" ()) ")" ()) ")" (;) ";" (expression_statement) "oc_rep_set_array(root, supportedprofiles);" (call_expression) "oc_rep_set_array(root, supportedprofiles)" (identifier) "oc_rep_set_array" (argument_list) "(root, supportedprofiles)" (() "(" (identifier) "root" (,) "," (identifier) "supportedprofiles" ()) ")" (;) ";" (if_statement) "if ((sp[device].supported_profiles & OC_SP_BASELINE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));\n }" (if) "if" (parenthesized_expression) "((sp[device].supported_profiles & OC_SP_BASELINE) != 0)" (() "(" (binary_expression) "(sp[device].supported_profiles & OC_SP_BASELINE) != 0" (parenthesized_expression) "(sp[device].supported_profiles & OC_SP_BASELINE)" (() "(" (binary_expression) "sp[device].supported_profiles & OC_SP_BASELINE" (field_expression) "sp[device].supported_profiles" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "supported_profiles" (&) "&" (identifier) "OC_SP_BASELINE" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));\n }" ({) "{" (expression_statement) "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));" (call_expression) "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE))" (identifier) "oc_rep_add_text_string" (argument_list) "(supportedprofiles, sp_to_string(OC_SP_BASELINE))" (() "(" (identifier) "supportedprofiles" (,) "," (call_expression) "sp_to_string(OC_SP_BASELINE)" (identifier) "sp_to_string" (argument_list) "(OC_SP_BASELINE)" (() "(" (identifier) "OC_SP_BASELINE" ()) ")" ()) ")" (;) ";" (}) "}" (if_statement) "if ((sp[device].supported_profiles & OC_SP_BLACK) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));\n }" (if) "if" (parenthesized_expression) "((sp[device].supported_profiles & OC_SP_BLACK) != 0)" (() "(" (binary_expression) "(sp[device].supported_profiles & OC_SP_BLACK) != 0" (parenthesized_expression) "(sp[device].supported_profiles & OC_SP_BLACK)" (() "(" (binary_expression) "sp[device].supported_profiles & OC_SP_BLACK" (field_expression) "sp[device].supported_profiles" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "supported_profiles" (&) "&" (identifier) "OC_SP_BLACK" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));\n }" ({) "{" (expression_statement) "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));" (call_expression) "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK))" (identifier) "oc_rep_add_text_string" (argument_list) "(supportedprofiles, sp_to_string(OC_SP_BLACK))" (() "(" (identifier) "supportedprofiles" (,) "," (call_expression) "sp_to_string(OC_SP_BLACK)" (identifier) "sp_to_string" (argument_list) "(OC_SP_BLACK)" (() "(" (identifier) "OC_SP_BLACK" ()) ")" ()) ")" (;) ";" (}) "}" (if_statement) "if ((sp[device].supported_profiles & OC_SP_BLUE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));\n }" (if) "if" (parenthesized_expression) "((sp[device].supported_profiles & OC_SP_BLUE) != 0)" (() "(" (binary_expression) "(sp[device].supported_profiles & OC_SP_BLUE) != 0" (parenthesized_expression) "(sp[device].supported_profiles & OC_SP_BLUE)" (() "(" (binary_expression) "sp[device].supported_profiles & OC_SP_BLUE" (field_expression) "sp[device].supported_profiles" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "supported_profiles" (&) "&" (identifier) "OC_SP_BLUE" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));\n }" ({) "{" (expression_statement) "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));" (call_expression) "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE))" (identifier) "oc_rep_add_text_string" (argument_list) "(supportedprofiles, sp_to_string(OC_SP_BLUE))" (() "(" (identifier) "supportedprofiles" (,) "," (call_expression) "sp_to_string(OC_SP_BLUE)" (identifier) "sp_to_string" (argument_list) "(OC_SP_BLUE)" (() "(" (identifier) "OC_SP_BLUE" ()) ")" ()) ")" (;) ";" (}) "}" (if_statement) "if ((sp[device].supported_profiles & OC_SP_PURPLE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));\n }" (if) "if" (parenthesized_expression) "((sp[device].supported_profiles & OC_SP_PURPLE) != 0)" (() "(" (binary_expression) "(sp[device].supported_profiles & OC_SP_PURPLE) != 0" (parenthesized_expression) "(sp[device].supported_profiles & OC_SP_PURPLE)" (() "(" (binary_expression) "sp[device].supported_profiles & OC_SP_PURPLE" (field_expression) "sp[device].supported_profiles" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (.) "." (field_identifier) "supported_profiles" (&) "&" (identifier) "OC_SP_PURPLE" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));\n }" ({) "{" (expression_statement) "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));" (call_expression) "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE))" (identifier) "oc_rep_add_text_string" (argument_list) "(supportedprofiles, sp_to_string(OC_SP_PURPLE))" (() "(" (identifier) "supportedprofiles" (,) "," (call_expression) "sp_to_string(OC_SP_PURPLE)" (identifier) "sp_to_string" (argument_list) "(OC_SP_PURPLE)" (() "(" (identifier) "OC_SP_PURPLE" ()) ")" ()) ")" (;) ";" (}) "}" (expression_statement) "oc_rep_close_array(root, supportedprofiles);" (call_expression) "oc_rep_close_array(root, supportedprofiles)" (identifier) "oc_rep_close_array" (argument_list) "(root, supportedprofiles)" (() "(" (identifier) "root" (,) "," (identifier) "supportedprofiles" ()) ")" (;) ";" (expression_statement) "oc_rep_end_root_object();" (call_expression) "oc_rep_end_root_object()" (identifier) "oc_rep_end_root_object" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "oc_sec_sp_t *\noc_sec_get_sp(size_t device)\n{\n return &sp[device];\n}" (type_identifier) "oc_sec_sp_t" (pointer_declarator) "*\noc_sec_get_sp(size_t device)" (*) "*" (function_declarator) "oc_sec_get_sp(size_t device)" (identifier) "oc_sec_get_sp" (parameter_list) "(size_t device)" (() "(" (parameter_declaration) "size_t device" (primitive_type) "size_t" (identifier) "device" ()) ")" (compound_statement) "{\n return &sp[device];\n}" ({) "{" (return_statement) "return &sp[device];" (return) "return" (pointer_expression) "&sp[device]" (&) "&" (subscript_expression) "sp[device]" (identifier) "sp" ([) "[" (identifier) "device" (]) "]" (;) ";" (}) "}" (function_definition) "void\nget_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)data;\n switch (iface_mask) {\n case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;\n default:\n break;\n }\n}" (primitive_type) "void" (function_declarator) "get_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)" (identifier) "get_sp" (parameter_list) "(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)" (() "(" (parameter_declaration) "oc_request_t *request" (type_identifier) "oc_request_t" (pointer_declarator) "*request" (*) "*" (identifier) "request" (,) "," (parameter_declaration) "oc_interface_mask_t iface_mask" (type_identifier) "oc_interface_mask_t" (identifier) "iface_mask" (,) "," (parameter_declaration) "void *data" (primitive_type) "void" (pointer_declarator) "*data" (*) "*" (identifier) "data" ()) ")" (compound_statement) "{\n (void)data;\n switch (iface_mask) {\n case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;\n default:\n break;\n }\n}" ({) "{" (expression_statement) "(void)data;" (cast_expression) "(void)data" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "data" (;) ";" (switch_statement) "switch (iface_mask) {\n case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;\n default:\n break;\n }" (switch) "switch" (parenthesized_expression) "(iface_mask)" (() "(" (identifier) "iface_mask" ()) ")" (compound_statement) "{\n case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;\n default:\n break;\n }" ({) "{" (case_statement) "case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;" (case) "case" (identifier) "OC_IF_BASELINE" (:) ":" (compound_statement) "{\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n }" ({) "{" (expression_statement) "oc_sec_encode_sp(request->resource->device);" (call_expression) "oc_sec_encode_sp(request->resource->device)" (identifier) "oc_sec_encode_sp" (argument_list) "(request->resource->device)" (() "(" (field_expression) "request->resource->device" (field_expression) "request->resource" (identifier) "request" (->) "->" (field_identifier) "resource" (->) "->" (field_identifier) "device" ()) ")" (;) ";" (expression_statement) "oc_send_response(request, OC_STATUS_OK);" (call_expression) "oc_send_response(request, OC_STATUS_OK)" (identifier) "oc_send_response" (argument_list) "(request, OC_STATUS_OK)" (() "(" (identifier) "request" (,) "," (identifier) "OC_STATUS_OK" ()) ")" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n break;" (default) "default" (:) ":" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (function_definition) "void\npost_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)iface_mask;\n (void)data;\n size_t device = request->resource->device;\n if (oc_sec_decode_sp(request->request_payload, device)) {\n oc_send_response(request, OC_STATUS_CHANGED);\n request->response->response_buffer->response_length = 0;\n oc_sec_dump_sp(device);\n } else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }\n}" (primitive_type) "void" (function_declarator) "post_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)" (identifier) "post_sp" (parameter_list) "(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)" (() "(" (parameter_declaration) "oc_request_t *request" (type_identifier) "oc_request_t" (pointer_declarator) "*request" (*) "*" (identifier) "request" (,) "," (parameter_declaration) "oc_interface_mask_t iface_mask" (type_identifier) "oc_interface_mask_t" (identifier) "iface_mask" (,) "," (parameter_declaration) "void *data" (primitive_type) "void" (pointer_declarator) "*data" (*) "*" (identifier) "data" ()) ")" (compound_statement) "{\n (void)iface_mask;\n (void)data;\n size_t device = request->resource->device;\n if (oc_sec_decode_sp(request->request_payload, device)) {\n oc_send_response(request, OC_STATUS_CHANGED);\n request->response->response_buffer->response_length = 0;\n oc_sec_dump_sp(device);\n } else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }\n}" ({) "{" (expression_statement) "(void)iface_mask;" (cast_expression) "(void)iface_mask" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "iface_mask" (;) ";" (expression_statement) "(void)data;" (cast_expression) "(void)data" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "data" (;) ";" (declaration) "size_t device = request->resource->device;" (primitive_type) "size_t" (init_declarator) "device = request->resource->device" (identifier) "device" (=) "=" (field_expression) "request->resource->device" (field_expression) "request->resource" (identifier) "request" (->) "->" (field_identifier) "resource" (->) "->" (field_identifier) "device" (;) ";" (if_statement) "if (oc_sec_decode_sp(request->request_payload, device)) {\n oc_send_response(request, OC_STATUS_CHANGED);\n request->response->response_buffer->response_length = 0;\n oc_sec_dump_sp(device);\n } else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }" (if) "if" (parenthesized_expression) "(oc_sec_decode_sp(request->request_payload, device))" (() "(" (call_expression) "oc_sec_decode_sp(request->request_payload, device)" (identifier) "oc_sec_decode_sp" (argument_list) "(request->request_payload, device)" (() "(" (field_expression) "request->request_payload" (identifier) "request" (->) "->" (field_identifier) "request_payload" (,) "," (identifier) "device" ()) ")" ()) ")" (compound_statement) "{\n oc_send_response(request, OC_STATUS_CHANGED);\n request->response->response_buffer->response_length = 0;\n oc_sec_dump_sp(device);\n }" ({) "{" (expression_statement) "oc_send_response(request, OC_STATUS_CHANGED);" (call_expression) "oc_send_response(request, OC_STATUS_CHANGED)" (identifier) "oc_send_response" (argument_list) "(request, OC_STATUS_CHANGED)" (() "(" (identifier) "request" (,) "," (identifier) "OC_STATUS_CHANGED" ()) ")" (;) ";" (expression_statement) "request->response->response_buffer->response_length = 0;" (assignment_expression) "request->response->response_buffer->response_length = 0" (field_expression) "request->response->response_buffer->response_length" (field_expression) "request->response->response_buffer" (field_expression) "request->response" (identifier) "request" (->) "->" (field_identifier) "response" (->) "->" (field_identifier) "response_buffer" (->) "->" (field_identifier) "response_length" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "oc_sec_dump_sp(device);" (call_expression) "oc_sec_dump_sp(device)" (identifier) "oc_sec_dump_sp" (argument_list) "(device)" (() "(" (identifier) "device" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }" (else) "else" (compound_statement) "{\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }" ({) "{" (expression_statement) "oc_send_response(request, OC_STATUS_BAD_REQUEST);" (call_expression) "oc_send_response(request, OC_STATUS_BAD_REQUEST)" (identifier) "oc_send_response" (argument_list) "(request, OC_STATUS_BAD_REQUEST)" (() "(" (identifier) "request" (,) "," (identifier) "OC_STATUS_BAD_REQUEST" ()) ")" (;) ";" (}) "}" (}) "}" (#endif) "#endif" (comment) "/* OC_SECURITY */"
1,581
0
{"language": "c", "success": true, "metadata": {"lines": 217, "avg_line_length": 29.64, "nodes": 928, "errors": 0, "source_hash": "de3d90e008128b8ba6c9e90ad0e185dd33cdd6c945c1ab2e84aa1e4cbfc023a3", "categorized_nodes": 692}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifdef OC_SECURITY\n#include \"oc_sp.h\"\n#include \"oc_api.h\"\n#include \"oc_core_res.h\"\n#include \"oc_pki.h\"\n#include \"oc_pstat.h\"\n#include \"oc_store.h\"\n#ifdef OC_DYNAMIC_ALLOCATION\n#include \"port/oc_assert.h\"\n#include <stdlib.h>\nstatic oc_sec_sp_t *sp;\nstatic oc_sec_sp_t *sp_mfg_default;\n#else /* OC_DYNAMIC_ALLOCATION */\nstatic oc_sec_sp_t sp[OC_MAX_NUM_DEVICES];\nstatic oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES];\n#endif /* !OC_DYNAMIC_ALLOCATION */\n\n#define OC_SP_BASELINE_OID \"1.3.6.1.4.1.51414.0.0.1.0\"\n#define OC_SP_BLACK_OID \"1.3.6.1.4.1.51414.0.0.2.0\"\n#define OC_SP_BLUE_OID \"1.3.6.1.4.1.51414.0.0.3.0\"\n#define OC_SP_PURPLE_OID \"1.3.6.1.4.1.51414.0.0.4.0\"\n\nvoid\noc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles,\n oc_sp_types_t current_profile, int mfg_credid)\n{\n sp_mfg_default[device].supported_profiles |= supported_profiles;\n sp_mfg_default[device].current_profile = current_profile;\n sp_mfg_default[device].credid = mfg_credid;\n sp[device] = sp_mfg_default[device];\n}\n\nvoid\noc_sec_sp_init(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp) {\n oc_abort(\"Insufficient memory\");\n }\n sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp_mfg_default) {\n oc_abort(\"Insufficient memory\");\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n size_t device;\n for (device = 0; device < oc_core_get_num_devices(); device++) {\n sp_mfg_default[device].current_profile = OC_SP_BASELINE;\n sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;\n sp_mfg_default[device].credid = -1;\n }\n}\n\nvoid\noc_sec_sp_free(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n if (sp) {\n free(sp);\n }\n if (sp_mfg_default) {\n free(sp_mfg_default);\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n}\n\nvoid\noc_sec_sp_default(size_t device)\n{\n sp[device] = sp_mfg_default[device];\n}\n\nstatic oc_sp_types_t\nstring_to_sp(const char *sp_string)\n{\n oc_sp_types_t sp = 0;\n if (strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0) {\n sp = OC_SP_BASELINE;\n } else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }\n return sp;\n}\n\nbool\noc_sec_decode_sp(oc_rep_t *rep, size_t device)\n{\n oc_sec_pstat_t *pstat = oc_sec_get_pstat(device);\n if (pstat->s == OC_DOS_RFNOP) {\n return false;\n }\n while (rep != NULL) {\n size_t len = oc_string_len(rep->name);\n switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp(\"currentprofile\", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp(\"supportedprofiles\", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }\n rep = rep->next;\n }\n return true;\n}\n\nstatic const char *\nsp_to_string(oc_sp_types_t sp_type)\n{\n switch (sp_type) {\n case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;\n case OC_SP_BLACK:\n return OC_SP_BLACK_OID;\n case OC_SP_BLUE:\n return OC_SP_BLUE_OID;\n case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;\n }\n return NULL;\n}\n\nvoid\noc_sec_encode_sp(size_t device)\n{\n oc_rep_start_root_object();\n oc_process_baseline_interface(\n oc_core_get_resource_by_index(OCF_SEC_SP, device));\n oc_rep_set_text_string(root, currentprofile,\n sp_to_string(sp[device].current_profile));\n oc_rep_set_array(root, supportedprofiles);\n if ((sp[device].supported_profiles & OC_SP_BASELINE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));\n }\n if ((sp[device].supported_profiles & OC_SP_BLACK) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));\n }\n if ((sp[device].supported_profiles & OC_SP_BLUE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));\n }\n if ((sp[device].supported_profiles & OC_SP_PURPLE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));\n }\n oc_rep_close_array(root, supportedprofiles);\n oc_rep_end_root_object();\n}\n\noc_sec_sp_t *\noc_sec_get_sp(size_t device)\n{\n return &sp[device];\n}\n\nvoid\nget_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)data;\n switch (iface_mask) {\n case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;\n default:\n break;\n }\n}\n\nvoid\npost_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)iface_mask;\n (void)data;\n size_t device = request->resource->device;\n if (oc_sec_decode_sp(request->request_payload, device)) {\n oc_send_response(request, OC_STATUS_CHANGED);\n request->response->response_buffer->response_length = 0;\n oc_sec_dump_sp(device);\n } else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 53, 57, 61, 65, 69, 118, 222, 247, 263, 404, 628, 665, 794, 809, 857, 927], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 230, "column": 6}}, {"id": 1, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 2, "type": "identifier", "text": "OC_SECURITY", "parent": 0, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include \"oc_sp.h\"\n", "parent": 0, "children": [4, 5], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"oc_sp.h\"", "parent": 3, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include \"oc_api.h\"\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": "string_literal", "text": "\"oc_api.h\"", "parent": 6, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"oc_core_res.h\"\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": "string_literal", "text": "\"oc_core_res.h\"", "parent": 9, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 24}}, {"id": 12, "type": "preproc_include", "text": "#include \"oc_pki.h\"\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": "string_literal", "text": "\"oc_pki.h\"", "parent": 12, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include \"oc_pstat.h\"\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": "string_literal", "text": "\"oc_pstat.h\"", "parent": 15, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 21}}, {"id": 18, "type": "preproc_include", "text": "#include \"oc_store.h\"\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": "string_literal", "text": "\"oc_store.h\"", "parent": 18, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 21}}, {"id": 21, "type": "preproc_ifdef", "text": "#ifdef OC_DYNAMIC_ALLOCATION\n#include \"port/oc_assert.h\"\n#include <stdlib.h>\nstatic oc_sec_sp_t *sp;\nstatic oc_sec_sp_t *sp_mfg_default;\n#else /* OC_DYNAMIC_ALLOCATION */\nstatic oc_sec_sp_t sp[OC_MAX_NUM_DEVICES];\nstatic oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES];\n#endif", "parent": 0, "children": [22, 23, 24, 27, 30, 35, 40, 52], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 22, "type": "#ifdef", "text": "#ifdef", "parent": 21, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 23, "type": "identifier", "text": "OC_DYNAMIC_ALLOCATION", "parent": 21, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 28}}, {"id": 24, "type": "preproc_include", "text": "#include \"port/oc_assert.h\"\n", "parent": 21, "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": "\"port/oc_assert.h\"", "parent": 24, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 27}}, {"id": 27, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": 21, "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": "<stdlib.h>", "parent": 27, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 19}}, {"id": 30, "type": "declaration", "text": "static oc_sec_sp_t *sp;", "parent": 21, "children": [31, 32], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 23}}, {"id": 31, "type": "type_identifier", "text": "oc_sec_sp_t", "parent": 30, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 18}}, {"id": 32, "type": "pointer_declarator", "text": "*sp", "parent": 30, "children": [33, 34], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 22}}, {"id": 33, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 20}}, {"id": 34, "type": "identifier", "text": "sp", "parent": 32, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 22}}, {"id": 35, "type": "declaration", "text": "static oc_sec_sp_t *sp_mfg_default;", "parent": 21, "children": [36, 37], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 35}}, {"id": 36, "type": "type_identifier", "text": "oc_sec_sp_t", "parent": 35, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 18}}, {"id": 37, "type": "pointer_declarator", "text": "*sp_mfg_default", "parent": 35, "children": [38, 39], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 34}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 20}}, {"id": 39, "type": "identifier", "text": "sp_mfg_default", "parent": 37, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 34}}, {"id": 40, "type": "preproc_else", "text": "#else /* OC_DYNAMIC_ALLOCATION */\nstatic oc_sec_sp_t sp[OC_MAX_NUM_DEVICES];\nstatic oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES];", "parent": 21, "children": [41, 42, 47], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 30, "column": 54}}, {"id": 41, "type": "#else", "text": "#else", "parent": 40, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 5}}, {"id": 42, "type": "declaration", "text": "static oc_sec_sp_t sp[OC_MAX_NUM_DEVICES];", "parent": 40, "children": [43, 44], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 42}}, {"id": 43, "type": "type_identifier", "text": "oc_sec_sp_t", "parent": 42, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 18}}, {"id": 44, "type": "array_declarator", "text": "sp[OC_MAX_NUM_DEVICES]", "parent": 42, "children": [45, 46], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 41}}, {"id": 45, "type": "identifier", "text": "sp", "parent": 44, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 21}}, {"id": 46, "type": "identifier", "text": "OC_MAX_NUM_DEVICES", "parent": 44, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 40}}, {"id": 47, "type": "declaration", "text": "static oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES];", "parent": 40, "children": [48, 49], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 54}}, {"id": 48, "type": "type_identifier", "text": "oc_sec_sp_t", "parent": 47, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 18}}, {"id": 49, "type": "array_declarator", "text": "sp_mfg_default[OC_MAX_NUM_DEVICES]", "parent": 47, "children": [50, 51], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 53}}, {"id": 50, "type": "identifier", "text": "sp_mfg_default", "parent": 49, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 33}}, {"id": 51, "type": "identifier", "text": "OC_MAX_NUM_DEVICES", "parent": 49, "children": [], "start_point": {"row": 30, "column": 34}, "end_point": {"row": 30, "column": 52}}, {"id": 52, "type": "#endif", "text": "#endif", "parent": 21, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 53, "type": "preproc_def", "text": "#define OC_SP_BASELINE_OID \"1.3.6.1.4.1.51414.0.0.1.0\"\n", "parent": 0, "children": [54, 55, 56], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 54, "type": "#define", "text": "#define", "parent": 53, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 55, "type": "identifier", "text": "OC_SP_BASELINE_OID", "parent": 53, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 26}}, {"id": 56, "type": "preproc_arg", "text": "\"1.3.6.1.4.1.51414.0.0.1.0\"", "parent": 53, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 54}}, {"id": 57, "type": "preproc_def", "text": "#define OC_SP_BLACK_OID \"1.3.6.1.4.1.51414.0.0.2.0\"\n", "parent": 0, "children": [58, 59, 60], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 58, "type": "#define", "text": "#define", "parent": 57, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 7}}, {"id": 59, "type": "identifier", "text": "OC_SP_BLACK_OID", "parent": 57, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 23}}, {"id": 60, "type": "preproc_arg", "text": "\"1.3.6.1.4.1.51414.0.0.2.0\"", "parent": 57, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 51}}, {"id": 61, "type": "preproc_def", "text": "#define OC_SP_BLUE_OID \"1.3.6.1.4.1.51414.0.0.3.0\"\n", "parent": 0, "children": [62, 63, 64], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 62, "type": "#define", "text": "#define", "parent": 61, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 63, "type": "identifier", "text": "OC_SP_BLUE_OID", "parent": 61, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 22}}, {"id": 64, "type": "preproc_arg", "text": "\"1.3.6.1.4.1.51414.0.0.3.0\"", "parent": 61, "children": [], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 50}}, {"id": 65, "type": "preproc_def", "text": "#define OC_SP_PURPLE_OID \"1.3.6.1.4.1.51414.0.0.4.0\"\n", "parent": 0, "children": [66, 67, 68], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 66, "type": "#define", "text": "#define", "parent": 65, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 67, "type": "identifier", "text": "OC_SP_PURPLE_OID", "parent": 65, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 24}}, {"id": 68, "type": "preproc_arg", "text": "\"1.3.6.1.4.1.51414.0.0.4.0\"", "parent": 65, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 52}}, {"id": 69, "type": "function_definition", "text": "void\noc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles,\n oc_sp_types_t current_profile, int mfg_credid)\n{\n sp_mfg_default[device].supported_profiles |= supported_profiles;\n sp_mfg_default[device].current_profile = current_profile;\n sp_mfg_default[device].credid = mfg_credid;\n sp[device] = sp_mfg_default[device];\n}", "parent": 0, "children": [70, 71], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 46, "column": 1}}, {"id": 70, "type": "primitive_type", "text": "void", "parent": 69, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 4}}, {"id": 71, "type": "function_declarator", "text": "oc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles,\n oc_sp_types_t current_profile, int mfg_credid)", "parent": 69, "children": [72, 73], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 74}}, {"id": 72, "type": "identifier", "text": "oc_pki_set_security_profile", "parent": 71, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 27}}, {"id": 73, "type": "parameter_list", "text": "(size_t device, oc_sp_types_t supported_profiles,\n oc_sp_types_t current_profile, int mfg_credid)", "parent": 71, "children": [74, 77, 80, 83], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 40, "column": 74}}, {"id": 74, "type": "parameter_declaration", "text": "size_t device", "parent": 73, "children": [75, 76], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 41}}, {"id": 75, "type": "primitive_type", "text": "size_t", "parent": 74, "children": [], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 34}}, {"id": 76, "type": "identifier", "text": "device", "parent": 74, "children": [], "start_point": {"row": 39, "column": 35}, "end_point": {"row": 39, "column": 41}}, {"id": 77, "type": "parameter_declaration", "text": "oc_sp_types_t supported_profiles", "parent": 73, "children": [78, 79], "start_point": {"row": 39, "column": 43}, "end_point": {"row": 39, "column": 75}}, {"id": 78, "type": "type_identifier", "text": "oc_sp_types_t", "parent": 77, "children": [], "start_point": {"row": 39, "column": 43}, "end_point": {"row": 39, "column": 56}}, {"id": 79, "type": "identifier", "text": "supported_profiles", "parent": 77, "children": [], "start_point": {"row": 39, "column": 57}, "end_point": {"row": 39, "column": 75}}, {"id": 80, "type": "parameter_declaration", "text": "oc_sp_types_t current_profile", "parent": 73, "children": [81, 82], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 57}}, {"id": 81, "type": "type_identifier", "text": "oc_sp_types_t", "parent": 80, "children": [], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 41}}, {"id": 82, "type": "identifier", "text": "current_profile", "parent": 80, "children": [], "start_point": {"row": 40, "column": 42}, "end_point": {"row": 40, "column": 57}}, {"id": 83, "type": "parameter_declaration", "text": "int mfg_credid", "parent": 73, "children": [84, 85], "start_point": {"row": 40, "column": 59}, "end_point": {"row": 40, "column": 73}}, {"id": 84, "type": "primitive_type", "text": "int", "parent": 83, "children": [], "start_point": {"row": 40, "column": 59}, "end_point": {"row": 40, "column": 62}}, {"id": 85, "type": "identifier", "text": "mfg_credid", "parent": 83, "children": [], "start_point": {"row": 40, "column": 63}, "end_point": {"row": 40, "column": 73}}, {"id": 86, "type": "assignment_expression", "text": "sp_mfg_default[device].supported_profiles |= supported_profiles", "parent": 69, "children": [87, 92, 93], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 65}}, {"id": 87, "type": "field_expression", "text": "sp_mfg_default[device].supported_profiles", "parent": 86, "children": [88, 91], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 43}}, {"id": 88, "type": "subscript_expression", "text": "sp_mfg_default[device]", "parent": 87, "children": [89, 90], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 24}}, {"id": 89, "type": "identifier", "text": "sp_mfg_default", "parent": 88, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 16}}, {"id": 90, "type": "identifier", "text": "device", "parent": 88, "children": [], "start_point": {"row": 42, "column": 17}, "end_point": {"row": 42, "column": 23}}, {"id": 91, "type": "field_identifier", "text": "supported_profiles", "parent": 87, "children": [], "start_point": {"row": 42, "column": 25}, "end_point": {"row": 42, "column": 43}}, {"id": 92, "type": "|=", "text": "|=", "parent": 86, "children": [], "start_point": {"row": 42, "column": 44}, "end_point": {"row": 42, "column": 46}}, {"id": 93, "type": "identifier", "text": "supported_profiles", "parent": 86, "children": [], "start_point": {"row": 42, "column": 47}, "end_point": {"row": 42, "column": 65}}, {"id": 94, "type": "assignment_expression", "text": "sp_mfg_default[device].current_profile = current_profile", "parent": 69, "children": [95, 100, 101], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 58}}, {"id": 95, "type": "field_expression", "text": "sp_mfg_default[device].current_profile", "parent": 94, "children": [96, 99], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 40}}, {"id": 96, "type": "subscript_expression", "text": "sp_mfg_default[device]", "parent": 95, "children": [97, 98], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 24}}, {"id": 97, "type": "identifier", "text": "sp_mfg_default", "parent": 96, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 16}}, {"id": 98, "type": "identifier", "text": "device", "parent": 96, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 23}}, {"id": 99, "type": "field_identifier", "text": "current_profile", "parent": 95, "children": [], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 40}}, {"id": 100, "type": "=", "text": "=", "parent": 94, "children": [], "start_point": {"row": 43, "column": 41}, "end_point": {"row": 43, "column": 42}}, {"id": 101, "type": "identifier", "text": "current_profile", "parent": 94, "children": [], "start_point": {"row": 43, "column": 43}, "end_point": {"row": 43, "column": 58}}, {"id": 102, "type": "assignment_expression", "text": "sp_mfg_default[device].credid = mfg_credid", "parent": 69, "children": [103, 108, 109], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 44}}, {"id": 103, "type": "field_expression", "text": "sp_mfg_default[device].credid", "parent": 102, "children": [104, 107], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 31}}, {"id": 104, "type": "subscript_expression", "text": "sp_mfg_default[device]", "parent": 103, "children": [105, 106], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 24}}, {"id": 105, "type": "identifier", "text": "sp_mfg_default", "parent": 104, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 16}}, {"id": 106, "type": "identifier", "text": "device", "parent": 104, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 23}}, {"id": 107, "type": "field_identifier", "text": "credid", "parent": 103, "children": [], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 31}}, {"id": 108, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 33}}, {"id": 109, "type": "identifier", "text": "mfg_credid", "parent": 102, "children": [], "start_point": {"row": 44, "column": 34}, "end_point": {"row": 44, "column": 44}}, {"id": 110, "type": "assignment_expression", "text": "sp[device] = sp_mfg_default[device]", "parent": 69, "children": [111, 114, 115], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 37}}, {"id": 111, "type": "subscript_expression", "text": "sp[device]", "parent": 110, "children": [112, 113], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 12}}, {"id": 112, "type": "identifier", "text": "sp", "parent": 111, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 4}}, {"id": 113, "type": "identifier", "text": "device", "parent": 111, "children": [], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 11}}, {"id": 114, "type": "=", "text": "=", "parent": 110, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 14}}, {"id": 115, "type": "subscript_expression", "text": "sp_mfg_default[device]", "parent": 110, "children": [116, 117], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 37}}, {"id": 116, "type": "identifier", "text": "sp_mfg_default", "parent": 115, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 29}}, {"id": 117, "type": "identifier", "text": "device", "parent": 115, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 36}}, {"id": 118, "type": "function_definition", "text": "void\noc_sec_sp_init(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp) {\n oc_abort(\"Insufficient memory\");\n }\n sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp_mfg_default) {\n oc_abort(\"Insufficient memory\");\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n size_t device;\n for (device = 0; device < oc_core_get_num_devices(); device++) {\n sp_mfg_default[device].current_profile = OC_SP_BASELINE;\n sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;\n sp_mfg_default[device].credid = -1;\n }\n}", "parent": 0, "children": [119, 120], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 119, "type": "primitive_type", "text": "void", "parent": 118, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 4}}, {"id": 120, "type": "function_declarator", "text": "oc_sec_sp_init(void)", "parent": 118, "children": [121, 122], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 20}}, {"id": 121, "type": "identifier", "text": "oc_sec_sp_init", "parent": 120, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 14}}, {"id": 122, "type": "parameter_list", "text": "(void)", "parent": 120, "children": [123], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 20}}, {"id": 123, "type": "parameter_declaration", "text": "void", "parent": 122, "children": [124], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 19}}, {"id": 124, "type": "primitive_type", "text": "void", "parent": 123, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 19}}, {"id": 125, "type": "preproc_ifdef", "text": "#ifdef OC_DYNAMIC_ALLOCATION\n sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp) {\n oc_abort(\"Insufficient memory\");\n }\n sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp_mfg_default) {\n oc_abort(\"Insufficient memory\");\n }\n#endif", "parent": 118, "children": [126, 127, 145, 171, 180], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 61, "column": 6}}, {"id": 126, "type": "#ifdef", "text": "#ifdef", "parent": 125, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 127, "type": "identifier", "text": "OC_DYNAMIC_ALLOCATION", "parent": 125, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 28}}, {"id": 128, "type": "assignment_expression", "text": "sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))", "parent": 125, "children": [129, 130, 131], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 76}}, {"id": 129, "type": "identifier", "text": "sp", "parent": 128, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 4}}, {"id": 130, "type": "=", "text": "=", "parent": 128, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 6}}, {"id": 131, "type": "cast_expression", "text": "(oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))", "parent": 128, "children": [132, 136], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 76}}, {"id": 132, "type": "type_descriptor", "text": "oc_sec_sp_t *", "parent": 131, "children": [133, 134], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 21}}, {"id": 133, "type": "type_identifier", "text": "oc_sec_sp_t", "parent": 132, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 19}}, {"id": 134, "type": "abstract_pointer_declarator", "text": "*", "parent": 132, "children": [135], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 21}}, {"id": 135, "type": "*", "text": "*", "parent": 134, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 21}}, {"id": 136, "type": "call_expression", "text": "calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))", "parent": 131, "children": [137, 138], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 76}}, {"id": 137, "type": "identifier", "text": "calloc", "parent": 136, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 28}}, {"id": 138, "type": "argument_list", "text": "(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))", "parent": 136, "children": [139, 142], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 76}}, {"id": 139, "type": "call_expression", "text": "oc_core_get_num_devices()", "parent": 138, "children": [140, 141], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 54}}, {"id": 140, "type": "identifier", "text": "oc_core_get_num_devices", "parent": 139, "children": [], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 52}}, {"id": 141, "type": "argument_list", "text": "()", "parent": 139, "children": [], "start_point": {"row": 52, "column": 52}, "end_point": {"row": 52, "column": 54}}, {"id": 142, "type": "sizeof_expression", "text": "sizeof(oc_sec_sp_t)", "parent": 138, "children": [143], "start_point": {"row": 52, "column": 56}, "end_point": {"row": 52, "column": 75}}, {"id": 143, "type": "parenthesized_expression", "text": "(oc_sec_sp_t)", "parent": 142, "children": [144], "start_point": {"row": 52, "column": 62}, "end_point": {"row": 52, "column": 75}}, {"id": 144, "type": "identifier", "text": "oc_sec_sp_t", "parent": 143, "children": [], "start_point": {"row": 52, "column": 63}, "end_point": {"row": 52, "column": 74}}, {"id": 145, "type": "if_statement", "text": "if (!sp) {\n oc_abort(\"Insufficient memory\");\n }", "parent": 125, "children": [146], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 55, "column": 3}}, {"id": 146, "type": "parenthesized_expression", "text": "(!sp)", "parent": 145, "children": [147], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 10}}, {"id": 147, "type": "unary_expression", "text": "!sp", "parent": 146, "children": [148, 149], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 9}}, {"id": 148, "type": "!", "text": "!", "parent": 147, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 7}}, {"id": 149, "type": "identifier", "text": "sp", "parent": 147, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 9}}, {"id": 150, "type": "call_expression", "text": "oc_abort(\"Insufficient memory\")", "parent": 145, "children": [151, 152], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 35}}, {"id": 151, "type": "identifier", "text": "oc_abort", "parent": 150, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 12}}, {"id": 152, "type": "argument_list", "text": "(\"Insufficient memory\")", "parent": 150, "children": [153], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 35}}, {"id": 153, "type": "string_literal", "text": "\"Insufficient memory\"", "parent": 152, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 34}}, {"id": 154, "type": "assignment_expression", "text": "sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))", "parent": 125, "children": [155, 156, 157], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 57, "column": 73}}, {"id": 155, "type": "identifier", "text": "sp_mfg_default", "parent": 154, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 16}}, {"id": 156, "type": "=", "text": "=", "parent": 154, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 18}}, {"id": 157, "type": "cast_expression", "text": "(oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))", "parent": 154, "children": [158, 162], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 73}}, {"id": 158, "type": "type_descriptor", "text": "oc_sec_sp_t *", "parent": 157, "children": [159, 160], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 18}}, {"id": 159, "type": "type_identifier", "text": "oc_sec_sp_t", "parent": 158, "children": [], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 16}}, {"id": 160, "type": "abstract_pointer_declarator", "text": "*", "parent": 158, "children": [161], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 18}}, {"id": 161, "type": "*", "text": "*", "parent": 160, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 18}}, {"id": 162, "type": "call_expression", "text": "calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))", "parent": 157, "children": [163, 164], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 73}}, {"id": 163, "type": "identifier", "text": "calloc", "parent": 162, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 25}}, {"id": 164, "type": "argument_list", "text": "(oc_core_get_num_devices(), sizeof(oc_sec_sp_t))", "parent": 162, "children": [165, 168], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 73}}, {"id": 165, "type": "call_expression", "text": "oc_core_get_num_devices()", "parent": 164, "children": [166, 167], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 51}}, {"id": 166, "type": "identifier", "text": "oc_core_get_num_devices", "parent": 165, "children": [], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 49}}, {"id": 167, "type": "argument_list", "text": "()", "parent": 165, "children": [], "start_point": {"row": 57, "column": 49}, "end_point": {"row": 57, "column": 51}}, {"id": 168, "type": "sizeof_expression", "text": "sizeof(oc_sec_sp_t)", "parent": 164, "children": [169], "start_point": {"row": 57, "column": 53}, "end_point": {"row": 57, "column": 72}}, {"id": 169, "type": "parenthesized_expression", "text": "(oc_sec_sp_t)", "parent": 168, "children": [170], "start_point": {"row": 57, "column": 59}, "end_point": {"row": 57, "column": 72}}, {"id": 170, "type": "identifier", "text": "oc_sec_sp_t", "parent": 169, "children": [], "start_point": {"row": 57, "column": 60}, "end_point": {"row": 57, "column": 71}}, {"id": 171, "type": "if_statement", "text": "if (!sp_mfg_default) {\n oc_abort(\"Insufficient memory\");\n }", "parent": 125, "children": [172], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 60, "column": 3}}, {"id": 172, "type": "parenthesized_expression", "text": "(!sp_mfg_default)", "parent": 171, "children": [173], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 22}}, {"id": 173, "type": "unary_expression", "text": "!sp_mfg_default", "parent": 172, "children": [174, 175], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 21}}, {"id": 174, "type": "!", "text": "!", "parent": 173, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 7}}, {"id": 175, "type": "identifier", "text": "sp_mfg_default", "parent": 173, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 21}}, {"id": 176, "type": "call_expression", "text": "oc_abort(\"Insufficient memory\")", "parent": 171, "children": [177, 178], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 35}}, {"id": 177, "type": "identifier", "text": "oc_abort", "parent": 176, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 12}}, {"id": 178, "type": "argument_list", "text": "(\"Insufficient memory\")", "parent": 176, "children": [179], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 35}}, {"id": 179, "type": "string_literal", "text": "\"Insufficient memory\"", "parent": 178, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 34}}, {"id": 180, "type": "#endif", "text": "#endif", "parent": 125, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 6}}, {"id": 181, "type": "declaration", "text": "size_t device;", "parent": 118, "children": [182, 183], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 16}}, {"id": 182, "type": "primitive_type", "text": "size_t", "parent": 181, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 8}}, {"id": 183, "type": "identifier", "text": "device", "parent": 181, "children": [], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 15}}, {"id": 184, "type": "for_statement", "text": "for (device = 0; device < oc_core_get_num_devices(); device++) {\n sp_mfg_default[device].current_profile = OC_SP_BASELINE;\n sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;\n sp_mfg_default[device].credid = -1;\n }", "parent": 118, "children": [185, 189, 195], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 67, "column": 3}}, {"id": 185, "type": "assignment_expression", "text": "device = 0", "parent": 184, "children": [186, 187, 188], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 17}}, {"id": 186, "type": "identifier", "text": "device", "parent": 185, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 13}}, {"id": 187, "type": "=", "text": "=", "parent": 185, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 15}}, {"id": 188, "type": "number_literal", "text": "0", "parent": 185, "children": [], "start_point": {"row": 63, "column": 16}, "end_point": {"row": 63, "column": 17}}, {"id": 189, "type": "binary_expression", "text": "device < oc_core_get_num_devices()", "parent": 184, "children": [190, 191, 192], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 53}}, {"id": 190, "type": "identifier", "text": "device", "parent": 189, "children": [], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 25}}, {"id": 191, "type": "<", "text": "<", "parent": 189, "children": [], "start_point": {"row": 63, "column": 26}, "end_point": {"row": 63, "column": 27}}, {"id": 192, "type": "call_expression", "text": "oc_core_get_num_devices()", "parent": 189, "children": [193, 194], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 53}}, {"id": 193, "type": "identifier", "text": "oc_core_get_num_devices", "parent": 192, "children": [], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 51}}, {"id": 194, "type": "argument_list", "text": "()", "parent": 192, "children": [], "start_point": {"row": 63, "column": 51}, "end_point": {"row": 63, "column": 53}}, {"id": 195, "type": "update_expression", "text": "device++", "parent": 184, "children": [196, 197], "start_point": {"row": 63, "column": 55}, "end_point": {"row": 63, "column": 63}}, {"id": 196, "type": "identifier", "text": "device", "parent": 195, "children": [], "start_point": {"row": 63, "column": 55}, "end_point": {"row": 63, "column": 61}}, {"id": 197, "type": "++", "text": "++", "parent": 195, "children": [], "start_point": {"row": 63, "column": 61}, "end_point": {"row": 63, "column": 63}}, {"id": 198, "type": "assignment_expression", "text": "sp_mfg_default[device].current_profile = OC_SP_BASELINE", "parent": 184, "children": [199, 204, 205], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 59}}, {"id": 199, "type": "field_expression", "text": "sp_mfg_default[device].current_profile", "parent": 198, "children": [200, 203], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 42}}, {"id": 200, "type": "subscript_expression", "text": "sp_mfg_default[device]", "parent": 199, "children": [201, 202], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 26}}, {"id": 201, "type": "identifier", "text": "sp_mfg_default", "parent": 200, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 18}}, {"id": 202, "type": "identifier", "text": "device", "parent": 200, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 25}}, {"id": 203, "type": "field_identifier", "text": "current_profile", "parent": 199, "children": [], "start_point": {"row": 64, "column": 27}, "end_point": {"row": 64, "column": 42}}, {"id": 204, "type": "=", "text": "=", "parent": 198, "children": [], "start_point": {"row": 64, "column": 43}, "end_point": {"row": 64, "column": 44}}, {"id": 205, "type": "identifier", "text": "OC_SP_BASELINE", "parent": 198, "children": [], "start_point": {"row": 64, "column": 45}, "end_point": {"row": 64, "column": 59}}, {"id": 206, "type": "assignment_expression", "text": "sp_mfg_default[device].supported_profiles = OC_SP_BASELINE", "parent": 184, "children": [207, 212, 213], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 62}}, {"id": 207, "type": "field_expression", "text": "sp_mfg_default[device].supported_profiles", "parent": 206, "children": [208, 211], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 45}}, {"id": 208, "type": "subscript_expression", "text": "sp_mfg_default[device]", "parent": 207, "children": [209, 210], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 26}}, {"id": 209, "type": "identifier", "text": "sp_mfg_default", "parent": 208, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 18}}, {"id": 210, "type": "identifier", "text": "device", "parent": 208, "children": [], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 25}}, {"id": 211, "type": "field_identifier", "text": "supported_profiles", "parent": 207, "children": [], "start_point": {"row": 65, "column": 27}, "end_point": {"row": 65, "column": 45}}, {"id": 212, "type": "=", "text": "=", "parent": 206, "children": [], "start_point": {"row": 65, "column": 46}, "end_point": {"row": 65, "column": 47}}, {"id": 213, "type": "identifier", "text": "OC_SP_BASELINE", "parent": 206, "children": [], "start_point": {"row": 65, "column": 48}, "end_point": {"row": 65, "column": 62}}, {"id": 214, "type": "assignment_expression", "text": "sp_mfg_default[device].credid = -1", "parent": 184, "children": [215, 220, 221], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 38}}, {"id": 215, "type": "field_expression", "text": "sp_mfg_default[device].credid", "parent": 214, "children": [216, 219], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 33}}, {"id": 216, "type": "subscript_expression", "text": "sp_mfg_default[device]", "parent": 215, "children": [217, 218], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 26}}, {"id": 217, "type": "identifier", "text": "sp_mfg_default", "parent": 216, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 18}}, {"id": 218, "type": "identifier", "text": "device", "parent": 216, "children": [], "start_point": {"row": 66, "column": 19}, "end_point": {"row": 66, "column": 25}}, {"id": 219, "type": "field_identifier", "text": "credid", "parent": 215, "children": [], "start_point": {"row": 66, "column": 27}, "end_point": {"row": 66, "column": 33}}, {"id": 220, "type": "=", "text": "=", "parent": 214, "children": [], "start_point": {"row": 66, "column": 34}, "end_point": {"row": 66, "column": 35}}, {"id": 221, "type": "number_literal", "text": "-1", "parent": 214, "children": [], "start_point": {"row": 66, "column": 36}, "end_point": {"row": 66, "column": 38}}, {"id": 222, "type": "function_definition", "text": "void\noc_sec_sp_free(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n if (sp) {\n free(sp);\n }\n if (sp_mfg_default) {\n free(sp_mfg_default);\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n}", "parent": 0, "children": [223, 224], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 81, "column": 1}}, {"id": 223, "type": "primitive_type", "text": "void", "parent": 222, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 4}}, {"id": 224, "type": "function_declarator", "text": "oc_sec_sp_free(void)", "parent": 222, "children": [225, 226], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 20}}, {"id": 225, "type": "identifier", "text": "oc_sec_sp_free", "parent": 224, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 14}}, {"id": 226, "type": "parameter_list", "text": "(void)", "parent": 224, "children": [227], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 20}}, {"id": 227, "type": "parameter_declaration", "text": "void", "parent": 226, "children": [228], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 19}}, {"id": 228, "type": "primitive_type", "text": "void", "parent": 227, "children": [], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 19}}, {"id": 229, "type": "preproc_ifdef", "text": "#ifdef OC_DYNAMIC_ALLOCATION\n if (sp) {\n free(sp);\n }\n if (sp_mfg_default) {\n free(sp_mfg_default);\n }\n#endif", "parent": 222, "children": [230, 231, 232, 239, 246], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 230, "type": "#ifdef", "text": "#ifdef", "parent": 229, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 6}}, {"id": 231, "type": "identifier", "text": "OC_DYNAMIC_ALLOCATION", "parent": 229, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 28}}, {"id": 232, "type": "if_statement", "text": "if (sp) {\n free(sp);\n }", "parent": 229, "children": [233], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 76, "column": 3}}, {"id": 233, "type": "parenthesized_expression", "text": "(sp)", "parent": 232, "children": [234], "start_point": {"row": 74, "column": 5}, "end_point": {"row": 74, "column": 9}}, {"id": 234, "type": "identifier", "text": "sp", "parent": 233, "children": [], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 8}}, {"id": 235, "type": "call_expression", "text": "free(sp)", "parent": 232, "children": [236, 237], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 12}}, {"id": 236, "type": "identifier", "text": "free", "parent": 235, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 8}}, {"id": 237, "type": "argument_list", "text": "(sp)", "parent": 235, "children": [238], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 12}}, {"id": 238, "type": "identifier", "text": "sp", "parent": 237, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 11}}, {"id": 239, "type": "if_statement", "text": "if (sp_mfg_default) {\n free(sp_mfg_default);\n }", "parent": 229, "children": [240], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 79, "column": 3}}, {"id": 240, "type": "parenthesized_expression", "text": "(sp_mfg_default)", "parent": 239, "children": [241], "start_point": {"row": 77, "column": 5}, "end_point": {"row": 77, "column": 21}}, {"id": 241, "type": "identifier", "text": "sp_mfg_default", "parent": 240, "children": [], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 20}}, {"id": 242, "type": "call_expression", "text": "free(sp_mfg_default)", "parent": 239, "children": [243, 244], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 24}}, {"id": 243, "type": "identifier", "text": "free", "parent": 242, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 8}}, {"id": 244, "type": "argument_list", "text": "(sp_mfg_default)", "parent": 242, "children": [245], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 24}}, {"id": 245, "type": "identifier", "text": "sp_mfg_default", "parent": 244, "children": [], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 23}}, {"id": 246, "type": "#endif", "text": "#endif", "parent": 229, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 247, "type": "function_definition", "text": "void\noc_sec_sp_default(size_t device)\n{\n sp[device] = sp_mfg_default[device];\n}", "parent": 0, "children": [248, 249], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 87, "column": 1}}, {"id": 248, "type": "primitive_type", "text": "void", "parent": 247, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 4}}, {"id": 249, "type": "function_declarator", "text": "oc_sec_sp_default(size_t device)", "parent": 247, "children": [250, 251], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 32}}, {"id": 250, "type": "identifier", "text": "oc_sec_sp_default", "parent": 249, "children": [], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 17}}, {"id": 251, "type": "parameter_list", "text": "(size_t device)", "parent": 249, "children": [252], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 32}}, {"id": 252, "type": "parameter_declaration", "text": "size_t device", "parent": 251, "children": [253, 254], "start_point": {"row": 84, "column": 18}, "end_point": {"row": 84, "column": 31}}, {"id": 253, "type": "primitive_type", "text": "size_t", "parent": 252, "children": [], "start_point": {"row": 84, "column": 18}, "end_point": {"row": 84, "column": 24}}, {"id": 254, "type": "identifier", "text": "device", "parent": 252, "children": [], "start_point": {"row": 84, "column": 25}, "end_point": {"row": 84, "column": 31}}, {"id": 255, "type": "assignment_expression", "text": "sp[device] = sp_mfg_default[device]", "parent": 247, "children": [256, 259, 260], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 37}}, {"id": 256, "type": "subscript_expression", "text": "sp[device]", "parent": 255, "children": [257, 258], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 12}}, {"id": 257, "type": "identifier", "text": "sp", "parent": 256, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 4}}, {"id": 258, "type": "identifier", "text": "device", "parent": 256, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 11}}, {"id": 259, "type": "=", "text": "=", "parent": 255, "children": [], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 14}}, {"id": 260, "type": "subscript_expression", "text": "sp_mfg_default[device]", "parent": 255, "children": [261, 262], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 37}}, {"id": 261, "type": "identifier", "text": "sp_mfg_default", "parent": 260, "children": [], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 29}}, {"id": 262, "type": "identifier", "text": "device", "parent": 260, "children": [], "start_point": {"row": 86, "column": 30}, "end_point": {"row": 86, "column": 36}}, {"id": 263, "type": "function_definition", "text": "static oc_sp_types_t\nstring_to_sp(const char *sp_string)\n{\n oc_sp_types_t sp = 0;\n if (strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0) {\n sp = OC_SP_BASELINE;\n } else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }\n return sp;\n}", "parent": 0, "children": [264, 265], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 108, "column": 1}}, {"id": 264, "type": "type_identifier", "text": "oc_sp_types_t", "parent": 263, "children": [], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 20}}, {"id": 265, "type": "function_declarator", "text": "string_to_sp(const char *sp_string)", "parent": 263, "children": [266, 267], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 35}}, {"id": 266, "type": "identifier", "text": "string_to_sp", "parent": 265, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 12}}, {"id": 267, "type": "parameter_list", "text": "(const char *sp_string)", "parent": 265, "children": [268], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 35}}, {"id": 268, "type": "parameter_declaration", "text": "const char *sp_string", "parent": 267, "children": [269, 270], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 34}}, {"id": 269, "type": "primitive_type", "text": "char", "parent": 268, "children": [], "start_point": {"row": 90, "column": 19}, "end_point": {"row": 90, "column": 23}}, {"id": 270, "type": "pointer_declarator", "text": "*sp_string", "parent": 268, "children": [271, 272], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 34}}, {"id": 271, "type": "*", "text": "*", "parent": 270, "children": [], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 25}}, {"id": 272, "type": "identifier", "text": "sp_string", "parent": 270, "children": [], "start_point": {"row": 90, "column": 25}, "end_point": {"row": 90, "column": 34}}, {"id": 273, "type": "declaration", "text": "oc_sp_types_t sp = 0;", "parent": 263, "children": [274, 275], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 23}}, {"id": 274, "type": "type_identifier", "text": "oc_sp_types_t", "parent": 273, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 15}}, {"id": 275, "type": "init_declarator", "text": "sp = 0", "parent": 273, "children": [276, 277, 278], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 22}}, {"id": 276, "type": "identifier", "text": "sp", "parent": 275, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 18}}, {"id": 277, "type": "=", "text": "=", "parent": 275, "children": [], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 92, "column": 20}}, {"id": 278, "type": "number_literal", "text": "0", "parent": 275, "children": [], "start_point": {"row": 92, "column": 21}, "end_point": {"row": 92, "column": 22}}, {"id": 279, "type": "if_statement", "text": "if (strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0) {\n sp = OC_SP_BASELINE;\n } else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }", "parent": 263, "children": [280, 309], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 106, "column": 3}}, {"id": 280, "type": "parenthesized_expression", "text": "(strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0)", "parent": 279, "children": [281], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 94, "column": 77}}, {"id": 281, "type": "binary_expression", "text": "strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0", "parent": 280, "children": [282, 292, 293], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 94, "column": 76}}, {"id": 282, "type": "binary_expression", "text": "strlen(sp_string) == strlen(OC_SP_BASELINE_OID)", "parent": 281, "children": [283, 287, 288], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 53}}, {"id": 283, "type": "call_expression", "text": "strlen(sp_string)", "parent": 282, "children": [284, 285], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 23}}, {"id": 284, "type": "identifier", "text": "strlen", "parent": 283, "children": [], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 12}}, {"id": 285, "type": "argument_list", "text": "(sp_string)", "parent": 283, "children": [286], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 23}}, {"id": 286, "type": "identifier", "text": "sp_string", "parent": 285, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 22}}, {"id": 287, "type": "==", "text": "==", "parent": 282, "children": [], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 26}}, {"id": 288, "type": "call_expression", "text": "strlen(OC_SP_BASELINE_OID)", "parent": 282, "children": [289, 290], "start_point": {"row": 93, "column": 27}, "end_point": {"row": 93, "column": 53}}, {"id": 289, "type": "identifier", "text": "strlen", "parent": 288, "children": [], "start_point": {"row": 93, "column": 27}, "end_point": {"row": 93, "column": 33}}, {"id": 290, "type": "argument_list", "text": "(OC_SP_BASELINE_OID)", "parent": 288, "children": [291], "start_point": {"row": 93, "column": 33}, "end_point": {"row": 93, "column": 53}}, {"id": 291, "type": "identifier", "text": "OC_SP_BASELINE_OID", "parent": 290, "children": [], "start_point": {"row": 93, "column": 34}, "end_point": {"row": 93, "column": 52}}, {"id": 292, "type": "&&", "text": "&&", "parent": 281, "children": [], "start_point": {"row": 93, "column": 54}, "end_point": {"row": 93, "column": 56}}, {"id": 293, "type": "binary_expression", "text": "memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0", "parent": 281, "children": [294, 303, 304], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 76}}, {"id": 294, "type": "call_expression", "text": "memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID))", "parent": 293, "children": [295, 296], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 71}}, {"id": 295, "type": "identifier", "text": "memcmp", "parent": 294, "children": [], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 12}}, {"id": 296, "type": "argument_list", "text": "(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID))", "parent": 294, "children": [297, 298, 299], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 71}}, {"id": 297, "type": "identifier", "text": "OC_SP_BASELINE_OID", "parent": 296, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 31}}, {"id": 298, "type": "identifier", "text": "sp_string", "parent": 296, "children": [], "start_point": {"row": 94, "column": 33}, "end_point": {"row": 94, "column": 42}}, {"id": 299, "type": "call_expression", "text": "strlen(OC_SP_BASELINE_OID)", "parent": 296, "children": [300, 301], "start_point": {"row": 94, "column": 44}, "end_point": {"row": 94, "column": 70}}, {"id": 300, "type": "identifier", "text": "strlen", "parent": 299, "children": [], "start_point": {"row": 94, "column": 44}, "end_point": {"row": 94, "column": 50}}, {"id": 301, "type": "argument_list", "text": "(OC_SP_BASELINE_OID)", "parent": 299, "children": [302], "start_point": {"row": 94, "column": 50}, "end_point": {"row": 94, "column": 70}}, {"id": 302, "type": "identifier", "text": "OC_SP_BASELINE_OID", "parent": 301, "children": [], "start_point": {"row": 94, "column": 51}, "end_point": {"row": 94, "column": 69}}, {"id": 303, "type": "==", "text": "==", "parent": 293, "children": [], "start_point": {"row": 94, "column": 72}, "end_point": {"row": 94, "column": 74}}, {"id": 304, "type": "number_literal", "text": "0", "parent": 293, "children": [], "start_point": {"row": 94, "column": 75}, "end_point": {"row": 94, "column": 76}}, {"id": 305, "type": "assignment_expression", "text": "sp = OC_SP_BASELINE", "parent": 279, "children": [306, 307, 308], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 23}}, {"id": 306, "type": "identifier", "text": "sp", "parent": 305, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 6}}, {"id": 307, "type": "=", "text": "=", "parent": 305, "children": [], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 8}}, {"id": 308, "type": "identifier", "text": "OC_SP_BASELINE", "parent": 305, "children": [], "start_point": {"row": 95, "column": 9}, "end_point": {"row": 95, "column": 23}}, {"id": 309, "type": "else_clause", "text": "else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }", "parent": 279, "children": [310], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 106, "column": 3}}, {"id": 310, "type": "if_statement", "text": "if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }", "parent": 309, "children": [311, 340], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 106, "column": 3}}, {"id": 311, "type": "parenthesized_expression", "text": "(strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0)", "parent": 310, "children": [312], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 97, "column": 78}}, {"id": 312, "type": "binary_expression", "text": "strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0", "parent": 311, "children": [313, 323, 324], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 97, "column": 77}}, {"id": 313, "type": "binary_expression", "text": "strlen(sp_string) == strlen(OC_SP_BLACK_OID)", "parent": 312, "children": [314, 318, 319], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 57}}, {"id": 314, "type": "call_expression", "text": "strlen(sp_string)", "parent": 313, "children": [315, 316], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 30}}, {"id": 315, "type": "identifier", "text": "strlen", "parent": 314, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 19}}, {"id": 316, "type": "argument_list", "text": "(sp_string)", "parent": 314, "children": [317], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 30}}, {"id": 317, "type": "identifier", "text": "sp_string", "parent": 316, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 29}}, {"id": 318, "type": "==", "text": "==", "parent": 313, "children": [], "start_point": {"row": 96, "column": 31}, "end_point": {"row": 96, "column": 33}}, {"id": 319, "type": "call_expression", "text": "strlen(OC_SP_BLACK_OID)", "parent": 313, "children": [320, 321], "start_point": {"row": 96, "column": 34}, "end_point": {"row": 96, "column": 57}}, {"id": 320, "type": "identifier", "text": "strlen", "parent": 319, "children": [], "start_point": {"row": 96, "column": 34}, "end_point": {"row": 96, "column": 40}}, {"id": 321, "type": "argument_list", "text": "(OC_SP_BLACK_OID)", "parent": 319, "children": [322], "start_point": {"row": 96, "column": 40}, "end_point": {"row": 96, "column": 57}}, {"id": 322, "type": "identifier", "text": "OC_SP_BLACK_OID", "parent": 321, "children": [], "start_point": {"row": 96, "column": 41}, "end_point": {"row": 96, "column": 56}}, {"id": 323, "type": "&&", "text": "&&", "parent": 312, "children": [], "start_point": {"row": 96, "column": 58}, "end_point": {"row": 96, "column": 60}}, {"id": 324, "type": "binary_expression", "text": "memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0", "parent": 312, "children": [325, 334, 335], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 77}}, {"id": 325, "type": "call_expression", "text": "memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID))", "parent": 324, "children": [326, 327], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 72}}, {"id": 326, "type": "identifier", "text": "memcmp", "parent": 325, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 19}}, {"id": 327, "type": "argument_list", "text": "(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID))", "parent": 325, "children": [328, 329, 330], "start_point": {"row": 97, "column": 19}, "end_point": {"row": 97, "column": 72}}, {"id": 328, "type": "identifier", "text": "OC_SP_BLACK_OID", "parent": 327, "children": [], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 35}}, {"id": 329, "type": "identifier", "text": "sp_string", "parent": 327, "children": [], "start_point": {"row": 97, "column": 37}, "end_point": {"row": 97, "column": 46}}, {"id": 330, "type": "call_expression", "text": "strlen(OC_SP_BLACK_OID)", "parent": 327, "children": [331, 332], "start_point": {"row": 97, "column": 48}, "end_point": {"row": 97, "column": 71}}, {"id": 331, "type": "identifier", "text": "strlen", "parent": 330, "children": [], "start_point": {"row": 97, "column": 48}, "end_point": {"row": 97, "column": 54}}, {"id": 332, "type": "argument_list", "text": "(OC_SP_BLACK_OID)", "parent": 330, "children": [333], "start_point": {"row": 97, "column": 54}, "end_point": {"row": 97, "column": 71}}, {"id": 333, "type": "identifier", "text": "OC_SP_BLACK_OID", "parent": 332, "children": [], "start_point": {"row": 97, "column": 55}, "end_point": {"row": 97, "column": 70}}, {"id": 334, "type": "==", "text": "==", "parent": 324, "children": [], "start_point": {"row": 97, "column": 73}, "end_point": {"row": 97, "column": 75}}, {"id": 335, "type": "number_literal", "text": "0", "parent": 324, "children": [], "start_point": {"row": 97, "column": 76}, "end_point": {"row": 97, "column": 77}}, {"id": 336, "type": "assignment_expression", "text": "sp = OC_SP_BLACK", "parent": 310, "children": [337, 338, 339], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 20}}, {"id": 337, "type": "identifier", "text": "sp", "parent": 336, "children": [], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 6}}, {"id": 338, "type": "=", "text": "=", "parent": 336, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 8}}, {"id": 339, "type": "identifier", "text": "OC_SP_BLACK", "parent": 336, "children": [], "start_point": {"row": 98, "column": 9}, "end_point": {"row": 98, "column": 20}}, {"id": 340, "type": "else_clause", "text": "else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }", "parent": 310, "children": [341], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 106, "column": 3}}, {"id": 341, "type": "if_statement", "text": "if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }", "parent": 340, "children": [342, 371], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 106, "column": 3}}, {"id": 342, "type": "parenthesized_expression", "text": "(strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0)", "parent": 341, "children": [343], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 100, "column": 76}}, {"id": 343, "type": "binary_expression", "text": "strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0", "parent": 342, "children": [344, 354, 355], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 100, "column": 75}}, {"id": 344, "type": "binary_expression", "text": "strlen(sp_string) == strlen(OC_SP_BLUE_OID)", "parent": 343, "children": [345, 349, 350], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 56}}, {"id": 345, "type": "call_expression", "text": "strlen(sp_string)", "parent": 344, "children": [346, 347], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 30}}, {"id": 346, "type": "identifier", "text": "strlen", "parent": 345, "children": [], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 19}}, {"id": 347, "type": "argument_list", "text": "(sp_string)", "parent": 345, "children": [348], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 30}}, {"id": 348, "type": "identifier", "text": "sp_string", "parent": 347, "children": [], "start_point": {"row": 99, "column": 20}, "end_point": {"row": 99, "column": 29}}, {"id": 349, "type": "==", "text": "==", "parent": 344, "children": [], "start_point": {"row": 99, "column": 31}, "end_point": {"row": 99, "column": 33}}, {"id": 350, "type": "call_expression", "text": "strlen(OC_SP_BLUE_OID)", "parent": 344, "children": [351, 352], "start_point": {"row": 99, "column": 34}, "end_point": {"row": 99, "column": 56}}, {"id": 351, "type": "identifier", "text": "strlen", "parent": 350, "children": [], "start_point": {"row": 99, "column": 34}, "end_point": {"row": 99, "column": 40}}, {"id": 352, "type": "argument_list", "text": "(OC_SP_BLUE_OID)", "parent": 350, "children": [353], "start_point": {"row": 99, "column": 40}, "end_point": {"row": 99, "column": 56}}, {"id": 353, "type": "identifier", "text": "OC_SP_BLUE_OID", "parent": 352, "children": [], "start_point": {"row": 99, "column": 41}, "end_point": {"row": 99, "column": 55}}, {"id": 354, "type": "&&", "text": "&&", "parent": 343, "children": [], "start_point": {"row": 99, "column": 57}, "end_point": {"row": 99, "column": 59}}, {"id": 355, "type": "binary_expression", "text": "memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0", "parent": 343, "children": [356, 365, 366], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 75}}, {"id": 356, "type": "call_expression", "text": "memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID))", "parent": 355, "children": [357, 358], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 70}}, {"id": 357, "type": "identifier", "text": "memcmp", "parent": 356, "children": [], "start_point": {"row": 100, "column": 13}, "end_point": {"row": 100, "column": 19}}, {"id": 358, "type": "argument_list", "text": "(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID))", "parent": 356, "children": [359, 360, 361], "start_point": {"row": 100, "column": 19}, "end_point": {"row": 100, "column": 70}}, {"id": 359, "type": "identifier", "text": "OC_SP_BLUE_OID", "parent": 358, "children": [], "start_point": {"row": 100, "column": 20}, "end_point": {"row": 100, "column": 34}}, {"id": 360, "type": "identifier", "text": "sp_string", "parent": 358, "children": [], "start_point": {"row": 100, "column": 36}, "end_point": {"row": 100, "column": 45}}, {"id": 361, "type": "call_expression", "text": "strlen(OC_SP_BLUE_OID)", "parent": 358, "children": [362, 363], "start_point": {"row": 100, "column": 47}, "end_point": {"row": 100, "column": 69}}, {"id": 362, "type": "identifier", "text": "strlen", "parent": 361, "children": [], "start_point": {"row": 100, "column": 47}, "end_point": {"row": 100, "column": 53}}, {"id": 363, "type": "argument_list", "text": "(OC_SP_BLUE_OID)", "parent": 361, "children": [364], "start_point": {"row": 100, "column": 53}, "end_point": {"row": 100, "column": 69}}, {"id": 364, "type": "identifier", "text": "OC_SP_BLUE_OID", "parent": 363, "children": [], "start_point": {"row": 100, "column": 54}, "end_point": {"row": 100, "column": 68}}, {"id": 365, "type": "==", "text": "==", "parent": 355, "children": [], "start_point": {"row": 100, "column": 71}, "end_point": {"row": 100, "column": 73}}, {"id": 366, "type": "number_literal", "text": "0", "parent": 355, "children": [], "start_point": {"row": 100, "column": 74}, "end_point": {"row": 100, "column": 75}}, {"id": 367, "type": "assignment_expression", "text": "sp = OC_SP_BLUE", "parent": 341, "children": [368, 369, 370], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 19}}, {"id": 368, "type": "identifier", "text": "sp", "parent": 367, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 6}}, {"id": 369, "type": "=", "text": "=", "parent": 367, "children": [], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 8}}, {"id": 370, "type": "identifier", "text": "OC_SP_BLUE", "parent": 367, "children": [], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 19}}, {"id": 371, "type": "else_clause", "text": "else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }", "parent": 341, "children": [372], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 106, "column": 3}}, {"id": 372, "type": "if_statement", "text": "if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }", "parent": 371, "children": [373], "start_point": {"row": 102, "column": 9}, "end_point": {"row": 106, "column": 3}}, {"id": 373, "type": "parenthesized_expression", "text": "(strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0)", "parent": 372, "children": [374], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 104, "column": 17}}, {"id": 374, "type": "binary_expression", "text": "strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0", "parent": 373, "children": [375, 385, 386], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 104, "column": 16}}, {"id": 375, "type": "binary_expression", "text": "strlen(sp_string) == strlen(OC_SP_PURPLE_OID)", "parent": 374, "children": [376, 380, 381], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 58}}, {"id": 376, "type": "call_expression", "text": "strlen(sp_string)", "parent": 375, "children": [377, 378], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 30}}, {"id": 377, "type": "identifier", "text": "strlen", "parent": 376, "children": [], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 19}}, {"id": 378, "type": "argument_list", "text": "(sp_string)", "parent": 376, "children": [379], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 30}}, {"id": 379, "type": "identifier", "text": "sp_string", "parent": 378, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 29}}, {"id": 380, "type": "==", "text": "==", "parent": 375, "children": [], "start_point": {"row": 102, "column": 31}, "end_point": {"row": 102, "column": 33}}, {"id": 381, "type": "call_expression", "text": "strlen(OC_SP_PURPLE_OID)", "parent": 375, "children": [382, 383], "start_point": {"row": 102, "column": 34}, "end_point": {"row": 102, "column": 58}}, {"id": 382, "type": "identifier", "text": "strlen", "parent": 381, "children": [], "start_point": {"row": 102, "column": 34}, "end_point": {"row": 102, "column": 40}}, {"id": 383, "type": "argument_list", "text": "(OC_SP_PURPLE_OID)", "parent": 381, "children": [384], "start_point": {"row": 102, "column": 40}, "end_point": {"row": 102, "column": 58}}, {"id": 384, "type": "identifier", "text": "OC_SP_PURPLE_OID", "parent": 383, "children": [], "start_point": {"row": 102, "column": 41}, "end_point": {"row": 102, "column": 57}}, {"id": 385, "type": "&&", "text": "&&", "parent": 374, "children": [], "start_point": {"row": 102, "column": 59}, "end_point": {"row": 102, "column": 61}}, {"id": 386, "type": "binary_expression", "text": "memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0", "parent": 374, "children": [387, 396, 397], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 104, "column": 16}}, {"id": 387, "type": "call_expression", "text": "memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID))", "parent": 386, "children": [388, 389], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 74}}, {"id": 388, "type": "identifier", "text": "memcmp", "parent": 387, "children": [], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 19}}, {"id": 389, "type": "argument_list", "text": "(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID))", "parent": 387, "children": [390, 391, 392], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 74}}, {"id": 390, "type": "identifier", "text": "OC_SP_PURPLE_OID", "parent": 389, "children": [], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 36}}, {"id": 391, "type": "identifier", "text": "sp_string", "parent": 389, "children": [], "start_point": {"row": 103, "column": 38}, "end_point": {"row": 103, "column": 47}}, {"id": 392, "type": "call_expression", "text": "strlen(OC_SP_PURPLE_OID)", "parent": 389, "children": [393, 394], "start_point": {"row": 103, "column": 49}, "end_point": {"row": 103, "column": 73}}, {"id": 393, "type": "identifier", "text": "strlen", "parent": 392, "children": [], "start_point": {"row": 103, "column": 49}, "end_point": {"row": 103, "column": 55}}, {"id": 394, "type": "argument_list", "text": "(OC_SP_PURPLE_OID)", "parent": 392, "children": [395], "start_point": {"row": 103, "column": 55}, "end_point": {"row": 103, "column": 73}}, {"id": 395, "type": "identifier", "text": "OC_SP_PURPLE_OID", "parent": 394, "children": [], "start_point": {"row": 103, "column": 56}, "end_point": {"row": 103, "column": 72}}, {"id": 396, "type": "==", "text": "==", "parent": 386, "children": [], "start_point": {"row": 103, "column": 75}, "end_point": {"row": 103, "column": 77}}, {"id": 397, "type": "number_literal", "text": "0", "parent": 386, "children": [], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 16}}, {"id": 398, "type": "assignment_expression", "text": "sp = OC_SP_PURPLE", "parent": 372, "children": [399, 400, 401], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 21}}, {"id": 399, "type": "identifier", "text": "sp", "parent": 398, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 6}}, {"id": 400, "type": "=", "text": "=", "parent": 398, "children": [], "start_point": {"row": 105, "column": 7}, "end_point": {"row": 105, "column": 8}}, {"id": 401, "type": "identifier", "text": "OC_SP_PURPLE", "parent": 398, "children": [], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 21}}, {"id": 402, "type": "return_statement", "text": "return sp;", "parent": 263, "children": [403], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 12}}, {"id": 403, "type": "identifier", "text": "sp", "parent": 402, "children": [], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 107, "column": 11}}, {"id": 404, "type": "function_definition", "text": "bool\noc_sec_decode_sp(oc_rep_t *rep, size_t device)\n{\n oc_sec_pstat_t *pstat = oc_sec_get_pstat(device);\n if (pstat->s == OC_DOS_RFNOP) {\n return false;\n }\n while (rep != NULL) {\n size_t len = oc_string_len(rep->name);\n switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp(\"currentprofile\", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp(\"supportedprofiles\", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }\n rep = rep->next;\n }\n return true;\n}", "parent": 0, "children": [405, 406], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 152, "column": 1}}, {"id": 405, "type": "primitive_type", "text": "bool", "parent": 404, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 4}}, {"id": 406, "type": "function_declarator", "text": "oc_sec_decode_sp(oc_rep_t *rep, size_t device)", "parent": 404, "children": [407, 408], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 111, "column": 46}}, {"id": 407, "type": "identifier", "text": "oc_sec_decode_sp", "parent": 406, "children": [], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 111, "column": 16}}, {"id": 408, "type": "parameter_list", "text": "(oc_rep_t *rep, size_t device)", "parent": 406, "children": [409, 414], "start_point": {"row": 111, "column": 16}, "end_point": {"row": 111, "column": 46}}, {"id": 409, "type": "parameter_declaration", "text": "oc_rep_t *rep", "parent": 408, "children": [410, 411], "start_point": {"row": 111, "column": 17}, "end_point": {"row": 111, "column": 30}}, {"id": 410, "type": "type_identifier", "text": "oc_rep_t", "parent": 409, "children": [], "start_point": {"row": 111, "column": 17}, "end_point": {"row": 111, "column": 25}}, {"id": 411, "type": "pointer_declarator", "text": "*rep", "parent": 409, "children": [412, 413], "start_point": {"row": 111, "column": 26}, "end_point": {"row": 111, "column": 30}}, {"id": 412, "type": "*", "text": "*", "parent": 411, "children": [], "start_point": {"row": 111, "column": 26}, "end_point": {"row": 111, "column": 27}}, {"id": 413, "type": "identifier", "text": "rep", "parent": 411, "children": [], "start_point": {"row": 111, "column": 27}, "end_point": {"row": 111, "column": 30}}, {"id": 414, "type": "parameter_declaration", "text": "size_t device", "parent": 408, "children": [415, 416], "start_point": {"row": 111, "column": 32}, "end_point": {"row": 111, "column": 45}}, {"id": 415, "type": "primitive_type", "text": "size_t", "parent": 414, "children": [], "start_point": {"row": 111, "column": 32}, "end_point": {"row": 111, "column": 38}}, {"id": 416, "type": "identifier", "text": "device", "parent": 414, "children": [], "start_point": {"row": 111, "column": 39}, "end_point": {"row": 111, "column": 45}}, {"id": 417, "type": "declaration", "text": "oc_sec_pstat_t *pstat = oc_sec_get_pstat(device);", "parent": 404, "children": [418, 419], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 51}}, {"id": 418, "type": "type_identifier", "text": "oc_sec_pstat_t", "parent": 417, "children": [], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 16}}, {"id": 419, "type": "init_declarator", "text": "*pstat = oc_sec_get_pstat(device)", "parent": 417, "children": [420, 423, 424], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 50}}, {"id": 420, "type": "pointer_declarator", "text": "*pstat", "parent": 419, "children": [421, 422], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 23}}, {"id": 421, "type": "*", "text": "*", "parent": 420, "children": [], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 18}}, {"id": 422, "type": "identifier", "text": "pstat", "parent": 420, "children": [], "start_point": {"row": 113, "column": 18}, "end_point": {"row": 113, "column": 23}}, {"id": 423, "type": "=", "text": "=", "parent": 419, "children": [], "start_point": {"row": 113, "column": 24}, "end_point": {"row": 113, "column": 25}}, {"id": 424, "type": "call_expression", "text": "oc_sec_get_pstat(device)", "parent": 419, "children": [425, 426], "start_point": {"row": 113, "column": 26}, "end_point": {"row": 113, "column": 50}}, {"id": 425, "type": "identifier", "text": "oc_sec_get_pstat", "parent": 424, "children": [], "start_point": {"row": 113, "column": 26}, "end_point": {"row": 113, "column": 42}}, {"id": 426, "type": "argument_list", "text": "(device)", "parent": 424, "children": [427], "start_point": {"row": 113, "column": 42}, "end_point": {"row": 113, "column": 50}}, {"id": 427, "type": "identifier", "text": "device", "parent": 426, "children": [], "start_point": {"row": 113, "column": 43}, "end_point": {"row": 113, "column": 49}}, {"id": 428, "type": "if_statement", "text": "if (pstat->s == OC_DOS_RFNOP) {\n return false;\n }", "parent": 404, "children": [429], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 116, "column": 3}}, {"id": 429, "type": "parenthesized_expression", "text": "(pstat->s == OC_DOS_RFNOP)", "parent": 428, "children": [430], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 31}}, {"id": 430, "type": "binary_expression", "text": "pstat->s == OC_DOS_RFNOP", "parent": 429, "children": [431, 434, 435], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 30}}, {"id": 431, "type": "field_expression", "text": "pstat->s", "parent": 430, "children": [432, 433], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 14}}, {"id": 432, "type": "identifier", "text": "pstat", "parent": 431, "children": [], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 11}}, {"id": 433, "type": "field_identifier", "text": "s", "parent": 431, "children": [], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 14}}, {"id": 434, "type": "==", "text": "==", "parent": 430, "children": [], "start_point": {"row": 114, "column": 15}, "end_point": {"row": 114, "column": 17}}, {"id": 435, "type": "identifier", "text": "OC_DOS_RFNOP", "parent": 430, "children": [], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 30}}, {"id": 436, "type": "return_statement", "text": "return false;", "parent": 428, "children": [437], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 17}}, {"id": 437, "type": "false", "text": "false", "parent": 436, "children": [], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 16}}, {"id": 438, "type": "while_statement", "text": "while (rep != NULL) {\n size_t len = oc_string_len(rep->name);\n switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp(\"currentprofile\", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp(\"supportedprofiles\", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }\n rep = rep->next;\n }", "parent": 404, "children": [439], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 150, "column": 3}}, {"id": 439, "type": "parenthesized_expression", "text": "(rep != NULL)", "parent": 438, "children": [440], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 21}}, {"id": 440, "type": "binary_expression", "text": "rep != NULL", "parent": 439, "children": [441, 442, 443], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 20}}, {"id": 441, "type": "identifier", "text": "rep", "parent": 440, "children": [], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 12}}, {"id": 442, "type": "!=", "text": "!=", "parent": 440, "children": [], "start_point": {"row": 117, "column": 13}, "end_point": {"row": 117, "column": 15}}, {"id": 443, "type": "null", "text": "NULL", "parent": 440, "children": [444], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 20}}, {"id": 444, "type": "NULL", "text": "NULL", "parent": 443, "children": [], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 20}}, {"id": 445, "type": "declaration", "text": "size_t len = oc_string_len(rep->name);", "parent": 438, "children": [446, 447], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 42}}, {"id": 446, "type": "primitive_type", "text": "size_t", "parent": 445, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 10}}, {"id": 447, "type": "init_declarator", "text": "len = oc_string_len(rep->name)", "parent": 445, "children": [448, 449, 450], "start_point": {"row": 118, "column": 11}, "end_point": {"row": 118, "column": 41}}, {"id": 448, "type": "identifier", "text": "len", "parent": 447, "children": [], "start_point": {"row": 118, "column": 11}, "end_point": {"row": 118, "column": 14}}, {"id": 449, "type": "=", "text": "=", "parent": 447, "children": [], "start_point": {"row": 118, "column": 15}, "end_point": {"row": 118, "column": 16}}, {"id": 450, "type": "call_expression", "text": "oc_string_len(rep->name)", "parent": 447, "children": [451, 452], "start_point": {"row": 118, "column": 17}, "end_point": {"row": 118, "column": 41}}, {"id": 451, "type": "identifier", "text": "oc_string_len", "parent": 450, "children": [], "start_point": {"row": 118, "column": 17}, "end_point": {"row": 118, "column": 30}}, {"id": 452, "type": "argument_list", "text": "(rep->name)", "parent": 450, "children": [453], "start_point": {"row": 118, "column": 30}, "end_point": {"row": 118, "column": 41}}, {"id": 453, "type": "field_expression", "text": "rep->name", "parent": 452, "children": [454, 455], "start_point": {"row": 118, "column": 31}, "end_point": {"row": 118, "column": 40}}, {"id": 454, "type": "identifier", "text": "rep", "parent": 453, "children": [], "start_point": {"row": 118, "column": 31}, "end_point": {"row": 118, "column": 34}}, {"id": 455, "type": "field_identifier", "text": "name", "parent": 453, "children": [], "start_point": {"row": 118, "column": 36}, "end_point": {"row": 118, "column": 40}}, {"id": 456, "type": "switch_statement", "text": "switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp(\"currentprofile\", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp(\"supportedprofiles\", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }", "parent": 438, "children": [457, 458], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 148, "column": 5}}, {"id": 457, "type": "switch", "text": "switch", "parent": 456, "children": [], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 10}}, {"id": 458, "type": "parenthesized_expression", "text": "(rep->type)", "parent": 456, "children": [459], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 22}}, {"id": 459, "type": "field_expression", "text": "rep->type", "parent": 458, "children": [460, 461], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 21}}, {"id": 460, "type": "identifier", "text": "rep", "parent": 459, "children": [], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 15}}, {"id": 461, "type": "field_identifier", "text": "type", "parent": 459, "children": [], "start_point": {"row": 119, "column": 17}, "end_point": {"row": 119, "column": 21}}, {"id": 462, "type": "case_statement", "text": "case OC_REP_STRING:\n if (len == 14 &&\n memcmp(\"currentprofile\", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;", "parent": 456, "children": [463, 464, 465, 526], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 130, "column": 12}}, {"id": 463, "type": "case", "text": "case", "parent": 462, "children": [], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 8}}, {"id": 464, "type": "identifier", "text": "OC_REP_STRING", "parent": 462, "children": [], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 22}}, {"id": 465, "type": "if_statement", "text": "if (len == 14 &&\n memcmp(\"currentprofile\", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }", "parent": 462, "children": [466], "start_point": {"row": 121, "column": 6}, "end_point": {"row": 129, "column": 7}}, {"id": 466, "type": "parenthesized_expression", "text": "(len == 14 &&\n memcmp(\"currentprofile\", oc_string(rep->name), 14) == 0)", "parent": 465, "children": [467], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 122, "column": 66}}, {"id": 467, "type": "binary_expression", "text": "len == 14 &&\n memcmp(\"currentprofile\", oc_string(rep->name), 14) == 0", "parent": 466, "children": [468, 472, 473], "start_point": {"row": 121, "column": 10}, "end_point": {"row": 122, "column": 65}}, {"id": 468, "type": "binary_expression", "text": "len == 14", "parent": 467, "children": [469, 470, 471], "start_point": {"row": 121, "column": 10}, "end_point": {"row": 121, "column": 19}}, {"id": 469, "type": "identifier", "text": "len", "parent": 468, "children": [], "start_point": {"row": 121, "column": 10}, "end_point": {"row": 121, "column": 13}}, {"id": 470, "type": "==", "text": "==", "parent": 468, "children": [], "start_point": {"row": 121, "column": 14}, "end_point": {"row": 121, "column": 16}}, {"id": 471, "type": "number_literal", "text": "14", "parent": 468, "children": [], "start_point": {"row": 121, "column": 17}, "end_point": {"row": 121, "column": 19}}, {"id": 472, "type": "&&", "text": "&&", "parent": 467, "children": [], "start_point": {"row": 121, "column": 20}, "end_point": {"row": 121, "column": 22}}, {"id": 473, "type": "binary_expression", "text": "memcmp(\"currentprofile\", oc_string(rep->name), 14) == 0", "parent": 467, "children": [474, 485, 486], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 65}}, {"id": 474, "type": "call_expression", "text": "memcmp(\"currentprofile\", oc_string(rep->name), 14)", "parent": 473, "children": [475, 476], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 60}}, {"id": 475, "type": "identifier", "text": "memcmp", "parent": 474, "children": [], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 16}}, {"id": 476, "type": "argument_list", "text": "(\"currentprofile\", oc_string(rep->name), 14)", "parent": 474, "children": [477, 478, 484], "start_point": {"row": 122, "column": 16}, "end_point": {"row": 122, "column": 60}}, {"id": 477, "type": "string_literal", "text": "\"currentprofile\"", "parent": 476, "children": [], "start_point": {"row": 122, "column": 17}, "end_point": {"row": 122, "column": 33}}, {"id": 478, "type": "call_expression", "text": "oc_string(rep->name)", "parent": 476, "children": [479, 480], "start_point": {"row": 122, "column": 35}, "end_point": {"row": 122, "column": 55}}, {"id": 479, "type": "identifier", "text": "oc_string", "parent": 478, "children": [], "start_point": {"row": 122, "column": 35}, "end_point": {"row": 122, "column": 44}}, {"id": 480, "type": "argument_list", "text": "(rep->name)", "parent": 478, "children": [481], "start_point": {"row": 122, "column": 44}, "end_point": {"row": 122, "column": 55}}, {"id": 481, "type": "field_expression", "text": "rep->name", "parent": 480, "children": [482, 483], "start_point": {"row": 122, "column": 45}, "end_point": {"row": 122, "column": 54}}, {"id": 482, "type": "identifier", "text": "rep", "parent": 481, "children": [], "start_point": {"row": 122, "column": 45}, "end_point": {"row": 122, "column": 48}}, {"id": 483, "type": "field_identifier", "text": "name", "parent": 481, "children": [], "start_point": {"row": 122, "column": 50}, "end_point": {"row": 122, "column": 54}}, {"id": 484, "type": "number_literal", "text": "14", "parent": 476, "children": [], "start_point": {"row": 122, "column": 57}, "end_point": {"row": 122, "column": 59}}, {"id": 485, "type": "==", "text": "==", "parent": 473, "children": [], "start_point": {"row": 122, "column": 61}, "end_point": {"row": 122, "column": 63}}, {"id": 486, "type": "number_literal", "text": "0", "parent": 473, "children": [], "start_point": {"row": 122, "column": 64}, "end_point": {"row": 122, "column": 65}}, {"id": 487, "type": "declaration", "text": "oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));", "parent": 465, "children": [488, 489], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 124, "column": 53}}, {"id": 488, "type": "type_identifier", "text": "oc_sp_types_t", "parent": 487, "children": [], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 21}}, {"id": 489, "type": "init_declarator", "text": "current_profile =\n string_to_sp(oc_string(rep->value.string))", "parent": 487, "children": [490, 491, 492], "start_point": {"row": 123, "column": 22}, "end_point": {"row": 124, "column": 52}}, {"id": 490, "type": "identifier", "text": "current_profile", "parent": 489, "children": [], "start_point": {"row": 123, "column": 22}, "end_point": {"row": 123, "column": 37}}, {"id": 491, "type": "=", "text": "=", "parent": 489, "children": [], "start_point": {"row": 123, "column": 38}, "end_point": {"row": 123, "column": 39}}, {"id": 492, "type": "call_expression", "text": "string_to_sp(oc_string(rep->value.string))", "parent": 489, "children": [493, 494], "start_point": {"row": 124, "column": 10}, "end_point": {"row": 124, "column": 52}}, {"id": 493, "type": "identifier", "text": "string_to_sp", "parent": 492, "children": [], "start_point": {"row": 124, "column": 10}, "end_point": {"row": 124, "column": 22}}, {"id": 494, "type": "argument_list", "text": "(oc_string(rep->value.string))", "parent": 492, "children": [495], "start_point": {"row": 124, "column": 22}, "end_point": {"row": 124, "column": 52}}, {"id": 495, "type": "call_expression", "text": "oc_string(rep->value.string)", "parent": 494, "children": [496, 497], "start_point": {"row": 124, "column": 23}, "end_point": {"row": 124, "column": 51}}, {"id": 496, "type": "identifier", "text": "oc_string", "parent": 495, "children": [], "start_point": {"row": 124, "column": 23}, "end_point": {"row": 124, "column": 32}}, {"id": 497, "type": "argument_list", "text": "(rep->value.string)", "parent": 495, "children": [498], "start_point": {"row": 124, "column": 32}, "end_point": {"row": 124, "column": 51}}, {"id": 498, "type": "field_expression", "text": "rep->value.string", "parent": 497, "children": [499, 502], "start_point": {"row": 124, "column": 33}, "end_point": {"row": 124, "column": 50}}, {"id": 499, "type": "field_expression", "text": "rep->value", "parent": 498, "children": [500, 501], "start_point": {"row": 124, "column": 33}, "end_point": {"row": 124, "column": 43}}, {"id": 500, "type": "identifier", "text": "rep", "parent": 499, "children": [], "start_point": {"row": 124, "column": 33}, "end_point": {"row": 124, "column": 36}}, {"id": 501, "type": "field_identifier", "text": "value", "parent": 499, "children": [], "start_point": {"row": 124, "column": 38}, "end_point": {"row": 124, "column": 43}}, {"id": 502, "type": "field_identifier", "text": "string", "parent": 498, "children": [], "start_point": {"row": 124, "column": 44}, "end_point": {"row": 124, "column": 50}}, {"id": 503, "type": "if_statement", "text": "if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }", "parent": 465, "children": [504], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 127, "column": 9}}, {"id": 504, "type": "parenthesized_expression", "text": "((current_profile & sp[device].supported_profiles) == 0)", "parent": 503, "children": [505], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 67}}, {"id": 505, "type": "binary_expression", "text": "(current_profile & sp[device].supported_profiles) == 0", "parent": 504, "children": [506, 514, 515], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 66}}, {"id": 506, "type": "parenthesized_expression", "text": "(current_profile & sp[device].supported_profiles)", "parent": 505, "children": [507], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 61}}, {"id": 507, "type": "binary_expression", "text": "current_profile & sp[device].supported_profiles", "parent": 506, "children": [508, 509], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 60}}, {"id": 508, "type": "identifier", "text": "current_profile", "parent": 507, "children": [], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 28}}, {"id": 509, "type": "field_expression", "text": "sp[device].supported_profiles", "parent": 507, "children": [510, 513], "start_point": {"row": 125, "column": 31}, "end_point": {"row": 125, "column": 60}}, {"id": 510, "type": "subscript_expression", "text": "sp[device]", "parent": 509, "children": [511, 512], "start_point": {"row": 125, "column": 31}, "end_point": {"row": 125, "column": 41}}, {"id": 511, "type": "identifier", "text": "sp", "parent": 510, "children": [], "start_point": {"row": 125, "column": 31}, "end_point": {"row": 125, "column": 33}}, {"id": 512, "type": "identifier", "text": "device", "parent": 510, "children": [], "start_point": {"row": 125, "column": 34}, "end_point": {"row": 125, "column": 40}}, {"id": 513, "type": "field_identifier", "text": "supported_profiles", "parent": 509, "children": [], "start_point": {"row": 125, "column": 42}, "end_point": {"row": 125, "column": 60}}, {"id": 514, "type": "==", "text": "==", "parent": 505, "children": [], "start_point": {"row": 125, "column": 62}, "end_point": {"row": 125, "column": 64}}, {"id": 515, "type": "number_literal", "text": "0", "parent": 505, "children": [], "start_point": {"row": 125, "column": 65}, "end_point": {"row": 125, "column": 66}}, {"id": 516, "type": "return_statement", "text": "return false;", "parent": 503, "children": [517], "start_point": {"row": 126, "column": 10}, "end_point": {"row": 126, "column": 23}}, {"id": 517, "type": "false", "text": "false", "parent": 516, "children": [], "start_point": {"row": 126, "column": 17}, "end_point": {"row": 126, "column": 22}}, {"id": 518, "type": "assignment_expression", "text": "sp[device].current_profile = current_profile", "parent": 465, "children": [519, 524, 525], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 52}}, {"id": 519, "type": "field_expression", "text": "sp[device].current_profile", "parent": 518, "children": [520, 523], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 34}}, {"id": 520, "type": "subscript_expression", "text": "sp[device]", "parent": 519, "children": [521, 522], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 18}}, {"id": 521, "type": "identifier", "text": "sp", "parent": 520, "children": [], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 10}}, {"id": 522, "type": "identifier", "text": "device", "parent": 520, "children": [], "start_point": {"row": 128, "column": 11}, "end_point": {"row": 128, "column": 17}}, {"id": 523, "type": "field_identifier", "text": "current_profile", "parent": 519, "children": [], "start_point": {"row": 128, "column": 19}, "end_point": {"row": 128, "column": 34}}, {"id": 524, "type": "=", "text": "=", "parent": 518, "children": [], "start_point": {"row": 128, "column": 35}, "end_point": {"row": 128, "column": 36}}, {"id": 525, "type": "identifier", "text": "current_profile", "parent": 518, "children": [], "start_point": {"row": 128, "column": 37}, "end_point": {"row": 128, "column": 52}}, {"id": 526, "type": "break_statement", "text": "break;", "parent": 462, "children": [527], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 12}}, {"id": 527, "type": "break", "text": "break", "parent": 526, "children": [], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 11}}, {"id": 528, "type": "case_statement", "text": "case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp(\"supportedprofiles\", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;", "parent": 456, "children": [529, 530, 531, 612], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 144, "column": 12}}, {"id": 529, "type": "case", "text": "case", "parent": 528, "children": [], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 8}}, {"id": 530, "type": "identifier", "text": "OC_REP_STRING_ARRAY", "parent": 528, "children": [], "start_point": {"row": 131, "column": 9}, "end_point": {"row": 131, "column": 28}}, {"id": 531, "type": "if_statement", "text": "if (len == 17 &&\n memcmp(\"supportedprofiles\", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }", "parent": 528, "children": [532], "start_point": {"row": 132, "column": 6}, "end_point": {"row": 143, "column": 7}}, {"id": 532, "type": "parenthesized_expression", "text": "(len == 17 &&\n memcmp(\"supportedprofiles\", oc_string(rep->name), 17) == 0)", "parent": 531, "children": [533], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 133, "column": 69}}, {"id": 533, "type": "binary_expression", "text": "len == 17 &&\n memcmp(\"supportedprofiles\", oc_string(rep->name), 17) == 0", "parent": 532, "children": [534, 538, 539], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 133, "column": 68}}, {"id": 534, "type": "binary_expression", "text": "len == 17", "parent": 533, "children": [535, 536, 537], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 19}}, {"id": 535, "type": "identifier", "text": "len", "parent": 534, "children": [], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 13}}, {"id": 536, "type": "==", "text": "==", "parent": 534, "children": [], "start_point": {"row": 132, "column": 14}, "end_point": {"row": 132, "column": 16}}, {"id": 537, "type": "number_literal", "text": "17", "parent": 534, "children": [], "start_point": {"row": 132, "column": 17}, "end_point": {"row": 132, "column": 19}}, {"id": 538, "type": "&&", "text": "&&", "parent": 533, "children": [], "start_point": {"row": 132, "column": 20}, "end_point": {"row": 132, "column": 22}}, {"id": 539, "type": "binary_expression", "text": "memcmp(\"supportedprofiles\", oc_string(rep->name), 17) == 0", "parent": 533, "children": [540, 551, 552], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 68}}, {"id": 540, "type": "call_expression", "text": "memcmp(\"supportedprofiles\", oc_string(rep->name), 17)", "parent": 539, "children": [541, 542], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 63}}, {"id": 541, "type": "identifier", "text": "memcmp", "parent": 540, "children": [], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 16}}, {"id": 542, "type": "argument_list", "text": "(\"supportedprofiles\", oc_string(rep->name), 17)", "parent": 540, "children": [543, 544, 550], "start_point": {"row": 133, "column": 16}, "end_point": {"row": 133, "column": 63}}, {"id": 543, "type": "string_literal", "text": "\"supportedprofiles\"", "parent": 542, "children": [], "start_point": {"row": 133, "column": 17}, "end_point": {"row": 133, "column": 36}}, {"id": 544, "type": "call_expression", "text": "oc_string(rep->name)", "parent": 542, "children": [545, 546], "start_point": {"row": 133, "column": 38}, "end_point": {"row": 133, "column": 58}}, {"id": 545, "type": "identifier", "text": "oc_string", "parent": 544, "children": [], "start_point": {"row": 133, "column": 38}, "end_point": {"row": 133, "column": 47}}, {"id": 546, "type": "argument_list", "text": "(rep->name)", "parent": 544, "children": [547], "start_point": {"row": 133, "column": 47}, "end_point": {"row": 133, "column": 58}}, {"id": 547, "type": "field_expression", "text": "rep->name", "parent": 546, "children": [548, 549], "start_point": {"row": 133, "column": 48}, "end_point": {"row": 133, "column": 57}}, {"id": 548, "type": "identifier", "text": "rep", "parent": 547, "children": [], "start_point": {"row": 133, "column": 48}, "end_point": {"row": 133, "column": 51}}, {"id": 549, "type": "field_identifier", "text": "name", "parent": 547, "children": [], "start_point": {"row": 133, "column": 53}, "end_point": {"row": 133, "column": 57}}, {"id": 550, "type": "number_literal", "text": "17", "parent": 542, "children": [], "start_point": {"row": 133, "column": 60}, "end_point": {"row": 133, "column": 62}}, {"id": 551, "type": "==", "text": "==", "parent": 539, "children": [], "start_point": {"row": 133, "column": 64}, "end_point": {"row": 133, "column": 66}}, {"id": 552, "type": "number_literal", "text": "0", "parent": 539, "children": [], "start_point": {"row": 133, "column": 67}, "end_point": {"row": 133, "column": 68}}, {"id": 553, "type": "declaration", "text": "oc_sp_types_t supported_profiles = 0;", "parent": 531, "children": [554, 555], "start_point": {"row": 134, "column": 8}, "end_point": {"row": 134, "column": 45}}, {"id": 554, "type": "type_identifier", "text": "oc_sp_types_t", "parent": 553, "children": [], "start_point": {"row": 134, "column": 8}, "end_point": {"row": 134, "column": 21}}, {"id": 555, "type": "init_declarator", "text": "supported_profiles = 0", "parent": 553, "children": [556, 557, 558], "start_point": {"row": 134, "column": 22}, "end_point": {"row": 134, "column": 44}}, {"id": 556, "type": "identifier", "text": "supported_profiles", "parent": 555, "children": [], "start_point": {"row": 134, "column": 22}, "end_point": {"row": 134, "column": 40}}, {"id": 557, "type": "=", "text": "=", "parent": 555, "children": [], "start_point": {"row": 134, "column": 41}, "end_point": {"row": 134, "column": 42}}, {"id": 558, "type": "number_literal", "text": "0", "parent": 555, "children": [], "start_point": {"row": 134, "column": 43}, "end_point": {"row": 134, "column": 44}}, {"id": 559, "type": "declaration", "text": "size_t profile;", "parent": 531, "children": [560, 561], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 23}}, {"id": 560, "type": "primitive_type", "text": "size_t", "parent": 559, "children": [], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 14}}, {"id": 561, "type": "identifier", "text": "profile", "parent": 559, "children": [], "start_point": {"row": 135, "column": 15}, "end_point": {"row": 135, "column": 22}}, {"id": 562, "type": "for_statement", "text": "for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }", "parent": 531, "children": [563, 567, 578], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 141, "column": 9}}, {"id": 563, "type": "assignment_expression", "text": "profile = 0", "parent": 562, "children": [564, 565, 566], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 24}}, {"id": 564, "type": "identifier", "text": "profile", "parent": 563, "children": [], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 20}}, {"id": 565, "type": "=", "text": "=", "parent": 563, "children": [], "start_point": {"row": 136, "column": 21}, "end_point": {"row": 136, "column": 22}}, {"id": 566, "type": "number_literal", "text": "0", "parent": 563, "children": [], "start_point": {"row": 136, "column": 23}, "end_point": {"row": 136, "column": 24}}, {"id": 567, "type": "binary_expression", "text": "profile < oc_string_array_get_allocated_size(rep->value.array)", "parent": 562, "children": [568, 569, 570], "start_point": {"row": 137, "column": 13}, "end_point": {"row": 137, "column": 75}}, {"id": 568, "type": "identifier", "text": "profile", "parent": 567, "children": [], "start_point": {"row": 137, "column": 13}, "end_point": {"row": 137, "column": 20}}, {"id": 569, "type": "<", "text": "<", "parent": 567, "children": [], "start_point": {"row": 137, "column": 21}, "end_point": {"row": 137, "column": 22}}, {"id": 570, "type": "call_expression", "text": "oc_string_array_get_allocated_size(rep->value.array)", "parent": 567, "children": [571, 572], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 75}}, {"id": 571, "type": "identifier", "text": "oc_string_array_get_allocated_size", "parent": 570, "children": [], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 57}}, {"id": 572, "type": "argument_list", "text": "(rep->value.array)", "parent": 570, "children": [573], "start_point": {"row": 137, "column": 57}, "end_point": {"row": 137, "column": 75}}, {"id": 573, "type": "field_expression", "text": "rep->value.array", "parent": 572, "children": [574, 577], "start_point": {"row": 137, "column": 58}, "end_point": {"row": 137, "column": 74}}, {"id": 574, "type": "field_expression", "text": "rep->value", "parent": 573, "children": [575, 576], "start_point": {"row": 137, "column": 58}, "end_point": {"row": 137, "column": 68}}, {"id": 575, "type": "identifier", "text": "rep", "parent": 574, "children": [], "start_point": {"row": 137, "column": 58}, "end_point": {"row": 137, "column": 61}}, {"id": 576, "type": "field_identifier", "text": "value", "parent": 574, "children": [], "start_point": {"row": 137, "column": 63}, "end_point": {"row": 137, "column": 68}}, {"id": 577, "type": "field_identifier", "text": "array", "parent": 573, "children": [], "start_point": {"row": 137, "column": 69}, "end_point": {"row": 137, "column": 74}}, {"id": 578, "type": "update_expression", "text": "profile++", "parent": 562, "children": [579, 580], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 22}}, {"id": 579, "type": "identifier", "text": "profile", "parent": 578, "children": [], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 20}}, {"id": 580, "type": "++", "text": "++", "parent": 578, "children": [], "start_point": {"row": 138, "column": 20}, "end_point": {"row": 138, "column": 22}}, {"id": 581, "type": "declaration", "text": "const char *p = oc_string_array_get_item(rep->value.array, profile);", "parent": 562, "children": [582, 583], "start_point": {"row": 139, "column": 10}, "end_point": {"row": 139, "column": 78}}, {"id": 582, "type": "primitive_type", "text": "char", "parent": 581, "children": [], "start_point": {"row": 139, "column": 16}, "end_point": {"row": 139, "column": 20}}, {"id": 583, "type": "init_declarator", "text": "*p = oc_string_array_get_item(rep->value.array, profile)", "parent": 581, "children": [584, 587, 588], "start_point": {"row": 139, "column": 21}, "end_point": {"row": 139, "column": 77}}, {"id": 584, "type": "pointer_declarator", "text": "*p", "parent": 583, "children": [585, 586], "start_point": {"row": 139, "column": 21}, "end_point": {"row": 139, "column": 23}}, {"id": 585, "type": "*", "text": "*", "parent": 584, "children": [], "start_point": {"row": 139, "column": 21}, "end_point": {"row": 139, "column": 22}}, {"id": 586, "type": "identifier", "text": "p", "parent": 584, "children": [], "start_point": {"row": 139, "column": 22}, "end_point": {"row": 139, "column": 23}}, {"id": 587, "type": "=", "text": "=", "parent": 583, "children": [], "start_point": {"row": 139, "column": 24}, "end_point": {"row": 139, "column": 25}}, {"id": 588, "type": "call_expression", "text": "oc_string_array_get_item(rep->value.array, profile)", "parent": 583, "children": [589, 590], "start_point": {"row": 139, "column": 26}, "end_point": {"row": 139, "column": 77}}, {"id": 589, "type": "identifier", "text": "oc_string_array_get_item", "parent": 588, "children": [], "start_point": {"row": 139, "column": 26}, "end_point": {"row": 139, "column": 50}}, {"id": 590, "type": "argument_list", "text": "(rep->value.array, profile)", "parent": 588, "children": [591, 596], "start_point": {"row": 139, "column": 50}, "end_point": {"row": 139, "column": 77}}, {"id": 591, "type": "field_expression", "text": "rep->value.array", "parent": 590, "children": [592, 595], "start_point": {"row": 139, "column": 51}, "end_point": {"row": 139, "column": 67}}, {"id": 592, "type": "field_expression", "text": "rep->value", "parent": 591, "children": [593, 594], "start_point": {"row": 139, "column": 51}, "end_point": {"row": 139, "column": 61}}, {"id": 593, "type": "identifier", "text": "rep", "parent": 592, "children": [], "start_point": {"row": 139, "column": 51}, "end_point": {"row": 139, "column": 54}}, {"id": 594, "type": "field_identifier", "text": "value", "parent": 592, "children": [], "start_point": {"row": 139, "column": 56}, "end_point": {"row": 139, "column": 61}}, {"id": 595, "type": "field_identifier", "text": "array", "parent": 591, "children": [], "start_point": {"row": 139, "column": 62}, "end_point": {"row": 139, "column": 67}}, {"id": 596, "type": "identifier", "text": "profile", "parent": 590, "children": [], "start_point": {"row": 139, "column": 69}, "end_point": {"row": 139, "column": 76}}, {"id": 597, "type": "assignment_expression", "text": "supported_profiles |= string_to_sp(p)", "parent": 562, "children": [598, 599, 600], "start_point": {"row": 140, "column": 10}, "end_point": {"row": 140, "column": 47}}, {"id": 598, "type": "identifier", "text": "supported_profiles", "parent": 597, "children": [], "start_point": {"row": 140, "column": 10}, "end_point": {"row": 140, "column": 28}}, {"id": 599, "type": "|=", "text": "|=", "parent": 597, "children": [], "start_point": {"row": 140, "column": 29}, "end_point": {"row": 140, "column": 31}}, {"id": 600, "type": "call_expression", "text": "string_to_sp(p)", "parent": 597, "children": [601, 602], "start_point": {"row": 140, "column": 32}, "end_point": {"row": 140, "column": 47}}, {"id": 601, "type": "identifier", "text": "string_to_sp", "parent": 600, "children": [], "start_point": {"row": 140, "column": 32}, "end_point": {"row": 140, "column": 44}}, {"id": 602, "type": "argument_list", "text": "(p)", "parent": 600, "children": [603], "start_point": {"row": 140, "column": 44}, "end_point": {"row": 140, "column": 47}}, {"id": 603, "type": "identifier", "text": "p", "parent": 602, "children": [], "start_point": {"row": 140, "column": 45}, "end_point": {"row": 140, "column": 46}}, {"id": 604, "type": "assignment_expression", "text": "sp[device].supported_profiles = supported_profiles", "parent": 531, "children": [605, 610, 611], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 58}}, {"id": 605, "type": "field_expression", "text": "sp[device].supported_profiles", "parent": 604, "children": [606, 609], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 37}}, {"id": 606, "type": "subscript_expression", "text": "sp[device]", "parent": 605, "children": [607, 608], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 18}}, {"id": 607, "type": "identifier", "text": "sp", "parent": 606, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 10}}, {"id": 608, "type": "identifier", "text": "device", "parent": 606, "children": [], "start_point": {"row": 142, "column": 11}, "end_point": {"row": 142, "column": 17}}, {"id": 609, "type": "field_identifier", "text": "supported_profiles", "parent": 605, "children": [], "start_point": {"row": 142, "column": 19}, "end_point": {"row": 142, "column": 37}}, {"id": 610, "type": "=", "text": "=", "parent": 604, "children": [], "start_point": {"row": 142, "column": 38}, "end_point": {"row": 142, "column": 39}}, {"id": 611, "type": "identifier", "text": "supported_profiles", "parent": 604, "children": [], "start_point": {"row": 142, "column": 40}, "end_point": {"row": 142, "column": 58}}, {"id": 612, "type": "break_statement", "text": "break;", "parent": 528, "children": [613], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 12}}, {"id": 613, "type": "break", "text": "break", "parent": 612, "children": [], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 11}}, {"id": 614, "type": "case_statement", "text": "default:\n return false;\n break;", "parent": 456, "children": [615, 616, 618], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 147, "column": 12}}, {"id": 615, "type": "default", "text": "default", "parent": 614, "children": [], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 11}}, {"id": 616, "type": "return_statement", "text": "return false;", "parent": 614, "children": [617], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 19}}, {"id": 617, "type": "false", "text": "false", "parent": 616, "children": [], "start_point": {"row": 146, "column": 13}, "end_point": {"row": 146, "column": 18}}, {"id": 618, "type": "break_statement", "text": "break;", "parent": 614, "children": [619], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 12}}, {"id": 619, "type": "break", "text": "break", "parent": 618, "children": [], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 11}}, {"id": 620, "type": "assignment_expression", "text": "rep = rep->next", "parent": 438, "children": [621, 622, 623], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 19}}, {"id": 621, "type": "identifier", "text": "rep", "parent": 620, "children": [], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 149, "column": 7}}, {"id": 622, "type": "=", "text": "=", "parent": 620, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 9}}, {"id": 623, "type": "field_expression", "text": "rep->next", "parent": 620, "children": [624, 625], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 19}}, {"id": 624, "type": "identifier", "text": "rep", "parent": 623, "children": [], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 13}}, {"id": 625, "type": "field_identifier", "text": "next", "parent": 623, "children": [], "start_point": {"row": 149, "column": 15}, "end_point": {"row": 149, "column": 19}}, {"id": 626, "type": "return_statement", "text": "return true;", "parent": 404, "children": [627], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 14}}, {"id": 627, "type": "true", "text": "true", "parent": 626, "children": [], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 13}}, {"id": 628, "type": "function_definition", "text": "static const char *\nsp_to_string(oc_sp_types_t sp_type)\n{\n switch (sp_type) {\n case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;\n case OC_SP_BLACK:\n return OC_SP_BLACK_OID;\n case OC_SP_BLUE:\n return OC_SP_BLUE_OID;\n case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;\n }\n return NULL;\n}", "parent": 0, "children": [629, 630], "start_point": {"row": 154, "column": 0}, "end_point": {"row": 168, "column": 1}}, {"id": 629, "type": "primitive_type", "text": "char", "parent": 628, "children": [], "start_point": {"row": 154, "column": 13}, "end_point": {"row": 154, "column": 17}}, {"id": 630, "type": "pointer_declarator", "text": "*\nsp_to_string(oc_sp_types_t sp_type)", "parent": 628, "children": [631, 632], "start_point": {"row": 154, "column": 18}, "end_point": {"row": 155, "column": 35}}, {"id": 631, "type": "*", "text": "*", "parent": 630, "children": [], "start_point": {"row": 154, "column": 18}, "end_point": {"row": 154, "column": 19}}, {"id": 632, "type": "function_declarator", "text": "sp_to_string(oc_sp_types_t sp_type)", "parent": 630, "children": [633, 634], "start_point": {"row": 155, "column": 0}, "end_point": {"row": 155, "column": 35}}, {"id": 633, "type": "identifier", "text": "sp_to_string", "parent": 632, "children": [], "start_point": {"row": 155, "column": 0}, "end_point": {"row": 155, "column": 12}}, {"id": 634, "type": "parameter_list", "text": "(oc_sp_types_t sp_type)", "parent": 632, "children": [635], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 35}}, {"id": 635, "type": "parameter_declaration", "text": "oc_sp_types_t sp_type", "parent": 634, "children": [636, 637], "start_point": {"row": 155, "column": 13}, "end_point": {"row": 155, "column": 34}}, {"id": 636, "type": "type_identifier", "text": "oc_sp_types_t", "parent": 635, "children": [], "start_point": {"row": 155, "column": 13}, "end_point": {"row": 155, "column": 26}}, {"id": 637, "type": "identifier", "text": "sp_type", "parent": 635, "children": [], "start_point": {"row": 155, "column": 27}, "end_point": {"row": 155, "column": 34}}, {"id": 638, "type": "switch_statement", "text": "switch (sp_type) {\n case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;\n case OC_SP_BLACK:\n return OC_SP_BLACK_OID;\n case OC_SP_BLUE:\n return OC_SP_BLUE_OID;\n case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;\n }", "parent": 628, "children": [639, 640], "start_point": {"row": 157, "column": 2}, "end_point": {"row": 166, "column": 3}}, {"id": 639, "type": "switch", "text": "switch", "parent": 638, "children": [], "start_point": {"row": 157, "column": 2}, "end_point": {"row": 157, "column": 8}}, {"id": 640, "type": "parenthesized_expression", "text": "(sp_type)", "parent": 638, "children": [641], "start_point": {"row": 157, "column": 9}, "end_point": {"row": 157, "column": 18}}, {"id": 641, "type": "identifier", "text": "sp_type", "parent": 640, "children": [], "start_point": {"row": 157, "column": 10}, "end_point": {"row": 157, "column": 17}}, {"id": 642, "type": "case_statement", "text": "case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;", "parent": 638, "children": [643, 644, 645], "start_point": {"row": 158, "column": 2}, "end_point": {"row": 159, "column": 30}}, {"id": 643, "type": "case", "text": "case", "parent": 642, "children": [], "start_point": {"row": 158, "column": 2}, "end_point": {"row": 158, "column": 6}}, {"id": 644, "type": "identifier", "text": "OC_SP_BASELINE", "parent": 642, "children": [], "start_point": {"row": 158, "column": 7}, "end_point": {"row": 158, "column": 21}}, {"id": 645, "type": "return_statement", "text": "return OC_SP_BASELINE_OID;", "parent": 642, "children": [646], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 30}}, {"id": 646, "type": "identifier", "text": "OC_SP_BASELINE_OID", "parent": 645, "children": [], "start_point": {"row": 159, "column": 11}, "end_point": {"row": 159, "column": 29}}, {"id": 647, "type": "case_statement", "text": "case OC_SP_BLACK:\n return OC_SP_BLACK_OID;", "parent": 638, "children": [648, 649, 650], "start_point": {"row": 160, "column": 2}, "end_point": {"row": 161, "column": 27}}, {"id": 648, "type": "case", "text": "case", "parent": 647, "children": [], "start_point": {"row": 160, "column": 2}, "end_point": {"row": 160, "column": 6}}, {"id": 649, "type": "identifier", "text": "OC_SP_BLACK", "parent": 647, "children": [], "start_point": {"row": 160, "column": 7}, "end_point": {"row": 160, "column": 18}}, {"id": 650, "type": "return_statement", "text": "return OC_SP_BLACK_OID;", "parent": 647, "children": [651], "start_point": {"row": 161, "column": 4}, "end_point": {"row": 161, "column": 27}}, {"id": 651, "type": "identifier", "text": "OC_SP_BLACK_OID", "parent": 650, "children": [], "start_point": {"row": 161, "column": 11}, "end_point": {"row": 161, "column": 26}}, {"id": 652, "type": "case_statement", "text": "case OC_SP_BLUE:\n return OC_SP_BLUE_OID;", "parent": 638, "children": [653, 654, 655], "start_point": {"row": 162, "column": 2}, "end_point": {"row": 163, "column": 26}}, {"id": 653, "type": "case", "text": "case", "parent": 652, "children": [], "start_point": {"row": 162, "column": 2}, "end_point": {"row": 162, "column": 6}}, {"id": 654, "type": "identifier", "text": "OC_SP_BLUE", "parent": 652, "children": [], "start_point": {"row": 162, "column": 7}, "end_point": {"row": 162, "column": 17}}, {"id": 655, "type": "return_statement", "text": "return OC_SP_BLUE_OID;", "parent": 652, "children": [656], "start_point": {"row": 163, "column": 4}, "end_point": {"row": 163, "column": 26}}, {"id": 656, "type": "identifier", "text": "OC_SP_BLUE_OID", "parent": 655, "children": [], "start_point": {"row": 163, "column": 11}, "end_point": {"row": 163, "column": 25}}, {"id": 657, "type": "case_statement", "text": "case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;", "parent": 638, "children": [658, 659, 660], "start_point": {"row": 164, "column": 2}, "end_point": {"row": 165, "column": 28}}, {"id": 658, "type": "case", "text": "case", "parent": 657, "children": [], "start_point": {"row": 164, "column": 2}, "end_point": {"row": 164, "column": 6}}, {"id": 659, "type": "identifier", "text": "OC_SP_PURPLE", "parent": 657, "children": [], "start_point": {"row": 164, "column": 7}, "end_point": {"row": 164, "column": 19}}, {"id": 660, "type": "return_statement", "text": "return OC_SP_PURPLE_OID;", "parent": 657, "children": [661], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 28}}, {"id": 661, "type": "identifier", "text": "OC_SP_PURPLE_OID", "parent": 660, "children": [], "start_point": {"row": 165, "column": 11}, "end_point": {"row": 165, "column": 27}}, {"id": 662, "type": "return_statement", "text": "return NULL;", "parent": 628, "children": [663], "start_point": {"row": 167, "column": 2}, "end_point": {"row": 167, "column": 14}}, {"id": 663, "type": "null", "text": "NULL", "parent": 662, "children": [664], "start_point": {"row": 167, "column": 9}, "end_point": {"row": 167, "column": 13}}, {"id": 664, "type": "NULL", "text": "NULL", "parent": 663, "children": [], "start_point": {"row": 167, "column": 9}, "end_point": {"row": 167, "column": 13}}, {"id": 665, "type": "function_definition", "text": "void\noc_sec_encode_sp(size_t device)\n{\n oc_rep_start_root_object();\n oc_process_baseline_interface(\n oc_core_get_resource_by_index(OCF_SEC_SP, device));\n oc_rep_set_text_string(root, currentprofile,\n sp_to_string(sp[device].current_profile));\n oc_rep_set_array(root, supportedprofiles);\n if ((sp[device].supported_profiles & OC_SP_BASELINE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));\n }\n if ((sp[device].supported_profiles & OC_SP_BLACK) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));\n }\n if ((sp[device].supported_profiles & OC_SP_BLUE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));\n }\n if ((sp[device].supported_profiles & OC_SP_PURPLE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));\n }\n oc_rep_close_array(root, supportedprofiles);\n oc_rep_end_root_object();\n}", "parent": 0, "children": [666, 667], "start_point": {"row": 170, "column": 0}, "end_point": {"row": 193, "column": 1}}, {"id": 666, "type": "primitive_type", "text": "void", "parent": 665, "children": [], "start_point": {"row": 170, "column": 0}, "end_point": {"row": 170, "column": 4}}, {"id": 667, "type": "function_declarator", "text": "oc_sec_encode_sp(size_t device)", "parent": 665, "children": [668, 669], "start_point": {"row": 171, "column": 0}, "end_point": {"row": 171, "column": 31}}, {"id": 668, "type": "identifier", "text": "oc_sec_encode_sp", "parent": 667, "children": [], "start_point": {"row": 171, "column": 0}, "end_point": {"row": 171, "column": 16}}, {"id": 669, "type": "parameter_list", "text": "(size_t device)", "parent": 667, "children": [670], "start_point": {"row": 171, "column": 16}, "end_point": {"row": 171, "column": 31}}, {"id": 670, "type": "parameter_declaration", "text": "size_t device", "parent": 669, "children": [671, 672], "start_point": {"row": 171, "column": 17}, "end_point": {"row": 171, "column": 30}}, {"id": 671, "type": "primitive_type", "text": "size_t", "parent": 670, "children": [], "start_point": {"row": 171, "column": 17}, "end_point": {"row": 171, "column": 23}}, {"id": 672, "type": "identifier", "text": "device", "parent": 670, "children": [], "start_point": {"row": 171, "column": 24}, "end_point": {"row": 171, "column": 30}}, {"id": 673, "type": "call_expression", "text": "oc_rep_start_root_object()", "parent": 665, "children": [674, 675], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 28}}, {"id": 674, "type": "identifier", "text": "oc_rep_start_root_object", "parent": 673, "children": [], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 26}}, {"id": 675, "type": "argument_list", "text": "()", "parent": 673, "children": [], "start_point": {"row": 173, "column": 26}, "end_point": {"row": 173, "column": 28}}, {"id": 676, "type": "call_expression", "text": "oc_process_baseline_interface(\n oc_core_get_resource_by_index(OCF_SEC_SP, device))", "parent": 665, "children": [677, 678], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 175, "column": 54}}, {"id": 677, "type": "identifier", "text": "oc_process_baseline_interface", "parent": 676, "children": [], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 31}}, {"id": 678, "type": "argument_list", "text": "(\n oc_core_get_resource_by_index(OCF_SEC_SP, device))", "parent": 676, "children": [679], "start_point": {"row": 174, "column": 31}, "end_point": {"row": 175, "column": 54}}, {"id": 679, "type": "call_expression", "text": "oc_core_get_resource_by_index(OCF_SEC_SP, device)", "parent": 678, "children": [680, 681], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 53}}, {"id": 680, "type": "identifier", "text": "oc_core_get_resource_by_index", "parent": 679, "children": [], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 33}}, {"id": 681, "type": "argument_list", "text": "(OCF_SEC_SP, device)", "parent": 679, "children": [682, 683], "start_point": {"row": 175, "column": 33}, "end_point": {"row": 175, "column": 53}}, {"id": 682, "type": "identifier", "text": "OCF_SEC_SP", "parent": 681, "children": [], "start_point": {"row": 175, "column": 34}, "end_point": {"row": 175, "column": 44}}, {"id": 683, "type": "identifier", "text": "device", "parent": 681, "children": [], "start_point": {"row": 175, "column": 46}, "end_point": {"row": 175, "column": 52}}, {"id": 684, "type": "call_expression", "text": "oc_rep_set_text_string(root, currentprofile,\n sp_to_string(sp[device].current_profile))", "parent": 665, "children": [685, 686], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 177, "column": 66}}, {"id": 685, "type": "identifier", "text": "oc_rep_set_text_string", "parent": 684, "children": [], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 176, "column": 24}}, {"id": 686, "type": "argument_list", "text": "(root, currentprofile,\n sp_to_string(sp[device].current_profile))", "parent": 684, "children": [687, 688, 689], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 177, "column": 66}}, {"id": 687, "type": "identifier", "text": "root", "parent": 686, "children": [], "start_point": {"row": 176, "column": 25}, "end_point": {"row": 176, "column": 29}}, {"id": 688, "type": "identifier", "text": "currentprofile", "parent": 686, "children": [], "start_point": {"row": 176, "column": 31}, "end_point": {"row": 176, "column": 45}}, {"id": 689, "type": "call_expression", "text": "sp_to_string(sp[device].current_profile)", "parent": 686, "children": [690, 691], "start_point": {"row": 177, "column": 25}, "end_point": {"row": 177, "column": 65}}, {"id": 690, "type": "identifier", "text": "sp_to_string", "parent": 689, "children": [], "start_point": {"row": 177, "column": 25}, "end_point": {"row": 177, "column": 37}}, {"id": 691, "type": "argument_list", "text": "(sp[device].current_profile)", "parent": 689, "children": [692], "start_point": {"row": 177, "column": 37}, "end_point": {"row": 177, "column": 65}}, {"id": 692, "type": "field_expression", "text": "sp[device].current_profile", "parent": 691, "children": [693, 696], "start_point": {"row": 177, "column": 38}, "end_point": {"row": 177, "column": 64}}, {"id": 693, "type": "subscript_expression", "text": "sp[device]", "parent": 692, "children": [694, 695], "start_point": {"row": 177, "column": 38}, "end_point": {"row": 177, "column": 48}}, {"id": 694, "type": "identifier", "text": "sp", "parent": 693, "children": [], "start_point": {"row": 177, "column": 38}, "end_point": {"row": 177, "column": 40}}, {"id": 695, "type": "identifier", "text": "device", "parent": 693, "children": [], "start_point": {"row": 177, "column": 41}, "end_point": {"row": 177, "column": 47}}, {"id": 696, "type": "field_identifier", "text": "current_profile", "parent": 692, "children": [], "start_point": {"row": 177, "column": 49}, "end_point": {"row": 177, "column": 64}}, {"id": 697, "type": "call_expression", "text": "oc_rep_set_array(root, supportedprofiles)", "parent": 665, "children": [698, 699], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 43}}, {"id": 698, "type": "identifier", "text": "oc_rep_set_array", "parent": 697, "children": [], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 18}}, {"id": 699, "type": "argument_list", "text": "(root, supportedprofiles)", "parent": 697, "children": [700, 701], "start_point": {"row": 178, "column": 18}, "end_point": {"row": 178, "column": 43}}, {"id": 700, "type": "identifier", "text": "root", "parent": 699, "children": [], "start_point": {"row": 178, "column": 19}, "end_point": {"row": 178, "column": 23}}, {"id": 701, "type": "identifier", "text": "supportedprofiles", "parent": 699, "children": [], "start_point": {"row": 178, "column": 25}, "end_point": {"row": 178, "column": 42}}, {"id": 702, "type": "if_statement", "text": "if ((sp[device].supported_profiles & OC_SP_BASELINE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));\n }", "parent": 665, "children": [703], "start_point": {"row": 179, "column": 2}, "end_point": {"row": 181, "column": 3}}, {"id": 703, "type": "parenthesized_expression", "text": "((sp[device].supported_profiles & OC_SP_BASELINE) != 0)", "parent": 702, "children": [704], "start_point": {"row": 179, "column": 5}, "end_point": {"row": 179, "column": 60}}, {"id": 704, "type": "binary_expression", "text": "(sp[device].supported_profiles & OC_SP_BASELINE) != 0", "parent": 703, "children": [705, 713, 714], "start_point": {"row": 179, "column": 6}, "end_point": {"row": 179, "column": 59}}, {"id": 705, "type": "parenthesized_expression", "text": "(sp[device].supported_profiles & OC_SP_BASELINE)", "parent": 704, "children": [706], "start_point": {"row": 179, "column": 6}, "end_point": {"row": 179, "column": 54}}, {"id": 706, "type": "binary_expression", "text": "sp[device].supported_profiles & OC_SP_BASELINE", "parent": 705, "children": [707, 712], "start_point": {"row": 179, "column": 7}, "end_point": {"row": 179, "column": 53}}, {"id": 707, "type": "field_expression", "text": "sp[device].supported_profiles", "parent": 706, "children": [708, 711], "start_point": {"row": 179, "column": 7}, "end_point": {"row": 179, "column": 36}}, {"id": 708, "type": "subscript_expression", "text": "sp[device]", "parent": 707, "children": [709, 710], "start_point": {"row": 179, "column": 7}, "end_point": {"row": 179, "column": 17}}, {"id": 709, "type": "identifier", "text": "sp", "parent": 708, "children": [], "start_point": {"row": 179, "column": 7}, "end_point": {"row": 179, "column": 9}}, {"id": 710, "type": "identifier", "text": "device", "parent": 708, "children": [], "start_point": {"row": 179, "column": 10}, "end_point": {"row": 179, "column": 16}}, {"id": 711, "type": "field_identifier", "text": "supported_profiles", "parent": 707, "children": [], "start_point": {"row": 179, "column": 18}, "end_point": {"row": 179, "column": 36}}, {"id": 712, "type": "identifier", "text": "OC_SP_BASELINE", "parent": 706, "children": [], "start_point": {"row": 179, "column": 39}, "end_point": {"row": 179, "column": 53}}, {"id": 713, "type": "!=", "text": "!=", "parent": 704, "children": [], "start_point": {"row": 179, "column": 55}, "end_point": {"row": 179, "column": 57}}, {"id": 714, "type": "number_literal", "text": "0", "parent": 704, "children": [], "start_point": {"row": 179, "column": 58}, "end_point": {"row": 179, "column": 59}}, {"id": 715, "type": "call_expression", "text": "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE))", "parent": 702, "children": [716, 717], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 75}}, {"id": 716, "type": "identifier", "text": "oc_rep_add_text_string", "parent": 715, "children": [], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 26}}, {"id": 717, "type": "argument_list", "text": "(supportedprofiles, sp_to_string(OC_SP_BASELINE))", "parent": 715, "children": [718, 719], "start_point": {"row": 180, "column": 26}, "end_point": {"row": 180, "column": 75}}, {"id": 718, "type": "identifier", "text": "supportedprofiles", "parent": 717, "children": [], "start_point": {"row": 180, "column": 27}, "end_point": {"row": 180, "column": 44}}, {"id": 719, "type": "call_expression", "text": "sp_to_string(OC_SP_BASELINE)", "parent": 717, "children": [720, 721], "start_point": {"row": 180, "column": 46}, "end_point": {"row": 180, "column": 74}}, {"id": 720, "type": "identifier", "text": "sp_to_string", "parent": 719, "children": [], "start_point": {"row": 180, "column": 46}, "end_point": {"row": 180, "column": 58}}, {"id": 721, "type": "argument_list", "text": "(OC_SP_BASELINE)", "parent": 719, "children": [722], "start_point": {"row": 180, "column": 58}, "end_point": {"row": 180, "column": 74}}, {"id": 722, "type": "identifier", "text": "OC_SP_BASELINE", "parent": 721, "children": [], "start_point": {"row": 180, "column": 59}, "end_point": {"row": 180, "column": 73}}, {"id": 723, "type": "if_statement", "text": "if ((sp[device].supported_profiles & OC_SP_BLACK) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));\n }", "parent": 665, "children": [724], "start_point": {"row": 182, "column": 2}, "end_point": {"row": 184, "column": 3}}, {"id": 724, "type": "parenthesized_expression", "text": "((sp[device].supported_profiles & OC_SP_BLACK) != 0)", "parent": 723, "children": [725], "start_point": {"row": 182, "column": 5}, "end_point": {"row": 182, "column": 57}}, {"id": 725, "type": "binary_expression", "text": "(sp[device].supported_profiles & OC_SP_BLACK) != 0", "parent": 724, "children": [726, 734, 735], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 56}}, {"id": 726, "type": "parenthesized_expression", "text": "(sp[device].supported_profiles & OC_SP_BLACK)", "parent": 725, "children": [727], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 51}}, {"id": 727, "type": "binary_expression", "text": "sp[device].supported_profiles & OC_SP_BLACK", "parent": 726, "children": [728, 733], "start_point": {"row": 182, "column": 7}, "end_point": {"row": 182, "column": 50}}, {"id": 728, "type": "field_expression", "text": "sp[device].supported_profiles", "parent": 727, "children": [729, 732], "start_point": {"row": 182, "column": 7}, "end_point": {"row": 182, "column": 36}}, {"id": 729, "type": "subscript_expression", "text": "sp[device]", "parent": 728, "children": [730, 731], "start_point": {"row": 182, "column": 7}, "end_point": {"row": 182, "column": 17}}, {"id": 730, "type": "identifier", "text": "sp", "parent": 729, "children": [], "start_point": {"row": 182, "column": 7}, "end_point": {"row": 182, "column": 9}}, {"id": 731, "type": "identifier", "text": "device", "parent": 729, "children": [], "start_point": {"row": 182, "column": 10}, "end_point": {"row": 182, "column": 16}}, {"id": 732, "type": "field_identifier", "text": "supported_profiles", "parent": 728, "children": [], "start_point": {"row": 182, "column": 18}, "end_point": {"row": 182, "column": 36}}, {"id": 733, "type": "identifier", "text": "OC_SP_BLACK", "parent": 727, "children": [], "start_point": {"row": 182, "column": 39}, "end_point": {"row": 182, "column": 50}}, {"id": 734, "type": "!=", "text": "!=", "parent": 725, "children": [], "start_point": {"row": 182, "column": 52}, "end_point": {"row": 182, "column": 54}}, {"id": 735, "type": "number_literal", "text": "0", "parent": 725, "children": [], "start_point": {"row": 182, "column": 55}, "end_point": {"row": 182, "column": 56}}, {"id": 736, "type": "call_expression", "text": "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK))", "parent": 723, "children": [737, 738], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 72}}, {"id": 737, "type": "identifier", "text": "oc_rep_add_text_string", "parent": 736, "children": [], "start_point": {"row": 183, "column": 4}, "end_point": {"row": 183, "column": 26}}, {"id": 738, "type": "argument_list", "text": "(supportedprofiles, sp_to_string(OC_SP_BLACK))", "parent": 736, "children": [739, 740], "start_point": {"row": 183, "column": 26}, "end_point": {"row": 183, "column": 72}}, {"id": 739, "type": "identifier", "text": "supportedprofiles", "parent": 738, "children": [], "start_point": {"row": 183, "column": 27}, "end_point": {"row": 183, "column": 44}}, {"id": 740, "type": "call_expression", "text": "sp_to_string(OC_SP_BLACK)", "parent": 738, "children": [741, 742], "start_point": {"row": 183, "column": 46}, "end_point": {"row": 183, "column": 71}}, {"id": 741, "type": "identifier", "text": "sp_to_string", "parent": 740, "children": [], "start_point": {"row": 183, "column": 46}, "end_point": {"row": 183, "column": 58}}, {"id": 742, "type": "argument_list", "text": "(OC_SP_BLACK)", "parent": 740, "children": [743], "start_point": {"row": 183, "column": 58}, "end_point": {"row": 183, "column": 71}}, {"id": 743, "type": "identifier", "text": "OC_SP_BLACK", "parent": 742, "children": [], "start_point": {"row": 183, "column": 59}, "end_point": {"row": 183, "column": 70}}, {"id": 744, "type": "if_statement", "text": "if ((sp[device].supported_profiles & OC_SP_BLUE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));\n }", "parent": 665, "children": [745], "start_point": {"row": 185, "column": 2}, "end_point": {"row": 187, "column": 3}}, {"id": 745, "type": "parenthesized_expression", "text": "((sp[device].supported_profiles & OC_SP_BLUE) != 0)", "parent": 744, "children": [746], "start_point": {"row": 185, "column": 5}, "end_point": {"row": 185, "column": 56}}, {"id": 746, "type": "binary_expression", "text": "(sp[device].supported_profiles & OC_SP_BLUE) != 0", "parent": 745, "children": [747, 755, 756], "start_point": {"row": 185, "column": 6}, "end_point": {"row": 185, "column": 55}}, {"id": 747, "type": "parenthesized_expression", "text": "(sp[device].supported_profiles & OC_SP_BLUE)", "parent": 746, "children": [748], "start_point": {"row": 185, "column": 6}, "end_point": {"row": 185, "column": 50}}, {"id": 748, "type": "binary_expression", "text": "sp[device].supported_profiles & OC_SP_BLUE", "parent": 747, "children": [749, 754], "start_point": {"row": 185, "column": 7}, "end_point": {"row": 185, "column": 49}}, {"id": 749, "type": "field_expression", "text": "sp[device].supported_profiles", "parent": 748, "children": [750, 753], "start_point": {"row": 185, "column": 7}, "end_point": {"row": 185, "column": 36}}, {"id": 750, "type": "subscript_expression", "text": "sp[device]", "parent": 749, "children": [751, 752], "start_point": {"row": 185, "column": 7}, "end_point": {"row": 185, "column": 17}}, {"id": 751, "type": "identifier", "text": "sp", "parent": 750, "children": [], "start_point": {"row": 185, "column": 7}, "end_point": {"row": 185, "column": 9}}, {"id": 752, "type": "identifier", "text": "device", "parent": 750, "children": [], "start_point": {"row": 185, "column": 10}, "end_point": {"row": 185, "column": 16}}, {"id": 753, "type": "field_identifier", "text": "supported_profiles", "parent": 749, "children": [], "start_point": {"row": 185, "column": 18}, "end_point": {"row": 185, "column": 36}}, {"id": 754, "type": "identifier", "text": "OC_SP_BLUE", "parent": 748, "children": [], "start_point": {"row": 185, "column": 39}, "end_point": {"row": 185, "column": 49}}, {"id": 755, "type": "!=", "text": "!=", "parent": 746, "children": [], "start_point": {"row": 185, "column": 51}, "end_point": {"row": 185, "column": 53}}, {"id": 756, "type": "number_literal", "text": "0", "parent": 746, "children": [], "start_point": {"row": 185, "column": 54}, "end_point": {"row": 185, "column": 55}}, {"id": 757, "type": "call_expression", "text": "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE))", "parent": 744, "children": [758, 759], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 71}}, {"id": 758, "type": "identifier", "text": "oc_rep_add_text_string", "parent": 757, "children": [], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 26}}, {"id": 759, "type": "argument_list", "text": "(supportedprofiles, sp_to_string(OC_SP_BLUE))", "parent": 757, "children": [760, 761], "start_point": {"row": 186, "column": 26}, "end_point": {"row": 186, "column": 71}}, {"id": 760, "type": "identifier", "text": "supportedprofiles", "parent": 759, "children": [], "start_point": {"row": 186, "column": 27}, "end_point": {"row": 186, "column": 44}}, {"id": 761, "type": "call_expression", "text": "sp_to_string(OC_SP_BLUE)", "parent": 759, "children": [762, 763], "start_point": {"row": 186, "column": 46}, "end_point": {"row": 186, "column": 70}}, {"id": 762, "type": "identifier", "text": "sp_to_string", "parent": 761, "children": [], "start_point": {"row": 186, "column": 46}, "end_point": {"row": 186, "column": 58}}, {"id": 763, "type": "argument_list", "text": "(OC_SP_BLUE)", "parent": 761, "children": [764], "start_point": {"row": 186, "column": 58}, "end_point": {"row": 186, "column": 70}}, {"id": 764, "type": "identifier", "text": "OC_SP_BLUE", "parent": 763, "children": [], "start_point": {"row": 186, "column": 59}, "end_point": {"row": 186, "column": 69}}, {"id": 765, "type": "if_statement", "text": "if ((sp[device].supported_profiles & OC_SP_PURPLE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));\n }", "parent": 665, "children": [766], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 190, "column": 3}}, {"id": 766, "type": "parenthesized_expression", "text": "((sp[device].supported_profiles & OC_SP_PURPLE) != 0)", "parent": 765, "children": [767], "start_point": {"row": 188, "column": 5}, "end_point": {"row": 188, "column": 58}}, {"id": 767, "type": "binary_expression", "text": "(sp[device].supported_profiles & OC_SP_PURPLE) != 0", "parent": 766, "children": [768, 776, 777], "start_point": {"row": 188, "column": 6}, "end_point": {"row": 188, "column": 57}}, {"id": 768, "type": "parenthesized_expression", "text": "(sp[device].supported_profiles & OC_SP_PURPLE)", "parent": 767, "children": [769], "start_point": {"row": 188, "column": 6}, "end_point": {"row": 188, "column": 52}}, {"id": 769, "type": "binary_expression", "text": "sp[device].supported_profiles & OC_SP_PURPLE", "parent": 768, "children": [770, 775], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 51}}, {"id": 770, "type": "field_expression", "text": "sp[device].supported_profiles", "parent": 769, "children": [771, 774], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 36}}, {"id": 771, "type": "subscript_expression", "text": "sp[device]", "parent": 770, "children": [772, 773], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 17}}, {"id": 772, "type": "identifier", "text": "sp", "parent": 771, "children": [], "start_point": {"row": 188, "column": 7}, "end_point": {"row": 188, "column": 9}}, {"id": 773, "type": "identifier", "text": "device", "parent": 771, "children": [], "start_point": {"row": 188, "column": 10}, "end_point": {"row": 188, "column": 16}}, {"id": 774, "type": "field_identifier", "text": "supported_profiles", "parent": 770, "children": [], "start_point": {"row": 188, "column": 18}, "end_point": {"row": 188, "column": 36}}, {"id": 775, "type": "identifier", "text": "OC_SP_PURPLE", "parent": 769, "children": [], "start_point": {"row": 188, "column": 39}, "end_point": {"row": 188, "column": 51}}, {"id": 776, "type": "!=", "text": "!=", "parent": 767, "children": [], "start_point": {"row": 188, "column": 53}, "end_point": {"row": 188, "column": 55}}, {"id": 777, "type": "number_literal", "text": "0", "parent": 767, "children": [], "start_point": {"row": 188, "column": 56}, "end_point": {"row": 188, "column": 57}}, {"id": 778, "type": "call_expression", "text": "oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE))", "parent": 765, "children": [779, 780], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 73}}, {"id": 779, "type": "identifier", "text": "oc_rep_add_text_string", "parent": 778, "children": [], "start_point": {"row": 189, "column": 4}, "end_point": {"row": 189, "column": 26}}, {"id": 780, "type": "argument_list", "text": "(supportedprofiles, sp_to_string(OC_SP_PURPLE))", "parent": 778, "children": [781, 782], "start_point": {"row": 189, "column": 26}, "end_point": {"row": 189, "column": 73}}, {"id": 781, "type": "identifier", "text": "supportedprofiles", "parent": 780, "children": [], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 189, "column": 44}}, {"id": 782, "type": "call_expression", "text": "sp_to_string(OC_SP_PURPLE)", "parent": 780, "children": [783, 784], "start_point": {"row": 189, "column": 46}, "end_point": {"row": 189, "column": 72}}, {"id": 783, "type": "identifier", "text": "sp_to_string", "parent": 782, "children": [], "start_point": {"row": 189, "column": 46}, "end_point": {"row": 189, "column": 58}}, {"id": 784, "type": "argument_list", "text": "(OC_SP_PURPLE)", "parent": 782, "children": [785], "start_point": {"row": 189, "column": 58}, "end_point": {"row": 189, "column": 72}}, {"id": 785, "type": "identifier", "text": "OC_SP_PURPLE", "parent": 784, "children": [], "start_point": {"row": 189, "column": 59}, "end_point": {"row": 189, "column": 71}}, {"id": 786, "type": "call_expression", "text": "oc_rep_close_array(root, supportedprofiles)", "parent": 665, "children": [787, 788], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 45}}, {"id": 787, "type": "identifier", "text": "oc_rep_close_array", "parent": 786, "children": [], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 20}}, {"id": 788, "type": "argument_list", "text": "(root, supportedprofiles)", "parent": 786, "children": [789, 790], "start_point": {"row": 191, "column": 20}, "end_point": {"row": 191, "column": 45}}, {"id": 789, "type": "identifier", "text": "root", "parent": 788, "children": [], "start_point": {"row": 191, "column": 21}, "end_point": {"row": 191, "column": 25}}, {"id": 790, "type": "identifier", "text": "supportedprofiles", "parent": 788, "children": [], "start_point": {"row": 191, "column": 27}, "end_point": {"row": 191, "column": 44}}, {"id": 791, "type": "call_expression", "text": "oc_rep_end_root_object()", "parent": 665, "children": [792, 793], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 26}}, {"id": 792, "type": "identifier", "text": "oc_rep_end_root_object", "parent": 791, "children": [], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 24}}, {"id": 793, "type": "argument_list", "text": "()", "parent": 791, "children": [], "start_point": {"row": 192, "column": 24}, "end_point": {"row": 192, "column": 26}}, {"id": 794, "type": "function_definition", "text": "oc_sec_sp_t *\noc_sec_get_sp(size_t device)\n{\n return &sp[device];\n}", "parent": 0, "children": [795, 796], "start_point": {"row": 195, "column": 0}, "end_point": {"row": 199, "column": 1}}, {"id": 795, "type": "type_identifier", "text": "oc_sec_sp_t", "parent": 794, "children": [], "start_point": {"row": 195, "column": 0}, "end_point": {"row": 195, "column": 11}}, {"id": 796, "type": "pointer_declarator", "text": "*\noc_sec_get_sp(size_t device)", "parent": 794, "children": [797, 798], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 196, "column": 28}}, {"id": 797, "type": "*", "text": "*", "parent": 796, "children": [], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 13}}, {"id": 798, "type": "function_declarator", "text": "oc_sec_get_sp(size_t device)", "parent": 796, "children": [799, 800], "start_point": {"row": 196, "column": 0}, "end_point": {"row": 196, "column": 28}}, {"id": 799, "type": "identifier", "text": "oc_sec_get_sp", "parent": 798, "children": [], "start_point": {"row": 196, "column": 0}, "end_point": {"row": 196, "column": 13}}, {"id": 800, "type": "parameter_list", "text": "(size_t device)", "parent": 798, "children": [801], "start_point": {"row": 196, "column": 13}, "end_point": {"row": 196, "column": 28}}, {"id": 801, "type": "parameter_declaration", "text": "size_t device", "parent": 800, "children": [802, 803], "start_point": {"row": 196, "column": 14}, "end_point": {"row": 196, "column": 27}}, {"id": 802, "type": "primitive_type", "text": "size_t", "parent": 801, "children": [], "start_point": {"row": 196, "column": 14}, "end_point": {"row": 196, "column": 20}}, {"id": 803, "type": "identifier", "text": "device", "parent": 801, "children": [], "start_point": {"row": 196, "column": 21}, "end_point": {"row": 196, "column": 27}}, {"id": 804, "type": "return_statement", "text": "return &sp[device];", "parent": 794, "children": [805], "start_point": {"row": 198, "column": 2}, "end_point": {"row": 198, "column": 21}}, {"id": 805, "type": "pointer_expression", "text": "&sp[device]", "parent": 804, "children": [806], "start_point": {"row": 198, "column": 9}, "end_point": {"row": 198, "column": 20}}, {"id": 806, "type": "subscript_expression", "text": "sp[device]", "parent": 805, "children": [807, 808], "start_point": {"row": 198, "column": 10}, "end_point": {"row": 198, "column": 20}}, {"id": 807, "type": "identifier", "text": "sp", "parent": 806, "children": [], "start_point": {"row": 198, "column": 10}, "end_point": {"row": 198, "column": 12}}, {"id": 808, "type": "identifier", "text": "device", "parent": 806, "children": [], "start_point": {"row": 198, "column": 13}, "end_point": {"row": 198, "column": 19}}, {"id": 809, "type": "function_definition", "text": "void\nget_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)data;\n switch (iface_mask) {\n case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;\n default:\n break;\n }\n}", "parent": 0, "children": [810, 811], "start_point": {"row": 201, "column": 0}, "end_point": {"row": 213, "column": 1}}, {"id": 810, "type": "primitive_type", "text": "void", "parent": 809, "children": [], "start_point": {"row": 201, "column": 0}, "end_point": {"row": 201, "column": 4}}, {"id": 811, "type": "function_declarator", "text": "get_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)", "parent": 809, "children": [812, 813], "start_point": {"row": 202, "column": 0}, "end_point": {"row": 202, "column": 73}}, {"id": 812, "type": "identifier", "text": "get_sp", "parent": 811, "children": [], "start_point": {"row": 202, "column": 0}, "end_point": {"row": 202, "column": 6}}, {"id": 813, "type": "parameter_list", "text": "(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)", "parent": 811, "children": [814, 819, 822], "start_point": {"row": 202, "column": 6}, "end_point": {"row": 202, "column": 73}}, {"id": 814, "type": "parameter_declaration", "text": "oc_request_t *request", "parent": 813, "children": [815, 816], "start_point": {"row": 202, "column": 7}, "end_point": {"row": 202, "column": 28}}, {"id": 815, "type": "type_identifier", "text": "oc_request_t", "parent": 814, "children": [], "start_point": {"row": 202, "column": 7}, "end_point": {"row": 202, "column": 19}}, {"id": 816, "type": "pointer_declarator", "text": "*request", "parent": 814, "children": [817, 818], "start_point": {"row": 202, "column": 20}, "end_point": {"row": 202, "column": 28}}, {"id": 817, "type": "*", "text": "*", "parent": 816, "children": [], "start_point": {"row": 202, "column": 20}, "end_point": {"row": 202, "column": 21}}, {"id": 818, "type": "identifier", "text": "request", "parent": 816, "children": [], "start_point": {"row": 202, "column": 21}, "end_point": {"row": 202, "column": 28}}, {"id": 819, "type": "parameter_declaration", "text": "oc_interface_mask_t iface_mask", "parent": 813, "children": [820, 821], "start_point": {"row": 202, "column": 30}, "end_point": {"row": 202, "column": 60}}, {"id": 820, "type": "type_identifier", "text": "oc_interface_mask_t", "parent": 819, "children": [], "start_point": {"row": 202, "column": 30}, "end_point": {"row": 202, "column": 49}}, {"id": 821, "type": "identifier", "text": "iface_mask", "parent": 819, "children": [], "start_point": {"row": 202, "column": 50}, "end_point": {"row": 202, "column": 60}}, {"id": 822, "type": "parameter_declaration", "text": "void *data", "parent": 813, "children": [823, 824], "start_point": {"row": 202, "column": 62}, "end_point": {"row": 202, "column": 72}}, {"id": 823, "type": "primitive_type", "text": "void", "parent": 822, "children": [], "start_point": {"row": 202, "column": 62}, "end_point": {"row": 202, "column": 66}}, {"id": 824, "type": "pointer_declarator", "text": "*data", "parent": 822, "children": [825, 826], "start_point": {"row": 202, "column": 67}, "end_point": {"row": 202, "column": 72}}, {"id": 825, "type": "*", "text": "*", "parent": 824, "children": [], "start_point": {"row": 202, "column": 67}, "end_point": {"row": 202, "column": 68}}, {"id": 826, "type": "identifier", "text": "data", "parent": 824, "children": [], "start_point": {"row": 202, "column": 68}, "end_point": {"row": 202, "column": 72}}, {"id": 827, "type": "cast_expression", "text": "(void)data", "parent": 809, "children": [828, 830], "start_point": {"row": 204, "column": 2}, "end_point": {"row": 204, "column": 12}}, {"id": 828, "type": "type_descriptor", "text": "void", "parent": 827, "children": [829], "start_point": {"row": 204, "column": 3}, "end_point": {"row": 204, "column": 7}}, {"id": 829, "type": "primitive_type", "text": "void", "parent": 828, "children": [], "start_point": {"row": 204, "column": 3}, "end_point": {"row": 204, "column": 7}}, {"id": 830, "type": "identifier", "text": "data", "parent": 827, "children": [], "start_point": {"row": 204, "column": 8}, "end_point": {"row": 204, "column": 12}}, {"id": 831, "type": "switch_statement", "text": "switch (iface_mask) {\n case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;\n default:\n break;\n }", "parent": 809, "children": [832, 833], "start_point": {"row": 205, "column": 2}, "end_point": {"row": 212, "column": 3}}, {"id": 832, "type": "switch", "text": "switch", "parent": 831, "children": [], "start_point": {"row": 205, "column": 2}, "end_point": {"row": 205, "column": 8}}, {"id": 833, "type": "parenthesized_expression", "text": "(iface_mask)", "parent": 831, "children": [834], "start_point": {"row": 205, "column": 9}, "end_point": {"row": 205, "column": 21}}, {"id": 834, "type": "identifier", "text": "iface_mask", "parent": 833, "children": [], "start_point": {"row": 205, "column": 10}, "end_point": {"row": 205, "column": 20}}, {"id": 835, "type": "case_statement", "text": "case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;", "parent": 831, "children": [836, 837, 851], "start_point": {"row": 206, "column": 2}, "end_point": {"row": 209, "column": 10}}, {"id": 836, "type": "case", "text": "case", "parent": 835, "children": [], "start_point": {"row": 206, "column": 2}, "end_point": {"row": 206, "column": 6}}, {"id": 837, "type": "identifier", "text": "OC_IF_BASELINE", "parent": 835, "children": [], "start_point": {"row": 206, "column": 7}, "end_point": {"row": 206, "column": 21}}, {"id": 838, "type": "call_expression", "text": "oc_sec_encode_sp(request->resource->device)", "parent": 835, "children": [839, 840], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 47}}, {"id": 839, "type": "identifier", "text": "oc_sec_encode_sp", "parent": 838, "children": [], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 20}}, {"id": 840, "type": "argument_list", "text": "(request->resource->device)", "parent": 838, "children": [841], "start_point": {"row": 207, "column": 20}, "end_point": {"row": 207, "column": 47}}, {"id": 841, "type": "field_expression", "text": "request->resource->device", "parent": 840, "children": [842, 845], "start_point": {"row": 207, "column": 21}, "end_point": {"row": 207, "column": 46}}, {"id": 842, "type": "field_expression", "text": "request->resource", "parent": 841, "children": [843, 844], "start_point": {"row": 207, "column": 21}, "end_point": {"row": 207, "column": 38}}, {"id": 843, "type": "identifier", "text": "request", "parent": 842, "children": [], "start_point": {"row": 207, "column": 21}, "end_point": {"row": 207, "column": 28}}, {"id": 844, "type": "field_identifier", "text": "resource", "parent": 842, "children": [], "start_point": {"row": 207, "column": 30}, "end_point": {"row": 207, "column": 38}}, {"id": 845, "type": "field_identifier", "text": "device", "parent": 841, "children": [], "start_point": {"row": 207, "column": 40}, "end_point": {"row": 207, "column": 46}}, {"id": 846, "type": "call_expression", "text": "oc_send_response(request, OC_STATUS_OK)", "parent": 835, "children": [847, 848], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 43}}, {"id": 847, "type": "identifier", "text": "oc_send_response", "parent": 846, "children": [], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 20}}, {"id": 848, "type": "argument_list", "text": "(request, OC_STATUS_OK)", "parent": 846, "children": [849, 850], "start_point": {"row": 208, "column": 20}, "end_point": {"row": 208, "column": 43}}, {"id": 849, "type": "identifier", "text": "request", "parent": 848, "children": [], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 28}}, {"id": 850, "type": "identifier", "text": "OC_STATUS_OK", "parent": 848, "children": [], "start_point": {"row": 208, "column": 30}, "end_point": {"row": 208, "column": 42}}, {"id": 851, "type": "break_statement", "text": "break;", "parent": 835, "children": [852], "start_point": {"row": 209, "column": 4}, "end_point": {"row": 209, "column": 10}}, {"id": 852, "type": "break", "text": "break", "parent": 851, "children": [], "start_point": {"row": 209, "column": 4}, "end_point": {"row": 209, "column": 9}}, {"id": 853, "type": "case_statement", "text": "default:\n break;", "parent": 831, "children": [854, 855], "start_point": {"row": 210, "column": 2}, "end_point": {"row": 211, "column": 10}}, {"id": 854, "type": "default", "text": "default", "parent": 853, "children": [], "start_point": {"row": 210, "column": 2}, "end_point": {"row": 210, "column": 9}}, {"id": 855, "type": "break_statement", "text": "break;", "parent": 853, "children": [856], "start_point": {"row": 211, "column": 4}, "end_point": {"row": 211, "column": 10}}, {"id": 856, "type": "break", "text": "break", "parent": 855, "children": [], "start_point": {"row": 211, "column": 4}, "end_point": {"row": 211, "column": 9}}, {"id": 857, "type": "function_definition", "text": "void\npost_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)iface_mask;\n (void)data;\n size_t device = request->resource->device;\n if (oc_sec_decode_sp(request->request_payload, device)) {\n oc_send_response(request, OC_STATUS_CHANGED);\n request->response->response_buffer->response_length = 0;\n oc_sec_dump_sp(device);\n } else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }\n}", "parent": 0, "children": [858, 859], "start_point": {"row": 215, "column": 0}, "end_point": {"row": 228, "column": 1}}, {"id": 858, "type": "primitive_type", "text": "void", "parent": 857, "children": [], "start_point": {"row": 215, "column": 0}, "end_point": {"row": 215, "column": 4}}, {"id": 859, "type": "function_declarator", "text": "post_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)", "parent": 857, "children": [860, 861], "start_point": {"row": 216, "column": 0}, "end_point": {"row": 216, "column": 74}}, {"id": 860, "type": "identifier", "text": "post_sp", "parent": 859, "children": [], "start_point": {"row": 216, "column": 0}, "end_point": {"row": 216, "column": 7}}, {"id": 861, "type": "parameter_list", "text": "(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)", "parent": 859, "children": [862, 867, 870], "start_point": {"row": 216, "column": 7}, "end_point": {"row": 216, "column": 74}}, {"id": 862, "type": "parameter_declaration", "text": "oc_request_t *request", "parent": 861, "children": [863, 864], "start_point": {"row": 216, "column": 8}, "end_point": {"row": 216, "column": 29}}, {"id": 863, "type": "type_identifier", "text": "oc_request_t", "parent": 862, "children": [], "start_point": {"row": 216, "column": 8}, "end_point": {"row": 216, "column": 20}}, {"id": 864, "type": "pointer_declarator", "text": "*request", "parent": 862, "children": [865, 866], "start_point": {"row": 216, "column": 21}, "end_point": {"row": 216, "column": 29}}, {"id": 865, "type": "*", "text": "*", "parent": 864, "children": [], "start_point": {"row": 216, "column": 21}, "end_point": {"row": 216, "column": 22}}, {"id": 866, "type": "identifier", "text": "request", "parent": 864, "children": [], "start_point": {"row": 216, "column": 22}, "end_point": {"row": 216, "column": 29}}, {"id": 867, "type": "parameter_declaration", "text": "oc_interface_mask_t iface_mask", "parent": 861, "children": [868, 869], "start_point": {"row": 216, "column": 31}, "end_point": {"row": 216, "column": 61}}, {"id": 868, "type": "type_identifier", "text": "oc_interface_mask_t", "parent": 867, "children": [], "start_point": {"row": 216, "column": 31}, "end_point": {"row": 216, "column": 50}}, {"id": 869, "type": "identifier", "text": "iface_mask", "parent": 867, "children": [], "start_point": {"row": 216, "column": 51}, "end_point": {"row": 216, "column": 61}}, {"id": 870, "type": "parameter_declaration", "text": "void *data", "parent": 861, "children": [871, 872], "start_point": {"row": 216, "column": 63}, "end_point": {"row": 216, "column": 73}}, {"id": 871, "type": "primitive_type", "text": "void", "parent": 870, "children": [], "start_point": {"row": 216, "column": 63}, "end_point": {"row": 216, "column": 67}}, {"id": 872, "type": "pointer_declarator", "text": "*data", "parent": 870, "children": [873, 874], "start_point": {"row": 216, "column": 68}, "end_point": {"row": 216, "column": 73}}, {"id": 873, "type": "*", "text": "*", "parent": 872, "children": [], "start_point": {"row": 216, "column": 68}, "end_point": {"row": 216, "column": 69}}, {"id": 874, "type": "identifier", "text": "data", "parent": 872, "children": [], "start_point": {"row": 216, "column": 69}, "end_point": {"row": 216, "column": 73}}, {"id": 875, "type": "cast_expression", "text": "(void)iface_mask", "parent": 857, "children": [876, 878], "start_point": {"row": 218, "column": 2}, "end_point": {"row": 218, "column": 18}}, {"id": 876, "type": "type_descriptor", "text": "void", "parent": 875, "children": [877], "start_point": {"row": 218, "column": 3}, "end_point": {"row": 218, "column": 7}}, {"id": 877, "type": "primitive_type", "text": "void", "parent": 876, "children": [], "start_point": {"row": 218, "column": 3}, "end_point": {"row": 218, "column": 7}}, {"id": 878, "type": "identifier", "text": "iface_mask", "parent": 875, "children": [], "start_point": {"row": 218, "column": 8}, "end_point": {"row": 218, "column": 18}}, {"id": 879, "type": "cast_expression", "text": "(void)data", "parent": 857, "children": [880, 882], "start_point": {"row": 219, "column": 2}, "end_point": {"row": 219, "column": 12}}, {"id": 880, "type": "type_descriptor", "text": "void", "parent": 879, "children": [881], "start_point": {"row": 219, "column": 3}, "end_point": {"row": 219, "column": 7}}, {"id": 881, "type": "primitive_type", "text": "void", "parent": 880, "children": [], "start_point": {"row": 219, "column": 3}, "end_point": {"row": 219, "column": 7}}, {"id": 882, "type": "identifier", "text": "data", "parent": 879, "children": [], "start_point": {"row": 219, "column": 8}, "end_point": {"row": 219, "column": 12}}, {"id": 883, "type": "declaration", "text": "size_t device = request->resource->device;", "parent": 857, "children": [884, 885], "start_point": {"row": 220, "column": 2}, "end_point": {"row": 220, "column": 44}}, {"id": 884, "type": "primitive_type", "text": "size_t", "parent": 883, "children": [], "start_point": {"row": 220, "column": 2}, "end_point": {"row": 220, "column": 8}}, {"id": 885, "type": "init_declarator", "text": "device = request->resource->device", "parent": 883, "children": [886, 887, 888], "start_point": {"row": 220, "column": 9}, "end_point": {"row": 220, "column": 43}}, {"id": 886, "type": "identifier", "text": "device", "parent": 885, "children": [], "start_point": {"row": 220, "column": 9}, "end_point": {"row": 220, "column": 15}}, {"id": 887, "type": "=", "text": "=", "parent": 885, "children": [], "start_point": {"row": 220, "column": 16}, "end_point": {"row": 220, "column": 17}}, {"id": 888, "type": "field_expression", "text": "request->resource->device", "parent": 885, "children": [889, 892], "start_point": {"row": 220, "column": 18}, "end_point": {"row": 220, "column": 43}}, {"id": 889, "type": "field_expression", "text": "request->resource", "parent": 888, "children": [890, 891], "start_point": {"row": 220, "column": 18}, "end_point": {"row": 220, "column": 35}}, {"id": 890, "type": "identifier", "text": "request", "parent": 889, "children": [], "start_point": {"row": 220, "column": 18}, "end_point": {"row": 220, "column": 25}}, {"id": 891, "type": "field_identifier", "text": "resource", "parent": 889, "children": [], "start_point": {"row": 220, "column": 27}, "end_point": {"row": 220, "column": 35}}, {"id": 892, "type": "field_identifier", "text": "device", "parent": 888, "children": [], "start_point": {"row": 220, "column": 37}, "end_point": {"row": 220, "column": 43}}, {"id": 893, "type": "if_statement", "text": "if (oc_sec_decode_sp(request->request_payload, device)) {\n oc_send_response(request, OC_STATUS_CHANGED);\n request->response->response_buffer->response_length = 0;\n oc_sec_dump_sp(device);\n } else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }", "parent": 857, "children": [894, 921], "start_point": {"row": 221, "column": 2}, "end_point": {"row": 227, "column": 3}}, {"id": 894, "type": "parenthesized_expression", "text": "(oc_sec_decode_sp(request->request_payload, device))", "parent": 893, "children": [895], "start_point": {"row": 221, "column": 5}, "end_point": {"row": 221, "column": 57}}, {"id": 895, "type": "call_expression", "text": "oc_sec_decode_sp(request->request_payload, device)", "parent": 894, "children": [896, 897], "start_point": {"row": 221, "column": 6}, "end_point": {"row": 221, "column": 56}}, {"id": 896, "type": "identifier", "text": "oc_sec_decode_sp", "parent": 895, "children": [], "start_point": {"row": 221, "column": 6}, "end_point": {"row": 221, "column": 22}}, {"id": 897, "type": "argument_list", "text": "(request->request_payload, device)", "parent": 895, "children": [898, 901], "start_point": {"row": 221, "column": 22}, "end_point": {"row": 221, "column": 56}}, {"id": 898, "type": "field_expression", "text": "request->request_payload", "parent": 897, "children": [899, 900], "start_point": {"row": 221, "column": 23}, "end_point": {"row": 221, "column": 47}}, {"id": 899, "type": "identifier", "text": "request", "parent": 898, "children": [], "start_point": {"row": 221, "column": 23}, "end_point": {"row": 221, "column": 30}}, {"id": 900, "type": "field_identifier", "text": "request_payload", "parent": 898, "children": [], "start_point": {"row": 221, "column": 32}, "end_point": {"row": 221, "column": 47}}, {"id": 901, "type": "identifier", "text": "device", "parent": 897, "children": [], "start_point": {"row": 221, "column": 49}, "end_point": {"row": 221, "column": 55}}, {"id": 902, "type": "call_expression", "text": "oc_send_response(request, OC_STATUS_CHANGED)", "parent": 893, "children": [903, 904], "start_point": {"row": 222, "column": 4}, "end_point": {"row": 222, "column": 48}}, {"id": 903, "type": "identifier", "text": "oc_send_response", "parent": 902, "children": [], "start_point": {"row": 222, "column": 4}, "end_point": {"row": 222, "column": 20}}, {"id": 904, "type": "argument_list", "text": "(request, OC_STATUS_CHANGED)", "parent": 902, "children": [905, 906], "start_point": {"row": 222, "column": 20}, "end_point": {"row": 222, "column": 48}}, {"id": 905, "type": "identifier", "text": "request", "parent": 904, "children": [], "start_point": {"row": 222, "column": 21}, "end_point": {"row": 222, "column": 28}}, {"id": 906, "type": "identifier", "text": "OC_STATUS_CHANGED", "parent": 904, "children": [], "start_point": {"row": 222, "column": 30}, "end_point": {"row": 222, "column": 47}}, {"id": 907, "type": "assignment_expression", "text": "request->response->response_buffer->response_length = 0", "parent": 893, "children": [908, 915, 916], "start_point": {"row": 223, "column": 4}, "end_point": {"row": 223, "column": 59}}, {"id": 908, "type": "field_expression", "text": "request->response->response_buffer->response_length", "parent": 907, "children": [909, 914], "start_point": {"row": 223, "column": 4}, "end_point": {"row": 223, "column": 55}}, {"id": 909, "type": "field_expression", "text": "request->response->response_buffer", "parent": 908, "children": [910, 913], "start_point": {"row": 223, "column": 4}, "end_point": {"row": 223, "column": 38}}, {"id": 910, "type": "field_expression", "text": "request->response", "parent": 909, "children": [911, 912], "start_point": {"row": 223, "column": 4}, "end_point": {"row": 223, "column": 21}}, {"id": 911, "type": "identifier", "text": "request", "parent": 910, "children": [], "start_point": {"row": 223, "column": 4}, "end_point": {"row": 223, "column": 11}}, {"id": 912, "type": "field_identifier", "text": "response", "parent": 910, "children": [], "start_point": {"row": 223, "column": 13}, "end_point": {"row": 223, "column": 21}}, {"id": 913, "type": "field_identifier", "text": "response_buffer", "parent": 909, "children": [], "start_point": {"row": 223, "column": 23}, "end_point": {"row": 223, "column": 38}}, {"id": 914, "type": "field_identifier", "text": "response_length", "parent": 908, "children": [], "start_point": {"row": 223, "column": 40}, "end_point": {"row": 223, "column": 55}}, {"id": 915, "type": "=", "text": "=", "parent": 907, "children": [], "start_point": {"row": 223, "column": 56}, "end_point": {"row": 223, "column": 57}}, {"id": 916, "type": "number_literal", "text": "0", "parent": 907, "children": [], "start_point": {"row": 223, "column": 58}, "end_point": {"row": 223, "column": 59}}, {"id": 917, "type": "call_expression", "text": "oc_sec_dump_sp(device)", "parent": 893, "children": [918, 919], "start_point": {"row": 224, "column": 4}, "end_point": {"row": 224, "column": 26}}, {"id": 918, "type": "identifier", "text": "oc_sec_dump_sp", "parent": 917, "children": [], "start_point": {"row": 224, "column": 4}, "end_point": {"row": 224, "column": 18}}, {"id": 919, "type": "argument_list", "text": "(device)", "parent": 917, "children": [920], "start_point": {"row": 224, "column": 18}, "end_point": {"row": 224, "column": 26}}, {"id": 920, "type": "identifier", "text": "device", "parent": 919, "children": [], "start_point": {"row": 224, "column": 19}, "end_point": {"row": 224, "column": 25}}, {"id": 921, "type": "else_clause", "text": "else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }", "parent": 893, "children": [], "start_point": {"row": 225, "column": 4}, "end_point": {"row": 227, "column": 3}}, {"id": 922, "type": "call_expression", "text": "oc_send_response(request, OC_STATUS_BAD_REQUEST)", "parent": 921, "children": [923, 924], "start_point": {"row": 226, "column": 4}, "end_point": {"row": 226, "column": 52}}, {"id": 923, "type": "identifier", "text": "oc_send_response", "parent": 922, "children": [], "start_point": {"row": 226, "column": 4}, "end_point": {"row": 226, "column": 20}}, {"id": 924, "type": "argument_list", "text": "(request, OC_STATUS_BAD_REQUEST)", "parent": 922, "children": [925, 926], "start_point": {"row": 226, "column": 20}, "end_point": {"row": 226, "column": 52}}, {"id": 925, "type": "identifier", "text": "request", "parent": 924, "children": [], "start_point": {"row": 226, "column": 21}, "end_point": {"row": 226, "column": 28}}, {"id": 926, "type": "identifier", "text": "OC_STATUS_BAD_REQUEST", "parent": 924, "children": [], "start_point": {"row": 226, "column": 30}, "end_point": {"row": 226, "column": 51}}, {"id": 927, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 230, "column": 0}, "end_point": {"row": 230, "column": 6}}]}, "node_categories": {"declarations": {"functions": [69, 71, 118, 120, 222, 224, 247, 249, 263, 265, 404, 406, 628, 632, 665, 667, 794, 798, 809, 811, 857, 859], "variables": [30, 35, 42, 47, 74, 77, 80, 83, 123, 181, 227, 252, 268, 273, 409, 414, 417, 445, 487, 553, 559, 581, 635, 670, 801, 814, 819, 822, 862, 867, 870, 883], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 24, 25, 27, 28], "modules": [], "enums": []}, "statements": {"expressions": [87, 88, 95, 96, 103, 104, 111, 115, 131, 136, 139, 142, 143, 146, 147, 150, 157, 162, 165, 168, 169, 172, 173, 176, 189, 192, 195, 199, 200, 207, 208, 215, 216, 233, 235, 240, 242, 256, 260, 280, 281, 282, 283, 288, 293, 294, 299, 311, 312, 313, 314, 319, 324, 325, 330, 342, 343, 344, 345, 350, 355, 356, 361, 373, 374, 375, 376, 381, 386, 387, 392, 424, 429, 430, 431, 439, 440, 450, 453, 458, 459, 466, 467, 468, 473, 474, 478, 481, 492, 495, 498, 499, 504, 505, 506, 507, 509, 510, 519, 520, 532, 533, 534, 539, 540, 544, 547, 567, 570, 573, 574, 578, 588, 591, 592, 600, 605, 606, 623, 640, 673, 676, 679, 684, 689, 692, 693, 697, 703, 704, 705, 706, 707, 708, 715, 719, 724, 725, 726, 727, 728, 729, 736, 740, 745, 746, 747, 748, 749, 750, 757, 761, 766, 767, 768, 769, 770, 771, 778, 782, 786, 791, 805, 806, 827, 833, 838, 841, 842, 846, 875, 879, 888, 889, 894, 895, 898, 902, 908, 909, 910, 917, 922], "assignments": [86, 94, 102, 110, 128, 154, 185, 198, 206, 214, 255, 305, 336, 367, 398, 518, 563, 597, 604, 620, 907], "loops": [184, 438, 562], "conditionals": [0, 1, 2, 21, 22, 23, 31, 34, 36, 39, 43, 45, 46, 48, 50, 51, 52, 55, 59, 63, 67, 72, 76, 78, 79, 81, 82, 85, 89, 90, 91, 93, 97, 98, 99, 101, 105, 106, 107, 109, 112, 113, 116, 117, 121, 125, 126, 127, 129, 133, 137, 140, 144, 145, 149, 151, 155, 159, 163, 166, 170, 171, 175, 177, 180, 183, 186, 190, 193, 196, 201, 202, 203, 205, 209, 210, 211, 213, 217, 218, 219, 225, 229, 230, 231, 232, 234, 236, 238, 239, 241, 243, 245, 246, 250, 254, 257, 258, 261, 262, 264, 266, 272, 274, 276, 279, 284, 286, 289, 291, 295, 297, 298, 300, 302, 306, 308, 310, 315, 317, 320, 322, 326, 328, 329, 331, 333, 337, 339, 341, 346, 348, 351, 353, 357, 359, 360, 362, 364, 368, 370, 372, 377, 379, 382, 384, 388, 390, 391, 393, 395, 399, 401, 403, 407, 410, 413, 416, 418, 422, 425, 427, 428, 432, 433, 435, 441, 448, 451, 454, 455, 456, 457, 460, 461, 462, 463, 464, 465, 469, 475, 479, 482, 483, 488, 490, 493, 496, 500, 501, 502, 503, 508, 511, 512, 513, 521, 522, 523, 525, 528, 529, 530, 531, 535, 541, 545, 548, 549, 554, 556, 561, 564, 568, 571, 575, 576, 577, 579, 586, 589, 593, 594, 595, 596, 598, 601, 603, 607, 608, 609, 611, 614, 621, 624, 625, 633, 636, 637, 638, 639, 641, 642, 643, 644, 646, 647, 648, 649, 651, 652, 653, 654, 656, 657, 658, 659, 661, 668, 672, 674, 677, 680, 682, 683, 685, 687, 688, 690, 694, 695, 696, 698, 700, 701, 702, 709, 710, 711, 712, 716, 718, 720, 722, 723, 730, 731, 732, 733, 737, 739, 741, 743, 744, 751, 752, 753, 754, 758, 760, 762, 764, 765, 772, 773, 774, 775, 779, 781, 783, 785, 787, 789, 790, 792, 795, 799, 803, 807, 808, 812, 815, 818, 820, 821, 826, 830, 831, 832, 834, 835, 836, 837, 839, 843, 844, 845, 847, 849, 850, 853, 860, 863, 866, 868, 869, 874, 878, 882, 886, 890, 891, 892, 893, 896, 899, 900, 901, 903, 905, 906, 911, 912, 913, 914, 918, 920, 923, 925, 926, 927], "returns": [402, 436, 516, 616, 626, 645, 650, 655, 660, 662, 804], "exceptions": []}, "expressions": {"calls": [], "literals": [5, 8, 11, 14, 17, 20, 26, 29, 153, 179, 188, 221, 278, 304, 335, 366, 397, 471, 477, 484, 486, 515, 537, 543, 550, 552, 558, 566, 714, 735, 756, 777, 916], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 69, "universal_type": "function", "name": "oc_pki_set_security_profile", "text_snippet": "void\noc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles,\n "}, {"node_id": 71, "universal_type": "function", "name": "mfg_credid)", "text_snippet": "oc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles,\n "}, {"node_id": 118, "universal_type": "function", "name": "oc_sec_sp_init", "text_snippet": "void\noc_sec_sp_init(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n sp = (oc_sec_sp_t *)calloc(oc_core_get_nu"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "oc_sec_sp_init(void)"}, {"node_id": 222, "universal_type": "function", "name": "oc_sec_sp_free", "text_snippet": "void\noc_sec_sp_free(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n if (sp) {\n free(sp);\n }\n if (sp_mfg_"}, {"node_id": 224, "universal_type": "function", "name": "unknown", "text_snippet": "oc_sec_sp_free(void)"}, {"node_id": 247, "universal_type": "function", "name": "oc_sec_sp_default", "text_snippet": "void\noc_sec_sp_default(size_t device)\n{\n sp[device] = sp_mfg_default[device];\n}"}, {"node_id": 249, "universal_type": "function", "name": "unknown", "text_snippet": "oc_sec_sp_default(size_t device)"}, {"node_id": 263, "universal_type": "function", "name": "unknown", "text_snippet": "static oc_sp_types_t\nstring_to_sp(const char *sp_string)\n{\n oc_sp_types_t sp = 0;\n if (strlen(sp_s"}, {"node_id": 265, "universal_type": "function", "name": "unknown", "text_snippet": "string_to_sp(const char *sp_string)"}, {"node_id": 404, "universal_type": "function", "name": "oc_sec_decode_sp", "text_snippet": "bool\noc_sec_decode_sp(oc_rep_t *rep, size_t device)\n{\n oc_sec_pstat_t *pstat = oc_sec_get_pstat(dev"}, {"node_id": 406, "universal_type": "function", "name": "unknown", "text_snippet": "oc_sec_decode_sp(oc_rep_t *rep, size_t device)"}, {"node_id": 628, "universal_type": "function", "name": "unknown", "text_snippet": "static const char *\nsp_to_string(oc_sp_types_t sp_type)\n{\n switch (sp_type) {\n case OC_SP_BASELINE"}, {"node_id": 632, "universal_type": "function", "name": "unknown", "text_snippet": "sp_to_string(oc_sp_types_t sp_type)"}, {"node_id": 665, "universal_type": "function", "name": "oc_sec_encode_sp", "text_snippet": "void\noc_sec_encode_sp(size_t device)\n{\n oc_rep_start_root_object();\n oc_process_baseline_interface"}, {"node_id": 667, "universal_type": "function", "name": "unknown", "text_snippet": "oc_sec_encode_sp(size_t device)"}, {"node_id": 794, "universal_type": "function", "name": "unknown", "text_snippet": "oc_sec_sp_t *\noc_sec_get_sp(size_t device)\n{\n return &sp[device];\n}"}, {"node_id": 798, "universal_type": "function", "name": "unknown", "text_snippet": "oc_sec_get_sp(size_t device)"}, {"node_id": 809, "universal_type": "function", "name": "get_sp", "text_snippet": "void\nget_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)data;\n swi"}, {"node_id": 811, "universal_type": "function", "name": "*data)", "text_snippet": "get_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)"}, {"node_id": 857, "universal_type": "function", "name": "post_sp", "text_snippet": "void\npost_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)iface_mask"}, {"node_id": 859, "universal_type": "function", "name": "*data)", "text_snippet": "post_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"oc_sp.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"oc_api.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"oc_core_res.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"oc_pki.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"oc_pstat.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"oc_store.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 24, "text": "#include \"port/oc_assert.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <stdlib.h>\n"}, {"node_id": 28, "text": "#include"}]}, "original_source_code": "/*\n// Copyright (c) 2018-2019 Intel Corporation\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\n#ifdef OC_SECURITY\n#include \"oc_sp.h\"\n#include \"oc_api.h\"\n#include \"oc_core_res.h\"\n#include \"oc_pki.h\"\n#include \"oc_pstat.h\"\n#include \"oc_store.h\"\n#ifdef OC_DYNAMIC_ALLOCATION\n#include \"port/oc_assert.h\"\n#include <stdlib.h>\nstatic oc_sec_sp_t *sp;\nstatic oc_sec_sp_t *sp_mfg_default;\n#else /* OC_DYNAMIC_ALLOCATION */\nstatic oc_sec_sp_t sp[OC_MAX_NUM_DEVICES];\nstatic oc_sec_sp_t sp_mfg_default[OC_MAX_NUM_DEVICES];\n#endif /* !OC_DYNAMIC_ALLOCATION */\n\n#define OC_SP_BASELINE_OID \"1.3.6.1.4.1.51414.0.0.1.0\"\n#define OC_SP_BLACK_OID \"1.3.6.1.4.1.51414.0.0.2.0\"\n#define OC_SP_BLUE_OID \"1.3.6.1.4.1.51414.0.0.3.0\"\n#define OC_SP_PURPLE_OID \"1.3.6.1.4.1.51414.0.0.4.0\"\n\nvoid\noc_pki_set_security_profile(size_t device, oc_sp_types_t supported_profiles,\n oc_sp_types_t current_profile, int mfg_credid)\n{\n sp_mfg_default[device].supported_profiles |= supported_profiles;\n sp_mfg_default[device].current_profile = current_profile;\n sp_mfg_default[device].credid = mfg_credid;\n sp[device] = sp_mfg_default[device];\n}\n\nvoid\noc_sec_sp_init(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n sp = (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp) {\n oc_abort(\"Insufficient memory\");\n }\n sp_mfg_default =\n (oc_sec_sp_t *)calloc(oc_core_get_num_devices(), sizeof(oc_sec_sp_t));\n if (!sp_mfg_default) {\n oc_abort(\"Insufficient memory\");\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n size_t device;\n for (device = 0; device < oc_core_get_num_devices(); device++) {\n sp_mfg_default[device].current_profile = OC_SP_BASELINE;\n sp_mfg_default[device].supported_profiles = OC_SP_BASELINE;\n sp_mfg_default[device].credid = -1;\n }\n}\n\nvoid\noc_sec_sp_free(void)\n{\n#ifdef OC_DYNAMIC_ALLOCATION\n if (sp) {\n free(sp);\n }\n if (sp_mfg_default) {\n free(sp_mfg_default);\n }\n#endif /* OC_DYNAMIC_ALLOCATION */\n}\n\nvoid\noc_sec_sp_default(size_t device)\n{\n sp[device] = sp_mfg_default[device];\n}\n\nstatic oc_sp_types_t\nstring_to_sp(const char *sp_string)\n{\n oc_sp_types_t sp = 0;\n if (strlen(sp_string) == strlen(OC_SP_BASELINE_OID) &&\n memcmp(OC_SP_BASELINE_OID, sp_string, strlen(OC_SP_BASELINE_OID)) == 0) {\n sp = OC_SP_BASELINE;\n } else if (strlen(sp_string) == strlen(OC_SP_BLACK_OID) &&\n memcmp(OC_SP_BLACK_OID, sp_string, strlen(OC_SP_BLACK_OID)) == 0) {\n sp = OC_SP_BLACK;\n } else if (strlen(sp_string) == strlen(OC_SP_BLUE_OID) &&\n memcmp(OC_SP_BLUE_OID, sp_string, strlen(OC_SP_BLUE_OID)) == 0) {\n sp = OC_SP_BLUE;\n } else if (strlen(sp_string) == strlen(OC_SP_PURPLE_OID) &&\n memcmp(OC_SP_PURPLE_OID, sp_string, strlen(OC_SP_PURPLE_OID)) ==\n 0) {\n sp = OC_SP_PURPLE;\n }\n return sp;\n}\n\nbool\noc_sec_decode_sp(oc_rep_t *rep, size_t device)\n{\n oc_sec_pstat_t *pstat = oc_sec_get_pstat(device);\n if (pstat->s == OC_DOS_RFNOP) {\n return false;\n }\n while (rep != NULL) {\n size_t len = oc_string_len(rep->name);\n switch (rep->type) {\n case OC_REP_STRING:\n if (len == 14 &&\n memcmp(\"currentprofile\", oc_string(rep->name), 14) == 0) {\n oc_sp_types_t current_profile =\n string_to_sp(oc_string(rep->value.string));\n if ((current_profile & sp[device].supported_profiles) == 0) {\n return false;\n }\n sp[device].current_profile = current_profile;\n }\n break;\n case OC_REP_STRING_ARRAY:\n if (len == 17 &&\n memcmp(\"supportedprofiles\", oc_string(rep->name), 17) == 0) {\n oc_sp_types_t supported_profiles = 0;\n size_t profile;\n for (profile = 0;\n profile < oc_string_array_get_allocated_size(rep->value.array);\n profile++) {\n const char *p = oc_string_array_get_item(rep->value.array, profile);\n supported_profiles |= string_to_sp(p);\n }\n sp[device].supported_profiles = supported_profiles;\n }\n break;\n default:\n return false;\n break;\n }\n rep = rep->next;\n }\n return true;\n}\n\nstatic const char *\nsp_to_string(oc_sp_types_t sp_type)\n{\n switch (sp_type) {\n case OC_SP_BASELINE:\n return OC_SP_BASELINE_OID;\n case OC_SP_BLACK:\n return OC_SP_BLACK_OID;\n case OC_SP_BLUE:\n return OC_SP_BLUE_OID;\n case OC_SP_PURPLE:\n return OC_SP_PURPLE_OID;\n }\n return NULL;\n}\n\nvoid\noc_sec_encode_sp(size_t device)\n{\n oc_rep_start_root_object();\n oc_process_baseline_interface(\n oc_core_get_resource_by_index(OCF_SEC_SP, device));\n oc_rep_set_text_string(root, currentprofile,\n sp_to_string(sp[device].current_profile));\n oc_rep_set_array(root, supportedprofiles);\n if ((sp[device].supported_profiles & OC_SP_BASELINE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BASELINE));\n }\n if ((sp[device].supported_profiles & OC_SP_BLACK) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLACK));\n }\n if ((sp[device].supported_profiles & OC_SP_BLUE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_BLUE));\n }\n if ((sp[device].supported_profiles & OC_SP_PURPLE) != 0) {\n oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE));\n }\n oc_rep_close_array(root, supportedprofiles);\n oc_rep_end_root_object();\n}\n\noc_sec_sp_t *\noc_sec_get_sp(size_t device)\n{\n return &sp[device];\n}\n\nvoid\nget_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)data;\n switch (iface_mask) {\n case OC_IF_BASELINE: {\n oc_sec_encode_sp(request->resource->device);\n oc_send_response(request, OC_STATUS_OK);\n } break;\n default:\n break;\n }\n}\n\nvoid\npost_sp(oc_request_t *request, oc_interface_mask_t iface_mask, void *data)\n{\n (void)iface_mask;\n (void)data;\n size_t device = request->resource->device;\n if (oc_sec_decode_sp(request->request_payload, device)) {\n oc_send_response(request, OC_STATUS_CHANGED);\n request->response->response_buffer->response_length = 0;\n oc_sec_dump_sp(device);\n } else {\n oc_send_response(request, OC_STATUS_BAD_REQUEST);\n }\n}\n\n#endif /* OC_SECURITY */\n"}
80,929
c
// TetiSoft: To specify which modules you need, // insert the following in your source file and uncomment as needed: /* //#define FT_USE_AUTOHINT // autohinter //#define FT_USE_RASTER // monochrome rasterizer //#define FT_USE_SMOOTH // anti-aliasing rasterizer //#define FT_USE_TT // truetype font driver //#define FT_USE_T1 // type1 font driver //#define FT_USE_T42 // type42 font driver //#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support //#define FT_USE_CFF // opentype font driver //#define FT_USE_BDF // bdf bitmap font driver //#define FT_USE_PCF // pcf bitmap font driver //#define FT_USE_PFR // pfr font driver //#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver #include "FT:src/base/ftinit.c" */ // TetiSoft: make sure that needed support modules are built in. // Dependencies can be found by searching for FT_Get_Module. #ifdef FT_USE_T42 #define FT_USE_TT #endif #ifdef FT_USE_TT #define FT_USE_SFNT #endif #ifdef FT_USE_CFF #define FT_USE_SFNT #define FT_USE_PSHINT #define FT_USE_PSNAMES #endif #ifdef FT_USE_T1 #define FT_USE_PSAUX #define FT_USE_PSHINT #define FT_USE_PSNAMES #endif #ifdef FT_USE_T1CID #define FT_USE_PSAUX #define FT_USE_PSHINT #define FT_USE_PSNAMES #endif #ifdef FT_USE_PSAUX #define FT_USE_PSNAMES #endif #ifdef FT_USE_SFNT #define FT_USE_PSNAMES #endif // TetiSoft: Now include the modules #ifdef FT_USE_AUTOHINT FT_USE_MODULE(autohint_module_class) #endif #ifdef FT_USE_PSHINT FT_USE_MODULE(pshinter_module_class) #endif #ifdef FT_USE_CFF FT_USE_MODULE(cff_driver_class) #endif #ifdef FT_USE_T1CID FT_USE_MODULE(t1cid_driver_class) #endif #ifdef FT_USE_BDF FT_USE_MODULE(bdf_driver_class) #endif #ifdef FT_USE_PCF FT_USE_MODULE(pcf_driver_class) #endif #ifdef FT_USE_PFR FT_USE_MODULE(pfr_driver_class) #endif #ifdef FT_USE_PSAUX FT_USE_MODULE(psaux_module_class) #endif #ifdef FT_USE_PSNAMES FT_USE_MODULE(psnames_module_class) #endif #ifdef FT_USE_RASTER FT_USE_MODULE(ft_raster1_renderer_class) #endif #ifdef FT_USE_SFNT FT_USE_MODULE(sfnt_module_class) #endif #ifdef FT_USE_SMOOTH FT_USE_MODULE(ft_smooth_renderer_class) FT_USE_MODULE(ft_smooth_lcd_renderer_class) FT_USE_MODULE(ft_smooth_lcdv_renderer_class) #endif #ifdef FT_USE_TT FT_USE_MODULE(tt_driver_class) #endif #ifdef FT_USE_T1 FT_USE_MODULE(t1_driver_class) #endif #ifdef FT_USE_T42 FT_USE_MODULE(t42_driver_class) #endif #ifdef FT_USE_WINFNT FT_USE_MODULE(winfnt_driver_class) #endif
25.22
97
(translation_unit) "// TetiSoft: To specify which modules you need,\n// insert the following in your source file and uncomment as needed:\n\n/*\n//#define FT_USE_AUTOHINT // autohinter\n//#define FT_USE_RASTER // monochrome rasterizer\n//#define FT_USE_SMOOTH // anti-aliasing rasterizer\n//#define FT_USE_TT // truetype font driver\n//#define FT_USE_T1 // type1 font driver\n//#define FT_USE_T42 // type42 font driver\n//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support\n//#define FT_USE_CFF // opentype font driver\n//#define FT_USE_BDF // bdf bitmap font driver\n//#define FT_USE_PCF // pcf bitmap font driver\n//#define FT_USE_PFR // pfr font driver\n//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver\n#include "FT:src/base/ftinit.c"\n*/\n\n// TetiSoft: make sure that needed support modules are built in.\n// Dependencies can be found by searching for FT_Get_Module.\n\n#ifdef FT_USE_T42\n#define FT_USE_TT\n#endif\n\n#ifdef FT_USE_TT\n#define FT_USE_SFNT\n#endif\n\n#ifdef FT_USE_CFF\n#define FT_USE_SFNT\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif\n\n#ifdef FT_USE_T1\n#define FT_USE_PSAUX\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif\n\n#ifdef FT_USE_T1CID\n#define FT_USE_PSAUX\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif\n\n#ifdef FT_USE_PSAUX\n#define FT_USE_PSNAMES\n#endif\n\n#ifdef FT_USE_SFNT\n#define FT_USE_PSNAMES\n#endif\n\n// TetiSoft: Now include the modules\n\n#ifdef FT_USE_AUTOHINT\nFT_USE_MODULE(autohint_module_class)\n#endif\n\n#ifdef FT_USE_PSHINT\nFT_USE_MODULE(pshinter_module_class)\n#endif\n\n#ifdef FT_USE_CFF\nFT_USE_MODULE(cff_driver_class)\n#endif\n\n#ifdef FT_USE_T1CID\nFT_USE_MODULE(t1cid_driver_class)\n#endif\n\n#ifdef FT_USE_BDF\nFT_USE_MODULE(bdf_driver_class)\n#endif\n\n#ifdef FT_USE_PCF\nFT_USE_MODULE(pcf_driver_class)\n#endif\n\n#ifdef FT_USE_PFR\nFT_USE_MODULE(pfr_driver_class)\n#endif\n\n#ifdef FT_USE_PSAUX\nFT_USE_MODULE(psaux_module_class)\n#endif\n\n#ifdef FT_USE_PSNAMES\nFT_USE_MODULE(psnames_module_class)\n#endif\n\n#ifdef FT_USE_RASTER\nFT_USE_MODULE(ft_raster1_renderer_class)\n#endif\n\n#ifdef FT_USE_SFNT\nFT_USE_MODULE(sfnt_module_class)\n#endif\n\n#ifdef FT_USE_SMOOTH\nFT_USE_MODULE(ft_smooth_renderer_class)\nFT_USE_MODULE(ft_smooth_lcd_renderer_class)\nFT_USE_MODULE(ft_smooth_lcdv_renderer_class)\n#endif\n\n#ifdef FT_USE_TT\nFT_USE_MODULE(tt_driver_class)\n#endif\n\n#ifdef FT_USE_T1\nFT_USE_MODULE(t1_driver_class)\n#endif\n\n#ifdef FT_USE_T42\nFT_USE_MODULE(t42_driver_class)\n#endif\n\n#ifdef FT_USE_WINFNT\nFT_USE_MODULE(winfnt_driver_class)\n#endif\n" (comment) "// TetiSoft: To specify which modules you need," (comment) "// insert the following in your source file and uncomment as needed:" (comment) "/*\n//#define FT_USE_AUTOHINT // autohinter\n//#define FT_USE_RASTER // monochrome rasterizer\n//#define FT_USE_SMOOTH // anti-aliasing rasterizer\n//#define FT_USE_TT // truetype font driver\n//#define FT_USE_T1 // type1 font driver\n//#define FT_USE_T42 // type42 font driver\n//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support\n//#define FT_USE_CFF // opentype font driver\n//#define FT_USE_BDF // bdf bitmap font driver\n//#define FT_USE_PCF // pcf bitmap font driver\n//#define FT_USE_PFR // pfr font driver\n//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver\n#include "FT:src/base/ftinit.c"\n*/" (comment) "// TetiSoft: make sure that needed support modules are built in." (comment) "// Dependencies can be found by searching for FT_Get_Module." (preproc_ifdef) "#ifdef FT_USE_T42\n#define FT_USE_TT\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_T42" (preproc_def) "#define FT_USE_TT\n" (#define) "#define" (identifier) "FT_USE_TT" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_TT\n#define FT_USE_SFNT\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_TT" (preproc_def) "#define FT_USE_SFNT\n" (#define) "#define" (identifier) "FT_USE_SFNT" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_CFF\n#define FT_USE_SFNT\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_CFF" (preproc_def) "#define FT_USE_SFNT\n" (#define) "#define" (identifier) "FT_USE_SFNT" (preproc_def) "#define FT_USE_PSHINT\n" (#define) "#define" (identifier) "FT_USE_PSHINT" (preproc_def) "#define FT_USE_PSNAMES\n" (#define) "#define" (identifier) "FT_USE_PSNAMES" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_T1\n#define FT_USE_PSAUX\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_T1" (preproc_def) "#define FT_USE_PSAUX\n" (#define) "#define" (identifier) "FT_USE_PSAUX" (preproc_def) "#define FT_USE_PSHINT\n" (#define) "#define" (identifier) "FT_USE_PSHINT" (preproc_def) "#define FT_USE_PSNAMES\n" (#define) "#define" (identifier) "FT_USE_PSNAMES" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_T1CID\n#define FT_USE_PSAUX\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_T1CID" (preproc_def) "#define FT_USE_PSAUX\n" (#define) "#define" (identifier) "FT_USE_PSAUX" (preproc_def) "#define FT_USE_PSHINT\n" (#define) "#define" (identifier) "FT_USE_PSHINT" (preproc_def) "#define FT_USE_PSNAMES\n" (#define) "#define" (identifier) "FT_USE_PSNAMES" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_PSAUX\n#define FT_USE_PSNAMES\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_PSAUX" (preproc_def) "#define FT_USE_PSNAMES\n" (#define) "#define" (identifier) "FT_USE_PSNAMES" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_SFNT\n#define FT_USE_PSNAMES\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_SFNT" (preproc_def) "#define FT_USE_PSNAMES\n" (#define) "#define" (identifier) "FT_USE_PSNAMES" (#endif) "#endif" (comment) "// TetiSoft: Now include the modules" (preproc_ifdef) "#ifdef FT_USE_AUTOHINT\nFT_USE_MODULE(autohint_module_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_AUTOHINT" (macro_type_specifier) "FT_USE_MODULE(autohint_module_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "autohint_module_class" (type_identifier) "autohint_module_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_PSHINT\nFT_USE_MODULE(pshinter_module_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_PSHINT" (macro_type_specifier) "FT_USE_MODULE(pshinter_module_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "pshinter_module_class" (type_identifier) "pshinter_module_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_CFF\nFT_USE_MODULE(cff_driver_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_CFF" (macro_type_specifier) "FT_USE_MODULE(cff_driver_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "cff_driver_class" (type_identifier) "cff_driver_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_T1CID\nFT_USE_MODULE(t1cid_driver_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_T1CID" (macro_type_specifier) "FT_USE_MODULE(t1cid_driver_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "t1cid_driver_class" (type_identifier) "t1cid_driver_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_BDF\nFT_USE_MODULE(bdf_driver_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_BDF" (macro_type_specifier) "FT_USE_MODULE(bdf_driver_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "bdf_driver_class" (type_identifier) "bdf_driver_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_PCF\nFT_USE_MODULE(pcf_driver_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_PCF" (macro_type_specifier) "FT_USE_MODULE(pcf_driver_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "pcf_driver_class" (type_identifier) "pcf_driver_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_PFR\nFT_USE_MODULE(pfr_driver_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_PFR" (macro_type_specifier) "FT_USE_MODULE(pfr_driver_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "pfr_driver_class" (type_identifier) "pfr_driver_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_PSAUX\nFT_USE_MODULE(psaux_module_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_PSAUX" (macro_type_specifier) "FT_USE_MODULE(psaux_module_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "psaux_module_class" (type_identifier) "psaux_module_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_PSNAMES\nFT_USE_MODULE(psnames_module_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_PSNAMES" (macro_type_specifier) "FT_USE_MODULE(psnames_module_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "psnames_module_class" (type_identifier) "psnames_module_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_RASTER\nFT_USE_MODULE(ft_raster1_renderer_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_RASTER" (macro_type_specifier) "FT_USE_MODULE(ft_raster1_renderer_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "ft_raster1_renderer_class" (type_identifier) "ft_raster1_renderer_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_SFNT\nFT_USE_MODULE(sfnt_module_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_SFNT" (macro_type_specifier) "FT_USE_MODULE(sfnt_module_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "sfnt_module_class" (type_identifier) "sfnt_module_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_SMOOTH\nFT_USE_MODULE(ft_smooth_renderer_class)\nFT_USE_MODULE(ft_smooth_lcd_renderer_class)\nFT_USE_MODULE(ft_smooth_lcdv_renderer_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_SMOOTH" (ERROR) "FT_USE_MODULE(ft_smooth_renderer_class)\nFT_USE_MODULE(ft_smooth_lcd_renderer_class)\nFT_USE_MODULE(ft_smooth_lcdv_renderer_class)" (macro_type_specifier) "FT_USE_MODULE(ft_smooth_renderer_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "ft_smooth_renderer_class" (type_identifier) "ft_smooth_renderer_class" ()) ")" (function_declarator) "FT_USE_MODULE(ft_smooth_lcd_renderer_class)" (identifier) "FT_USE_MODULE" (parameter_list) "(ft_smooth_lcd_renderer_class)" (() "(" (identifier) "ft_smooth_lcd_renderer_class" ()) ")" (macro_type_specifier) "FT_USE_MODULE(ft_smooth_lcdv_renderer_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "ft_smooth_lcdv_renderer_class" (type_identifier) "ft_smooth_lcdv_renderer_class" ()) ")" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_TT\nFT_USE_MODULE(tt_driver_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_TT" (macro_type_specifier) "FT_USE_MODULE(tt_driver_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "tt_driver_class" (type_identifier) "tt_driver_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_T1\nFT_USE_MODULE(t1_driver_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_T1" (macro_type_specifier) "FT_USE_MODULE(t1_driver_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "t1_driver_class" (type_identifier) "t1_driver_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_T42\nFT_USE_MODULE(t42_driver_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_T42" (macro_type_specifier) "FT_USE_MODULE(t42_driver_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "t42_driver_class" (type_identifier) "t42_driver_class" ()) ")" (;) "" (#endif) "#endif" (preproc_ifdef) "#ifdef FT_USE_WINFNT\nFT_USE_MODULE(winfnt_driver_class)\n#endif" (#ifdef) "#ifdef" (identifier) "FT_USE_WINFNT" (macro_type_specifier) "FT_USE_MODULE(winfnt_driver_class)" (identifier) "FT_USE_MODULE" (() "(" (type_descriptor) "winfnt_driver_class" (type_identifier) "winfnt_driver_class" ()) ")" (;) "" (#endif) "#endif"
262
1
{"language": "c", "success": true, "metadata": {"lines": 97, "avg_line_length": 25.22, "nodes": 204, "errors": 0, "source_hash": "b3425a2a0e54d7f5770d54f6415a4c2704ac7e50ff859896fd5e6b0b1b5ab057", "categorized_nodes": 159}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifdef FT_USE_T42\n#define FT_USE_TT\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": "FT_USE_T42", "parent": 0, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 17}}, {"id": 3, "type": "preproc_def", "text": "#define FT_USE_TT\n", "parent": 0, "children": [4, 5], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 5, "type": "identifier", "text": "FT_USE_TT", "parent": 3, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 17}}, {"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_ifdef", "text": "#ifdef FT_USE_TT\n#define FT_USE_SFNT\n#endif", "parent": null, "children": [8, 9, 10, 13], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 8, "type": "#ifdef", "text": "#ifdef", "parent": 7, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 9, "type": "identifier", "text": "FT_USE_TT", "parent": 7, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 16}}, {"id": 10, "type": "preproc_def", "text": "#define FT_USE_SFNT\n", "parent": 7, "children": [11, 12], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 11, "type": "#define", "text": "#define", "parent": 10, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 12, "type": "identifier", "text": "FT_USE_SFNT", "parent": 10, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 19}}, {"id": 13, "type": "#endif", "text": "#endif", "parent": 7, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 14, "type": "preproc_ifdef", "text": "#ifdef FT_USE_CFF\n#define FT_USE_SFNT\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif", "parent": null, "children": [15, 16, 17, 20, 23, 26], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 34, "column": 6}}, {"id": 15, "type": "#ifdef", "text": "#ifdef", "parent": 14, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 16, "type": "identifier", "text": "FT_USE_CFF", "parent": 14, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 17}}, {"id": 17, "type": "preproc_def", "text": "#define FT_USE_SFNT\n", "parent": 14, "children": [18, 19], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 18, "type": "#define", "text": "#define", "parent": 17, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 19, "type": "identifier", "text": "FT_USE_SFNT", "parent": 17, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 19}}, {"id": 20, "type": "preproc_def", "text": "#define FT_USE_PSHINT\n", "parent": 14, "children": [21, 22], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 21, "type": "#define", "text": "#define", "parent": 20, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 22, "type": "identifier", "text": "FT_USE_PSHINT", "parent": 20, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 21}}, {"id": 23, "type": "preproc_def", "text": "#define FT_USE_PSNAMES\n", "parent": 14, "children": [24, 25], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 24, "type": "#define", "text": "#define", "parent": 23, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 25, "type": "identifier", "text": "FT_USE_PSNAMES", "parent": 23, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 22}}, {"id": 26, "type": "#endif", "text": "#endif", "parent": 14, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 6}}, {"id": 27, "type": "preproc_ifdef", "text": "#ifdef FT_USE_T1\n#define FT_USE_PSAUX\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif", "parent": null, "children": [28, 29, 30, 33, 36, 39], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 28, "type": "#ifdef", "text": "#ifdef", "parent": 27, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 6}}, {"id": 29, "type": "identifier", "text": "FT_USE_T1", "parent": 27, "children": [], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 16}}, {"id": 30, "type": "preproc_def", "text": "#define FT_USE_PSAUX\n", "parent": 27, "children": [31, 32], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 31, "type": "#define", "text": "#define", "parent": 30, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 32, "type": "identifier", "text": "FT_USE_PSAUX", "parent": 30, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 20}}, {"id": 33, "type": "preproc_def", "text": "#define FT_USE_PSHINT\n", "parent": 27, "children": [34, 35], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 34, "type": "#define", "text": "#define", "parent": 33, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 35, "type": "identifier", "text": "FT_USE_PSHINT", "parent": 33, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 21}}, {"id": 36, "type": "preproc_def", "text": "#define FT_USE_PSNAMES\n", "parent": 27, "children": [37, 38], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 7}}, {"id": 38, "type": "identifier", "text": "FT_USE_PSNAMES", "parent": 36, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 22}}, {"id": 39, "type": "#endif", "text": "#endif", "parent": 27, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 40, "type": "preproc_ifdef", "text": "#ifdef FT_USE_T1CID\n#define FT_USE_PSAUX\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif", "parent": null, "children": [41, 42, 43, 46, 49, 52], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 41, "type": "#ifdef", "text": "#ifdef", "parent": 40, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 6}}, {"id": 42, "type": "identifier", "text": "FT_USE_T1CID", "parent": 40, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 19}}, {"id": 43, "type": "preproc_def", "text": "#define FT_USE_PSAUX\n", "parent": 40, "children": [44, 45], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 44, "type": "#define", "text": "#define", "parent": 43, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 45, "type": "identifier", "text": "FT_USE_PSAUX", "parent": 43, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 20}}, {"id": 46, "type": "preproc_def", "text": "#define FT_USE_PSHINT\n", "parent": 40, "children": [47, 48], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 47, "type": "#define", "text": "#define", "parent": 46, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 48, "type": "identifier", "text": "FT_USE_PSHINT", "parent": 46, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 21}}, {"id": 49, "type": "preproc_def", "text": "#define FT_USE_PSNAMES\n", "parent": 40, "children": [50, 51], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 0}}, {"id": 50, "type": "#define", "text": "#define", "parent": 49, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 7}}, {"id": 51, "type": "identifier", "text": "FT_USE_PSNAMES", "parent": 49, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 22}}, {"id": 52, "type": "#endif", "text": "#endif", "parent": 40, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 53, "type": "preproc_ifdef", "text": "#ifdef FT_USE_PSAUX\n#define FT_USE_PSNAMES\n#endif", "parent": null, "children": [54, 55, 56, 59], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 54, "type": "#ifdef", "text": "#ifdef", "parent": 53, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 6}}, {"id": 55, "type": "identifier", "text": "FT_USE_PSAUX", "parent": 53, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 19}}, {"id": 56, "type": "preproc_def", "text": "#define FT_USE_PSNAMES\n", "parent": 53, "children": [57, 58], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 50, "column": 0}}, {"id": 57, "type": "#define", "text": "#define", "parent": 56, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 7}}, {"id": 58, "type": "identifier", "text": "FT_USE_PSNAMES", "parent": 56, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 22}}, {"id": 59, "type": "#endif", "text": "#endif", "parent": 53, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 60, "type": "preproc_ifdef", "text": "#ifdef FT_USE_SFNT\n#define FT_USE_PSNAMES\n#endif", "parent": null, "children": [61, 62, 63, 66], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 54, "column": 6}}, {"id": 61, "type": "#ifdef", "text": "#ifdef", "parent": 60, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 62, "type": "identifier", "text": "FT_USE_SFNT", "parent": 60, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 18}}, {"id": 63, "type": "preproc_def", "text": "#define FT_USE_PSNAMES\n", "parent": 60, "children": [64, 65], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 54, "column": 0}}, {"id": 64, "type": "#define", "text": "#define", "parent": 63, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 7}}, {"id": 65, "type": "identifier", "text": "FT_USE_PSNAMES", "parent": 63, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 22}}, {"id": 66, "type": "#endif", "text": "#endif", "parent": 60, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 6}}, {"id": 67, "type": "preproc_ifdef", "text": "#ifdef FT_USE_AUTOHINT\nFT_USE_MODULE(autohint_module_class)\n#endif", "parent": null, "children": [68, 69, 70, 74], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 68, "type": "#ifdef", "text": "#ifdef", "parent": 67, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 6}}, {"id": 69, "type": "identifier", "text": "FT_USE_AUTOHINT", "parent": 67, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 22}}, {"id": 70, "type": "macro_type_specifier", "text": "FT_USE_MODULE(autohint_module_class)", "parent": 67, "children": [71, 72], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 36}}, {"id": 71, "type": "identifier", "text": "FT_USE_MODULE", "parent": 70, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 13}}, {"id": 72, "type": "type_descriptor", "text": "autohint_module_class", "parent": 70, "children": [73], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 35}}, {"id": 73, "type": "type_identifier", "text": "autohint_module_class", "parent": 72, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 35}}, {"id": 74, "type": "#endif", "text": "#endif", "parent": 67, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 75, "type": "preproc_ifdef", "text": "#ifdef FT_USE_PSHINT\nFT_USE_MODULE(pshinter_module_class)\n#endif", "parent": null, "children": [76, 77, 78, 82], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 64, "column": 6}}, {"id": 76, "type": "#ifdef", "text": "#ifdef", "parent": 75, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 6}}, {"id": 77, "type": "identifier", "text": "FT_USE_PSHINT", "parent": 75, "children": [], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 20}}, {"id": 78, "type": "macro_type_specifier", "text": "FT_USE_MODULE(pshinter_module_class)", "parent": 75, "children": [79, 80], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 36}}, {"id": 79, "type": "identifier", "text": "FT_USE_MODULE", "parent": 78, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 13}}, {"id": 80, "type": "type_descriptor", "text": "pshinter_module_class", "parent": 78, "children": [81], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 35}}, {"id": 81, "type": "type_identifier", "text": "pshinter_module_class", "parent": 80, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 35}}, {"id": 82, "type": "#endif", "text": "#endif", "parent": 75, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 6}}, {"id": 83, "type": "preproc_ifdef", "text": "#ifdef FT_USE_CFF\nFT_USE_MODULE(cff_driver_class)\n#endif", "parent": null, "children": [84, 85, 86, 90], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 68, "column": 6}}, {"id": 84, "type": "#ifdef", "text": "#ifdef", "parent": 83, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 85, "type": "identifier", "text": "FT_USE_CFF", "parent": 83, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 17}}, {"id": 86, "type": "macro_type_specifier", "text": "FT_USE_MODULE(cff_driver_class)", "parent": 83, "children": [87, 88], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 31}}, {"id": 87, "type": "identifier", "text": "FT_USE_MODULE", "parent": 86, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 13}}, {"id": 88, "type": "type_descriptor", "text": "cff_driver_class", "parent": 86, "children": [89], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 30}}, {"id": 89, "type": "type_identifier", "text": "cff_driver_class", "parent": 88, "children": [], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 30}}, {"id": 90, "type": "#endif", "text": "#endif", "parent": 83, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 6}}, {"id": 91, "type": "preproc_ifdef", "text": "#ifdef FT_USE_T1CID\nFT_USE_MODULE(t1cid_driver_class)\n#endif", "parent": null, "children": [92, 93, 94, 98], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 72, "column": 6}}, {"id": 92, "type": "#ifdef", "text": "#ifdef", "parent": 91, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 6}}, {"id": 93, "type": "identifier", "text": "FT_USE_T1CID", "parent": 91, "children": [], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 19}}, {"id": 94, "type": "macro_type_specifier", "text": "FT_USE_MODULE(t1cid_driver_class)", "parent": 91, "children": [95, 96], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 33}}, {"id": 95, "type": "identifier", "text": "FT_USE_MODULE", "parent": 94, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 13}}, {"id": 96, "type": "type_descriptor", "text": "t1cid_driver_class", "parent": 94, "children": [97], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 32}}, {"id": 97, "type": "type_identifier", "text": "t1cid_driver_class", "parent": 96, "children": [], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 32}}, {"id": 98, "type": "#endif", "text": "#endif", "parent": 91, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 6}}, {"id": 99, "type": "preproc_ifdef", "text": "#ifdef FT_USE_BDF\nFT_USE_MODULE(bdf_driver_class)\n#endif", "parent": null, "children": [100, 101, 102, 106], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 76, "column": 6}}, {"id": 100, "type": "#ifdef", "text": "#ifdef", "parent": 99, "children": [], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 6}}, {"id": 101, "type": "identifier", "text": "FT_USE_BDF", "parent": 99, "children": [], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 17}}, {"id": 102, "type": "macro_type_specifier", "text": "FT_USE_MODULE(bdf_driver_class)", "parent": 99, "children": [103, 104], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 31}}, {"id": 103, "type": "identifier", "text": "FT_USE_MODULE", "parent": 102, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 13}}, {"id": 104, "type": "type_descriptor", "text": "bdf_driver_class", "parent": 102, "children": [105], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 30}}, {"id": 105, "type": "type_identifier", "text": "bdf_driver_class", "parent": 104, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 30}}, {"id": 106, "type": "#endif", "text": "#endif", "parent": 99, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 6}}, {"id": 107, "type": "preproc_ifdef", "text": "#ifdef FT_USE_PCF\nFT_USE_MODULE(pcf_driver_class)\n#endif", "parent": null, "children": [108, 109, 110, 114], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 108, "type": "#ifdef", "text": "#ifdef", "parent": 107, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 6}}, {"id": 109, "type": "identifier", "text": "FT_USE_PCF", "parent": 107, "children": [], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 17}}, {"id": 110, "type": "macro_type_specifier", "text": "FT_USE_MODULE(pcf_driver_class)", "parent": 107, "children": [111, 112], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 31}}, {"id": 111, "type": "identifier", "text": "FT_USE_MODULE", "parent": 110, "children": [], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 13}}, {"id": 112, "type": "type_descriptor", "text": "pcf_driver_class", "parent": 110, "children": [113], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 30}}, {"id": 113, "type": "type_identifier", "text": "pcf_driver_class", "parent": 112, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 30}}, {"id": 114, "type": "#endif", "text": "#endif", "parent": 107, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 6}}, {"id": 115, "type": "preproc_ifdef", "text": "#ifdef FT_USE_PFR\nFT_USE_MODULE(pfr_driver_class)\n#endif", "parent": null, "children": [116, 117, 118, 122], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 84, "column": 6}}, {"id": 116, "type": "#ifdef", "text": "#ifdef", "parent": 115, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 6}}, {"id": 117, "type": "identifier", "text": "FT_USE_PFR", "parent": 115, "children": [], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 82, "column": 17}}, {"id": 118, "type": "macro_type_specifier", "text": "FT_USE_MODULE(pfr_driver_class)", "parent": 115, "children": [119, 120], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 31}}, {"id": 119, "type": "identifier", "text": "FT_USE_MODULE", "parent": 118, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 13}}, {"id": 120, "type": "type_descriptor", "text": "pfr_driver_class", "parent": 118, "children": [121], "start_point": {"row": 83, "column": 14}, "end_point": {"row": 83, "column": 30}}, {"id": 121, "type": "type_identifier", "text": "pfr_driver_class", "parent": 120, "children": [], "start_point": {"row": 83, "column": 14}, "end_point": {"row": 83, "column": 30}}, {"id": 122, "type": "#endif", "text": "#endif", "parent": 115, "children": [], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 6}}, {"id": 123, "type": "preproc_ifdef", "text": "#ifdef FT_USE_PSAUX\nFT_USE_MODULE(psaux_module_class)\n#endif", "parent": null, "children": [124, 125, 126, 130], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 88, "column": 6}}, {"id": 124, "type": "#ifdef", "text": "#ifdef", "parent": 123, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 6}}, {"id": 125, "type": "identifier", "text": "FT_USE_PSAUX", "parent": 123, "children": [], "start_point": {"row": 86, "column": 7}, "end_point": {"row": 86, "column": 19}}, {"id": 126, "type": "macro_type_specifier", "text": "FT_USE_MODULE(psaux_module_class)", "parent": 123, "children": [127, 128], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 33}}, {"id": 127, "type": "identifier", "text": "FT_USE_MODULE", "parent": 126, "children": [], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 13}}, {"id": 128, "type": "type_descriptor", "text": "psaux_module_class", "parent": 126, "children": [129], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 32}}, {"id": 129, "type": "type_identifier", "text": "psaux_module_class", "parent": 128, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 32}}, {"id": 130, "type": "#endif", "text": "#endif", "parent": 123, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 6}}, {"id": 131, "type": "preproc_ifdef", "text": "#ifdef FT_USE_PSNAMES\nFT_USE_MODULE(psnames_module_class)\n#endif", "parent": null, "children": [132, 133, 134, 138], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 132, "type": "#ifdef", "text": "#ifdef", "parent": 131, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 6}}, {"id": 133, "type": "identifier", "text": "FT_USE_PSNAMES", "parent": 131, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 21}}, {"id": 134, "type": "macro_type_specifier", "text": "FT_USE_MODULE(psnames_module_class)", "parent": 131, "children": [135, 136], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 35}}, {"id": 135, "type": "identifier", "text": "FT_USE_MODULE", "parent": 134, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 13}}, {"id": 136, "type": "type_descriptor", "text": "psnames_module_class", "parent": 134, "children": [137], "start_point": {"row": 91, "column": 14}, "end_point": {"row": 91, "column": 34}}, {"id": 137, "type": "type_identifier", "text": "psnames_module_class", "parent": 136, "children": [], "start_point": {"row": 91, "column": 14}, "end_point": {"row": 91, "column": 34}}, {"id": 138, "type": "#endif", "text": "#endif", "parent": 131, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 139, "type": "preproc_ifdef", "text": "#ifdef FT_USE_RASTER\nFT_USE_MODULE(ft_raster1_renderer_class)\n#endif", "parent": null, "children": [140, 141, 142, 146], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 96, "column": 6}}, {"id": 140, "type": "#ifdef", "text": "#ifdef", "parent": 139, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 6}}, {"id": 141, "type": "identifier", "text": "FT_USE_RASTER", "parent": 139, "children": [], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 20}}, {"id": 142, "type": "macro_type_specifier", "text": "FT_USE_MODULE(ft_raster1_renderer_class)", "parent": 139, "children": [143, 144], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 40}}, {"id": 143, "type": "identifier", "text": "FT_USE_MODULE", "parent": 142, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 13}}, {"id": 144, "type": "type_descriptor", "text": "ft_raster1_renderer_class", "parent": 142, "children": [145], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 39}}, {"id": 145, "type": "type_identifier", "text": "ft_raster1_renderer_class", "parent": 144, "children": [], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 39}}, {"id": 146, "type": "#endif", "text": "#endif", "parent": 139, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 6}}, {"id": 147, "type": "preproc_ifdef", "text": "#ifdef FT_USE_SFNT\nFT_USE_MODULE(sfnt_module_class)\n#endif", "parent": null, "children": [148, 149, 150, 154], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 100, "column": 6}}, {"id": 148, "type": "#ifdef", "text": "#ifdef", "parent": 147, "children": [], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 6}}, {"id": 149, "type": "identifier", "text": "FT_USE_SFNT", "parent": 147, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 18}}, {"id": 150, "type": "macro_type_specifier", "text": "FT_USE_MODULE(sfnt_module_class)", "parent": 147, "children": [151, 152], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 32}}, {"id": 151, "type": "identifier", "text": "FT_USE_MODULE", "parent": 150, "children": [], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 13}}, {"id": 152, "type": "type_descriptor", "text": "sfnt_module_class", "parent": 150, "children": [153], "start_point": {"row": 99, "column": 14}, "end_point": {"row": 99, "column": 31}}, {"id": 153, "type": "type_identifier", "text": "sfnt_module_class", "parent": 152, "children": [], "start_point": {"row": 99, "column": 14}, "end_point": {"row": 99, "column": 31}}, {"id": 154, "type": "#endif", "text": "#endif", "parent": 147, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 6}}, {"id": 155, "type": "preproc_ifdef", "text": "#ifdef FT_USE_SMOOTH\nFT_USE_MODULE(ft_smooth_renderer_class)\nFT_USE_MODULE(ft_smooth_lcd_renderer_class)\nFT_USE_MODULE(ft_smooth_lcdv_renderer_class)\n#endif", "parent": null, "children": [156, 157, 158, 171], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 106, "column": 6}}, {"id": 156, "type": "#ifdef", "text": "#ifdef", "parent": 155, "children": [], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 6}}, {"id": 157, "type": "identifier", "text": "FT_USE_SMOOTH", "parent": 155, "children": [], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 20}}, {"id": 158, "type": "ERROR", "text": "FT_USE_MODULE(ft_smooth_renderer_class)\nFT_USE_MODULE(ft_smooth_lcd_renderer_class)\nFT_USE_MODULE(ft_smooth_lcdv_renderer_class)", "parent": 155, "children": [159, 163, 167], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 105, "column": 44}}, {"id": 159, "type": "macro_type_specifier", "text": "FT_USE_MODULE(ft_smooth_renderer_class)", "parent": 158, "children": [160, 161], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 39}}, {"id": 160, "type": "identifier", "text": "FT_USE_MODULE", "parent": 159, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 13}}, {"id": 161, "type": "type_descriptor", "text": "ft_smooth_renderer_class", "parent": 159, "children": [162], "start_point": {"row": 103, "column": 14}, "end_point": {"row": 103, "column": 38}}, {"id": 162, "type": "type_identifier", "text": "ft_smooth_renderer_class", "parent": 161, "children": [], "start_point": {"row": 103, "column": 14}, "end_point": {"row": 103, "column": 38}}, {"id": 163, "type": "function_declarator", "text": "FT_USE_MODULE(ft_smooth_lcd_renderer_class)", "parent": 158, "children": [164, 165], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 43}}, {"id": 164, "type": "identifier", "text": "FT_USE_MODULE", "parent": 163, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 13}}, {"id": 165, "type": "parameter_list", "text": "(ft_smooth_lcd_renderer_class)", "parent": 163, "children": [166], "start_point": {"row": 104, "column": 13}, "end_point": {"row": 104, "column": 43}}, {"id": 166, "type": "identifier", "text": "ft_smooth_lcd_renderer_class", "parent": 165, "children": [], "start_point": {"row": 104, "column": 14}, "end_point": {"row": 104, "column": 42}}, {"id": 167, "type": "macro_type_specifier", "text": "FT_USE_MODULE(ft_smooth_lcdv_renderer_class)", "parent": 158, "children": [168, 169], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 44}}, {"id": 168, "type": "identifier", "text": "FT_USE_MODULE", "parent": 167, "children": [], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 13}}, {"id": 169, "type": "type_descriptor", "text": "ft_smooth_lcdv_renderer_class", "parent": 167, "children": [170], "start_point": {"row": 105, "column": 14}, "end_point": {"row": 105, "column": 43}}, {"id": 170, "type": "type_identifier", "text": "ft_smooth_lcdv_renderer_class", "parent": 169, "children": [], "start_point": {"row": 105, "column": 14}, "end_point": {"row": 105, "column": 43}}, {"id": 171, "type": "#endif", "text": "#endif", "parent": 155, "children": [], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 6}}, {"id": 172, "type": "preproc_ifdef", "text": "#ifdef FT_USE_TT\nFT_USE_MODULE(tt_driver_class)\n#endif", "parent": null, "children": [173, 174, 175, 179], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 110, "column": 6}}, {"id": 173, "type": "#ifdef", "text": "#ifdef", "parent": 172, "children": [], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 6}}, {"id": 174, "type": "identifier", "text": "FT_USE_TT", "parent": 172, "children": [], "start_point": {"row": 108, "column": 7}, "end_point": {"row": 108, "column": 16}}, {"id": 175, "type": "macro_type_specifier", "text": "FT_USE_MODULE(tt_driver_class)", "parent": 172, "children": [176, 177], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 30}}, {"id": 176, "type": "identifier", "text": "FT_USE_MODULE", "parent": 175, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 13}}, {"id": 177, "type": "type_descriptor", "text": "tt_driver_class", "parent": 175, "children": [178], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 29}}, {"id": 178, "type": "type_identifier", "text": "tt_driver_class", "parent": 177, "children": [], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 29}}, {"id": 179, "type": "#endif", "text": "#endif", "parent": 172, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 6}}, {"id": 180, "type": "preproc_ifdef", "text": "#ifdef FT_USE_T1\nFT_USE_MODULE(t1_driver_class)\n#endif", "parent": null, "children": [181, 182, 183, 187], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 114, "column": 6}}, {"id": 181, "type": "#ifdef", "text": "#ifdef", "parent": 180, "children": [], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 112, "column": 6}}, {"id": 182, "type": "identifier", "text": "FT_USE_T1", "parent": 180, "children": [], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 16}}, {"id": 183, "type": "macro_type_specifier", "text": "FT_USE_MODULE(t1_driver_class)", "parent": 180, "children": [184, 185], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 30}}, {"id": 184, "type": "identifier", "text": "FT_USE_MODULE", "parent": 183, "children": [], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 13}}, {"id": 185, "type": "type_descriptor", "text": "t1_driver_class", "parent": 183, "children": [186], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 29}}, {"id": 186, "type": "type_identifier", "text": "t1_driver_class", "parent": 185, "children": [], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 29}}, {"id": 187, "type": "#endif", "text": "#endif", "parent": 180, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 6}}, {"id": 188, "type": "preproc_ifdef", "text": "#ifdef FT_USE_T42\nFT_USE_MODULE(t42_driver_class)\n#endif", "parent": null, "children": [189, 190, 191, 195], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 118, "column": 6}}, {"id": 189, "type": "#ifdef", "text": "#ifdef", "parent": 188, "children": [], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 6}}, {"id": 190, "type": "identifier", "text": "FT_USE_T42", "parent": 188, "children": [], "start_point": {"row": 116, "column": 7}, "end_point": {"row": 116, "column": 17}}, {"id": 191, "type": "macro_type_specifier", "text": "FT_USE_MODULE(t42_driver_class)", "parent": 188, "children": [192, 193], "start_point": {"row": 117, "column": 0}, "end_point": {"row": 117, "column": 31}}, {"id": 192, "type": "identifier", "text": "FT_USE_MODULE", "parent": 191, "children": [], "start_point": {"row": 117, "column": 0}, "end_point": {"row": 117, "column": 13}}, {"id": 193, "type": "type_descriptor", "text": "t42_driver_class", "parent": 191, "children": [194], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 30}}, {"id": 194, "type": "type_identifier", "text": "t42_driver_class", "parent": 193, "children": [], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 30}}, {"id": 195, "type": "#endif", "text": "#endif", "parent": 188, "children": [], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 118, "column": 6}}, {"id": 196, "type": "preproc_ifdef", "text": "#ifdef FT_USE_WINFNT\nFT_USE_MODULE(winfnt_driver_class)\n#endif", "parent": null, "children": [197, 198, 199, 203], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 122, "column": 6}}, {"id": 197, "type": "#ifdef", "text": "#ifdef", "parent": 196, "children": [], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 120, "column": 6}}, {"id": 198, "type": "identifier", "text": "FT_USE_WINFNT", "parent": 196, "children": [], "start_point": {"row": 120, "column": 7}, "end_point": {"row": 120, "column": 20}}, {"id": 199, "type": "macro_type_specifier", "text": "FT_USE_MODULE(winfnt_driver_class)", "parent": 196, "children": [200, 201], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 34}}, {"id": 200, "type": "identifier", "text": "FT_USE_MODULE", "parent": 199, "children": [], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 13}}, {"id": 201, "type": "type_descriptor", "text": "winfnt_driver_class", "parent": 199, "children": [202], "start_point": {"row": 121, "column": 14}, "end_point": {"row": 121, "column": 33}}, {"id": 202, "type": "type_identifier", "text": "winfnt_driver_class", "parent": 201, "children": [], "start_point": {"row": 121, "column": 14}, "end_point": {"row": 121, "column": 33}}, {"id": 203, "type": "#endif", "text": "#endif", "parent": 196, "children": [], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 122, "column": 6}}]}, "node_categories": {"declarations": {"functions": [163], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 19, 22, 25, 26, 27, 28, 29, 32, 35, 38, 39, 40, 41, 42, 45, 48, 51, 52, 53, 54, 55, 58, 59, 60, 61, 62, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 100, 101, 102, 103, 105, 106, 107, 108, 109, 110, 111, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 127, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141, 142, 143, 145, 146, 147, 148, 149, 150, 151, 153, 154, 155, 156, 157, 159, 160, 162, 164, 166, 167, 168, 170, 171, 172, 173, 174, 175, 176, 178, 179, 180, 181, 182, 183, 184, 186, 187, 188, 189, 190, 191, 192, 194, 195, 196, 197, 198, 199, 200, 202, 203], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 163, "universal_type": "function", "name": "unknown", "text_snippet": "FT_USE_MODULE(ft_smooth_lcd_renderer_class)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "// TetiSoft: To specify which modules you need,\n// insert the following in your source file and uncomment as needed:\n\n/*\n//#define FT_USE_AUTOHINT // autohinter\n//#define FT_USE_RASTER // monochrome rasterizer\n//#define FT_USE_SMOOTH // anti-aliasing rasterizer\n//#define FT_USE_TT // truetype font driver\n//#define FT_USE_T1 // type1 font driver\n//#define FT_USE_T42 // type42 font driver\n//#define FT_USE_T1CID // cid-keyed type1 font driver // no cmap support\n//#define FT_USE_CFF // opentype font driver\n//#define FT_USE_BDF // bdf bitmap font driver\n//#define FT_USE_PCF // pcf bitmap font driver\n//#define FT_USE_PFR // pfr font driver\n//#define FT_USE_WINFNT // windows .fnt|.fon bitmap font driver\n#include \"FT:src/base/ftinit.c\"\n*/\n\n// TetiSoft: make sure that needed support modules are built in.\n// Dependencies can be found by searching for FT_Get_Module.\n\n#ifdef FT_USE_T42\n#define FT_USE_TT\n#endif\n\n#ifdef FT_USE_TT\n#define FT_USE_SFNT\n#endif\n\n#ifdef FT_USE_CFF\n#define FT_USE_SFNT\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif\n\n#ifdef FT_USE_T1\n#define FT_USE_PSAUX\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif\n\n#ifdef FT_USE_T1CID\n#define FT_USE_PSAUX\n#define FT_USE_PSHINT\n#define FT_USE_PSNAMES\n#endif\n\n#ifdef FT_USE_PSAUX\n#define FT_USE_PSNAMES\n#endif\n\n#ifdef FT_USE_SFNT\n#define FT_USE_PSNAMES\n#endif\n\n// TetiSoft: Now include the modules\n\n#ifdef FT_USE_AUTOHINT\nFT_USE_MODULE(autohint_module_class)\n#endif\n\n#ifdef FT_USE_PSHINT\nFT_USE_MODULE(pshinter_module_class)\n#endif\n\n#ifdef FT_USE_CFF\nFT_USE_MODULE(cff_driver_class)\n#endif\n\n#ifdef FT_USE_T1CID\nFT_USE_MODULE(t1cid_driver_class)\n#endif\n\n#ifdef FT_USE_BDF\nFT_USE_MODULE(bdf_driver_class)\n#endif\n\n#ifdef FT_USE_PCF\nFT_USE_MODULE(pcf_driver_class)\n#endif\n\n#ifdef FT_USE_PFR\nFT_USE_MODULE(pfr_driver_class)\n#endif\n\n#ifdef FT_USE_PSAUX\nFT_USE_MODULE(psaux_module_class)\n#endif\n\n#ifdef FT_USE_PSNAMES\nFT_USE_MODULE(psnames_module_class)\n#endif\n\n#ifdef FT_USE_RASTER\nFT_USE_MODULE(ft_raster1_renderer_class)\n#endif\n\n#ifdef FT_USE_SFNT\nFT_USE_MODULE(sfnt_module_class)\n#endif\n\n#ifdef FT_USE_SMOOTH\nFT_USE_MODULE(ft_smooth_renderer_class)\nFT_USE_MODULE(ft_smooth_lcd_renderer_class)\nFT_USE_MODULE(ft_smooth_lcdv_renderer_class)\n#endif\n\n#ifdef FT_USE_TT\nFT_USE_MODULE(tt_driver_class)\n#endif\n\n#ifdef FT_USE_T1\nFT_USE_MODULE(t1_driver_class)\n#endif\n\n#ifdef FT_USE_T42\nFT_USE_MODULE(t42_driver_class)\n#endif\n\n#ifdef FT_USE_WINFNT\nFT_USE_MODULE(winfnt_driver_class)\n#endif\n"}
80,930
c
// // THGuideViewController.h // THMobileLibrary // // Created by 天海网络 on 2017/6/7. // Copyright © 2017年 C-bin. All rights reserved. // #import <UIKit/UIKit.h> #import "THRootViewController.h" @interface THGuideViewController : THRootViewController @property (copy, nonatomic) NSString *SchoolIntro; //本馆简介 @property (copy, nonatomic) NSString *SchoolName; @property (copy, nonatomic) NSString *SchoolRule; //读者须知 @property (copy, nonatomic) NSString *WorkTime; //开馆时间 @property (copy, nonatomic) NSString *BorrowCard; //办证指南 @property (nonatomic, strong) THProgressHUD* progressHUD; @end
34.12
17
(translation_unit) "//\n// THGuideViewController.h\n// THMobileLibrary\n//\n// Created by 天海网络 on 2017/6/7.\n// Copyright © 2017年 C-bin. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import "THRootViewController.h"\n\n@interface THGuideViewController : THRootViewController\n@property (copy, nonatomic) NSString *SchoolIntro; //本馆简介\n@property (copy, nonatomic) NSString *SchoolName;\n@property (copy, nonatomic) NSString *SchoolRule; //读者须知\n@property (copy, nonatomic) NSString *WorkTime; //开馆时间\n@property (copy, nonatomic) NSString *BorrowCard; //办证指南\n@property (nonatomic, strong) THProgressHUD* progressHUD;\n@end\n" (comment) "//" (comment) "// THGuideViewController.h" (comment) "// THMobileLibrary" (comment) "//" (comment) "// Created by 天海网络 on 2017/6/7.\n// Cop" (comment) "right © 2017年 C-bin. All rights reserved.\n//\n\n#impor" (comment) " <" (preproc_call) "Kit/UIKit.h>\n#import "TH" (preproc_directive) "Kit/UIK" (preproc_arg) "t.h>\n#import "T" (preproc_call) "RootViewController.h"\n\n@interface" (preproc_directive) "RootVie" (preproc_arg) "Controller.h"\n\n@interfac" (ERROR) "THGuideViewController : THRootViewController\n@property (copy, nonatomic) NSString *SchoolIntro; //本馆简介\n@property (copy, nonatomic) NSString *SchoolName;\n@property (copy, nonatomic) NSString *SchoolRule; //读者须知\n@property (copy, nonatomic) NSString *WorkTime; //开馆时间\n@property (copy, nonatomic) NSString *BorrowCard; //办证指南\n@property (nonatomic, strong) THProgressHUD* progressHUD;\n@end\n" (ERROR) "T" (type_identifier) "HGuideVie" (function_declarator) "Controller : THRootViewController\n@property (copy, nonatomic) NSString *" (identifier) "Controller : THRootVi" (ERROR) "wController\n@property (copy, non" (:) "w" (identifier) "ontroller\n@property " (ERROR) "c" (identifier) "opy, non" (parameter_list) "tomic) NSString *" (() "t" (identifier) "omic" (,) ")" (identifier) "NSString " ()) "*" (declaration) "choolIntro; //本馆简介\n@p" (type_identifier) "choolInt" (pointer_declarator) "o; //本馆简介\n@" (*) "o" (identifier) "; //本馆简介\n@" (;) "p" (comment) "perty (copy, n" (ERROR) "n" (ERROR) "n" (declaration) "atomic) NSString *SchoolName;\n@property (copy, n" (macro_type_specifier) "atomic) NSString *SchoolNa" (identifier) "atomic) " (() "S" (ERROR) "Strin" (type_descriptor) "Stri" (type_identifier) "Stri" (,) "n" (type_descriptor) " *SchoolN" (type_identifier) " *SchoolN" ()) "a" (ERROR) "e;\n@prop" (identifier) "e;\n@prop" (pointer_declarator) "rty (copy, " (*) "r" (identifier) "ty (copy, " (;) "n" (ERROR) "n" (ERROR) "n" (declaration) "atomic) NSString *SchoolRule; //读者须知\n@property (" (macro_type_specifier) "atomic) NSString *SchoolRu" (identifier) "atomic) " (() "S" (ERROR) "Strin" (type_descriptor) "Stri" (type_identifier) "Stri" (,) "n" (type_descriptor) " *SchoolR" (type_identifier) " *SchoolR" ()) "u" (ERROR) "e; //读者须" (identifier) "e; //读者须" (pointer_declarator) "\n@property " (*) "\n" (identifier) "@property " (;) "(" (comment) "opy, nonatomic" (ERROR) " " (ERROR) " " (declaration) "NSString *WorkTime; //开馆时间\n@property (copy, n" (macro_type_specifier) "NSString *WorkTime; //开馆时" (identifier) "NSString" (() "*" (ERROR) "WorkT" (type_descriptor) "Work" (type_identifier) "Work" (,) "T" (type_descriptor) "me; //开馆" (type_identifier) "me; //开馆" ()) "时" (ERROR) "\n@proper" (identifier) "\n@proper" (pointer_declarator) "y (copy, " (*) "y" (identifier) " (copy, " (;) "n" (comment) "atomic) NSStri" (ERROR) "g" (ERROR) "g" (declaration) " *BorrowCard; //办证指南\n@property (nonatomic, stro" (macro_type_specifier) " *BorrowCard; //办证指南\n@pro" (identifier) " *Borrow" (() "a" (ERROR) "rd; " (type_descriptor) "rd; " (type_identifier) "rd; " (,) " " (type_descriptor) "/办证指南\n@pr" (type_identifier) "/办证指南\n@pr" ()) "o" (ERROR) "erty (no" (identifier) "erty (no" (pointer_declarator) "atomic, str" (*) "a" (identifier) "tomic, str" (;) "o" (comment) ") THProgressHU" (ERROR) "*" (ERROR) "*" (declaration) " progressHUD;\n@end\n" (macro_type_specifier) " progressHUD;\n@end\n" (identifier) " progres" (() "H" (type_descriptor) "UD;\n@end\n" (type_identifier) "UD;\n@end\n" (ERROR) "" (,) "" (identifier) "" ()) "" (ERROR) "" (identifier) "" (pointer_declarator) "" (*) "" (identifier) "" (;) "" (ERROR) "" (ERROR) "" (identifier) ""
137
26
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 34.12, "nodes": 100, "errors": 0, "source_hash": "819bb4d0262f49051161d8b9c3253478da3689bacbe8c2f7bd59c219ab86e450", "categorized_nodes": 48}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "Kit/UIKit.h>\n#import \"TH", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "Kit/UIK", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "t.h>\n#import \"T", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "preproc_call", "text": "RootViewController.h\"\n\n@interface", "parent": null, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "RootVie", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "Controller.h\"\n\n@interfac", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 32}}, {"id": 6, "type": "ERROR", "text": "THGuideViewController : THRootViewController\n@property (copy, nonatomic) NSString *SchoolIntro; //\u672c\u9986\u7b80\u4ecb\n@property (copy, nonatomic) NSString *SchoolName;\n@property (copy, nonatomic) NSString *SchoolRule; //\u8bfb\u8005\u987b\u77e5\n@property (copy, nonatomic) NSString *WorkTime; //\u5f00\u9986\u65f6\u95f4\n@property (copy, nonatomic) NSString *BorrowCard; //\u529e\u8bc1\u6307\u5357\n@property (nonatomic, strong) THProgressHUD* progressHUD;\n@end\n", "parent": null, "children": [7, 8, 9, 18, 23, 25, 38, 40, 53, 55, 68, 70, 83, 85, 97, 99], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 7, "type": "ERROR", "text": "T", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 8, "type": "type_identifier", "text": "HGuideVie", "parent": 6, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 9, "type": "function_declarator", "text": "Controller : THRootViewController\n@property (copy, nonatomic) NSString *", "parent": 6, "children": [10, 11, 15], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 12, "column": 27}}, {"id": 10, "type": "identifier", "text": "Controller : THRootVi", "parent": 9, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 32}}, {"id": 11, "type": "ERROR", "text": "wController\n@property (copy, non", "parent": 9, "children": [12, 13, 14], "start_point": {"row": 11, "column": 33}, "end_point": {"row": 12, "column": 9}}, {"id": 12, "type": "identifier", "text": "ontroller\n@property ", "parent": 11, "children": [], "start_point": {"row": 11, "column": 35}, "end_point": {"row": 11, "column": 55}}, {"id": 13, "type": "ERROR", "text": "c", "parent": 11, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 14, "type": "identifier", "text": "opy, non", "parent": 11, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 15, "type": "parameter_list", "text": "tomic) NSString *", "parent": 9, "children": [16, 17], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 27}}, {"id": 16, "type": "identifier", "text": "omic", "parent": 15, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 15}}, {"id": 17, "type": "identifier", "text": "NSString ", "parent": 15, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 26}}, {"id": 18, "type": "declaration", "text": "choolIntro; //\u672c\u9986\u7b80\u4ecb\n@p", "parent": 6, "children": [19, 20], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 50}}, {"id": 19, "type": "type_identifier", "text": "choolInt", "parent": 18, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 36}}, {"id": 20, "type": "pointer_declarator", "text": "o; //\u672c\u9986\u7b80\u4ecb\n@", "parent": 18, "children": [21, 22], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 49}}, {"id": 21, "type": "*", "text": "o", "parent": 20, "children": [], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 38}}, {"id": 22, "type": "identifier", "text": "; //\u672c\u9986\u7b80\u4ecb\n@", "parent": 20, "children": [], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 12, "column": 49}}, {"id": 23, "type": "ERROR", "text": "n", "parent": 6, "children": [24], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 24, "type": "ERROR", "text": "n", "parent": 23, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 25, "type": "declaration", "text": "atomic) NSString *SchoolName;\n@property (copy, n", "parent": 6, "children": [26, 33, 35], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 49}}, {"id": 26, "type": "macro_type_specifier", "text": "atomic) NSString *SchoolNa", "parent": 25, "children": [27, 28, 31], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 27}}, {"id": 27, "type": "identifier", "text": "atomic) ", "parent": 26, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 28, "type": "ERROR", "text": "Strin", "parent": 26, "children": [29], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 16}}, {"id": 29, "type": "type_descriptor", "text": "Stri", "parent": 28, "children": [30], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 15}}, {"id": 30, "type": "type_identifier", "text": "Stri", "parent": 29, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 15}}, {"id": 31, "type": "type_descriptor", "text": " *SchoolN", "parent": 26, "children": [32], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 26}}, {"id": 32, "type": "type_identifier", "text": " *SchoolN", "parent": 31, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 26}}, {"id": 33, "type": "ERROR", "text": "e;\n@prop", "parent": 25, "children": [34], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 36}}, {"id": 34, "type": "identifier", "text": "e;\n@prop", "parent": 33, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 36}}, {"id": 35, "type": "pointer_declarator", "text": "rty (copy, ", "parent": 25, "children": [36, 37], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 48}}, {"id": 36, "type": "*", "text": "r", "parent": 35, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 38}}, {"id": 37, "type": "identifier", "text": "ty (copy, ", "parent": 35, "children": [], "start_point": {"row": 13, "column": 38}, "end_point": {"row": 13, "column": 48}}, {"id": 38, "type": "ERROR", "text": "n", "parent": 6, "children": [39], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 39, "type": "ERROR", "text": "n", "parent": 38, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 40, "type": "declaration", "text": "atomic) NSString *SchoolRule; //\u8bfb\u8005\u987b\u77e5\n@property (", "parent": 6, "children": [41, 48, 50], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 49}}, {"id": 41, "type": "macro_type_specifier", "text": "atomic) NSString *SchoolRu", "parent": 40, "children": [42, 43, 46], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 27}}, {"id": 42, "type": "identifier", "text": "atomic) ", "parent": 41, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 43, "type": "ERROR", "text": "Strin", "parent": 41, "children": [44], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 16}}, {"id": 44, "type": "type_descriptor", "text": "Stri", "parent": 43, "children": [45], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 15}}, {"id": 45, "type": "type_identifier", "text": "Stri", "parent": 44, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 15}}, {"id": 46, "type": "type_descriptor", "text": " *SchoolR", "parent": 41, "children": [47], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 26}}, {"id": 47, "type": "type_identifier", "text": " *SchoolR", "parent": 46, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 26}}, {"id": 48, "type": "ERROR", "text": "e; //\u8bfb\u8005\u987b", "parent": 40, "children": [49], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 36}}, {"id": 49, "type": "identifier", "text": "e; //\u8bfb\u8005\u987b", "parent": 48, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 36}}, {"id": 50, "type": "pointer_declarator", "text": "\n@property ", "parent": 40, "children": [51, 52], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 48}}, {"id": 51, "type": "*", "text": "\n", "parent": 50, "children": [], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 38}}, {"id": 52, "type": "identifier", "text": "@property ", "parent": 50, "children": [], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 48}}, {"id": 53, "type": "ERROR", "text": " ", "parent": 6, "children": [54], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 54, "type": "ERROR", "text": " ", "parent": 53, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 55, "type": "declaration", "text": "NSString *WorkTime; //\u5f00\u9986\u65f6\u95f4\n@property (copy, n", "parent": 6, "children": [56, 63, 65], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 47}}, {"id": 56, "type": "macro_type_specifier", "text": "NSString *WorkTime; //\u5f00\u9986\u65f6", "parent": 55, "children": [57, 58, 61], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 27}}, {"id": 57, "type": "identifier", "text": "NSString", "parent": 56, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 58, "type": "ERROR", "text": "WorkT", "parent": 56, "children": [59], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 16}}, {"id": 59, "type": "type_descriptor", "text": "Work", "parent": 58, "children": [60], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 15}}, {"id": 60, "type": "type_identifier", "text": "Work", "parent": 59, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 15}}, {"id": 61, "type": "type_descriptor", "text": "me; //\u5f00\u9986", "parent": 56, "children": [62], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 26}}, {"id": 62, "type": "type_identifier", "text": "me; //\u5f00\u9986", "parent": 61, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 26}}, {"id": 63, "type": "ERROR", "text": "\n@proper", "parent": 55, "children": [64], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 36}}, {"id": 64, "type": "identifier", "text": "\n@proper", "parent": 63, "children": [], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 36}}, {"id": 65, "type": "pointer_declarator", "text": "y (copy, ", "parent": 55, "children": [66, 67], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 46}}, {"id": 66, "type": "*", "text": "y", "parent": 65, "children": [], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 38}}, {"id": 67, "type": "identifier", "text": " (copy, ", "parent": 65, "children": [], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 46}}, {"id": 68, "type": "ERROR", "text": "g", "parent": 6, "children": [69], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 69, "type": "ERROR", "text": "g", "parent": 68, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 70, "type": "declaration", "text": " *BorrowCard; //\u529e\u8bc1\u6307\u5357\n@property (nonatomic, stro", "parent": 6, "children": [71, 78, 80], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 49}}, {"id": 71, "type": "macro_type_specifier", "text": " *BorrowCard; //\u529e\u8bc1\u6307\u5357\n@pro", "parent": 70, "children": [72, 73, 76], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 27}}, {"id": 72, "type": "identifier", "text": " *Borrow", "parent": 71, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 9}}, {"id": 73, "type": "ERROR", "text": "rd; ", "parent": 71, "children": [74], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 16}}, {"id": 74, "type": "type_descriptor", "text": "rd; ", "parent": 73, "children": [75], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 15}}, {"id": 75, "type": "type_identifier", "text": "rd; ", "parent": 74, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 15}}, {"id": 76, "type": "type_descriptor", "text": "/\u529e\u8bc1\u6307\u5357\n@pr", "parent": 71, "children": [77], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 26}}, {"id": 77, "type": "type_identifier", "text": "/\u529e\u8bc1\u6307\u5357\n@pr", "parent": 76, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 26}}, {"id": 78, "type": "ERROR", "text": "erty (no", "parent": 70, "children": [79], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 36}}, {"id": 79, "type": "identifier", "text": "erty (no", "parent": 78, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 36}}, {"id": 80, "type": "pointer_declarator", "text": "atomic, str", "parent": 70, "children": [81, 82], "start_point": {"row": 16, "column": 37}, "end_point": {"row": 16, "column": 48}}, {"id": 81, "type": "*", "text": "a", "parent": 80, "children": [], "start_point": {"row": 16, "column": 37}, "end_point": {"row": 16, "column": 38}}, {"id": 82, "type": "identifier", "text": "tomic, str", "parent": 80, "children": [], "start_point": {"row": 16, "column": 38}, "end_point": {"row": 16, "column": 48}}, {"id": 83, "type": "ERROR", "text": "*", "parent": 6, "children": [84], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 84, "type": "ERROR", "text": "*", "parent": 83, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 85, "type": "declaration", "text": " progressHUD;\n@end\n", "parent": 6, "children": [86, 92, 94], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 57}}, {"id": 86, "type": "macro_type_specifier", "text": " progressHUD;\n@end\n", "parent": 85, "children": [87, 88, 90], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 29}}, {"id": 87, "type": "identifier", "text": " progres", "parent": 86, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 88, "type": "type_descriptor", "text": "UD;\n@end\n", "parent": 86, "children": [89], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 89, "type": "type_identifier", "text": "UD;\n@end\n", "parent": 88, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 90, "type": "ERROR", "text": "", "parent": 86, "children": [91], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 28}}, {"id": 91, "type": "identifier", "text": "", "parent": 90, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 28}}, {"id": 92, "type": "ERROR", "text": "", "parent": 85, "children": [93], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 43}}, {"id": 93, "type": "identifier", "text": "", "parent": 92, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 43}}, {"id": 94, "type": "pointer_declarator", "text": "", "parent": 85, "children": [95, 96], "start_point": {"row": 17, "column": 43}, "end_point": {"row": 17, "column": 56}}, {"id": 95, "type": "*", "text": "", "parent": 94, "children": [], "start_point": {"row": 17, "column": 43}, "end_point": {"row": 17, "column": 44}}, {"id": 96, "type": "identifier", "text": "", "parent": 94, "children": [], "start_point": {"row": 17, "column": 45}, "end_point": {"row": 17, "column": 56}}, {"id": 97, "type": "ERROR", "text": "", "parent": 6, "children": [98], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 98, "type": "ERROR", "text": "", "parent": 97, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 99, "type": "identifier", "text": "", "parent": 6, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 4}}]}, "node_categories": {"declarations": {"functions": [9], "variables": [18, 25, 40, 55, 70, 85], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [8, 10, 12, 14, 16, 17, 19, 22, 26, 27, 30, 32, 34, 37, 41, 42, 45, 47, 49, 52, 56, 57, 60, 62, 64, 67, 71, 72, 75, 77, 79, 82, 86, 87, 89, 91, 93, 96, 99], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "Controller : THRootViewController\n@property (copy, nonatomic) NSString *"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// THGuideViewController.h\n// THMobileLibrary\n//\n// Created by \u5929\u6d77\u7f51\u7edc on 2017/6/7.\n// Copyright \u00a9 2017\u5e74 C-bin. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import \"THRootViewController.h\"\n\n@interface THGuideViewController : THRootViewController\n@property (copy, nonatomic) NSString *SchoolIntro; //\u672c\u9986\u7b80\u4ecb\n@property (copy, nonatomic) NSString *SchoolName;\n@property (copy, nonatomic) NSString *SchoolRule; //\u8bfb\u8005\u987b\u77e5\n@property (copy, nonatomic) NSString *WorkTime; //\u5f00\u9986\u65f6\u95f4\n@property (copy, nonatomic) NSString *BorrowCard; //\u529e\u8bc1\u6307\u5357\n@property (nonatomic, strong) THProgressHUD* progressHUD;\n@end\n"}
80,931
c
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved. #pragma once #include "GameFramework/GameModeBase.h" #include "BeatRacerGameMode.generated.h" UCLASS(minimalapi) class ABeatRacerGameMode : public AGameModeBase { GENERATED_BODY() public: ABeatRacerGameMode(); };
24.09
11
(translation_unit) "// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.\n#pragma once\n#include "GameFramework/GameModeBase.h"\n#include "BeatRacerGameMode.generated.h"\n\nUCLASS(minimalapi)\nclass ABeatRacerGameMode : public AGameModeBase\n{\n GENERATED_BODY()\n\npublic:\n ABeatRacerGameMode();\n};\n\n\n\n" (comment) "// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved." (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "GameFramework/GameModeBase.h"\n" (#include) "#include" (string_literal) ""GameFramework/GameModeBase.h"" (") """ (string_content) "GameFramework/GameModeBase.h" (") """ (preproc_include) "#include "BeatRacerGameMode.generated.h"\n" (#include) "#include" (string_literal) ""BeatRacerGameMode.generated.h"" (") """ (string_content) "BeatRacerGameMode.generated.h" (") """ (declaration) "UCLASS(minimalapi)\nclass" (macro_type_specifier) "UCLASS(minimalapi)" (identifier) "UCLASS" (() "(" (type_descriptor) "minimalapi" (type_identifier) "minimalapi" ()) ")" (identifier) "class" (;) "" (labeled_statement) "ABeatRacerGameMode : public AGameModeBase\n{\n GENERATED_BODY()\n\npublic:\n ABeatRacerGameMode();\n};" (statement_identifier) "ABeatRacerGameMode" (:) ":" (ERROR) "public AGameModeBase\n{\n GENERATED_BODY()\n\npublic:\n ABeatRacerGameMode();\n}" (type_identifier) "public" (ERROR) "AGameModeBase\n{" (identifier) "AGameModeBase" ({) "{" (function_declarator) "GENERATED_BODY()\n\npublic:\n ABeatRacerGameMode()" (identifier) "GENERATED_BODY" (parameter_list) "()" (() "(" ()) ")" (identifier) "public" (ERROR) ":" (:) ":" (call_expression) "ABeatRacerGameMode()" (identifier) "ABeatRacerGameMode" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
51
3
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 24.09, "nodes": 25, "errors": 0, "source_hash": "9a92e255ce9017266ab41269cbb4d06bb798786db761289a98248c53808bd605", "categorized_nodes": 17}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"GameFramework/GameModeBase.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": "\"GameFramework/GameModeBase.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 39}}, {"id": 6, "type": "preproc_include", "text": "#include \"BeatRacerGameMode.generated.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": "\"BeatRacerGameMode.generated.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 40}}, {"id": 9, "type": "declaration", "text": "UCLASS(minimalapi)\nclass", "parent": null, "children": [10], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 5}}, {"id": 10, "type": "macro_type_specifier", "text": "UCLASS(minimalapi)", "parent": 9, "children": [11, 12], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 18}}, {"id": 11, "type": "identifier", "text": "UCLASS", "parent": 10, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 12, "type": "type_descriptor", "text": "minimalapi", "parent": 10, "children": [13], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 17}}, {"id": 13, "type": "type_identifier", "text": "minimalapi", "parent": 12, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 17}}, {"id": 14, "type": "labeled_statement", "text": "ABeatRacerGameMode : public AGameModeBase\n{\n\tGENERATED_BODY()\n\npublic:\n\tABeatRacerGameMode();\n};", "parent": null, "children": [15, 16], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 12, "column": 2}}, {"id": 15, "type": "statement_identifier", "text": "ABeatRacerGameMode", "parent": 14, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 24}}, {"id": 16, "type": "ERROR", "text": "public AGameModeBase\n{\n\tGENERATED_BODY()\n\npublic:\n\tABeatRacerGameMode();\n}", "parent": 14, "children": [17, 19], "start_point": {"row": 6, "column": 27}, "end_point": {"row": 12, "column": 1}}, {"id": 17, "type": "ERROR", "text": "AGameModeBase\n{", "parent": 16, "children": [18], "start_point": {"row": 6, "column": 34}, "end_point": {"row": 7, "column": 1}}, {"id": 18, "type": "identifier", "text": "AGameModeBase", "parent": 17, "children": [], "start_point": {"row": 6, "column": 34}, "end_point": {"row": 6, "column": 47}}, {"id": 19, "type": "function_declarator", "text": "GENERATED_BODY()\n\npublic:\n\tABeatRacerGameMode()", "parent": 16, "children": [20, 21, 22], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 11, "column": 21}}, {"id": 20, "type": "identifier", "text": "GENERATED_BODY", "parent": 19, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 15}}, {"id": 21, "type": "parameter_list", "text": "()", "parent": 19, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 17}}, {"id": 22, "type": "call_expression", "text": "ABeatRacerGameMode()", "parent": 19, "children": [23, 24], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 21}}, {"id": 23, "type": "identifier", "text": "ABeatRacerGameMode", "parent": 22, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 19}}, {"id": 24, "type": "argument_list", "text": "()", "parent": 22, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 21}}]}, "node_categories": {"declarations": {"functions": [19], "variables": [9], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [22], "assignments": [], "loops": [], "conditionals": [10, 11, 13, 15, 18, 20, 23], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 19, "universal_type": "function", "name": "unknown", "text_snippet": "GENERATED_BODY()\n\npublic:\n\tABeatRacerGameMode()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"GameFramework/GameModeBase.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"BeatRacerGameMode.generated.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.\n#pragma once\n#include \"GameFramework/GameModeBase.h\"\n#include \"BeatRacerGameMode.generated.h\"\n\nUCLASS(minimalapi)\nclass ABeatRacerGameMode : public AGameModeBase\n{\n\tGENERATED_BODY()\n\npublic:\n\tABeatRacerGameMode();\n};\n\n\n\n"}
80,932
c
/* radare - Copyright 2011-2019 pancake<nop<EMAIL>> */ /* $OpenBSD: magic.c,v 1.8 2009/10/27 23:59:37 deraadt Exp $ */ #include <r_userconf.h> #include <r_magic.h> R_LIB_VERSION (r_magic); #ifdef _MSC_VER # include <io.h> # include <sys\stat.h> # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) # define S_IFIFO (-1) # define S_ISFIFO(m) (((m) & S_IFIFO) == S_IFIFO) # define MAXPATHLEN 255 #endif #if USE_LIB_MAGIC // we keep this code just to make debian happy, but we should use // our own magic implementation for consistency reasons #include <magic.h> #undef R_API #define R_API R_API RMagic* r_magic_new(int flags) { return magic_open (flags); } R_API void r_magic_free(RMagic* m) { if (m) { magic_close (m); } } R_API const char *r_magic_file(RMagic* m, const char * f) { return magic_file (m, f); } R_API const char *r_magic_descriptor(RMagic* m, int fd) { return magic_descriptor (m, fd); } R_API const char *r_magic_buffer(RMagic* m, const void *b, size_t s) { return magic_buffer (m, b, s); } R_API const char *r_magic_error(RMagic* m) { return magic_error (m); } R_API void r_magic_setflags(RMagic* m, int f) { magic_setflags (m, f); } R_API bool r_magic_load(RMagic* m, const char *f) { return magic_load (m, f) != -1; } R_API bool r_magic_compile(RMagic* m, const char *x) { return magic_compile (m, x) != -1; } R_API bool r_magic_check(RMagic* m, const char *x) { return magic_check (m, x) != -1; } R_API int r_magic_errno(RMagic* m) { return magic_errno (m); } #else /* use embedded magic library */ #include "file.h" #ifndef PIPE_BUF /* Get the PIPE_BUF from pathconf */ #ifdef _PC_PIPE_BUF #define PIPE_BUF pathconf(".", _PC_PIPE_BUF) #else #define PIPE_BUF 512 #endif #endif static void free_mlist(struct mlist *mlist) { struct mlist *ml; if (!mlist) { return; } for (ml = mlist->next; ml != mlist;) { struct mlist *next = ml->next; struct r_magic *mg = ml->magic; file_delmagic (mg, ml->mapped, ml->nmagic); free (ml); ml = next; } free (ml); } static int info_from_stat(RMagic *ms, unsigned short md) { /* We cannot open it, but we were able to stat it. */ if (md & 0222) { if (file_printf (ms, "writable, ") == -1) { return -1; } } if (md & 0111) { if (file_printf (ms, "executable, ") == -1) { return -1; } } if (S_ISREG (md)) { if (file_printf (ms, "regular file, ") == -1) { return -1; } } if (file_printf (ms, "no read permission") == -1) { return -1; } return 0; } static void close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb) { if (fd >= 0) { close (fd); } } static const char *file_or_fd(RMagic *ms, const char *inname, int fd) { bool ispipe = false; int rv = -1; unsigned char *buf; struct stat sb; int nbytes = 0; /* number of bytes read from a datafile */ /* * one extra for terminating '\0', and * some overlapping space for matches near EOF */ #define SLOP (1 + sizeof(union VALUETYPE)) if (!(buf = malloc (HOWMANY + SLOP))) { return NULL; } if (file_reset (ms) == -1) { goto done; } switch (file_fsmagic (ms, inname, &sb)) { case -1: goto done; /* error */ case 0: break; /* nothing found */ default: rv = 0; goto done; /* matched it and printed type */ } if (!inname) { if (fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)) { ispipe = true; } } else { int flags = O_RDONLY|O_BINARY; if (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) { #if O_NONBLOCK flags |= O_NONBLOCK; #endif ispipe = true; } errno = 0; if ((fd = open (inname, flags)) < 0) { eprintf ("couldn't open file\n"); if (info_from_stat (ms, sb.st_mode) == -1) { goto done; } rv = 0; goto done; } #ifdef O_NONBLOCK if ((flags = fcntl (fd, F_GETFL)) != -1) { flags &= ~O_NONBLOCK; (void)fcntl (fd, F_SETFL, flags); } #endif } /* * try looking at the first HOWMANY bytes */ #ifdef O_NONBLOCK if (ispipe) { ssize_t r = 0; //while ((r = sread(fd, (void *)&buf[nbytes], while ((r = read(fd, (void *)&buf[nbytes], (size_t)(HOWMANY - nbytes))) > 0) { nbytes += r; if (r < PIPE_BUF) { break; } } if (nbytes == 0) { /* We can not read it, but we were able to stat it. */ if (info_from_stat (ms, sb.st_mode) == -1) { goto done; } rv = 0; goto done; } } else { #endif if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) { file_error(ms, errno, "cannot read `%s'", inname); goto done; } #ifdef O_NONBLOCK } #endif (void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */ if (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) { goto done; } rv = 0; done: free (buf); close_and_restore (ms, inname, fd, &sb); return rv == 0 ? file_getbuffer(ms) : NULL; } /* API */ // TODO: reinitialize all the time R_API RMagic* r_magic_new(int flags) { RMagic *ms = R_NEW0 (RMagic); if (!ms) { return NULL; } r_magic_setflags (ms, flags); ms->o.buf = ms->o.pbuf = NULL; ms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li)); if (!ms->c.li) { free (ms); return NULL; } file_reset (ms); ms->mlist = NULL; ms->file = "unknown"; ms->line = 0; return ms; } R_API void r_magic_free(RMagic *ms) { if (ms) { free_mlist (ms->mlist); free (ms->o.pbuf); free (ms->o.buf); free (ms->c.li); free (ms); } } R_API bool r_magic_load_buffer(RMagic* ms, const char *magicdata) { if (*magicdata == '#') { struct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD); if (ml) { free_mlist (ms->mlist); ms->mlist = ml; return true; } } else { eprintf ("Magic buffers should start with #\n"); } return false; } R_API bool r_magic_load(RMagic* ms, const char *magicfile) { struct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD); if (ml) { free_mlist (ms->mlist); ms->mlist = ml; return true; } return false; } R_API bool r_magic_compile(RMagic *ms, const char *magicfile) { struct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE); free_mlist (ml); return ml != NULL; } R_API bool r_magic_check(RMagic *ms, const char *magicfile) { struct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK); free_mlist (ml); return ml != NULL; } R_API const char* r_magic_descriptor(RMagic *ms, int fd) { return file_or_fd (ms, NULL, fd); } R_API const char * r_magic_file(RMagic *ms, const char *inname) { return file_or_fd (ms, inname, 0); // 0 = stdin } R_API const char * r_magic_buffer(RMagic *ms, const void *buf, size_t nb) { if (file_reset (ms) == -1) { return NULL; } if (file_buffer (ms, -1, NULL, buf, nb) == -1) { return NULL; } return file_getbuffer (ms); } R_API const char *r_magic_error(RMagic *ms) { if (ms && ms->haderr) { return ms->o.buf; } return NULL; } R_API int r_magic_errno(RMagic *ms) { if (ms && ms->haderr) { return ms->error; } return 0; } R_API void r_magic_setflags(RMagic *ms, int flags) { if (ms) { ms->flags = flags; } } #endif
24.82
268
(translation_unit) "/* radare - Copyright 2011-2019 pancake<nop<EMAIL>> */\n/* $OpenBSD: magic.c,v 1.8 2009/10/27 23:59:37 deraadt Exp $ */\n\n#include <r_userconf.h>\n#include <r_magic.h>\n\nR_LIB_VERSION (r_magic);\n\n#ifdef _MSC_VER\n# include <io.h>\n# include <sys\stat.h>\n# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)\n# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)\n# define S_IFIFO (-1)\n# define S_ISFIFO(m) (((m) & S_IFIFO) == S_IFIFO)\n# define MAXPATHLEN 255\n#endif\n\n#if USE_LIB_MAGIC\n\n// we keep this code just to make debian happy, but we should use\n// our own magic implementation for consistency reasons\n#include <magic.h>\n#undef R_API\n#define R_API\n\nR_API RMagic* r_magic_new(int flags) { return magic_open (flags); }\nR_API void r_magic_free(RMagic* m) { if (m) { magic_close (m); } }\nR_API const char *r_magic_file(RMagic* m, const char * f) { return magic_file (m, f); } \nR_API const char *r_magic_descriptor(RMagic* m, int fd) { return magic_descriptor (m, fd); }\nR_API const char *r_magic_buffer(RMagic* m, const void *b, size_t s) { return magic_buffer (m, b, s); }\nR_API const char *r_magic_error(RMagic* m) { return magic_error (m); }\nR_API void r_magic_setflags(RMagic* m, int f) { magic_setflags (m, f); }\nR_API bool r_magic_load(RMagic* m, const char *f) { return magic_load (m, f) != -1; }\nR_API bool r_magic_compile(RMagic* m, const char *x) { return magic_compile (m, x) != -1; }\nR_API bool r_magic_check(RMagic* m, const char *x) { return magic_check (m, x) != -1; }\nR_API int r_magic_errno(RMagic* m) { return magic_errno (m); }\n\n#else\n\n/* use embedded magic library */\n\n#include "file.h"\n\n#ifndef PIPE_BUF \n/* Get the PIPE_BUF from pathconf */\n#ifdef _PC_PIPE_BUF\n#define PIPE_BUF pathconf(".", _PC_PIPE_BUF)\n#else\n#define PIPE_BUF 512\n#endif\n#endif\n\nstatic void free_mlist(struct mlist *mlist) {\n struct mlist *ml;\n if (!mlist) {\n return;\n }\n for (ml = mlist->next; ml != mlist;) {\n struct mlist *next = ml->next;\n struct r_magic *mg = ml->magic;\n file_delmagic (mg, ml->mapped, ml->nmagic);\n free (ml);\n ml = next;\n }\n free (ml);\n}\n\nstatic int info_from_stat(RMagic *ms, unsigned short md) {\n /* We cannot open it, but we were able to stat it. */\n if (md & 0222) {\n if (file_printf (ms, "writable, ") == -1) {\n return -1;\n }\n }\n if (md & 0111) {\n if (file_printf (ms, "executable, ") == -1) {\n return -1;\n }\n }\n if (S_ISREG (md)) {\n if (file_printf (ms, "regular file, ") == -1) {\n return -1;\n }\n }\n if (file_printf (ms, "no read permission") == -1) {\n return -1;\n }\n return 0;\n}\n\nstatic void close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb) {\n if (fd >= 0) {\n close (fd);\n }\n}\n\nstatic const char *file_or_fd(RMagic *ms, const char *inname, int fd) {\n bool ispipe = false;\n int rv = -1;\n unsigned char *buf;\n struct stat sb;\n int nbytes = 0; /* number of bytes read from a datafile */\n\n /*\n * one extra for terminating '\0', and\n * some overlapping space for matches near EOF\n */\n#define SLOP (1 + sizeof(union VALUETYPE))\n if (!(buf = malloc (HOWMANY + SLOP))) {\n return NULL;\n }\n\n if (file_reset (ms) == -1) {\n goto done;\n }\n\n switch (file_fsmagic (ms, inname, &sb)) {\n case -1: goto done; /* error */\n case 0: break; /* nothing found */\n default: rv = 0; goto done; /* matched it and printed type */\n }\n\n if (!inname) {\n if (fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n ispipe = true;\n }\n } else {\n int flags = O_RDONLY|O_BINARY;\n\n if (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n flags |= O_NONBLOCK;\n#endif\n ispipe = true;\n }\n errno = 0;\n if ((fd = open (inname, flags)) < 0) {\n eprintf ("couldn't open file\n");\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }\n#ifdef O_NONBLOCK\n if ((flags = fcntl (fd, F_GETFL)) != -1) {\n flags &= ~O_NONBLOCK;\n (void)fcntl (fd, F_SETFL, flags);\n }\n#endif\n }\n\n /*\n * try looking at the first HOWMANY bytes\n */\n#ifdef O_NONBLOCK\n if (ispipe) {\n ssize_t r = 0;\n\n //while ((r = sread(fd, (void *)&buf[nbytes],\n while ((r = read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))) > 0) {\n nbytes += r;\n if (r < PIPE_BUF) {\n break;\n }\n }\n\n if (nbytes == 0) {\n /* We can not read it, but we were able to stat it. */\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }\n } else {\n#endif\n if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n file_error(ms, errno, "cannot read `%s'", inname);\n goto done;\n }\n#ifdef O_NONBLOCK\n }\n#endif\n\n (void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n if (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n goto done;\n }\n rv = 0;\ndone:\n free (buf);\n close_and_restore (ms, inname, fd, &sb);\n return rv == 0 ? file_getbuffer(ms) : NULL;\n}\n\n/* API */\n\n// TODO: reinitialize all the time\nR_API RMagic* r_magic_new(int flags) {\n RMagic *ms = R_NEW0 (RMagic);\n if (!ms) {\n return NULL;\n }\n r_magic_setflags (ms, flags);\n ms->o.buf = ms->o.pbuf = NULL;\n ms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li));\n if (!ms->c.li) {\n free (ms);\n return NULL;\n }\n file_reset (ms);\n ms->mlist = NULL;\n ms->file = "unknown";\n ms->line = 0;\n return ms;\n}\n\nR_API void r_magic_free(RMagic *ms) {\n if (ms) {\n free_mlist (ms->mlist);\n free (ms->o.pbuf);\n free (ms->o.buf);\n free (ms->c.li);\n free (ms);\n }\n}\n\nR_API bool r_magic_load_buffer(RMagic* ms, const char *magicdata) {\n if (*magicdata == '#') {\n struct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n } else {\n eprintf ("Magic buffers should start with #\n");\n }\n return false;\n}\n\nR_API bool r_magic_load(RMagic* ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n return false;\n}\n\nR_API bool r_magic_compile(RMagic *ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);\n free_mlist (ml);\n return ml != NULL;\n}\n\nR_API bool r_magic_check(RMagic *ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);\n free_mlist (ml);\n return ml != NULL;\n}\n\nR_API const char* r_magic_descriptor(RMagic *ms, int fd) {\n return file_or_fd (ms, NULL, fd);\n}\n\nR_API const char * r_magic_file(RMagic *ms, const char *inname) {\n return file_or_fd (ms, inname, 0); // 0 = stdin\n}\n\nR_API const char * r_magic_buffer(RMagic *ms, const void *buf, size_t nb) {\n if (file_reset (ms) == -1) {\n return NULL;\n }\n if (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n return NULL;\n }\n return file_getbuffer (ms);\n}\n\nR_API const char *r_magic_error(RMagic *ms) {\n if (ms && ms->haderr) {\n return ms->o.buf;\n }\n return NULL;\n}\n\nR_API int r_magic_errno(RMagic *ms) {\n if (ms && ms->haderr) {\n return ms->error;\n }\n return 0;\n}\n\nR_API void r_magic_setflags(RMagic *ms, int flags) {\n if (ms) {\n ms->flags = flags;\n }\n}\n#endif\n" (comment) "/* radare - Copyright 2011-2019 pancake<nop<EMAIL>> */" (comment) "/* $OpenBSD: magic.c,v 1.8 2009/10/27 23:59:37 deraadt Exp $ */" (preproc_include) "#include <r_userconf.h>\n" (#include) "#include" (system_lib_string) "<r_userconf.h>" (preproc_include) "#include <r_magic.h>\n" (#include) "#include" (system_lib_string) "<r_magic.h>" (expression_statement) "R_LIB_VERSION (r_magic);" (call_expression) "R_LIB_VERSION (r_magic)" (identifier) "R_LIB_VERSION" (argument_list) "(r_magic)" (() "(" (identifier) "r_magic" ()) ")" (;) ";" (preproc_ifdef) "#ifdef _MSC_VER\n# include <io.h>\n# include <sys\stat.h>\n# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)\n# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)\n# define S_IFIFO (-1)\n# define S_ISFIFO(m) (((m) & S_IFIFO) == S_IFIFO)\n# define MAXPATHLEN 255\n#endif" (#ifdef) "#ifdef" (identifier) "_MSC_VER" (preproc_include) "# include <io.h>\n" (#include) "# include" (system_lib_string) "<io.h>" (preproc_include) "# include <sys\stat.h>\n" (#include) "# include" (system_lib_string) "<sys\stat.h>" (preproc_function_def) "# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)\n" (#define) "# define" (identifier) "S_ISREG" (preproc_params) "(m)" (() "(" (identifier) "m" ()) ")" (preproc_arg) "(((m) & S_IFMT) == S_IFREG)" (preproc_function_def) "# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)\n" (#define) "# define" (identifier) "S_ISDIR" (preproc_params) "(m)" (() "(" (identifier) "m" ()) ")" (preproc_arg) "(((m) & S_IFMT) == S_IFDIR)" (preproc_def) "# define S_IFIFO (-1)\n" (#define) "# define" (identifier) "S_IFIFO" (preproc_arg) "(-1)" (preproc_function_def) "# define S_ISFIFO(m) (((m) & S_IFIFO) == S_IFIFO)\n" (#define) "# define" (identifier) "S_ISFIFO" (preproc_params) "(m)" (() "(" (identifier) "m" ()) ")" (preproc_arg) "(((m) & S_IFIFO) == S_IFIFO)" (preproc_def) "# define MAXPATHLEN 255\n" (#define) "# define" (identifier) "MAXPATHLEN" (preproc_arg) "255" (#endif) "#endif" (ERROR) "#if USE_LIB_MAGIC\n\n// we keep this code just to make debian happy, but we should use\n// our own magic implementation for consistency reasons\n#include <magic.h>\n#undef R_API\n#define R_API\n\nR_API RMagic* r_magic_new(int flags) { return magic_open (flags); }\nR_API void r_magic_free(RMagic* m) { if (m) { magic_close (m); } }\nR_API const char *r_magic_file(RMagic* m, const char * f) { return magic_file (m, f); } \nR_API const char *r_magic_descriptor(RMagic* m, int fd) { return magic_descriptor (m, fd); }\nR_API const char *r_magic_buffer(RMagic* m, const void *b, size_t s) { return magic_buffer (m, b, s); }\nR_API const char *r_magic_error(RMagic* m) { return magic_error (m); }\nR_API void r_magic_setflags(RMagic* m, int f) { magic_setflags (m, f); }\nR_API bool r_magic_load(RMagic* m, const char *f) { return magic_load (m, f) != -1; }\nR_API bool r_magic_compile(RMagic* m, const char *x) { return magic_compile (m, x) != -1; }\nR_API bool r_magic_check(RMagic* m, const char *x) { return magic_check (m, x) != -1; }\nR_API int r_magic_errno(RMagic* m) { return magic_errno (m); }\n\n#else\n\n/* use embedded magic library */\n\n#include "file.h"\n\n#ifndef PIPE_BUF \n/* Get the PIPE_BUF from pathconf */\n#ifdef _PC_PIPE_BUF\n#define PIPE_BUF pathconf(".", _PC_PIPE_BUF)\n#else\n#define PIPE_BUF 512\n#endif\n#endif\n\nstatic void free_mlist(struct mlist *mlist) {\n struct mlist *ml;\n if (!mlist) {\n return;\n }\n for (ml = mlist->next; ml != mlist;) {\n struct mlist *next = ml->next;\n struct r_magic *mg = ml->magic;\n file_delmagic (mg, ml->mapped, ml->nmagic);\n free (ml);\n ml = next;\n }\n free (ml);\n}\n\nstatic int info_from_stat(RMagic *ms, unsigned short md) {\n /* We cannot open it, but we were able to stat it. */\n if (md & 0222) {\n if (file_printf (ms, "writable, ") == -1) {\n return -1;\n }\n }\n if (md & 0111) {\n if (file_printf (ms, "executable, ") == -1) {\n return -1;\n }\n }\n if (S_ISREG (md)) {\n if (file_printf (ms, "regular file, ") == -1) {\n return -1;\n }\n }\n if (file_printf (ms, "no read permission") == -1) {\n return -1;\n }\n return 0;\n}\n\nstatic void close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb) {\n if (fd >= 0) {\n close (fd);\n }\n}\n\nstatic const char *file_or_fd(RMagic *ms, const char *inname, int fd) {\n bool ispipe = false;\n int rv = -1;\n unsigned char *buf;\n struct stat sb;\n int nbytes = 0; /* number of bytes read from a datafile */\n\n /*\n * one extra for terminating '\0', and\n * some overlapping space for matches near EOF\n */\n#define SLOP (1 + sizeof(union VALUETYPE))\n if (!(buf = malloc (HOWMANY + SLOP))) {\n return NULL;\n }\n\n if (file_reset (ms) == -1) {\n goto done;\n }\n\n switch (file_fsmagic (ms, inname, &sb)) {\n case -1: goto done; /* error */\n case 0: break; /* nothing found */\n default: rv = 0; goto done; /* matched it and printed type */\n }\n\n if (!inname) {\n if (fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n ispipe = true;\n }\n } else {\n int flags = O_RDONLY|O_BINARY;\n\n if (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n flags |= O_NONBLOCK;\n#endif\n ispipe = true;\n }\n errno = 0;\n if ((fd = open (inname, flags)) < 0) {\n eprintf ("couldn't open file\n");\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }\n#ifdef O_NONBLOCK\n if ((flags = fcntl (fd, F_GETFL)) != -1) {\n flags &= ~O_NONBLOCK;\n (void)fcntl (fd, F_SETFL, flags);\n }\n#endif\n }\n\n /*\n * try looking at the first HOWMANY bytes\n */\n#ifdef O_NONBLOCK\n if (ispipe) {\n ssize_t r = 0;\n\n //while ((r = sread(fd, (void *)&buf[nbytes],\n while ((r = read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))) > 0) {\n nbytes += r;\n if (r < PIPE_BUF) {\n break;\n }\n }\n\n if (nbytes == 0) {\n /* We can not read it, but we were able to stat it. */\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }\n } else {\n#endif\n if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n file_error(ms, errno, "cannot read `%s'", inname);\n goto done;\n }\n#ifdef O_NONBLOCK\n }\n#endif\n\n (void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n if (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n goto done;\n }\n rv = 0;\ndone:\n free (buf);\n close_and_restore (ms, inname, fd, &sb);\n return rv == 0 ? file_getbuffer(ms) : NULL;\n}\n\n/* API */\n\n// TODO: reinitialize all the time\nR_API RMagic* r_magic_new(int flags) {\n RMagic *ms = R_NEW0 (RMagic);\n if (!ms) {\n return NULL;\n }\n r_magic_setflags (ms, flags);\n ms->o.buf = ms->o.pbuf = NULL;\n ms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li));\n if (!ms->c.li) {\n free (ms);\n return NULL;\n }\n file_reset (ms);\n ms->mlist = NULL;\n ms->file = "unknown";\n ms->line = 0;\n return ms;\n}\n\nR_API void r_magic_free(RMagic *ms) {\n if (ms) {\n free_mlist (ms->mlist);\n free (ms->o.pbuf);\n free (ms->o.buf);\n free (ms->c.li);\n free (ms);\n }\n}\n\nR_API bool r_magic_load_buffer(RMagic* ms, const char *magicdata) {\n if (*magicdata == '#') {\n struct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n } else {\n eprintf ("Magic buffers should start with #\n");\n }\n return false;\n}\n\nR_API bool r_magic_load(RMagic* ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n return false;\n}\n\nR_API bool r_magic_compile(RMagic *ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);\n free_mlist (ml);\n return ml != NULL;\n}\n\nR_API bool r_magic_check(RMagic *ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);\n free_mlist (ml);\n return ml != NULL;\n}\n\nR_API const char* r_magic_descriptor(RMagic *ms, int fd) {\n return file_or_fd (ms, NULL, fd);\n}\n\nR_API const char * r_magic_file(RMagic *ms, const char *inname) {\n return file_or_fd (ms, inname, 0); // 0 = stdin\n}\n\nR_API const char * r_magic_buffer(RMagic *ms, const void *buf, size_t nb) {\n if (file_reset (ms) == -1) {\n return NULL;\n }\n if (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n return NULL;\n }\n return file_getbuffer (ms);\n}\n\nR_API const char *r_magic_error(RMagic *ms) {\n if (ms && ms->haderr) {\n return ms->o.buf;\n }\n return NULL;\n}\n\nR_API int r_magic_errno(RMagic *ms) {\n if (ms && ms->haderr) {\n return ms->error;\n }\n return 0;\n}\n\nR_API void r_magic_setflags(RMagic *ms, int flags) {\n if (ms) {\n ms->flags = flags;\n }\n}\n#endif" (#if) "#if" (identifier) "USE_LIB_MAGIC" ( ) "\n\n" (comment) "// we keep this code just to make debian happy, but we should use" (comment) "// our own magic implementation for consistency reasons" (preproc_include) "#include <magic.h>\n" (#include) "#include" (system_lib_string) "<magic.h>" (preproc_call) "#undef R_API\n" (preproc_directive) "#undef" (preproc_arg) "R_API" (preproc_def) "#define R_API\n" (#define) "#define" (identifier) "R_API" (function_definition) "R_API RMagic* r_magic_new(int flags) { return magic_open (flags); }" (type_identifier) "R_API" (ERROR) "RMagic" (identifier) "RMagic" (pointer_declarator) "* r_magic_new(int flags)" (*) "*" (function_declarator) "r_magic_new(int flags)" (identifier) "r_magic_new" (parameter_list) "(int flags)" (() "(" (parameter_declaration) "int flags" (primitive_type) "int" (identifier) "flags" ()) ")" (compound_statement) "{ return magic_open (flags); }" ({) "{" (return_statement) "return magic_open (flags);" (return) "return" (call_expression) "magic_open (flags)" (identifier) "magic_open" (argument_list) "(flags)" (() "(" (identifier) "flags" ()) ")" (;) ";" (}) "}" (function_definition) "R_API void r_magic_free(RMagic* m) { if (m) { magic_close (m); } }" (type_identifier) "R_API" (ERROR) "void" (identifier) "void" (function_declarator) "r_magic_free(RMagic* m)" (identifier) "r_magic_free" (parameter_list) "(RMagic* m)" (() "(" (parameter_declaration) "RMagic* m" (type_identifier) "RMagic" (pointer_declarator) "* m" (*) "*" (identifier) "m" ()) ")" (compound_statement) "{ if (m) { magic_close (m); } }" ({) "{" (if_statement) "if (m) { magic_close (m); }" (if) "if" (parenthesized_expression) "(m)" (() "(" (identifier) "m" ()) ")" (compound_statement) "{ magic_close (m); }" ({) "{" (expression_statement) "magic_close (m);" (call_expression) "magic_close (m)" (identifier) "magic_close" (argument_list) "(m)" (() "(" (identifier) "m" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "R_API const char *r_magic_file(RMagic* m, const char * f) { return magic_file (m, f); }" (type_identifier) "R_API" (type_qualifier) "const" (const) "const" (ERROR) "char" (identifier) "char" (pointer_declarator) "*r_magic_file(RMagic* m, const char * f)" (*) "*" (function_declarator) "r_magic_file(RMagic* m, const char * f)" (identifier) "r_magic_file" (parameter_list) "(RMagic* m, const char * f)" (() "(" (parameter_declaration) "RMagic* m" (type_identifier) "RMagic" (pointer_declarator) "* m" (*) "*" (identifier) "m" (,) "," (parameter_declaration) "const char * f" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* f" (*) "*" (identifier) "f" ()) ")" (compound_statement) "{ return magic_file (m, f); }" ({) "{" (return_statement) "return magic_file (m, f);" (return) "return" (call_expression) "magic_file (m, f)" (identifier) "magic_file" (argument_list) "(m, f)" (() "(" (identifier) "m" (,) "," (identifier) "f" ()) ")" (;) ";" (}) "}" (function_definition) "R_API const char *r_magic_descriptor(RMagic* m, int fd) { return magic_descriptor (m, fd); }" (type_identifier) "R_API" (type_qualifier) "const" (const) "const" (ERROR) "char" (identifier) "char" (pointer_declarator) "*r_magic_descriptor(RMagic* m, int fd)" (*) "*" (function_declarator) "r_magic_descriptor(RMagic* m, int fd)" (identifier) "r_magic_descriptor" (parameter_list) "(RMagic* m, int fd)" (() "(" (parameter_declaration) "RMagic* m" (type_identifier) "RMagic" (pointer_declarator) "* m" (*) "*" (identifier) "m" (,) "," (parameter_declaration) "int fd" (primitive_type) "int" (identifier) "fd" ()) ")" (compound_statement) "{ return magic_descriptor (m, fd); }" ({) "{" (return_statement) "return magic_descriptor (m, fd);" (return) "return" (call_expression) "magic_descriptor (m, fd)" (identifier) "magic_descriptor" (argument_list) "(m, fd)" (() "(" (identifier) "m" (,) "," (identifier) "fd" ()) ")" (;) ";" (}) "}" (function_definition) "R_API const char *r_magic_buffer(RMagic* m, const void *b, size_t s) { return magic_buffer (m, b, s); }" (type_identifier) "R_API" (type_qualifier) "const" (const) "const" (ERROR) "char" (identifier) "char" (pointer_declarator) "*r_magic_buffer(RMagic* m, const void *b, size_t s)" (*) "*" (function_declarator) "r_magic_buffer(RMagic* m, const void *b, size_t s)" (identifier) "r_magic_buffer" (parameter_list) "(RMagic* m, const void *b, size_t s)" (() "(" (parameter_declaration) "RMagic* m" (type_identifier) "RMagic" (pointer_declarator) "* m" (*) "*" (identifier) "m" (,) "," (parameter_declaration) "const void *b" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*b" (*) "*" (identifier) "b" (,) "," (parameter_declaration) "size_t s" (primitive_type) "size_t" (identifier) "s" ()) ")" (compound_statement) "{ return magic_buffer (m, b, s); }" ({) "{" (return_statement) "return magic_buffer (m, b, s);" (return) "return" (call_expression) "magic_buffer (m, b, s)" (identifier) "magic_buffer" (argument_list) "(m, b, s)" (() "(" (identifier) "m" (,) "," (identifier) "b" (,) "," (identifier) "s" ()) ")" (;) ";" (}) "}" (function_definition) "R_API const char *r_magic_error(RMagic* m) { return magic_error (m); }" (type_identifier) "R_API" (type_qualifier) "const" (const) "const" (ERROR) "char" (identifier) "char" (pointer_declarator) "*r_magic_error(RMagic* m)" (*) "*" (function_declarator) "r_magic_error(RMagic* m)" (identifier) "r_magic_error" (parameter_list) "(RMagic* m)" (() "(" (parameter_declaration) "RMagic* m" (type_identifier) "RMagic" (pointer_declarator) "* m" (*) "*" (identifier) "m" ()) ")" (compound_statement) "{ return magic_error (m); }" ({) "{" (return_statement) "return magic_error (m);" (return) "return" (call_expression) "magic_error (m)" (identifier) "magic_error" (argument_list) "(m)" (() "(" (identifier) "m" ()) ")" (;) ";" (}) "}" (function_definition) "R_API void r_magic_setflags(RMagic* m, int f) { magic_setflags (m, f); }" (type_identifier) "R_API" (ERROR) "void" (identifier) "void" (function_declarator) "r_magic_setflags(RMagic* m, int f)" (identifier) "r_magic_setflags" (parameter_list) "(RMagic* m, int f)" (() "(" (parameter_declaration) "RMagic* m" (type_identifier) "RMagic" (pointer_declarator) "* m" (*) "*" (identifier) "m" (,) "," (parameter_declaration) "int f" (primitive_type) "int" (identifier) "f" ()) ")" (compound_statement) "{ magic_setflags (m, f); }" ({) "{" (expression_statement) "magic_setflags (m, f);" (call_expression) "magic_setflags (m, f)" (identifier) "magic_setflags" (argument_list) "(m, f)" (() "(" (identifier) "m" (,) "," (identifier) "f" ()) ")" (;) ";" (}) "}" (function_definition) "R_API bool r_magic_load(RMagic* m, const char *f) { return magic_load (m, f) != -1; }" (type_identifier) "R_API" (ERROR) "bool" (identifier) "bool" (function_declarator) "r_magic_load(RMagic* m, const char *f)" (identifier) "r_magic_load" (parameter_list) "(RMagic* m, const char *f)" (() "(" (parameter_declaration) "RMagic* m" (type_identifier) "RMagic" (pointer_declarator) "* m" (*) "*" (identifier) "m" (,) "," (parameter_declaration) "const char *f" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*f" (*) "*" (identifier) "f" ()) ")" (compound_statement) "{ return magic_load (m, f) != -1; }" ({) "{" (return_statement) "return magic_load (m, f) != -1;" (return) "return" (binary_expression) "magic_load (m, f) != -1" (call_expression) "magic_load (m, f)" (identifier) "magic_load" (argument_list) "(m, f)" (() "(" (identifier) "m" (,) "," (identifier) "f" ()) ")" (!=) "!=" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "R_API bool r_magic_compile(RMagic* m, const char *x) { return magic_compile (m, x) != -1; }" (type_identifier) "R_API" (ERROR) "bool" (identifier) "bool" (function_declarator) "r_magic_compile(RMagic* m, const char *x)" (identifier) "r_magic_compile" (parameter_list) "(RMagic* m, const char *x)" (() "(" (parameter_declaration) "RMagic* m" (type_identifier) "RMagic" (pointer_declarator) "* m" (*) "*" (identifier) "m" (,) "," (parameter_declaration) "const char *x" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*x" (*) "*" (identifier) "x" ()) ")" (compound_statement) "{ return magic_compile (m, x) != -1; }" ({) "{" (return_statement) "return magic_compile (m, x) != -1;" (return) "return" (binary_expression) "magic_compile (m, x) != -1" (call_expression) "magic_compile (m, x)" (identifier) "magic_compile" (argument_list) "(m, x)" (() "(" (identifier) "m" (,) "," (identifier) "x" ()) ")" (!=) "!=" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "R_API bool r_magic_check(RMagic* m, const char *x) { return magic_check (m, x) != -1; }" (type_identifier) "R_API" (ERROR) "bool" (identifier) "bool" (function_declarator) "r_magic_check(RMagic* m, const char *x)" (identifier) "r_magic_check" (parameter_list) "(RMagic* m, const char *x)" (() "(" (parameter_declaration) "RMagic* m" (type_identifier) "RMagic" (pointer_declarator) "* m" (*) "*" (identifier) "m" (,) "," (parameter_declaration) "const char *x" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*x" (*) "*" (identifier) "x" ()) ")" (compound_statement) "{ return magic_check (m, x) != -1; }" ({) "{" (return_statement) "return magic_check (m, x) != -1;" (return) "return" (binary_expression) "magic_check (m, x) != -1" (call_expression) "magic_check (m, x)" (identifier) "magic_check" (argument_list) "(m, x)" (() "(" (identifier) "m" (,) "," (identifier) "x" ()) ")" (!=) "!=" (number_literal) "-1" (;) ";" (}) "}" (function_definition) "R_API int r_magic_errno(RMagic* m) { return magic_errno (m); }" (type_identifier) "R_API" (ERROR) "int" (identifier) "int" (function_declarator) "r_magic_errno(RMagic* m)" (identifier) "r_magic_errno" (parameter_list) "(RMagic* m)" (() "(" (parameter_declaration) "RMagic* m" (type_identifier) "RMagic" (pointer_declarator) "* m" (*) "*" (identifier) "m" ()) ")" (compound_statement) "{ return magic_errno (m); }" ({) "{" (return_statement) "return magic_errno (m);" (return) "return" (call_expression) "magic_errno (m)" (identifier) "magic_errno" (argument_list) "(m)" (() "(" (identifier) "m" ()) ")" (;) ";" (}) "}" (#else) "#else" (comment) "/* use embedded magic library */" (preproc_include) "#include "file.h"\n" (#include) "#include" (string_literal) ""file.h"" (") """ (string_content) "file.h" (") """ (preproc_ifdef) "#ifndef PIPE_BUF \n/* Get the PIPE_BUF from pathconf */\n#ifdef _PC_PIPE_BUF\n#define PIPE_BUF pathconf(".", _PC_PIPE_BUF)\n#else\n#define PIPE_BUF 512\n#endif\n#endif" (#ifndef) "#ifndef" (identifier) "PIPE_BUF" (comment) "/* Get the PIPE_BUF from pathconf */" (preproc_ifdef) "#ifdef _PC_PIPE_BUF\n#define PIPE_BUF pathconf(".", _PC_PIPE_BUF)\n#else\n#define PIPE_BUF 512\n#endif" (#ifdef) "#ifdef" (identifier) "_PC_PIPE_BUF" (preproc_def) "#define PIPE_BUF pathconf(".", _PC_PIPE_BUF)\n" (#define) "#define" (identifier) "PIPE_BUF" (preproc_arg) "pathconf(".", _PC_PIPE_BUF)" (preproc_else) "#else\n#define PIPE_BUF 512\n" (#else) "#else" (preproc_def) "#define PIPE_BUF 512\n" (#define) "#define" (identifier) "PIPE_BUF" (preproc_arg) "512" (#endif) "#endif" (#endif) "#endif" (function_definition) "static void free_mlist(struct mlist *mlist) {\n struct mlist *ml;\n if (!mlist) {\n return;\n }\n for (ml = mlist->next; ml != mlist;) {\n struct mlist *next = ml->next;\n struct r_magic *mg = ml->magic;\n file_delmagic (mg, ml->mapped, ml->nmagic);\n free (ml);\n ml = next;\n }\n free (ml);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "free_mlist(struct mlist *mlist)" (identifier) "free_mlist" (parameter_list) "(struct mlist *mlist)" (() "(" (parameter_declaration) "struct mlist *mlist" (struct_specifier) "struct mlist" (struct) "struct" (type_identifier) "mlist" (pointer_declarator) "*mlist" (*) "*" (identifier) "mlist" ()) ")" (compound_statement) "{\n struct mlist *ml;\n if (!mlist) {\n return;\n }\n for (ml = mlist->next; ml != mlist;) {\n struct mlist *next = ml->next;\n struct r_magic *mg = ml->magic;\n file_delmagic (mg, ml->mapped, ml->nmagic);\n free (ml);\n ml = next;\n }\n free (ml);\n}" ({) "{" (declaration) "struct mlist *ml;" (struct_specifier) "struct mlist" (struct) "struct" (type_identifier) "mlist" (pointer_declarator) "*ml" (*) "*" (identifier) "ml" (;) ";" (if_statement) "if (!mlist) {\n return;\n }" (if) "if" (parenthesized_expression) "(!mlist)" (() "(" (unary_expression) "!mlist" (!) "!" (identifier) "mlist" ()) ")" (compound_statement) "{\n return;\n }" ({) "{" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (for_statement) "for (ml = mlist->next; ml != mlist;) {\n struct mlist *next = ml->next;\n struct r_magic *mg = ml->magic;\n file_delmagic (mg, ml->mapped, ml->nmagic);\n free (ml);\n ml = next;\n }" (for) "for" (() "(" (assignment_expression) "ml = mlist->next" (identifier) "ml" (=) "=" (field_expression) "mlist->next" (identifier) "mlist" (->) "->" (field_identifier) "next" (;) ";" (binary_expression) "ml != mlist" (identifier) "ml" (!=) "!=" (identifier) "mlist" (;) ";" ()) ")" (compound_statement) "{\n struct mlist *next = ml->next;\n struct r_magic *mg = ml->magic;\n file_delmagic (mg, ml->mapped, ml->nmagic);\n free (ml);\n ml = next;\n }" ({) "{" (declaration) "struct mlist *next = ml->next;" (struct_specifier) "struct mlist" (struct) "struct" (type_identifier) "mlist" (init_declarator) "*next = ml->next" (pointer_declarator) "*next" (*) "*" (identifier) "next" (=) "=" (field_expression) "ml->next" (identifier) "ml" (->) "->" (field_identifier) "next" (;) ";" (declaration) "struct r_magic *mg = ml->magic;" (struct_specifier) "struct r_magic" (struct) "struct" (type_identifier) "r_magic" (init_declarator) "*mg = ml->magic" (pointer_declarator) "*mg" (*) "*" (identifier) "mg" (=) "=" (field_expression) "ml->magic" (identifier) "ml" (->) "->" (field_identifier) "magic" (;) ";" (expression_statement) "file_delmagic (mg, ml->mapped, ml->nmagic);" (call_expression) "file_delmagic (mg, ml->mapped, ml->nmagic)" (identifier) "file_delmagic" (argument_list) "(mg, ml->mapped, ml->nmagic)" (() "(" (identifier) "mg" (,) "," (field_expression) "ml->mapped" (identifier) "ml" (->) "->" (field_identifier) "mapped" (,) "," (field_expression) "ml->nmagic" (identifier) "ml" (->) "->" (field_identifier) "nmagic" ()) ")" (;) ";" (expression_statement) "free (ml);" (call_expression) "free (ml)" (identifier) "free" (argument_list) "(ml)" (() "(" (identifier) "ml" ()) ")" (;) ";" (expression_statement) "ml = next;" (assignment_expression) "ml = next" (identifier) "ml" (=) "=" (identifier) "next" (;) ";" (}) "}" (expression_statement) "free (ml);" (call_expression) "free (ml)" (identifier) "free" (argument_list) "(ml)" (() "(" (identifier) "ml" ()) ")" (;) ";" (}) "}" (function_definition) "static int info_from_stat(RMagic *ms, unsigned short md) {\n /* We cannot open it, but we were able to stat it. */\n if (md & 0222) {\n if (file_printf (ms, "writable, ") == -1) {\n return -1;\n }\n }\n if (md & 0111) {\n if (file_printf (ms, "executable, ") == -1) {\n return -1;\n }\n }\n if (S_ISREG (md)) {\n if (file_printf (ms, "regular file, ") == -1) {\n return -1;\n }\n }\n if (file_printf (ms, "no read permission") == -1) {\n return -1;\n }\n return 0;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "info_from_stat(RMagic *ms, unsigned short md)" (identifier) "info_from_stat" (parameter_list) "(RMagic *ms, unsigned short md)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "unsigned short md" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (identifier) "md" ()) ")" (compound_statement) "{\n /* We cannot open it, but we were able to stat it. */\n if (md & 0222) {\n if (file_printf (ms, "writable, ") == -1) {\n return -1;\n }\n }\n if (md & 0111) {\n if (file_printf (ms, "executable, ") == -1) {\n return -1;\n }\n }\n if (S_ISREG (md)) {\n if (file_printf (ms, "regular file, ") == -1) {\n return -1;\n }\n }\n if (file_printf (ms, "no read permission") == -1) {\n return -1;\n }\n return 0;\n}" ({) "{" (comment) "/* We cannot open it, but we were able to stat it. */" (if_statement) "if (md & 0222) {\n if (file_printf (ms, "writable, ") == -1) {\n return -1;\n }\n }" (if) "if" (parenthesized_expression) "(md & 0222)" (() "(" (binary_expression) "md & 0222" (identifier) "md" (&) "&" (number_literal) "0222" ()) ")" (compound_statement) "{\n if (file_printf (ms, "writable, ") == -1) {\n return -1;\n }\n }" ({) "{" (if_statement) "if (file_printf (ms, "writable, ") == -1) {\n return -1;\n }" (if) "if" (parenthesized_expression) "(file_printf (ms, "writable, ") == -1)" (() "(" (binary_expression) "file_printf (ms, "writable, ") == -1" (call_expression) "file_printf (ms, "writable, ")" (identifier) "file_printf" (argument_list) "(ms, "writable, ")" (() "(" (identifier) "ms" (,) "," (string_literal) ""writable, "" (") """ (string_content) "writable, " (") """ ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n return -1;\n }" ({) "{" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (}) "}" (if_statement) "if (md & 0111) {\n if (file_printf (ms, "executable, ") == -1) {\n return -1;\n }\n }" (if) "if" (parenthesized_expression) "(md & 0111)" (() "(" (binary_expression) "md & 0111" (identifier) "md" (&) "&" (number_literal) "0111" ()) ")" (compound_statement) "{\n if (file_printf (ms, "executable, ") == -1) {\n return -1;\n }\n }" ({) "{" (if_statement) "if (file_printf (ms, "executable, ") == -1) {\n return -1;\n }" (if) "if" (parenthesized_expression) "(file_printf (ms, "executable, ") == -1)" (() "(" (binary_expression) "file_printf (ms, "executable, ") == -1" (call_expression) "file_printf (ms, "executable, ")" (identifier) "file_printf" (argument_list) "(ms, "executable, ")" (() "(" (identifier) "ms" (,) "," (string_literal) ""executable, "" (") """ (string_content) "executable, " (") """ ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n return -1;\n }" ({) "{" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (}) "}" (if_statement) "if (S_ISREG (md)) {\n if (file_printf (ms, "regular file, ") == -1) {\n return -1;\n }\n }" (if) "if" (parenthesized_expression) "(S_ISREG (md))" (() "(" (call_expression) "S_ISREG (md)" (identifier) "S_ISREG" (argument_list) "(md)" (() "(" (identifier) "md" ()) ")" ()) ")" (compound_statement) "{\n if (file_printf (ms, "regular file, ") == -1) {\n return -1;\n }\n }" ({) "{" (if_statement) "if (file_printf (ms, "regular file, ") == -1) {\n return -1;\n }" (if) "if" (parenthesized_expression) "(file_printf (ms, "regular file, ") == -1)" (() "(" (binary_expression) "file_printf (ms, "regular file, ") == -1" (call_expression) "file_printf (ms, "regular file, ")" (identifier) "file_printf" (argument_list) "(ms, "regular file, ")" (() "(" (identifier) "ms" (,) "," (string_literal) ""regular file, "" (") """ (string_content) "regular file, " (") """ ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n return -1;\n }" ({) "{" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (}) "}" (if_statement) "if (file_printf (ms, "no read permission") == -1) {\n return -1;\n }" (if) "if" (parenthesized_expression) "(file_printf (ms, "no read permission") == -1)" (() "(" (binary_expression) "file_printf (ms, "no read permission") == -1" (call_expression) "file_printf (ms, "no read permission")" (identifier) "file_printf" (argument_list) "(ms, "no read permission")" (() "(" (identifier) "ms" (,) "," (string_literal) ""no read permission"" (") """ (string_content) "no read permission" (") """ ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n return -1;\n }" ({) "{" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "static void close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb) {\n if (fd >= 0) {\n close (fd);\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb)" (identifier) "close_and_restore" (parameter_list) "(const RMagic *ms, const char *name, int fd, const struct stat *sb)" (() "(" (parameter_declaration) "const RMagic *ms" (type_qualifier) "const" (const) "const" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "const char *name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*name" (*) "*" (identifier) "name" (,) "," (parameter_declaration) "int fd" (primitive_type) "int" (identifier) "fd" (,) "," (parameter_declaration) "const struct stat *sb" (type_qualifier) "const" (const) "const" (struct_specifier) "struct stat" (struct) "struct" (type_identifier) "stat" (pointer_declarator) "*sb" (*) "*" (identifier) "sb" ()) ")" (compound_statement) "{\n if (fd >= 0) {\n close (fd);\n }\n}" ({) "{" (if_statement) "if (fd >= 0) {\n close (fd);\n }" (if) "if" (parenthesized_expression) "(fd >= 0)" (() "(" (binary_expression) "fd >= 0" (identifier) "fd" (>=) ">=" (number_literal) "0" ()) ")" (compound_statement) "{\n close (fd);\n }" ({) "{" (expression_statement) "close (fd);" (call_expression) "close (fd)" (identifier) "close" (argument_list) "(fd)" (() "(" (identifier) "fd" ()) ")" (;) ";" (}) "}" (}) "}" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*file_or_fd(RMagic *ms, const char *inname, int fd)" (*) "*" (function_declarator) "file_or_fd(RMagic *ms, const char *inname, int fd)" (identifier) "file_or_fd" (parameter_list) "(RMagic *ms, const char *inname, int fd)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "const char *inname" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*inname" (*) "*" (identifier) "inname" (,) "," (parameter_declaration) "int fd" (primitive_type) "int" (identifier) "fd" ()) ")" ({) "{" (declaration) "bool ispipe = false;" (primitive_type) "bool" (init_declarator) "ispipe = false" (identifier) "ispipe" (=) "=" (false) "false" (;) ";" (declaration) "int rv = -1;" (primitive_type) "int" (init_declarator) "rv = -1" (identifier) "rv" (=) "=" (number_literal) "-1" (;) ";" (declaration) "unsigned char *buf;" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*buf" (*) "*" (identifier) "buf" (;) ";" (declaration) "struct stat sb;" (struct_specifier) "struct stat" (struct) "struct" (type_identifier) "stat" (identifier) "sb" (;) ";" (declaration) "int nbytes = 0;" (primitive_type) "int" (init_declarator) "nbytes = 0" (identifier) "nbytes" (=) "=" (number_literal) "0" (;) ";" (comment) "/* number of bytes read from a datafile */" (comment) "/*\n * one extra for terminating '\0', and\n * some overlapping space for matches near EOF\n */" (preproc_def) "#define SLOP (1 + sizeof(union VALUETYPE))\n" (#define) "#define" (identifier) "SLOP" (preproc_arg) "(1 + sizeof(union VALUETYPE))" (if_statement) "if (!(buf = malloc (HOWMANY + SLOP))) {\n return NULL;\n }" (if) "if" (parenthesized_expression) "(!(buf = malloc (HOWMANY + SLOP)))" (() "(" (unary_expression) "!(buf = malloc (HOWMANY + SLOP))" (!) "!" (parenthesized_expression) "(buf = malloc (HOWMANY + SLOP))" (() "(" (assignment_expression) "buf = malloc (HOWMANY + SLOP)" (identifier) "buf" (=) "=" (call_expression) "malloc (HOWMANY + SLOP)" (identifier) "malloc" (argument_list) "(HOWMANY + SLOP)" (() "(" (binary_expression) "HOWMANY + SLOP" (identifier) "HOWMANY" (+) "+" (identifier) "SLOP" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n return NULL;\n }" ({) "{" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (if_statement) "if (file_reset (ms) == -1) {\n goto done;\n }" (if) "if" (parenthesized_expression) "(file_reset (ms) == -1)" (() "(" (binary_expression) "file_reset (ms) == -1" (call_expression) "file_reset (ms)" (identifier) "file_reset" (argument_list) "(ms)" (() "(" (identifier) "ms" ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n goto done;\n }" ({) "{" (goto_statement) "goto done;" (goto) "goto" (statement_identifier) "done" (;) ";" (}) "}" (switch_statement) "switch (file_fsmagic (ms, inname, &sb)) {\n case -1: goto done; /* error */\n case 0: break; /* nothing found */\n default: rv = 0; goto done; /* matched it and printed type */\n }" (switch) "switch" (parenthesized_expression) "(file_fsmagic (ms, inname, &sb))" (() "(" (call_expression) "file_fsmagic (ms, inname, &sb)" (identifier) "file_fsmagic" (argument_list) "(ms, inname, &sb)" (() "(" (identifier) "ms" (,) "," (identifier) "inname" (,) "," (pointer_expression) "&sb" (&) "&" (identifier) "sb" ()) ")" ()) ")" (compound_statement) "{\n case -1: goto done; /* error */\n case 0: break; /* nothing found */\n default: rv = 0; goto done; /* matched it and printed type */\n }" ({) "{" (case_statement) "case -1: goto done;" (case) "case" (number_literal) "-1" (:) ":" (goto_statement) "goto done;" (goto) "goto" (statement_identifier) "done" (;) ";" (comment) "/* error */" (case_statement) "case 0: break;" (case) "case" (number_literal) "0" (:) ":" (break_statement) "break;" (break) "break" (;) ";" (comment) "/* nothing found */" (case_statement) "default: rv = 0; goto done;" (default) "default" (:) ":" (expression_statement) "rv = 0;" (assignment_expression) "rv = 0" (identifier) "rv" (=) "=" (number_literal) "0" (;) ";" (goto_statement) "goto done;" (goto) "goto" (statement_identifier) "done" (;) ";" (comment) "/* matched it and printed type */" (}) "}" (if_statement) "if (!inname) {\n if (fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n ispipe = true;\n }\n } else {\n int flags = O_RDONLY|O_BINARY;\n\n if (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n flags |= O_NONBLOCK;\n#endif\n ispipe = true;\n }\n errno = 0;\n if ((fd = open (inname, flags)) < 0) {\n eprintf ("couldn't open file\n");\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }\n#ifdef O_NONBLOCK\n if ((flags = fcntl (fd, F_GETFL)) != -1) {\n flags &= ~O_NONBLOCK;\n (void)fcntl (fd, F_SETFL, flags);\n }\n#endif\n }" (if) "if" (parenthesized_expression) "(!inname)" (() "(" (unary_expression) "!inname" (!) "!" (identifier) "inname" ()) ")" (compound_statement) "{\n if (fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n ispipe = true;\n }\n }" ({) "{" (if_statement) "if (fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n ispipe = true;\n }" (if) "if" (parenthesized_expression) "(fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode))" (() "(" (binary_expression) "fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)" (binary_expression) "fstat (fd, &sb) == 0" (call_expression) "fstat (fd, &sb)" (identifier) "fstat" (argument_list) "(fd, &sb)" (() "(" (identifier) "fd" (,) "," (pointer_expression) "&sb" (&) "&" (identifier) "sb" ()) ")" (==) "==" (number_literal) "0" (&&) "&&" (call_expression) "S_ISFIFO (sb.st_mode)" (identifier) "S_ISFIFO" (argument_list) "(sb.st_mode)" (() "(" (field_expression) "sb.st_mode" (identifier) "sb" (.) "." (field_identifier) "st_mode" ()) ")" ()) ")" (compound_statement) "{\n ispipe = true;\n }" ({) "{" (expression_statement) "ispipe = true;" (assignment_expression) "ispipe = true" (identifier) "ispipe" (=) "=" (true) "true" (;) ";" (}) "}" (}) "}" (else_clause) "else {\n int flags = O_RDONLY|O_BINARY;\n\n if (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n flags |= O_NONBLOCK;\n#endif\n ispipe = true;\n }\n errno = 0;\n if ((fd = open (inname, flags)) < 0) {\n eprintf ("couldn't open file\n");\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }\n#ifdef O_NONBLOCK\n if ((flags = fcntl (fd, F_GETFL)) != -1) {\n flags &= ~O_NONBLOCK;\n (void)fcntl (fd, F_SETFL, flags);\n }\n#endif\n }" (else) "else" (compound_statement) "{\n int flags = O_RDONLY|O_BINARY;\n\n if (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n flags |= O_NONBLOCK;\n#endif\n ispipe = true;\n }\n errno = 0;\n if ((fd = open (inname, flags)) < 0) {\n eprintf ("couldn't open file\n");\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }\n#ifdef O_NONBLOCK\n if ((flags = fcntl (fd, F_GETFL)) != -1) {\n flags &= ~O_NONBLOCK;\n (void)fcntl (fd, F_SETFL, flags);\n }\n#endif\n }" ({) "{" (declaration) "int flags = O_RDONLY|O_BINARY;" (primitive_type) "int" (init_declarator) "flags = O_RDONLY|O_BINARY" (identifier) "flags" (=) "=" (binary_expression) "O_RDONLY|O_BINARY" (identifier) "O_RDONLY" (|) "|" (identifier) "O_BINARY" (;) ";" (if_statement) "if (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n flags |= O_NONBLOCK;\n#endif\n ispipe = true;\n }" (if) "if" (parenthesized_expression) "(stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode))" (() "(" (binary_expression) "stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)" (binary_expression) "stat (inname, &sb) == 0" (call_expression) "stat (inname, &sb)" (identifier) "stat" (argument_list) "(inname, &sb)" (() "(" (identifier) "inname" (,) "," (pointer_expression) "&sb" (&) "&" (identifier) "sb" ()) ")" (==) "==" (number_literal) "0" (&&) "&&" (call_expression) "S_ISFIFO (sb.st_mode)" (identifier) "S_ISFIFO" (argument_list) "(sb.st_mode)" (() "(" (field_expression) "sb.st_mode" (identifier) "sb" (.) "." (field_identifier) "st_mode" ()) ")" ()) ")" (compound_statement) "{\n#if O_NONBLOCK\n flags |= O_NONBLOCK;\n#endif\n ispipe = true;\n }" ({) "{" (preproc_if) "#if O_NONBLOCK\n flags |= O_NONBLOCK;\n#endif" (#if) "#if" (identifier) "O_NONBLOCK" ( ) "\n" (expression_statement) "flags |= O_NONBLOCK;" (assignment_expression) "flags |= O_NONBLOCK" (identifier) "flags" (|=) "|=" (identifier) "O_NONBLOCK" (;) ";" (#endif) "#endif" (expression_statement) "ispipe = true;" (assignment_expression) "ispipe = true" (identifier) "ispipe" (=) "=" (true) "true" (;) ";" (}) "}" (expression_statement) "errno = 0;" (assignment_expression) "errno = 0" (identifier) "errno" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if ((fd = open (inname, flags)) < 0) {\n eprintf ("couldn't open file\n");\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }" (if) "if" (parenthesized_expression) "((fd = open (inname, flags)) < 0)" (() "(" (binary_expression) "(fd = open (inname, flags)) < 0" (parenthesized_expression) "(fd = open (inname, flags))" (() "(" (assignment_expression) "fd = open (inname, flags)" (identifier) "fd" (=) "=" (call_expression) "open (inname, flags)" (identifier) "open" (argument_list) "(inname, flags)" (() "(" (identifier) "inname" (,) "," (identifier) "flags" ()) ")" ()) ")" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n eprintf ("couldn't open file\n");\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }" ({) "{" (expression_statement) "eprintf ("couldn't open file\n");" (call_expression) "eprintf ("couldn't open file\n")" (identifier) "eprintf" (argument_list) "("couldn't open file\n")" (() "(" (string_literal) ""couldn't open file\n"" (") """ (string_content) "couldn't open file" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (if_statement) "if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }" (if) "if" (parenthesized_expression) "(info_from_stat (ms, sb.st_mode) == -1)" (() "(" (binary_expression) "info_from_stat (ms, sb.st_mode) == -1" (call_expression) "info_from_stat (ms, sb.st_mode)" (identifier) "info_from_stat" (argument_list) "(ms, sb.st_mode)" (() "(" (identifier) "ms" (,) "," (field_expression) "sb.st_mode" (identifier) "sb" (.) "." (field_identifier) "st_mode" ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n goto done;\n }" ({) "{" (goto_statement) "goto done;" (goto) "goto" (statement_identifier) "done" (;) ";" (}) "}" (expression_statement) "rv = 0;" (assignment_expression) "rv = 0" (identifier) "rv" (=) "=" (number_literal) "0" (;) ";" (goto_statement) "goto done;" (goto) "goto" (statement_identifier) "done" (;) ";" (}) "}" (preproc_ifdef) "#ifdef O_NONBLOCK\n if ((flags = fcntl (fd, F_GETFL)) != -1) {\n flags &= ~O_NONBLOCK;\n (void)fcntl (fd, F_SETFL, flags);\n }\n#endif" (#ifdef) "#ifdef" (identifier) "O_NONBLOCK" (if_statement) "if ((flags = fcntl (fd, F_GETFL)) != -1) {\n flags &= ~O_NONBLOCK;\n (void)fcntl (fd, F_SETFL, flags);\n }" (if) "if" (parenthesized_expression) "((flags = fcntl (fd, F_GETFL)) != -1)" (() "(" (binary_expression) "(flags = fcntl (fd, F_GETFL)) != -1" (parenthesized_expression) "(flags = fcntl (fd, F_GETFL))" (() "(" (assignment_expression) "flags = fcntl (fd, F_GETFL)" (identifier) "flags" (=) "=" (call_expression) "fcntl (fd, F_GETFL)" (identifier) "fcntl" (argument_list) "(fd, F_GETFL)" (() "(" (identifier) "fd" (,) "," (identifier) "F_GETFL" ()) ")" ()) ")" (!=) "!=" (number_literal) "-1" ()) ")" (compound_statement) "{\n flags &= ~O_NONBLOCK;\n (void)fcntl (fd, F_SETFL, flags);\n }" ({) "{" (expression_statement) "flags &= ~O_NONBLOCK;" (assignment_expression) "flags &= ~O_NONBLOCK" (identifier) "flags" (&=) "&=" (unary_expression) "~O_NONBLOCK" (~) "~" (identifier) "O_NONBLOCK" (;) ";" (expression_statement) "(void)fcntl (fd, F_SETFL, flags);" (cast_expression) "(void)fcntl (fd, F_SETFL, flags)" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (call_expression) "fcntl (fd, F_SETFL, flags)" (identifier) "fcntl" (argument_list) "(fd, F_SETFL, flags)" (() "(" (identifier) "fd" (,) "," (identifier) "F_SETFL" (,) "," (identifier) "flags" ()) ")" (;) ";" (}) "}" (#endif) "#endif" (}) "}" (comment) "/*\n * try looking at the first HOWMANY bytes\n */" (preproc_ifdef) "#ifdef O_NONBLOCK\n if (ispipe) {\n ssize_t r = 0;\n\n //while ((r = sread(fd, (void *)&buf[nbytes],\n while ((r = read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))) > 0) {\n nbytes += r;\n if (r < PIPE_BUF) {\n break;\n }\n }\n\n if (nbytes == 0) {\n /* We can not read it, but we were able to stat it. */\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }\n } else {\n#endif\n if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n file_error(ms, errno, "cannot read `%s'", inname);\n goto done;\n }\n#ifdef O_NONBLOCK\n }\n#endif\n\n (void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n if (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n goto done;\n }\n rv = 0;\ndone:\n free (buf);\n close_and_restore (ms, inname, fd, &sb);\n return rv == 0 ? file_getbuffer(ms) : NULL;\n}\n\n/* API */\n\n// TODO: reinitialize all the time\nR_API RMagic* r_magic_new(int flags) {\n RMagic *ms = R_NEW0 (RMagic);\n if (!ms) {\n return NULL;\n }\n r_magic_setflags (ms, flags);\n ms->o.buf = ms->o.pbuf = NULL;\n ms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li));\n if (!ms->c.li) {\n free (ms);\n return NULL;\n }\n file_reset (ms);\n ms->mlist = NULL;\n ms->file = "unknown";\n ms->line = 0;\n return ms;\n}\n\nR_API void r_magic_free(RMagic *ms) {\n if (ms) {\n free_mlist (ms->mlist);\n free (ms->o.pbuf);\n free (ms->o.buf);\n free (ms->c.li);\n free (ms);\n }\n}\n\nR_API bool r_magic_load_buffer(RMagic* ms, const char *magicdata) {\n if (*magicdata == '#') {\n struct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n } else {\n eprintf ("Magic buffers should start with #\n");\n }\n return false;\n}\n\nR_API bool r_magic_load(RMagic* ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n return false;\n}\n\nR_API bool r_magic_compile(RMagic *ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);\n free_mlist (ml);\n return ml != NULL;\n}\n\nR_API bool r_magic_check(RMagic *ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);\n free_mlist (ml);\n return ml != NULL;\n}\n\nR_API const char* r_magic_descriptor(RMagic *ms, int fd) {\n return file_or_fd (ms, NULL, fd);\n}\n\nR_API const char * r_magic_file(RMagic *ms, const char *inname) {\n return file_or_fd (ms, inname, 0); // 0 = stdin\n}\n\nR_API const char * r_magic_buffer(RMagic *ms, const void *buf, size_t nb) {\n if (file_reset (ms) == -1) {\n return NULL;\n }\n if (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n return NULL;\n }\n return file_getbuffer (ms);\n}\n\nR_API const char *r_magic_error(RMagic *ms) {\n if (ms && ms->haderr) {\n return ms->o.buf;\n }\n return NULL;\n}\n\nR_API int r_magic_errno(RMagic *ms) {\n if (ms && ms->haderr) {\n return ms->error;\n }\n return 0;\n}\n\nR_API void r_magic_setflags(RMagic *ms, int flags) {\n if (ms) {\n ms->flags = flags;\n }\n}\n#endif" (#ifdef) "#ifdef" (identifier) "O_NONBLOCK" (if_statement) "if (ispipe) {\n ssize_t r = 0;\n\n //while ((r = sread(fd, (void *)&buf[nbytes],\n while ((r = read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))) > 0) {\n nbytes += r;\n if (r < PIPE_BUF) {\n break;\n }\n }\n\n if (nbytes == 0) {\n /* We can not read it, but we were able to stat it. */\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }\n } else {\n#endif\n if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n file_error(ms, errno, "cannot read `%s'", inname);\n goto done;\n }\n#ifdef O_NONBLOCK\n }\n#endif\n\n (void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n if (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n goto done;\n }\n rv = 0;\ndone:\n free (buf);\n close_and_restore (ms, inname, fd, &sb);\n return rv == 0 ? file_getbuffer(ms) : NULL;\n}" (if) "if" (parenthesized_expression) "(ispipe)" (() "(" (identifier) "ispipe" ()) ")" (compound_statement) "{\n ssize_t r = 0;\n\n //while ((r = sread(fd, (void *)&buf[nbytes],\n while ((r = read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))) > 0) {\n nbytes += r;\n if (r < PIPE_BUF) {\n break;\n }\n }\n\n if (nbytes == 0) {\n /* We can not read it, but we were able to stat it. */\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }\n }" ({) "{" (declaration) "ssize_t r = 0;" (primitive_type) "ssize_t" (init_declarator) "r = 0" (identifier) "r" (=) "=" (number_literal) "0" (;) ";" (comment) "//while ((r = sread(fd, (void *)&buf[nbytes]," (while_statement) "while ((r = read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))) > 0) {\n nbytes += r;\n if (r < PIPE_BUF) {\n break;\n }\n }" (while) "while" (parenthesized_expression) "((r = read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))) > 0)" (() "(" (binary_expression) "(r = read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))) > 0" (parenthesized_expression) "(r = read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes)))" (() "(" (assignment_expression) "r = read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))" (identifier) "r" (=) "=" (call_expression) "read(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))" (identifier) "read" (argument_list) "(fd, (void *)&buf[nbytes],\n (size_t)(HOWMANY - nbytes))" (() "(" (identifier) "fd" (,) "," (cast_expression) "(void *)&buf[nbytes]" (() "(" (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&buf[nbytes]" (&) "&" (subscript_expression) "buf[nbytes]" (identifier) "buf" ([) "[" (identifier) "nbytes" (]) "]" (,) "," (cast_expression) "(size_t)(HOWMANY - nbytes)" (() "(" (type_descriptor) "size_t" (primitive_type) "size_t" ()) ")" (parenthesized_expression) "(HOWMANY - nbytes)" (() "(" (binary_expression) "HOWMANY - nbytes" (identifier) "HOWMANY" (-) "-" (identifier) "nbytes" ()) ")" ()) ")" ()) ")" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n nbytes += r;\n if (r < PIPE_BUF) {\n break;\n }\n }" ({) "{" (expression_statement) "nbytes += r;" (assignment_expression) "nbytes += r" (identifier) "nbytes" (+=) "+=" (identifier) "r" (;) ";" (if_statement) "if (r < PIPE_BUF) {\n break;\n }" (if) "if" (parenthesized_expression) "(r < PIPE_BUF)" (() "(" (binary_expression) "r < PIPE_BUF" (identifier) "r" (<) "<" (identifier) "PIPE_BUF" ()) ")" (compound_statement) "{\n break;\n }" ({) "{" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (if_statement) "if (nbytes == 0) {\n /* We can not read it, but we were able to stat it. */\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }" (if) "if" (parenthesized_expression) "(nbytes == 0)" (() "(" (binary_expression) "nbytes == 0" (identifier) "nbytes" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n /* We can not read it, but we were able to stat it. */\n if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }\n rv = 0;\n goto done;\n }" ({) "{" (comment) "/* We can not read it, but we were able to stat it. */" (if_statement) "if (info_from_stat (ms, sb.st_mode) == -1) {\n goto done;\n }" (if) "if" (parenthesized_expression) "(info_from_stat (ms, sb.st_mode) == -1)" (() "(" (binary_expression) "info_from_stat (ms, sb.st_mode) == -1" (call_expression) "info_from_stat (ms, sb.st_mode)" (identifier) "info_from_stat" (argument_list) "(ms, sb.st_mode)" (() "(" (identifier) "ms" (,) "," (field_expression) "sb.st_mode" (identifier) "sb" (.) "." (field_identifier) "st_mode" ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n goto done;\n }" ({) "{" (goto_statement) "goto done;" (goto) "goto" (statement_identifier) "done" (;) ";" (}) "}" (expression_statement) "rv = 0;" (assignment_expression) "rv = 0" (identifier) "rv" (=) "=" (number_literal) "0" (;) ";" (goto_statement) "goto done;" (goto) "goto" (statement_identifier) "done" (;) ";" (}) "}" (}) "}" (else_clause) "else {\n#endif\n if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n file_error(ms, errno, "cannot read `%s'", inname);\n goto done;\n }\n#ifdef O_NONBLOCK\n }\n#endif\n\n (void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n if (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n goto done;\n }\n rv = 0;\ndone:\n free (buf);\n close_and_restore (ms, inname, fd, &sb);\n return rv == 0 ? file_getbuffer(ms) : NULL;\n}" (else) "else" (compound_statement) "{\n#endif\n if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n file_error(ms, errno, "cannot read `%s'", inname);\n goto done;\n }\n#ifdef O_NONBLOCK\n }\n#endif\n\n (void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n if (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n goto done;\n }\n rv = 0;\ndone:\n free (buf);\n close_and_restore (ms, inname, fd, &sb);\n return rv == 0 ? file_getbuffer(ms) : NULL;\n}" ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (if_statement) "if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n file_error(ms, errno, "cannot read `%s'", inname);\n goto done;\n }" (if) "if" (parenthesized_expression) "((nbytes = read(fd, (char *)buf, HOWMANY)) == -1)" (() "(" (binary_expression) "(nbytes = read(fd, (char *)buf, HOWMANY)) == -1" (parenthesized_expression) "(nbytes = read(fd, (char *)buf, HOWMANY))" (() "(" (assignment_expression) "nbytes = read(fd, (char *)buf, HOWMANY)" (identifier) "nbytes" (=) "=" (call_expression) "read(fd, (char *)buf, HOWMANY)" (identifier) "read" (argument_list) "(fd, (char *)buf, HOWMANY)" (() "(" (identifier) "fd" (,) "," (cast_expression) "(char *)buf" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "buf" (,) "," (identifier) "HOWMANY" ()) ")" ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n file_error(ms, errno, "cannot read `%s'", inname);\n goto done;\n }" ({) "{" (expression_statement) "file_error(ms, errno, "cannot read `%s'", inname);" (call_expression) "file_error(ms, errno, "cannot read `%s'", inname)" (identifier) "file_error" (argument_list) "(ms, errno, "cannot read `%s'", inname)" (() "(" (identifier) "ms" (,) "," (identifier) "errno" (,) "," (string_literal) ""cannot read `%s'"" (") """ (string_content) "cannot read `%s'" (") """ (,) "," (identifier) "inname" ()) ")" (;) ";" (goto_statement) "goto done;" (goto) "goto" (statement_identifier) "done" (;) ";" (}) "}" (preproc_ifdef) "#ifdef O_NONBLOCK\n }\n#endif" (#ifdef) "#ifdef" (identifier) "O_NONBLOCK" (ERROR) "}" (}) "}" (#endif) "#endif" (expression_statement) "(void)memset (buf + nbytes, 0, SLOP);" (cast_expression) "(void)memset (buf + nbytes, 0, SLOP)" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (call_expression) "memset (buf + nbytes, 0, SLOP)" (identifier) "memset" (argument_list) "(buf + nbytes, 0, SLOP)" (() "(" (binary_expression) "buf + nbytes" (identifier) "buf" (+) "+" (identifier) "nbytes" (,) "," (number_literal) "0" (,) "," (identifier) "SLOP" ()) ")" (;) ";" (comment) "/* NUL terminate */" (if_statement) "if (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n goto done;\n }" (if) "if" (parenthesized_expression) "(file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1)" (() "(" (binary_expression) "file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1" (call_expression) "file_buffer (ms, fd, inname, buf, (size_t)nbytes)" (identifier) "file_buffer" (argument_list) "(ms, fd, inname, buf, (size_t)nbytes)" (() "(" (identifier) "ms" (,) "," (identifier) "fd" (,) "," (identifier) "inname" (,) "," (identifier) "buf" (,) "," (cast_expression) "(size_t)nbytes" (() "(" (type_descriptor) "size_t" (primitive_type) "size_t" ()) ")" (identifier) "nbytes" ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n goto done;\n }" ({) "{" (goto_statement) "goto done;" (goto) "goto" (statement_identifier) "done" (;) ";" (}) "}" (expression_statement) "rv = 0;" (assignment_expression) "rv = 0" (identifier) "rv" (=) "=" (number_literal) "0" (;) ";" (labeled_statement) "done:\n free (buf);" (statement_identifier) "done" (:) ":" (expression_statement) "free (buf);" (call_expression) "free (buf)" (identifier) "free" (argument_list) "(buf)" (() "(" (identifier) "buf" ()) ")" (;) ";" (expression_statement) "close_and_restore (ms, inname, fd, &sb);" (call_expression) "close_and_restore (ms, inname, fd, &sb)" (identifier) "close_and_restore" (argument_list) "(ms, inname, fd, &sb)" (() "(" (identifier) "ms" (,) "," (identifier) "inname" (,) "," (identifier) "fd" (,) "," (pointer_expression) "&sb" (&) "&" (identifier) "sb" ()) ")" (;) ";" (return_statement) "return rv == 0 ? file_getbuffer(ms) : NULL;" (return) "return" (conditional_expression) "rv == 0 ? file_getbuffer(ms) : NULL" (binary_expression) "rv == 0" (identifier) "rv" (==) "==" (number_literal) "0" (?) "?" (call_expression) "file_getbuffer(ms)" (identifier) "file_getbuffer" (argument_list) "(ms)" (() "(" (identifier) "ms" ()) ")" (:) ":" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (comment) "/* API */" (comment) "// TODO: reinitialize all the time" (function_definition) "R_API RMagic* r_magic_new(int flags) {\n RMagic *ms = R_NEW0 (RMagic);\n if (!ms) {\n return NULL;\n }\n r_magic_setflags (ms, flags);\n ms->o.buf = ms->o.pbuf = NULL;\n ms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li));\n if (!ms->c.li) {\n free (ms);\n return NULL;\n }\n file_reset (ms);\n ms->mlist = NULL;\n ms->file = "unknown";\n ms->line = 0;\n return ms;\n}" (type_identifier) "R_API" (ERROR) "RMagic" (identifier) "RMagic" (pointer_declarator) "* r_magic_new(int flags)" (*) "*" (function_declarator) "r_magic_new(int flags)" (identifier) "r_magic_new" (parameter_list) "(int flags)" (() "(" (parameter_declaration) "int flags" (primitive_type) "int" (identifier) "flags" ()) ")" (compound_statement) "{\n RMagic *ms = R_NEW0 (RMagic);\n if (!ms) {\n return NULL;\n }\n r_magic_setflags (ms, flags);\n ms->o.buf = ms->o.pbuf = NULL;\n ms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li));\n if (!ms->c.li) {\n free (ms);\n return NULL;\n }\n file_reset (ms);\n ms->mlist = NULL;\n ms->file = "unknown";\n ms->line = 0;\n return ms;\n}" ({) "{" (declaration) "RMagic *ms = R_NEW0 (RMagic);" (type_identifier) "RMagic" (init_declarator) "*ms = R_NEW0 (RMagic)" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" (=) "=" (call_expression) "R_NEW0 (RMagic)" (identifier) "R_NEW0" (argument_list) "(RMagic)" (() "(" (identifier) "RMagic" ()) ")" (;) ";" (if_statement) "if (!ms) {\n return NULL;\n }" (if) "if" (parenthesized_expression) "(!ms)" (() "(" (unary_expression) "!ms" (!) "!" (identifier) "ms" ()) ")" (compound_statement) "{\n return NULL;\n }" ({) "{" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "r_magic_setflags (ms, flags);" (call_expression) "r_magic_setflags (ms, flags)" (identifier) "r_magic_setflags" (argument_list) "(ms, flags)" (() "(" (identifier) "ms" (,) "," (identifier) "flags" ()) ")" (;) ";" (expression_statement) "ms->o.buf = ms->o.pbuf = NULL;" (assignment_expression) "ms->o.buf = ms->o.pbuf = NULL" (field_expression) "ms->o.buf" (field_expression) "ms->o" (identifier) "ms" (->) "->" (field_identifier) "o" (.) "." (field_identifier) "buf" (=) "=" (assignment_expression) "ms->o.pbuf = NULL" (field_expression) "ms->o.pbuf" (field_expression) "ms->o" (identifier) "ms" (->) "->" (field_identifier) "o" (.) "." (field_identifier) "pbuf" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "ms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li));" (assignment_expression) "ms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li))" (field_expression) "ms->c.li" (field_expression) "ms->c" (identifier) "ms" (->) "->" (field_identifier) "c" (.) "." (field_identifier) "li" (=) "=" (call_expression) "malloc ((ms->c.len = 10) * sizeof (*ms->c.li))" (identifier) "malloc" (argument_list) "((ms->c.len = 10) * sizeof (*ms->c.li))" (() "(" (binary_expression) "(ms->c.len = 10) * sizeof (*ms->c.li)" (parenthesized_expression) "(ms->c.len = 10)" (() "(" (assignment_expression) "ms->c.len = 10" (field_expression) "ms->c.len" (field_expression) "ms->c" (identifier) "ms" (->) "->" (field_identifier) "c" (.) "." (field_identifier) "len" (=) "=" (number_literal) "10" ()) ")" (*) "*" (sizeof_expression) "sizeof (*ms->c.li)" (sizeof) "sizeof" (parenthesized_expression) "(*ms->c.li)" (() "(" (pointer_expression) "*ms->c.li" (*) "*" (field_expression) "ms->c.li" (field_expression) "ms->c" (identifier) "ms" (->) "->" (field_identifier) "c" (.) "." (field_identifier) "li" ()) ")" ()) ")" (;) ";" (if_statement) "if (!ms->c.li) {\n free (ms);\n return NULL;\n }" (if) "if" (parenthesized_expression) "(!ms->c.li)" (() "(" (unary_expression) "!ms->c.li" (!) "!" (field_expression) "ms->c.li" (field_expression) "ms->c" (identifier) "ms" (->) "->" (field_identifier) "c" (.) "." (field_identifier) "li" ()) ")" (compound_statement) "{\n free (ms);\n return NULL;\n }" ({) "{" (expression_statement) "free (ms);" (call_expression) "free (ms)" (identifier) "free" (argument_list) "(ms)" (() "(" (identifier) "ms" ()) ")" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "file_reset (ms);" (call_expression) "file_reset (ms)" (identifier) "file_reset" (argument_list) "(ms)" (() "(" (identifier) "ms" ()) ")" (;) ";" (expression_statement) "ms->mlist = NULL;" (assignment_expression) "ms->mlist = NULL" (field_expression) "ms->mlist" (identifier) "ms" (->) "->" (field_identifier) "mlist" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "ms->file = "unknown";" (assignment_expression) "ms->file = "unknown"" (field_expression) "ms->file" (identifier) "ms" (->) "->" (field_identifier) "file" (=) "=" (string_literal) ""unknown"" (") """ (string_content) "unknown" (") """ (;) ";" (expression_statement) "ms->line = 0;" (assignment_expression) "ms->line = 0" (field_expression) "ms->line" (identifier) "ms" (->) "->" (field_identifier) "line" (=) "=" (number_literal) "0" (;) ";" (return_statement) "return ms;" (return) "return" (identifier) "ms" (;) ";" (}) "}" (function_definition) "R_API void r_magic_free(RMagic *ms) {\n if (ms) {\n free_mlist (ms->mlist);\n free (ms->o.pbuf);\n free (ms->o.buf);\n free (ms->c.li);\n free (ms);\n }\n}" (type_identifier) "R_API" (ERROR) "void" (identifier) "void" (function_declarator) "r_magic_free(RMagic *ms)" (identifier) "r_magic_free" (parameter_list) "(RMagic *ms)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" ()) ")" (compound_statement) "{\n if (ms) {\n free_mlist (ms->mlist);\n free (ms->o.pbuf);\n free (ms->o.buf);\n free (ms->c.li);\n free (ms);\n }\n}" ({) "{" (if_statement) "if (ms) {\n free_mlist (ms->mlist);\n free (ms->o.pbuf);\n free (ms->o.buf);\n free (ms->c.li);\n free (ms);\n }" (if) "if" (parenthesized_expression) "(ms)" (() "(" (identifier) "ms" ()) ")" (compound_statement) "{\n free_mlist (ms->mlist);\n free (ms->o.pbuf);\n free (ms->o.buf);\n free (ms->c.li);\n free (ms);\n }" ({) "{" (expression_statement) "free_mlist (ms->mlist);" (call_expression) "free_mlist (ms->mlist)" (identifier) "free_mlist" (argument_list) "(ms->mlist)" (() "(" (field_expression) "ms->mlist" (identifier) "ms" (->) "->" (field_identifier) "mlist" ()) ")" (;) ";" (expression_statement) "free (ms->o.pbuf);" (call_expression) "free (ms->o.pbuf)" (identifier) "free" (argument_list) "(ms->o.pbuf)" (() "(" (field_expression) "ms->o.pbuf" (field_expression) "ms->o" (identifier) "ms" (->) "->" (field_identifier) "o" (.) "." (field_identifier) "pbuf" ()) ")" (;) ";" (expression_statement) "free (ms->o.buf);" (call_expression) "free (ms->o.buf)" (identifier) "free" (argument_list) "(ms->o.buf)" (() "(" (field_expression) "ms->o.buf" (field_expression) "ms->o" (identifier) "ms" (->) "->" (field_identifier) "o" (.) "." (field_identifier) "buf" ()) ")" (;) ";" (expression_statement) "free (ms->c.li);" (call_expression) "free (ms->c.li)" (identifier) "free" (argument_list) "(ms->c.li)" (() "(" (field_expression) "ms->c.li" (field_expression) "ms->c" (identifier) "ms" (->) "->" (field_identifier) "c" (.) "." (field_identifier) "li" ()) ")" (;) ";" (expression_statement) "free (ms);" (call_expression) "free (ms)" (identifier) "free" (argument_list) "(ms)" (() "(" (identifier) "ms" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "R_API bool r_magic_load_buffer(RMagic* ms, const char *magicdata) {\n if (*magicdata == '#') {\n struct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n } else {\n eprintf ("Magic buffers should start with #\n");\n }\n return false;\n}" (type_identifier) "R_API" (ERROR) "bool" (identifier) "bool" (function_declarator) "r_magic_load_buffer(RMagic* ms, const char *magicdata)" (identifier) "r_magic_load_buffer" (parameter_list) "(RMagic* ms, const char *magicdata)" (() "(" (parameter_declaration) "RMagic* ms" (type_identifier) "RMagic" (pointer_declarator) "* ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "const char *magicdata" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*magicdata" (*) "*" (identifier) "magicdata" ()) ")" (compound_statement) "{\n if (*magicdata == '#') {\n struct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n } else {\n eprintf ("Magic buffers should start with #\n");\n }\n return false;\n}" ({) "{" (if_statement) "if (*magicdata == '#') {\n struct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n } else {\n eprintf ("Magic buffers should start with #\n");\n }" (if) "if" (parenthesized_expression) "(*magicdata == '#')" (() "(" (binary_expression) "*magicdata == '#'" (pointer_expression) "*magicdata" (*) "*" (identifier) "magicdata" (==) "==" (char_literal) "'#'" (') "'" (character) "#" (') "'" ()) ")" (compound_statement) "{\n struct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n }" ({) "{" (declaration) "struct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);" (struct_specifier) "struct mlist" (struct) "struct" (type_identifier) "mlist" (init_declarator) "*ml = file_apprentice (ms, magicdata, FILE_LOAD)" (pointer_declarator) "*ml" (*) "*" (identifier) "ml" (=) "=" (call_expression) "file_apprentice (ms, magicdata, FILE_LOAD)" (identifier) "file_apprentice" (argument_list) "(ms, magicdata, FILE_LOAD)" (() "(" (identifier) "ms" (,) "," (identifier) "magicdata" (,) "," (identifier) "FILE_LOAD" ()) ")" (;) ";" (if_statement) "if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }" (if) "if" (parenthesized_expression) "(ml)" (() "(" (identifier) "ml" ()) ")" (compound_statement) "{\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }" ({) "{" (expression_statement) "free_mlist (ms->mlist);" (call_expression) "free_mlist (ms->mlist)" (identifier) "free_mlist" (argument_list) "(ms->mlist)" (() "(" (field_expression) "ms->mlist" (identifier) "ms" (->) "->" (field_identifier) "mlist" ()) ")" (;) ";" (expression_statement) "ms->mlist = ml;" (assignment_expression) "ms->mlist = ml" (field_expression) "ms->mlist" (identifier) "ms" (->) "->" (field_identifier) "mlist" (=) "=" (identifier) "ml" (;) ";" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (}) "}" (else_clause) "else {\n eprintf ("Magic buffers should start with #\n");\n }" (else) "else" (compound_statement) "{\n eprintf ("Magic buffers should start with #\n");\n }" ({) "{" (expression_statement) "eprintf ("Magic buffers should start with #\n");" (call_expression) "eprintf ("Magic buffers should start with #\n")" (identifier) "eprintf" (argument_list) "("Magic buffers should start with #\n")" (() "(" (string_literal) ""Magic buffers should start with #\n"" (") """ (string_content) "Magic buffers should start with #" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (function_definition) "R_API bool r_magic_load(RMagic* ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n return false;\n}" (type_identifier) "R_API" (ERROR) "bool" (identifier) "bool" (function_declarator) "r_magic_load(RMagic* ms, const char *magicfile)" (identifier) "r_magic_load" (parameter_list) "(RMagic* ms, const char *magicfile)" (() "(" (parameter_declaration) "RMagic* ms" (type_identifier) "RMagic" (pointer_declarator) "* ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "const char *magicfile" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*magicfile" (*) "*" (identifier) "magicfile" ()) ")" (compound_statement) "{\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);\n if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }\n return false;\n}" ({) "{" (declaration) "struct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);" (struct_specifier) "struct mlist" (struct) "struct" (type_identifier) "mlist" (init_declarator) "*ml = file_apprentice (ms, magicfile, FILE_LOAD)" (pointer_declarator) "*ml" (*) "*" (identifier) "ml" (=) "=" (call_expression) "file_apprentice (ms, magicfile, FILE_LOAD)" (identifier) "file_apprentice" (argument_list) "(ms, magicfile, FILE_LOAD)" (() "(" (identifier) "ms" (,) "," (identifier) "magicfile" (,) "," (identifier) "FILE_LOAD" ()) ")" (;) ";" (if_statement) "if (ml) {\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }" (if) "if" (parenthesized_expression) "(ml)" (() "(" (identifier) "ml" ()) ")" (compound_statement) "{\n free_mlist (ms->mlist);\n ms->mlist = ml;\n return true;\n }" ({) "{" (expression_statement) "free_mlist (ms->mlist);" (call_expression) "free_mlist (ms->mlist)" (identifier) "free_mlist" (argument_list) "(ms->mlist)" (() "(" (field_expression) "ms->mlist" (identifier) "ms" (->) "->" (field_identifier) "mlist" ()) ")" (;) ";" (expression_statement) "ms->mlist = ml;" (assignment_expression) "ms->mlist = ml" (field_expression) "ms->mlist" (identifier) "ms" (->) "->" (field_identifier) "mlist" (=) "=" (identifier) "ml" (;) ";" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (function_definition) "R_API bool r_magic_compile(RMagic *ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);\n free_mlist (ml);\n return ml != NULL;\n}" (type_identifier) "R_API" (ERROR) "bool" (identifier) "bool" (function_declarator) "r_magic_compile(RMagic *ms, const char *magicfile)" (identifier) "r_magic_compile" (parameter_list) "(RMagic *ms, const char *magicfile)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "const char *magicfile" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*magicfile" (*) "*" (identifier) "magicfile" ()) ")" (compound_statement) "{\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);\n free_mlist (ml);\n return ml != NULL;\n}" ({) "{" (declaration) "struct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);" (struct_specifier) "struct mlist" (struct) "struct" (type_identifier) "mlist" (init_declarator) "*ml = file_apprentice (ms, magicfile, FILE_COMPILE)" (pointer_declarator) "*ml" (*) "*" (identifier) "ml" (=) "=" (call_expression) "file_apprentice (ms, magicfile, FILE_COMPILE)" (identifier) "file_apprentice" (argument_list) "(ms, magicfile, FILE_COMPILE)" (() "(" (identifier) "ms" (,) "," (identifier) "magicfile" (,) "," (identifier) "FILE_COMPILE" ()) ")" (;) ";" (expression_statement) "free_mlist (ml);" (call_expression) "free_mlist (ml)" (identifier) "free_mlist" (argument_list) "(ml)" (() "(" (identifier) "ml" ()) ")" (;) ";" (return_statement) "return ml != NULL;" (return) "return" (binary_expression) "ml != NULL" (identifier) "ml" (!=) "!=" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (function_definition) "R_API bool r_magic_check(RMagic *ms, const char *magicfile) {\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);\n free_mlist (ml);\n return ml != NULL;\n}" (type_identifier) "R_API" (ERROR) "bool" (identifier) "bool" (function_declarator) "r_magic_check(RMagic *ms, const char *magicfile)" (identifier) "r_magic_check" (parameter_list) "(RMagic *ms, const char *magicfile)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "const char *magicfile" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*magicfile" (*) "*" (identifier) "magicfile" ()) ")" (compound_statement) "{\n struct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);\n free_mlist (ml);\n return ml != NULL;\n}" ({) "{" (declaration) "struct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);" (struct_specifier) "struct mlist" (struct) "struct" (type_identifier) "mlist" (init_declarator) "*ml = file_apprentice (ms, magicfile, FILE_CHECK)" (pointer_declarator) "*ml" (*) "*" (identifier) "ml" (=) "=" (call_expression) "file_apprentice (ms, magicfile, FILE_CHECK)" (identifier) "file_apprentice" (argument_list) "(ms, magicfile, FILE_CHECK)" (() "(" (identifier) "ms" (,) "," (identifier) "magicfile" (,) "," (identifier) "FILE_CHECK" ()) ")" (;) ";" (expression_statement) "free_mlist (ml);" (call_expression) "free_mlist (ml)" (identifier) "free_mlist" (argument_list) "(ml)" (() "(" (identifier) "ml" ()) ")" (;) ";" (return_statement) "return ml != NULL;" (return) "return" (binary_expression) "ml != NULL" (identifier) "ml" (!=) "!=" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (function_definition) "R_API const char* r_magic_descriptor(RMagic *ms, int fd) {\n return file_or_fd (ms, NULL, fd);\n}" (type_identifier) "R_API" (type_qualifier) "const" (const) "const" (ERROR) "char" (identifier) "char" (pointer_declarator) "* r_magic_descriptor(RMagic *ms, int fd)" (*) "*" (function_declarator) "r_magic_descriptor(RMagic *ms, int fd)" (identifier) "r_magic_descriptor" (parameter_list) "(RMagic *ms, int fd)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "int fd" (primitive_type) "int" (identifier) "fd" ()) ")" (compound_statement) "{\n return file_or_fd (ms, NULL, fd);\n}" ({) "{" (return_statement) "return file_or_fd (ms, NULL, fd);" (return) "return" (call_expression) "file_or_fd (ms, NULL, fd)" (identifier) "file_or_fd" (argument_list) "(ms, NULL, fd)" (() "(" (identifier) "ms" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (identifier) "fd" ()) ")" (;) ";" (}) "}" (function_definition) "R_API const char * r_magic_file(RMagic *ms, const char *inname) {\n return file_or_fd (ms, inname, 0); // 0 = stdin\n}" (type_identifier) "R_API" (type_qualifier) "const" (const) "const" (ERROR) "char" (identifier) "char" (pointer_declarator) "* r_magic_file(RMagic *ms, const char *inname)" (*) "*" (function_declarator) "r_magic_file(RMagic *ms, const char *inname)" (identifier) "r_magic_file" (parameter_list) "(RMagic *ms, const char *inname)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "const char *inname" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*inname" (*) "*" (identifier) "inname" ()) ")" (compound_statement) "{\n return file_or_fd (ms, inname, 0); // 0 = stdin\n}" ({) "{" (return_statement) "return file_or_fd (ms, inname, 0);" (return) "return" (call_expression) "file_or_fd (ms, inname, 0)" (identifier) "file_or_fd" (argument_list) "(ms, inname, 0)" (() "(" (identifier) "ms" (,) "," (identifier) "inname" (,) "," (number_literal) "0" ()) ")" (;) ";" (comment) "// 0 = stdin" (}) "}" (function_definition) "R_API const char * r_magic_buffer(RMagic *ms, const void *buf, size_t nb) {\n if (file_reset (ms) == -1) {\n return NULL;\n }\n if (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n return NULL;\n }\n return file_getbuffer (ms);\n}" (type_identifier) "R_API" (type_qualifier) "const" (const) "const" (ERROR) "char" (identifier) "char" (pointer_declarator) "* r_magic_buffer(RMagic *ms, const void *buf, size_t nb)" (*) "*" (function_declarator) "r_magic_buffer(RMagic *ms, const void *buf, size_t nb)" (identifier) "r_magic_buffer" (parameter_list) "(RMagic *ms, const void *buf, size_t nb)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "const void *buf" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*buf" (*) "*" (identifier) "buf" (,) "," (parameter_declaration) "size_t nb" (primitive_type) "size_t" (identifier) "nb" ()) ")" (compound_statement) "{\n if (file_reset (ms) == -1) {\n return NULL;\n }\n if (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n return NULL;\n }\n return file_getbuffer (ms);\n}" ({) "{" (if_statement) "if (file_reset (ms) == -1) {\n return NULL;\n }" (if) "if" (parenthesized_expression) "(file_reset (ms) == -1)" (() "(" (binary_expression) "file_reset (ms) == -1" (call_expression) "file_reset (ms)" (identifier) "file_reset" (argument_list) "(ms)" (() "(" (identifier) "ms" ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n return NULL;\n }" ({) "{" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (if_statement) "if (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n return NULL;\n }" (if) "if" (parenthesized_expression) "(file_buffer (ms, -1, NULL, buf, nb) == -1)" (() "(" (binary_expression) "file_buffer (ms, -1, NULL, buf, nb) == -1" (call_expression) "file_buffer (ms, -1, NULL, buf, nb)" (identifier) "file_buffer" (argument_list) "(ms, -1, NULL, buf, nb)" (() "(" (identifier) "ms" (,) "," (number_literal) "-1" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (identifier) "buf" (,) "," (identifier) "nb" ()) ")" (==) "==" (number_literal) "-1" ()) ")" (compound_statement) "{\n return NULL;\n }" ({) "{" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (return_statement) "return file_getbuffer (ms);" (return) "return" (call_expression) "file_getbuffer (ms)" (identifier) "file_getbuffer" (argument_list) "(ms)" (() "(" (identifier) "ms" ()) ")" (;) ";" (}) "}" (function_definition) "R_API const char *r_magic_error(RMagic *ms) {\n if (ms && ms->haderr) {\n return ms->o.buf;\n }\n return NULL;\n}" (type_identifier) "R_API" (type_qualifier) "const" (const) "const" (ERROR) "char" (identifier) "char" (pointer_declarator) "*r_magic_error(RMagic *ms)" (*) "*" (function_declarator) "r_magic_error(RMagic *ms)" (identifier) "r_magic_error" (parameter_list) "(RMagic *ms)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" ()) ")" (compound_statement) "{\n if (ms && ms->haderr) {\n return ms->o.buf;\n }\n return NULL;\n}" ({) "{" (if_statement) "if (ms && ms->haderr) {\n return ms->o.buf;\n }" (if) "if" (parenthesized_expression) "(ms && ms->haderr)" (() "(" (binary_expression) "ms && ms->haderr" (identifier) "ms" (&&) "&&" (field_expression) "ms->haderr" (identifier) "ms" (->) "->" (field_identifier) "haderr" ()) ")" (compound_statement) "{\n return ms->o.buf;\n }" ({) "{" (return_statement) "return ms->o.buf;" (return) "return" (field_expression) "ms->o.buf" (field_expression) "ms->o" (identifier) "ms" (->) "->" (field_identifier) "o" (.) "." (field_identifier) "buf" (;) ";" (}) "}" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (function_definition) "R_API int r_magic_errno(RMagic *ms) {\n if (ms && ms->haderr) {\n return ms->error;\n }\n return 0;\n}" (type_identifier) "R_API" (ERROR) "int" (identifier) "int" (function_declarator) "r_magic_errno(RMagic *ms)" (identifier) "r_magic_errno" (parameter_list) "(RMagic *ms)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" ()) ")" (compound_statement) "{\n if (ms && ms->haderr) {\n return ms->error;\n }\n return 0;\n}" ({) "{" (if_statement) "if (ms && ms->haderr) {\n return ms->error;\n }" (if) "if" (parenthesized_expression) "(ms && ms->haderr)" (() "(" (binary_expression) "ms && ms->haderr" (identifier) "ms" (&&) "&&" (field_expression) "ms->haderr" (identifier) "ms" (->) "->" (field_identifier) "haderr" ()) ")" (compound_statement) "{\n return ms->error;\n }" ({) "{" (return_statement) "return ms->error;" (return) "return" (field_expression) "ms->error" (identifier) "ms" (->) "->" (field_identifier) "error" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "R_API void r_magic_setflags(RMagic *ms, int flags) {\n if (ms) {\n ms->flags = flags;\n }\n}" (type_identifier) "R_API" (ERROR) "void" (identifier) "void" (function_declarator) "r_magic_setflags(RMagic *ms, int flags)" (identifier) "r_magic_setflags" (parameter_list) "(RMagic *ms, int flags)" (() "(" (parameter_declaration) "RMagic *ms" (type_identifier) "RMagic" (pointer_declarator) "*ms" (*) "*" (identifier) "ms" (,) "," (parameter_declaration) "int flags" (primitive_type) "int" (identifier) "flags" ()) ")" (compound_statement) "{\n if (ms) {\n ms->flags = flags;\n }\n}" ({) "{" (if_statement) "if (ms) {\n ms->flags = flags;\n }" (if) "if" (parenthesized_expression) "(ms)" (() "(" (identifier) "ms" ()) ")" (compound_statement) "{\n ms->flags = flags;\n }" ({) "{" (expression_statement) "ms->flags = flags;" (assignment_expression) "ms->flags = flags" (field_expression) "ms->flags" (identifier) "ms" (->) "->" (field_identifier) "flags" (=) "=" (identifier) "flags" (;) ";" (}) "}" (}) "}" (#endif) "#endif"
2,499
25
{"language": "c", "success": true, "metadata": {"lines": 268, "avg_line_length": 24.82, "nodes": 1531, "errors": 0, "source_hash": "d946fd7fc193c1ba0ac9b5b5ffa2cd19a66edfcbf680d4f568ad4f7773d02fb5", "categorized_nodes": 1050}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <r_userconf.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<r_userconf.h>", "parent": 0, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 23}}, {"id": 3, "type": "preproc_include", "text": "#include <r_magic.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<r_magic.h>", "parent": 3, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 20}}, {"id": 6, "type": "call_expression", "text": "R_LIB_VERSION (r_magic)", "parent": null, "children": [7, 8], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 23}}, {"id": 7, "type": "identifier", "text": "R_LIB_VERSION", "parent": 6, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 13}}, {"id": 8, "type": "argument_list", "text": "(r_magic)", "parent": 6, "children": [9], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 23}}, {"id": 9, "type": "identifier", "text": "r_magic", "parent": 8, "children": [], "start_point": {"row": 6, "column": 15}, "end_point": {"row": 6, "column": 22}}, {"id": 10, "type": "preproc_ifdef", "text": "#ifdef _MSC_VER\n# include <io.h>\n# include <sys\\stat.h>\n# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)\n# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)\n# define S_IFIFO (-1)\n# define S_ISFIFO(m) (((m) & S_IFIFO) == S_IFIFO)\n# define MAXPATHLEN 255\n#endif", "parent": null, "children": [11, 12, 13, 16, 19, 25, 31, 35, 41, 45], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 11, "type": "#ifdef", "text": "#ifdef", "parent": 10, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 12, "type": "identifier", "text": "_MSC_VER", "parent": 10, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 15}}, {"id": 13, "type": "preproc_include", "text": "# include <io.h>\n", "parent": 10, "children": [14, 15], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 14, "type": "#include", "text": "# include", "parent": 13, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 9}}, {"id": 15, "type": "system_lib_string", "text": "<io.h>", "parent": 13, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 16}}, {"id": 16, "type": "preproc_include", "text": "# include <sys\\stat.h>\n", "parent": 10, "children": [17, 18], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 17, "type": "#include", "text": "# include", "parent": 16, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 9}}, {"id": 18, "type": "system_lib_string", "text": "<sys\\stat.h>", "parent": 16, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 22}}, {"id": 19, "type": "preproc_function_def", "text": "# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)\n", "parent": 10, "children": [20, 21, 22, 24], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 20, "type": "#define", "text": "# define", "parent": 19, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 21, "type": "identifier", "text": "S_ISREG", "parent": 19, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 16}}, {"id": 22, "type": "preproc_params", "text": "(m)", "parent": 19, "children": [23], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 19}}, {"id": 23, "type": "identifier", "text": "m", "parent": 22, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 18}}, {"id": 24, "type": "preproc_arg", "text": "(((m) & S_IFMT) == S_IFREG)", "parent": 19, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 47}}, {"id": 25, "type": "preproc_function_def", "text": "# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)\n", "parent": 10, "children": [26, 27, 28, 30], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 26, "type": "#define", "text": "# define", "parent": 25, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 27, "type": "identifier", "text": "S_ISDIR", "parent": 25, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 16}}, {"id": 28, "type": "preproc_params", "text": "(m)", "parent": 25, "children": [29], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 19}}, {"id": 29, "type": "identifier", "text": "m", "parent": 28, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 18}}, {"id": 30, "type": "preproc_arg", "text": "(((m) & S_IFMT) == S_IFDIR)", "parent": 25, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 47}}, {"id": 31, "type": "preproc_def", "text": "# define S_IFIFO (-1)\n", "parent": 10, "children": [32, 33, 34], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 32, "type": "#define", "text": "# define", "parent": 31, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 33, "type": "identifier", "text": "S_IFIFO", "parent": 31, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 16}}, {"id": 34, "type": "preproc_arg", "text": "(-1)", "parent": 31, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 21}}, {"id": 35, "type": "preproc_function_def", "text": "# define S_ISFIFO(m) (((m) & S_IFIFO) == S_IFIFO)\n", "parent": 10, "children": [36, 37, 38, 40], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 36, "type": "#define", "text": "# define", "parent": 35, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 37, "type": "identifier", "text": "S_ISFIFO", "parent": 35, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 17}}, {"id": 38, "type": "preproc_params", "text": "(m)", "parent": 35, "children": [39], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 20}}, {"id": 39, "type": "identifier", "text": "m", "parent": 38, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 19}}, {"id": 40, "type": "preproc_arg", "text": "(((m) & S_IFIFO) == S_IFIFO)", "parent": 35, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 49}}, {"id": 41, "type": "preproc_def", "text": "# define MAXPATHLEN 255\n", "parent": 10, "children": [42, 43, 44], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 42, "type": "#define", "text": "# define", "parent": 41, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 43, "type": "identifier", "text": "MAXPATHLEN", "parent": 41, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 19}}, {"id": 44, "type": "preproc_arg", "text": "255", "parent": 41, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 23}}, {"id": 45, "type": "#endif", "text": "#endif", "parent": 10, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 46, "type": "ERROR", "text": "#if USE_LIB_MAGIC\n\n// we keep this code just to make debian happy, but we should use\n// our own magic implementation for consistency reasons\n#include <magic.h>\n#undef R_API\n#define R_API\n\nR_API RMagic* r_magic_new(int flags) { return magic_open (flags); }\nR_API void r_magic_free(RMagic* m) { if (m) { magic_close (m); } }\nR_API const char *r_magic_file(RMagic* m, const char * f) { return magic_file (m, f); } \nR_API const char *r_magic_descriptor(RMagic* m, int fd) { return magic_descriptor (m, fd); }\nR_API const char *r_magic_buffer(RMagic* m, const void *b, size_t s) { return magic_buffer (m, b, s); }\nR_API const char *r_magic_error(RMagic* m) { return magic_error (m); }\nR_API void r_magic_setflags(RMagic* m, int f) { magic_setflags (m, f); }\nR_API bool r_magic_load(RMagic* m, const char *f) { return magic_load (m, f) != -1; }\nR_API bool r_magic_compile(RMagic* m, const char *x) { return magic_compile (m, x) != -1; }\nR_API bool r_magic_check(RMagic* m, const char *x) { return magic_check (m, x) != -1; }\nR_API int r_magic_errno(RMagic* m) { return magic_errno (m); }\n\n#else\n\n/* use embedded magic library */\n\n#include \"file.h\"\n\n#ifndef PIPE_BUF \n/* Get the PIPE_BUF from pathconf */\n#ifdef _PC_PIPE_BUF\n#define PIPE_BUF pathconf(\".\", _PC_PIPE_BUF)\n#else\n#define PIPE_BUF 512\n#endif\n#endif\n\nstatic void free_mlist(struct mlist *mlist) {\n\tstruct mlist *ml;\n\tif (!mlist) {\n\t\treturn;\n\t}\n\tfor (ml = mlist->next; ml != mlist;) {\n\t\tstruct mlist *next = ml->next;\n\t\tstruct r_magic *mg = ml->magic;\n\t\tfile_delmagic (mg, ml->mapped, ml->nmagic);\n\t\tfree (ml);\n\t\tml = next;\n\t}\n\tfree (ml);\n}\n\nstatic int info_from_stat(RMagic *ms, unsigned short md) {\n\t/* We cannot open it, but we were able to stat it. */\n\tif (md & 0222) {\n\t\tif (file_printf (ms, \"writable, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tif (md & 0111) {\n\t\tif (file_printf (ms, \"executable, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tif (S_ISREG (md)) {\n\t\tif (file_printf (ms, \"regular file, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tif (file_printf (ms, \"no read permission\") == -1) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n\nstatic void close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb) {\n\tif (fd >= 0) {\n\t\tclose (fd);\n\t}\n}\n\nstatic const char *file_or_fd(RMagic *ms, const char *inname, int fd) {\n\tbool ispipe = false;\n\tint rv = -1;\n\tunsigned char *buf;\n\tstruct stat sb;\n\tint nbytes = 0;\t/* number of bytes read from a datafile */\n\n\t/*\n\t * one extra for terminating '\\0', and\n\t * some overlapping space for matches near EOF\n\t */\n#define SLOP (1 + sizeof(union VALUETYPE))\n\tif (!(buf = malloc (HOWMANY + SLOP))) {\n\t\treturn NULL;\n\t}\n\n\tif (file_reset (ms) == -1) {\n\t\tgoto done;\n\t}\n\n\tswitch (file_fsmagic (ms, inname, &sb)) {\n\tcase -1: goto done;\t\t/* error */\n\tcase 0:\tbreak;\t\t\t/* nothing found */\n\tdefault: rv = 0; goto done;\t/* matched it and printed type */\n\t}\n\n\tif (!inname) {\n\t\tif (fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n\t\t\tispipe = true;\n\t\t}\n\t} else {\n\t\tint flags = O_RDONLY|O_BINARY;\n\n\t\tif (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n\t\t\tflags |= O_NONBLOCK;\n#endif\n\t\t\tispipe = true;\n\t\t}\n\t\terrno = 0;\n\t\tif ((fd = open (inname, flags)) < 0) {\n\t\t\teprintf (\"couldn't open file\\n\");\n\t\t\tif (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t\trv = 0;\n\t\t\tgoto done;\n\t\t}\n#ifdef O_NONBLOCK\n\t\tif ((flags = fcntl (fd, F_GETFL)) != -1) {\n\t\t\tflags &= ~O_NONBLOCK;\n\t\t\t(void)fcntl (fd, F_SETFL, flags);\n\t\t}\n#endif\n\t}\n\n\t/*\n\t * try looking at the first HOWMANY bytes\n\t */\n#ifdef O_NONBLOCK\n\tif (ispipe) {\n\t\tssize_t r = 0;\n\n\t\t//while ((r = sread(fd, (void *)&buf[nbytes],\n\t\twhile ((r = read(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes))) > 0) {\n\t\t\tnbytes += r;\n\t\t\tif (r < PIPE_BUF) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (nbytes == 0) {\n\t\t\t/* We can not read it, but we were able to stat it. */\n\t\t\tif (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t\trv = 0;\n\t\t\tgoto done;\n\t\t}\n\t} else {\n#endif\n\t\tif ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n\t\t\tfile_error(ms, errno, \"cannot read `%s'\", inname);\n\t\t\tgoto done;\n\t\t}\n#ifdef O_NONBLOCK\n\t}\n#endif\n\n\t(void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n\tif (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n\t\tgoto done;\n\t}\n\trv = 0;\ndone:\n\tfree (buf);\n\tclose_and_restore (ms, inname, fd, &sb);\n\treturn rv == 0 ? file_getbuffer(ms) : NULL;\n}\n\n/* API */\n\n// TODO: reinitialize all the time\nR_API RMagic* r_magic_new(int flags) {\n\tRMagic *ms = R_NEW0 (RMagic);\n\tif (!ms) {\n\t\treturn NULL;\n\t}\n\tr_magic_setflags (ms, flags);\n\tms->o.buf = ms->o.pbuf = NULL;\n\tms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li));\n\tif (!ms->c.li) {\n\t\tfree (ms);\n\t\treturn NULL;\n\t}\n\tfile_reset (ms);\n\tms->mlist = NULL;\n\tms->file = \"unknown\";\n\tms->line = 0;\n\treturn ms;\n}\n\nR_API void r_magic_free(RMagic *ms) {\n\tif (ms) {\n\t\tfree_mlist (ms->mlist);\n\t\tfree (ms->o.pbuf);\n\t\tfree (ms->o.buf);\n\t\tfree (ms->c.li);\n\t\tfree (ms);\n\t}\n}\n\nR_API bool r_magic_load_buffer(RMagic* ms, const char *magicdata) {\n\tif (*magicdata == '#') {\n\t\tstruct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n\t\tif (ml) {\n\t\t\tfree_mlist (ms->mlist);\n\t\t\tms->mlist = ml;\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\teprintf (\"Magic buffers should start with #\\n\");\n\t}\n\treturn false;\n}\n\nR_API bool r_magic_load(RMagic* ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);\n\tif (ml) {\n\t\tfree_mlist (ms->mlist);\n\t\tms->mlist = ml;\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nR_API bool r_magic_compile(RMagic *ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);\n\tfree_mlist (ml);\n\treturn ml != NULL;\n}\n\nR_API bool r_magic_check(RMagic *ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);\n\tfree_mlist (ml);\n\treturn ml != NULL;\n}\n\nR_API const char* r_magic_descriptor(RMagic *ms, int fd) {\n\treturn file_or_fd (ms, NULL, fd);\n}\n\nR_API const char * r_magic_file(RMagic *ms, const char *inname) {\n\treturn file_or_fd (ms, inname, 0); // 0 = stdin\n}\n\nR_API const char * r_magic_buffer(RMagic *ms, const void *buf, size_t nb) {\n\tif (file_reset (ms) == -1) {\n\t\treturn NULL;\n\t}\n\tif (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n\t\treturn NULL;\n\t}\n\treturn file_getbuffer (ms);\n}\n\nR_API const char *r_magic_error(RMagic *ms) {\n\tif (ms && ms->haderr) {\n\t\treturn ms->o.buf;\n\t}\n\treturn NULL;\n}\n\nR_API int r_magic_errno(RMagic *ms) {\n\tif (ms && ms->haderr) {\n\t\treturn ms->error;\n\t}\n\treturn 0;\n}\n\nR_API void r_magic_setflags(RMagic *ms, int flags) {\n\tif (ms) {\n\t\tms->flags = flags;\n\t}\n}\n#endif", "parent": null, "children": [47, 48, 49, 50, 53, 56, 59, 76, 95, 120, 143, 172, 191, 211, 237, 263, 289, 306, 307, 310, 328, 410, 491, 526, 527, 545, 551, 557, 564, 569, 575, 579, 597, 609, 639, 786], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 303, "column": 6}}, {"id": 47, "type": "#if", "text": "#if", "parent": 46, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 3}}, {"id": 48, "type": "identifier", "text": "USE_LIB_MAGIC", "parent": 46, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 17}}, {"id": 49, "type": "\n", "text": "\n\n", "parent": 46, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 20, "column": 0}}, {"id": 50, "type": "preproc_include", "text": "#include <magic.h>\n", "parent": 46, "children": [51, 52], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 51, "type": "#include", "text": "#include", "parent": 50, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 52, "type": "system_lib_string", "text": "<magic.h>", "parent": 50, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 18}}, {"id": 53, "type": "preproc_call", "text": "#undef R_API\n", "parent": 46, "children": [54, 55], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 54, "type": "preproc_directive", "text": "#undef", "parent": 53, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 55, "type": "preproc_arg", "text": "R_API", "parent": 53, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 12}}, {"id": 56, "type": "preproc_def", "text": "#define R_API\n", "parent": 46, "children": [57, 58], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 57, "type": "#define", "text": "#define", "parent": 56, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 58, "type": "identifier", "text": "R_API", "parent": 56, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 13}}, {"id": 59, "type": "function_definition", "text": "R_API RMagic* r_magic_new(int flags) { return magic_open (flags); }", "parent": 46, "children": [60, 61, 63], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 67}}, {"id": 60, "type": "type_identifier", "text": "R_API", "parent": 59, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 5}}, {"id": 61, "type": "ERROR", "text": "RMagic", "parent": 59, "children": [62], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 12}}, {"id": 62, "type": "identifier", "text": "RMagic", "parent": 61, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 12}}, {"id": 63, "type": "pointer_declarator", "text": "* r_magic_new(int flags)", "parent": 59, "children": [64, 65], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 36}}, {"id": 64, "type": "*", "text": "*", "parent": 63, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 13}}, {"id": 65, "type": "function_declarator", "text": "r_magic_new(int flags)", "parent": 63, "children": [66, 67], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 36}}, {"id": 66, "type": "identifier", "text": "r_magic_new", "parent": 65, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 25}}, {"id": 67, "type": "parameter_list", "text": "(int flags)", "parent": 65, "children": [68], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 36}}, {"id": 68, "type": "parameter_declaration", "text": "int flags", "parent": 67, "children": [69, 70], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 35}}, {"id": 69, "type": "primitive_type", "text": "int", "parent": 68, "children": [], "start_point": {"row": 26, "column": 26}, "end_point": {"row": 26, "column": 29}}, {"id": 70, "type": "identifier", "text": "flags", "parent": 68, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 35}}, {"id": 71, "type": "return_statement", "text": "return magic_open (flags);", "parent": 59, "children": [72], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 65}}, {"id": 72, "type": "call_expression", "text": "magic_open (flags)", "parent": 71, "children": [73, 74], "start_point": {"row": 26, "column": 46}, "end_point": {"row": 26, "column": 64}}, {"id": 73, "type": "identifier", "text": "magic_open", "parent": 72, "children": [], "start_point": {"row": 26, "column": 46}, "end_point": {"row": 26, "column": 56}}, {"id": 74, "type": "argument_list", "text": "(flags)", "parent": 72, "children": [75], "start_point": {"row": 26, "column": 57}, "end_point": {"row": 26, "column": 64}}, {"id": 75, "type": "identifier", "text": "flags", "parent": 74, "children": [], "start_point": {"row": 26, "column": 58}, "end_point": {"row": 26, "column": 63}}, {"id": 76, "type": "function_definition", "text": "R_API void r_magic_free(RMagic* m) { if (m) { magic_close (m); } }", "parent": 46, "children": [77, 78, 80], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 66}}, {"id": 77, "type": "type_identifier", "text": "R_API", "parent": 76, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 5}}, {"id": 78, "type": "ERROR", "text": "void", "parent": 76, "children": [79], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 10}}, {"id": 79, "type": "identifier", "text": "void", "parent": 78, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 10}}, {"id": 80, "type": "function_declarator", "text": "r_magic_free(RMagic* m)", "parent": 76, "children": [81, 82], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 34}}, {"id": 81, "type": "identifier", "text": "r_magic_free", "parent": 80, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 23}}, {"id": 82, "type": "parameter_list", "text": "(RMagic* m)", "parent": 80, "children": [83], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 34}}, {"id": 83, "type": "parameter_declaration", "text": "RMagic* m", "parent": 82, "children": [84, 85], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 33}}, {"id": 84, "type": "type_identifier", "text": "RMagic", "parent": 83, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 30}}, {"id": 85, "type": "pointer_declarator", "text": "* m", "parent": 83, "children": [86, 87], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 33}}, {"id": 86, "type": "*", "text": "*", "parent": 85, "children": [], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 31}}, {"id": 87, "type": "identifier", "text": "m", "parent": 85, "children": [], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 33}}, {"id": 88, "type": "if_statement", "text": "if (m) { magic_close (m); }", "parent": 76, "children": [89], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 27, "column": 64}}, {"id": 89, "type": "parenthesized_expression", "text": "(m)", "parent": 88, "children": [90], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 43}}, {"id": 90, "type": "identifier", "text": "m", "parent": 89, "children": [], "start_point": {"row": 27, "column": 41}, "end_point": {"row": 27, "column": 42}}, {"id": 91, "type": "call_expression", "text": "magic_close (m)", "parent": 88, "children": [92, 93], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 61}}, {"id": 92, "type": "identifier", "text": "magic_close", "parent": 91, "children": [], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 57}}, {"id": 93, "type": "argument_list", "text": "(m)", "parent": 91, "children": [94], "start_point": {"row": 27, "column": 58}, "end_point": {"row": 27, "column": 61}}, {"id": 94, "type": "identifier", "text": "m", "parent": 93, "children": [], "start_point": {"row": 27, "column": 59}, "end_point": {"row": 27, "column": 60}}, {"id": 95, "type": "function_definition", "text": "R_API const char *r_magic_file(RMagic* m, const char * f) { return magic_file (m, f); }", "parent": 46, "children": [96, 97, 99], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 87}}, {"id": 96, "type": "type_identifier", "text": "R_API", "parent": 95, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 5}}, {"id": 97, "type": "ERROR", "text": "char", "parent": 95, "children": [98], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 16}}, {"id": 98, "type": "identifier", "text": "char", "parent": 97, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 16}}, {"id": 99, "type": "pointer_declarator", "text": "*r_magic_file(RMagic* m, const char * f)", "parent": 95, "children": [100, 101], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 57}}, {"id": 100, "type": "*", "text": "*", "parent": 99, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 101, "type": "function_declarator", "text": "r_magic_file(RMagic* m, const char * f)", "parent": 99, "children": [102, 103], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 57}}, {"id": 102, "type": "identifier", "text": "r_magic_file", "parent": 101, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 30}}, {"id": 103, "type": "parameter_list", "text": "(RMagic* m, const char * f)", "parent": 101, "children": [104, 109], "start_point": {"row": 28, "column": 30}, "end_point": {"row": 28, "column": 57}}, {"id": 104, "type": "parameter_declaration", "text": "RMagic* m", "parent": 103, "children": [105, 106], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 40}}, {"id": 105, "type": "type_identifier", "text": "RMagic", "parent": 104, "children": [], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 37}}, {"id": 106, "type": "pointer_declarator", "text": "* m", "parent": 104, "children": [107, 108], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 40}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 38}}, {"id": 108, "type": "identifier", "text": "m", "parent": 106, "children": [], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 40}}, {"id": 109, "type": "parameter_declaration", "text": "const char * f", "parent": 103, "children": [110, 111], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 56}}, {"id": 110, "type": "primitive_type", "text": "char", "parent": 109, "children": [], "start_point": {"row": 28, "column": 48}, "end_point": {"row": 28, "column": 52}}, {"id": 111, "type": "pointer_declarator", "text": "* f", "parent": 109, "children": [112, 113], "start_point": {"row": 28, "column": 53}, "end_point": {"row": 28, "column": 56}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 28, "column": 53}, "end_point": {"row": 28, "column": 54}}, {"id": 113, "type": "identifier", "text": "f", "parent": 111, "children": [], "start_point": {"row": 28, "column": 55}, "end_point": {"row": 28, "column": 56}}, {"id": 114, "type": "return_statement", "text": "return magic_file (m, f);", "parent": 95, "children": [115], "start_point": {"row": 28, "column": 60}, "end_point": {"row": 28, "column": 85}}, {"id": 115, "type": "call_expression", "text": "magic_file (m, f)", "parent": 114, "children": [116, 117], "start_point": {"row": 28, "column": 67}, "end_point": {"row": 28, "column": 84}}, {"id": 116, "type": "identifier", "text": "magic_file", "parent": 115, "children": [], "start_point": {"row": 28, "column": 67}, "end_point": {"row": 28, "column": 77}}, {"id": 117, "type": "argument_list", "text": "(m, f)", "parent": 115, "children": [118, 119], "start_point": {"row": 28, "column": 78}, "end_point": {"row": 28, "column": 84}}, {"id": 118, "type": "identifier", "text": "m", "parent": 117, "children": [], "start_point": {"row": 28, "column": 79}, "end_point": {"row": 28, "column": 80}}, {"id": 119, "type": "identifier", "text": "f", "parent": 117, "children": [], "start_point": {"row": 28, "column": 82}, "end_point": {"row": 28, "column": 83}}, {"id": 120, "type": "function_definition", "text": "R_API const char *r_magic_descriptor(RMagic* m, int fd) { return magic_descriptor (m, fd); }", "parent": 46, "children": [121, 122, 124], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 92}}, {"id": 121, "type": "type_identifier", "text": "R_API", "parent": 120, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 5}}, {"id": 122, "type": "ERROR", "text": "char", "parent": 120, "children": [123], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 16}}, {"id": 123, "type": "identifier", "text": "char", "parent": 122, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 16}}, {"id": 124, "type": "pointer_declarator", "text": "*r_magic_descriptor(RMagic* m, int fd)", "parent": 120, "children": [125, 126], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 55}}, {"id": 125, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 18}}, {"id": 126, "type": "function_declarator", "text": "r_magic_descriptor(RMagic* m, int fd)", "parent": 124, "children": [127, 128], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 55}}, {"id": 127, "type": "identifier", "text": "r_magic_descriptor", "parent": 126, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 36}}, {"id": 128, "type": "parameter_list", "text": "(RMagic* m, int fd)", "parent": 126, "children": [129, 134], "start_point": {"row": 29, "column": 36}, "end_point": {"row": 29, "column": 55}}, {"id": 129, "type": "parameter_declaration", "text": "RMagic* m", "parent": 128, "children": [130, 131], "start_point": {"row": 29, "column": 37}, "end_point": {"row": 29, "column": 46}}, {"id": 130, "type": "type_identifier", "text": "RMagic", "parent": 129, "children": [], "start_point": {"row": 29, "column": 37}, "end_point": {"row": 29, "column": 43}}, {"id": 131, "type": "pointer_declarator", "text": "* m", "parent": 129, "children": [132, 133], "start_point": {"row": 29, "column": 43}, "end_point": {"row": 29, "column": 46}}, {"id": 132, "type": "*", "text": "*", "parent": 131, "children": [], "start_point": {"row": 29, "column": 43}, "end_point": {"row": 29, "column": 44}}, {"id": 133, "type": "identifier", "text": "m", "parent": 131, "children": [], "start_point": {"row": 29, "column": 45}, "end_point": {"row": 29, "column": 46}}, {"id": 134, "type": "parameter_declaration", "text": "int fd", "parent": 128, "children": [135, 136], "start_point": {"row": 29, "column": 48}, "end_point": {"row": 29, "column": 54}}, {"id": 135, "type": "primitive_type", "text": "int", "parent": 134, "children": [], "start_point": {"row": 29, "column": 48}, "end_point": {"row": 29, "column": 51}}, {"id": 136, "type": "identifier", "text": "fd", "parent": 134, "children": [], "start_point": {"row": 29, "column": 52}, "end_point": {"row": 29, "column": 54}}, {"id": 137, "type": "return_statement", "text": "return magic_descriptor (m, fd);", "parent": 120, "children": [138], "start_point": {"row": 29, "column": 58}, "end_point": {"row": 29, "column": 90}}, {"id": 138, "type": "call_expression", "text": "magic_descriptor (m, fd)", "parent": 137, "children": [139, 140], "start_point": {"row": 29, "column": 65}, "end_point": {"row": 29, "column": 89}}, {"id": 139, "type": "identifier", "text": "magic_descriptor", "parent": 138, "children": [], "start_point": {"row": 29, "column": 65}, "end_point": {"row": 29, "column": 81}}, {"id": 140, "type": "argument_list", "text": "(m, fd)", "parent": 138, "children": [141, 142], "start_point": {"row": 29, "column": 82}, "end_point": {"row": 29, "column": 89}}, {"id": 141, "type": "identifier", "text": "m", "parent": 140, "children": [], "start_point": {"row": 29, "column": 83}, "end_point": {"row": 29, "column": 84}}, {"id": 142, "type": "identifier", "text": "fd", "parent": 140, "children": [], "start_point": {"row": 29, "column": 86}, "end_point": {"row": 29, "column": 88}}, {"id": 143, "type": "function_definition", "text": "R_API const char *r_magic_buffer(RMagic* m, const void *b, size_t s) { return magic_buffer (m, b, s); }", "parent": 46, "children": [144, 145, 147], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 103}}, {"id": 144, "type": "type_identifier", "text": "R_API", "parent": 143, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 5}}, {"id": 145, "type": "ERROR", "text": "char", "parent": 143, "children": [146], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 16}}, {"id": 146, "type": "identifier", "text": "char", "parent": 145, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 16}}, {"id": 147, "type": "pointer_declarator", "text": "*r_magic_buffer(RMagic* m, const void *b, size_t s)", "parent": 143, "children": [148, 149], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 68}}, {"id": 148, "type": "*", "text": "*", "parent": 147, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 18}}, {"id": 149, "type": "function_declarator", "text": "r_magic_buffer(RMagic* m, const void *b, size_t s)", "parent": 147, "children": [150, 151], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 68}}, {"id": 150, "type": "identifier", "text": "r_magic_buffer", "parent": 149, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 32}}, {"id": 151, "type": "parameter_list", "text": "(RMagic* m, const void *b, size_t s)", "parent": 149, "children": [152, 157, 162], "start_point": {"row": 30, "column": 32}, "end_point": {"row": 30, "column": 68}}, {"id": 152, "type": "parameter_declaration", "text": "RMagic* m", "parent": 151, "children": [153, 154], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 42}}, {"id": 153, "type": "type_identifier", "text": "RMagic", "parent": 152, "children": [], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 39}}, {"id": 154, "type": "pointer_declarator", "text": "* m", "parent": 152, "children": [155, 156], "start_point": {"row": 30, "column": 39}, "end_point": {"row": 30, "column": 42}}, {"id": 155, "type": "*", "text": "*", "parent": 154, "children": [], "start_point": {"row": 30, "column": 39}, "end_point": {"row": 30, "column": 40}}, {"id": 156, "type": "identifier", "text": "m", "parent": 154, "children": [], "start_point": {"row": 30, "column": 41}, "end_point": {"row": 30, "column": 42}}, {"id": 157, "type": "parameter_declaration", "text": "const void *b", "parent": 151, "children": [158, 159], "start_point": {"row": 30, "column": 44}, "end_point": {"row": 30, "column": 57}}, {"id": 158, "type": "primitive_type", "text": "void", "parent": 157, "children": [], "start_point": {"row": 30, "column": 50}, "end_point": {"row": 30, "column": 54}}, {"id": 159, "type": "pointer_declarator", "text": "*b", "parent": 157, "children": [160, 161], "start_point": {"row": 30, "column": 55}, "end_point": {"row": 30, "column": 57}}, {"id": 160, "type": "*", "text": "*", "parent": 159, "children": [], "start_point": {"row": 30, "column": 55}, "end_point": {"row": 30, "column": 56}}, {"id": 161, "type": "identifier", "text": "b", "parent": 159, "children": [], "start_point": {"row": 30, "column": 56}, "end_point": {"row": 30, "column": 57}}, {"id": 162, "type": "parameter_declaration", "text": "size_t s", "parent": 151, "children": [163, 164], "start_point": {"row": 30, "column": 59}, "end_point": {"row": 30, "column": 67}}, {"id": 163, "type": "primitive_type", "text": "size_t", "parent": 162, "children": [], "start_point": {"row": 30, "column": 59}, "end_point": {"row": 30, "column": 65}}, {"id": 164, "type": "identifier", "text": "s", "parent": 162, "children": [], "start_point": {"row": 30, "column": 66}, "end_point": {"row": 30, "column": 67}}, {"id": 165, "type": "return_statement", "text": "return magic_buffer (m, b, s);", "parent": 143, "children": [166], "start_point": {"row": 30, "column": 71}, "end_point": {"row": 30, "column": 101}}, {"id": 166, "type": "call_expression", "text": "magic_buffer (m, b, s)", "parent": 165, "children": [167, 168], "start_point": {"row": 30, "column": 78}, "end_point": {"row": 30, "column": 100}}, {"id": 167, "type": "identifier", "text": "magic_buffer", "parent": 166, "children": [], "start_point": {"row": 30, "column": 78}, "end_point": {"row": 30, "column": 90}}, {"id": 168, "type": "argument_list", "text": "(m, b, s)", "parent": 166, "children": [169, 170, 171], "start_point": {"row": 30, "column": 91}, "end_point": {"row": 30, "column": 100}}, {"id": 169, "type": "identifier", "text": "m", "parent": 168, "children": [], "start_point": {"row": 30, "column": 92}, "end_point": {"row": 30, "column": 93}}, {"id": 170, "type": "identifier", "text": "b", "parent": 168, "children": [], "start_point": {"row": 30, "column": 95}, "end_point": {"row": 30, "column": 96}}, {"id": 171, "type": "identifier", "text": "s", "parent": 168, "children": [], "start_point": {"row": 30, "column": 98}, "end_point": {"row": 30, "column": 99}}, {"id": 172, "type": "function_definition", "text": "R_API const char *r_magic_error(RMagic* m) { return magic_error (m); }", "parent": 46, "children": [173, 174, 176], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 70}}, {"id": 173, "type": "type_identifier", "text": "R_API", "parent": 172, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 5}}, {"id": 174, "type": "ERROR", "text": "char", "parent": 172, "children": [175], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 16}}, {"id": 175, "type": "identifier", "text": "char", "parent": 174, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 16}}, {"id": 176, "type": "pointer_declarator", "text": "*r_magic_error(RMagic* m)", "parent": 172, "children": [177, 178], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 42}}, {"id": 177, "type": "*", "text": "*", "parent": 176, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 18}}, {"id": 178, "type": "function_declarator", "text": "r_magic_error(RMagic* m)", "parent": 176, "children": [179, 180], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 42}}, {"id": 179, "type": "identifier", "text": "r_magic_error", "parent": 178, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 31}}, {"id": 180, "type": "parameter_list", "text": "(RMagic* m)", "parent": 178, "children": [181], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 42}}, {"id": 181, "type": "parameter_declaration", "text": "RMagic* m", "parent": 180, "children": [182, 183], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 31, "column": 41}}, {"id": 182, "type": "type_identifier", "text": "RMagic", "parent": 181, "children": [], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 31, "column": 38}}, {"id": 183, "type": "pointer_declarator", "text": "* m", "parent": 181, "children": [184, 185], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 41}}, {"id": 184, "type": "*", "text": "*", "parent": 183, "children": [], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 39}}, {"id": 185, "type": "identifier", "text": "m", "parent": 183, "children": [], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 41}}, {"id": 186, "type": "return_statement", "text": "return magic_error (m);", "parent": 172, "children": [187], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 31, "column": 68}}, {"id": 187, "type": "call_expression", "text": "magic_error (m)", "parent": 186, "children": [188, 189], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 67}}, {"id": 188, "type": "identifier", "text": "magic_error", "parent": 187, "children": [], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 63}}, {"id": 189, "type": "argument_list", "text": "(m)", "parent": 187, "children": [190], "start_point": {"row": 31, "column": 64}, "end_point": {"row": 31, "column": 67}}, {"id": 190, "type": "identifier", "text": "m", "parent": 189, "children": [], "start_point": {"row": 31, "column": 65}, "end_point": {"row": 31, "column": 66}}, {"id": 191, "type": "function_definition", "text": "R_API void r_magic_setflags(RMagic* m, int f) { magic_setflags (m, f); }", "parent": 46, "children": [192, 193, 195], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 72}}, {"id": 192, "type": "type_identifier", "text": "R_API", "parent": 191, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 5}}, {"id": 193, "type": "ERROR", "text": "void", "parent": 191, "children": [194], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 10}}, {"id": 194, "type": "identifier", "text": "void", "parent": 193, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 10}}, {"id": 195, "type": "function_declarator", "text": "r_magic_setflags(RMagic* m, int f)", "parent": 191, "children": [196, 197], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 45}}, {"id": 196, "type": "identifier", "text": "r_magic_setflags", "parent": 195, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 27}}, {"id": 197, "type": "parameter_list", "text": "(RMagic* m, int f)", "parent": 195, "children": [198, 203], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 45}}, {"id": 198, "type": "parameter_declaration", "text": "RMagic* m", "parent": 197, "children": [199, 200], "start_point": {"row": 32, "column": 28}, "end_point": {"row": 32, "column": 37}}, {"id": 199, "type": "type_identifier", "text": "RMagic", "parent": 198, "children": [], "start_point": {"row": 32, "column": 28}, "end_point": {"row": 32, "column": 34}}, {"id": 200, "type": "pointer_declarator", "text": "* m", "parent": 198, "children": [201, 202], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 37}}, {"id": 201, "type": "*", "text": "*", "parent": 200, "children": [], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 35}}, {"id": 202, "type": "identifier", "text": "m", "parent": 200, "children": [], "start_point": {"row": 32, "column": 36}, "end_point": {"row": 32, "column": 37}}, {"id": 203, "type": "parameter_declaration", "text": "int f", "parent": 197, "children": [204, 205], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 44}}, {"id": 204, "type": "primitive_type", "text": "int", "parent": 203, "children": [], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 42}}, {"id": 205, "type": "identifier", "text": "f", "parent": 203, "children": [], "start_point": {"row": 32, "column": 43}, "end_point": {"row": 32, "column": 44}}, {"id": 206, "type": "call_expression", "text": "magic_setflags (m, f)", "parent": 191, "children": [207, 208], "start_point": {"row": 32, "column": 48}, "end_point": {"row": 32, "column": 69}}, {"id": 207, "type": "identifier", "text": "magic_setflags", "parent": 206, "children": [], "start_point": {"row": 32, "column": 48}, "end_point": {"row": 32, "column": 62}}, {"id": 208, "type": "argument_list", "text": "(m, f)", "parent": 206, "children": [209, 210], "start_point": {"row": 32, "column": 63}, "end_point": {"row": 32, "column": 69}}, {"id": 209, "type": "identifier", "text": "m", "parent": 208, "children": [], "start_point": {"row": 32, "column": 64}, "end_point": {"row": 32, "column": 65}}, {"id": 210, "type": "identifier", "text": "f", "parent": 208, "children": [], "start_point": {"row": 32, "column": 67}, "end_point": {"row": 32, "column": 68}}, {"id": 211, "type": "function_definition", "text": "R_API bool r_magic_load(RMagic* m, const char *f) { return magic_load (m, f) != -1; }", "parent": 46, "children": [212, 213, 215], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 85}}, {"id": 212, "type": "type_identifier", "text": "R_API", "parent": 211, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 5}}, {"id": 213, "type": "ERROR", "text": "bool", "parent": 211, "children": [214], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 10}}, {"id": 214, "type": "identifier", "text": "bool", "parent": 213, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 10}}, {"id": 215, "type": "function_declarator", "text": "r_magic_load(RMagic* m, const char *f)", "parent": 211, "children": [216, 217], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 49}}, {"id": 216, "type": "identifier", "text": "r_magic_load", "parent": 215, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 23}}, {"id": 217, "type": "parameter_list", "text": "(RMagic* m, const char *f)", "parent": 215, "children": [218, 223], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 49}}, {"id": 218, "type": "parameter_declaration", "text": "RMagic* m", "parent": 217, "children": [219, 220], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 33}}, {"id": 219, "type": "type_identifier", "text": "RMagic", "parent": 218, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 30}}, {"id": 220, "type": "pointer_declarator", "text": "* m", "parent": 218, "children": [221, 222], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 33}}, {"id": 221, "type": "*", "text": "*", "parent": 220, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 31}}, {"id": 222, "type": "identifier", "text": "m", "parent": 220, "children": [], "start_point": {"row": 33, "column": 32}, "end_point": {"row": 33, "column": 33}}, {"id": 223, "type": "parameter_declaration", "text": "const char *f", "parent": 217, "children": [224, 225], "start_point": {"row": 33, "column": 35}, "end_point": {"row": 33, "column": 48}}, {"id": 224, "type": "primitive_type", "text": "char", "parent": 223, "children": [], "start_point": {"row": 33, "column": 41}, "end_point": {"row": 33, "column": 45}}, {"id": 225, "type": "pointer_declarator", "text": "*f", "parent": 223, "children": [226, 227], "start_point": {"row": 33, "column": 46}, "end_point": {"row": 33, "column": 48}}, {"id": 226, "type": "*", "text": "*", "parent": 225, "children": [], "start_point": {"row": 33, "column": 46}, "end_point": {"row": 33, "column": 47}}, {"id": 227, "type": "identifier", "text": "f", "parent": 225, "children": [], "start_point": {"row": 33, "column": 47}, "end_point": {"row": 33, "column": 48}}, {"id": 228, "type": "return_statement", "text": "return magic_load (m, f) != -1;", "parent": 211, "children": [229], "start_point": {"row": 33, "column": 52}, "end_point": {"row": 33, "column": 83}}, {"id": 229, "type": "binary_expression", "text": "magic_load (m, f) != -1", "parent": 228, "children": [230, 235, 236], "start_point": {"row": 33, "column": 59}, "end_point": {"row": 33, "column": 82}}, {"id": 230, "type": "call_expression", "text": "magic_load (m, f)", "parent": 229, "children": [231, 232], "start_point": {"row": 33, "column": 59}, "end_point": {"row": 33, "column": 76}}, {"id": 231, "type": "identifier", "text": "magic_load", "parent": 230, "children": [], "start_point": {"row": 33, "column": 59}, "end_point": {"row": 33, "column": 69}}, {"id": 232, "type": "argument_list", "text": "(m, f)", "parent": 230, "children": [233, 234], "start_point": {"row": 33, "column": 70}, "end_point": {"row": 33, "column": 76}}, {"id": 233, "type": "identifier", "text": "m", "parent": 232, "children": [], "start_point": {"row": 33, "column": 71}, "end_point": {"row": 33, "column": 72}}, {"id": 234, "type": "identifier", "text": "f", "parent": 232, "children": [], "start_point": {"row": 33, "column": 74}, "end_point": {"row": 33, "column": 75}}, {"id": 235, "type": "!=", "text": "!=", "parent": 229, "children": [], "start_point": {"row": 33, "column": 77}, "end_point": {"row": 33, "column": 79}}, {"id": 236, "type": "number_literal", "text": "-1", "parent": 229, "children": [], "start_point": {"row": 33, "column": 80}, "end_point": {"row": 33, "column": 82}}, {"id": 237, "type": "function_definition", "text": "R_API bool r_magic_compile(RMagic* m, const char *x) { return magic_compile (m, x) != -1; }", "parent": 46, "children": [238, 239, 241], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 91}}, {"id": 238, "type": "type_identifier", "text": "R_API", "parent": 237, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 5}}, {"id": 239, "type": "ERROR", "text": "bool", "parent": 237, "children": [240], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 10}}, {"id": 240, "type": "identifier", "text": "bool", "parent": 239, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 10}}, {"id": 241, "type": "function_declarator", "text": "r_magic_compile(RMagic* m, const char *x)", "parent": 237, "children": [242, 243], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 52}}, {"id": 242, "type": "identifier", "text": "r_magic_compile", "parent": 241, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 26}}, {"id": 243, "type": "parameter_list", "text": "(RMagic* m, const char *x)", "parent": 241, "children": [244, 249], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 52}}, {"id": 244, "type": "parameter_declaration", "text": "RMagic* m", "parent": 243, "children": [245, 246], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 36}}, {"id": 245, "type": "type_identifier", "text": "RMagic", "parent": 244, "children": [], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 33}}, {"id": 246, "type": "pointer_declarator", "text": "* m", "parent": 244, "children": [247, 248], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 36}}, {"id": 247, "type": "*", "text": "*", "parent": 246, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 34}}, {"id": 248, "type": "identifier", "text": "m", "parent": 246, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 36}}, {"id": 249, "type": "parameter_declaration", "text": "const char *x", "parent": 243, "children": [250, 251], "start_point": {"row": 34, "column": 38}, "end_point": {"row": 34, "column": 51}}, {"id": 250, "type": "primitive_type", "text": "char", "parent": 249, "children": [], "start_point": {"row": 34, "column": 44}, "end_point": {"row": 34, "column": 48}}, {"id": 251, "type": "pointer_declarator", "text": "*x", "parent": 249, "children": [252, 253], "start_point": {"row": 34, "column": 49}, "end_point": {"row": 34, "column": 51}}, {"id": 252, "type": "*", "text": "*", "parent": 251, "children": [], "start_point": {"row": 34, "column": 49}, "end_point": {"row": 34, "column": 50}}, {"id": 253, "type": "identifier", "text": "x", "parent": 251, "children": [], "start_point": {"row": 34, "column": 50}, "end_point": {"row": 34, "column": 51}}, {"id": 254, "type": "return_statement", "text": "return magic_compile (m, x) != -1;", "parent": 237, "children": [255], "start_point": {"row": 34, "column": 55}, "end_point": {"row": 34, "column": 89}}, {"id": 255, "type": "binary_expression", "text": "magic_compile (m, x) != -1", "parent": 254, "children": [256, 261, 262], "start_point": {"row": 34, "column": 62}, "end_point": {"row": 34, "column": 88}}, {"id": 256, "type": "call_expression", "text": "magic_compile (m, x)", "parent": 255, "children": [257, 258], "start_point": {"row": 34, "column": 62}, "end_point": {"row": 34, "column": 82}}, {"id": 257, "type": "identifier", "text": "magic_compile", "parent": 256, "children": [], "start_point": {"row": 34, "column": 62}, "end_point": {"row": 34, "column": 75}}, {"id": 258, "type": "argument_list", "text": "(m, x)", "parent": 256, "children": [259, 260], "start_point": {"row": 34, "column": 76}, "end_point": {"row": 34, "column": 82}}, {"id": 259, "type": "identifier", "text": "m", "parent": 258, "children": [], "start_point": {"row": 34, "column": 77}, "end_point": {"row": 34, "column": 78}}, {"id": 260, "type": "identifier", "text": "x", "parent": 258, "children": [], "start_point": {"row": 34, "column": 80}, "end_point": {"row": 34, "column": 81}}, {"id": 261, "type": "!=", "text": "!=", "parent": 255, "children": [], "start_point": {"row": 34, "column": 83}, "end_point": {"row": 34, "column": 85}}, {"id": 262, "type": "number_literal", "text": "-1", "parent": 255, "children": [], "start_point": {"row": 34, "column": 86}, "end_point": {"row": 34, "column": 88}}, {"id": 263, "type": "function_definition", "text": "R_API bool r_magic_check(RMagic* m, const char *x) { return magic_check (m, x) != -1; }", "parent": 46, "children": [264, 265, 267], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 87}}, {"id": 264, "type": "type_identifier", "text": "R_API", "parent": 263, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 5}}, {"id": 265, "type": "ERROR", "text": "bool", "parent": 263, "children": [266], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 10}}, {"id": 266, "type": "identifier", "text": "bool", "parent": 265, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 10}}, {"id": 267, "type": "function_declarator", "text": "r_magic_check(RMagic* m, const char *x)", "parent": 263, "children": [268, 269], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 50}}, {"id": 268, "type": "identifier", "text": "r_magic_check", "parent": 267, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 24}}, {"id": 269, "type": "parameter_list", "text": "(RMagic* m, const char *x)", "parent": 267, "children": [270, 275], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 50}}, {"id": 270, "type": "parameter_declaration", "text": "RMagic* m", "parent": 269, "children": [271, 272], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 34}}, {"id": 271, "type": "type_identifier", "text": "RMagic", "parent": 270, "children": [], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 31}}, {"id": 272, "type": "pointer_declarator", "text": "* m", "parent": 270, "children": [273, 274], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 34}}, {"id": 273, "type": "*", "text": "*", "parent": 272, "children": [], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 32}}, {"id": 274, "type": "identifier", "text": "m", "parent": 272, "children": [], "start_point": {"row": 35, "column": 33}, "end_point": {"row": 35, "column": 34}}, {"id": 275, "type": "parameter_declaration", "text": "const char *x", "parent": 269, "children": [276, 277], "start_point": {"row": 35, "column": 36}, "end_point": {"row": 35, "column": 49}}, {"id": 276, "type": "primitive_type", "text": "char", "parent": 275, "children": [], "start_point": {"row": 35, "column": 42}, "end_point": {"row": 35, "column": 46}}, {"id": 277, "type": "pointer_declarator", "text": "*x", "parent": 275, "children": [278, 279], "start_point": {"row": 35, "column": 47}, "end_point": {"row": 35, "column": 49}}, {"id": 278, "type": "*", "text": "*", "parent": 277, "children": [], "start_point": {"row": 35, "column": 47}, "end_point": {"row": 35, "column": 48}}, {"id": 279, "type": "identifier", "text": "x", "parent": 277, "children": [], "start_point": {"row": 35, "column": 48}, "end_point": {"row": 35, "column": 49}}, {"id": 280, "type": "return_statement", "text": "return magic_check (m, x) != -1;", "parent": 263, "children": [281], "start_point": {"row": 35, "column": 53}, "end_point": {"row": 35, "column": 85}}, {"id": 281, "type": "binary_expression", "text": "magic_check (m, x) != -1", "parent": 280, "children": [282, 287, 288], "start_point": {"row": 35, "column": 60}, "end_point": {"row": 35, "column": 84}}, {"id": 282, "type": "call_expression", "text": "magic_check (m, x)", "parent": 281, "children": [283, 284], "start_point": {"row": 35, "column": 60}, "end_point": {"row": 35, "column": 78}}, {"id": 283, "type": "identifier", "text": "magic_check", "parent": 282, "children": [], "start_point": {"row": 35, "column": 60}, "end_point": {"row": 35, "column": 71}}, {"id": 284, "type": "argument_list", "text": "(m, x)", "parent": 282, "children": [285, 286], "start_point": {"row": 35, "column": 72}, "end_point": {"row": 35, "column": 78}}, {"id": 285, "type": "identifier", "text": "m", "parent": 284, "children": [], "start_point": {"row": 35, "column": 73}, "end_point": {"row": 35, "column": 74}}, {"id": 286, "type": "identifier", "text": "x", "parent": 284, "children": [], "start_point": {"row": 35, "column": 76}, "end_point": {"row": 35, "column": 77}}, {"id": 287, "type": "!=", "text": "!=", "parent": 281, "children": [], "start_point": {"row": 35, "column": 79}, "end_point": {"row": 35, "column": 81}}, {"id": 288, "type": "number_literal", "text": "-1", "parent": 281, "children": [], "start_point": {"row": 35, "column": 82}, "end_point": {"row": 35, "column": 84}}, {"id": 289, "type": "function_definition", "text": "R_API int r_magic_errno(RMagic* m) { return magic_errno (m); }", "parent": 46, "children": [290, 291, 293], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 62}}, {"id": 290, "type": "type_identifier", "text": "R_API", "parent": 289, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 5}}, {"id": 291, "type": "ERROR", "text": "int", "parent": 289, "children": [292], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 9}}, {"id": 292, "type": "identifier", "text": "int", "parent": 291, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 9}}, {"id": 293, "type": "function_declarator", "text": "r_magic_errno(RMagic* m)", "parent": 289, "children": [294, 295], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 34}}, {"id": 294, "type": "identifier", "text": "r_magic_errno", "parent": 293, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 23}}, {"id": 295, "type": "parameter_list", "text": "(RMagic* m)", "parent": 293, "children": [296], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 34}}, {"id": 296, "type": "parameter_declaration", "text": "RMagic* m", "parent": 295, "children": [297, 298], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 33}}, {"id": 297, "type": "type_identifier", "text": "RMagic", "parent": 296, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 30}}, {"id": 298, "type": "pointer_declarator", "text": "* m", "parent": 296, "children": [299, 300], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 33}}, {"id": 299, "type": "*", "text": "*", "parent": 298, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 31}}, {"id": 300, "type": "identifier", "text": "m", "parent": 298, "children": [], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 33}}, {"id": 301, "type": "return_statement", "text": "return magic_errno (m);", "parent": 289, "children": [302], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 60}}, {"id": 302, "type": "call_expression", "text": "magic_errno (m)", "parent": 301, "children": [303, 304], "start_point": {"row": 36, "column": 44}, "end_point": {"row": 36, "column": 59}}, {"id": 303, "type": "identifier", "text": "magic_errno", "parent": 302, "children": [], "start_point": {"row": 36, "column": 44}, "end_point": {"row": 36, "column": 55}}, {"id": 304, "type": "argument_list", "text": "(m)", "parent": 302, "children": [305], "start_point": {"row": 36, "column": 56}, "end_point": {"row": 36, "column": 59}}, {"id": 305, "type": "identifier", "text": "m", "parent": 304, "children": [], "start_point": {"row": 36, "column": 57}, "end_point": {"row": 36, "column": 58}}, {"id": 306, "type": "#else", "text": "#else", "parent": 46, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 5}}, {"id": 307, "type": "preproc_include", "text": "#include \"file.h\"\n", "parent": 46, "children": [308, 309], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 308, "type": "#include", "text": "#include", "parent": 307, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 8}}, {"id": 309, "type": "string_literal", "text": "\"file.h\"", "parent": 307, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 17}}, {"id": 310, "type": "preproc_ifdef", "text": "#ifndef PIPE_BUF \n/* Get the PIPE_BUF from pathconf */\n#ifdef _PC_PIPE_BUF\n#define PIPE_BUF pathconf(\".\", _PC_PIPE_BUF)\n#else\n#define PIPE_BUF 512\n#endif\n#endif", "parent": 46, "children": [311, 312, 313, 327], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 311, "type": "#ifndef", "text": "#ifndef", "parent": 310, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 312, "type": "identifier", "text": "PIPE_BUF", "parent": 310, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 16}}, {"id": 313, "type": "preproc_ifdef", "text": "#ifdef _PC_PIPE_BUF\n#define PIPE_BUF pathconf(\".\", _PC_PIPE_BUF)\n#else\n#define PIPE_BUF 512\n#endif", "parent": 310, "children": [314, 315, 316, 320, 326], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 314, "type": "#ifdef", "text": "#ifdef", "parent": 313, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 6}}, {"id": 315, "type": "identifier", "text": "_PC_PIPE_BUF", "parent": 313, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 19}}, {"id": 316, "type": "preproc_def", "text": "#define PIPE_BUF pathconf(\".\", _PC_PIPE_BUF)\n", "parent": 313, "children": [317, 318, 319], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 48, "column": 0}}, {"id": 317, "type": "#define", "text": "#define", "parent": 316, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 7}}, {"id": 318, "type": "identifier", "text": "PIPE_BUF", "parent": 316, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 16}}, {"id": 319, "type": "preproc_arg", "text": "pathconf(\".\", _PC_PIPE_BUF)", "parent": 316, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 44}}, {"id": 320, "type": "preproc_else", "text": "#else\n#define PIPE_BUF 512\n", "parent": 313, "children": [321, 322], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 50, "column": 0}}, {"id": 321, "type": "#else", "text": "#else", "parent": 320, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 5}}, {"id": 322, "type": "preproc_def", "text": "#define PIPE_BUF 512\n", "parent": 320, "children": [323, 324, 325], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 50, "column": 0}}, {"id": 323, "type": "#define", "text": "#define", "parent": 322, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 7}}, {"id": 324, "type": "identifier", "text": "PIPE_BUF", "parent": 322, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 16}}, {"id": 325, "type": "preproc_arg", "text": "512", "parent": 322, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 20}}, {"id": 326, "type": "#endif", "text": "#endif", "parent": 313, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 327, "type": "#endif", "text": "#endif", "parent": 310, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 328, "type": "function_definition", "text": "static void free_mlist(struct mlist *mlist) {\n\tstruct mlist *ml;\n\tif (!mlist) {\n\t\treturn;\n\t}\n\tfor (ml = mlist->next; ml != mlist;) {\n\t\tstruct mlist *next = ml->next;\n\t\tstruct r_magic *mg = ml->magic;\n\t\tfile_delmagic (mg, ml->mapped, ml->nmagic);\n\t\tfree (ml);\n\t\tml = next;\n\t}\n\tfree (ml);\n}", "parent": 46, "children": [329, 330], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 66, "column": 1}}, {"id": 329, "type": "primitive_type", "text": "void", "parent": 328, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 11}}, {"id": 330, "type": "function_declarator", "text": "free_mlist(struct mlist *mlist)", "parent": 328, "children": [331, 332], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 43}}, {"id": 331, "type": "identifier", "text": "free_mlist", "parent": 330, "children": [], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 22}}, {"id": 332, "type": "parameter_list", "text": "(struct mlist *mlist)", "parent": 330, "children": [333], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 43}}, {"id": 333, "type": "parameter_declaration", "text": "struct mlist *mlist", "parent": 332, "children": [334, 337], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 42}}, {"id": 334, "type": "struct_specifier", "text": "struct mlist", "parent": 333, "children": [335, 336], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 35}}, {"id": 335, "type": "struct", "text": "struct", "parent": 334, "children": [], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 29}}, {"id": 336, "type": "type_identifier", "text": "mlist", "parent": 334, "children": [], "start_point": {"row": 53, "column": 30}, "end_point": {"row": 53, "column": 35}}, {"id": 337, "type": "pointer_declarator", "text": "*mlist", "parent": 333, "children": [338, 339], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 42}}, {"id": 338, "type": "*", "text": "*", "parent": 337, "children": [], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 37}}, {"id": 339, "type": "identifier", "text": "mlist", "parent": 337, "children": [], "start_point": {"row": 53, "column": 37}, "end_point": {"row": 53, "column": 42}}, {"id": 340, "type": "declaration", "text": "struct mlist *ml;", "parent": 328, "children": [341, 344], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 18}}, {"id": 341, "type": "struct_specifier", "text": "struct mlist", "parent": 340, "children": [342, 343], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 13}}, {"id": 342, "type": "struct", "text": "struct", "parent": 341, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 7}}, {"id": 343, "type": "type_identifier", "text": "mlist", "parent": 341, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 13}}, {"id": 344, "type": "pointer_declarator", "text": "*ml", "parent": 340, "children": [345, 346], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 17}}, {"id": 345, "type": "*", "text": "*", "parent": 344, "children": [], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 15}}, {"id": 346, "type": "identifier", "text": "ml", "parent": 344, "children": [], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 54, "column": 17}}, {"id": 347, "type": "if_statement", "text": "if (!mlist) {\n\t\treturn;\n\t}", "parent": 328, "children": [348], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 57, "column": 2}}, {"id": 348, "type": "parenthesized_expression", "text": "(!mlist)", "parent": 347, "children": [349], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 12}}, {"id": 349, "type": "unary_expression", "text": "!mlist", "parent": 348, "children": [350, 351], "start_point": {"row": 55, "column": 5}, "end_point": {"row": 55, "column": 11}}, {"id": 350, "type": "!", "text": "!", "parent": 349, "children": [], "start_point": {"row": 55, "column": 5}, "end_point": {"row": 55, "column": 6}}, {"id": 351, "type": "identifier", "text": "mlist", "parent": 349, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 11}}, {"id": 352, "type": "return_statement", "text": "return;", "parent": 347, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 9}}, {"id": 353, "type": "for_statement", "text": "for (ml = mlist->next; ml != mlist;) {\n\t\tstruct mlist *next = ml->next;\n\t\tstruct r_magic *mg = ml->magic;\n\t\tfile_delmagic (mg, ml->mapped, ml->nmagic);\n\t\tfree (ml);\n\t\tml = next;\n\t}", "parent": 328, "children": [354, 360], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 64, "column": 2}}, {"id": 354, "type": "assignment_expression", "text": "ml = mlist->next", "parent": 353, "children": [355, 356, 357], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 22}}, {"id": 355, "type": "identifier", "text": "ml", "parent": 354, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 8}}, {"id": 356, "type": "=", "text": "=", "parent": 354, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 10}}, {"id": 357, "type": "field_expression", "text": "mlist->next", "parent": 354, "children": [358, 359], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 22}}, {"id": 358, "type": "identifier", "text": "mlist", "parent": 357, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 16}}, {"id": 359, "type": "field_identifier", "text": "next", "parent": 357, "children": [], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 22}}, {"id": 360, "type": "binary_expression", "text": "ml != mlist", "parent": 353, "children": [361, 362, 363], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 35}}, {"id": 361, "type": "identifier", "text": "ml", "parent": 360, "children": [], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 26}}, {"id": 362, "type": "!=", "text": "!=", "parent": 360, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 29}}, {"id": 363, "type": "identifier", "text": "mlist", "parent": 360, "children": [], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 35}}, {"id": 364, "type": "declaration", "text": "struct mlist *next = ml->next;", "parent": 353, "children": [365, 368], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 32}}, {"id": 365, "type": "struct_specifier", "text": "struct mlist", "parent": 364, "children": [366, 367], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 14}}, {"id": 366, "type": "struct", "text": "struct", "parent": 365, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 8}}, {"id": 367, "type": "type_identifier", "text": "mlist", "parent": 365, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 14}}, {"id": 368, "type": "init_declarator", "text": "*next = ml->next", "parent": 364, "children": [369, 372, 373], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 31}}, {"id": 369, "type": "pointer_declarator", "text": "*next", "parent": 368, "children": [370, 371], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 20}}, {"id": 370, "type": "*", "text": "*", "parent": 369, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 16}}, {"id": 371, "type": "identifier", "text": "next", "parent": 369, "children": [], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 59, "column": 20}}, {"id": 372, "type": "=", "text": "=", "parent": 368, "children": [], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 22}}, {"id": 373, "type": "field_expression", "text": "ml->next", "parent": 368, "children": [374, 375], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 31}}, {"id": 374, "type": "identifier", "text": "ml", "parent": 373, "children": [], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 25}}, {"id": 375, "type": "field_identifier", "text": "next", "parent": 373, "children": [], "start_point": {"row": 59, "column": 27}, "end_point": {"row": 59, "column": 31}}, {"id": 376, "type": "declaration", "text": "struct r_magic *mg = ml->magic;", "parent": 353, "children": [377, 380], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 33}}, {"id": 377, "type": "struct_specifier", "text": "struct r_magic", "parent": 376, "children": [378, 379], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 16}}, {"id": 378, "type": "struct", "text": "struct", "parent": 377, "children": [], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 8}}, {"id": 379, "type": "type_identifier", "text": "r_magic", "parent": 377, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 16}}, {"id": 380, "type": "init_declarator", "text": "*mg = ml->magic", "parent": 376, "children": [381, 384, 385], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 32}}, {"id": 381, "type": "pointer_declarator", "text": "*mg", "parent": 380, "children": [382, 383], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 20}}, {"id": 382, "type": "*", "text": "*", "parent": 381, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 18}}, {"id": 383, "type": "identifier", "text": "mg", "parent": 381, "children": [], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 20}}, {"id": 384, "type": "=", "text": "=", "parent": 380, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 22}}, {"id": 385, "type": "field_expression", "text": "ml->magic", "parent": 380, "children": [386, 387], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 32}}, {"id": 386, "type": "identifier", "text": "ml", "parent": 385, "children": [], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 25}}, {"id": 387, "type": "field_identifier", "text": "magic", "parent": 385, "children": [], "start_point": {"row": 60, "column": 27}, "end_point": {"row": 60, "column": 32}}, {"id": 388, "type": "call_expression", "text": "file_delmagic (mg, ml->mapped, ml->nmagic)", "parent": 353, "children": [389, 390], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 44}}, {"id": 389, "type": "identifier", "text": "file_delmagic", "parent": 388, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 15}}, {"id": 390, "type": "argument_list", "text": "(mg, ml->mapped, ml->nmagic)", "parent": 388, "children": [391, 392, 395], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 44}}, {"id": 391, "type": "identifier", "text": "mg", "parent": 390, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 19}}, {"id": 392, "type": "field_expression", "text": "ml->mapped", "parent": 390, "children": [393, 394], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 31}}, {"id": 393, "type": "identifier", "text": "ml", "parent": 392, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 23}}, {"id": 394, "type": "field_identifier", "text": "mapped", "parent": 392, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 31}}, {"id": 395, "type": "field_expression", "text": "ml->nmagic", "parent": 390, "children": [396, 397], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 43}}, {"id": 396, "type": "identifier", "text": "ml", "parent": 395, "children": [], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 35}}, {"id": 397, "type": "field_identifier", "text": "nmagic", "parent": 395, "children": [], "start_point": {"row": 61, "column": 37}, "end_point": {"row": 61, "column": 43}}, {"id": 398, "type": "call_expression", "text": "free (ml)", "parent": 353, "children": [399, 400], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 11}}, {"id": 399, "type": "identifier", "text": "free", "parent": 398, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 6}}, {"id": 400, "type": "argument_list", "text": "(ml)", "parent": 398, "children": [401], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 11}}, {"id": 401, "type": "identifier", "text": "ml", "parent": 400, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 10}}, {"id": 402, "type": "assignment_expression", "text": "ml = next", "parent": 353, "children": [403, 404, 405], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 11}}, {"id": 403, "type": "identifier", "text": "ml", "parent": 402, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 4}}, {"id": 404, "type": "=", "text": "=", "parent": 402, "children": [], "start_point": {"row": 63, "column": 5}, "end_point": {"row": 63, "column": 6}}, {"id": 405, "type": "identifier", "text": "next", "parent": 402, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 11}}, {"id": 406, "type": "call_expression", "text": "free (ml)", "parent": 328, "children": [407, 408], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 10}}, {"id": 407, "type": "identifier", "text": "free", "parent": 406, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 5}}, {"id": 408, "type": "argument_list", "text": "(ml)", "parent": 406, "children": [409], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 10}}, {"id": 409, "type": "identifier", "text": "ml", "parent": 408, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 9}}, {"id": 410, "type": "function_definition", "text": "static int info_from_stat(RMagic *ms, unsigned short md) {\n\t/* We cannot open it, but we were able to stat it. */\n\tif (md & 0222) {\n\t\tif (file_printf (ms, \"writable, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tif (md & 0111) {\n\t\tif (file_printf (ms, \"executable, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tif (S_ISREG (md)) {\n\t\tif (file_printf (ms, \"regular file, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tif (file_printf (ms, \"no read permission\") == -1) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}", "parent": 46, "children": [411, 412], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 89, "column": 1}}, {"id": 411, "type": "primitive_type", "text": "int", "parent": 410, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 10}}, {"id": 412, "type": "function_declarator", "text": "info_from_stat(RMagic *ms, unsigned short md)", "parent": 410, "children": [413, 414], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 56}}, {"id": 413, "type": "identifier", "text": "info_from_stat", "parent": 412, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 25}}, {"id": 414, "type": "parameter_list", "text": "(RMagic *ms, unsigned short md)", "parent": 412, "children": [415, 420], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 56}}, {"id": 415, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 414, "children": [416, 417], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 36}}, {"id": 416, "type": "type_identifier", "text": "RMagic", "parent": 415, "children": [], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 32}}, {"id": 417, "type": "pointer_declarator", "text": "*ms", "parent": 415, "children": [418, 419], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 36}}, {"id": 418, "type": "*", "text": "*", "parent": 417, "children": [], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 34}}, {"id": 419, "type": "identifier", "text": "ms", "parent": 417, "children": [], "start_point": {"row": 68, "column": 34}, "end_point": {"row": 68, "column": 36}}, {"id": 420, "type": "parameter_declaration", "text": "unsigned short md", "parent": 414, "children": [421, 424], "start_point": {"row": 68, "column": 38}, "end_point": {"row": 68, "column": 55}}, {"id": 421, "type": "sized_type_specifier", "text": "unsigned short", "parent": 420, "children": [422, 423], "start_point": {"row": 68, "column": 38}, "end_point": {"row": 68, "column": 52}}, {"id": 422, "type": "unsigned", "text": "unsigned", "parent": 421, "children": [], "start_point": {"row": 68, "column": 38}, "end_point": {"row": 68, "column": 46}}, {"id": 423, "type": "short", "text": "short", "parent": 421, "children": [], "start_point": {"row": 68, "column": 47}, "end_point": {"row": 68, "column": 52}}, {"id": 424, "type": "identifier", "text": "md", "parent": 420, "children": [], "start_point": {"row": 68, "column": 53}, "end_point": {"row": 68, "column": 55}}, {"id": 425, "type": "if_statement", "text": "if (md & 0222) {\n\t\tif (file_printf (ms, \"writable, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}", "parent": 410, "children": [426], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 74, "column": 2}}, {"id": 426, "type": "parenthesized_expression", "text": "(md & 0222)", "parent": 425, "children": [427], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 15}}, {"id": 427, "type": "binary_expression", "text": "md & 0222", "parent": 426, "children": [428, 429], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 14}}, {"id": 428, "type": "identifier", "text": "md", "parent": 427, "children": [], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 7}}, {"id": 429, "type": "number_literal", "text": "0222", "parent": 427, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 14}}, {"id": 430, "type": "if_statement", "text": "if (file_printf (ms, \"writable, \") == -1) {\n\t\t\treturn -1;\n\t\t}", "parent": 425, "children": [431], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 73, "column": 3}}, {"id": 431, "type": "parenthesized_expression", "text": "(file_printf (ms, \"writable, \") == -1)", "parent": 430, "children": [432], "start_point": {"row": 71, "column": 5}, "end_point": {"row": 71, "column": 43}}, {"id": 432, "type": "binary_expression", "text": "file_printf (ms, \"writable, \") == -1", "parent": 431, "children": [433, 438, 439], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 42}}, {"id": 433, "type": "call_expression", "text": "file_printf (ms, \"writable, \")", "parent": 432, "children": [434, 435], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 36}}, {"id": 434, "type": "identifier", "text": "file_printf", "parent": 433, "children": [], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 17}}, {"id": 435, "type": "argument_list", "text": "(ms, \"writable, \")", "parent": 433, "children": [436, 437], "start_point": {"row": 71, "column": 18}, "end_point": {"row": 71, "column": 36}}, {"id": 436, "type": "identifier", "text": "ms", "parent": 435, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 21}}, {"id": 437, "type": "string_literal", "text": "\"writable, \"", "parent": 435, "children": [], "start_point": {"row": 71, "column": 23}, "end_point": {"row": 71, "column": 35}}, {"id": 438, "type": "==", "text": "==", "parent": 432, "children": [], "start_point": {"row": 71, "column": 37}, "end_point": {"row": 71, "column": 39}}, {"id": 439, "type": "number_literal", "text": "-1", "parent": 432, "children": [], "start_point": {"row": 71, "column": 40}, "end_point": {"row": 71, "column": 42}}, {"id": 440, "type": "return_statement", "text": "return -1;", "parent": 430, "children": [441], "start_point": {"row": 72, "column": 3}, "end_point": {"row": 72, "column": 13}}, {"id": 441, "type": "number_literal", "text": "-1", "parent": 440, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 12}}, {"id": 442, "type": "if_statement", "text": "if (md & 0111) {\n\t\tif (file_printf (ms, \"executable, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}", "parent": 410, "children": [443], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 79, "column": 2}}, {"id": 443, "type": "parenthesized_expression", "text": "(md & 0111)", "parent": 442, "children": [444], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 15}}, {"id": 444, "type": "binary_expression", "text": "md & 0111", "parent": 443, "children": [445, 446], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 14}}, {"id": 445, "type": "identifier", "text": "md", "parent": 444, "children": [], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 7}}, {"id": 446, "type": "number_literal", "text": "0111", "parent": 444, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 14}}, {"id": 447, "type": "if_statement", "text": "if (file_printf (ms, \"executable, \") == -1) {\n\t\t\treturn -1;\n\t\t}", "parent": 442, "children": [448], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 78, "column": 3}}, {"id": 448, "type": "parenthesized_expression", "text": "(file_printf (ms, \"executable, \") == -1)", "parent": 447, "children": [449], "start_point": {"row": 76, "column": 5}, "end_point": {"row": 76, "column": 45}}, {"id": 449, "type": "binary_expression", "text": "file_printf (ms, \"executable, \") == -1", "parent": 448, "children": [450, 455, 456], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 44}}, {"id": 450, "type": "call_expression", "text": "file_printf (ms, \"executable, \")", "parent": 449, "children": [451, 452], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 38}}, {"id": 451, "type": "identifier", "text": "file_printf", "parent": 450, "children": [], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 17}}, {"id": 452, "type": "argument_list", "text": "(ms, \"executable, \")", "parent": 450, "children": [453, 454], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 38}}, {"id": 453, "type": "identifier", "text": "ms", "parent": 452, "children": [], "start_point": {"row": 76, "column": 19}, "end_point": {"row": 76, "column": 21}}, {"id": 454, "type": "string_literal", "text": "\"executable, \"", "parent": 452, "children": [], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 37}}, {"id": 455, "type": "==", "text": "==", "parent": 449, "children": [], "start_point": {"row": 76, "column": 39}, "end_point": {"row": 76, "column": 41}}, {"id": 456, "type": "number_literal", "text": "-1", "parent": 449, "children": [], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 44}}, {"id": 457, "type": "return_statement", "text": "return -1;", "parent": 447, "children": [458], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 13}}, {"id": 458, "type": "number_literal", "text": "-1", "parent": 457, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 12}}, {"id": 459, "type": "if_statement", "text": "if (S_ISREG (md)) {\n\t\tif (file_printf (ms, \"regular file, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}", "parent": 410, "children": [460], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 84, "column": 2}}, {"id": 460, "type": "parenthesized_expression", "text": "(S_ISREG (md))", "parent": 459, "children": [461], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 18}}, {"id": 461, "type": "call_expression", "text": "S_ISREG (md)", "parent": 460, "children": [462, 463], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 17}}, {"id": 462, "type": "identifier", "text": "S_ISREG", "parent": 461, "children": [], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 12}}, {"id": 463, "type": "argument_list", "text": "(md)", "parent": 461, "children": [464], "start_point": {"row": 80, "column": 13}, "end_point": {"row": 80, "column": 17}}, {"id": 464, "type": "identifier", "text": "md", "parent": 463, "children": [], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 16}}, {"id": 465, "type": "if_statement", "text": "if (file_printf (ms, \"regular file, \") == -1) {\n\t\t\treturn -1;\n\t\t}", "parent": 459, "children": [466], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 83, "column": 3}}, {"id": 466, "type": "parenthesized_expression", "text": "(file_printf (ms, \"regular file, \") == -1)", "parent": 465, "children": [467], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 47}}, {"id": 467, "type": "binary_expression", "text": "file_printf (ms, \"regular file, \") == -1", "parent": 466, "children": [468, 473, 474], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 46}}, {"id": 468, "type": "call_expression", "text": "file_printf (ms, \"regular file, \")", "parent": 467, "children": [469, 470], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 40}}, {"id": 469, "type": "identifier", "text": "file_printf", "parent": 468, "children": [], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 17}}, {"id": 470, "type": "argument_list", "text": "(ms, \"regular file, \")", "parent": 468, "children": [471, 472], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 40}}, {"id": 471, "type": "identifier", "text": "ms", "parent": 470, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 21}}, {"id": 472, "type": "string_literal", "text": "\"regular file, \"", "parent": 470, "children": [], "start_point": {"row": 81, "column": 23}, "end_point": {"row": 81, "column": 39}}, {"id": 473, "type": "==", "text": "==", "parent": 467, "children": [], "start_point": {"row": 81, "column": 41}, "end_point": {"row": 81, "column": 43}}, {"id": 474, "type": "number_literal", "text": "-1", "parent": 467, "children": [], "start_point": {"row": 81, "column": 44}, "end_point": {"row": 81, "column": 46}}, {"id": 475, "type": "return_statement", "text": "return -1;", "parent": 465, "children": [476], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 13}}, {"id": 476, "type": "number_literal", "text": "-1", "parent": 475, "children": [], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 12}}, {"id": 477, "type": "if_statement", "text": "if (file_printf (ms, \"no read permission\") == -1) {\n\t\treturn -1;\n\t}", "parent": 410, "children": [478], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 87, "column": 2}}, {"id": 478, "type": "parenthesized_expression", "text": "(file_printf (ms, \"no read permission\") == -1)", "parent": 477, "children": [479], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 50}}, {"id": 479, "type": "binary_expression", "text": "file_printf (ms, \"no read permission\") == -1", "parent": 478, "children": [480, 485, 486], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 49}}, {"id": 480, "type": "call_expression", "text": "file_printf (ms, \"no read permission\")", "parent": 479, "children": [481, 482], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 43}}, {"id": 481, "type": "identifier", "text": "file_printf", "parent": 480, "children": [], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 16}}, {"id": 482, "type": "argument_list", "text": "(ms, \"no read permission\")", "parent": 480, "children": [483, 484], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 85, "column": 43}}, {"id": 483, "type": "identifier", "text": "ms", "parent": 482, "children": [], "start_point": {"row": 85, "column": 18}, "end_point": {"row": 85, "column": 20}}, {"id": 484, "type": "string_literal", "text": "\"no read permission\"", "parent": 482, "children": [], "start_point": {"row": 85, "column": 22}, "end_point": {"row": 85, "column": 42}}, {"id": 485, "type": "==", "text": "==", "parent": 479, "children": [], "start_point": {"row": 85, "column": 44}, "end_point": {"row": 85, "column": 46}}, {"id": 486, "type": "number_literal", "text": "-1", "parent": 479, "children": [], "start_point": {"row": 85, "column": 47}, "end_point": {"row": 85, "column": 49}}, {"id": 487, "type": "return_statement", "text": "return -1;", "parent": 477, "children": [488], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 12}}, {"id": 488, "type": "number_literal", "text": "-1", "parent": 487, "children": [], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 11}}, {"id": 489, "type": "return_statement", "text": "return 0;", "parent": 410, "children": [490], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 10}}, {"id": 490, "type": "number_literal", "text": "0", "parent": 489, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 9}}, {"id": 491, "type": "function_definition", "text": "static void close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb) {\n\tif (fd >= 0) {\n\t\tclose (fd);\n\t}\n}", "parent": 46, "children": [492, 493], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 95, "column": 1}}, {"id": 492, "type": "primitive_type", "text": "void", "parent": 491, "children": [], "start_point": {"row": 91, "column": 7}, "end_point": {"row": 91, "column": 11}}, {"id": 493, "type": "function_declarator", "text": "close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb)", "parent": 491, "children": [494, 495], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 97}}, {"id": 494, "type": "identifier", "text": "close_and_restore", "parent": 493, "children": [], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 29}}, {"id": 495, "type": "parameter_list", "text": "(const RMagic *ms, const char *name, int fd, const struct stat *sb)", "parent": 493, "children": [496, 501, 506, 509], "start_point": {"row": 91, "column": 30}, "end_point": {"row": 91, "column": 97}}, {"id": 496, "type": "parameter_declaration", "text": "const RMagic *ms", "parent": 495, "children": [497, 498], "start_point": {"row": 91, "column": 31}, "end_point": {"row": 91, "column": 47}}, {"id": 497, "type": "type_identifier", "text": "RMagic", "parent": 496, "children": [], "start_point": {"row": 91, "column": 37}, "end_point": {"row": 91, "column": 43}}, {"id": 498, "type": "pointer_declarator", "text": "*ms", "parent": 496, "children": [499, 500], "start_point": {"row": 91, "column": 44}, "end_point": {"row": 91, "column": 47}}, {"id": 499, "type": "*", "text": "*", "parent": 498, "children": [], "start_point": {"row": 91, "column": 44}, "end_point": {"row": 91, "column": 45}}, {"id": 500, "type": "identifier", "text": "ms", "parent": 498, "children": [], "start_point": {"row": 91, "column": 45}, "end_point": {"row": 91, "column": 47}}, {"id": 501, "type": "parameter_declaration", "text": "const char *name", "parent": 495, "children": [502, 503], "start_point": {"row": 91, "column": 49}, "end_point": {"row": 91, "column": 65}}, {"id": 502, "type": "primitive_type", "text": "char", "parent": 501, "children": [], "start_point": {"row": 91, "column": 55}, "end_point": {"row": 91, "column": 59}}, {"id": 503, "type": "pointer_declarator", "text": "*name", "parent": 501, "children": [504, 505], "start_point": {"row": 91, "column": 60}, "end_point": {"row": 91, "column": 65}}, {"id": 504, "type": "*", "text": "*", "parent": 503, "children": [], "start_point": {"row": 91, "column": 60}, "end_point": {"row": 91, "column": 61}}, {"id": 505, "type": "identifier", "text": "name", "parent": 503, "children": [], "start_point": {"row": 91, "column": 61}, "end_point": {"row": 91, "column": 65}}, {"id": 506, "type": "parameter_declaration", "text": "int fd", "parent": 495, "children": [507, 508], "start_point": {"row": 91, "column": 67}, "end_point": {"row": 91, "column": 73}}, {"id": 507, "type": "primitive_type", "text": "int", "parent": 506, "children": [], "start_point": {"row": 91, "column": 67}, "end_point": {"row": 91, "column": 70}}, {"id": 508, "type": "identifier", "text": "fd", "parent": 506, "children": [], "start_point": {"row": 91, "column": 71}, "end_point": {"row": 91, "column": 73}}, {"id": 509, "type": "parameter_declaration", "text": "const struct stat *sb", "parent": 495, "children": [510, 513], "start_point": {"row": 91, "column": 75}, "end_point": {"row": 91, "column": 96}}, {"id": 510, "type": "struct_specifier", "text": "struct stat", "parent": 509, "children": [511, 512], "start_point": {"row": 91, "column": 81}, "end_point": {"row": 91, "column": 92}}, {"id": 511, "type": "struct", "text": "struct", "parent": 510, "children": [], "start_point": {"row": 91, "column": 81}, "end_point": {"row": 91, "column": 87}}, {"id": 512, "type": "type_identifier", "text": "stat", "parent": 510, "children": [], "start_point": {"row": 91, "column": 88}, "end_point": {"row": 91, "column": 92}}, {"id": 513, "type": "pointer_declarator", "text": "*sb", "parent": 509, "children": [514, 515], "start_point": {"row": 91, "column": 93}, "end_point": {"row": 91, "column": 96}}, {"id": 514, "type": "*", "text": "*", "parent": 513, "children": [], "start_point": {"row": 91, "column": 93}, "end_point": {"row": 91, "column": 94}}, {"id": 515, "type": "identifier", "text": "sb", "parent": 513, "children": [], "start_point": {"row": 91, "column": 94}, "end_point": {"row": 91, "column": 96}}, {"id": 516, "type": "if_statement", "text": "if (fd >= 0) {\n\t\tclose (fd);\n\t}", "parent": 491, "children": [517], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 94, "column": 2}}, {"id": 517, "type": "parenthesized_expression", "text": "(fd >= 0)", "parent": 516, "children": [518], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 13}}, {"id": 518, "type": "binary_expression", "text": "fd >= 0", "parent": 517, "children": [519, 520, 521], "start_point": {"row": 92, "column": 5}, "end_point": {"row": 92, "column": 12}}, {"id": 519, "type": "identifier", "text": "fd", "parent": 518, "children": [], "start_point": {"row": 92, "column": 5}, "end_point": {"row": 92, "column": 7}}, {"id": 520, "type": ">=", "text": ">=", "parent": 518, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 10}}, {"id": 521, "type": "number_literal", "text": "0", "parent": 518, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 12}}, {"id": 522, "type": "call_expression", "text": "close (fd)", "parent": 516, "children": [523, 524], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 12}}, {"id": 523, "type": "identifier", "text": "close", "parent": 522, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 7}}, {"id": 524, "type": "argument_list", "text": "(fd)", "parent": 522, "children": [525], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 12}}, {"id": 525, "type": "identifier", "text": "fd", "parent": 524, "children": [], "start_point": {"row": 93, "column": 9}, "end_point": {"row": 93, "column": 11}}, {"id": 526, "type": "primitive_type", "text": "char", "parent": 46, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 17}}, {"id": 527, "type": "pointer_declarator", "text": "*file_or_fd(RMagic *ms, const char *inname, int fd)", "parent": 46, "children": [528, 529], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 69}}, {"id": 528, "type": "*", "text": "*", "parent": 527, "children": [], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 19}}, {"id": 529, "type": "function_declarator", "text": "file_or_fd(RMagic *ms, const char *inname, int fd)", "parent": 527, "children": [530, 531], "start_point": {"row": 97, "column": 19}, "end_point": {"row": 97, "column": 69}}, {"id": 530, "type": "identifier", "text": "file_or_fd", "parent": 529, "children": [], "start_point": {"row": 97, "column": 19}, "end_point": {"row": 97, "column": 29}}, {"id": 531, "type": "parameter_list", "text": "(RMagic *ms, const char *inname, int fd)", "parent": 529, "children": [532, 537, 542], "start_point": {"row": 97, "column": 29}, "end_point": {"row": 97, "column": 69}}, {"id": 532, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 531, "children": [533, 534], "start_point": {"row": 97, "column": 30}, "end_point": {"row": 97, "column": 40}}, {"id": 533, "type": "type_identifier", "text": "RMagic", "parent": 532, "children": [], "start_point": {"row": 97, "column": 30}, "end_point": {"row": 97, "column": 36}}, {"id": 534, "type": "pointer_declarator", "text": "*ms", "parent": 532, "children": [535, 536], "start_point": {"row": 97, "column": 37}, "end_point": {"row": 97, "column": 40}}, {"id": 535, "type": "*", "text": "*", "parent": 534, "children": [], "start_point": {"row": 97, "column": 37}, "end_point": {"row": 97, "column": 38}}, {"id": 536, "type": "identifier", "text": "ms", "parent": 534, "children": [], "start_point": {"row": 97, "column": 38}, "end_point": {"row": 97, "column": 40}}, {"id": 537, "type": "parameter_declaration", "text": "const char *inname", "parent": 531, "children": [538, 539], "start_point": {"row": 97, "column": 42}, "end_point": {"row": 97, "column": 60}}, {"id": 538, "type": "primitive_type", "text": "char", "parent": 537, "children": [], "start_point": {"row": 97, "column": 48}, "end_point": {"row": 97, "column": 52}}, {"id": 539, "type": "pointer_declarator", "text": "*inname", "parent": 537, "children": [540, 541], "start_point": {"row": 97, "column": 53}, "end_point": {"row": 97, "column": 60}}, {"id": 540, "type": "*", "text": "*", "parent": 539, "children": [], "start_point": {"row": 97, "column": 53}, "end_point": {"row": 97, "column": 54}}, {"id": 541, "type": "identifier", "text": "inname", "parent": 539, "children": [], "start_point": {"row": 97, "column": 54}, "end_point": {"row": 97, "column": 60}}, {"id": 542, "type": "parameter_declaration", "text": "int fd", "parent": 531, "children": [543, 544], "start_point": {"row": 97, "column": 62}, "end_point": {"row": 97, "column": 68}}, {"id": 543, "type": "primitive_type", "text": "int", "parent": 542, "children": [], "start_point": {"row": 97, "column": 62}, "end_point": {"row": 97, "column": 65}}, {"id": 544, "type": "identifier", "text": "fd", "parent": 542, "children": [], "start_point": {"row": 97, "column": 66}, "end_point": {"row": 97, "column": 68}}, {"id": 545, "type": "declaration", "text": "bool ispipe = false;", "parent": 46, "children": [546, 547], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 21}}, {"id": 546, "type": "primitive_type", "text": "bool", "parent": 545, "children": [], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 5}}, {"id": 547, "type": "init_declarator", "text": "ispipe = false", "parent": 545, "children": [548, 549, 550], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 20}}, {"id": 548, "type": "identifier", "text": "ispipe", "parent": 547, "children": [], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 12}}, {"id": 549, "type": "=", "text": "=", "parent": 547, "children": [], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 14}}, {"id": 550, "type": "false", "text": "false", "parent": 547, "children": [], "start_point": {"row": 98, "column": 15}, "end_point": {"row": 98, "column": 20}}, {"id": 551, "type": "declaration", "text": "int rv = -1;", "parent": 46, "children": [552, 553], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 13}}, {"id": 552, "type": "primitive_type", "text": "int", "parent": 551, "children": [], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 4}}, {"id": 553, "type": "init_declarator", "text": "rv = -1", "parent": 551, "children": [554, 555, 556], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 99, "column": 12}}, {"id": 554, "type": "identifier", "text": "rv", "parent": 553, "children": [], "start_point": {"row": 99, "column": 5}, "end_point": {"row": 99, "column": 7}}, {"id": 555, "type": "=", "text": "=", "parent": 553, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 9}}, {"id": 556, "type": "number_literal", "text": "-1", "parent": 553, "children": [], "start_point": {"row": 99, "column": 10}, "end_point": {"row": 99, "column": 12}}, {"id": 557, "type": "declaration", "text": "unsigned char *buf;", "parent": 46, "children": [558, 561], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 20}}, {"id": 558, "type": "sized_type_specifier", "text": "unsigned char", "parent": 557, "children": [559, 560], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 14}}, {"id": 559, "type": "unsigned", "text": "unsigned", "parent": 558, "children": [], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 9}}, {"id": 560, "type": "primitive_type", "text": "char", "parent": 558, "children": [], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 14}}, {"id": 561, "type": "pointer_declarator", "text": "*buf", "parent": 557, "children": [562, 563], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 19}}, {"id": 562, "type": "*", "text": "*", "parent": 561, "children": [], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 16}}, {"id": 563, "type": "identifier", "text": "buf", "parent": 561, "children": [], "start_point": {"row": 100, "column": 16}, "end_point": {"row": 100, "column": 19}}, {"id": 564, "type": "declaration", "text": "struct stat sb;", "parent": 46, "children": [565, 568], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 16}}, {"id": 565, "type": "struct_specifier", "text": "struct stat", "parent": 564, "children": [566, 567], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 12}}, {"id": 566, "type": "struct", "text": "struct", "parent": 565, "children": [], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 7}}, {"id": 567, "type": "type_identifier", "text": "stat", "parent": 565, "children": [], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 12}}, {"id": 568, "type": "identifier", "text": "sb", "parent": 564, "children": [], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 15}}, {"id": 569, "type": "declaration", "text": "int nbytes = 0;", "parent": 46, "children": [570, 571], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 16}}, {"id": 570, "type": "primitive_type", "text": "int", "parent": 569, "children": [], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 4}}, {"id": 571, "type": "init_declarator", "text": "nbytes = 0", "parent": 569, "children": [572, 573, 574], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 15}}, {"id": 572, "type": "identifier", "text": "nbytes", "parent": 571, "children": [], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 11}}, {"id": 573, "type": "=", "text": "=", "parent": 571, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 13}}, {"id": 574, "type": "number_literal", "text": "0", "parent": 571, "children": [], "start_point": {"row": 102, "column": 14}, "end_point": {"row": 102, "column": 15}}, {"id": 575, "type": "preproc_def", "text": "#define SLOP (1 + sizeof(union VALUETYPE))\n", "parent": 46, "children": [576, 577, 578], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 109, "column": 0}}, {"id": 576, "type": "#define", "text": "#define", "parent": 575, "children": [], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 7}}, {"id": 577, "type": "identifier", "text": "SLOP", "parent": 575, "children": [], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 12}}, {"id": 578, "type": "preproc_arg", "text": "(1 + sizeof(union VALUETYPE))", "parent": 575, "children": [], "start_point": {"row": 108, "column": 13}, "end_point": {"row": 108, "column": 42}}, {"id": 579, "type": "if_statement", "text": "if (!(buf = malloc (HOWMANY + SLOP))) {\n\t\treturn NULL;\n\t}", "parent": 46, "children": [580], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 111, "column": 2}}, {"id": 580, "type": "parenthesized_expression", "text": "(!(buf = malloc (HOWMANY + SLOP)))", "parent": 579, "children": [581], "start_point": {"row": 109, "column": 4}, "end_point": {"row": 109, "column": 38}}, {"id": 581, "type": "unary_expression", "text": "!(buf = malloc (HOWMANY + SLOP))", "parent": 580, "children": [582, 583], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 37}}, {"id": 582, "type": "!", "text": "!", "parent": 581, "children": [], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 6}}, {"id": 583, "type": "parenthesized_expression", "text": "(buf = malloc (HOWMANY + SLOP))", "parent": 581, "children": [584], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 37}}, {"id": 584, "type": "assignment_expression", "text": "buf = malloc (HOWMANY + SLOP)", "parent": 583, "children": [585, 586, 587], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 36}}, {"id": 585, "type": "identifier", "text": "buf", "parent": 584, "children": [], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 10}}, {"id": 586, "type": "=", "text": "=", "parent": 584, "children": [], "start_point": {"row": 109, "column": 11}, "end_point": {"row": 109, "column": 12}}, {"id": 587, "type": "call_expression", "text": "malloc (HOWMANY + SLOP)", "parent": 584, "children": [588, 589], "start_point": {"row": 109, "column": 13}, "end_point": {"row": 109, "column": 36}}, {"id": 588, "type": "identifier", "text": "malloc", "parent": 587, "children": [], "start_point": {"row": 109, "column": 13}, "end_point": {"row": 109, "column": 19}}, {"id": 589, "type": "argument_list", "text": "(HOWMANY + SLOP)", "parent": 587, "children": [590], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 36}}, {"id": 590, "type": "binary_expression", "text": "HOWMANY + SLOP", "parent": 589, "children": [591, 592, 593], "start_point": {"row": 109, "column": 21}, "end_point": {"row": 109, "column": 35}}, {"id": 591, "type": "identifier", "text": "HOWMANY", "parent": 590, "children": [], "start_point": {"row": 109, "column": 21}, "end_point": {"row": 109, "column": 28}}, {"id": 592, "type": "+", "text": "+", "parent": 590, "children": [], "start_point": {"row": 109, "column": 29}, "end_point": {"row": 109, "column": 30}}, {"id": 593, "type": "identifier", "text": "SLOP", "parent": 590, "children": [], "start_point": {"row": 109, "column": 31}, "end_point": {"row": 109, "column": 35}}, {"id": 594, "type": "return_statement", "text": "return NULL;", "parent": 579, "children": [595], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 14}}, {"id": 595, "type": "null", "text": "NULL", "parent": 594, "children": [596], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 13}}, {"id": 596, "type": "NULL", "text": "NULL", "parent": 595, "children": [], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 13}}, {"id": 597, "type": "if_statement", "text": "if (file_reset (ms) == -1) {\n\t\tgoto done;\n\t}", "parent": 46, "children": [598], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 115, "column": 2}}, {"id": 598, "type": "parenthesized_expression", "text": "(file_reset (ms) == -1)", "parent": 597, "children": [599], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 27}}, {"id": 599, "type": "binary_expression", "text": "file_reset (ms) == -1", "parent": 598, "children": [600, 604, 605], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 26}}, {"id": 600, "type": "call_expression", "text": "file_reset (ms)", "parent": 599, "children": [601, 602], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 20}}, {"id": 601, "type": "identifier", "text": "file_reset", "parent": 600, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 15}}, {"id": 602, "type": "argument_list", "text": "(ms)", "parent": 600, "children": [603], "start_point": {"row": 113, "column": 16}, "end_point": {"row": 113, "column": 20}}, {"id": 603, "type": "identifier", "text": "ms", "parent": 602, "children": [], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 19}}, {"id": 604, "type": "==", "text": "==", "parent": 599, "children": [], "start_point": {"row": 113, "column": 21}, "end_point": {"row": 113, "column": 23}}, {"id": 605, "type": "number_literal", "text": "-1", "parent": 599, "children": [], "start_point": {"row": 113, "column": 24}, "end_point": {"row": 113, "column": 26}}, {"id": 606, "type": "goto_statement", "text": "goto done;", "parent": 597, "children": [607, 608], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 12}}, {"id": 607, "type": "goto", "text": "goto", "parent": 606, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 6}}, {"id": 608, "type": "statement_identifier", "text": "done", "parent": 606, "children": [], "start_point": {"row": 114, "column": 7}, "end_point": {"row": 114, "column": 11}}, {"id": 609, "type": "switch_statement", "text": "switch (file_fsmagic (ms, inname, &sb)) {\n\tcase -1: goto done;\t\t/* error */\n\tcase 0:\tbreak;\t\t\t/* nothing found */\n\tdefault: rv = 0; goto done;\t/* matched it and printed type */\n\t}", "parent": 46, "children": [610, 611], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 121, "column": 2}}, {"id": 610, "type": "switch", "text": "switch", "parent": 609, "children": [], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 7}}, {"id": 611, "type": "parenthesized_expression", "text": "(file_fsmagic (ms, inname, &sb))", "parent": 609, "children": [612], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 40}}, {"id": 612, "type": "call_expression", "text": "file_fsmagic (ms, inname, &sb)", "parent": 611, "children": [613, 614], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 39}}, {"id": 613, "type": "identifier", "text": "file_fsmagic", "parent": 612, "children": [], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 21}}, {"id": 614, "type": "argument_list", "text": "(ms, inname, &sb)", "parent": 612, "children": [615, 616, 617], "start_point": {"row": 117, "column": 22}, "end_point": {"row": 117, "column": 39}}, {"id": 615, "type": "identifier", "text": "ms", "parent": 614, "children": [], "start_point": {"row": 117, "column": 23}, "end_point": {"row": 117, "column": 25}}, {"id": 616, "type": "identifier", "text": "inname", "parent": 614, "children": [], "start_point": {"row": 117, "column": 27}, "end_point": {"row": 117, "column": 33}}, {"id": 617, "type": "pointer_expression", "text": "&sb", "parent": 614, "children": [618], "start_point": {"row": 117, "column": 35}, "end_point": {"row": 117, "column": 38}}, {"id": 618, "type": "identifier", "text": "sb", "parent": 617, "children": [], "start_point": {"row": 117, "column": 36}, "end_point": {"row": 117, "column": 38}}, {"id": 619, "type": "case_statement", "text": "case -1: goto done;", "parent": 609, "children": [620, 621, 622], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 20}}, {"id": 620, "type": "case", "text": "case", "parent": 619, "children": [], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 5}}, {"id": 621, "type": "number_literal", "text": "-1", "parent": 619, "children": [], "start_point": {"row": 118, "column": 6}, "end_point": {"row": 118, "column": 8}}, {"id": 622, "type": "goto_statement", "text": "goto done;", "parent": 619, "children": [623, 624], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 20}}, {"id": 623, "type": "goto", "text": "goto", "parent": 622, "children": [], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 14}}, {"id": 624, "type": "statement_identifier", "text": "done", "parent": 622, "children": [], "start_point": {"row": 118, "column": 15}, "end_point": {"row": 118, "column": 19}}, {"id": 625, "type": "case_statement", "text": "case 0:\tbreak;", "parent": 609, "children": [626, 627, 628], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 15}}, {"id": 626, "type": "case", "text": "case", "parent": 625, "children": [], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 5}}, {"id": 627, "type": "number_literal", "text": "0", "parent": 625, "children": [], "start_point": {"row": 119, "column": 6}, "end_point": {"row": 119, "column": 7}}, {"id": 628, "type": "break_statement", "text": "break;", "parent": 625, "children": [629], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 15}}, {"id": 629, "type": "break", "text": "break", "parent": 628, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 14}}, {"id": 630, "type": "case_statement", "text": "default: rv = 0; goto done;", "parent": 609, "children": [631, 636], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 28}}, {"id": 631, "type": "default", "text": "default", "parent": 630, "children": [], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 8}}, {"id": 632, "type": "assignment_expression", "text": "rv = 0", "parent": 630, "children": [633, 634, 635], "start_point": {"row": 120, "column": 10}, "end_point": {"row": 120, "column": 16}}, {"id": 633, "type": "identifier", "text": "rv", "parent": 632, "children": [], "start_point": {"row": 120, "column": 10}, "end_point": {"row": 120, "column": 12}}, {"id": 634, "type": "=", "text": "=", "parent": 632, "children": [], "start_point": {"row": 120, "column": 13}, "end_point": {"row": 120, "column": 14}}, {"id": 635, "type": "number_literal", "text": "0", "parent": 632, "children": [], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 16}}, {"id": 636, "type": "goto_statement", "text": "goto done;", "parent": 630, "children": [637, 638], "start_point": {"row": 120, "column": 18}, "end_point": {"row": 120, "column": 28}}, {"id": 637, "type": "goto", "text": "goto", "parent": 636, "children": [], "start_point": {"row": 120, "column": 18}, "end_point": {"row": 120, "column": 22}}, {"id": 638, "type": "statement_identifier", "text": "done", "parent": 636, "children": [], "start_point": {"row": 120, "column": 23}, "end_point": {"row": 120, "column": 27}}, {"id": 639, "type": "if_statement", "text": "if (!inname) {\n\t\tif (fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n\t\t\tispipe = true;\n\t\t}\n\t} else {\n\t\tint flags = O_RDONLY|O_BINARY;\n\n\t\tif (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n\t\t\tflags |= O_NONBLOCK;\n#endif\n\t\t\tispipe = true;\n\t\t}\n\t\terrno = 0;\n\t\tif ((fd = open (inname, flags)) < 0) {\n\t\t\teprintf (\"couldn't open file\\n\");\n\t\t\tif (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t\trv = 0;\n\t\t\tgoto done;\n\t\t}\n#ifdef O_NONBLOCK\n\t\tif ((flags = fcntl (fd, F_GETFL)) != -1) {\n\t\t\tflags &= ~O_NONBLOCK;\n\t\t\t(void)fcntl (fd, F_SETFL, flags);\n\t\t}\n#endif\n\t}", "parent": 46, "children": [640, 667], "start_point": {"row": 123, "column": 1}, "end_point": {"row": 151, "column": 2}}, {"id": 640, "type": "parenthesized_expression", "text": "(!inname)", "parent": 639, "children": [641], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 13}}, {"id": 641, "type": "unary_expression", "text": "!inname", "parent": 640, "children": [642, 643], "start_point": {"row": 123, "column": 5}, "end_point": {"row": 123, "column": 12}}, {"id": 642, "type": "!", "text": "!", "parent": 641, "children": [], "start_point": {"row": 123, "column": 5}, "end_point": {"row": 123, "column": 6}}, {"id": 643, "type": "identifier", "text": "inname", "parent": 641, "children": [], "start_point": {"row": 123, "column": 6}, "end_point": {"row": 123, "column": 12}}, {"id": 644, "type": "if_statement", "text": "if (fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n\t\t\tispipe = true;\n\t\t}", "parent": 639, "children": [645], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 126, "column": 3}}, {"id": 645, "type": "parenthesized_expression", "text": "(fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode))", "parent": 644, "children": [646], "start_point": {"row": 124, "column": 5}, "end_point": {"row": 124, "column": 52}}, {"id": 646, "type": "binary_expression", "text": "fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)", "parent": 645, "children": [647, 656, 657], "start_point": {"row": 124, "column": 6}, "end_point": {"row": 124, "column": 51}}, {"id": 647, "type": "binary_expression", "text": "fstat (fd, &sb) == 0", "parent": 646, "children": [648, 654, 655], "start_point": {"row": 124, "column": 6}, "end_point": {"row": 124, "column": 26}}, {"id": 648, "type": "call_expression", "text": "fstat (fd, &sb)", "parent": 647, "children": [649, 650], "start_point": {"row": 124, "column": 6}, "end_point": {"row": 124, "column": 21}}, {"id": 649, "type": "identifier", "text": "fstat", "parent": 648, "children": [], "start_point": {"row": 124, "column": 6}, "end_point": {"row": 124, "column": 11}}, {"id": 650, "type": "argument_list", "text": "(fd, &sb)", "parent": 648, "children": [651, 652], "start_point": {"row": 124, "column": 12}, "end_point": {"row": 124, "column": 21}}, {"id": 651, "type": "identifier", "text": "fd", "parent": 650, "children": [], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 15}}, {"id": 652, "type": "pointer_expression", "text": "&sb", "parent": 650, "children": [653], "start_point": {"row": 124, "column": 17}, "end_point": {"row": 124, "column": 20}}, {"id": 653, "type": "identifier", "text": "sb", "parent": 652, "children": [], "start_point": {"row": 124, "column": 18}, "end_point": {"row": 124, "column": 20}}, {"id": 654, "type": "==", "text": "==", "parent": 647, "children": [], "start_point": {"row": 124, "column": 22}, "end_point": {"row": 124, "column": 24}}, {"id": 655, "type": "number_literal", "text": "0", "parent": 647, "children": [], "start_point": {"row": 124, "column": 25}, "end_point": {"row": 124, "column": 26}}, {"id": 656, "type": "&&", "text": "&&", "parent": 646, "children": [], "start_point": {"row": 124, "column": 27}, "end_point": {"row": 124, "column": 29}}, {"id": 657, "type": "call_expression", "text": "S_ISFIFO (sb.st_mode)", "parent": 646, "children": [658, 659], "start_point": {"row": 124, "column": 30}, "end_point": {"row": 124, "column": 51}}, {"id": 658, "type": "identifier", "text": "S_ISFIFO", "parent": 657, "children": [], "start_point": {"row": 124, "column": 30}, "end_point": {"row": 124, "column": 38}}, {"id": 659, "type": "argument_list", "text": "(sb.st_mode)", "parent": 657, "children": [660], "start_point": {"row": 124, "column": 39}, "end_point": {"row": 124, "column": 51}}, {"id": 660, "type": "field_expression", "text": "sb.st_mode", "parent": 659, "children": [661, 662], "start_point": {"row": 124, "column": 40}, "end_point": {"row": 124, "column": 50}}, {"id": 661, "type": "identifier", "text": "sb", "parent": 660, "children": [], "start_point": {"row": 124, "column": 40}, "end_point": {"row": 124, "column": 42}}, {"id": 662, "type": "field_identifier", "text": "st_mode", "parent": 660, "children": [], "start_point": {"row": 124, "column": 43}, "end_point": {"row": 124, "column": 50}}, {"id": 663, "type": "assignment_expression", "text": "ispipe = true", "parent": 644, "children": [664, 665, 666], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 16}}, {"id": 664, "type": "identifier", "text": "ispipe", "parent": 663, "children": [], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 9}}, {"id": 665, "type": "=", "text": "=", "parent": 663, "children": [], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 11}}, {"id": 666, "type": "true", "text": "true", "parent": 663, "children": [], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 16}}, {"id": 667, "type": "else_clause", "text": "else {\n\t\tint flags = O_RDONLY|O_BINARY;\n\n\t\tif (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n\t\t\tflags |= O_NONBLOCK;\n#endif\n\t\t\tispipe = true;\n\t\t}\n\t\terrno = 0;\n\t\tif ((fd = open (inname, flags)) < 0) {\n\t\t\teprintf (\"couldn't open file\\n\");\n\t\t\tif (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t\trv = 0;\n\t\t\tgoto done;\n\t\t}\n#ifdef O_NONBLOCK\n\t\tif ((flags = fcntl (fd, F_GETFL)) != -1) {\n\t\t\tflags &= ~O_NONBLOCK;\n\t\t\t(void)fcntl (fd, F_SETFL, flags);\n\t\t}\n#endif\n\t}", "parent": 639, "children": [], "start_point": {"row": 127, "column": 3}, "end_point": {"row": 151, "column": 2}}, {"id": 668, "type": "declaration", "text": "int flags = O_RDONLY|O_BINARY;", "parent": 667, "children": [669, 670], "start_point": {"row": 128, "column": 2}, "end_point": {"row": 128, "column": 32}}, {"id": 669, "type": "primitive_type", "text": "int", "parent": 668, "children": [], "start_point": {"row": 128, "column": 2}, "end_point": {"row": 128, "column": 5}}, {"id": 670, "type": "init_declarator", "text": "flags = O_RDONLY|O_BINARY", "parent": 668, "children": [671, 672, 673], "start_point": {"row": 128, "column": 6}, "end_point": {"row": 128, "column": 31}}, {"id": 671, "type": "identifier", "text": "flags", "parent": 670, "children": [], "start_point": {"row": 128, "column": 6}, "end_point": {"row": 128, "column": 11}}, {"id": 672, "type": "=", "text": "=", "parent": 670, "children": [], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 13}}, {"id": 673, "type": "binary_expression", "text": "O_RDONLY|O_BINARY", "parent": 670, "children": [674, 675], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 31}}, {"id": 674, "type": "identifier", "text": "O_RDONLY", "parent": 673, "children": [], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 22}}, {"id": 675, "type": "identifier", "text": "O_BINARY", "parent": 673, "children": [], "start_point": {"row": 128, "column": 23}, "end_point": {"row": 128, "column": 31}}, {"id": 676, "type": "if_statement", "text": "if (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n\t\t\tflags |= O_NONBLOCK;\n#endif\n\t\t\tispipe = true;\n\t\t}", "parent": 667, "children": [677], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 135, "column": 3}}, {"id": 677, "type": "parenthesized_expression", "text": "(stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode))", "parent": 676, "children": [678], "start_point": {"row": 130, "column": 5}, "end_point": {"row": 130, "column": 55}}, {"id": 678, "type": "binary_expression", "text": "stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)", "parent": 677, "children": [679, 688, 689], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 54}}, {"id": 679, "type": "binary_expression", "text": "stat (inname, &sb) == 0", "parent": 678, "children": [680, 686, 687], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 29}}, {"id": 680, "type": "call_expression", "text": "stat (inname, &sb)", "parent": 679, "children": [681, 682], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 24}}, {"id": 681, "type": "identifier", "text": "stat", "parent": 680, "children": [], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 10}}, {"id": 682, "type": "argument_list", "text": "(inname, &sb)", "parent": 680, "children": [683, 684], "start_point": {"row": 130, "column": 11}, "end_point": {"row": 130, "column": 24}}, {"id": 683, "type": "identifier", "text": "inname", "parent": 682, "children": [], "start_point": {"row": 130, "column": 12}, "end_point": {"row": 130, "column": 18}}, {"id": 684, "type": "pointer_expression", "text": "&sb", "parent": 682, "children": [685], "start_point": {"row": 130, "column": 20}, "end_point": {"row": 130, "column": 23}}, {"id": 685, "type": "identifier", "text": "sb", "parent": 684, "children": [], "start_point": {"row": 130, "column": 21}, "end_point": {"row": 130, "column": 23}}, {"id": 686, "type": "==", "text": "==", "parent": 679, "children": [], "start_point": {"row": 130, "column": 25}, "end_point": {"row": 130, "column": 27}}, {"id": 687, "type": "number_literal", "text": "0", "parent": 679, "children": [], "start_point": {"row": 130, "column": 28}, "end_point": {"row": 130, "column": 29}}, {"id": 688, "type": "&&", "text": "&&", "parent": 678, "children": [], "start_point": {"row": 130, "column": 30}, "end_point": {"row": 130, "column": 32}}, {"id": 689, "type": "call_expression", "text": "S_ISFIFO (sb.st_mode)", "parent": 678, "children": [690, 691], "start_point": {"row": 130, "column": 33}, "end_point": {"row": 130, "column": 54}}, {"id": 690, "type": "identifier", "text": "S_ISFIFO", "parent": 689, "children": [], "start_point": {"row": 130, "column": 33}, "end_point": {"row": 130, "column": 41}}, {"id": 691, "type": "argument_list", "text": "(sb.st_mode)", "parent": 689, "children": [692], "start_point": {"row": 130, "column": 42}, "end_point": {"row": 130, "column": 54}}, {"id": 692, "type": "field_expression", "text": "sb.st_mode", "parent": 691, "children": [693, 694], "start_point": {"row": 130, "column": 43}, "end_point": {"row": 130, "column": 53}}, {"id": 693, "type": "identifier", "text": "sb", "parent": 692, "children": [], "start_point": {"row": 130, "column": 43}, "end_point": {"row": 130, "column": 45}}, {"id": 694, "type": "field_identifier", "text": "st_mode", "parent": 692, "children": [], "start_point": {"row": 130, "column": 46}, "end_point": {"row": 130, "column": 53}}, {"id": 695, "type": "preproc_if", "text": "#if O_NONBLOCK\n\t\t\tflags |= O_NONBLOCK;\n#endif", "parent": 676, "children": [696, 697, 698, 703], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 133, "column": 6}}, {"id": 696, "type": "#if", "text": "#if", "parent": 695, "children": [], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 131, "column": 3}}, {"id": 697, "type": "identifier", "text": "O_NONBLOCK", "parent": 695, "children": [], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 14}}, {"id": 698, "type": "\n", "text": "\n", "parent": 695, "children": [], "start_point": {"row": 131, "column": 14}, "end_point": {"row": 132, "column": 0}}, {"id": 699, "type": "assignment_expression", "text": "flags |= O_NONBLOCK", "parent": 695, "children": [700, 701, 702], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 22}}, {"id": 700, "type": "identifier", "text": "flags", "parent": 699, "children": [], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 8}}, {"id": 701, "type": "|=", "text": "|=", "parent": 699, "children": [], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 11}}, {"id": 702, "type": "identifier", "text": "O_NONBLOCK", "parent": 699, "children": [], "start_point": {"row": 132, "column": 12}, "end_point": {"row": 132, "column": 22}}, {"id": 703, "type": "#endif", "text": "#endif", "parent": 695, "children": [], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 6}}, {"id": 704, "type": "assignment_expression", "text": "ispipe = true", "parent": 676, "children": [705, 706, 707], "start_point": {"row": 134, "column": 3}, "end_point": {"row": 134, "column": 16}}, {"id": 705, "type": "identifier", "text": "ispipe", "parent": 704, "children": [], "start_point": {"row": 134, "column": 3}, "end_point": {"row": 134, "column": 9}}, {"id": 706, "type": "=", "text": "=", "parent": 704, "children": [], "start_point": {"row": 134, "column": 10}, "end_point": {"row": 134, "column": 11}}, {"id": 707, "type": "true", "text": "true", "parent": 704, "children": [], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 134, "column": 16}}, {"id": 708, "type": "assignment_expression", "text": "errno = 0", "parent": 667, "children": [709, 710, 711], "start_point": {"row": 136, "column": 2}, "end_point": {"row": 136, "column": 11}}, {"id": 709, "type": "identifier", "text": "errno", "parent": 708, "children": [], "start_point": {"row": 136, "column": 2}, "end_point": {"row": 136, "column": 7}}, {"id": 710, "type": "=", "text": "=", "parent": 708, "children": [], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 136, "column": 9}}, {"id": 711, "type": "number_literal", "text": "0", "parent": 708, "children": [], "start_point": {"row": 136, "column": 10}, "end_point": {"row": 136, "column": 11}}, {"id": 712, "type": "if_statement", "text": "if ((fd = open (inname, flags)) < 0) {\n\t\t\teprintf (\"couldn't open file\\n\");\n\t\t\tif (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t\trv = 0;\n\t\t\tgoto done;\n\t\t}", "parent": 667, "children": [713], "start_point": {"row": 137, "column": 2}, "end_point": {"row": 144, "column": 3}}, {"id": 713, "type": "parenthesized_expression", "text": "((fd = open (inname, flags)) < 0)", "parent": 712, "children": [714], "start_point": {"row": 137, "column": 5}, "end_point": {"row": 137, "column": 38}}, {"id": 714, "type": "binary_expression", "text": "(fd = open (inname, flags)) < 0", "parent": 713, "children": [715, 724, 725], "start_point": {"row": 137, "column": 6}, "end_point": {"row": 137, "column": 37}}, {"id": 715, "type": "parenthesized_expression", "text": "(fd = open (inname, flags))", "parent": 714, "children": [716], "start_point": {"row": 137, "column": 6}, "end_point": {"row": 137, "column": 33}}, {"id": 716, "type": "assignment_expression", "text": "fd = open (inname, flags)", "parent": 715, "children": [717, 718, 719], "start_point": {"row": 137, "column": 7}, "end_point": {"row": 137, "column": 32}}, {"id": 717, "type": "identifier", "text": "fd", "parent": 716, "children": [], "start_point": {"row": 137, "column": 7}, "end_point": {"row": 137, "column": 9}}, {"id": 718, "type": "=", "text": "=", "parent": 716, "children": [], "start_point": {"row": 137, "column": 10}, "end_point": {"row": 137, "column": 11}}, {"id": 719, "type": "call_expression", "text": "open (inname, flags)", "parent": 716, "children": [720, 721], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 32}}, {"id": 720, "type": "identifier", "text": "open", "parent": 719, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 16}}, {"id": 721, "type": "argument_list", "text": "(inname, flags)", "parent": 719, "children": [722, 723], "start_point": {"row": 137, "column": 17}, "end_point": {"row": 137, "column": 32}}, {"id": 722, "type": "identifier", "text": "inname", "parent": 721, "children": [], "start_point": {"row": 137, "column": 18}, "end_point": {"row": 137, "column": 24}}, {"id": 723, "type": "identifier", "text": "flags", "parent": 721, "children": [], "start_point": {"row": 137, "column": 26}, "end_point": {"row": 137, "column": 31}}, {"id": 724, "type": "<", "text": "<", "parent": 714, "children": [], "start_point": {"row": 137, "column": 34}, "end_point": {"row": 137, "column": 35}}, {"id": 725, "type": "number_literal", "text": "0", "parent": 714, "children": [], "start_point": {"row": 137, "column": 36}, "end_point": {"row": 137, "column": 37}}, {"id": 726, "type": "call_expression", "text": "eprintf (\"couldn't open file\\n\")", "parent": 712, "children": [727, 728], "start_point": {"row": 138, "column": 3}, "end_point": {"row": 138, "column": 35}}, {"id": 727, "type": "identifier", "text": "eprintf", "parent": 726, "children": [], "start_point": {"row": 138, "column": 3}, "end_point": {"row": 138, "column": 10}}, {"id": 728, "type": "argument_list", "text": "(\"couldn't open file\\n\")", "parent": 726, "children": [729], "start_point": {"row": 138, "column": 11}, "end_point": {"row": 138, "column": 35}}, {"id": 729, "type": "string_literal", "text": "\"couldn't open file\\n\"", "parent": 728, "children": [730], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 138, "column": 34}}, {"id": 730, "type": "escape_sequence", "text": "\\n", "parent": 729, "children": [], "start_point": {"row": 138, "column": 31}, "end_point": {"row": 138, "column": 33}}, {"id": 731, "type": "if_statement", "text": "if (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}", "parent": 712, "children": [732], "start_point": {"row": 139, "column": 3}, "end_point": {"row": 141, "column": 4}}, {"id": 732, "type": "parenthesized_expression", "text": "(info_from_stat (ms, sb.st_mode) == -1)", "parent": 731, "children": [733], "start_point": {"row": 139, "column": 6}, "end_point": {"row": 139, "column": 45}}, {"id": 733, "type": "binary_expression", "text": "info_from_stat (ms, sb.st_mode) == -1", "parent": 732, "children": [734, 741, 742], "start_point": {"row": 139, "column": 7}, "end_point": {"row": 139, "column": 44}}, {"id": 734, "type": "call_expression", "text": "info_from_stat (ms, sb.st_mode)", "parent": 733, "children": [735, 736], "start_point": {"row": 139, "column": 7}, "end_point": {"row": 139, "column": 38}}, {"id": 735, "type": "identifier", "text": "info_from_stat", "parent": 734, "children": [], "start_point": {"row": 139, "column": 7}, "end_point": {"row": 139, "column": 21}}, {"id": 736, "type": "argument_list", "text": "(ms, sb.st_mode)", "parent": 734, "children": [737, 738], "start_point": {"row": 139, "column": 22}, "end_point": {"row": 139, "column": 38}}, {"id": 737, "type": "identifier", "text": "ms", "parent": 736, "children": [], "start_point": {"row": 139, "column": 23}, "end_point": {"row": 139, "column": 25}}, {"id": 738, "type": "field_expression", "text": "sb.st_mode", "parent": 736, "children": [739, 740], "start_point": {"row": 139, "column": 27}, "end_point": {"row": 139, "column": 37}}, {"id": 739, "type": "identifier", "text": "sb", "parent": 738, "children": [], "start_point": {"row": 139, "column": 27}, "end_point": {"row": 139, "column": 29}}, {"id": 740, "type": "field_identifier", "text": "st_mode", "parent": 738, "children": [], "start_point": {"row": 139, "column": 30}, "end_point": {"row": 139, "column": 37}}, {"id": 741, "type": "==", "text": "==", "parent": 733, "children": [], "start_point": {"row": 139, "column": 39}, "end_point": {"row": 139, "column": 41}}, {"id": 742, "type": "number_literal", "text": "-1", "parent": 733, "children": [], "start_point": {"row": 139, "column": 42}, "end_point": {"row": 139, "column": 44}}, {"id": 743, "type": "goto_statement", "text": "goto done;", "parent": 731, "children": [744, 745], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 14}}, {"id": 744, "type": "goto", "text": "goto", "parent": 743, "children": [], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 8}}, {"id": 745, "type": "statement_identifier", "text": "done", "parent": 743, "children": [], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 13}}, {"id": 746, "type": "assignment_expression", "text": "rv = 0", "parent": 712, "children": [747, 748, 749], "start_point": {"row": 142, "column": 3}, "end_point": {"row": 142, "column": 9}}, {"id": 747, "type": "identifier", "text": "rv", "parent": 746, "children": [], "start_point": {"row": 142, "column": 3}, "end_point": {"row": 142, "column": 5}}, {"id": 748, "type": "=", "text": "=", "parent": 746, "children": [], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 7}}, {"id": 749, "type": "number_literal", "text": "0", "parent": 746, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 9}}, {"id": 750, "type": "goto_statement", "text": "goto done;", "parent": 712, "children": [751, 752], "start_point": {"row": 143, "column": 3}, "end_point": {"row": 143, "column": 13}}, {"id": 751, "type": "goto", "text": "goto", "parent": 750, "children": [], "start_point": {"row": 143, "column": 3}, "end_point": {"row": 143, "column": 7}}, {"id": 752, "type": "statement_identifier", "text": "done", "parent": 750, "children": [], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 12}}, {"id": 753, "type": "preproc_ifdef", "text": "#ifdef O_NONBLOCK\n\t\tif ((flags = fcntl (fd, F_GETFL)) != -1) {\n\t\t\tflags &= ~O_NONBLOCK;\n\t\t\t(void)fcntl (fd, F_SETFL, flags);\n\t\t}\n#endif", "parent": 667, "children": [754, 755, 756, 785], "start_point": {"row": 145, "column": 0}, "end_point": {"row": 150, "column": 6}}, {"id": 754, "type": "#ifdef", "text": "#ifdef", "parent": 753, "children": [], "start_point": {"row": 145, "column": 0}, "end_point": {"row": 145, "column": 6}}, {"id": 755, "type": "identifier", "text": "O_NONBLOCK", "parent": 753, "children": [], "start_point": {"row": 145, "column": 7}, "end_point": {"row": 145, "column": 17}}, {"id": 756, "type": "if_statement", "text": "if ((flags = fcntl (fd, F_GETFL)) != -1) {\n\t\t\tflags &= ~O_NONBLOCK;\n\t\t\t(void)fcntl (fd, F_SETFL, flags);\n\t\t}", "parent": 753, "children": [757], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 149, "column": 3}}, {"id": 757, "type": "parenthesized_expression", "text": "((flags = fcntl (fd, F_GETFL)) != -1)", "parent": 756, "children": [758], "start_point": {"row": 146, "column": 5}, "end_point": {"row": 146, "column": 42}}, {"id": 758, "type": "binary_expression", "text": "(flags = fcntl (fd, F_GETFL)) != -1", "parent": 757, "children": [759, 768, 769], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 41}}, {"id": 759, "type": "parenthesized_expression", "text": "(flags = fcntl (fd, F_GETFL))", "parent": 758, "children": [760], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 35}}, {"id": 760, "type": "assignment_expression", "text": "flags = fcntl (fd, F_GETFL)", "parent": 759, "children": [761, 762, 763], "start_point": {"row": 146, "column": 7}, "end_point": {"row": 146, "column": 34}}, {"id": 761, "type": "identifier", "text": "flags", "parent": 760, "children": [], "start_point": {"row": 146, "column": 7}, "end_point": {"row": 146, "column": 12}}, {"id": 762, "type": "=", "text": "=", "parent": 760, "children": [], "start_point": {"row": 146, "column": 13}, "end_point": {"row": 146, "column": 14}}, {"id": 763, "type": "call_expression", "text": "fcntl (fd, F_GETFL)", "parent": 760, "children": [764, 765], "start_point": {"row": 146, "column": 15}, "end_point": {"row": 146, "column": 34}}, {"id": 764, "type": "identifier", "text": "fcntl", "parent": 763, "children": [], "start_point": {"row": 146, "column": 15}, "end_point": {"row": 146, "column": 20}}, {"id": 765, "type": "argument_list", "text": "(fd, F_GETFL)", "parent": 763, "children": [766, 767], "start_point": {"row": 146, "column": 21}, "end_point": {"row": 146, "column": 34}}, {"id": 766, "type": "identifier", "text": "fd", "parent": 765, "children": [], "start_point": {"row": 146, "column": 22}, "end_point": {"row": 146, "column": 24}}, {"id": 767, "type": "identifier", "text": "F_GETFL", "parent": 765, "children": [], "start_point": {"row": 146, "column": 26}, "end_point": {"row": 146, "column": 33}}, {"id": 768, "type": "!=", "text": "!=", "parent": 758, "children": [], "start_point": {"row": 146, "column": 36}, "end_point": {"row": 146, "column": 38}}, {"id": 769, "type": "number_literal", "text": "-1", "parent": 758, "children": [], "start_point": {"row": 146, "column": 39}, "end_point": {"row": 146, "column": 41}}, {"id": 770, "type": "assignment_expression", "text": "flags &= ~O_NONBLOCK", "parent": 756, "children": [771, 772, 773], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 23}}, {"id": 771, "type": "identifier", "text": "flags", "parent": 770, "children": [], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 8}}, {"id": 772, "type": "&=", "text": "&=", "parent": 770, "children": [], "start_point": {"row": 147, "column": 9}, "end_point": {"row": 147, "column": 11}}, {"id": 773, "type": "unary_expression", "text": "~O_NONBLOCK", "parent": 770, "children": [774, 775], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 147, "column": 23}}, {"id": 774, "type": "~", "text": "~", "parent": 773, "children": [], "start_point": {"row": 147, "column": 12}, "end_point": {"row": 147, "column": 13}}, {"id": 775, "type": "identifier", "text": "O_NONBLOCK", "parent": 773, "children": [], "start_point": {"row": 147, "column": 13}, "end_point": {"row": 147, "column": 23}}, {"id": 776, "type": "cast_expression", "text": "(void)fcntl (fd, F_SETFL, flags)", "parent": 756, "children": [777, 779], "start_point": {"row": 148, "column": 3}, "end_point": {"row": 148, "column": 35}}, {"id": 777, "type": "type_descriptor", "text": "void", "parent": 776, "children": [778], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 8}}, {"id": 778, "type": "primitive_type", "text": "void", "parent": 777, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 8}}, {"id": 779, "type": "call_expression", "text": "fcntl (fd, F_SETFL, flags)", "parent": 776, "children": [780, 781], "start_point": {"row": 148, "column": 9}, "end_point": {"row": 148, "column": 35}}, {"id": 780, "type": "identifier", "text": "fcntl", "parent": 779, "children": [], "start_point": {"row": 148, "column": 9}, "end_point": {"row": 148, "column": 14}}, {"id": 781, "type": "argument_list", "text": "(fd, F_SETFL, flags)", "parent": 779, "children": [782, 783, 784], "start_point": {"row": 148, "column": 15}, "end_point": {"row": 148, "column": 35}}, {"id": 782, "type": "identifier", "text": "fd", "parent": 781, "children": [], "start_point": {"row": 148, "column": 16}, "end_point": {"row": 148, "column": 18}}, {"id": 783, "type": "identifier", "text": "F_SETFL", "parent": 781, "children": [], "start_point": {"row": 148, "column": 20}, "end_point": {"row": 148, "column": 27}}, {"id": 784, "type": "identifier", "text": "flags", "parent": 781, "children": [], "start_point": {"row": 148, "column": 29}, "end_point": {"row": 148, "column": 34}}, {"id": 785, "type": "#endif", "text": "#endif", "parent": 753, "children": [], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 150, "column": 6}}, {"id": 786, "type": "preproc_ifdef", "text": "#ifdef O_NONBLOCK\n\tif (ispipe) {\n\t\tssize_t r = 0;\n\n\t\t//while ((r = sread(fd, (void *)&buf[nbytes],\n\t\twhile ((r = read(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes))) > 0) {\n\t\t\tnbytes += r;\n\t\t\tif (r < PIPE_BUF) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (nbytes == 0) {\n\t\t\t/* We can not read it, but we were able to stat it. */\n\t\t\tif (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t\trv = 0;\n\t\t\tgoto done;\n\t\t}\n\t} else {\n#endif\n\t\tif ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n\t\t\tfile_error(ms, errno, \"cannot read `%s'\", inname);\n\t\t\tgoto done;\n\t\t}\n#ifdef O_NONBLOCK\n\t}\n#endif\n\n\t(void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n\tif (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n\t\tgoto done;\n\t}\n\trv = 0;\ndone:\n\tfree (buf);\n\tclose_and_restore (ms, inname, fd, &sb);\n\treturn rv == 0 ? file_getbuffer(ms) : NULL;\n}\n\n/* API */\n\n// TODO: reinitialize all the time\nR_API RMagic* r_magic_new(int flags) {\n\tRMagic *ms = R_NEW0 (RMagic);\n\tif (!ms) {\n\t\treturn NULL;\n\t}\n\tr_magic_setflags (ms, flags);\n\tms->o.buf = ms->o.pbuf = NULL;\n\tms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li));\n\tif (!ms->c.li) {\n\t\tfree (ms);\n\t\treturn NULL;\n\t}\n\tfile_reset (ms);\n\tms->mlist = NULL;\n\tms->file = \"unknown\";\n\tms->line = 0;\n\treturn ms;\n}\n\nR_API void r_magic_free(RMagic *ms) {\n\tif (ms) {\n\t\tfree_mlist (ms->mlist);\n\t\tfree (ms->o.pbuf);\n\t\tfree (ms->o.buf);\n\t\tfree (ms->c.li);\n\t\tfree (ms);\n\t}\n}\n\nR_API bool r_magic_load_buffer(RMagic* ms, const char *magicdata) {\n\tif (*magicdata == '#') {\n\t\tstruct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n\t\tif (ml) {\n\t\t\tfree_mlist (ms->mlist);\n\t\t\tms->mlist = ml;\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\teprintf (\"Magic buffers should start with #\\n\");\n\t}\n\treturn false;\n}\n\nR_API bool r_magic_load(RMagic* ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);\n\tif (ml) {\n\t\tfree_mlist (ms->mlist);\n\t\tms->mlist = ml;\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nR_API bool r_magic_compile(RMagic *ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);\n\tfree_mlist (ml);\n\treturn ml != NULL;\n}\n\nR_API bool r_magic_check(RMagic *ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);\n\tfree_mlist (ml);\n\treturn ml != NULL;\n}\n\nR_API const char* r_magic_descriptor(RMagic *ms, int fd) {\n\treturn file_or_fd (ms, NULL, fd);\n}\n\nR_API const char * r_magic_file(RMagic *ms, const char *inname) {\n\treturn file_or_fd (ms, inname, 0); // 0 = stdin\n}\n\nR_API const char * r_magic_buffer(RMagic *ms, const void *buf, size_t nb) {\n\tif (file_reset (ms) == -1) {\n\t\treturn NULL;\n\t}\n\tif (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n\t\treturn NULL;\n\t}\n\treturn file_getbuffer (ms);\n}\n\nR_API const char *r_magic_error(RMagic *ms) {\n\tif (ms && ms->haderr) {\n\t\treturn ms->o.buf;\n\t}\n\treturn NULL;\n}\n\nR_API int r_magic_errno(RMagic *ms) {\n\tif (ms && ms->haderr) {\n\t\treturn ms->error;\n\t}\n\treturn 0;\n}\n\nR_API void r_magic_setflags(RMagic *ms, int flags) {\n\tif (ms) {\n\t\tms->flags = flags;\n\t}\n}\n#endif", "parent": 46, "children": [787, 788, 789, 967, 1090, 1139, 1207, 1258, 1300, 1342, 1367, 1393, 1449, 1480, 1506, 1530], "start_point": {"row": 156, "column": 0}, "end_point": {"row": 303, "column": 6}}, {"id": 787, "type": "#ifdef", "text": "#ifdef", "parent": 786, "children": [], "start_point": {"row": 156, "column": 0}, "end_point": {"row": 156, "column": 6}}, {"id": 788, "type": "identifier", "text": "O_NONBLOCK", "parent": 786, "children": [], "start_point": {"row": 156, "column": 7}, "end_point": {"row": 156, "column": 17}}, {"id": 789, "type": "if_statement", "text": "if (ispipe) {\n\t\tssize_t r = 0;\n\n\t\t//while ((r = sread(fd, (void *)&buf[nbytes],\n\t\twhile ((r = read(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes))) > 0) {\n\t\t\tnbytes += r;\n\t\t\tif (r < PIPE_BUF) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (nbytes == 0) {\n\t\t\t/* We can not read it, but we were able to stat it. */\n\t\t\tif (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t\trv = 0;\n\t\t\tgoto done;\n\t\t}\n\t} else {\n#endif\n\t\tif ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n\t\t\tfile_error(ms, errno, \"cannot read `%s'\", inname);\n\t\t\tgoto done;\n\t\t}\n#ifdef O_NONBLOCK\n\t}\n#endif\n\n\t(void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n\tif (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n\t\tgoto done;\n\t}\n\trv = 0;\ndone:\n\tfree (buf);\n\tclose_and_restore (ms, inname, fd, &sb);\n\treturn rv == 0 ? file_getbuffer(ms) : NULL;\n}", "parent": 786, "children": [790, 868], "start_point": {"row": 157, "column": 1}, "end_point": {"row": 196, "column": 1}}, {"id": 790, "type": "parenthesized_expression", "text": "(ispipe)", "parent": 789, "children": [791], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 12}}, {"id": 791, "type": "identifier", "text": "ispipe", "parent": 790, "children": [], "start_point": {"row": 157, "column": 5}, "end_point": {"row": 157, "column": 11}}, {"id": 792, "type": "declaration", "text": "ssize_t r = 0;", "parent": 789, "children": [793, 794], "start_point": {"row": 158, "column": 2}, "end_point": {"row": 158, "column": 16}}, {"id": 793, "type": "primitive_type", "text": "ssize_t", "parent": 792, "children": [], "start_point": {"row": 158, "column": 2}, "end_point": {"row": 158, "column": 9}}, {"id": 794, "type": "init_declarator", "text": "r = 0", "parent": 792, "children": [795, 796, 797], "start_point": {"row": 158, "column": 10}, "end_point": {"row": 158, "column": 15}}, {"id": 795, "type": "identifier", "text": "r", "parent": 794, "children": [], "start_point": {"row": 158, "column": 10}, "end_point": {"row": 158, "column": 11}}, {"id": 796, "type": "=", "text": "=", "parent": 794, "children": [], "start_point": {"row": 158, "column": 12}, "end_point": {"row": 158, "column": 13}}, {"id": 797, "type": "number_literal", "text": "0", "parent": 794, "children": [], "start_point": {"row": 158, "column": 14}, "end_point": {"row": 158, "column": 15}}, {"id": 798, "type": "while_statement", "text": "while ((r = read(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes))) > 0) {\n\t\t\tnbytes += r;\n\t\t\tif (r < PIPE_BUF) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "parent": 789, "children": [799], "start_point": {"row": 161, "column": 2}, "end_point": {"row": 167, "column": 3}}, {"id": 799, "type": "parenthesized_expression", "text": "((r = read(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes))) > 0)", "parent": 798, "children": [800], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 162, "column": 39}}, {"id": 800, "type": "binary_expression", "text": "(r = read(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes))) > 0", "parent": 799, "children": [801, 826, 827], "start_point": {"row": 161, "column": 9}, "end_point": {"row": 162, "column": 38}}, {"id": 801, "type": "parenthesized_expression", "text": "(r = read(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes)))", "parent": 800, "children": [802], "start_point": {"row": 161, "column": 9}, "end_point": {"row": 162, "column": 34}}, {"id": 802, "type": "assignment_expression", "text": "r = read(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes))", "parent": 801, "children": [803, 804, 805], "start_point": {"row": 161, "column": 10}, "end_point": {"row": 162, "column": 33}}, {"id": 803, "type": "identifier", "text": "r", "parent": 802, "children": [], "start_point": {"row": 161, "column": 10}, "end_point": {"row": 161, "column": 11}}, {"id": 804, "type": "=", "text": "=", "parent": 802, "children": [], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 13}}, {"id": 805, "type": "call_expression", "text": "read(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes))", "parent": 802, "children": [806, 807], "start_point": {"row": 161, "column": 14}, "end_point": {"row": 162, "column": 33}}, {"id": 806, "type": "identifier", "text": "read", "parent": 805, "children": [], "start_point": {"row": 161, "column": 14}, "end_point": {"row": 161, "column": 18}}, {"id": 807, "type": "argument_list", "text": "(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes))", "parent": 805, "children": [808, 809, 818], "start_point": {"row": 161, "column": 18}, "end_point": {"row": 162, "column": 33}}, {"id": 808, "type": "identifier", "text": "fd", "parent": 807, "children": [], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 21}}, {"id": 809, "type": "cast_expression", "text": "(void *)&buf[nbytes]", "parent": 807, "children": [810, 814], "start_point": {"row": 161, "column": 23}, "end_point": {"row": 161, "column": 43}}, {"id": 810, "type": "type_descriptor", "text": "void *", "parent": 809, "children": [811, 812], "start_point": {"row": 161, "column": 24}, "end_point": {"row": 161, "column": 30}}, {"id": 811, "type": "primitive_type", "text": "void", "parent": 810, "children": [], "start_point": {"row": 161, "column": 24}, "end_point": {"row": 161, "column": 28}}, {"id": 812, "type": "abstract_pointer_declarator", "text": "*", "parent": 810, "children": [813], "start_point": {"row": 161, "column": 29}, "end_point": {"row": 161, "column": 30}}, {"id": 813, "type": "*", "text": "*", "parent": 812, "children": [], "start_point": {"row": 161, "column": 29}, "end_point": {"row": 161, "column": 30}}, {"id": 814, "type": "pointer_expression", "text": "&buf[nbytes]", "parent": 809, "children": [815], "start_point": {"row": 161, "column": 31}, "end_point": {"row": 161, "column": 43}}, {"id": 815, "type": "subscript_expression", "text": "buf[nbytes]", "parent": 814, "children": [816, 817], "start_point": {"row": 161, "column": 32}, "end_point": {"row": 161, "column": 43}}, {"id": 816, "type": "identifier", "text": "buf", "parent": 815, "children": [], "start_point": {"row": 161, "column": 32}, "end_point": {"row": 161, "column": 35}}, {"id": 817, "type": "identifier", "text": "nbytes", "parent": 815, "children": [], "start_point": {"row": 161, "column": 36}, "end_point": {"row": 161, "column": 42}}, {"id": 818, "type": "cast_expression", "text": "(size_t)(HOWMANY - nbytes)", "parent": 807, "children": [819, 821], "start_point": {"row": 162, "column": 6}, "end_point": {"row": 162, "column": 32}}, {"id": 819, "type": "type_descriptor", "text": "size_t", "parent": 818, "children": [820], "start_point": {"row": 162, "column": 7}, "end_point": {"row": 162, "column": 13}}, {"id": 820, "type": "primitive_type", "text": "size_t", "parent": 819, "children": [], "start_point": {"row": 162, "column": 7}, "end_point": {"row": 162, "column": 13}}, {"id": 821, "type": "parenthesized_expression", "text": "(HOWMANY - nbytes)", "parent": 818, "children": [822], "start_point": {"row": 162, "column": 14}, "end_point": {"row": 162, "column": 32}}, {"id": 822, "type": "binary_expression", "text": "HOWMANY - nbytes", "parent": 821, "children": [823, 824, 825], "start_point": {"row": 162, "column": 15}, "end_point": {"row": 162, "column": 31}}, {"id": 823, "type": "identifier", "text": "HOWMANY", "parent": 822, "children": [], "start_point": {"row": 162, "column": 15}, "end_point": {"row": 162, "column": 22}}, {"id": 824, "type": "-", "text": "-", "parent": 822, "children": [], "start_point": {"row": 162, "column": 23}, "end_point": {"row": 162, "column": 24}}, {"id": 825, "type": "identifier", "text": "nbytes", "parent": 822, "children": [], "start_point": {"row": 162, "column": 25}, "end_point": {"row": 162, "column": 31}}, {"id": 826, "type": ">", "text": ">", "parent": 800, "children": [], "start_point": {"row": 162, "column": 35}, "end_point": {"row": 162, "column": 36}}, {"id": 827, "type": "number_literal", "text": "0", "parent": 800, "children": [], "start_point": {"row": 162, "column": 37}, "end_point": {"row": 162, "column": 38}}, {"id": 828, "type": "assignment_expression", "text": "nbytes += r", "parent": 798, "children": [829, 830, 831], "start_point": {"row": 163, "column": 3}, "end_point": {"row": 163, "column": 14}}, {"id": 829, "type": "identifier", "text": "nbytes", "parent": 828, "children": [], "start_point": {"row": 163, "column": 3}, "end_point": {"row": 163, "column": 9}}, {"id": 830, "type": "+=", "text": "+=", "parent": 828, "children": [], "start_point": {"row": 163, "column": 10}, "end_point": {"row": 163, "column": 12}}, {"id": 831, "type": "identifier", "text": "r", "parent": 828, "children": [], "start_point": {"row": 163, "column": 13}, "end_point": {"row": 163, "column": 14}}, {"id": 832, "type": "if_statement", "text": "if (r < PIPE_BUF) {\n\t\t\t\tbreak;\n\t\t\t}", "parent": 798, "children": [833], "start_point": {"row": 164, "column": 3}, "end_point": {"row": 166, "column": 4}}, {"id": 833, "type": "parenthesized_expression", "text": "(r < PIPE_BUF)", "parent": 832, "children": [834], "start_point": {"row": 164, "column": 6}, "end_point": {"row": 164, "column": 20}}, {"id": 834, "type": "binary_expression", "text": "r < PIPE_BUF", "parent": 833, "children": [835, 836, 837], "start_point": {"row": 164, "column": 7}, "end_point": {"row": 164, "column": 19}}, {"id": 835, "type": "identifier", "text": "r", "parent": 834, "children": [], "start_point": {"row": 164, "column": 7}, "end_point": {"row": 164, "column": 8}}, {"id": 836, "type": "<", "text": "<", "parent": 834, "children": [], "start_point": {"row": 164, "column": 9}, "end_point": {"row": 164, "column": 10}}, {"id": 837, "type": "identifier", "text": "PIPE_BUF", "parent": 834, "children": [], "start_point": {"row": 164, "column": 11}, "end_point": {"row": 164, "column": 19}}, {"id": 838, "type": "break_statement", "text": "break;", "parent": 832, "children": [839], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 10}}, {"id": 839, "type": "break", "text": "break", "parent": 838, "children": [], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 9}}, {"id": 840, "type": "if_statement", "text": "if (nbytes == 0) {\n\t\t\t/* We can not read it, but we were able to stat it. */\n\t\t\tif (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t\trv = 0;\n\t\t\tgoto done;\n\t\t}", "parent": 789, "children": [841], "start_point": {"row": 169, "column": 2}, "end_point": {"row": 176, "column": 3}}, {"id": 841, "type": "parenthesized_expression", "text": "(nbytes == 0)", "parent": 840, "children": [842], "start_point": {"row": 169, "column": 5}, "end_point": {"row": 169, "column": 18}}, {"id": 842, "type": "binary_expression", "text": "nbytes == 0", "parent": 841, "children": [843, 844, 845], "start_point": {"row": 169, "column": 6}, "end_point": {"row": 169, "column": 17}}, {"id": 843, "type": "identifier", "text": "nbytes", "parent": 842, "children": [], "start_point": {"row": 169, "column": 6}, "end_point": {"row": 169, "column": 12}}, {"id": 844, "type": "==", "text": "==", "parent": 842, "children": [], "start_point": {"row": 169, "column": 13}, "end_point": {"row": 169, "column": 15}}, {"id": 845, "type": "number_literal", "text": "0", "parent": 842, "children": [], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 169, "column": 17}}, {"id": 846, "type": "if_statement", "text": "if (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}", "parent": 840, "children": [847], "start_point": {"row": 171, "column": 3}, "end_point": {"row": 173, "column": 4}}, {"id": 847, "type": "parenthesized_expression", "text": "(info_from_stat (ms, sb.st_mode) == -1)", "parent": 846, "children": [848], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 45}}, {"id": 848, "type": "binary_expression", "text": "info_from_stat (ms, sb.st_mode) == -1", "parent": 847, "children": [849, 856, 857], "start_point": {"row": 171, "column": 7}, "end_point": {"row": 171, "column": 44}}, {"id": 849, "type": "call_expression", "text": "info_from_stat (ms, sb.st_mode)", "parent": 848, "children": [850, 851], "start_point": {"row": 171, "column": 7}, "end_point": {"row": 171, "column": 38}}, {"id": 850, "type": "identifier", "text": "info_from_stat", "parent": 849, "children": [], "start_point": {"row": 171, "column": 7}, "end_point": {"row": 171, "column": 21}}, {"id": 851, "type": "argument_list", "text": "(ms, sb.st_mode)", "parent": 849, "children": [852, 853], "start_point": {"row": 171, "column": 22}, "end_point": {"row": 171, "column": 38}}, {"id": 852, "type": "identifier", "text": "ms", "parent": 851, "children": [], "start_point": {"row": 171, "column": 23}, "end_point": {"row": 171, "column": 25}}, {"id": 853, "type": "field_expression", "text": "sb.st_mode", "parent": 851, "children": [854, 855], "start_point": {"row": 171, "column": 27}, "end_point": {"row": 171, "column": 37}}, {"id": 854, "type": "identifier", "text": "sb", "parent": 853, "children": [], "start_point": {"row": 171, "column": 27}, "end_point": {"row": 171, "column": 29}}, {"id": 855, "type": "field_identifier", "text": "st_mode", "parent": 853, "children": [], "start_point": {"row": 171, "column": 30}, "end_point": {"row": 171, "column": 37}}, {"id": 856, "type": "==", "text": "==", "parent": 848, "children": [], "start_point": {"row": 171, "column": 39}, "end_point": {"row": 171, "column": 41}}, {"id": 857, "type": "number_literal", "text": "-1", "parent": 848, "children": [], "start_point": {"row": 171, "column": 42}, "end_point": {"row": 171, "column": 44}}, {"id": 858, "type": "goto_statement", "text": "goto done;", "parent": 846, "children": [859, 860], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 14}}, {"id": 859, "type": "goto", "text": "goto", "parent": 858, "children": [], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 172, "column": 8}}, {"id": 860, "type": "statement_identifier", "text": "done", "parent": 858, "children": [], "start_point": {"row": 172, "column": 9}, "end_point": {"row": 172, "column": 13}}, {"id": 861, "type": "assignment_expression", "text": "rv = 0", "parent": 840, "children": [862, 863, 864], "start_point": {"row": 174, "column": 3}, "end_point": {"row": 174, "column": 9}}, {"id": 862, "type": "identifier", "text": "rv", "parent": 861, "children": [], "start_point": {"row": 174, "column": 3}, "end_point": {"row": 174, "column": 5}}, {"id": 863, "type": "=", "text": "=", "parent": 861, "children": [], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 7}}, {"id": 864, "type": "number_literal", "text": "0", "parent": 861, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 9}}, {"id": 865, "type": "goto_statement", "text": "goto done;", "parent": 840, "children": [866, 867], "start_point": {"row": 175, "column": 3}, "end_point": {"row": 175, "column": 13}}, {"id": 866, "type": "goto", "text": "goto", "parent": 865, "children": [], "start_point": {"row": 175, "column": 3}, "end_point": {"row": 175, "column": 7}}, {"id": 867, "type": "statement_identifier", "text": "done", "parent": 865, "children": [], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 12}}, {"id": 868, "type": "else_clause", "text": "else {\n#endif\n\t\tif ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n\t\t\tfile_error(ms, errno, \"cannot read `%s'\", inname);\n\t\t\tgoto done;\n\t\t}\n#ifdef O_NONBLOCK\n\t}\n#endif\n\n\t(void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n\tif (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n\t\tgoto done;\n\t}\n\trv = 0;\ndone:\n\tfree (buf);\n\tclose_and_restore (ms, inname, fd, &sb);\n\treturn rv == 0 ? file_getbuffer(ms) : NULL;\n}", "parent": 789, "children": [], "start_point": {"row": 177, "column": 3}, "end_point": {"row": 196, "column": 1}}, {"id": 869, "type": "preproc_call", "text": "#endif\n", "parent": 868, "children": [870], "start_point": {"row": 178, "column": 0}, "end_point": {"row": 179, "column": 0}}, {"id": 870, "type": "preproc_directive", "text": "#endif", "parent": 869, "children": [], "start_point": {"row": 178, "column": 0}, "end_point": {"row": 178, "column": 6}}, {"id": 871, "type": "if_statement", "text": "if ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n\t\t\tfile_error(ms, errno, \"cannot read `%s'\", inname);\n\t\t\tgoto done;\n\t\t}", "parent": 868, "children": [872], "start_point": {"row": 179, "column": 2}, "end_point": {"row": 182, "column": 3}}, {"id": 872, "type": "parenthesized_expression", "text": "((nbytes = read(fd, (char *)buf, HOWMANY)) == -1)", "parent": 871, "children": [873], "start_point": {"row": 179, "column": 5}, "end_point": {"row": 179, "column": 54}}, {"id": 873, "type": "binary_expression", "text": "(nbytes = read(fd, (char *)buf, HOWMANY)) == -1", "parent": 872, "children": [874, 889, 890], "start_point": {"row": 179, "column": 6}, "end_point": {"row": 179, "column": 53}}, {"id": 874, "type": "parenthesized_expression", "text": "(nbytes = read(fd, (char *)buf, HOWMANY))", "parent": 873, "children": [875], "start_point": {"row": 179, "column": 6}, "end_point": {"row": 179, "column": 47}}, {"id": 875, "type": "assignment_expression", "text": "nbytes = read(fd, (char *)buf, HOWMANY)", "parent": 874, "children": [876, 877, 878], "start_point": {"row": 179, "column": 7}, "end_point": {"row": 179, "column": 46}}, {"id": 876, "type": "identifier", "text": "nbytes", "parent": 875, "children": [], "start_point": {"row": 179, "column": 7}, "end_point": {"row": 179, "column": 13}}, {"id": 877, "type": "=", "text": "=", "parent": 875, "children": [], "start_point": {"row": 179, "column": 14}, "end_point": {"row": 179, "column": 15}}, {"id": 878, "type": "call_expression", "text": "read(fd, (char *)buf, HOWMANY)", "parent": 875, "children": [879, 880], "start_point": {"row": 179, "column": 16}, "end_point": {"row": 179, "column": 46}}, {"id": 879, "type": "identifier", "text": "read", "parent": 878, "children": [], "start_point": {"row": 179, "column": 16}, "end_point": {"row": 179, "column": 20}}, {"id": 880, "type": "argument_list", "text": "(fd, (char *)buf, HOWMANY)", "parent": 878, "children": [881, 882, 888], "start_point": {"row": 179, "column": 20}, "end_point": {"row": 179, "column": 46}}, {"id": 881, "type": "identifier", "text": "fd", "parent": 880, "children": [], "start_point": {"row": 179, "column": 21}, "end_point": {"row": 179, "column": 23}}, {"id": 882, "type": "cast_expression", "text": "(char *)buf", "parent": 880, "children": [883, 887], "start_point": {"row": 179, "column": 25}, "end_point": {"row": 179, "column": 36}}, {"id": 883, "type": "type_descriptor", "text": "char *", "parent": 882, "children": [884, 885], "start_point": {"row": 179, "column": 26}, "end_point": {"row": 179, "column": 32}}, {"id": 884, "type": "primitive_type", "text": "char", "parent": 883, "children": [], "start_point": {"row": 179, "column": 26}, "end_point": {"row": 179, "column": 30}}, {"id": 885, "type": "abstract_pointer_declarator", "text": "*", "parent": 883, "children": [886], "start_point": {"row": 179, "column": 31}, "end_point": {"row": 179, "column": 32}}, {"id": 886, "type": "*", "text": "*", "parent": 885, "children": [], "start_point": {"row": 179, "column": 31}, "end_point": {"row": 179, "column": 32}}, {"id": 887, "type": "identifier", "text": "buf", "parent": 882, "children": [], "start_point": {"row": 179, "column": 33}, "end_point": {"row": 179, "column": 36}}, {"id": 888, "type": "identifier", "text": "HOWMANY", "parent": 880, "children": [], "start_point": {"row": 179, "column": 38}, "end_point": {"row": 179, "column": 45}}, {"id": 889, "type": "==", "text": "==", "parent": 873, "children": [], "start_point": {"row": 179, "column": 48}, "end_point": {"row": 179, "column": 50}}, {"id": 890, "type": "number_literal", "text": "-1", "parent": 873, "children": [], "start_point": {"row": 179, "column": 51}, "end_point": {"row": 179, "column": 53}}, {"id": 891, "type": "call_expression", "text": "file_error(ms, errno, \"cannot read `%s'\", inname)", "parent": 871, "children": [892, 893], "start_point": {"row": 180, "column": 3}, "end_point": {"row": 180, "column": 52}}, {"id": 892, "type": "identifier", "text": "file_error", "parent": 891, "children": [], "start_point": {"row": 180, "column": 3}, "end_point": {"row": 180, "column": 13}}, {"id": 893, "type": "argument_list", "text": "(ms, errno, \"cannot read `%s'\", inname)", "parent": 891, "children": [894, 895, 896, 897], "start_point": {"row": 180, "column": 13}, "end_point": {"row": 180, "column": 52}}, {"id": 894, "type": "identifier", "text": "ms", "parent": 893, "children": [], "start_point": {"row": 180, "column": 14}, "end_point": {"row": 180, "column": 16}}, {"id": 895, "type": "identifier", "text": "errno", "parent": 893, "children": [], "start_point": {"row": 180, "column": 18}, "end_point": {"row": 180, "column": 23}}, {"id": 896, "type": "string_literal", "text": "\"cannot read `%s'\"", "parent": 893, "children": [], "start_point": {"row": 180, "column": 25}, "end_point": {"row": 180, "column": 43}}, {"id": 897, "type": "identifier", "text": "inname", "parent": 893, "children": [], "start_point": {"row": 180, "column": 45}, "end_point": {"row": 180, "column": 51}}, {"id": 898, "type": "goto_statement", "text": "goto done;", "parent": 871, "children": [899, 900], "start_point": {"row": 181, "column": 3}, "end_point": {"row": 181, "column": 13}}, {"id": 899, "type": "goto", "text": "goto", "parent": 898, "children": [], "start_point": {"row": 181, "column": 3}, "end_point": {"row": 181, "column": 7}}, {"id": 900, "type": "statement_identifier", "text": "done", "parent": 898, "children": [], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 181, "column": 12}}, {"id": 901, "type": "preproc_ifdef", "text": "#ifdef O_NONBLOCK\n\t}\n#endif", "parent": 868, "children": [902, 903, 904], "start_point": {"row": 183, "column": 0}, "end_point": {"row": 185, "column": 6}}, {"id": 902, "type": "#ifdef", "text": "#ifdef", "parent": 901, "children": [], "start_point": {"row": 183, "column": 0}, "end_point": {"row": 183, "column": 6}}, {"id": 903, "type": "identifier", "text": "O_NONBLOCK", "parent": 901, "children": [], "start_point": {"row": 183, "column": 7}, "end_point": {"row": 183, "column": 17}}, {"id": 904, "type": "#endif", "text": "#endif", "parent": 901, "children": [], "start_point": {"row": 185, "column": 0}, "end_point": {"row": 185, "column": 6}}, {"id": 905, "type": "cast_expression", "text": "(void)memset (buf + nbytes, 0, SLOP)", "parent": 868, "children": [906, 908], "start_point": {"row": 187, "column": 1}, "end_point": {"row": 187, "column": 37}}, {"id": 906, "type": "type_descriptor", "text": "void", "parent": 905, "children": [907], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 6}}, {"id": 907, "type": "primitive_type", "text": "void", "parent": 906, "children": [], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 6}}, {"id": 908, "type": "call_expression", "text": "memset (buf + nbytes, 0, SLOP)", "parent": 905, "children": [909, 910], "start_point": {"row": 187, "column": 7}, "end_point": {"row": 187, "column": 37}}, {"id": 909, "type": "identifier", "text": "memset", "parent": 908, "children": [], "start_point": {"row": 187, "column": 7}, "end_point": {"row": 187, "column": 13}}, {"id": 910, "type": "argument_list", "text": "(buf + nbytes, 0, SLOP)", "parent": 908, "children": [911, 915, 916], "start_point": {"row": 187, "column": 14}, "end_point": {"row": 187, "column": 37}}, {"id": 911, "type": "binary_expression", "text": "buf + nbytes", "parent": 910, "children": [912, 913, 914], "start_point": {"row": 187, "column": 15}, "end_point": {"row": 187, "column": 27}}, {"id": 912, "type": "identifier", "text": "buf", "parent": 911, "children": [], "start_point": {"row": 187, "column": 15}, "end_point": {"row": 187, "column": 18}}, {"id": 913, "type": "+", "text": "+", "parent": 911, "children": [], "start_point": {"row": 187, "column": 19}, "end_point": {"row": 187, "column": 20}}, {"id": 914, "type": "identifier", "text": "nbytes", "parent": 911, "children": [], "start_point": {"row": 187, "column": 21}, "end_point": {"row": 187, "column": 27}}, {"id": 915, "type": "number_literal", "text": "0", "parent": 910, "children": [], "start_point": {"row": 187, "column": 29}, "end_point": {"row": 187, "column": 30}}, {"id": 916, "type": "identifier", "text": "SLOP", "parent": 910, "children": [], "start_point": {"row": 187, "column": 32}, "end_point": {"row": 187, "column": 36}}, {"id": 917, "type": "if_statement", "text": "if (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n\t\tgoto done;\n\t}", "parent": 868, "children": [918], "start_point": {"row": 188, "column": 1}, "end_point": {"row": 190, "column": 2}}, {"id": 918, "type": "parenthesized_expression", "text": "(file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1)", "parent": 917, "children": [919], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 61}}, {"id": 919, "type": "binary_expression", "text": "file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1", "parent": 918, "children": [920, 931, 932], "start_point": {"row": 188, "column": 5}, "end_point": {"row": 188, "column": 60}}, {"id": 920, "type": "call_expression", "text": "file_buffer (ms, fd, inname, buf, (size_t)nbytes)", "parent": 919, "children": [921, 922], "start_point": {"row": 188, "column": 5}, "end_point": {"row": 188, "column": 54}}, {"id": 921, "type": "identifier", "text": "file_buffer", "parent": 920, "children": [], "start_point": {"row": 188, "column": 5}, "end_point": {"row": 188, "column": 16}}, {"id": 922, "type": "argument_list", "text": "(ms, fd, inname, buf, (size_t)nbytes)", "parent": 920, "children": [923, 924, 925, 926, 927], "start_point": {"row": 188, "column": 17}, "end_point": {"row": 188, "column": 54}}, {"id": 923, "type": "identifier", "text": "ms", "parent": 922, "children": [], "start_point": {"row": 188, "column": 18}, "end_point": {"row": 188, "column": 20}}, {"id": 924, "type": "identifier", "text": "fd", "parent": 922, "children": [], "start_point": {"row": 188, "column": 22}, "end_point": {"row": 188, "column": 24}}, {"id": 925, "type": "identifier", "text": "inname", "parent": 922, "children": [], "start_point": {"row": 188, "column": 26}, "end_point": {"row": 188, "column": 32}}, {"id": 926, "type": "identifier", "text": "buf", "parent": 922, "children": [], "start_point": {"row": 188, "column": 34}, "end_point": {"row": 188, "column": 37}}, {"id": 927, "type": "cast_expression", "text": "(size_t)nbytes", "parent": 922, "children": [928, 930], "start_point": {"row": 188, "column": 39}, "end_point": {"row": 188, "column": 53}}, {"id": 928, "type": "type_descriptor", "text": "size_t", "parent": 927, "children": [929], "start_point": {"row": 188, "column": 40}, "end_point": {"row": 188, "column": 46}}, {"id": 929, "type": "primitive_type", "text": "size_t", "parent": 928, "children": [], "start_point": {"row": 188, "column": 40}, "end_point": {"row": 188, "column": 46}}, {"id": 930, "type": "identifier", "text": "nbytes", "parent": 927, "children": [], "start_point": {"row": 188, "column": 47}, "end_point": {"row": 188, "column": 53}}, {"id": 931, "type": "==", "text": "==", "parent": 919, "children": [], "start_point": {"row": 188, "column": 55}, "end_point": {"row": 188, "column": 57}}, {"id": 932, "type": "number_literal", "text": "-1", "parent": 919, "children": [], "start_point": {"row": 188, "column": 58}, "end_point": {"row": 188, "column": 60}}, {"id": 933, "type": "goto_statement", "text": "goto done;", "parent": 917, "children": [934, 935], "start_point": {"row": 189, "column": 2}, "end_point": {"row": 189, "column": 12}}, {"id": 934, "type": "goto", "text": "goto", "parent": 933, "children": [], "start_point": {"row": 189, "column": 2}, "end_point": {"row": 189, "column": 6}}, {"id": 935, "type": "statement_identifier", "text": "done", "parent": 933, "children": [], "start_point": {"row": 189, "column": 7}, "end_point": {"row": 189, "column": 11}}, {"id": 936, "type": "assignment_expression", "text": "rv = 0", "parent": 868, "children": [937, 938, 939], "start_point": {"row": 191, "column": 1}, "end_point": {"row": 191, "column": 7}}, {"id": 937, "type": "identifier", "text": "rv", "parent": 936, "children": [], "start_point": {"row": 191, "column": 1}, "end_point": {"row": 191, "column": 3}}, {"id": 938, "type": "=", "text": "=", "parent": 936, "children": [], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 5}}, {"id": 939, "type": "number_literal", "text": "0", "parent": 936, "children": [], "start_point": {"row": 191, "column": 6}, "end_point": {"row": 191, "column": 7}}, {"id": 940, "type": "labeled_statement", "text": "done:\n\tfree (buf);", "parent": 868, "children": [941], "start_point": {"row": 192, "column": 0}, "end_point": {"row": 193, "column": 12}}, {"id": 941, "type": "statement_identifier", "text": "done", "parent": 940, "children": [], "start_point": {"row": 192, "column": 0}, "end_point": {"row": 192, "column": 4}}, {"id": 942, "type": "call_expression", "text": "free (buf)", "parent": 940, "children": [943, 944], "start_point": {"row": 193, "column": 1}, "end_point": {"row": 193, "column": 11}}, {"id": 943, "type": "identifier", "text": "free", "parent": 942, "children": [], "start_point": {"row": 193, "column": 1}, "end_point": {"row": 193, "column": 5}}, {"id": 944, "type": "argument_list", "text": "(buf)", "parent": 942, "children": [945], "start_point": {"row": 193, "column": 6}, "end_point": {"row": 193, "column": 11}}, {"id": 945, "type": "identifier", "text": "buf", "parent": 944, "children": [], "start_point": {"row": 193, "column": 7}, "end_point": {"row": 193, "column": 10}}, {"id": 946, "type": "call_expression", "text": "close_and_restore (ms, inname, fd, &sb)", "parent": 868, "children": [947, 948], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 194, "column": 40}}, {"id": 947, "type": "identifier", "text": "close_and_restore", "parent": 946, "children": [], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 194, "column": 18}}, {"id": 948, "type": "argument_list", "text": "(ms, inname, fd, &sb)", "parent": 946, "children": [949, 950, 951, 952], "start_point": {"row": 194, "column": 19}, "end_point": {"row": 194, "column": 40}}, {"id": 949, "type": "identifier", "text": "ms", "parent": 948, "children": [], "start_point": {"row": 194, "column": 20}, "end_point": {"row": 194, "column": 22}}, {"id": 950, "type": "identifier", "text": "inname", "parent": 948, "children": [], "start_point": {"row": 194, "column": 24}, "end_point": {"row": 194, "column": 30}}, {"id": 951, "type": "identifier", "text": "fd", "parent": 948, "children": [], "start_point": {"row": 194, "column": 32}, "end_point": {"row": 194, "column": 34}}, {"id": 952, "type": "pointer_expression", "text": "&sb", "parent": 948, "children": [953], "start_point": {"row": 194, "column": 36}, "end_point": {"row": 194, "column": 39}}, {"id": 953, "type": "identifier", "text": "sb", "parent": 952, "children": [], "start_point": {"row": 194, "column": 37}, "end_point": {"row": 194, "column": 39}}, {"id": 954, "type": "return_statement", "text": "return rv == 0 ? file_getbuffer(ms) : NULL;", "parent": 868, "children": [955], "start_point": {"row": 195, "column": 1}, "end_point": {"row": 195, "column": 44}}, {"id": 955, "type": "conditional_expression", "text": "rv == 0 ? file_getbuffer(ms) : NULL", "parent": 954, "children": [956, 960, 961, 965], "start_point": {"row": 195, "column": 8}, "end_point": {"row": 195, "column": 43}}, {"id": 956, "type": "binary_expression", "text": "rv == 0", "parent": 955, "children": [957, 958, 959], "start_point": {"row": 195, "column": 8}, "end_point": {"row": 195, "column": 15}}, {"id": 957, "type": "identifier", "text": "rv", "parent": 956, "children": [], "start_point": {"row": 195, "column": 8}, "end_point": {"row": 195, "column": 10}}, {"id": 958, "type": "==", "text": "==", "parent": 956, "children": [], "start_point": {"row": 195, "column": 11}, "end_point": {"row": 195, "column": 13}}, {"id": 959, "type": "number_literal", "text": "0", "parent": 956, "children": [], "start_point": {"row": 195, "column": 14}, "end_point": {"row": 195, "column": 15}}, {"id": 960, "type": "?", "text": "?", "parent": 955, "children": [], "start_point": {"row": 195, "column": 16}, "end_point": {"row": 195, "column": 17}}, {"id": 961, "type": "call_expression", "text": "file_getbuffer(ms)", "parent": 955, "children": [962, 963], "start_point": {"row": 195, "column": 18}, "end_point": {"row": 195, "column": 36}}, {"id": 962, "type": "identifier", "text": "file_getbuffer", "parent": 961, "children": [], "start_point": {"row": 195, "column": 18}, "end_point": {"row": 195, "column": 32}}, {"id": 963, "type": "argument_list", "text": "(ms)", "parent": 961, "children": [964], "start_point": {"row": 195, "column": 32}, "end_point": {"row": 195, "column": 36}}, {"id": 964, "type": "identifier", "text": "ms", "parent": 963, "children": [], "start_point": {"row": 195, "column": 33}, "end_point": {"row": 195, "column": 35}}, {"id": 965, "type": "null", "text": "NULL", "parent": 955, "children": [966], "start_point": {"row": 195, "column": 39}, "end_point": {"row": 195, "column": 43}}, {"id": 966, "type": "NULL", "text": "NULL", "parent": 965, "children": [], "start_point": {"row": 195, "column": 39}, "end_point": {"row": 195, "column": 43}}, {"id": 967, "type": "function_definition", "text": "R_API RMagic* r_magic_new(int flags) {\n\tRMagic *ms = R_NEW0 (RMagic);\n\tif (!ms) {\n\t\treturn NULL;\n\t}\n\tr_magic_setflags (ms, flags);\n\tms->o.buf = ms->o.pbuf = NULL;\n\tms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li));\n\tif (!ms->c.li) {\n\t\tfree (ms);\n\t\treturn NULL;\n\t}\n\tfile_reset (ms);\n\tms->mlist = NULL;\n\tms->file = \"unknown\";\n\tms->line = 0;\n\treturn ms;\n}", "parent": 786, "children": [968, 969, 971], "start_point": {"row": 201, "column": 0}, "end_point": {"row": 218, "column": 1}}, {"id": 968, "type": "type_identifier", "text": "R_API", "parent": 967, "children": [], "start_point": {"row": 201, "column": 0}, "end_point": {"row": 201, "column": 5}}, {"id": 969, "type": "ERROR", "text": "RMagic", "parent": 967, "children": [970], "start_point": {"row": 201, "column": 6}, "end_point": {"row": 201, "column": 12}}, {"id": 970, "type": "identifier", "text": "RMagic", "parent": 969, "children": [], "start_point": {"row": 201, "column": 6}, "end_point": {"row": 201, "column": 12}}, {"id": 971, "type": "pointer_declarator", "text": "* r_magic_new(int flags)", "parent": 967, "children": [972, 973], "start_point": {"row": 201, "column": 12}, "end_point": {"row": 201, "column": 36}}, {"id": 972, "type": "*", "text": "*", "parent": 971, "children": [], "start_point": {"row": 201, "column": 12}, "end_point": {"row": 201, "column": 13}}, {"id": 973, "type": "function_declarator", "text": "r_magic_new(int flags)", "parent": 971, "children": [974, 975], "start_point": {"row": 201, "column": 14}, "end_point": {"row": 201, "column": 36}}, {"id": 974, "type": "identifier", "text": "r_magic_new", "parent": 973, "children": [], "start_point": {"row": 201, "column": 14}, "end_point": {"row": 201, "column": 25}}, {"id": 975, "type": "parameter_list", "text": "(int flags)", "parent": 973, "children": [976], "start_point": {"row": 201, "column": 25}, "end_point": {"row": 201, "column": 36}}, {"id": 976, "type": "parameter_declaration", "text": "int flags", "parent": 975, "children": [977, 978], "start_point": {"row": 201, "column": 26}, "end_point": {"row": 201, "column": 35}}, {"id": 977, "type": "primitive_type", "text": "int", "parent": 976, "children": [], "start_point": {"row": 201, "column": 26}, "end_point": {"row": 201, "column": 29}}, {"id": 978, "type": "identifier", "text": "flags", "parent": 976, "children": [], "start_point": {"row": 201, "column": 30}, "end_point": {"row": 201, "column": 35}}, {"id": 979, "type": "declaration", "text": "RMagic *ms = R_NEW0 (RMagic);", "parent": 967, "children": [980, 981], "start_point": {"row": 202, "column": 1}, "end_point": {"row": 202, "column": 30}}, {"id": 980, "type": "type_identifier", "text": "RMagic", "parent": 979, "children": [], "start_point": {"row": 202, "column": 1}, "end_point": {"row": 202, "column": 7}}, {"id": 981, "type": "init_declarator", "text": "*ms = R_NEW0 (RMagic)", "parent": 979, "children": [982, 985, 986], "start_point": {"row": 202, "column": 8}, "end_point": {"row": 202, "column": 29}}, {"id": 982, "type": "pointer_declarator", "text": "*ms", "parent": 981, "children": [983, 984], "start_point": {"row": 202, "column": 8}, "end_point": {"row": 202, "column": 11}}, {"id": 983, "type": "*", "text": "*", "parent": 982, "children": [], "start_point": {"row": 202, "column": 8}, "end_point": {"row": 202, "column": 9}}, {"id": 984, "type": "identifier", "text": "ms", "parent": 982, "children": [], "start_point": {"row": 202, "column": 9}, "end_point": {"row": 202, "column": 11}}, {"id": 985, "type": "=", "text": "=", "parent": 981, "children": [], "start_point": {"row": 202, "column": 12}, "end_point": {"row": 202, "column": 13}}, {"id": 986, "type": "call_expression", "text": "R_NEW0 (RMagic)", "parent": 981, "children": [987, 988], "start_point": {"row": 202, "column": 14}, "end_point": {"row": 202, "column": 29}}, {"id": 987, "type": "identifier", "text": "R_NEW0", "parent": 986, "children": [], "start_point": {"row": 202, "column": 14}, "end_point": {"row": 202, "column": 20}}, {"id": 988, "type": "argument_list", "text": "(RMagic)", "parent": 986, "children": [989], "start_point": {"row": 202, "column": 21}, "end_point": {"row": 202, "column": 29}}, {"id": 989, "type": "identifier", "text": "RMagic", "parent": 988, "children": [], "start_point": {"row": 202, "column": 22}, "end_point": {"row": 202, "column": 28}}, {"id": 990, "type": "if_statement", "text": "if (!ms) {\n\t\treturn NULL;\n\t}", "parent": 967, "children": [991], "start_point": {"row": 203, "column": 1}, "end_point": {"row": 205, "column": 2}}, {"id": 991, "type": "parenthesized_expression", "text": "(!ms)", "parent": 990, "children": [992], "start_point": {"row": 203, "column": 4}, "end_point": {"row": 203, "column": 9}}, {"id": 992, "type": "unary_expression", "text": "!ms", "parent": 991, "children": [993, 994], "start_point": {"row": 203, "column": 5}, "end_point": {"row": 203, "column": 8}}, {"id": 993, "type": "!", "text": "!", "parent": 992, "children": [], "start_point": {"row": 203, "column": 5}, "end_point": {"row": 203, "column": 6}}, {"id": 994, "type": "identifier", "text": "ms", "parent": 992, "children": [], "start_point": {"row": 203, "column": 6}, "end_point": {"row": 203, "column": 8}}, {"id": 995, "type": "return_statement", "text": "return NULL;", "parent": 990, "children": [996], "start_point": {"row": 204, "column": 2}, "end_point": {"row": 204, "column": 14}}, {"id": 996, "type": "null", "text": "NULL", "parent": 995, "children": [997], "start_point": {"row": 204, "column": 9}, "end_point": {"row": 204, "column": 13}}, {"id": 997, "type": "NULL", "text": "NULL", "parent": 996, "children": [], "start_point": {"row": 204, "column": 9}, "end_point": {"row": 204, "column": 13}}, {"id": 998, "type": "call_expression", "text": "r_magic_setflags (ms, flags)", "parent": 967, "children": [999, 1000], "start_point": {"row": 206, "column": 1}, "end_point": {"row": 206, "column": 29}}, {"id": 999, "type": "identifier", "text": "r_magic_setflags", "parent": 998, "children": [], "start_point": {"row": 206, "column": 1}, "end_point": {"row": 206, "column": 17}}, {"id": 1000, "type": "argument_list", "text": "(ms, flags)", "parent": 998, "children": [1001, 1002], "start_point": {"row": 206, "column": 18}, "end_point": {"row": 206, "column": 29}}, {"id": 1001, "type": "identifier", "text": "ms", "parent": 1000, "children": [], "start_point": {"row": 206, "column": 19}, "end_point": {"row": 206, "column": 21}}, {"id": 1002, "type": "identifier", "text": "flags", "parent": 1000, "children": [], "start_point": {"row": 206, "column": 23}, "end_point": {"row": 206, "column": 28}}, {"id": 1003, "type": "assignment_expression", "text": "ms->o.buf = ms->o.pbuf = NULL", "parent": 967, "children": [1004, 1009, 1010], "start_point": {"row": 207, "column": 1}, "end_point": {"row": 207, "column": 30}}, {"id": 1004, "type": "field_expression", "text": "ms->o.buf", "parent": 1003, "children": [1005, 1008], "start_point": {"row": 207, "column": 1}, "end_point": {"row": 207, "column": 10}}, {"id": 1005, "type": "field_expression", "text": "ms->o", "parent": 1004, "children": [1006, 1007], "start_point": {"row": 207, "column": 1}, "end_point": {"row": 207, "column": 6}}, {"id": 1006, "type": "identifier", "text": "ms", "parent": 1005, "children": [], "start_point": {"row": 207, "column": 1}, "end_point": {"row": 207, "column": 3}}, {"id": 1007, "type": "field_identifier", "text": "o", "parent": 1005, "children": [], "start_point": {"row": 207, "column": 5}, "end_point": {"row": 207, "column": 6}}, {"id": 1008, "type": "field_identifier", "text": "buf", "parent": 1004, "children": [], "start_point": {"row": 207, "column": 7}, "end_point": {"row": 207, "column": 10}}, {"id": 1009, "type": "=", "text": "=", "parent": 1003, "children": [], "start_point": {"row": 207, "column": 11}, "end_point": {"row": 207, "column": 12}}, {"id": 1010, "type": "assignment_expression", "text": "ms->o.pbuf = NULL", "parent": 1003, "children": [1011, 1016, 1017], "start_point": {"row": 207, "column": 13}, "end_point": {"row": 207, "column": 30}}, {"id": 1011, "type": "field_expression", "text": "ms->o.pbuf", "parent": 1010, "children": [1012, 1015], "start_point": {"row": 207, "column": 13}, "end_point": {"row": 207, "column": 23}}, {"id": 1012, "type": "field_expression", "text": "ms->o", "parent": 1011, "children": [1013, 1014], "start_point": {"row": 207, "column": 13}, "end_point": {"row": 207, "column": 18}}, {"id": 1013, "type": "identifier", "text": "ms", "parent": 1012, "children": [], "start_point": {"row": 207, "column": 13}, "end_point": {"row": 207, "column": 15}}, {"id": 1014, "type": "field_identifier", "text": "o", "parent": 1012, "children": [], "start_point": {"row": 207, "column": 17}, "end_point": {"row": 207, "column": 18}}, {"id": 1015, "type": "field_identifier", "text": "pbuf", "parent": 1011, "children": [], "start_point": {"row": 207, "column": 19}, "end_point": {"row": 207, "column": 23}}, {"id": 1016, "type": "=", "text": "=", "parent": 1010, "children": [], "start_point": {"row": 207, "column": 24}, "end_point": {"row": 207, "column": 25}}, {"id": 1017, "type": "null", "text": "NULL", "parent": 1010, "children": [1018], "start_point": {"row": 207, "column": 26}, "end_point": {"row": 207, "column": 30}}, {"id": 1018, "type": "NULL", "text": "NULL", "parent": 1017, "children": [], "start_point": {"row": 207, "column": 26}, "end_point": {"row": 207, "column": 30}}, {"id": 1019, "type": "assignment_expression", "text": "ms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li))", "parent": 967, "children": [1020, 1025, 1026], "start_point": {"row": 208, "column": 1}, "end_point": {"row": 208, "column": 58}}, {"id": 1020, "type": "field_expression", "text": "ms->c.li", "parent": 1019, "children": [1021, 1024], "start_point": {"row": 208, "column": 1}, "end_point": {"row": 208, "column": 9}}, {"id": 1021, "type": "field_expression", "text": "ms->c", "parent": 1020, "children": [1022, 1023], "start_point": {"row": 208, "column": 1}, "end_point": {"row": 208, "column": 6}}, {"id": 1022, "type": "identifier", "text": "ms", "parent": 1021, "children": [], "start_point": {"row": 208, "column": 1}, "end_point": {"row": 208, "column": 3}}, {"id": 1023, "type": "field_identifier", "text": "c", "parent": 1021, "children": [], "start_point": {"row": 208, "column": 5}, "end_point": {"row": 208, "column": 6}}, {"id": 1024, "type": "field_identifier", "text": "li", "parent": 1020, "children": [], "start_point": {"row": 208, "column": 7}, "end_point": {"row": 208, "column": 9}}, {"id": 1025, "type": "=", "text": "=", "parent": 1019, "children": [], "start_point": {"row": 208, "column": 10}, "end_point": {"row": 208, "column": 11}}, {"id": 1026, "type": "call_expression", "text": "malloc ((ms->c.len = 10) * sizeof (*ms->c.li))", "parent": 1019, "children": [1027, 1028], "start_point": {"row": 208, "column": 12}, "end_point": {"row": 208, "column": 58}}, {"id": 1027, "type": "identifier", "text": "malloc", "parent": 1026, "children": [], "start_point": {"row": 208, "column": 12}, "end_point": {"row": 208, "column": 18}}, {"id": 1028, "type": "argument_list", "text": "((ms->c.len = 10) * sizeof (*ms->c.li))", "parent": 1026, "children": [1029], "start_point": {"row": 208, "column": 19}, "end_point": {"row": 208, "column": 58}}, {"id": 1029, "type": "binary_expression", "text": "(ms->c.len = 10) * sizeof (*ms->c.li)", "parent": 1028, "children": [1030, 1039, 1040], "start_point": {"row": 208, "column": 20}, "end_point": {"row": 208, "column": 57}}, {"id": 1030, "type": "parenthesized_expression", "text": "(ms->c.len = 10)", "parent": 1029, "children": [1031], "start_point": {"row": 208, "column": 20}, "end_point": {"row": 208, "column": 36}}, {"id": 1031, "type": "assignment_expression", "text": "ms->c.len = 10", "parent": 1030, "children": [1032, 1037, 1038], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 35}}, {"id": 1032, "type": "field_expression", "text": "ms->c.len", "parent": 1031, "children": [1033, 1036], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 30}}, {"id": 1033, "type": "field_expression", "text": "ms->c", "parent": 1032, "children": [1034, 1035], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 26}}, {"id": 1034, "type": "identifier", "text": "ms", "parent": 1033, "children": [], "start_point": {"row": 208, "column": 21}, "end_point": {"row": 208, "column": 23}}, {"id": 1035, "type": "field_identifier", "text": "c", "parent": 1033, "children": [], "start_point": {"row": 208, "column": 25}, "end_point": {"row": 208, "column": 26}}, {"id": 1036, "type": "field_identifier", "text": "len", "parent": 1032, "children": [], "start_point": {"row": 208, "column": 27}, "end_point": {"row": 208, "column": 30}}, {"id": 1037, "type": "=", "text": "=", "parent": 1031, "children": [], "start_point": {"row": 208, "column": 31}, "end_point": {"row": 208, "column": 32}}, {"id": 1038, "type": "number_literal", "text": "10", "parent": 1031, "children": [], "start_point": {"row": 208, "column": 33}, "end_point": {"row": 208, "column": 35}}, {"id": 1039, "type": "*", "text": "*", "parent": 1029, "children": [], "start_point": {"row": 208, "column": 37}, "end_point": {"row": 208, "column": 38}}, {"id": 1040, "type": "sizeof_expression", "text": "sizeof (*ms->c.li)", "parent": 1029, "children": [1041], "start_point": {"row": 208, "column": 39}, "end_point": {"row": 208, "column": 57}}, {"id": 1041, "type": "parenthesized_expression", "text": "(*ms->c.li)", "parent": 1040, "children": [1042], "start_point": {"row": 208, "column": 46}, "end_point": {"row": 208, "column": 57}}, {"id": 1042, "type": "pointer_expression", "text": "*ms->c.li", "parent": 1041, "children": [1043, 1044], "start_point": {"row": 208, "column": 47}, "end_point": {"row": 208, "column": 56}}, {"id": 1043, "type": "*", "text": "*", "parent": 1042, "children": [], "start_point": {"row": 208, "column": 47}, "end_point": {"row": 208, "column": 48}}, {"id": 1044, "type": "field_expression", "text": "ms->c.li", "parent": 1042, "children": [1045, 1048], "start_point": {"row": 208, "column": 48}, "end_point": {"row": 208, "column": 56}}, {"id": 1045, "type": "field_expression", "text": "ms->c", "parent": 1044, "children": [1046, 1047], "start_point": {"row": 208, "column": 48}, "end_point": {"row": 208, "column": 53}}, {"id": 1046, "type": "identifier", "text": "ms", "parent": 1045, "children": [], "start_point": {"row": 208, "column": 48}, "end_point": {"row": 208, "column": 50}}, {"id": 1047, "type": "field_identifier", "text": "c", "parent": 1045, "children": [], "start_point": {"row": 208, "column": 52}, "end_point": {"row": 208, "column": 53}}, {"id": 1048, "type": "field_identifier", "text": "li", "parent": 1044, "children": [], "start_point": {"row": 208, "column": 54}, "end_point": {"row": 208, "column": 56}}, {"id": 1049, "type": "if_statement", "text": "if (!ms->c.li) {\n\t\tfree (ms);\n\t\treturn NULL;\n\t}", "parent": 967, "children": [1050], "start_point": {"row": 209, "column": 1}, "end_point": {"row": 212, "column": 2}}, {"id": 1050, "type": "parenthesized_expression", "text": "(!ms->c.li)", "parent": 1049, "children": [1051], "start_point": {"row": 209, "column": 4}, "end_point": {"row": 209, "column": 15}}, {"id": 1051, "type": "unary_expression", "text": "!ms->c.li", "parent": 1050, "children": [1052, 1053], "start_point": {"row": 209, "column": 5}, "end_point": {"row": 209, "column": 14}}, {"id": 1052, "type": "!", "text": "!", "parent": 1051, "children": [], "start_point": {"row": 209, "column": 5}, "end_point": {"row": 209, "column": 6}}, {"id": 1053, "type": "field_expression", "text": "ms->c.li", "parent": 1051, "children": [1054, 1057], "start_point": {"row": 209, "column": 6}, "end_point": {"row": 209, "column": 14}}, {"id": 1054, "type": "field_expression", "text": "ms->c", "parent": 1053, "children": [1055, 1056], "start_point": {"row": 209, "column": 6}, "end_point": {"row": 209, "column": 11}}, {"id": 1055, "type": "identifier", "text": "ms", "parent": 1054, "children": [], "start_point": {"row": 209, "column": 6}, "end_point": {"row": 209, "column": 8}}, {"id": 1056, "type": "field_identifier", "text": "c", "parent": 1054, "children": [], "start_point": {"row": 209, "column": 10}, "end_point": {"row": 209, "column": 11}}, {"id": 1057, "type": "field_identifier", "text": "li", "parent": 1053, "children": [], "start_point": {"row": 209, "column": 12}, "end_point": {"row": 209, "column": 14}}, {"id": 1058, "type": "call_expression", "text": "free (ms)", "parent": 1049, "children": [1059, 1060], "start_point": {"row": 210, "column": 2}, "end_point": {"row": 210, "column": 11}}, {"id": 1059, "type": "identifier", "text": "free", "parent": 1058, "children": [], "start_point": {"row": 210, "column": 2}, "end_point": {"row": 210, "column": 6}}, {"id": 1060, "type": "argument_list", "text": "(ms)", "parent": 1058, "children": [1061], "start_point": {"row": 210, "column": 7}, "end_point": {"row": 210, "column": 11}}, {"id": 1061, "type": "identifier", "text": "ms", "parent": 1060, "children": [], "start_point": {"row": 210, "column": 8}, "end_point": {"row": 210, "column": 10}}, {"id": 1062, "type": "return_statement", "text": "return NULL;", "parent": 1049, "children": [1063], "start_point": {"row": 211, "column": 2}, "end_point": {"row": 211, "column": 14}}, {"id": 1063, "type": "null", "text": "NULL", "parent": 1062, "children": [1064], "start_point": {"row": 211, "column": 9}, "end_point": {"row": 211, "column": 13}}, {"id": 1064, "type": "NULL", "text": "NULL", "parent": 1063, "children": [], "start_point": {"row": 211, "column": 9}, "end_point": {"row": 211, "column": 13}}, {"id": 1065, "type": "call_expression", "text": "file_reset (ms)", "parent": 967, "children": [1066, 1067], "start_point": {"row": 213, "column": 1}, "end_point": {"row": 213, "column": 16}}, {"id": 1066, "type": "identifier", "text": "file_reset", "parent": 1065, "children": [], "start_point": {"row": 213, "column": 1}, "end_point": {"row": 213, "column": 11}}, {"id": 1067, "type": "argument_list", "text": "(ms)", "parent": 1065, "children": [1068], "start_point": {"row": 213, "column": 12}, "end_point": {"row": 213, "column": 16}}, {"id": 1068, "type": "identifier", "text": "ms", "parent": 1067, "children": [], "start_point": {"row": 213, "column": 13}, "end_point": {"row": 213, "column": 15}}, {"id": 1069, "type": "assignment_expression", "text": "ms->mlist = NULL", "parent": 967, "children": [1070, 1073, 1074], "start_point": {"row": 214, "column": 1}, "end_point": {"row": 214, "column": 17}}, {"id": 1070, "type": "field_expression", "text": "ms->mlist", "parent": 1069, "children": [1071, 1072], "start_point": {"row": 214, "column": 1}, "end_point": {"row": 214, "column": 10}}, {"id": 1071, "type": "identifier", "text": "ms", "parent": 1070, "children": [], "start_point": {"row": 214, "column": 1}, "end_point": {"row": 214, "column": 3}}, {"id": 1072, "type": "field_identifier", "text": "mlist", "parent": 1070, "children": [], "start_point": {"row": 214, "column": 5}, "end_point": {"row": 214, "column": 10}}, {"id": 1073, "type": "=", "text": "=", "parent": 1069, "children": [], "start_point": {"row": 214, "column": 11}, "end_point": {"row": 214, "column": 12}}, {"id": 1074, "type": "null", "text": "NULL", "parent": 1069, "children": [1075], "start_point": {"row": 214, "column": 13}, "end_point": {"row": 214, "column": 17}}, {"id": 1075, "type": "NULL", "text": "NULL", "parent": 1074, "children": [], "start_point": {"row": 214, "column": 13}, "end_point": {"row": 214, "column": 17}}, {"id": 1076, "type": "assignment_expression", "text": "ms->file = \"unknown\"", "parent": 967, "children": [1077, 1080, 1081], "start_point": {"row": 215, "column": 1}, "end_point": {"row": 215, "column": 21}}, {"id": 1077, "type": "field_expression", "text": "ms->file", "parent": 1076, "children": [1078, 1079], "start_point": {"row": 215, "column": 1}, "end_point": {"row": 215, "column": 9}}, {"id": 1078, "type": "identifier", "text": "ms", "parent": 1077, "children": [], "start_point": {"row": 215, "column": 1}, "end_point": {"row": 215, "column": 3}}, {"id": 1079, "type": "field_identifier", "text": "file", "parent": 1077, "children": [], "start_point": {"row": 215, "column": 5}, "end_point": {"row": 215, "column": 9}}, {"id": 1080, "type": "=", "text": "=", "parent": 1076, "children": [], "start_point": {"row": 215, "column": 10}, "end_point": {"row": 215, "column": 11}}, {"id": 1081, "type": "string_literal", "text": "\"unknown\"", "parent": 1076, "children": [], "start_point": {"row": 215, "column": 12}, "end_point": {"row": 215, "column": 21}}, {"id": 1082, "type": "assignment_expression", "text": "ms->line = 0", "parent": 967, "children": [1083, 1086, 1087], "start_point": {"row": 216, "column": 1}, "end_point": {"row": 216, "column": 13}}, {"id": 1083, "type": "field_expression", "text": "ms->line", "parent": 1082, "children": [1084, 1085], "start_point": {"row": 216, "column": 1}, "end_point": {"row": 216, "column": 9}}, {"id": 1084, "type": "identifier", "text": "ms", "parent": 1083, "children": [], "start_point": {"row": 216, "column": 1}, "end_point": {"row": 216, "column": 3}}, {"id": 1085, "type": "field_identifier", "text": "line", "parent": 1083, "children": [], "start_point": {"row": 216, "column": 5}, "end_point": {"row": 216, "column": 9}}, {"id": 1086, "type": "=", "text": "=", "parent": 1082, "children": [], "start_point": {"row": 216, "column": 10}, "end_point": {"row": 216, "column": 11}}, {"id": 1087, "type": "number_literal", "text": "0", "parent": 1082, "children": [], "start_point": {"row": 216, "column": 12}, "end_point": {"row": 216, "column": 13}}, {"id": 1088, "type": "return_statement", "text": "return ms;", "parent": 967, "children": [1089], "start_point": {"row": 217, "column": 1}, "end_point": {"row": 217, "column": 11}}, {"id": 1089, "type": "identifier", "text": "ms", "parent": 1088, "children": [], "start_point": {"row": 217, "column": 8}, "end_point": {"row": 217, "column": 10}}, {"id": 1090, "type": "function_definition", "text": "R_API void r_magic_free(RMagic *ms) {\n\tif (ms) {\n\t\tfree_mlist (ms->mlist);\n\t\tfree (ms->o.pbuf);\n\t\tfree (ms->o.buf);\n\t\tfree (ms->c.li);\n\t\tfree (ms);\n\t}\n}", "parent": 786, "children": [1091, 1092, 1094], "start_point": {"row": 220, "column": 0}, "end_point": {"row": 228, "column": 1}}, {"id": 1091, "type": "type_identifier", "text": "R_API", "parent": 1090, "children": [], "start_point": {"row": 220, "column": 0}, "end_point": {"row": 220, "column": 5}}, {"id": 1092, "type": "ERROR", "text": "void", "parent": 1090, "children": [1093], "start_point": {"row": 220, "column": 6}, "end_point": {"row": 220, "column": 10}}, {"id": 1093, "type": "identifier", "text": "void", "parent": 1092, "children": [], "start_point": {"row": 220, "column": 6}, "end_point": {"row": 220, "column": 10}}, {"id": 1094, "type": "function_declarator", "text": "r_magic_free(RMagic *ms)", "parent": 1090, "children": [1095, 1096], "start_point": {"row": 220, "column": 11}, "end_point": {"row": 220, "column": 35}}, {"id": 1095, "type": "identifier", "text": "r_magic_free", "parent": 1094, "children": [], "start_point": {"row": 220, "column": 11}, "end_point": {"row": 220, "column": 23}}, {"id": 1096, "type": "parameter_list", "text": "(RMagic *ms)", "parent": 1094, "children": [1097], "start_point": {"row": 220, "column": 23}, "end_point": {"row": 220, "column": 35}}, {"id": 1097, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 1096, "children": [1098, 1099], "start_point": {"row": 220, "column": 24}, "end_point": {"row": 220, "column": 34}}, {"id": 1098, "type": "type_identifier", "text": "RMagic", "parent": 1097, "children": [], "start_point": {"row": 220, "column": 24}, "end_point": {"row": 220, "column": 30}}, {"id": 1099, "type": "pointer_declarator", "text": "*ms", "parent": 1097, "children": [1100, 1101], "start_point": {"row": 220, "column": 31}, "end_point": {"row": 220, "column": 34}}, {"id": 1100, "type": "*", "text": "*", "parent": 1099, "children": [], "start_point": {"row": 220, "column": 31}, "end_point": {"row": 220, "column": 32}}, {"id": 1101, "type": "identifier", "text": "ms", "parent": 1099, "children": [], "start_point": {"row": 220, "column": 32}, "end_point": {"row": 220, "column": 34}}, {"id": 1102, "type": "if_statement", "text": "if (ms) {\n\t\tfree_mlist (ms->mlist);\n\t\tfree (ms->o.pbuf);\n\t\tfree (ms->o.buf);\n\t\tfree (ms->c.li);\n\t\tfree (ms);\n\t}", "parent": 1090, "children": [1103], "start_point": {"row": 221, "column": 1}, "end_point": {"row": 227, "column": 2}}, {"id": 1103, "type": "parenthesized_expression", "text": "(ms)", "parent": 1102, "children": [1104], "start_point": {"row": 221, "column": 4}, "end_point": {"row": 221, "column": 8}}, {"id": 1104, "type": "identifier", "text": "ms", "parent": 1103, "children": [], "start_point": {"row": 221, "column": 5}, "end_point": {"row": 221, "column": 7}}, {"id": 1105, "type": "call_expression", "text": "free_mlist (ms->mlist)", "parent": 1102, "children": [1106, 1107], "start_point": {"row": 222, "column": 2}, "end_point": {"row": 222, "column": 24}}, {"id": 1106, "type": "identifier", "text": "free_mlist", "parent": 1105, "children": [], "start_point": {"row": 222, "column": 2}, "end_point": {"row": 222, "column": 12}}, {"id": 1107, "type": "argument_list", "text": "(ms->mlist)", "parent": 1105, "children": [1108], "start_point": {"row": 222, "column": 13}, "end_point": {"row": 222, "column": 24}}, {"id": 1108, "type": "field_expression", "text": "ms->mlist", "parent": 1107, "children": [1109, 1110], "start_point": {"row": 222, "column": 14}, "end_point": {"row": 222, "column": 23}}, {"id": 1109, "type": "identifier", "text": "ms", "parent": 1108, "children": [], "start_point": {"row": 222, "column": 14}, "end_point": {"row": 222, "column": 16}}, {"id": 1110, "type": "field_identifier", "text": "mlist", "parent": 1108, "children": [], "start_point": {"row": 222, "column": 18}, "end_point": {"row": 222, "column": 23}}, {"id": 1111, "type": "call_expression", "text": "free (ms->o.pbuf)", "parent": 1102, "children": [1112, 1113], "start_point": {"row": 223, "column": 2}, "end_point": {"row": 223, "column": 19}}, {"id": 1112, "type": "identifier", "text": "free", "parent": 1111, "children": [], "start_point": {"row": 223, "column": 2}, "end_point": {"row": 223, "column": 6}}, {"id": 1113, "type": "argument_list", "text": "(ms->o.pbuf)", "parent": 1111, "children": [1114], "start_point": {"row": 223, "column": 7}, "end_point": {"row": 223, "column": 19}}, {"id": 1114, "type": "field_expression", "text": "ms->o.pbuf", "parent": 1113, "children": [1115, 1118], "start_point": {"row": 223, "column": 8}, "end_point": {"row": 223, "column": 18}}, {"id": 1115, "type": "field_expression", "text": "ms->o", "parent": 1114, "children": [1116, 1117], "start_point": {"row": 223, "column": 8}, "end_point": {"row": 223, "column": 13}}, {"id": 1116, "type": "identifier", "text": "ms", "parent": 1115, "children": [], "start_point": {"row": 223, "column": 8}, "end_point": {"row": 223, "column": 10}}, {"id": 1117, "type": "field_identifier", "text": "o", "parent": 1115, "children": [], "start_point": {"row": 223, "column": 12}, "end_point": {"row": 223, "column": 13}}, {"id": 1118, "type": "field_identifier", "text": "pbuf", "parent": 1114, "children": [], "start_point": {"row": 223, "column": 14}, "end_point": {"row": 223, "column": 18}}, {"id": 1119, "type": "call_expression", "text": "free (ms->o.buf)", "parent": 1102, "children": [1120, 1121], "start_point": {"row": 224, "column": 2}, "end_point": {"row": 224, "column": 18}}, {"id": 1120, "type": "identifier", "text": "free", "parent": 1119, "children": [], "start_point": {"row": 224, "column": 2}, "end_point": {"row": 224, "column": 6}}, {"id": 1121, "type": "argument_list", "text": "(ms->o.buf)", "parent": 1119, "children": [1122], "start_point": {"row": 224, "column": 7}, "end_point": {"row": 224, "column": 18}}, {"id": 1122, "type": "field_expression", "text": "ms->o.buf", "parent": 1121, "children": [1123, 1126], "start_point": {"row": 224, "column": 8}, "end_point": {"row": 224, "column": 17}}, {"id": 1123, "type": "field_expression", "text": "ms->o", "parent": 1122, "children": [1124, 1125], "start_point": {"row": 224, "column": 8}, "end_point": {"row": 224, "column": 13}}, {"id": 1124, "type": "identifier", "text": "ms", "parent": 1123, "children": [], "start_point": {"row": 224, "column": 8}, "end_point": {"row": 224, "column": 10}}, {"id": 1125, "type": "field_identifier", "text": "o", "parent": 1123, "children": [], "start_point": {"row": 224, "column": 12}, "end_point": {"row": 224, "column": 13}}, {"id": 1126, "type": "field_identifier", "text": "buf", "parent": 1122, "children": [], "start_point": {"row": 224, "column": 14}, "end_point": {"row": 224, "column": 17}}, {"id": 1127, "type": "call_expression", "text": "free (ms->c.li)", "parent": 1102, "children": [1128, 1129], "start_point": {"row": 225, "column": 2}, "end_point": {"row": 225, "column": 17}}, {"id": 1128, "type": "identifier", "text": "free", "parent": 1127, "children": [], "start_point": {"row": 225, "column": 2}, "end_point": {"row": 225, "column": 6}}, {"id": 1129, "type": "argument_list", "text": "(ms->c.li)", "parent": 1127, "children": [1130], "start_point": {"row": 225, "column": 7}, "end_point": {"row": 225, "column": 17}}, {"id": 1130, "type": "field_expression", "text": "ms->c.li", "parent": 1129, "children": [1131, 1134], "start_point": {"row": 225, "column": 8}, "end_point": {"row": 225, "column": 16}}, {"id": 1131, "type": "field_expression", "text": "ms->c", "parent": 1130, "children": [1132, 1133], "start_point": {"row": 225, "column": 8}, "end_point": {"row": 225, "column": 13}}, {"id": 1132, "type": "identifier", "text": "ms", "parent": 1131, "children": [], "start_point": {"row": 225, "column": 8}, "end_point": {"row": 225, "column": 10}}, {"id": 1133, "type": "field_identifier", "text": "c", "parent": 1131, "children": [], "start_point": {"row": 225, "column": 12}, "end_point": {"row": 225, "column": 13}}, {"id": 1134, "type": "field_identifier", "text": "li", "parent": 1130, "children": [], "start_point": {"row": 225, "column": 14}, "end_point": {"row": 225, "column": 16}}, {"id": 1135, "type": "call_expression", "text": "free (ms)", "parent": 1102, "children": [1136, 1137], "start_point": {"row": 226, "column": 2}, "end_point": {"row": 226, "column": 11}}, {"id": 1136, "type": "identifier", "text": "free", "parent": 1135, "children": [], "start_point": {"row": 226, "column": 2}, "end_point": {"row": 226, "column": 6}}, {"id": 1137, "type": "argument_list", "text": "(ms)", "parent": 1135, "children": [1138], "start_point": {"row": 226, "column": 7}, "end_point": {"row": 226, "column": 11}}, {"id": 1138, "type": "identifier", "text": "ms", "parent": 1137, "children": [], "start_point": {"row": 226, "column": 8}, "end_point": {"row": 226, "column": 10}}, {"id": 1139, "type": "function_definition", "text": "R_API bool r_magic_load_buffer(RMagic* ms, const char *magicdata) {\n\tif (*magicdata == '#') {\n\t\tstruct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n\t\tif (ml) {\n\t\t\tfree_mlist (ms->mlist);\n\t\t\tms->mlist = ml;\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\teprintf (\"Magic buffers should start with #\\n\");\n\t}\n\treturn false;\n}", "parent": 786, "children": [1140, 1141, 1143], "start_point": {"row": 230, "column": 0}, "end_point": {"row": 242, "column": 1}}, {"id": 1140, "type": "type_identifier", "text": "R_API", "parent": 1139, "children": [], "start_point": {"row": 230, "column": 0}, "end_point": {"row": 230, "column": 5}}, {"id": 1141, "type": "ERROR", "text": "bool", "parent": 1139, "children": [1142], "start_point": {"row": 230, "column": 6}, "end_point": {"row": 230, "column": 10}}, {"id": 1142, "type": "identifier", "text": "bool", "parent": 1141, "children": [], "start_point": {"row": 230, "column": 6}, "end_point": {"row": 230, "column": 10}}, {"id": 1143, "type": "function_declarator", "text": "r_magic_load_buffer(RMagic* ms, const char *magicdata)", "parent": 1139, "children": [1144, 1145], "start_point": {"row": 230, "column": 11}, "end_point": {"row": 230, "column": 65}}, {"id": 1144, "type": "identifier", "text": "r_magic_load_buffer", "parent": 1143, "children": [], "start_point": {"row": 230, "column": 11}, "end_point": {"row": 230, "column": 30}}, {"id": 1145, "type": "parameter_list", "text": "(RMagic* ms, const char *magicdata)", "parent": 1143, "children": [1146, 1151], "start_point": {"row": 230, "column": 30}, "end_point": {"row": 230, "column": 65}}, {"id": 1146, "type": "parameter_declaration", "text": "RMagic* ms", "parent": 1145, "children": [1147, 1148], "start_point": {"row": 230, "column": 31}, "end_point": {"row": 230, "column": 41}}, {"id": 1147, "type": "type_identifier", "text": "RMagic", "parent": 1146, "children": [], "start_point": {"row": 230, "column": 31}, "end_point": {"row": 230, "column": 37}}, {"id": 1148, "type": "pointer_declarator", "text": "* ms", "parent": 1146, "children": [1149, 1150], "start_point": {"row": 230, "column": 37}, "end_point": {"row": 230, "column": 41}}, {"id": 1149, "type": "*", "text": "*", "parent": 1148, "children": [], "start_point": {"row": 230, "column": 37}, "end_point": {"row": 230, "column": 38}}, {"id": 1150, "type": "identifier", "text": "ms", "parent": 1148, "children": [], "start_point": {"row": 230, "column": 39}, "end_point": {"row": 230, "column": 41}}, {"id": 1151, "type": "parameter_declaration", "text": "const char *magicdata", "parent": 1145, "children": [1152, 1153], "start_point": {"row": 230, "column": 43}, "end_point": {"row": 230, "column": 64}}, {"id": 1152, "type": "primitive_type", "text": "char", "parent": 1151, "children": [], "start_point": {"row": 230, "column": 49}, "end_point": {"row": 230, "column": 53}}, {"id": 1153, "type": "pointer_declarator", "text": "*magicdata", "parent": 1151, "children": [1154, 1155], "start_point": {"row": 230, "column": 54}, "end_point": {"row": 230, "column": 64}}, {"id": 1154, "type": "*", "text": "*", "parent": 1153, "children": [], "start_point": {"row": 230, "column": 54}, "end_point": {"row": 230, "column": 55}}, {"id": 1155, "type": "identifier", "text": "magicdata", "parent": 1153, "children": [], "start_point": {"row": 230, "column": 55}, "end_point": {"row": 230, "column": 64}}, {"id": 1156, "type": "if_statement", "text": "if (*magicdata == '#') {\n\t\tstruct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n\t\tif (ml) {\n\t\t\tfree_mlist (ms->mlist);\n\t\t\tms->mlist = ml;\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\teprintf (\"Magic buffers should start with #\\n\");\n\t}", "parent": 1139, "children": [1157, 1199], "start_point": {"row": 231, "column": 1}, "end_point": {"row": 240, "column": 2}}, {"id": 1157, "type": "parenthesized_expression", "text": "(*magicdata == '#')", "parent": 1156, "children": [1158], "start_point": {"row": 231, "column": 4}, "end_point": {"row": 231, "column": 23}}, {"id": 1158, "type": "binary_expression", "text": "*magicdata == '#'", "parent": 1157, "children": [1159, 1162, 1163], "start_point": {"row": 231, "column": 5}, "end_point": {"row": 231, "column": 22}}, {"id": 1159, "type": "pointer_expression", "text": "*magicdata", "parent": 1158, "children": [1160, 1161], "start_point": {"row": 231, "column": 5}, "end_point": {"row": 231, "column": 15}}, {"id": 1160, "type": "*", "text": "*", "parent": 1159, "children": [], "start_point": {"row": 231, "column": 5}, "end_point": {"row": 231, "column": 6}}, {"id": 1161, "type": "identifier", "text": "magicdata", "parent": 1159, "children": [], "start_point": {"row": 231, "column": 6}, "end_point": {"row": 231, "column": 15}}, {"id": 1162, "type": "==", "text": "==", "parent": 1158, "children": [], "start_point": {"row": 231, "column": 16}, "end_point": {"row": 231, "column": 18}}, {"id": 1163, "type": "char_literal", "text": "'#'", "parent": 1158, "children": [1164, 1165, 1166], "start_point": {"row": 231, "column": 19}, "end_point": {"row": 231, "column": 22}}, {"id": 1164, "type": "'", "text": "'", "parent": 1163, "children": [], "start_point": {"row": 231, "column": 19}, "end_point": {"row": 231, "column": 20}}, {"id": 1165, "type": "character", "text": "#", "parent": 1163, "children": [], "start_point": {"row": 231, "column": 20}, "end_point": {"row": 231, "column": 21}}, {"id": 1166, "type": "'", "text": "'", "parent": 1163, "children": [], "start_point": {"row": 231, "column": 21}, "end_point": {"row": 231, "column": 22}}, {"id": 1167, "type": "declaration", "text": "struct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);", "parent": 1156, "children": [1168, 1171], "start_point": {"row": 232, "column": 2}, "end_point": {"row": 232, "column": 64}}, {"id": 1168, "type": "struct_specifier", "text": "struct mlist", "parent": 1167, "children": [1169, 1170], "start_point": {"row": 232, "column": 2}, "end_point": {"row": 232, "column": 14}}, {"id": 1169, "type": "struct", "text": "struct", "parent": 1168, "children": [], "start_point": {"row": 232, "column": 2}, "end_point": {"row": 232, "column": 8}}, {"id": 1170, "type": "type_identifier", "text": "mlist", "parent": 1168, "children": [], "start_point": {"row": 232, "column": 9}, "end_point": {"row": 232, "column": 14}}, {"id": 1171, "type": "init_declarator", "text": "*ml = file_apprentice (ms, magicdata, FILE_LOAD)", "parent": 1167, "children": [1172, 1175, 1176], "start_point": {"row": 232, "column": 15}, "end_point": {"row": 232, "column": 63}}, {"id": 1172, "type": "pointer_declarator", "text": "*ml", "parent": 1171, "children": [1173, 1174], "start_point": {"row": 232, "column": 15}, "end_point": {"row": 232, "column": 18}}, {"id": 1173, "type": "*", "text": "*", "parent": 1172, "children": [], "start_point": {"row": 232, "column": 15}, "end_point": {"row": 232, "column": 16}}, {"id": 1174, "type": "identifier", "text": "ml", "parent": 1172, "children": [], "start_point": {"row": 232, "column": 16}, "end_point": {"row": 232, "column": 18}}, {"id": 1175, "type": "=", "text": "=", "parent": 1171, "children": [], "start_point": {"row": 232, "column": 19}, "end_point": {"row": 232, "column": 20}}, {"id": 1176, "type": "call_expression", "text": "file_apprentice (ms, magicdata, FILE_LOAD)", "parent": 1171, "children": [1177, 1178], "start_point": {"row": 232, "column": 21}, "end_point": {"row": 232, "column": 63}}, {"id": 1177, "type": "identifier", "text": "file_apprentice", "parent": 1176, "children": [], "start_point": {"row": 232, "column": 21}, "end_point": {"row": 232, "column": 36}}, {"id": 1178, "type": "argument_list", "text": "(ms, magicdata, FILE_LOAD)", "parent": 1176, "children": [1179, 1180, 1181], "start_point": {"row": 232, "column": 37}, "end_point": {"row": 232, "column": 63}}, {"id": 1179, "type": "identifier", "text": "ms", "parent": 1178, "children": [], "start_point": {"row": 232, "column": 38}, "end_point": {"row": 232, "column": 40}}, {"id": 1180, "type": "identifier", "text": "magicdata", "parent": 1178, "children": [], "start_point": {"row": 232, "column": 42}, "end_point": {"row": 232, "column": 51}}, {"id": 1181, "type": "identifier", "text": "FILE_LOAD", "parent": 1178, "children": [], "start_point": {"row": 232, "column": 53}, "end_point": {"row": 232, "column": 62}}, {"id": 1182, "type": "if_statement", "text": "if (ml) {\n\t\t\tfree_mlist (ms->mlist);\n\t\t\tms->mlist = ml;\n\t\t\treturn true;\n\t\t}", "parent": 1156, "children": [1183], "start_point": {"row": 233, "column": 2}, "end_point": {"row": 237, "column": 3}}, {"id": 1183, "type": "parenthesized_expression", "text": "(ml)", "parent": 1182, "children": [1184], "start_point": {"row": 233, "column": 5}, "end_point": {"row": 233, "column": 9}}, {"id": 1184, "type": "identifier", "text": "ml", "parent": 1183, "children": [], "start_point": {"row": 233, "column": 6}, "end_point": {"row": 233, "column": 8}}, {"id": 1185, "type": "call_expression", "text": "free_mlist (ms->mlist)", "parent": 1182, "children": [1186, 1187], "start_point": {"row": 234, "column": 3}, "end_point": {"row": 234, "column": 25}}, {"id": 1186, "type": "identifier", "text": "free_mlist", "parent": 1185, "children": [], "start_point": {"row": 234, "column": 3}, "end_point": {"row": 234, "column": 13}}, {"id": 1187, "type": "argument_list", "text": "(ms->mlist)", "parent": 1185, "children": [1188], "start_point": {"row": 234, "column": 14}, "end_point": {"row": 234, "column": 25}}, {"id": 1188, "type": "field_expression", "text": "ms->mlist", "parent": 1187, "children": [1189, 1190], "start_point": {"row": 234, "column": 15}, "end_point": {"row": 234, "column": 24}}, {"id": 1189, "type": "identifier", "text": "ms", "parent": 1188, "children": [], "start_point": {"row": 234, "column": 15}, "end_point": {"row": 234, "column": 17}}, {"id": 1190, "type": "field_identifier", "text": "mlist", "parent": 1188, "children": [], "start_point": {"row": 234, "column": 19}, "end_point": {"row": 234, "column": 24}}, {"id": 1191, "type": "assignment_expression", "text": "ms->mlist = ml", "parent": 1182, "children": [1192, 1195, 1196], "start_point": {"row": 235, "column": 3}, "end_point": {"row": 235, "column": 17}}, {"id": 1192, "type": "field_expression", "text": "ms->mlist", "parent": 1191, "children": [1193, 1194], "start_point": {"row": 235, "column": 3}, "end_point": {"row": 235, "column": 12}}, {"id": 1193, "type": "identifier", "text": "ms", "parent": 1192, "children": [], "start_point": {"row": 235, "column": 3}, "end_point": {"row": 235, "column": 5}}, {"id": 1194, "type": "field_identifier", "text": "mlist", "parent": 1192, "children": [], "start_point": {"row": 235, "column": 7}, "end_point": {"row": 235, "column": 12}}, {"id": 1195, "type": "=", "text": "=", "parent": 1191, "children": [], "start_point": {"row": 235, "column": 13}, "end_point": {"row": 235, "column": 14}}, {"id": 1196, "type": "identifier", "text": "ml", "parent": 1191, "children": [], "start_point": {"row": 235, "column": 15}, "end_point": {"row": 235, "column": 17}}, {"id": 1197, "type": "return_statement", "text": "return true;", "parent": 1182, "children": [1198], "start_point": {"row": 236, "column": 3}, "end_point": {"row": 236, "column": 15}}, {"id": 1198, "type": "true", "text": "true", "parent": 1197, "children": [], "start_point": {"row": 236, "column": 10}, "end_point": {"row": 236, "column": 14}}, {"id": 1199, "type": "else_clause", "text": "else {\n\t\teprintf (\"Magic buffers should start with #\\n\");\n\t}", "parent": 1156, "children": [], "start_point": {"row": 238, "column": 3}, "end_point": {"row": 240, "column": 2}}, {"id": 1200, "type": "call_expression", "text": "eprintf (\"Magic buffers should start with #\\n\")", "parent": 1199, "children": [1201, 1202], "start_point": {"row": 239, "column": 2}, "end_point": {"row": 239, "column": 49}}, {"id": 1201, "type": "identifier", "text": "eprintf", "parent": 1200, "children": [], "start_point": {"row": 239, "column": 2}, "end_point": {"row": 239, "column": 9}}, {"id": 1202, "type": "argument_list", "text": "(\"Magic buffers should start with #\\n\")", "parent": 1200, "children": [1203], "start_point": {"row": 239, "column": 10}, "end_point": {"row": 239, "column": 49}}, {"id": 1203, "type": "string_literal", "text": "\"Magic buffers should start with #\\n\"", "parent": 1202, "children": [1204], "start_point": {"row": 239, "column": 11}, "end_point": {"row": 239, "column": 48}}, {"id": 1204, "type": "escape_sequence", "text": "\\n", "parent": 1203, "children": [], "start_point": {"row": 239, "column": 45}, "end_point": {"row": 239, "column": 47}}, {"id": 1205, "type": "return_statement", "text": "return false;", "parent": 1139, "children": [1206], "start_point": {"row": 241, "column": 1}, "end_point": {"row": 241, "column": 14}}, {"id": 1206, "type": "false", "text": "false", "parent": 1205, "children": [], "start_point": {"row": 241, "column": 8}, "end_point": {"row": 241, "column": 13}}, {"id": 1207, "type": "function_definition", "text": "R_API bool r_magic_load(RMagic* ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);\n\tif (ml) {\n\t\tfree_mlist (ms->mlist);\n\t\tms->mlist = ml;\n\t\treturn true;\n\t}\n\treturn false;\n}", "parent": 786, "children": [1208, 1209, 1211], "start_point": {"row": 244, "column": 0}, "end_point": {"row": 252, "column": 1}}, {"id": 1208, "type": "type_identifier", "text": "R_API", "parent": 1207, "children": [], "start_point": {"row": 244, "column": 0}, "end_point": {"row": 244, "column": 5}}, {"id": 1209, "type": "ERROR", "text": "bool", "parent": 1207, "children": [1210], "start_point": {"row": 244, "column": 6}, "end_point": {"row": 244, "column": 10}}, {"id": 1210, "type": "identifier", "text": "bool", "parent": 1209, "children": [], "start_point": {"row": 244, "column": 6}, "end_point": {"row": 244, "column": 10}}, {"id": 1211, "type": "function_declarator", "text": "r_magic_load(RMagic* ms, const char *magicfile)", "parent": 1207, "children": [1212, 1213], "start_point": {"row": 244, "column": 11}, "end_point": {"row": 244, "column": 58}}, {"id": 1212, "type": "identifier", "text": "r_magic_load", "parent": 1211, "children": [], "start_point": {"row": 244, "column": 11}, "end_point": {"row": 244, "column": 23}}, {"id": 1213, "type": "parameter_list", "text": "(RMagic* ms, const char *magicfile)", "parent": 1211, "children": [1214, 1219], "start_point": {"row": 244, "column": 23}, "end_point": {"row": 244, "column": 58}}, {"id": 1214, "type": "parameter_declaration", "text": "RMagic* ms", "parent": 1213, "children": [1215, 1216], "start_point": {"row": 244, "column": 24}, "end_point": {"row": 244, "column": 34}}, {"id": 1215, "type": "type_identifier", "text": "RMagic", "parent": 1214, "children": [], "start_point": {"row": 244, "column": 24}, "end_point": {"row": 244, "column": 30}}, {"id": 1216, "type": "pointer_declarator", "text": "* ms", "parent": 1214, "children": [1217, 1218], "start_point": {"row": 244, "column": 30}, "end_point": {"row": 244, "column": 34}}, {"id": 1217, "type": "*", "text": "*", "parent": 1216, "children": [], "start_point": {"row": 244, "column": 30}, "end_point": {"row": 244, "column": 31}}, {"id": 1218, "type": "identifier", "text": "ms", "parent": 1216, "children": [], "start_point": {"row": 244, "column": 32}, "end_point": {"row": 244, "column": 34}}, {"id": 1219, "type": "parameter_declaration", "text": "const char *magicfile", "parent": 1213, "children": [1220, 1221], "start_point": {"row": 244, "column": 36}, "end_point": {"row": 244, "column": 57}}, {"id": 1220, "type": "primitive_type", "text": "char", "parent": 1219, "children": [], "start_point": {"row": 244, "column": 42}, "end_point": {"row": 244, "column": 46}}, {"id": 1221, "type": "pointer_declarator", "text": "*magicfile", "parent": 1219, "children": [1222, 1223], "start_point": {"row": 244, "column": 47}, "end_point": {"row": 244, "column": 57}}, {"id": 1222, "type": "*", "text": "*", "parent": 1221, "children": [], "start_point": {"row": 244, "column": 47}, "end_point": {"row": 244, "column": 48}}, {"id": 1223, "type": "identifier", "text": "magicfile", "parent": 1221, "children": [], "start_point": {"row": 244, "column": 48}, "end_point": {"row": 244, "column": 57}}, {"id": 1224, "type": "declaration", "text": "struct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);", "parent": 1207, "children": [1225, 1228], "start_point": {"row": 245, "column": 1}, "end_point": {"row": 245, "column": 63}}, {"id": 1225, "type": "struct_specifier", "text": "struct mlist", "parent": 1224, "children": [1226, 1227], "start_point": {"row": 245, "column": 1}, "end_point": {"row": 245, "column": 13}}, {"id": 1226, "type": "struct", "text": "struct", "parent": 1225, "children": [], "start_point": {"row": 245, "column": 1}, "end_point": {"row": 245, "column": 7}}, {"id": 1227, "type": "type_identifier", "text": "mlist", "parent": 1225, "children": [], "start_point": {"row": 245, "column": 8}, "end_point": {"row": 245, "column": 13}}, {"id": 1228, "type": "init_declarator", "text": "*ml = file_apprentice (ms, magicfile, FILE_LOAD)", "parent": 1224, "children": [1229, 1232, 1233], "start_point": {"row": 245, "column": 14}, "end_point": {"row": 245, "column": 62}}, {"id": 1229, "type": "pointer_declarator", "text": "*ml", "parent": 1228, "children": [1230, 1231], "start_point": {"row": 245, "column": 14}, "end_point": {"row": 245, "column": 17}}, {"id": 1230, "type": "*", "text": "*", "parent": 1229, "children": [], "start_point": {"row": 245, "column": 14}, "end_point": {"row": 245, "column": 15}}, {"id": 1231, "type": "identifier", "text": "ml", "parent": 1229, "children": [], "start_point": {"row": 245, "column": 15}, "end_point": {"row": 245, "column": 17}}, {"id": 1232, "type": "=", "text": "=", "parent": 1228, "children": [], "start_point": {"row": 245, "column": 18}, "end_point": {"row": 245, "column": 19}}, {"id": 1233, "type": "call_expression", "text": "file_apprentice (ms, magicfile, FILE_LOAD)", "parent": 1228, "children": [1234, 1235], "start_point": {"row": 245, "column": 20}, "end_point": {"row": 245, "column": 62}}, {"id": 1234, "type": "identifier", "text": "file_apprentice", "parent": 1233, "children": [], "start_point": {"row": 245, "column": 20}, "end_point": {"row": 245, "column": 35}}, {"id": 1235, "type": "argument_list", "text": "(ms, magicfile, FILE_LOAD)", "parent": 1233, "children": [1236, 1237, 1238], "start_point": {"row": 245, "column": 36}, "end_point": {"row": 245, "column": 62}}, {"id": 1236, "type": "identifier", "text": "ms", "parent": 1235, "children": [], "start_point": {"row": 245, "column": 37}, "end_point": {"row": 245, "column": 39}}, {"id": 1237, "type": "identifier", "text": "magicfile", "parent": 1235, "children": [], "start_point": {"row": 245, "column": 41}, "end_point": {"row": 245, "column": 50}}, {"id": 1238, "type": "identifier", "text": "FILE_LOAD", "parent": 1235, "children": [], "start_point": {"row": 245, "column": 52}, "end_point": {"row": 245, "column": 61}}, {"id": 1239, "type": "if_statement", "text": "if (ml) {\n\t\tfree_mlist (ms->mlist);\n\t\tms->mlist = ml;\n\t\treturn true;\n\t}", "parent": 1207, "children": [1240], "start_point": {"row": 246, "column": 1}, "end_point": {"row": 250, "column": 2}}, {"id": 1240, "type": "parenthesized_expression", "text": "(ml)", "parent": 1239, "children": [1241], "start_point": {"row": 246, "column": 4}, "end_point": {"row": 246, "column": 8}}, {"id": 1241, "type": "identifier", "text": "ml", "parent": 1240, "children": [], "start_point": {"row": 246, "column": 5}, "end_point": {"row": 246, "column": 7}}, {"id": 1242, "type": "call_expression", "text": "free_mlist (ms->mlist)", "parent": 1239, "children": [1243, 1244], "start_point": {"row": 247, "column": 2}, "end_point": {"row": 247, "column": 24}}, {"id": 1243, "type": "identifier", "text": "free_mlist", "parent": 1242, "children": [], "start_point": {"row": 247, "column": 2}, "end_point": {"row": 247, "column": 12}}, {"id": 1244, "type": "argument_list", "text": "(ms->mlist)", "parent": 1242, "children": [1245], "start_point": {"row": 247, "column": 13}, "end_point": {"row": 247, "column": 24}}, {"id": 1245, "type": "field_expression", "text": "ms->mlist", "parent": 1244, "children": [1246, 1247], "start_point": {"row": 247, "column": 14}, "end_point": {"row": 247, "column": 23}}, {"id": 1246, "type": "identifier", "text": "ms", "parent": 1245, "children": [], "start_point": {"row": 247, "column": 14}, "end_point": {"row": 247, "column": 16}}, {"id": 1247, "type": "field_identifier", "text": "mlist", "parent": 1245, "children": [], "start_point": {"row": 247, "column": 18}, "end_point": {"row": 247, "column": 23}}, {"id": 1248, "type": "assignment_expression", "text": "ms->mlist = ml", "parent": 1239, "children": [1249, 1252, 1253], "start_point": {"row": 248, "column": 2}, "end_point": {"row": 248, "column": 16}}, {"id": 1249, "type": "field_expression", "text": "ms->mlist", "parent": 1248, "children": [1250, 1251], "start_point": {"row": 248, "column": 2}, "end_point": {"row": 248, "column": 11}}, {"id": 1250, "type": "identifier", "text": "ms", "parent": 1249, "children": [], "start_point": {"row": 248, "column": 2}, "end_point": {"row": 248, "column": 4}}, {"id": 1251, "type": "field_identifier", "text": "mlist", "parent": 1249, "children": [], "start_point": {"row": 248, "column": 6}, "end_point": {"row": 248, "column": 11}}, {"id": 1252, "type": "=", "text": "=", "parent": 1248, "children": [], "start_point": {"row": 248, "column": 12}, "end_point": {"row": 248, "column": 13}}, {"id": 1253, "type": "identifier", "text": "ml", "parent": 1248, "children": [], "start_point": {"row": 248, "column": 14}, "end_point": {"row": 248, "column": 16}}, {"id": 1254, "type": "return_statement", "text": "return true;", "parent": 1239, "children": [1255], "start_point": {"row": 249, "column": 2}, "end_point": {"row": 249, "column": 14}}, {"id": 1255, "type": "true", "text": "true", "parent": 1254, "children": [], "start_point": {"row": 249, "column": 9}, "end_point": {"row": 249, "column": 13}}, {"id": 1256, "type": "return_statement", "text": "return false;", "parent": 1207, "children": [1257], "start_point": {"row": 251, "column": 1}, "end_point": {"row": 251, "column": 14}}, {"id": 1257, "type": "false", "text": "false", "parent": 1256, "children": [], "start_point": {"row": 251, "column": 8}, "end_point": {"row": 251, "column": 13}}, {"id": 1258, "type": "function_definition", "text": "R_API bool r_magic_compile(RMagic *ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);\n\tfree_mlist (ml);\n\treturn ml != NULL;\n}", "parent": 786, "children": [1259, 1260, 1262], "start_point": {"row": 254, "column": 0}, "end_point": {"row": 258, "column": 1}}, {"id": 1259, "type": "type_identifier", "text": "R_API", "parent": 1258, "children": [], "start_point": {"row": 254, "column": 0}, "end_point": {"row": 254, "column": 5}}, {"id": 1260, "type": "ERROR", "text": "bool", "parent": 1258, "children": [1261], "start_point": {"row": 254, "column": 6}, "end_point": {"row": 254, "column": 10}}, {"id": 1261, "type": "identifier", "text": "bool", "parent": 1260, "children": [], "start_point": {"row": 254, "column": 6}, "end_point": {"row": 254, "column": 10}}, {"id": 1262, "type": "function_declarator", "text": "r_magic_compile(RMagic *ms, const char *magicfile)", "parent": 1258, "children": [1263, 1264], "start_point": {"row": 254, "column": 11}, "end_point": {"row": 254, "column": 61}}, {"id": 1263, "type": "identifier", "text": "r_magic_compile", "parent": 1262, "children": [], "start_point": {"row": 254, "column": 11}, "end_point": {"row": 254, "column": 26}}, {"id": 1264, "type": "parameter_list", "text": "(RMagic *ms, const char *magicfile)", "parent": 1262, "children": [1265, 1270], "start_point": {"row": 254, "column": 26}, "end_point": {"row": 254, "column": 61}}, {"id": 1265, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 1264, "children": [1266, 1267], "start_point": {"row": 254, "column": 27}, "end_point": {"row": 254, "column": 37}}, {"id": 1266, "type": "type_identifier", "text": "RMagic", "parent": 1265, "children": [], "start_point": {"row": 254, "column": 27}, "end_point": {"row": 254, "column": 33}}, {"id": 1267, "type": "pointer_declarator", "text": "*ms", "parent": 1265, "children": [1268, 1269], "start_point": {"row": 254, "column": 34}, "end_point": {"row": 254, "column": 37}}, {"id": 1268, "type": "*", "text": "*", "parent": 1267, "children": [], "start_point": {"row": 254, "column": 34}, "end_point": {"row": 254, "column": 35}}, {"id": 1269, "type": "identifier", "text": "ms", "parent": 1267, "children": [], "start_point": {"row": 254, "column": 35}, "end_point": {"row": 254, "column": 37}}, {"id": 1270, "type": "parameter_declaration", "text": "const char *magicfile", "parent": 1264, "children": [1271, 1272], "start_point": {"row": 254, "column": 39}, "end_point": {"row": 254, "column": 60}}, {"id": 1271, "type": "primitive_type", "text": "char", "parent": 1270, "children": [], "start_point": {"row": 254, "column": 45}, "end_point": {"row": 254, "column": 49}}, {"id": 1272, "type": "pointer_declarator", "text": "*magicfile", "parent": 1270, "children": [1273, 1274], "start_point": {"row": 254, "column": 50}, "end_point": {"row": 254, "column": 60}}, {"id": 1273, "type": "*", "text": "*", "parent": 1272, "children": [], "start_point": {"row": 254, "column": 50}, "end_point": {"row": 254, "column": 51}}, {"id": 1274, "type": "identifier", "text": "magicfile", "parent": 1272, "children": [], "start_point": {"row": 254, "column": 51}, "end_point": {"row": 254, "column": 60}}, {"id": 1275, "type": "declaration", "text": "struct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);", "parent": 1258, "children": [1276, 1279], "start_point": {"row": 255, "column": 1}, "end_point": {"row": 255, "column": 66}}, {"id": 1276, "type": "struct_specifier", "text": "struct mlist", "parent": 1275, "children": [1277, 1278], "start_point": {"row": 255, "column": 1}, "end_point": {"row": 255, "column": 13}}, {"id": 1277, "type": "struct", "text": "struct", "parent": 1276, "children": [], "start_point": {"row": 255, "column": 1}, "end_point": {"row": 255, "column": 7}}, {"id": 1278, "type": "type_identifier", "text": "mlist", "parent": 1276, "children": [], "start_point": {"row": 255, "column": 8}, "end_point": {"row": 255, "column": 13}}, {"id": 1279, "type": "init_declarator", "text": "*ml = file_apprentice (ms, magicfile, FILE_COMPILE)", "parent": 1275, "children": [1280, 1283, 1284], "start_point": {"row": 255, "column": 14}, "end_point": {"row": 255, "column": 65}}, {"id": 1280, "type": "pointer_declarator", "text": "*ml", "parent": 1279, "children": [1281, 1282], "start_point": {"row": 255, "column": 14}, "end_point": {"row": 255, "column": 17}}, {"id": 1281, "type": "*", "text": "*", "parent": 1280, "children": [], "start_point": {"row": 255, "column": 14}, "end_point": {"row": 255, "column": 15}}, {"id": 1282, "type": "identifier", "text": "ml", "parent": 1280, "children": [], "start_point": {"row": 255, "column": 15}, "end_point": {"row": 255, "column": 17}}, {"id": 1283, "type": "=", "text": "=", "parent": 1279, "children": [], "start_point": {"row": 255, "column": 18}, "end_point": {"row": 255, "column": 19}}, {"id": 1284, "type": "call_expression", "text": "file_apprentice (ms, magicfile, FILE_COMPILE)", "parent": 1279, "children": [1285, 1286], "start_point": {"row": 255, "column": 20}, "end_point": {"row": 255, "column": 65}}, {"id": 1285, "type": "identifier", "text": "file_apprentice", "parent": 1284, "children": [], "start_point": {"row": 255, "column": 20}, "end_point": {"row": 255, "column": 35}}, {"id": 1286, "type": "argument_list", "text": "(ms, magicfile, FILE_COMPILE)", "parent": 1284, "children": [1287, 1288, 1289], "start_point": {"row": 255, "column": 36}, "end_point": {"row": 255, "column": 65}}, {"id": 1287, "type": "identifier", "text": "ms", "parent": 1286, "children": [], "start_point": {"row": 255, "column": 37}, "end_point": {"row": 255, "column": 39}}, {"id": 1288, "type": "identifier", "text": "magicfile", "parent": 1286, "children": [], "start_point": {"row": 255, "column": 41}, "end_point": {"row": 255, "column": 50}}, {"id": 1289, "type": "identifier", "text": "FILE_COMPILE", "parent": 1286, "children": [], "start_point": {"row": 255, "column": 52}, "end_point": {"row": 255, "column": 64}}, {"id": 1290, "type": "call_expression", "text": "free_mlist (ml)", "parent": 1258, "children": [1291, 1292], "start_point": {"row": 256, "column": 1}, "end_point": {"row": 256, "column": 16}}, {"id": 1291, "type": "identifier", "text": "free_mlist", "parent": 1290, "children": [], "start_point": {"row": 256, "column": 1}, "end_point": {"row": 256, "column": 11}}, {"id": 1292, "type": "argument_list", "text": "(ml)", "parent": 1290, "children": [1293], "start_point": {"row": 256, "column": 12}, "end_point": {"row": 256, "column": 16}}, {"id": 1293, "type": "identifier", "text": "ml", "parent": 1292, "children": [], "start_point": {"row": 256, "column": 13}, "end_point": {"row": 256, "column": 15}}, {"id": 1294, "type": "return_statement", "text": "return ml != NULL;", "parent": 1258, "children": [1295], "start_point": {"row": 257, "column": 1}, "end_point": {"row": 257, "column": 19}}, {"id": 1295, "type": "binary_expression", "text": "ml != NULL", "parent": 1294, "children": [1296, 1297, 1298], "start_point": {"row": 257, "column": 8}, "end_point": {"row": 257, "column": 18}}, {"id": 1296, "type": "identifier", "text": "ml", "parent": 1295, "children": [], "start_point": {"row": 257, "column": 8}, "end_point": {"row": 257, "column": 10}}, {"id": 1297, "type": "!=", "text": "!=", "parent": 1295, "children": [], "start_point": {"row": 257, "column": 11}, "end_point": {"row": 257, "column": 13}}, {"id": 1298, "type": "null", "text": "NULL", "parent": 1295, "children": [1299], "start_point": {"row": 257, "column": 14}, "end_point": {"row": 257, "column": 18}}, {"id": 1299, "type": "NULL", "text": "NULL", "parent": 1298, "children": [], "start_point": {"row": 257, "column": 14}, "end_point": {"row": 257, "column": 18}}, {"id": 1300, "type": "function_definition", "text": "R_API bool r_magic_check(RMagic *ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);\n\tfree_mlist (ml);\n\treturn ml != NULL;\n}", "parent": 786, "children": [1301, 1302, 1304], "start_point": {"row": 260, "column": 0}, "end_point": {"row": 264, "column": 1}}, {"id": 1301, "type": "type_identifier", "text": "R_API", "parent": 1300, "children": [], "start_point": {"row": 260, "column": 0}, "end_point": {"row": 260, "column": 5}}, {"id": 1302, "type": "ERROR", "text": "bool", "parent": 1300, "children": [1303], "start_point": {"row": 260, "column": 6}, "end_point": {"row": 260, "column": 10}}, {"id": 1303, "type": "identifier", "text": "bool", "parent": 1302, "children": [], "start_point": {"row": 260, "column": 6}, "end_point": {"row": 260, "column": 10}}, {"id": 1304, "type": "function_declarator", "text": "r_magic_check(RMagic *ms, const char *magicfile)", "parent": 1300, "children": [1305, 1306], "start_point": {"row": 260, "column": 11}, "end_point": {"row": 260, "column": 59}}, {"id": 1305, "type": "identifier", "text": "r_magic_check", "parent": 1304, "children": [], "start_point": {"row": 260, "column": 11}, "end_point": {"row": 260, "column": 24}}, {"id": 1306, "type": "parameter_list", "text": "(RMagic *ms, const char *magicfile)", "parent": 1304, "children": [1307, 1312], "start_point": {"row": 260, "column": 24}, "end_point": {"row": 260, "column": 59}}, {"id": 1307, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 1306, "children": [1308, 1309], "start_point": {"row": 260, "column": 25}, "end_point": {"row": 260, "column": 35}}, {"id": 1308, "type": "type_identifier", "text": "RMagic", "parent": 1307, "children": [], "start_point": {"row": 260, "column": 25}, "end_point": {"row": 260, "column": 31}}, {"id": 1309, "type": "pointer_declarator", "text": "*ms", "parent": 1307, "children": [1310, 1311], "start_point": {"row": 260, "column": 32}, "end_point": {"row": 260, "column": 35}}, {"id": 1310, "type": "*", "text": "*", "parent": 1309, "children": [], "start_point": {"row": 260, "column": 32}, "end_point": {"row": 260, "column": 33}}, {"id": 1311, "type": "identifier", "text": "ms", "parent": 1309, "children": [], "start_point": {"row": 260, "column": 33}, "end_point": {"row": 260, "column": 35}}, {"id": 1312, "type": "parameter_declaration", "text": "const char *magicfile", "parent": 1306, "children": [1313, 1314], "start_point": {"row": 260, "column": 37}, "end_point": {"row": 260, "column": 58}}, {"id": 1313, "type": "primitive_type", "text": "char", "parent": 1312, "children": [], "start_point": {"row": 260, "column": 43}, "end_point": {"row": 260, "column": 47}}, {"id": 1314, "type": "pointer_declarator", "text": "*magicfile", "parent": 1312, "children": [1315, 1316], "start_point": {"row": 260, "column": 48}, "end_point": {"row": 260, "column": 58}}, {"id": 1315, "type": "*", "text": "*", "parent": 1314, "children": [], "start_point": {"row": 260, "column": 48}, "end_point": {"row": 260, "column": 49}}, {"id": 1316, "type": "identifier", "text": "magicfile", "parent": 1314, "children": [], "start_point": {"row": 260, "column": 49}, "end_point": {"row": 260, "column": 58}}, {"id": 1317, "type": "declaration", "text": "struct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);", "parent": 1300, "children": [1318, 1321], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 261, "column": 64}}, {"id": 1318, "type": "struct_specifier", "text": "struct mlist", "parent": 1317, "children": [1319, 1320], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 261, "column": 13}}, {"id": 1319, "type": "struct", "text": "struct", "parent": 1318, "children": [], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 261, "column": 7}}, {"id": 1320, "type": "type_identifier", "text": "mlist", "parent": 1318, "children": [], "start_point": {"row": 261, "column": 8}, "end_point": {"row": 261, "column": 13}}, {"id": 1321, "type": "init_declarator", "text": "*ml = file_apprentice (ms, magicfile, FILE_CHECK)", "parent": 1317, "children": [1322, 1325, 1326], "start_point": {"row": 261, "column": 14}, "end_point": {"row": 261, "column": 63}}, {"id": 1322, "type": "pointer_declarator", "text": "*ml", "parent": 1321, "children": [1323, 1324], "start_point": {"row": 261, "column": 14}, "end_point": {"row": 261, "column": 17}}, {"id": 1323, "type": "*", "text": "*", "parent": 1322, "children": [], "start_point": {"row": 261, "column": 14}, "end_point": {"row": 261, "column": 15}}, {"id": 1324, "type": "identifier", "text": "ml", "parent": 1322, "children": [], "start_point": {"row": 261, "column": 15}, "end_point": {"row": 261, "column": 17}}, {"id": 1325, "type": "=", "text": "=", "parent": 1321, "children": [], "start_point": {"row": 261, "column": 18}, "end_point": {"row": 261, "column": 19}}, {"id": 1326, "type": "call_expression", "text": "file_apprentice (ms, magicfile, FILE_CHECK)", "parent": 1321, "children": [1327, 1328], "start_point": {"row": 261, "column": 20}, "end_point": {"row": 261, "column": 63}}, {"id": 1327, "type": "identifier", "text": "file_apprentice", "parent": 1326, "children": [], "start_point": {"row": 261, "column": 20}, "end_point": {"row": 261, "column": 35}}, {"id": 1328, "type": "argument_list", "text": "(ms, magicfile, FILE_CHECK)", "parent": 1326, "children": [1329, 1330, 1331], "start_point": {"row": 261, "column": 36}, "end_point": {"row": 261, "column": 63}}, {"id": 1329, "type": "identifier", "text": "ms", "parent": 1328, "children": [], "start_point": {"row": 261, "column": 37}, "end_point": {"row": 261, "column": 39}}, {"id": 1330, "type": "identifier", "text": "magicfile", "parent": 1328, "children": [], "start_point": {"row": 261, "column": 41}, "end_point": {"row": 261, "column": 50}}, {"id": 1331, "type": "identifier", "text": "FILE_CHECK", "parent": 1328, "children": [], "start_point": {"row": 261, "column": 52}, "end_point": {"row": 261, "column": 62}}, {"id": 1332, "type": "call_expression", "text": "free_mlist (ml)", "parent": 1300, "children": [1333, 1334], "start_point": {"row": 262, "column": 1}, "end_point": {"row": 262, "column": 16}}, {"id": 1333, "type": "identifier", "text": "free_mlist", "parent": 1332, "children": [], "start_point": {"row": 262, "column": 1}, "end_point": {"row": 262, "column": 11}}, {"id": 1334, "type": "argument_list", "text": "(ml)", "parent": 1332, "children": [1335], "start_point": {"row": 262, "column": 12}, "end_point": {"row": 262, "column": 16}}, {"id": 1335, "type": "identifier", "text": "ml", "parent": 1334, "children": [], "start_point": {"row": 262, "column": 13}, "end_point": {"row": 262, "column": 15}}, {"id": 1336, "type": "return_statement", "text": "return ml != NULL;", "parent": 1300, "children": [1337], "start_point": {"row": 263, "column": 1}, "end_point": {"row": 263, "column": 19}}, {"id": 1337, "type": "binary_expression", "text": "ml != NULL", "parent": 1336, "children": [1338, 1339, 1340], "start_point": {"row": 263, "column": 8}, "end_point": {"row": 263, "column": 18}}, {"id": 1338, "type": "identifier", "text": "ml", "parent": 1337, "children": [], "start_point": {"row": 263, "column": 8}, "end_point": {"row": 263, "column": 10}}, {"id": 1339, "type": "!=", "text": "!=", "parent": 1337, "children": [], "start_point": {"row": 263, "column": 11}, "end_point": {"row": 263, "column": 13}}, {"id": 1340, "type": "null", "text": "NULL", "parent": 1337, "children": [1341], "start_point": {"row": 263, "column": 14}, "end_point": {"row": 263, "column": 18}}, {"id": 1341, "type": "NULL", "text": "NULL", "parent": 1340, "children": [], "start_point": {"row": 263, "column": 14}, "end_point": {"row": 263, "column": 18}}, {"id": 1342, "type": "function_definition", "text": "R_API const char* r_magic_descriptor(RMagic *ms, int fd) {\n\treturn file_or_fd (ms, NULL, fd);\n}", "parent": 786, "children": [1343, 1344, 1346], "start_point": {"row": 266, "column": 0}, "end_point": {"row": 268, "column": 1}}, {"id": 1343, "type": "type_identifier", "text": "R_API", "parent": 1342, "children": [], "start_point": {"row": 266, "column": 0}, "end_point": {"row": 266, "column": 5}}, {"id": 1344, "type": "ERROR", "text": "char", "parent": 1342, "children": [1345], "start_point": {"row": 266, "column": 12}, "end_point": {"row": 266, "column": 16}}, {"id": 1345, "type": "identifier", "text": "char", "parent": 1344, "children": [], "start_point": {"row": 266, "column": 12}, "end_point": {"row": 266, "column": 16}}, {"id": 1346, "type": "pointer_declarator", "text": "* r_magic_descriptor(RMagic *ms, int fd)", "parent": 1342, "children": [1347, 1348], "start_point": {"row": 266, "column": 16}, "end_point": {"row": 266, "column": 56}}, {"id": 1347, "type": "*", "text": "*", "parent": 1346, "children": [], "start_point": {"row": 266, "column": 16}, "end_point": {"row": 266, "column": 17}}, {"id": 1348, "type": "function_declarator", "text": "r_magic_descriptor(RMagic *ms, int fd)", "parent": 1346, "children": [1349, 1350], "start_point": {"row": 266, "column": 18}, "end_point": {"row": 266, "column": 56}}, {"id": 1349, "type": "identifier", "text": "r_magic_descriptor", "parent": 1348, "children": [], "start_point": {"row": 266, "column": 18}, "end_point": {"row": 266, "column": 36}}, {"id": 1350, "type": "parameter_list", "text": "(RMagic *ms, int fd)", "parent": 1348, "children": [1351, 1356], "start_point": {"row": 266, "column": 36}, "end_point": {"row": 266, "column": 56}}, {"id": 1351, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 1350, "children": [1352, 1353], "start_point": {"row": 266, "column": 37}, "end_point": {"row": 266, "column": 47}}, {"id": 1352, "type": "type_identifier", "text": "RMagic", "parent": 1351, "children": [], "start_point": {"row": 266, "column": 37}, "end_point": {"row": 266, "column": 43}}, {"id": 1353, "type": "pointer_declarator", "text": "*ms", "parent": 1351, "children": [1354, 1355], "start_point": {"row": 266, "column": 44}, "end_point": {"row": 266, "column": 47}}, {"id": 1354, "type": "*", "text": "*", "parent": 1353, "children": [], "start_point": {"row": 266, "column": 44}, "end_point": {"row": 266, "column": 45}}, {"id": 1355, "type": "identifier", "text": "ms", "parent": 1353, "children": [], "start_point": {"row": 266, "column": 45}, "end_point": {"row": 266, "column": 47}}, {"id": 1356, "type": "parameter_declaration", "text": "int fd", "parent": 1350, "children": [1357, 1358], "start_point": {"row": 266, "column": 49}, "end_point": {"row": 266, "column": 55}}, {"id": 1357, "type": "primitive_type", "text": "int", "parent": 1356, "children": [], "start_point": {"row": 266, "column": 49}, "end_point": {"row": 266, "column": 52}}, {"id": 1358, "type": "identifier", "text": "fd", "parent": 1356, "children": [], "start_point": {"row": 266, "column": 53}, "end_point": {"row": 266, "column": 55}}, {"id": 1359, "type": "return_statement", "text": "return file_or_fd (ms, NULL, fd);", "parent": 1342, "children": [1360], "start_point": {"row": 267, "column": 1}, "end_point": {"row": 267, "column": 34}}, {"id": 1360, "type": "call_expression", "text": "file_or_fd (ms, NULL, fd)", "parent": 1359, "children": [1361, 1362], "start_point": {"row": 267, "column": 8}, "end_point": {"row": 267, "column": 33}}, {"id": 1361, "type": "identifier", "text": "file_or_fd", "parent": 1360, "children": [], "start_point": {"row": 267, "column": 8}, "end_point": {"row": 267, "column": 18}}, {"id": 1362, "type": "argument_list", "text": "(ms, NULL, fd)", "parent": 1360, "children": [1363, 1364, 1366], "start_point": {"row": 267, "column": 19}, "end_point": {"row": 267, "column": 33}}, {"id": 1363, "type": "identifier", "text": "ms", "parent": 1362, "children": [], "start_point": {"row": 267, "column": 20}, "end_point": {"row": 267, "column": 22}}, {"id": 1364, "type": "null", "text": "NULL", "parent": 1362, "children": [1365], "start_point": {"row": 267, "column": 24}, "end_point": {"row": 267, "column": 28}}, {"id": 1365, "type": "NULL", "text": "NULL", "parent": 1364, "children": [], "start_point": {"row": 267, "column": 24}, "end_point": {"row": 267, "column": 28}}, {"id": 1366, "type": "identifier", "text": "fd", "parent": 1362, "children": [], "start_point": {"row": 267, "column": 30}, "end_point": {"row": 267, "column": 32}}, {"id": 1367, "type": "function_definition", "text": "R_API const char * r_magic_file(RMagic *ms, const char *inname) {\n\treturn file_or_fd (ms, inname, 0); // 0 = stdin\n}", "parent": 786, "children": [1368, 1369, 1371], "start_point": {"row": 270, "column": 0}, "end_point": {"row": 272, "column": 1}}, {"id": 1368, "type": "type_identifier", "text": "R_API", "parent": 1367, "children": [], "start_point": {"row": 270, "column": 0}, "end_point": {"row": 270, "column": 5}}, {"id": 1369, "type": "ERROR", "text": "char", "parent": 1367, "children": [1370], "start_point": {"row": 270, "column": 12}, "end_point": {"row": 270, "column": 16}}, {"id": 1370, "type": "identifier", "text": "char", "parent": 1369, "children": [], "start_point": {"row": 270, "column": 12}, "end_point": {"row": 270, "column": 16}}, {"id": 1371, "type": "pointer_declarator", "text": "* r_magic_file(RMagic *ms, const char *inname)", "parent": 1367, "children": [1372, 1373], "start_point": {"row": 270, "column": 17}, "end_point": {"row": 270, "column": 63}}, {"id": 1372, "type": "*", "text": "*", "parent": 1371, "children": [], "start_point": {"row": 270, "column": 17}, "end_point": {"row": 270, "column": 18}}, {"id": 1373, "type": "function_declarator", "text": "r_magic_file(RMagic *ms, const char *inname)", "parent": 1371, "children": [1374, 1375], "start_point": {"row": 270, "column": 19}, "end_point": {"row": 270, "column": 63}}, {"id": 1374, "type": "identifier", "text": "r_magic_file", "parent": 1373, "children": [], "start_point": {"row": 270, "column": 19}, "end_point": {"row": 270, "column": 31}}, {"id": 1375, "type": "parameter_list", "text": "(RMagic *ms, const char *inname)", "parent": 1373, "children": [1376, 1381], "start_point": {"row": 270, "column": 31}, "end_point": {"row": 270, "column": 63}}, {"id": 1376, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 1375, "children": [1377, 1378], "start_point": {"row": 270, "column": 32}, "end_point": {"row": 270, "column": 42}}, {"id": 1377, "type": "type_identifier", "text": "RMagic", "parent": 1376, "children": [], "start_point": {"row": 270, "column": 32}, "end_point": {"row": 270, "column": 38}}, {"id": 1378, "type": "pointer_declarator", "text": "*ms", "parent": 1376, "children": [1379, 1380], "start_point": {"row": 270, "column": 39}, "end_point": {"row": 270, "column": 42}}, {"id": 1379, "type": "*", "text": "*", "parent": 1378, "children": [], "start_point": {"row": 270, "column": 39}, "end_point": {"row": 270, "column": 40}}, {"id": 1380, "type": "identifier", "text": "ms", "parent": 1378, "children": [], "start_point": {"row": 270, "column": 40}, "end_point": {"row": 270, "column": 42}}, {"id": 1381, "type": "parameter_declaration", "text": "const char *inname", "parent": 1375, "children": [1382, 1383], "start_point": {"row": 270, "column": 44}, "end_point": {"row": 270, "column": 62}}, {"id": 1382, "type": "primitive_type", "text": "char", "parent": 1381, "children": [], "start_point": {"row": 270, "column": 50}, "end_point": {"row": 270, "column": 54}}, {"id": 1383, "type": "pointer_declarator", "text": "*inname", "parent": 1381, "children": [1384, 1385], "start_point": {"row": 270, "column": 55}, "end_point": {"row": 270, "column": 62}}, {"id": 1384, "type": "*", "text": "*", "parent": 1383, "children": [], "start_point": {"row": 270, "column": 55}, "end_point": {"row": 270, "column": 56}}, {"id": 1385, "type": "identifier", "text": "inname", "parent": 1383, "children": [], "start_point": {"row": 270, "column": 56}, "end_point": {"row": 270, "column": 62}}, {"id": 1386, "type": "return_statement", "text": "return file_or_fd (ms, inname, 0);", "parent": 1367, "children": [1387], "start_point": {"row": 271, "column": 1}, "end_point": {"row": 271, "column": 35}}, {"id": 1387, "type": "call_expression", "text": "file_or_fd (ms, inname, 0)", "parent": 1386, "children": [1388, 1389], "start_point": {"row": 271, "column": 8}, "end_point": {"row": 271, "column": 34}}, {"id": 1388, "type": "identifier", "text": "file_or_fd", "parent": 1387, "children": [], "start_point": {"row": 271, "column": 8}, "end_point": {"row": 271, "column": 18}}, {"id": 1389, "type": "argument_list", "text": "(ms, inname, 0)", "parent": 1387, "children": [1390, 1391, 1392], "start_point": {"row": 271, "column": 19}, "end_point": {"row": 271, "column": 34}}, {"id": 1390, "type": "identifier", "text": "ms", "parent": 1389, "children": [], "start_point": {"row": 271, "column": 20}, "end_point": {"row": 271, "column": 22}}, {"id": 1391, "type": "identifier", "text": "inname", "parent": 1389, "children": [], "start_point": {"row": 271, "column": 24}, "end_point": {"row": 271, "column": 30}}, {"id": 1392, "type": "number_literal", "text": "0", "parent": 1389, "children": [], "start_point": {"row": 271, "column": 32}, "end_point": {"row": 271, "column": 33}}, {"id": 1393, "type": "function_definition", "text": "R_API const char * r_magic_buffer(RMagic *ms, const void *buf, size_t nb) {\n\tif (file_reset (ms) == -1) {\n\t\treturn NULL;\n\t}\n\tif (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n\t\treturn NULL;\n\t}\n\treturn file_getbuffer (ms);\n}", "parent": 786, "children": [1394, 1395, 1397], "start_point": {"row": 274, "column": 0}, "end_point": {"row": 282, "column": 1}}, {"id": 1394, "type": "type_identifier", "text": "R_API", "parent": 1393, "children": [], "start_point": {"row": 274, "column": 0}, "end_point": {"row": 274, "column": 5}}, {"id": 1395, "type": "ERROR", "text": "char", "parent": 1393, "children": [1396], "start_point": {"row": 274, "column": 12}, "end_point": {"row": 274, "column": 16}}, {"id": 1396, "type": "identifier", "text": "char", "parent": 1395, "children": [], "start_point": {"row": 274, "column": 12}, "end_point": {"row": 274, "column": 16}}, {"id": 1397, "type": "pointer_declarator", "text": "* r_magic_buffer(RMagic *ms, const void *buf, size_t nb)", "parent": 1393, "children": [1398, 1399], "start_point": {"row": 274, "column": 17}, "end_point": {"row": 274, "column": 73}}, {"id": 1398, "type": "*", "text": "*", "parent": 1397, "children": [], "start_point": {"row": 274, "column": 17}, "end_point": {"row": 274, "column": 18}}, {"id": 1399, "type": "function_declarator", "text": "r_magic_buffer(RMagic *ms, const void *buf, size_t nb)", "parent": 1397, "children": [1400, 1401], "start_point": {"row": 274, "column": 19}, "end_point": {"row": 274, "column": 73}}, {"id": 1400, "type": "identifier", "text": "r_magic_buffer", "parent": 1399, "children": [], "start_point": {"row": 274, "column": 19}, "end_point": {"row": 274, "column": 33}}, {"id": 1401, "type": "parameter_list", "text": "(RMagic *ms, const void *buf, size_t nb)", "parent": 1399, "children": [1402, 1407, 1412], "start_point": {"row": 274, "column": 33}, "end_point": {"row": 274, "column": 73}}, {"id": 1402, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 1401, "children": [1403, 1404], "start_point": {"row": 274, "column": 34}, "end_point": {"row": 274, "column": 44}}, {"id": 1403, "type": "type_identifier", "text": "RMagic", "parent": 1402, "children": [], "start_point": {"row": 274, "column": 34}, "end_point": {"row": 274, "column": 40}}, {"id": 1404, "type": "pointer_declarator", "text": "*ms", "parent": 1402, "children": [1405, 1406], "start_point": {"row": 274, "column": 41}, "end_point": {"row": 274, "column": 44}}, {"id": 1405, "type": "*", "text": "*", "parent": 1404, "children": [], "start_point": {"row": 274, "column": 41}, "end_point": {"row": 274, "column": 42}}, {"id": 1406, "type": "identifier", "text": "ms", "parent": 1404, "children": [], "start_point": {"row": 274, "column": 42}, "end_point": {"row": 274, "column": 44}}, {"id": 1407, "type": "parameter_declaration", "text": "const void *buf", "parent": 1401, "children": [1408, 1409], "start_point": {"row": 274, "column": 46}, "end_point": {"row": 274, "column": 61}}, {"id": 1408, "type": "primitive_type", "text": "void", "parent": 1407, "children": [], "start_point": {"row": 274, "column": 52}, "end_point": {"row": 274, "column": 56}}, {"id": 1409, "type": "pointer_declarator", "text": "*buf", "parent": 1407, "children": [1410, 1411], "start_point": {"row": 274, "column": 57}, "end_point": {"row": 274, "column": 61}}, {"id": 1410, "type": "*", "text": "*", "parent": 1409, "children": [], "start_point": {"row": 274, "column": 57}, "end_point": {"row": 274, "column": 58}}, {"id": 1411, "type": "identifier", "text": "buf", "parent": 1409, "children": [], "start_point": {"row": 274, "column": 58}, "end_point": {"row": 274, "column": 61}}, {"id": 1412, "type": "parameter_declaration", "text": "size_t nb", "parent": 1401, "children": [1413, 1414], "start_point": {"row": 274, "column": 63}, "end_point": {"row": 274, "column": 72}}, {"id": 1413, "type": "primitive_type", "text": "size_t", "parent": 1412, "children": [], "start_point": {"row": 274, "column": 63}, "end_point": {"row": 274, "column": 69}}, {"id": 1414, "type": "identifier", "text": "nb", "parent": 1412, "children": [], "start_point": {"row": 274, "column": 70}, "end_point": {"row": 274, "column": 72}}, {"id": 1415, "type": "if_statement", "text": "if (file_reset (ms) == -1) {\n\t\treturn NULL;\n\t}", "parent": 1393, "children": [1416], "start_point": {"row": 275, "column": 1}, "end_point": {"row": 277, "column": 2}}, {"id": 1416, "type": "parenthesized_expression", "text": "(file_reset (ms) == -1)", "parent": 1415, "children": [1417], "start_point": {"row": 275, "column": 4}, "end_point": {"row": 275, "column": 27}}, {"id": 1417, "type": "binary_expression", "text": "file_reset (ms) == -1", "parent": 1416, "children": [1418, 1422, 1423], "start_point": {"row": 275, "column": 5}, "end_point": {"row": 275, "column": 26}}, {"id": 1418, "type": "call_expression", "text": "file_reset (ms)", "parent": 1417, "children": [1419, 1420], "start_point": {"row": 275, "column": 5}, "end_point": {"row": 275, "column": 20}}, {"id": 1419, "type": "identifier", "text": "file_reset", "parent": 1418, "children": [], "start_point": {"row": 275, "column": 5}, "end_point": {"row": 275, "column": 15}}, {"id": 1420, "type": "argument_list", "text": "(ms)", "parent": 1418, "children": [1421], "start_point": {"row": 275, "column": 16}, "end_point": {"row": 275, "column": 20}}, {"id": 1421, "type": "identifier", "text": "ms", "parent": 1420, "children": [], "start_point": {"row": 275, "column": 17}, "end_point": {"row": 275, "column": 19}}, {"id": 1422, "type": "==", "text": "==", "parent": 1417, "children": [], "start_point": {"row": 275, "column": 21}, "end_point": {"row": 275, "column": 23}}, {"id": 1423, "type": "number_literal", "text": "-1", "parent": 1417, "children": [], "start_point": {"row": 275, "column": 24}, "end_point": {"row": 275, "column": 26}}, {"id": 1424, "type": "return_statement", "text": "return NULL;", "parent": 1415, "children": [1425], "start_point": {"row": 276, "column": 2}, "end_point": {"row": 276, "column": 14}}, {"id": 1425, "type": "null", "text": "NULL", "parent": 1424, "children": [1426], "start_point": {"row": 276, "column": 9}, "end_point": {"row": 276, "column": 13}}, {"id": 1426, "type": "NULL", "text": "NULL", "parent": 1425, "children": [], "start_point": {"row": 276, "column": 9}, "end_point": {"row": 276, "column": 13}}, {"id": 1427, "type": "if_statement", "text": "if (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n\t\treturn NULL;\n\t}", "parent": 1393, "children": [1428], "start_point": {"row": 278, "column": 1}, "end_point": {"row": 280, "column": 2}}, {"id": 1428, "type": "parenthesized_expression", "text": "(file_buffer (ms, -1, NULL, buf, nb) == -1)", "parent": 1427, "children": [1429], "start_point": {"row": 278, "column": 4}, "end_point": {"row": 278, "column": 47}}, {"id": 1429, "type": "binary_expression", "text": "file_buffer (ms, -1, NULL, buf, nb) == -1", "parent": 1428, "children": [1430, 1439, 1440], "start_point": {"row": 278, "column": 5}, "end_point": {"row": 278, "column": 46}}, {"id": 1430, "type": "call_expression", "text": "file_buffer (ms, -1, NULL, buf, nb)", "parent": 1429, "children": [1431, 1432], "start_point": {"row": 278, "column": 5}, "end_point": {"row": 278, "column": 40}}, {"id": 1431, "type": "identifier", "text": "file_buffer", "parent": 1430, "children": [], "start_point": {"row": 278, "column": 5}, "end_point": {"row": 278, "column": 16}}, {"id": 1432, "type": "argument_list", "text": "(ms, -1, NULL, buf, nb)", "parent": 1430, "children": [1433, 1434, 1435, 1437, 1438], "start_point": {"row": 278, "column": 17}, "end_point": {"row": 278, "column": 40}}, {"id": 1433, "type": "identifier", "text": "ms", "parent": 1432, "children": [], "start_point": {"row": 278, "column": 18}, "end_point": {"row": 278, "column": 20}}, {"id": 1434, "type": "number_literal", "text": "-1", "parent": 1432, "children": [], "start_point": {"row": 278, "column": 22}, "end_point": {"row": 278, "column": 24}}, {"id": 1435, "type": "null", "text": "NULL", "parent": 1432, "children": [1436], "start_point": {"row": 278, "column": 26}, "end_point": {"row": 278, "column": 30}}, {"id": 1436, "type": "NULL", "text": "NULL", "parent": 1435, "children": [], "start_point": {"row": 278, "column": 26}, "end_point": {"row": 278, "column": 30}}, {"id": 1437, "type": "identifier", "text": "buf", "parent": 1432, "children": [], "start_point": {"row": 278, "column": 32}, "end_point": {"row": 278, "column": 35}}, {"id": 1438, "type": "identifier", "text": "nb", "parent": 1432, "children": [], "start_point": {"row": 278, "column": 37}, "end_point": {"row": 278, "column": 39}}, {"id": 1439, "type": "==", "text": "==", "parent": 1429, "children": [], "start_point": {"row": 278, "column": 41}, "end_point": {"row": 278, "column": 43}}, {"id": 1440, "type": "number_literal", "text": "-1", "parent": 1429, "children": [], "start_point": {"row": 278, "column": 44}, "end_point": {"row": 278, "column": 46}}, {"id": 1441, "type": "return_statement", "text": "return NULL;", "parent": 1427, "children": [1442], "start_point": {"row": 279, "column": 2}, "end_point": {"row": 279, "column": 14}}, {"id": 1442, "type": "null", "text": "NULL", "parent": 1441, "children": [1443], "start_point": {"row": 279, "column": 9}, "end_point": {"row": 279, "column": 13}}, {"id": 1443, "type": "NULL", "text": "NULL", "parent": 1442, "children": [], "start_point": {"row": 279, "column": 9}, "end_point": {"row": 279, "column": 13}}, {"id": 1444, "type": "return_statement", "text": "return file_getbuffer (ms);", "parent": 1393, "children": [1445], "start_point": {"row": 281, "column": 1}, "end_point": {"row": 281, "column": 28}}, {"id": 1445, "type": "call_expression", "text": "file_getbuffer (ms)", "parent": 1444, "children": [1446, 1447], "start_point": {"row": 281, "column": 8}, "end_point": {"row": 281, "column": 27}}, {"id": 1446, "type": "identifier", "text": "file_getbuffer", "parent": 1445, "children": [], "start_point": {"row": 281, "column": 8}, "end_point": {"row": 281, "column": 22}}, {"id": 1447, "type": "argument_list", "text": "(ms)", "parent": 1445, "children": [1448], "start_point": {"row": 281, "column": 23}, "end_point": {"row": 281, "column": 27}}, {"id": 1448, "type": "identifier", "text": "ms", "parent": 1447, "children": [], "start_point": {"row": 281, "column": 24}, "end_point": {"row": 281, "column": 26}}, {"id": 1449, "type": "function_definition", "text": "R_API const char *r_magic_error(RMagic *ms) {\n\tif (ms && ms->haderr) {\n\t\treturn ms->o.buf;\n\t}\n\treturn NULL;\n}", "parent": 786, "children": [1450, 1451, 1453], "start_point": {"row": 284, "column": 0}, "end_point": {"row": 289, "column": 1}}, {"id": 1450, "type": "type_identifier", "text": "R_API", "parent": 1449, "children": [], "start_point": {"row": 284, "column": 0}, "end_point": {"row": 284, "column": 5}}, {"id": 1451, "type": "ERROR", "text": "char", "parent": 1449, "children": [1452], "start_point": {"row": 284, "column": 12}, "end_point": {"row": 284, "column": 16}}, {"id": 1452, "type": "identifier", "text": "char", "parent": 1451, "children": [], "start_point": {"row": 284, "column": 12}, "end_point": {"row": 284, "column": 16}}, {"id": 1453, "type": "pointer_declarator", "text": "*r_magic_error(RMagic *ms)", "parent": 1449, "children": [1454, 1455], "start_point": {"row": 284, "column": 17}, "end_point": {"row": 284, "column": 43}}, {"id": 1454, "type": "*", "text": "*", "parent": 1453, "children": [], "start_point": {"row": 284, "column": 17}, "end_point": {"row": 284, "column": 18}}, {"id": 1455, "type": "function_declarator", "text": "r_magic_error(RMagic *ms)", "parent": 1453, "children": [1456, 1457], "start_point": {"row": 284, "column": 18}, "end_point": {"row": 284, "column": 43}}, {"id": 1456, "type": "identifier", "text": "r_magic_error", "parent": 1455, "children": [], "start_point": {"row": 284, "column": 18}, "end_point": {"row": 284, "column": 31}}, {"id": 1457, "type": "parameter_list", "text": "(RMagic *ms)", "parent": 1455, "children": [1458], "start_point": {"row": 284, "column": 31}, "end_point": {"row": 284, "column": 43}}, {"id": 1458, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 1457, "children": [1459, 1460], "start_point": {"row": 284, "column": 32}, "end_point": {"row": 284, "column": 42}}, {"id": 1459, "type": "type_identifier", "text": "RMagic", "parent": 1458, "children": [], "start_point": {"row": 284, "column": 32}, "end_point": {"row": 284, "column": 38}}, {"id": 1460, "type": "pointer_declarator", "text": "*ms", "parent": 1458, "children": [1461, 1462], "start_point": {"row": 284, "column": 39}, "end_point": {"row": 284, "column": 42}}, {"id": 1461, "type": "*", "text": "*", "parent": 1460, "children": [], "start_point": {"row": 284, "column": 39}, "end_point": {"row": 284, "column": 40}}, {"id": 1462, "type": "identifier", "text": "ms", "parent": 1460, "children": [], "start_point": {"row": 284, "column": 40}, "end_point": {"row": 284, "column": 42}}, {"id": 1463, "type": "if_statement", "text": "if (ms && ms->haderr) {\n\t\treturn ms->o.buf;\n\t}", "parent": 1449, "children": [1464], "start_point": {"row": 285, "column": 1}, "end_point": {"row": 287, "column": 2}}, {"id": 1464, "type": "parenthesized_expression", "text": "(ms && ms->haderr)", "parent": 1463, "children": [1465], "start_point": {"row": 285, "column": 4}, "end_point": {"row": 285, "column": 22}}, {"id": 1465, "type": "binary_expression", "text": "ms && ms->haderr", "parent": 1464, "children": [1466, 1467, 1468], "start_point": {"row": 285, "column": 5}, "end_point": {"row": 285, "column": 21}}, {"id": 1466, "type": "identifier", "text": "ms", "parent": 1465, "children": [], "start_point": {"row": 285, "column": 5}, "end_point": {"row": 285, "column": 7}}, {"id": 1467, "type": "&&", "text": "&&", "parent": 1465, "children": [], "start_point": {"row": 285, "column": 8}, "end_point": {"row": 285, "column": 10}}, {"id": 1468, "type": "field_expression", "text": "ms->haderr", "parent": 1465, "children": [1469, 1470], "start_point": {"row": 285, "column": 11}, "end_point": {"row": 285, "column": 21}}, {"id": 1469, "type": "identifier", "text": "ms", "parent": 1468, "children": [], "start_point": {"row": 285, "column": 11}, "end_point": {"row": 285, "column": 13}}, {"id": 1470, "type": "field_identifier", "text": "haderr", "parent": 1468, "children": [], "start_point": {"row": 285, "column": 15}, "end_point": {"row": 285, "column": 21}}, {"id": 1471, "type": "return_statement", "text": "return ms->o.buf;", "parent": 1463, "children": [1472], "start_point": {"row": 286, "column": 2}, "end_point": {"row": 286, "column": 19}}, {"id": 1472, "type": "field_expression", "text": "ms->o.buf", "parent": 1471, "children": [1473, 1476], "start_point": {"row": 286, "column": 9}, "end_point": {"row": 286, "column": 18}}, {"id": 1473, "type": "field_expression", "text": "ms->o", "parent": 1472, "children": [1474, 1475], "start_point": {"row": 286, "column": 9}, "end_point": {"row": 286, "column": 14}}, {"id": 1474, "type": "identifier", "text": "ms", "parent": 1473, "children": [], "start_point": {"row": 286, "column": 9}, "end_point": {"row": 286, "column": 11}}, {"id": 1475, "type": "field_identifier", "text": "o", "parent": 1473, "children": [], "start_point": {"row": 286, "column": 13}, "end_point": {"row": 286, "column": 14}}, {"id": 1476, "type": "field_identifier", "text": "buf", "parent": 1472, "children": [], "start_point": {"row": 286, "column": 15}, "end_point": {"row": 286, "column": 18}}, {"id": 1477, "type": "return_statement", "text": "return NULL;", "parent": 1449, "children": [1478], "start_point": {"row": 288, "column": 1}, "end_point": {"row": 288, "column": 13}}, {"id": 1478, "type": "null", "text": "NULL", "parent": 1477, "children": [1479], "start_point": {"row": 288, "column": 8}, "end_point": {"row": 288, "column": 12}}, {"id": 1479, "type": "NULL", "text": "NULL", "parent": 1478, "children": [], "start_point": {"row": 288, "column": 8}, "end_point": {"row": 288, "column": 12}}, {"id": 1480, "type": "function_definition", "text": "R_API int r_magic_errno(RMagic *ms) {\n\tif (ms && ms->haderr) {\n\t\treturn ms->error;\n\t}\n\treturn 0;\n}", "parent": 786, "children": [1481, 1482, 1484], "start_point": {"row": 291, "column": 0}, "end_point": {"row": 296, "column": 1}}, {"id": 1481, "type": "type_identifier", "text": "R_API", "parent": 1480, "children": [], "start_point": {"row": 291, "column": 0}, "end_point": {"row": 291, "column": 5}}, {"id": 1482, "type": "ERROR", "text": "int", "parent": 1480, "children": [1483], "start_point": {"row": 291, "column": 6}, "end_point": {"row": 291, "column": 9}}, {"id": 1483, "type": "identifier", "text": "int", "parent": 1482, "children": [], "start_point": {"row": 291, "column": 6}, "end_point": {"row": 291, "column": 9}}, {"id": 1484, "type": "function_declarator", "text": "r_magic_errno(RMagic *ms)", "parent": 1480, "children": [1485, 1486], "start_point": {"row": 291, "column": 10}, "end_point": {"row": 291, "column": 35}}, {"id": 1485, "type": "identifier", "text": "r_magic_errno", "parent": 1484, "children": [], "start_point": {"row": 291, "column": 10}, "end_point": {"row": 291, "column": 23}}, {"id": 1486, "type": "parameter_list", "text": "(RMagic *ms)", "parent": 1484, "children": [1487], "start_point": {"row": 291, "column": 23}, "end_point": {"row": 291, "column": 35}}, {"id": 1487, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 1486, "children": [1488, 1489], "start_point": {"row": 291, "column": 24}, "end_point": {"row": 291, "column": 34}}, {"id": 1488, "type": "type_identifier", "text": "RMagic", "parent": 1487, "children": [], "start_point": {"row": 291, "column": 24}, "end_point": {"row": 291, "column": 30}}, {"id": 1489, "type": "pointer_declarator", "text": "*ms", "parent": 1487, "children": [1490, 1491], "start_point": {"row": 291, "column": 31}, "end_point": {"row": 291, "column": 34}}, {"id": 1490, "type": "*", "text": "*", "parent": 1489, "children": [], "start_point": {"row": 291, "column": 31}, "end_point": {"row": 291, "column": 32}}, {"id": 1491, "type": "identifier", "text": "ms", "parent": 1489, "children": [], "start_point": {"row": 291, "column": 32}, "end_point": {"row": 291, "column": 34}}, {"id": 1492, "type": "if_statement", "text": "if (ms && ms->haderr) {\n\t\treturn ms->error;\n\t}", "parent": 1480, "children": [1493], "start_point": {"row": 292, "column": 1}, "end_point": {"row": 294, "column": 2}}, {"id": 1493, "type": "parenthesized_expression", "text": "(ms && ms->haderr)", "parent": 1492, "children": [1494], "start_point": {"row": 292, "column": 4}, "end_point": {"row": 292, "column": 22}}, {"id": 1494, "type": "binary_expression", "text": "ms && ms->haderr", "parent": 1493, "children": [1495, 1496, 1497], "start_point": {"row": 292, "column": 5}, "end_point": {"row": 292, "column": 21}}, {"id": 1495, "type": "identifier", "text": "ms", "parent": 1494, "children": [], "start_point": {"row": 292, "column": 5}, "end_point": {"row": 292, "column": 7}}, {"id": 1496, "type": "&&", "text": "&&", "parent": 1494, "children": [], "start_point": {"row": 292, "column": 8}, "end_point": {"row": 292, "column": 10}}, {"id": 1497, "type": "field_expression", "text": "ms->haderr", "parent": 1494, "children": [1498, 1499], "start_point": {"row": 292, "column": 11}, "end_point": {"row": 292, "column": 21}}, {"id": 1498, "type": "identifier", "text": "ms", "parent": 1497, "children": [], "start_point": {"row": 292, "column": 11}, "end_point": {"row": 292, "column": 13}}, {"id": 1499, "type": "field_identifier", "text": "haderr", "parent": 1497, "children": [], "start_point": {"row": 292, "column": 15}, "end_point": {"row": 292, "column": 21}}, {"id": 1500, "type": "return_statement", "text": "return ms->error;", "parent": 1492, "children": [1501], "start_point": {"row": 293, "column": 2}, "end_point": {"row": 293, "column": 19}}, {"id": 1501, "type": "field_expression", "text": "ms->error", "parent": 1500, "children": [1502, 1503], "start_point": {"row": 293, "column": 9}, "end_point": {"row": 293, "column": 18}}, {"id": 1502, "type": "identifier", "text": "ms", "parent": 1501, "children": [], "start_point": {"row": 293, "column": 9}, "end_point": {"row": 293, "column": 11}}, {"id": 1503, "type": "field_identifier", "text": "error", "parent": 1501, "children": [], "start_point": {"row": 293, "column": 13}, "end_point": {"row": 293, "column": 18}}, {"id": 1504, "type": "return_statement", "text": "return 0;", "parent": 1480, "children": [1505], "start_point": {"row": 295, "column": 1}, "end_point": {"row": 295, "column": 10}}, {"id": 1505, "type": "number_literal", "text": "0", "parent": 1504, "children": [], "start_point": {"row": 295, "column": 8}, "end_point": {"row": 295, "column": 9}}, {"id": 1506, "type": "function_definition", "text": "R_API void r_magic_setflags(RMagic *ms, int flags) {\n\tif (ms) {\n\t\tms->flags = flags;\n\t}\n}", "parent": 786, "children": [1507, 1508, 1510], "start_point": {"row": 298, "column": 0}, "end_point": {"row": 302, "column": 1}}, {"id": 1507, "type": "type_identifier", "text": "R_API", "parent": 1506, "children": [], "start_point": {"row": 298, "column": 0}, "end_point": {"row": 298, "column": 5}}, {"id": 1508, "type": "ERROR", "text": "void", "parent": 1506, "children": [1509], "start_point": {"row": 298, "column": 6}, "end_point": {"row": 298, "column": 10}}, {"id": 1509, "type": "identifier", "text": "void", "parent": 1508, "children": [], "start_point": {"row": 298, "column": 6}, "end_point": {"row": 298, "column": 10}}, {"id": 1510, "type": "function_declarator", "text": "r_magic_setflags(RMagic *ms, int flags)", "parent": 1506, "children": [1511, 1512], "start_point": {"row": 298, "column": 11}, "end_point": {"row": 298, "column": 50}}, {"id": 1511, "type": "identifier", "text": "r_magic_setflags", "parent": 1510, "children": [], "start_point": {"row": 298, "column": 11}, "end_point": {"row": 298, "column": 27}}, {"id": 1512, "type": "parameter_list", "text": "(RMagic *ms, int flags)", "parent": 1510, "children": [1513, 1518], "start_point": {"row": 298, "column": 27}, "end_point": {"row": 298, "column": 50}}, {"id": 1513, "type": "parameter_declaration", "text": "RMagic *ms", "parent": 1512, "children": [1514, 1515], "start_point": {"row": 298, "column": 28}, "end_point": {"row": 298, "column": 38}}, {"id": 1514, "type": "type_identifier", "text": "RMagic", "parent": 1513, "children": [], "start_point": {"row": 298, "column": 28}, "end_point": {"row": 298, "column": 34}}, {"id": 1515, "type": "pointer_declarator", "text": "*ms", "parent": 1513, "children": [1516, 1517], "start_point": {"row": 298, "column": 35}, "end_point": {"row": 298, "column": 38}}, {"id": 1516, "type": "*", "text": "*", "parent": 1515, "children": [], "start_point": {"row": 298, "column": 35}, "end_point": {"row": 298, "column": 36}}, {"id": 1517, "type": "identifier", "text": "ms", "parent": 1515, "children": [], "start_point": {"row": 298, "column": 36}, "end_point": {"row": 298, "column": 38}}, {"id": 1518, "type": "parameter_declaration", "text": "int flags", "parent": 1512, "children": [1519, 1520], "start_point": {"row": 298, "column": 40}, "end_point": {"row": 298, "column": 49}}, {"id": 1519, "type": "primitive_type", "text": "int", "parent": 1518, "children": [], "start_point": {"row": 298, "column": 40}, "end_point": {"row": 298, "column": 43}}, {"id": 1520, "type": "identifier", "text": "flags", "parent": 1518, "children": [], "start_point": {"row": 298, "column": 44}, "end_point": {"row": 298, "column": 49}}, {"id": 1521, "type": "if_statement", "text": "if (ms) {\n\t\tms->flags = flags;\n\t}", "parent": 1506, "children": [1522], "start_point": {"row": 299, "column": 1}, "end_point": {"row": 301, "column": 2}}, {"id": 1522, "type": "parenthesized_expression", "text": "(ms)", "parent": 1521, "children": [1523], "start_point": {"row": 299, "column": 4}, "end_point": {"row": 299, "column": 8}}, {"id": 1523, "type": "identifier", "text": "ms", "parent": 1522, "children": [], "start_point": {"row": 299, "column": 5}, "end_point": {"row": 299, "column": 7}}, {"id": 1524, "type": "assignment_expression", "text": "ms->flags = flags", "parent": 1521, "children": [1525, 1528, 1529], "start_point": {"row": 300, "column": 2}, "end_point": {"row": 300, "column": 19}}, {"id": 1525, "type": "field_expression", "text": "ms->flags", "parent": 1524, "children": [1526, 1527], "start_point": {"row": 300, "column": 2}, "end_point": {"row": 300, "column": 11}}, {"id": 1526, "type": "identifier", "text": "ms", "parent": 1525, "children": [], "start_point": {"row": 300, "column": 2}, "end_point": {"row": 300, "column": 4}}, {"id": 1527, "type": "field_identifier", "text": "flags", "parent": 1525, "children": [], "start_point": {"row": 300, "column": 6}, "end_point": {"row": 300, "column": 11}}, {"id": 1528, "type": "=", "text": "=", "parent": 1524, "children": [], "start_point": {"row": 300, "column": 12}, "end_point": {"row": 300, "column": 13}}, {"id": 1529, "type": "identifier", "text": "flags", "parent": 1524, "children": [], "start_point": {"row": 300, "column": 14}, "end_point": {"row": 300, "column": 19}}, {"id": 1530, "type": "#endif", "text": "#endif", "parent": 786, "children": [], "start_point": {"row": 303, "column": 0}, "end_point": {"row": 303, "column": 6}}]}, "node_categories": {"declarations": {"functions": [19, 25, 35, 59, 65, 76, 80, 95, 101, 120, 126, 143, 149, 172, 178, 191, 195, 211, 215, 237, 241, 263, 267, 289, 293, 328, 330, 410, 412, 491, 493, 529, 967, 973, 1090, 1094, 1139, 1143, 1207, 1211, 1258, 1262, 1300, 1304, 1342, 1348, 1367, 1373, 1393, 1399, 1449, 1455, 1480, 1484, 1506, 1510], "variables": [68, 83, 104, 109, 129, 134, 152, 157, 162, 181, 198, 203, 218, 223, 244, 249, 270, 275, 296, 333, 340, 364, 376, 415, 420, 496, 501, 506, 509, 532, 537, 542, 545, 551, 557, 564, 569, 668, 792, 976, 979, 1097, 1146, 1151, 1167, 1214, 1219, 1224, 1265, 1270, 1275, 1307, 1312, 1317, 1351, 1356, 1376, 1381, 1402, 1407, 1412, 1458, 1487, 1513, 1518], "classes": [334, 335, 341, 342, 365, 366, 377, 378, 510, 511, 565, 566, 1168, 1169, 1225, 1226, 1276, 1277, 1318, 1319], "imports": [0, 1, 3, 4, 13, 14, 16, 17, 50, 51, 307, 308], "modules": [], "enums": []}, "statements": {"expressions": [6, 72, 89, 91, 115, 138, 166, 187, 206, 229, 230, 255, 256, 281, 282, 302, 348, 349, 357, 360, 373, 385, 388, 392, 395, 398, 406, 426, 427, 431, 432, 433, 443, 444, 448, 449, 450, 460, 461, 466, 467, 468, 478, 479, 480, 517, 518, 522, 580, 581, 583, 587, 590, 598, 599, 600, 611, 612, 617, 640, 641, 645, 646, 647, 648, 652, 657, 660, 673, 677, 678, 679, 680, 684, 689, 692, 713, 714, 715, 719, 726, 732, 733, 734, 738, 757, 758, 759, 763, 773, 776, 779, 790, 799, 800, 801, 805, 809, 814, 815, 818, 821, 822, 833, 834, 841, 842, 847, 848, 849, 853, 872, 873, 874, 878, 882, 891, 905, 908, 911, 918, 919, 920, 927, 942, 946, 952, 956, 961, 986, 991, 992, 998, 1004, 1005, 1011, 1012, 1020, 1021, 1026, 1029, 1030, 1032, 1033, 1040, 1041, 1042, 1044, 1045, 1050, 1051, 1053, 1054, 1058, 1065, 1070, 1077, 1083, 1103, 1105, 1108, 1111, 1114, 1115, 1119, 1122, 1123, 1127, 1130, 1131, 1135, 1157, 1158, 1159, 1176, 1183, 1185, 1188, 1192, 1200, 1233, 1240, 1242, 1245, 1249, 1284, 1290, 1295, 1326, 1332, 1337, 1360, 1387, 1416, 1417, 1418, 1428, 1429, 1430, 1445, 1464, 1465, 1468, 1472, 1473, 1493, 1494, 1497, 1501, 1522, 1525], "assignments": [354, 402, 584, 632, 663, 699, 704, 708, 716, 746, 760, 770, 802, 828, 861, 875, 936, 1003, 1010, 1019, 1031, 1069, 1076, 1082, 1191, 1248, 1524], "loops": [353, 798], "conditionals": [7, 9, 10, 11, 12, 21, 23, 27, 29, 33, 37, 39, 43, 45, 47, 48, 58, 60, 62, 66, 70, 73, 75, 77, 79, 81, 84, 87, 88, 90, 92, 94, 96, 98, 102, 105, 108, 113, 116, 118, 119, 121, 123, 127, 130, 133, 136, 139, 141, 142, 144, 146, 150, 153, 156, 161, 164, 167, 169, 170, 171, 173, 175, 179, 182, 185, 188, 190, 192, 194, 196, 199, 202, 205, 207, 209, 210, 212, 214, 216, 219, 222, 227, 231, 233, 234, 238, 240, 242, 245, 248, 253, 257, 259, 260, 264, 266, 268, 271, 274, 279, 283, 285, 286, 290, 292, 294, 297, 300, 303, 305, 310, 311, 312, 313, 314, 315, 318, 324, 326, 327, 331, 336, 339, 343, 346, 347, 351, 355, 358, 359, 361, 363, 367, 371, 374, 375, 379, 383, 386, 387, 389, 391, 393, 394, 396, 397, 399, 401, 403, 405, 407, 409, 413, 416, 419, 421, 424, 425, 428, 430, 434, 436, 442, 445, 447, 451, 453, 459, 462, 464, 465, 469, 471, 477, 481, 483, 494, 497, 500, 505, 508, 512, 515, 516, 519, 523, 525, 530, 533, 536, 541, 544, 548, 554, 558, 563, 567, 568, 572, 577, 579, 585, 588, 591, 593, 597, 601, 603, 608, 609, 610, 613, 615, 616, 618, 619, 620, 624, 625, 626, 630, 633, 638, 639, 643, 644, 649, 651, 653, 658, 661, 662, 664, 671, 674, 675, 676, 681, 683, 685, 690, 693, 694, 695, 696, 697, 700, 702, 703, 705, 709, 712, 717, 720, 722, 723, 727, 731, 735, 737, 739, 740, 745, 747, 752, 753, 754, 755, 756, 761, 764, 766, 767, 771, 775, 780, 782, 783, 784, 785, 786, 787, 788, 789, 791, 795, 803, 806, 808, 816, 817, 823, 825, 829, 831, 832, 835, 837, 840, 843, 846, 850, 852, 854, 855, 860, 862, 867, 871, 876, 879, 881, 887, 888, 892, 894, 895, 897, 900, 901, 902, 903, 904, 909, 912, 914, 916, 917, 921, 923, 924, 925, 926, 930, 935, 937, 941, 943, 945, 947, 949, 950, 951, 953, 955, 957, 962, 964, 968, 970, 974, 978, 980, 984, 987, 989, 990, 994, 999, 1001, 1002, 1006, 1007, 1008, 1013, 1014, 1015, 1022, 1023, 1024, 1027, 1034, 1035, 1036, 1046, 1047, 1048, 1049, 1055, 1056, 1057, 1059, 1061, 1066, 1068, 1071, 1072, 1078, 1079, 1084, 1085, 1089, 1091, 1093, 1095, 1098, 1101, 1102, 1104, 1106, 1109, 1110, 1112, 1116, 1117, 1118, 1120, 1124, 1125, 1126, 1128, 1132, 1133, 1134, 1136, 1138, 1140, 1142, 1144, 1147, 1150, 1155, 1156, 1161, 1170, 1174, 1177, 1179, 1180, 1181, 1182, 1184, 1186, 1189, 1190, 1193, 1194, 1196, 1201, 1208, 1210, 1212, 1215, 1218, 1223, 1227, 1231, 1234, 1236, 1237, 1238, 1239, 1241, 1243, 1246, 1247, 1250, 1251, 1253, 1259, 1261, 1263, 1266, 1269, 1274, 1278, 1282, 1285, 1287, 1288, 1289, 1291, 1293, 1296, 1301, 1303, 1305, 1308, 1311, 1316, 1320, 1324, 1327, 1329, 1330, 1331, 1333, 1335, 1338, 1343, 1345, 1349, 1352, 1355, 1358, 1361, 1363, 1366, 1368, 1370, 1374, 1377, 1380, 1385, 1388, 1390, 1391, 1394, 1396, 1400, 1403, 1406, 1411, 1414, 1415, 1419, 1421, 1427, 1431, 1433, 1437, 1438, 1446, 1448, 1450, 1452, 1456, 1459, 1462, 1463, 1466, 1469, 1470, 1474, 1475, 1476, 1481, 1483, 1485, 1488, 1491, 1492, 1495, 1498, 1499, 1502, 1503, 1507, 1509, 1511, 1514, 1517, 1520, 1521, 1523, 1526, 1527, 1529, 1530], "returns": [71, 114, 137, 165, 186, 228, 254, 280, 301, 352, 440, 457, 475, 487, 489, 594, 954, 995, 1062, 1088, 1197, 1205, 1254, 1256, 1294, 1336, 1359, 1386, 1424, 1441, 1444, 1471, 1477, 1500, 1504], "exceptions": []}, "expressions": {"calls": [53, 869], "literals": [2, 5, 15, 18, 52, 236, 262, 288, 309, 429, 437, 439, 441, 446, 454, 456, 458, 472, 474, 476, 484, 486, 488, 490, 521, 556, 574, 605, 621, 627, 635, 655, 687, 711, 725, 729, 742, 749, 769, 797, 827, 845, 857, 864, 890, 896, 915, 932, 939, 959, 1038, 1081, 1087, 1163, 1203, 1392, 1423, 1434, 1440, 1505], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 19, "universal_type": "function", "name": "unknown", "text_snippet": "# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)\n"}, {"node_id": 25, "universal_type": "function", "name": "unknown", "text_snippet": "# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)\n"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "# define S_ISFIFO(m) (((m) & S_IFIFO) == S_IFIFO)\n"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "R_API RMagic* r_magic_new(int flags) { return magic_open (flags); }"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_new(int flags)"}, {"node_id": 76, "universal_type": "function", "name": "r_magic_free", "text_snippet": "R_API void r_magic_free(RMagic* m) { if (m) { magic_close (m); } }"}, {"node_id": 80, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_free(RMagic* m)"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "R_API const char *r_magic_file(RMagic* m, const char * f) { return magic_file (m, f); }"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_file(RMagic* m, const char * f)"}, {"node_id": 120, "universal_type": "function", "name": "fd)", "text_snippet": "R_API const char *r_magic_descriptor(RMagic* m, int fd) { return magic_descriptor (m, fd); }"}, {"node_id": 126, "universal_type": "function", "name": "fd)", "text_snippet": "r_magic_descriptor(RMagic* m, int fd)"}, {"node_id": 143, "universal_type": "function", "name": "*b,", "text_snippet": "R_API const char *r_magic_buffer(RMagic* m, const void *b, size_t s) { return magic_buffer (m, b, s)"}, {"node_id": 149, "universal_type": "function", "name": "*b,", "text_snippet": "r_magic_buffer(RMagic* m, const void *b, size_t s)"}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "R_API const char *r_magic_error(RMagic* m) { return magic_error (m); }"}, {"node_id": 178, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_error(RMagic* m)"}, {"node_id": 191, "universal_type": "function", "name": "r_magic_setflags", "text_snippet": "R_API void r_magic_setflags(RMagic* m, int f) { magic_setflags (m, f); }"}, {"node_id": 195, "universal_type": "function", "name": "f)", "text_snippet": "r_magic_setflags(RMagic* m, int f)"}, {"node_id": 211, "universal_type": "function", "name": "r_magic_load", "text_snippet": "R_API bool r_magic_load(RMagic* m, const char *f) { return magic_load (m, f) != -1; }"}, {"node_id": 215, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_load(RMagic* m, const char *f)"}, {"node_id": 237, "universal_type": "function", "name": "r_magic_compile", "text_snippet": "R_API bool r_magic_compile(RMagic* m, const char *x) { return magic_compile (m, x) != -1; }"}, {"node_id": 241, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_compile(RMagic* m, const char *x)"}, {"node_id": 263, "universal_type": "function", "name": "r_magic_check", "text_snippet": "R_API bool r_magic_check(RMagic* m, const char *x) { return magic_check (m, x) != -1; }"}, {"node_id": 267, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_check(RMagic* m, const char *x)"}, {"node_id": 289, "universal_type": "function", "name": "r_magic_errno", "text_snippet": "R_API int r_magic_errno(RMagic* m) { return magic_errno (m); }"}, {"node_id": 293, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_errno(RMagic* m)"}, {"node_id": 328, "universal_type": "function", "name": "free_mlist", "text_snippet": "static void free_mlist(struct mlist *mlist) {\n\tstruct mlist *ml;\n\tif (!mlist) {\n\t\treturn;\n\t}\n\tfor (m"}, {"node_id": 330, "universal_type": "function", "name": "unknown", "text_snippet": "free_mlist(struct mlist *mlist)"}, {"node_id": 410, "universal_type": "function", "name": "info_from_stat", "text_snippet": "static int info_from_stat(RMagic *ms, unsigned short md) {\n\t/* We cannot open it, but we were able t"}, {"node_id": 412, "universal_type": "function", "name": "unknown", "text_snippet": "info_from_stat(RMagic *ms, unsigned short md)"}, {"node_id": 491, "universal_type": "function", "name": "close_and_restore", "text_snippet": "static void close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb) {\n"}, {"node_id": 493, "universal_type": "function", "name": "fd,", "text_snippet": "close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb)"}, {"node_id": 529, "universal_type": "function", "name": "fd)", "text_snippet": "file_or_fd(RMagic *ms, const char *inname, int fd)"}, {"node_id": 967, "universal_type": "function", "name": "unknown", "text_snippet": "R_API RMagic* r_magic_new(int flags) {\n\tRMagic *ms = R_NEW0 (RMagic);\n\tif (!ms) {\n\t\treturn NULL;\n\t}\n"}, {"node_id": 973, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_new(int flags)"}, {"node_id": 1090, "universal_type": "function", "name": "r_magic_free", "text_snippet": "R_API void r_magic_free(RMagic *ms) {\n\tif (ms) {\n\t\tfree_mlist (ms->mlist);\n\t\tfree (ms->o.pbuf);\n\t\tfr"}, {"node_id": 1094, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_free(RMagic *ms)"}, {"node_id": 1139, "universal_type": "function", "name": "r_magic_load_buffer", "text_snippet": "R_API bool r_magic_load_buffer(RMagic* ms, const char *magicdata) {\n\tif (*magicdata == '#') {\n\t\tstru"}, {"node_id": 1143, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_load_buffer(RMagic* ms, const char *magicdata)"}, {"node_id": 1207, "universal_type": "function", "name": "r_magic_load", "text_snippet": "R_API bool r_magic_load(RMagic* ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms"}, {"node_id": 1211, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_load(RMagic* ms, const char *magicfile)"}, {"node_id": 1258, "universal_type": "function", "name": "r_magic_compile", "text_snippet": "R_API bool r_magic_compile(RMagic *ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice "}, {"node_id": 1262, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_compile(RMagic *ms, const char *magicfile)"}, {"node_id": 1300, "universal_type": "function", "name": "r_magic_check", "text_snippet": "R_API bool r_magic_check(RMagic *ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (m"}, {"node_id": 1304, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_check(RMagic *ms, const char *magicfile)"}, {"node_id": 1342, "universal_type": "function", "name": "fd)", "text_snippet": "R_API const char* r_magic_descriptor(RMagic *ms, int fd) {\n\treturn file_or_fd (ms, NULL, fd);\n}"}, {"node_id": 1348, "universal_type": "function", "name": "fd)", "text_snippet": "r_magic_descriptor(RMagic *ms, int fd)"}, {"node_id": 1367, "universal_type": "function", "name": "unknown", "text_snippet": "R_API const char * r_magic_file(RMagic *ms, const char *inname) {\n\treturn file_or_fd (ms, inname, 0)"}, {"node_id": 1373, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_file(RMagic *ms, const char *inname)"}, {"node_id": 1393, "universal_type": "function", "name": "*buf,", "text_snippet": "R_API const char * r_magic_buffer(RMagic *ms, const void *buf, size_t nb) {\n\tif (file_reset (ms) == "}, {"node_id": 1399, "universal_type": "function", "name": "*buf,", "text_snippet": "r_magic_buffer(RMagic *ms, const void *buf, size_t nb)"}, {"node_id": 1449, "universal_type": "function", "name": "unknown", "text_snippet": "R_API const char *r_magic_error(RMagic *ms) {\n\tif (ms && ms->haderr) {\n\t\treturn ms->o.buf;\n\t}\n\tretur"}, {"node_id": 1455, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_error(RMagic *ms)"}, {"node_id": 1480, "universal_type": "function", "name": "r_magic_errno", "text_snippet": "R_API int r_magic_errno(RMagic *ms) {\n\tif (ms && ms->haderr) {\n\t\treturn ms->error;\n\t}\n\treturn 0;\n}"}, {"node_id": 1484, "universal_type": "function", "name": "unknown", "text_snippet": "r_magic_errno(RMagic *ms)"}, {"node_id": 1506, "universal_type": "function", "name": "r_magic_setflags", "text_snippet": "R_API void r_magic_setflags(RMagic *ms, int flags) {\n\tif (ms) {\n\t\tms->flags = flags;\n\t}\n}"}, {"node_id": 1510, "universal_type": "function", "name": "flags)", "text_snippet": "r_magic_setflags(RMagic *ms, int flags)"}], "class_declarations": [{"node_id": 334, "universal_type": "class", "name": "mlist", "text_snippet": "struct mlist"}, {"node_id": 335, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 341, "universal_type": "class", "name": "mlist", "text_snippet": "struct mlist"}, {"node_id": 342, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 365, "universal_type": "class", "name": "mlist", "text_snippet": "struct mlist"}, {"node_id": 366, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 377, "universal_type": "class", "name": "r_magic", "text_snippet": "struct r_magic"}, {"node_id": 378, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 510, "universal_type": "class", "name": "stat", "text_snippet": "struct stat"}, {"node_id": 511, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 565, "universal_type": "class", "name": "stat", "text_snippet": "struct stat"}, {"node_id": 566, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 1168, "universal_type": "class", "name": "mlist", "text_snippet": "struct mlist"}, {"node_id": 1169, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 1225, "universal_type": "class", "name": "mlist", "text_snippet": "struct mlist"}, {"node_id": 1226, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 1276, "universal_type": "class", "name": "mlist", "text_snippet": "struct mlist"}, {"node_id": 1277, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 1318, "universal_type": "class", "name": "mlist", "text_snippet": "struct mlist"}, {"node_id": 1319, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <r_userconf.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <r_magic.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 13, "text": "# include <io.h>\n"}, {"node_id": 14, "text": "# include"}, {"node_id": 16, "text": "# include <sys\\stat.h>\n"}, {"node_id": 17, "text": "# include"}, {"node_id": 50, "text": "#include <magic.h>\n"}, {"node_id": 51, "text": "#include"}, {"node_id": 307, "text": "#include \"file.h\"\n"}, {"node_id": 308, "text": "#include"}]}, "original_source_code": "/* radare - Copyright 2011-2019 pancake<nop<EMAIL>> */\n/* $OpenBSD: magic.c,v 1.8 2009/10/27 23:59:37 deraadt Exp $ */\n\n#include <r_userconf.h>\n#include <r_magic.h>\n\nR_LIB_VERSION (r_magic);\n\n#ifdef _MSC_VER\n# include <io.h>\n# include <sys\\stat.h>\n# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)\n# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)\n# define S_IFIFO (-1)\n# define S_ISFIFO(m) (((m) & S_IFIFO) == S_IFIFO)\n# define MAXPATHLEN 255\n#endif\n\n#if USE_LIB_MAGIC\n\n// we keep this code just to make debian happy, but we should use\n// our own magic implementation for consistency reasons\n#include <magic.h>\n#undef R_API\n#define R_API\n\nR_API RMagic* r_magic_new(int flags) { return magic_open (flags); }\nR_API void r_magic_free(RMagic* m) { if (m) { magic_close (m); } }\nR_API const char *r_magic_file(RMagic* m, const char * f) { return magic_file (m, f); } \nR_API const char *r_magic_descriptor(RMagic* m, int fd) { return magic_descriptor (m, fd); }\nR_API const char *r_magic_buffer(RMagic* m, const void *b, size_t s) { return magic_buffer (m, b, s); }\nR_API const char *r_magic_error(RMagic* m) { return magic_error (m); }\nR_API void r_magic_setflags(RMagic* m, int f) { magic_setflags (m, f); }\nR_API bool r_magic_load(RMagic* m, const char *f) { return magic_load (m, f) != -1; }\nR_API bool r_magic_compile(RMagic* m, const char *x) { return magic_compile (m, x) != -1; }\nR_API bool r_magic_check(RMagic* m, const char *x) { return magic_check (m, x) != -1; }\nR_API int r_magic_errno(RMagic* m) { return magic_errno (m); }\n\n#else\n\n/* use embedded magic library */\n\n#include \"file.h\"\n\n#ifndef PIPE_BUF \n/* Get the PIPE_BUF from pathconf */\n#ifdef _PC_PIPE_BUF\n#define PIPE_BUF pathconf(\".\", _PC_PIPE_BUF)\n#else\n#define PIPE_BUF 512\n#endif\n#endif\n\nstatic void free_mlist(struct mlist *mlist) {\n\tstruct mlist *ml;\n\tif (!mlist) {\n\t\treturn;\n\t}\n\tfor (ml = mlist->next; ml != mlist;) {\n\t\tstruct mlist *next = ml->next;\n\t\tstruct r_magic *mg = ml->magic;\n\t\tfile_delmagic (mg, ml->mapped, ml->nmagic);\n\t\tfree (ml);\n\t\tml = next;\n\t}\n\tfree (ml);\n}\n\nstatic int info_from_stat(RMagic *ms, unsigned short md) {\n\t/* We cannot open it, but we were able to stat it. */\n\tif (md & 0222) {\n\t\tif (file_printf (ms, \"writable, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tif (md & 0111) {\n\t\tif (file_printf (ms, \"executable, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tif (S_ISREG (md)) {\n\t\tif (file_printf (ms, \"regular file, \") == -1) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tif (file_printf (ms, \"no read permission\") == -1) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n\nstatic void close_and_restore (const RMagic *ms, const char *name, int fd, const struct stat *sb) {\n\tif (fd >= 0) {\n\t\tclose (fd);\n\t}\n}\n\nstatic const char *file_or_fd(RMagic *ms, const char *inname, int fd) {\n\tbool ispipe = false;\n\tint rv = -1;\n\tunsigned char *buf;\n\tstruct stat sb;\n\tint nbytes = 0;\t/* number of bytes read from a datafile */\n\n\t/*\n\t * one extra for terminating '\\0', and\n\t * some overlapping space for matches near EOF\n\t */\n#define SLOP (1 + sizeof(union VALUETYPE))\n\tif (!(buf = malloc (HOWMANY + SLOP))) {\n\t\treturn NULL;\n\t}\n\n\tif (file_reset (ms) == -1) {\n\t\tgoto done;\n\t}\n\n\tswitch (file_fsmagic (ms, inname, &sb)) {\n\tcase -1: goto done;\t\t/* error */\n\tcase 0:\tbreak;\t\t\t/* nothing found */\n\tdefault: rv = 0; goto done;\t/* matched it and printed type */\n\t}\n\n\tif (!inname) {\n\t\tif (fstat (fd, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n\t\t\tispipe = true;\n\t\t}\n\t} else {\n\t\tint flags = O_RDONLY|O_BINARY;\n\n\t\tif (stat (inname, &sb) == 0 && S_ISFIFO (sb.st_mode)) {\n#if O_NONBLOCK\n\t\t\tflags |= O_NONBLOCK;\n#endif\n\t\t\tispipe = true;\n\t\t}\n\t\terrno = 0;\n\t\tif ((fd = open (inname, flags)) < 0) {\n\t\t\teprintf (\"couldn't open file\\n\");\n\t\t\tif (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t\trv = 0;\n\t\t\tgoto done;\n\t\t}\n#ifdef O_NONBLOCK\n\t\tif ((flags = fcntl (fd, F_GETFL)) != -1) {\n\t\t\tflags &= ~O_NONBLOCK;\n\t\t\t(void)fcntl (fd, F_SETFL, flags);\n\t\t}\n#endif\n\t}\n\n\t/*\n\t * try looking at the first HOWMANY bytes\n\t */\n#ifdef O_NONBLOCK\n\tif (ispipe) {\n\t\tssize_t r = 0;\n\n\t\t//while ((r = sread(fd, (void *)&buf[nbytes],\n\t\twhile ((r = read(fd, (void *)&buf[nbytes],\n\t\t (size_t)(HOWMANY - nbytes))) > 0) {\n\t\t\tnbytes += r;\n\t\t\tif (r < PIPE_BUF) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (nbytes == 0) {\n\t\t\t/* We can not read it, but we were able to stat it. */\n\t\t\tif (info_from_stat (ms, sb.st_mode) == -1) {\n\t\t\t\tgoto done;\n\t\t\t}\n\t\t\trv = 0;\n\t\t\tgoto done;\n\t\t}\n\t} else {\n#endif\n\t\tif ((nbytes = read(fd, (char *)buf, HOWMANY)) == -1) {\n\t\t\tfile_error(ms, errno, \"cannot read `%s'\", inname);\n\t\t\tgoto done;\n\t\t}\n#ifdef O_NONBLOCK\n\t}\n#endif\n\n\t(void)memset (buf + nbytes, 0, SLOP); /* NUL terminate */\n\tif (file_buffer (ms, fd, inname, buf, (size_t)nbytes) == -1) {\n\t\tgoto done;\n\t}\n\trv = 0;\ndone:\n\tfree (buf);\n\tclose_and_restore (ms, inname, fd, &sb);\n\treturn rv == 0 ? file_getbuffer(ms) : NULL;\n}\n\n/* API */\n\n// TODO: reinitialize all the time\nR_API RMagic* r_magic_new(int flags) {\n\tRMagic *ms = R_NEW0 (RMagic);\n\tif (!ms) {\n\t\treturn NULL;\n\t}\n\tr_magic_setflags (ms, flags);\n\tms->o.buf = ms->o.pbuf = NULL;\n\tms->c.li = malloc ((ms->c.len = 10) * sizeof (*ms->c.li));\n\tif (!ms->c.li) {\n\t\tfree (ms);\n\t\treturn NULL;\n\t}\n\tfile_reset (ms);\n\tms->mlist = NULL;\n\tms->file = \"unknown\";\n\tms->line = 0;\n\treturn ms;\n}\n\nR_API void r_magic_free(RMagic *ms) {\n\tif (ms) {\n\t\tfree_mlist (ms->mlist);\n\t\tfree (ms->o.pbuf);\n\t\tfree (ms->o.buf);\n\t\tfree (ms->c.li);\n\t\tfree (ms);\n\t}\n}\n\nR_API bool r_magic_load_buffer(RMagic* ms, const char *magicdata) {\n\tif (*magicdata == '#') {\n\t\tstruct mlist *ml = file_apprentice (ms, magicdata, FILE_LOAD);\n\t\tif (ml) {\n\t\t\tfree_mlist (ms->mlist);\n\t\t\tms->mlist = ml;\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\teprintf (\"Magic buffers should start with #\\n\");\n\t}\n\treturn false;\n}\n\nR_API bool r_magic_load(RMagic* ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_LOAD);\n\tif (ml) {\n\t\tfree_mlist (ms->mlist);\n\t\tms->mlist = ml;\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nR_API bool r_magic_compile(RMagic *ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_COMPILE);\n\tfree_mlist (ml);\n\treturn ml != NULL;\n}\n\nR_API bool r_magic_check(RMagic *ms, const char *magicfile) {\n\tstruct mlist *ml = file_apprentice (ms, magicfile, FILE_CHECK);\n\tfree_mlist (ml);\n\treturn ml != NULL;\n}\n\nR_API const char* r_magic_descriptor(RMagic *ms, int fd) {\n\treturn file_or_fd (ms, NULL, fd);\n}\n\nR_API const char * r_magic_file(RMagic *ms, const char *inname) {\n\treturn file_or_fd (ms, inname, 0); // 0 = stdin\n}\n\nR_API const char * r_magic_buffer(RMagic *ms, const void *buf, size_t nb) {\n\tif (file_reset (ms) == -1) {\n\t\treturn NULL;\n\t}\n\tif (file_buffer (ms, -1, NULL, buf, nb) == -1) {\n\t\treturn NULL;\n\t}\n\treturn file_getbuffer (ms);\n}\n\nR_API const char *r_magic_error(RMagic *ms) {\n\tif (ms && ms->haderr) {\n\t\treturn ms->o.buf;\n\t}\n\treturn NULL;\n}\n\nR_API int r_magic_errno(RMagic *ms) {\n\tif (ms && ms->haderr) {\n\t\treturn ms->error;\n\t}\n\treturn 0;\n}\n\nR_API void r_magic_setflags(RMagic *ms, int flags) {\n\tif (ms) {\n\t\tms->flags = flags;\n\t}\n}\n#endif\n"}
80,933
c
/* * Binary object handling gear. Shit simple. * * <NAME>, <EMAIL> * * 1992 * * $Id: udb_obj.c 1.1 02/01/03 00:59:33-00:00 twouters@ $ */ #include "autoconf.h" #include "config.h" #include "externs.h" #include "udb.h" #include "udb_defs.h" #ifndef STANDALONE extern void FDECL(dump_database_internal, (int)); #endif /* Sizes, on disk, of Object and (within the object) Attribute headers */ #define OBJ_HEADER_SIZE (sizeof(Objname) + sizeof(int)) #define ATTR_HEADER_SIZE (sizeof(int) * 2) /* * Routines to get Obj's on and off disk. Obj's are stowed in a * fairly complex way: an object header with the object ID (not really * needed, but there to facilitate possible recoveries of crashed DBs), * and an attribute count. This is followed by the attributes. * * We use the standard library here, and do a lot of fread()s. * Trust your standard library. If you think this is inefficient, you have * your head up your ass. This means you, Jellan. */ Obj *objfromFILE(buff) char *buff; { int i, j; Obj *o; Attrib *a; char *bp; /* Get a new Obj struct */ if ((o = (Obj *) malloc(sizeof(Obj))) == (Obj *) 0) return ((Obj *) 0); bp = buff; /* Read in the header */ bcopy(bp, (char *) &(o->name), sizeof(Objname)); bp += sizeof(Objname); bcopy(bp, (char *) &i, sizeof(int)); bp += sizeof(int); o->at_count = i; /* Now get an array of Attrs */ a = o->atrs = (Attrib *) malloc(i * sizeof(Attrib)); if (!o->atrs) { free(o); return ((Obj *) 0); } /* Now go get the attrs, one at a time. */ for (j = 0; j < i;) { /* Attribute size */ bcopy(bp, (char *) &(a[j].size), sizeof(int)); bp += sizeof(int); /* Attribute number */ bcopy(bp, (char *) &(a[j].attrnum), sizeof(int)); bp += sizeof(int); /* get some memory for the data */ if ((a[j].data = (char *) malloc(a[j].size)) == (char *) 0) goto bail; /* Preincrement j, so we know how many to free if this next * bit fails. */ j++; /* Now get the data */ bcopy(bp, (char *) a[j - 1].data, a[j - 1].size); bp += a[j - 1].size; } /* Should be all done.. */ return (o); /* Oh shit. We gotta free up all these little bits of memory. */ bail: /* j points one attribute *beyond* what we need to free up */ for (i = 0; i < j; i++) free(a[i].data); free(a); free(o); return ((Obj *) 0); } int objtoFILE(o, buff) Obj *o; char *buff; { int i; Attrib *a; char *bp; bp = buff; /* Write out the object header */ bcopy((char *) &(o->name), bp, sizeof(Objname)); bp += sizeof(Objname); bcopy((char *) &(o->at_count), bp, sizeof(int)); bp += sizeof(int); /* Now do the attributes, one at a time. */ a = o->atrs; for (i = 0; i < o->at_count; i++) { /* Attribute size. */ bcopy((char *) &(a[i].size), bp, sizeof(int)); bp += sizeof(int); /* Attribute number */ bcopy((char *) &(a[i].attrnum), bp, sizeof(int)); bp += sizeof(int); /* Attribute data */ bcopy((char *) a[i].data, bp, a[i].size); bp += a[i].size; } return (0); } /* Return the size, on disk, the thing is going to take up. */ int obj_siz(o) Obj *o; { int i; int siz; siz = OBJ_HEADER_SIZE; for (i = 0; i < o->at_count; i++) siz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE); return (siz); }
25.57
125
(translation_unit) "/*\n * Binary object handling gear. Shit simple.\n * \n * <NAME>, <EMAIL>\n * \n * 1992\n * \n * $Id: udb_obj.c 1.1 02/01/03 00:59:33-00:00 twouters@ $\n */\n\n#include "autoconf.h"\n#include "config.h"\n#include "externs.h"\n#include "udb.h"\n#include "udb_defs.h"\n\n#ifndef STANDALONE\nextern void FDECL(dump_database_internal, (int));\n#endif\n\n/* Sizes, on disk, of Object and (within the object) Attribute headers */\n\n#define OBJ_HEADER_SIZE (sizeof(Objname) + sizeof(int))\n#define ATTR_HEADER_SIZE (sizeof(int) * 2)\n\n/*\n * Routines to get Obj's on and off disk. Obj's are stowed in a\n * fairly complex way: an object header with the object ID (not really\n * needed, but there to facilitate possible recoveries of crashed DBs),\n * and an attribute count. This is followed by the attributes.\n * \n * We use the standard library here, and do a lot of fread()s.\n * Trust your standard library. If you think this is inefficient, you have\n * your head up your ass. This means you, Jellan.\n */\n\n\nObj *objfromFILE(buff)\nchar *buff;\n{\n int i, j;\n Obj *o;\n Attrib *a;\n char *bp;\n\n /* Get a new Obj struct */\n\n if ((o = (Obj *) malloc(sizeof(Obj))) == (Obj *) 0)\n return ((Obj *) 0);\n\n bp = buff;\n\n /* Read in the header */\n\n bcopy(bp, (char *) &(o->name), sizeof(Objname));\n bp += sizeof(Objname);\n bcopy(bp, (char *) &i, sizeof(int));\n bp += sizeof(int);\n\n o->at_count = i;\n\n /* Now get an array of Attrs */\n\n a = o->atrs = (Attrib *) malloc(i * sizeof(Attrib));\n if (!o->atrs) {\n free(o);\n return ((Obj *) 0);\n }\n /* Now go get the attrs, one at a time. */\n\n for (j = 0; j < i;) {\n\n /* Attribute size */\n\n bcopy(bp, (char *) &(a[j].size), sizeof(int));\n bp += sizeof(int);\n\n /* Attribute number */\n\n bcopy(bp, (char *) &(a[j].attrnum), sizeof(int));\n bp += sizeof(int);\n\n /* get some memory for the data */\n\n if ((a[j].data = (char *) malloc(a[j].size)) == (char *) 0)\n goto bail;\n\n /* Preincrement j, so we know how many to free if this next\n * bit fails. \n */\n\n j++;\n\n /* Now get the data */\n\n bcopy(bp, (char *) a[j - 1].data, a[j - 1].size);\n bp += a[j - 1].size;\n\n }\n\n\n /* Should be all done.. */\n\n return (o);\n\n /* Oh shit. We gotta free up all these little bits of memory. */\n bail:\n /* j points one attribute *beyond* what we need to free up */\n\n for (i = 0; i < j; i++)\n free(a[i].data);\n\n free(a);\n free(o);\n\n return ((Obj *) 0);\n}\n\n\nint objtoFILE(o, buff)\nObj *o;\nchar *buff;\n{\n int i;\n Attrib *a;\n char *bp;\n\n bp = buff;\n\n /* Write out the object header */\n\n bcopy((char *) &(o->name), bp, sizeof(Objname));\n bp += sizeof(Objname);\n\n bcopy((char *) &(o->at_count), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Now do the attributes, one at a time. */\n\n a = o->atrs;\n for (i = 0; i < o->at_count; i++) {\n\n /* Attribute size. */\n\n bcopy((char *) &(a[i].size), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Attribute number */\n\n bcopy((char *) &(a[i].attrnum), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Attribute data */\n\n bcopy((char *) a[i].data, bp, a[i].size);\n bp += a[i].size;\n }\n\n return (0);\n}\n\n/* Return the size, on disk, the thing is going to take up. */\n\nint obj_siz(o)\nObj *o;\n{\n int i;\n int siz;\n\n siz = OBJ_HEADER_SIZE;\n\n for (i = 0; i < o->at_count; i++)\n siz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE);\n\n return (siz);\n}\n" (comment) "/*\n * Binary object handling gear. Shit simple.\n * \n * <NAME>, <EMAIL>\n * \n * 1992\n * \n * $Id: udb_obj.c 1.1 02/01/03 00:59:33-00:00 twouters@ $\n */" (preproc_include) "#include "autoconf.h"\n" (#include) "#include" (string_literal) ""autoconf.h"" (") """ (string_content) "autoconf.h" (") """ (preproc_include) "#include "config.h"\n" (#include) "#include" (string_literal) ""config.h"" (") """ (string_content) "config.h" (") """ (preproc_include) "#include "externs.h"\n" (#include) "#include" (string_literal) ""externs.h"" (") """ (string_content) "externs.h" (") """ (preproc_include) "#include "udb.h"\n" (#include) "#include" (string_literal) ""udb.h"" (") """ (string_content) "udb.h" (") """ (preproc_include) "#include "udb_defs.h"\n" (#include) "#include" (string_literal) ""udb_defs.h"" (") """ (string_content) "udb_defs.h" (") """ (preproc_ifdef) "#ifndef STANDALONE\nextern void FDECL(dump_database_internal, (int));\n#endif" (#ifndef) "#ifndef" (identifier) "STANDALONE" (declaration) "extern void FDECL(dump_database_internal, (int));" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "void" (function_declarator) "FDECL(dump_database_internal, (int))" (identifier) "FDECL" (parameter_list) "(dump_database_internal, (int))" (() "(" (parameter_declaration) "dump_database_internal, (int)" (type_identifier) "dump_database_internal" (ERROR) "," (,) "," (abstract_function_declarator) "(int)" (parameter_list) "(int)" (() "(" (parameter_declaration) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* Sizes, on disk, of Object and (within the object) Attribute headers */" (preproc_def) "#define OBJ_HEADER_SIZE (sizeof(Objname) + sizeof(int))\n" (#define) "#define" (identifier) "OBJ_HEADER_SIZE" (preproc_arg) "(sizeof(Objname) + sizeof(int))" (preproc_def) "#define ATTR_HEADER_SIZE (sizeof(int) * 2)\n" (#define) "#define" (identifier) "ATTR_HEADER_SIZE" (preproc_arg) "(sizeof(int) * 2)" (comment) "/*\n * Routines to get Obj's on and off disk. Obj's are stowed in a\n * fairly complex way: an object header with the object ID (not really\n * needed, but there to facilitate possible recoveries of crashed DBs),\n * and an attribute count. This is followed by the attributes.\n * \n * We use the standard library here, and do a lot of fread()s.\n * Trust your standard library. If you think this is inefficient, you have\n * your head up your ass. This means you, Jellan.\n */" (declaration) "Obj *objfromFILE(buff)\nchar *buff;" (type_identifier) "Obj" (pointer_declarator) "*objfromFILE(buff)\nchar *buff" (*) "*" (function_declarator) "objfromFILE(buff)\nchar *buff" (identifier) "objfromFILE" (parameter_list) "(buff)" (() "(" (parameter_declaration) "buff" (type_identifier) "buff" ()) ")" (identifier) "char" (ERROR) "*" (*) "*" (identifier) "buff" (;) ";" (compound_statement) "{\n int i, j;\n Obj *o;\n Attrib *a;\n char *bp;\n\n /* Get a new Obj struct */\n\n if ((o = (Obj *) malloc(sizeof(Obj))) == (Obj *) 0)\n return ((Obj *) 0);\n\n bp = buff;\n\n /* Read in the header */\n\n bcopy(bp, (char *) &(o->name), sizeof(Objname));\n bp += sizeof(Objname);\n bcopy(bp, (char *) &i, sizeof(int));\n bp += sizeof(int);\n\n o->at_count = i;\n\n /* Now get an array of Attrs */\n\n a = o->atrs = (Attrib *) malloc(i * sizeof(Attrib));\n if (!o->atrs) {\n free(o);\n return ((Obj *) 0);\n }\n /* Now go get the attrs, one at a time. */\n\n for (j = 0; j < i;) {\n\n /* Attribute size */\n\n bcopy(bp, (char *) &(a[j].size), sizeof(int));\n bp += sizeof(int);\n\n /* Attribute number */\n\n bcopy(bp, (char *) &(a[j].attrnum), sizeof(int));\n bp += sizeof(int);\n\n /* get some memory for the data */\n\n if ((a[j].data = (char *) malloc(a[j].size)) == (char *) 0)\n goto bail;\n\n /* Preincrement j, so we know how many to free if this next\n * bit fails. \n */\n\n j++;\n\n /* Now get the data */\n\n bcopy(bp, (char *) a[j - 1].data, a[j - 1].size);\n bp += a[j - 1].size;\n\n }\n\n\n /* Should be all done.. */\n\n return (o);\n\n /* Oh shit. We gotta free up all these little bits of memory. */\n bail:\n /* j points one attribute *beyond* what we need to free up */\n\n for (i = 0; i < j; i++)\n free(a[i].data);\n\n free(a);\n free(o);\n\n return ((Obj *) 0);\n}" ({) "{" (declaration) "int i, j;" (primitive_type) "int" (identifier) "i" (,) "," (identifier) "j" (;) ";" (declaration) "Obj *o;" (type_identifier) "Obj" (pointer_declarator) "*o" (*) "*" (identifier) "o" (;) ";" (declaration) "Attrib *a;" (type_identifier) "Attrib" (pointer_declarator) "*a" (*) "*" (identifier) "a" (;) ";" (declaration) "char *bp;" (primitive_type) "char" (pointer_declarator) "*bp" (*) "*" (identifier) "bp" (;) ";" (comment) "/* Get a new Obj struct */" (if_statement) "if ((o = (Obj *) malloc(sizeof(Obj))) == (Obj *) 0)\n return ((Obj *) 0);" (if) "if" (parenthesized_expression) "((o = (Obj *) malloc(sizeof(Obj))) == (Obj *) 0)" (() "(" (binary_expression) "(o = (Obj *) malloc(sizeof(Obj))) == (Obj *) 0" (parenthesized_expression) "(o = (Obj *) malloc(sizeof(Obj)))" (() "(" (assignment_expression) "o = (Obj *) malloc(sizeof(Obj))" (identifier) "o" (=) "=" (cast_expression) "(Obj *) malloc(sizeof(Obj))" (() "(" (type_descriptor) "Obj *" (type_identifier) "Obj" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(sizeof(Obj))" (identifier) "malloc" (argument_list) "(sizeof(Obj))" (() "(" (sizeof_expression) "sizeof(Obj)" (sizeof) "sizeof" (parenthesized_expression) "(Obj)" (() "(" (identifier) "Obj" ()) ")" ()) ")" ()) ")" (==) "==" (cast_expression) "(Obj *) 0" (() "(" (type_descriptor) "Obj *" (type_identifier) "Obj" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (number_literal) "0" ()) ")" (return_statement) "return ((Obj *) 0);" (return) "return" (parenthesized_expression) "((Obj *) 0)" (() "(" (cast_expression) "(Obj *) 0" (() "(" (type_descriptor) "Obj *" (type_identifier) "Obj" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (number_literal) "0" ()) ")" (;) ";" (expression_statement) "bp = buff;" (assignment_expression) "bp = buff" (identifier) "bp" (=) "=" (identifier) "buff" (;) ";" (comment) "/* Read in the header */" (expression_statement) "bcopy(bp, (char *) &(o->name), sizeof(Objname));" (call_expression) "bcopy(bp, (char *) &(o->name), sizeof(Objname))" (identifier) "bcopy" (argument_list) "(bp, (char *) &(o->name), sizeof(Objname))" (() "(" (identifier) "bp" (,) "," (cast_expression) "(char *) &(o->name)" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&(o->name)" (&) "&" (parenthesized_expression) "(o->name)" (() "(" (field_expression) "o->name" (identifier) "o" (->) "->" (field_identifier) "name" ()) ")" (,) "," (sizeof_expression) "sizeof(Objname)" (sizeof) "sizeof" (parenthesized_expression) "(Objname)" (() "(" (identifier) "Objname" ()) ")" ()) ")" (;) ";" (expression_statement) "bp += sizeof(Objname);" (assignment_expression) "bp += sizeof(Objname)" (identifier) "bp" (+=) "+=" (sizeof_expression) "sizeof(Objname)" (sizeof) "sizeof" (parenthesized_expression) "(Objname)" (() "(" (identifier) "Objname" ()) ")" (;) ";" (expression_statement) "bcopy(bp, (char *) &i, sizeof(int));" (call_expression) "bcopy(bp, (char *) &i, sizeof(int))" (identifier) "bcopy" (argument_list) "(bp, (char *) &i, sizeof(int))" (() "(" (identifier) "bp" (,) "," (cast_expression) "(char *) &i" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&i" (&) "&" (identifier) "i" (,) "," (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (expression_statement) "bp += sizeof(int);" (assignment_expression) "bp += sizeof(int)" (identifier) "bp" (+=) "+=" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (;) ";" (expression_statement) "o->at_count = i;" (assignment_expression) "o->at_count = i" (field_expression) "o->at_count" (identifier) "o" (->) "->" (field_identifier) "at_count" (=) "=" (identifier) "i" (;) ";" (comment) "/* Now get an array of Attrs */" (expression_statement) "a = o->atrs = (Attrib *) malloc(i * sizeof(Attrib));" (assignment_expression) "a = o->atrs = (Attrib *) malloc(i * sizeof(Attrib))" (identifier) "a" (=) "=" (assignment_expression) "o->atrs = (Attrib *) malloc(i * sizeof(Attrib))" (field_expression) "o->atrs" (identifier) "o" (->) "->" (field_identifier) "atrs" (=) "=" (cast_expression) "(Attrib *) malloc(i * sizeof(Attrib))" (() "(" (type_descriptor) "Attrib *" (type_identifier) "Attrib" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(i * sizeof(Attrib))" (identifier) "malloc" (argument_list) "(i * sizeof(Attrib))" (() "(" (binary_expression) "i * sizeof(Attrib)" (identifier) "i" (*) "*" (sizeof_expression) "sizeof(Attrib)" (sizeof) "sizeof" (parenthesized_expression) "(Attrib)" (() "(" (identifier) "Attrib" ()) ")" ()) ")" (;) ";" (if_statement) "if (!o->atrs) {\n free(o);\n return ((Obj *) 0);\n }" (if) "if" (parenthesized_expression) "(!o->atrs)" (() "(" (unary_expression) "!o->atrs" (!) "!" (field_expression) "o->atrs" (identifier) "o" (->) "->" (field_identifier) "atrs" ()) ")" (compound_statement) "{\n free(o);\n return ((Obj *) 0);\n }" ({) "{" (expression_statement) "free(o);" (call_expression) "free(o)" (identifier) "free" (argument_list) "(o)" (() "(" (identifier) "o" ()) ")" (;) ";" (return_statement) "return ((Obj *) 0);" (return) "return" (parenthesized_expression) "((Obj *) 0)" (() "(" (cast_expression) "(Obj *) 0" (() "(" (type_descriptor) "Obj *" (type_identifier) "Obj" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (number_literal) "0" ()) ")" (;) ";" (}) "}" (comment) "/* Now go get the attrs, one at a time. */" (for_statement) "for (j = 0; j < i;) {\n\n /* Attribute size */\n\n bcopy(bp, (char *) &(a[j].size), sizeof(int));\n bp += sizeof(int);\n\n /* Attribute number */\n\n bcopy(bp, (char *) &(a[j].attrnum), sizeof(int));\n bp += sizeof(int);\n\n /* get some memory for the data */\n\n if ((a[j].data = (char *) malloc(a[j].size)) == (char *) 0)\n goto bail;\n\n /* Preincrement j, so we know how many to free if this next\n * bit fails. \n */\n\n j++;\n\n /* Now get the data */\n\n bcopy(bp, (char *) a[j - 1].data, a[j - 1].size);\n bp += a[j - 1].size;\n\n }" (for) "for" (() "(" (assignment_expression) "j = 0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j < i" (identifier) "j" (<) "<" (identifier) "i" (;) ";" ()) ")" (compound_statement) "{\n\n /* Attribute size */\n\n bcopy(bp, (char *) &(a[j].size), sizeof(int));\n bp += sizeof(int);\n\n /* Attribute number */\n\n bcopy(bp, (char *) &(a[j].attrnum), sizeof(int));\n bp += sizeof(int);\n\n /* get some memory for the data */\n\n if ((a[j].data = (char *) malloc(a[j].size)) == (char *) 0)\n goto bail;\n\n /* Preincrement j, so we know how many to free if this next\n * bit fails. \n */\n\n j++;\n\n /* Now get the data */\n\n bcopy(bp, (char *) a[j - 1].data, a[j - 1].size);\n bp += a[j - 1].size;\n\n }" ({) "{" (comment) "/* Attribute size */" (expression_statement) "bcopy(bp, (char *) &(a[j].size), sizeof(int));" (call_expression) "bcopy(bp, (char *) &(a[j].size), sizeof(int))" (identifier) "bcopy" (argument_list) "(bp, (char *) &(a[j].size), sizeof(int))" (() "(" (identifier) "bp" (,) "," (cast_expression) "(char *) &(a[j].size)" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&(a[j].size)" (&) "&" (parenthesized_expression) "(a[j].size)" (() "(" (field_expression) "a[j].size" (subscript_expression) "a[j]" (identifier) "a" ([) "[" (identifier) "j" (]) "]" (.) "." (field_identifier) "size" ()) ")" (,) "," (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (expression_statement) "bp += sizeof(int);" (assignment_expression) "bp += sizeof(int)" (identifier) "bp" (+=) "+=" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (;) ";" (comment) "/* Attribute number */" (expression_statement) "bcopy(bp, (char *) &(a[j].attrnum), sizeof(int));" (call_expression) "bcopy(bp, (char *) &(a[j].attrnum), sizeof(int))" (identifier) "bcopy" (argument_list) "(bp, (char *) &(a[j].attrnum), sizeof(int))" (() "(" (identifier) "bp" (,) "," (cast_expression) "(char *) &(a[j].attrnum)" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&(a[j].attrnum)" (&) "&" (parenthesized_expression) "(a[j].attrnum)" (() "(" (field_expression) "a[j].attrnum" (subscript_expression) "a[j]" (identifier) "a" ([) "[" (identifier) "j" (]) "]" (.) "." (field_identifier) "attrnum" ()) ")" (,) "," (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (expression_statement) "bp += sizeof(int);" (assignment_expression) "bp += sizeof(int)" (identifier) "bp" (+=) "+=" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (;) ";" (comment) "/* get some memory for the data */" (if_statement) "if ((a[j].data = (char *) malloc(a[j].size)) == (char *) 0)\n goto bail;" (if) "if" (parenthesized_expression) "((a[j].data = (char *) malloc(a[j].size)) == (char *) 0)" (() "(" (binary_expression) "(a[j].data = (char *) malloc(a[j].size)) == (char *) 0" (parenthesized_expression) "(a[j].data = (char *) malloc(a[j].size))" (() "(" (assignment_expression) "a[j].data = (char *) malloc(a[j].size)" (field_expression) "a[j].data" (subscript_expression) "a[j]" (identifier) "a" ([) "[" (identifier) "j" (]) "]" (.) "." (field_identifier) "data" (=) "=" (cast_expression) "(char *) malloc(a[j].size)" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(a[j].size)" (identifier) "malloc" (argument_list) "(a[j].size)" (() "(" (field_expression) "a[j].size" (subscript_expression) "a[j]" (identifier) "a" ([) "[" (identifier) "j" (]) "]" (.) "." (field_identifier) "size" ()) ")" ()) ")" (==) "==" (cast_expression) "(char *) 0" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (number_literal) "0" ()) ")" (goto_statement) "goto bail;" (goto) "goto" (statement_identifier) "bail" (;) ";" (comment) "/* Preincrement j, so we know how many to free if this next\n * bit fails. \n */" (expression_statement) "j++;" (update_expression) "j++" (identifier) "j" (++) "++" (;) ";" (comment) "/* Now get the data */" (expression_statement) "bcopy(bp, (char *) a[j - 1].data, a[j - 1].size);" (call_expression) "bcopy(bp, (char *) a[j - 1].data, a[j - 1].size)" (identifier) "bcopy" (argument_list) "(bp, (char *) a[j - 1].data, a[j - 1].size)" (() "(" (identifier) "bp" (,) "," (cast_expression) "(char *) a[j - 1].data" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "a[j - 1].data" (subscript_expression) "a[j - 1]" (identifier) "a" ([) "[" (binary_expression) "j - 1" (identifier) "j" (-) "-" (number_literal) "1" (]) "]" (.) "." (field_identifier) "data" (,) "," (field_expression) "a[j - 1].size" (subscript_expression) "a[j - 1]" (identifier) "a" ([) "[" (binary_expression) "j - 1" (identifier) "j" (-) "-" (number_literal) "1" (]) "]" (.) "." (field_identifier) "size" ()) ")" (;) ";" (expression_statement) "bp += a[j - 1].size;" (assignment_expression) "bp += a[j - 1].size" (identifier) "bp" (+=) "+=" (field_expression) "a[j - 1].size" (subscript_expression) "a[j - 1]" (identifier) "a" ([) "[" (binary_expression) "j - 1" (identifier) "j" (-) "-" (number_literal) "1" (]) "]" (.) "." (field_identifier) "size" (;) ";" (}) "}" (comment) "/* Should be all done.. */" (return_statement) "return (o);" (return) "return" (parenthesized_expression) "(o)" (() "(" (identifier) "o" ()) ")" (;) ";" (comment) "/* Oh shit. We gotta free up all these little bits of memory. */" (labeled_statement) "bail:\n /* j points one attribute *beyond* what we need to free up */\n\n for (i = 0; i < j; i++)\n free(a[i].data);" (statement_identifier) "bail" (:) ":" (comment) "/* j points one attribute *beyond* what we need to free up */" (for_statement) "for (i = 0; i < j; i++)\n free(a[i].data);" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < j" (identifier) "i" (<) "<" (identifier) "j" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "free(a[i].data);" (call_expression) "free(a[i].data)" (identifier) "free" (argument_list) "(a[i].data)" (() "(" (field_expression) "a[i].data" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "data" ()) ")" (;) ";" (expression_statement) "free(a);" (call_expression) "free(a)" (identifier) "free" (argument_list) "(a)" (() "(" (identifier) "a" ()) ")" (;) ";" (expression_statement) "free(o);" (call_expression) "free(o)" (identifier) "free" (argument_list) "(o)" (() "(" (identifier) "o" ()) ")" (;) ";" (return_statement) "return ((Obj *) 0);" (return) "return" (parenthesized_expression) "((Obj *) 0)" (() "(" (cast_expression) "(Obj *) 0" (() "(" (type_descriptor) "Obj *" (type_identifier) "Obj" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (number_literal) "0" ()) ")" (;) ";" (}) "}" (function_definition) "int objtoFILE(o, buff)\nObj *o;\nchar *buff;\n{\n int i;\n Attrib *a;\n char *bp;\n\n bp = buff;\n\n /* Write out the object header */\n\n bcopy((char *) &(o->name), bp, sizeof(Objname));\n bp += sizeof(Objname);\n\n bcopy((char *) &(o->at_count), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Now do the attributes, one at a time. */\n\n a = o->atrs;\n for (i = 0; i < o->at_count; i++) {\n\n /* Attribute size. */\n\n bcopy((char *) &(a[i].size), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Attribute number */\n\n bcopy((char *) &(a[i].attrnum), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Attribute data */\n\n bcopy((char *) a[i].data, bp, a[i].size);\n bp += a[i].size;\n }\n\n return (0);\n}" (primitive_type) "int" (function_declarator) "objtoFILE(o, buff)" (identifier) "objtoFILE" (parameter_list) "(o, buff)" (() "(" (identifier) "o" (,) "," (identifier) "buff" ()) ")" (declaration) "Obj *o;" (type_identifier) "Obj" (pointer_declarator) "*o" (*) "*" (identifier) "o" (;) ";" (declaration) "char *buff;" (primitive_type) "char" (pointer_declarator) "*buff" (*) "*" (identifier) "buff" (;) ";" (compound_statement) "{\n int i;\n Attrib *a;\n char *bp;\n\n bp = buff;\n\n /* Write out the object header */\n\n bcopy((char *) &(o->name), bp, sizeof(Objname));\n bp += sizeof(Objname);\n\n bcopy((char *) &(o->at_count), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Now do the attributes, one at a time. */\n\n a = o->atrs;\n for (i = 0; i < o->at_count; i++) {\n\n /* Attribute size. */\n\n bcopy((char *) &(a[i].size), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Attribute number */\n\n bcopy((char *) &(a[i].attrnum), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Attribute data */\n\n bcopy((char *) a[i].data, bp, a[i].size);\n bp += a[i].size;\n }\n\n return (0);\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (declaration) "Attrib *a;" (type_identifier) "Attrib" (pointer_declarator) "*a" (*) "*" (identifier) "a" (;) ";" (declaration) "char *bp;" (primitive_type) "char" (pointer_declarator) "*bp" (*) "*" (identifier) "bp" (;) ";" (expression_statement) "bp = buff;" (assignment_expression) "bp = buff" (identifier) "bp" (=) "=" (identifier) "buff" (;) ";" (comment) "/* Write out the object header */" (expression_statement) "bcopy((char *) &(o->name), bp, sizeof(Objname));" (call_expression) "bcopy((char *) &(o->name), bp, sizeof(Objname))" (identifier) "bcopy" (argument_list) "((char *) &(o->name), bp, sizeof(Objname))" (() "(" (cast_expression) "(char *) &(o->name)" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&(o->name)" (&) "&" (parenthesized_expression) "(o->name)" (() "(" (field_expression) "o->name" (identifier) "o" (->) "->" (field_identifier) "name" ()) ")" (,) "," (identifier) "bp" (,) "," (sizeof_expression) "sizeof(Objname)" (sizeof) "sizeof" (parenthesized_expression) "(Objname)" (() "(" (identifier) "Objname" ()) ")" ()) ")" (;) ";" (expression_statement) "bp += sizeof(Objname);" (assignment_expression) "bp += sizeof(Objname)" (identifier) "bp" (+=) "+=" (sizeof_expression) "sizeof(Objname)" (sizeof) "sizeof" (parenthesized_expression) "(Objname)" (() "(" (identifier) "Objname" ()) ")" (;) ";" (expression_statement) "bcopy((char *) &(o->at_count), bp, sizeof(int));" (call_expression) "bcopy((char *) &(o->at_count), bp, sizeof(int))" (identifier) "bcopy" (argument_list) "((char *) &(o->at_count), bp, sizeof(int))" (() "(" (cast_expression) "(char *) &(o->at_count)" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&(o->at_count)" (&) "&" (parenthesized_expression) "(o->at_count)" (() "(" (field_expression) "o->at_count" (identifier) "o" (->) "->" (field_identifier) "at_count" ()) ")" (,) "," (identifier) "bp" (,) "," (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (expression_statement) "bp += sizeof(int);" (assignment_expression) "bp += sizeof(int)" (identifier) "bp" (+=) "+=" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (;) ";" (comment) "/* Now do the attributes, one at a time. */" (expression_statement) "a = o->atrs;" (assignment_expression) "a = o->atrs" (identifier) "a" (=) "=" (field_expression) "o->atrs" (identifier) "o" (->) "->" (field_identifier) "atrs" (;) ";" (for_statement) "for (i = 0; i < o->at_count; i++) {\n\n /* Attribute size. */\n\n bcopy((char *) &(a[i].size), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Attribute number */\n\n bcopy((char *) &(a[i].attrnum), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Attribute data */\n\n bcopy((char *) a[i].data, bp, a[i].size);\n bp += a[i].size;\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < o->at_count" (identifier) "i" (<) "<" (field_expression) "o->at_count" (identifier) "o" (->) "->" (field_identifier) "at_count" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n\n /* Attribute size. */\n\n bcopy((char *) &(a[i].size), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Attribute number */\n\n bcopy((char *) &(a[i].attrnum), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Attribute data */\n\n bcopy((char *) a[i].data, bp, a[i].size);\n bp += a[i].size;\n }" ({) "{" (comment) "/* Attribute size. */" (expression_statement) "bcopy((char *) &(a[i].size), bp, sizeof(int));" (call_expression) "bcopy((char *) &(a[i].size), bp, sizeof(int))" (identifier) "bcopy" (argument_list) "((char *) &(a[i].size), bp, sizeof(int))" (() "(" (cast_expression) "(char *) &(a[i].size)" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&(a[i].size)" (&) "&" (parenthesized_expression) "(a[i].size)" (() "(" (field_expression) "a[i].size" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "size" ()) ")" (,) "," (identifier) "bp" (,) "," (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (expression_statement) "bp += sizeof(int);" (assignment_expression) "bp += sizeof(int)" (identifier) "bp" (+=) "+=" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (;) ";" (comment) "/* Attribute number */" (expression_statement) "bcopy((char *) &(a[i].attrnum), bp, sizeof(int));" (call_expression) "bcopy((char *) &(a[i].attrnum), bp, sizeof(int))" (identifier) "bcopy" (argument_list) "((char *) &(a[i].attrnum), bp, sizeof(int))" (() "(" (cast_expression) "(char *) &(a[i].attrnum)" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&(a[i].attrnum)" (&) "&" (parenthesized_expression) "(a[i].attrnum)" (() "(" (field_expression) "a[i].attrnum" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "attrnum" ()) ")" (,) "," (identifier) "bp" (,) "," (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (expression_statement) "bp += sizeof(int);" (assignment_expression) "bp += sizeof(int)" (identifier) "bp" (+=) "+=" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (;) ";" (comment) "/* Attribute data */" (expression_statement) "bcopy((char *) a[i].data, bp, a[i].size);" (call_expression) "bcopy((char *) a[i].data, bp, a[i].size)" (identifier) "bcopy" (argument_list) "((char *) a[i].data, bp, a[i].size)" (() "(" (cast_expression) "(char *) a[i].data" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "a[i].data" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "data" (,) "," (identifier) "bp" (,) "," (field_expression) "a[i].size" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "size" ()) ")" (;) ";" (expression_statement) "bp += a[i].size;" (assignment_expression) "bp += a[i].size" (identifier) "bp" (+=) "+=" (field_expression) "a[i].size" (subscript_expression) "a[i]" (identifier) "a" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "size" (;) ";" (}) "}" (return_statement) "return (0);" (return) "return" (parenthesized_expression) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}" (comment) "/* Return the size, on disk, the thing is going to take up. */" (function_definition) "int obj_siz(o)\nObj *o;\n{\n int i;\n int siz;\n\n siz = OBJ_HEADER_SIZE;\n\n for (i = 0; i < o->at_count; i++)\n siz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE);\n\n return (siz);\n}" (primitive_type) "int" (function_declarator) "obj_siz(o)" (identifier) "obj_siz" (parameter_list) "(o)" (() "(" (identifier) "o" ()) ")" (declaration) "Obj *o;" (type_identifier) "Obj" (pointer_declarator) "*o" (*) "*" (identifier) "o" (;) ";" (compound_statement) "{\n int i;\n int siz;\n\n siz = OBJ_HEADER_SIZE;\n\n for (i = 0; i < o->at_count; i++)\n siz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE);\n\n return (siz);\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (declaration) "int siz;" (primitive_type) "int" (identifier) "siz" (;) ";" (expression_statement) "siz = OBJ_HEADER_SIZE;" (assignment_expression) "siz = OBJ_HEADER_SIZE" (identifier) "siz" (=) "=" (identifier) "OBJ_HEADER_SIZE" (;) ";" (for_statement) "for (i = 0; i < o->at_count; i++)\n siz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE);" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < o->at_count" (identifier) "i" (<) "<" (field_expression) "o->at_count" (identifier) "o" (->) "->" (field_identifier) "at_count" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "siz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE);" (assignment_expression) "siz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE)" (identifier) "siz" (+=) "+=" (parenthesized_expression) "(((o->atrs)[i]).size + ATTR_HEADER_SIZE)" (() "(" (binary_expression) "((o->atrs)[i]).size + ATTR_HEADER_SIZE" (field_expression) "((o->atrs)[i]).size" (parenthesized_expression) "((o->atrs)[i])" (() "(" (subscript_expression) "(o->atrs)[i]" (parenthesized_expression) "(o->atrs)" (() "(" (field_expression) "o->atrs" (identifier) "o" (->) "->" (field_identifier) "atrs" ()) ")" ([) "[" (identifier) "i" (]) "]" ()) ")" (.) "." (field_identifier) "size" (+) "+" (identifier) "ATTR_HEADER_SIZE" ()) ")" (;) ";" (return_statement) "return (siz);" (return) "return" (parenthesized_expression) "(siz)" (() "(" (identifier) "siz" ()) ")" (;) ";" (}) "}"
1,036
2
{"language": "c", "success": true, "metadata": {"lines": 125, "avg_line_length": 25.57, "nodes": 606, "errors": 0, "source_hash": "d1fe54704c86a540bb233d0fed2e9b049583a3a2a7c24a85c7513ad587dd4bff", "categorized_nodes": 413}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include\t\"autoconf.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"autoconf.h\"", "parent": 0, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 21}}, {"id": 3, "type": "preproc_include", "text": "#include\t\"config.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"config.h\"", "parent": 3, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include\t\"externs.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"externs.h\"", "parent": 6, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 20}}, {"id": 9, "type": "preproc_include", "text": "#include\t\"udb.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"udb.h\"", "parent": 9, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 16}}, {"id": 12, "type": "preproc_include", "text": "#include\t\"udb_defs.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"udb_defs.h\"", "parent": 12, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 21}}, {"id": 15, "type": "preproc_ifdef", "text": "#ifndef STANDALONE\nextern void FDECL(dump_database_internal, (int));\n#endif", "parent": null, "children": [16, 17, 18, 31], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 16, "type": "#ifndef", "text": "#ifndef", "parent": 15, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 17, "type": "identifier", "text": "STANDALONE", "parent": 15, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 18}}, {"id": 18, "type": "declaration", "text": "extern void FDECL(dump_database_internal, (int));", "parent": 15, "children": [19, 21, 22], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 49}}, {"id": 19, "type": "storage_class_specifier", "text": "extern", "parent": 18, "children": [20], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 20, "type": "extern", "text": "extern", "parent": 19, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 21, "type": "primitive_type", "text": "void", "parent": 18, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 11}}, {"id": 22, "type": "function_declarator", "text": "FDECL(dump_database_internal, (int))", "parent": 18, "children": [23, 24], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 48}}, {"id": 23, "type": "identifier", "text": "FDECL", "parent": 22, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 17}}, {"id": 24, "type": "parameter_list", "text": "(dump_database_internal, (int))", "parent": 22, "children": [25], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 48}}, {"id": 25, "type": "parameter_declaration", "text": "dump_database_internal, (int)", "parent": 24, "children": [26, 27], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 47}}, {"id": 26, "type": "type_identifier", "text": "dump_database_internal", "parent": 25, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 40}}, {"id": 27, "type": "abstract_function_declarator", "text": "(int)", "parent": 25, "children": [28], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 47}}, {"id": 28, "type": "parameter_list", "text": "(int)", "parent": 27, "children": [29], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 47}}, {"id": 29, "type": "parameter_declaration", "text": "int", "parent": 28, "children": [30], "start_point": {"row": 18, "column": 43}, "end_point": {"row": 18, "column": 46}}, {"id": 30, "type": "primitive_type", "text": "int", "parent": 29, "children": [], "start_point": {"row": 18, "column": 43}, "end_point": {"row": 18, "column": 46}}, {"id": 31, "type": "#endif", "text": "#endif", "parent": 15, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 32, "type": "preproc_def", "text": "#define OBJ_HEADER_SIZE\t\t(sizeof(Objname) + sizeof(int))\n", "parent": null, "children": [33, 34, 35], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 33, "type": "#define", "text": "#define", "parent": 32, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 34, "type": "identifier", "text": "OBJ_HEADER_SIZE", "parent": 32, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 23}}, {"id": 35, "type": "preproc_arg", "text": "(sizeof(Objname) + sizeof(int))", "parent": 32, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 56}}, {"id": 36, "type": "preproc_def", "text": "#define ATTR_HEADER_SIZE\t(sizeof(int) * 2)\n", "parent": null, "children": [37, 38, 39], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 38, "type": "identifier", "text": "ATTR_HEADER_SIZE", "parent": 36, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 24}}, {"id": 39, "type": "preproc_arg", "text": "(sizeof(int) * 2)", "parent": 36, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 42}}, {"id": 40, "type": "declaration", "text": "Obj *objfromFILE(buff)\nchar *buff;", "parent": null, "children": [41, 42], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 11}}, {"id": 41, "type": "type_identifier", "text": "Obj", "parent": 40, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 3}}, {"id": 42, "type": "pointer_declarator", "text": "*objfromFILE(buff)\nchar *buff", "parent": 40, "children": [43, 44], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 39, "column": 10}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 5}}, {"id": 44, "type": "function_declarator", "text": "objfromFILE(buff)\nchar *buff", "parent": 42, "children": [45, 46, 49, 50, 52], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 39, "column": 10}}, {"id": 45, "type": "identifier", "text": "objfromFILE", "parent": 44, "children": [], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 16}}, {"id": 46, "type": "parameter_list", "text": "(buff)", "parent": 44, "children": [47], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 22}}, {"id": 47, "type": "parameter_declaration", "text": "buff", "parent": 46, "children": [48], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 21}}, {"id": 48, "type": "type_identifier", "text": "buff", "parent": 47, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 21}}, {"id": 49, "type": "identifier", "text": "char", "parent": 44, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 4}}, {"id": 50, "type": "ERROR", "text": "*", "parent": 44, "children": [51], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 6}}, {"id": 51, "type": "*", "text": "*", "parent": 50, "children": [], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 6}}, {"id": 52, "type": "identifier", "text": "buff", "parent": 44, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 10}}, {"id": 53, "type": "declaration", "text": "int i, j;", "parent": null, "children": [54, 55, 56], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 13}}, {"id": 54, "type": "primitive_type", "text": "int", "parent": 53, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 7}}, {"id": 55, "type": "identifier", "text": "i", "parent": 53, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 9}}, {"id": 56, "type": "identifier", "text": "j", "parent": 53, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 12}}, {"id": 57, "type": "declaration", "text": "Obj *o;", "parent": null, "children": [58, 59], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 11}}, {"id": 58, "type": "type_identifier", "text": "Obj", "parent": 57, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 7}}, {"id": 59, "type": "pointer_declarator", "text": "*o", "parent": 57, "children": [60, 61], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 10}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 9}}, {"id": 61, "type": "identifier", "text": "o", "parent": 59, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 10}}, {"id": 62, "type": "declaration", "text": "Attrib *a;", "parent": null, "children": [63, 64], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 14}}, {"id": 63, "type": "type_identifier", "text": "Attrib", "parent": 62, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 10}}, {"id": 64, "type": "pointer_declarator", "text": "*a", "parent": 62, "children": [65, 66], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 13}}, {"id": 65, "type": "*", "text": "*", "parent": 64, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 12}}, {"id": 66, "type": "identifier", "text": "a", "parent": 64, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 13}}, {"id": 67, "type": "declaration", "text": "char *bp;", "parent": null, "children": [68, 69], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 13}}, {"id": 68, "type": "primitive_type", "text": "char", "parent": 67, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 8}}, {"id": 69, "type": "pointer_declarator", "text": "*bp", "parent": 67, "children": [70, 71], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 12}}, {"id": 70, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 10}}, {"id": 71, "type": "identifier", "text": "bp", "parent": 69, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 12}}, {"id": 72, "type": "if_statement", "text": "if ((o = (Obj *) malloc(sizeof(Obj))) == (Obj *) 0)\n\treturn ((Obj *) 0);", "parent": null, "children": [73, 97], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 49, "column": 20}}, {"id": 73, "type": "parenthesized_expression", "text": "((o = (Obj *) malloc(sizeof(Obj))) == (Obj *) 0)", "parent": 72, "children": [74], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 55}}, {"id": 74, "type": "binary_expression", "text": "(o = (Obj *) malloc(sizeof(Obj))) == (Obj *) 0", "parent": 73, "children": [75, 90, 91], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 54}}, {"id": 75, "type": "parenthesized_expression", "text": "(o = (Obj *) malloc(sizeof(Obj)))", "parent": 74, "children": [76], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 41}}, {"id": 76, "type": "assignment_expression", "text": "o = (Obj *) malloc(sizeof(Obj))", "parent": 75, "children": [77, 78, 79], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 40}}, {"id": 77, "type": "identifier", "text": "o", "parent": 76, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 10}}, {"id": 78, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 12}}, {"id": 79, "type": "cast_expression", "text": "(Obj *) malloc(sizeof(Obj))", "parent": 76, "children": [80, 84], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 40}}, {"id": 80, "type": "type_descriptor", "text": "Obj *", "parent": 79, "children": [81, 82], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 19}}, {"id": 81, "type": "type_identifier", "text": "Obj", "parent": 80, "children": [], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 17}}, {"id": 82, "type": "abstract_pointer_declarator", "text": "*", "parent": 80, "children": [83], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 19}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 19}}, {"id": 84, "type": "call_expression", "text": "malloc(sizeof(Obj))", "parent": 79, "children": [85, 86], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 40}}, {"id": 85, "type": "identifier", "text": "malloc", "parent": 84, "children": [], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 27}}, {"id": 86, "type": "argument_list", "text": "(sizeof(Obj))", "parent": 84, "children": [87], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 40}}, {"id": 87, "type": "sizeof_expression", "text": "sizeof(Obj)", "parent": 86, "children": [88], "start_point": {"row": 48, "column": 28}, "end_point": {"row": 48, "column": 39}}, {"id": 88, "type": "parenthesized_expression", "text": "(Obj)", "parent": 87, "children": [89], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 39}}, {"id": 89, "type": "identifier", "text": "Obj", "parent": 88, "children": [], "start_point": {"row": 48, "column": 35}, "end_point": {"row": 48, "column": 38}}, {"id": 90, "type": "==", "text": "==", "parent": 74, "children": [], "start_point": {"row": 48, "column": 42}, "end_point": {"row": 48, "column": 44}}, {"id": 91, "type": "cast_expression", "text": "(Obj *) 0", "parent": 74, "children": [92, 96], "start_point": {"row": 48, "column": 45}, "end_point": {"row": 48, "column": 54}}, {"id": 92, "type": "type_descriptor", "text": "Obj *", "parent": 91, "children": [93, 94], "start_point": {"row": 48, "column": 46}, "end_point": {"row": 48, "column": 51}}, {"id": 93, "type": "type_identifier", "text": "Obj", "parent": 92, "children": [], "start_point": {"row": 48, "column": 46}, "end_point": {"row": 48, "column": 49}}, {"id": 94, "type": "abstract_pointer_declarator", "text": "*", "parent": 92, "children": [95], "start_point": {"row": 48, "column": 50}, "end_point": {"row": 48, "column": 51}}, {"id": 95, "type": "*", "text": "*", "parent": 94, "children": [], "start_point": {"row": 48, "column": 50}, "end_point": {"row": 48, "column": 51}}, {"id": 96, "type": "number_literal", "text": "0", "parent": 91, "children": [], "start_point": {"row": 48, "column": 53}, "end_point": {"row": 48, "column": 54}}, {"id": 97, "type": "return_statement", "text": "return ((Obj *) 0);", "parent": 72, "children": [98], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 20}}, {"id": 98, "type": "parenthesized_expression", "text": "((Obj *) 0)", "parent": 97, "children": [99], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 19}}, {"id": 99, "type": "cast_expression", "text": "(Obj *) 0", "parent": 98, "children": [100, 104], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 18}}, {"id": 100, "type": "type_descriptor", "text": "Obj *", "parent": 99, "children": [101, 102], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 15}}, {"id": 101, "type": "type_identifier", "text": "Obj", "parent": 100, "children": [], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 13}}, {"id": 102, "type": "abstract_pointer_declarator", "text": "*", "parent": 100, "children": [103], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 15}}, {"id": 103, "type": "*", "text": "*", "parent": 102, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 15}}, {"id": 104, "type": "number_literal", "text": "0", "parent": 99, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 18}}, {"id": 105, "type": "assignment_expression", "text": "bp = buff", "parent": null, "children": [106, 107, 108], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 13}}, {"id": 106, "type": "identifier", "text": "bp", "parent": 105, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 6}}, {"id": 107, "type": "=", "text": "=", "parent": 105, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 8}}, {"id": 108, "type": "identifier", "text": "buff", "parent": 105, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 13}}, {"id": 109, "type": "call_expression", "text": "bcopy(bp, (char *) &(o->name), sizeof(Objname))", "parent": null, "children": [110, 111], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 51}}, {"id": 110, "type": "identifier", "text": "bcopy", "parent": 109, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 9}}, {"id": 111, "type": "argument_list", "text": "(bp, (char *) &(o->name), sizeof(Objname))", "parent": 109, "children": [112, 113, 123], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 51}}, {"id": 112, "type": "identifier", "text": "bp", "parent": 111, "children": [], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 12}}, {"id": 113, "type": "cast_expression", "text": "(char *) &(o->name)", "parent": 111, "children": [114, 118], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 33}}, {"id": 114, "type": "type_descriptor", "text": "char *", "parent": 113, "children": [115, 116], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 21}}, {"id": 115, "type": "primitive_type", "text": "char", "parent": 114, "children": [], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 19}}, {"id": 116, "type": "abstract_pointer_declarator", "text": "*", "parent": 114, "children": [117], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 21}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 21}}, {"id": 118, "type": "pointer_expression", "text": "&(o->name)", "parent": 113, "children": [119], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 33}}, {"id": 119, "type": "parenthesized_expression", "text": "(o->name)", "parent": 118, "children": [120], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 33}}, {"id": 120, "type": "field_expression", "text": "o->name", "parent": 119, "children": [121, 122], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 32}}, {"id": 121, "type": "identifier", "text": "o", "parent": 120, "children": [], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 26}}, {"id": 122, "type": "field_identifier", "text": "name", "parent": 120, "children": [], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 32}}, {"id": 123, "type": "sizeof_expression", "text": "sizeof(Objname)", "parent": 111, "children": [124], "start_point": {"row": 55, "column": 35}, "end_point": {"row": 55, "column": 50}}, {"id": 124, "type": "parenthesized_expression", "text": "(Objname)", "parent": 123, "children": [125], "start_point": {"row": 55, "column": 41}, "end_point": {"row": 55, "column": 50}}, {"id": 125, "type": "identifier", "text": "Objname", "parent": 124, "children": [], "start_point": {"row": 55, "column": 42}, "end_point": {"row": 55, "column": 49}}, {"id": 126, "type": "assignment_expression", "text": "bp += sizeof(Objname)", "parent": null, "children": [127, 128, 129], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 25}}, {"id": 127, "type": "identifier", "text": "bp", "parent": 126, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 6}}, {"id": 128, "type": "+=", "text": "+=", "parent": 126, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 9}}, {"id": 129, "type": "sizeof_expression", "text": "sizeof(Objname)", "parent": 126, "children": [130], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 25}}, {"id": 130, "type": "parenthesized_expression", "text": "(Objname)", "parent": 129, "children": [131], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 25}}, {"id": 131, "type": "identifier", "text": "Objname", "parent": 130, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 24}}, {"id": 132, "type": "call_expression", "text": "bcopy(bp, (char *) &i, sizeof(int))", "parent": null, "children": [133, 134], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 39}}, {"id": 133, "type": "identifier", "text": "bcopy", "parent": 132, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 9}}, {"id": 134, "type": "argument_list", "text": "(bp, (char *) &i, sizeof(int))", "parent": 132, "children": [135, 136, 143], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 39}}, {"id": 135, "type": "identifier", "text": "bp", "parent": 134, "children": [], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 12}}, {"id": 136, "type": "cast_expression", "text": "(char *) &i", "parent": 134, "children": [137, 141], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 25}}, {"id": 137, "type": "type_descriptor", "text": "char *", "parent": 136, "children": [138, 139], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 21}}, {"id": 138, "type": "primitive_type", "text": "char", "parent": 137, "children": [], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 19}}, {"id": 139, "type": "abstract_pointer_declarator", "text": "*", "parent": 137, "children": [140], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 21}}, {"id": 140, "type": "*", "text": "*", "parent": 139, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 21}}, {"id": 141, "type": "pointer_expression", "text": "&i", "parent": 136, "children": [142], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 25}}, {"id": 142, "type": "identifier", "text": "i", "parent": 141, "children": [], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 25}}, {"id": 143, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 134, "children": [144], "start_point": {"row": 57, "column": 27}, "end_point": {"row": 57, "column": 38}}, {"id": 144, "type": "type_descriptor", "text": "int", "parent": 143, "children": [145], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 37}}, {"id": 145, "type": "primitive_type", "text": "int", "parent": 144, "children": [], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 37}}, {"id": 146, "type": "assignment_expression", "text": "bp += sizeof(int)", "parent": null, "children": [147, 148, 149], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 21}}, {"id": 147, "type": "identifier", "text": "bp", "parent": 146, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 6}}, {"id": 148, "type": "+=", "text": "+=", "parent": 146, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 9}}, {"id": 149, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 146, "children": [150], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 21}}, {"id": 150, "type": "type_descriptor", "text": "int", "parent": 149, "children": [151], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 20}}, {"id": 151, "type": "primitive_type", "text": "int", "parent": 150, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 20}}, {"id": 152, "type": "assignment_expression", "text": "o->at_count = i", "parent": null, "children": [153, 156, 157], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 19}}, {"id": 153, "type": "field_expression", "text": "o->at_count", "parent": 152, "children": [154, 155], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 15}}, {"id": 154, "type": "identifier", "text": "o", "parent": 153, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 5}}, {"id": 155, "type": "field_identifier", "text": "at_count", "parent": 153, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 15}}, {"id": 156, "type": "=", "text": "=", "parent": 152, "children": [], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 17}}, {"id": 157, "type": "identifier", "text": "i", "parent": 152, "children": [], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 19}}, {"id": 158, "type": "assignment_expression", "text": "a = o->atrs = (Attrib *) malloc(i * sizeof(Attrib))", "parent": null, "children": [159, 160, 161], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 55}}, {"id": 159, "type": "identifier", "text": "a", "parent": 158, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 5}}, {"id": 160, "type": "=", "text": "=", "parent": 158, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 7}}, {"id": 161, "type": "assignment_expression", "text": "o->atrs = (Attrib *) malloc(i * sizeof(Attrib))", "parent": 158, "children": [162, 165, 166], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 55}}, {"id": 162, "type": "field_expression", "text": "o->atrs", "parent": 161, "children": [163, 164], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 15}}, {"id": 163, "type": "identifier", "text": "o", "parent": 162, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 9}}, {"id": 164, "type": "field_identifier", "text": "atrs", "parent": 162, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 15}}, {"id": 165, "type": "=", "text": "=", "parent": 161, "children": [], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 17}}, {"id": 166, "type": "cast_expression", "text": "(Attrib *) malloc(i * sizeof(Attrib))", "parent": 161, "children": [167, 171], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 55}}, {"id": 167, "type": "type_descriptor", "text": "Attrib *", "parent": 166, "children": [168, 169], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 27}}, {"id": 168, "type": "type_identifier", "text": "Attrib", "parent": 167, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 25}}, {"id": 169, "type": "abstract_pointer_declarator", "text": "*", "parent": 167, "children": [170], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 27}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 27}}, {"id": 171, "type": "call_expression", "text": "malloc(i * sizeof(Attrib))", "parent": 166, "children": [172, 173], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 55}}, {"id": 172, "type": "identifier", "text": "malloc", "parent": 171, "children": [], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 35}}, {"id": 173, "type": "argument_list", "text": "(i * sizeof(Attrib))", "parent": 171, "children": [174], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 55}}, {"id": 174, "type": "binary_expression", "text": "i * sizeof(Attrib)", "parent": 173, "children": [175, 176, 177], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 54}}, {"id": 175, "type": "identifier", "text": "i", "parent": 174, "children": [], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 37}}, {"id": 176, "type": "*", "text": "*", "parent": 174, "children": [], "start_point": {"row": 64, "column": 38}, "end_point": {"row": 64, "column": 39}}, {"id": 177, "type": "sizeof_expression", "text": "sizeof(Attrib)", "parent": 174, "children": [178], "start_point": {"row": 64, "column": 40}, "end_point": {"row": 64, "column": 54}}, {"id": 178, "type": "parenthesized_expression", "text": "(Attrib)", "parent": 177, "children": [179], "start_point": {"row": 64, "column": 46}, "end_point": {"row": 64, "column": 54}}, {"id": 179, "type": "identifier", "text": "Attrib", "parent": 178, "children": [], "start_point": {"row": 64, "column": 47}, "end_point": {"row": 64, "column": 53}}, {"id": 180, "type": "if_statement", "text": "if (!o->atrs) {\n\tfree(o);\n\treturn ((Obj *) 0);\n }", "parent": null, "children": [181], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 68, "column": 5}}, {"id": 181, "type": "parenthesized_expression", "text": "(!o->atrs)", "parent": 180, "children": [182], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 17}}, {"id": 182, "type": "unary_expression", "text": "!o->atrs", "parent": 181, "children": [183, 184], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 16}}, {"id": 183, "type": "!", "text": "!", "parent": 182, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 9}}, {"id": 184, "type": "field_expression", "text": "o->atrs", "parent": 182, "children": [185, 186], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 16}}, {"id": 185, "type": "identifier", "text": "o", "parent": 184, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 10}}, {"id": 186, "type": "field_identifier", "text": "atrs", "parent": 184, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 16}}, {"id": 187, "type": "call_expression", "text": "free(o)", "parent": 180, "children": [188, 189], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 8}}, {"id": 188, "type": "identifier", "text": "free", "parent": 187, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 5}}, {"id": 189, "type": "argument_list", "text": "(o)", "parent": 187, "children": [190], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 8}}, {"id": 190, "type": "identifier", "text": "o", "parent": 189, "children": [], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 7}}, {"id": 191, "type": "return_statement", "text": "return ((Obj *) 0);", "parent": 180, "children": [192], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 20}}, {"id": 192, "type": "parenthesized_expression", "text": "((Obj *) 0)", "parent": 191, "children": [193], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 19}}, {"id": 193, "type": "cast_expression", "text": "(Obj *) 0", "parent": 192, "children": [194, 198], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 18}}, {"id": 194, "type": "type_descriptor", "text": "Obj *", "parent": 193, "children": [195, 196], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 15}}, {"id": 195, "type": "type_identifier", "text": "Obj", "parent": 194, "children": [], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 13}}, {"id": 196, "type": "abstract_pointer_declarator", "text": "*", "parent": 194, "children": [197], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 15}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 15}}, {"id": 198, "type": "number_literal", "text": "0", "parent": 193, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 18}}, {"id": 199, "type": "for_statement", "text": "for (j = 0; j < i;) {\n\n\t/* Attribute size */\n\n\tbcopy(bp, (char *) &(a[j].size), sizeof(int));\n\tbp += sizeof(int);\n\n\t/* Attribute number */\n\n\tbcopy(bp, (char *) &(a[j].attrnum), sizeof(int));\n\tbp += sizeof(int);\n\n\t/* get some memory for the data */\n\n\tif ((a[j].data = (char *) malloc(a[j].size)) == (char *) 0)\n\t goto bail;\n\n\t/* Preincrement j, so we know how many to free if this next\n\t * bit fails. \n\t */\n\n\tj++;\n\n\t/* Now get the data */\n\n\tbcopy(bp, (char *) a[j - 1].data, a[j - 1].size);\n\tbp += a[j - 1].size;\n\n }", "parent": null, "children": [200, 204], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 99, "column": 5}}, {"id": 200, "type": "assignment_expression", "text": "j = 0", "parent": 199, "children": [201, 202, 203], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 14}}, {"id": 201, "type": "identifier", "text": "j", "parent": 200, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 10}}, {"id": 202, "type": "=", "text": "=", "parent": 200, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 12}}, {"id": 203, "type": "number_literal", "text": "0", "parent": 200, "children": [], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 14}}, {"id": 204, "type": "binary_expression", "text": "j < i", "parent": 199, "children": [205, 206, 207], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 21}}, {"id": 205, "type": "identifier", "text": "j", "parent": 204, "children": [], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 17}}, {"id": 206, "type": "<", "text": "<", "parent": 204, "children": [], "start_point": {"row": 71, "column": 18}, "end_point": {"row": 71, "column": 19}}, {"id": 207, "type": "identifier", "text": "i", "parent": 204, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 21}}, {"id": 208, "type": "call_expression", "text": "bcopy(bp, (char *) &(a[j].size), sizeof(int))", "parent": 199, "children": [209, 210], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 46}}, {"id": 209, "type": "identifier", "text": "bcopy", "parent": 208, "children": [], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 6}}, {"id": 210, "type": "argument_list", "text": "(bp, (char *) &(a[j].size), sizeof(int))", "parent": 208, "children": [211, 212, 224], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 46}}, {"id": 211, "type": "identifier", "text": "bp", "parent": 210, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 9}}, {"id": 212, "type": "cast_expression", "text": "(char *) &(a[j].size)", "parent": 210, "children": [213, 217], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 32}}, {"id": 213, "type": "type_descriptor", "text": "char *", "parent": 212, "children": [214, 215], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 18}}, {"id": 214, "type": "primitive_type", "text": "char", "parent": 213, "children": [], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 16}}, {"id": 215, "type": "abstract_pointer_declarator", "text": "*", "parent": 213, "children": [216], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 18}}, {"id": 216, "type": "*", "text": "*", "parent": 215, "children": [], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 18}}, {"id": 217, "type": "pointer_expression", "text": "&(a[j].size)", "parent": 212, "children": [218], "start_point": {"row": 75, "column": 20}, "end_point": {"row": 75, "column": 32}}, {"id": 218, "type": "parenthesized_expression", "text": "(a[j].size)", "parent": 217, "children": [219], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 32}}, {"id": 219, "type": "field_expression", "text": "a[j].size", "parent": 218, "children": [220, 223], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 31}}, {"id": 220, "type": "subscript_expression", "text": "a[j]", "parent": 219, "children": [221, 222], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 26}}, {"id": 221, "type": "identifier", "text": "a", "parent": 220, "children": [], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 23}}, {"id": 222, "type": "identifier", "text": "j", "parent": 220, "children": [], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 25}}, {"id": 223, "type": "field_identifier", "text": "size", "parent": 219, "children": [], "start_point": {"row": 75, "column": 27}, "end_point": {"row": 75, "column": 31}}, {"id": 224, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 210, "children": [225], "start_point": {"row": 75, "column": 34}, "end_point": {"row": 75, "column": 45}}, {"id": 225, "type": "type_descriptor", "text": "int", "parent": 224, "children": [226], "start_point": {"row": 75, "column": 41}, "end_point": {"row": 75, "column": 44}}, {"id": 226, "type": "primitive_type", "text": "int", "parent": 225, "children": [], "start_point": {"row": 75, "column": 41}, "end_point": {"row": 75, "column": 44}}, {"id": 227, "type": "assignment_expression", "text": "bp += sizeof(int)", "parent": 199, "children": [228, 229, 230], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 18}}, {"id": 228, "type": "identifier", "text": "bp", "parent": 227, "children": [], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 3}}, {"id": 229, "type": "+=", "text": "+=", "parent": 227, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 6}}, {"id": 230, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 227, "children": [231], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 18}}, {"id": 231, "type": "type_descriptor", "text": "int", "parent": 230, "children": [232], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 17}}, {"id": 232, "type": "primitive_type", "text": "int", "parent": 231, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 17}}, {"id": 233, "type": "call_expression", "text": "bcopy(bp, (char *) &(a[j].attrnum), sizeof(int))", "parent": 199, "children": [234, 235], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 49}}, {"id": 234, "type": "identifier", "text": "bcopy", "parent": 233, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 6}}, {"id": 235, "type": "argument_list", "text": "(bp, (char *) &(a[j].attrnum), sizeof(int))", "parent": 233, "children": [236, 237, 249], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 49}}, {"id": 236, "type": "identifier", "text": "bp", "parent": 235, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 9}}, {"id": 237, "type": "cast_expression", "text": "(char *) &(a[j].attrnum)", "parent": 235, "children": [238, 242], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 35}}, {"id": 238, "type": "type_descriptor", "text": "char *", "parent": 237, "children": [239, 240], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 18}}, {"id": 239, "type": "primitive_type", "text": "char", "parent": 238, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 16}}, {"id": 240, "type": "abstract_pointer_declarator", "text": "*", "parent": 238, "children": [241], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 18}}, {"id": 241, "type": "*", "text": "*", "parent": 240, "children": [], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 18}}, {"id": 242, "type": "pointer_expression", "text": "&(a[j].attrnum)", "parent": 237, "children": [243], "start_point": {"row": 80, "column": 20}, "end_point": {"row": 80, "column": 35}}, {"id": 243, "type": "parenthesized_expression", "text": "(a[j].attrnum)", "parent": 242, "children": [244], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 35}}, {"id": 244, "type": "field_expression", "text": "a[j].attrnum", "parent": 243, "children": [245, 248], "start_point": {"row": 80, "column": 22}, "end_point": {"row": 80, "column": 34}}, {"id": 245, "type": "subscript_expression", "text": "a[j]", "parent": 244, "children": [246, 247], "start_point": {"row": 80, "column": 22}, "end_point": {"row": 80, "column": 26}}, {"id": 246, "type": "identifier", "text": "a", "parent": 245, "children": [], "start_point": {"row": 80, "column": 22}, "end_point": {"row": 80, "column": 23}}, {"id": 247, "type": "identifier", "text": "j", "parent": 245, "children": [], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 25}}, {"id": 248, "type": "field_identifier", "text": "attrnum", "parent": 244, "children": [], "start_point": {"row": 80, "column": 27}, "end_point": {"row": 80, "column": 34}}, {"id": 249, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 235, "children": [250], "start_point": {"row": 80, "column": 37}, "end_point": {"row": 80, "column": 48}}, {"id": 250, "type": "type_descriptor", "text": "int", "parent": 249, "children": [251], "start_point": {"row": 80, "column": 44}, "end_point": {"row": 80, "column": 47}}, {"id": 251, "type": "primitive_type", "text": "int", "parent": 250, "children": [], "start_point": {"row": 80, "column": 44}, "end_point": {"row": 80, "column": 47}}, {"id": 252, "type": "assignment_expression", "text": "bp += sizeof(int)", "parent": 199, "children": [253, 254, 255], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 18}}, {"id": 253, "type": "identifier", "text": "bp", "parent": 252, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 3}}, {"id": 254, "type": "+=", "text": "+=", "parent": 252, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 6}}, {"id": 255, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 252, "children": [256], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 18}}, {"id": 256, "type": "type_descriptor", "text": "int", "parent": 255, "children": [257], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 17}}, {"id": 257, "type": "primitive_type", "text": "int", "parent": 256, "children": [], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 17}}, {"id": 258, "type": "if_statement", "text": "if ((a[j].data = (char *) malloc(a[j].size)) == (char *) 0)\n\t goto bail;", "parent": 199, "children": [259, 289], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 86, "column": 15}}, {"id": 259, "type": "parenthesized_expression", "text": "((a[j].data = (char *) malloc(a[j].size)) == (char *) 0)", "parent": 258, "children": [260], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 60}}, {"id": 260, "type": "binary_expression", "text": "(a[j].data = (char *) malloc(a[j].size)) == (char *) 0", "parent": 259, "children": [261, 282, 283], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 59}}, {"id": 261, "type": "parenthesized_expression", "text": "(a[j].data = (char *) malloc(a[j].size))", "parent": 260, "children": [262], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 45}}, {"id": 262, "type": "assignment_expression", "text": "a[j].data = (char *) malloc(a[j].size)", "parent": 261, "children": [263, 268, 269], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 44}}, {"id": 263, "type": "field_expression", "text": "a[j].data", "parent": 262, "children": [264, 267], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 15}}, {"id": 264, "type": "subscript_expression", "text": "a[j]", "parent": 263, "children": [265, 266], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 10}}, {"id": 265, "type": "identifier", "text": "a", "parent": 264, "children": [], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 7}}, {"id": 266, "type": "identifier", "text": "j", "parent": 264, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 9}}, {"id": 267, "type": "field_identifier", "text": "data", "parent": 263, "children": [], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 15}}, {"id": 268, "type": "=", "text": "=", "parent": 262, "children": [], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 17}}, {"id": 269, "type": "cast_expression", "text": "(char *) malloc(a[j].size)", "parent": 262, "children": [270, 274], "start_point": {"row": 85, "column": 18}, "end_point": {"row": 85, "column": 44}}, {"id": 270, "type": "type_descriptor", "text": "char *", "parent": 269, "children": [271, 272], "start_point": {"row": 85, "column": 19}, "end_point": {"row": 85, "column": 25}}, {"id": 271, "type": "primitive_type", "text": "char", "parent": 270, "children": [], "start_point": {"row": 85, "column": 19}, "end_point": {"row": 85, "column": 23}}, {"id": 272, "type": "abstract_pointer_declarator", "text": "*", "parent": 270, "children": [273], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 25}}, {"id": 273, "type": "*", "text": "*", "parent": 272, "children": [], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 25}}, {"id": 274, "type": "call_expression", "text": "malloc(a[j].size)", "parent": 269, "children": [275, 276], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 85, "column": 44}}, {"id": 275, "type": "identifier", "text": "malloc", "parent": 274, "children": [], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 85, "column": 33}}, {"id": 276, "type": "argument_list", "text": "(a[j].size)", "parent": 274, "children": [277], "start_point": {"row": 85, "column": 33}, "end_point": {"row": 85, "column": 44}}, {"id": 277, "type": "field_expression", "text": "a[j].size", "parent": 276, "children": [278, 281], "start_point": {"row": 85, "column": 34}, "end_point": {"row": 85, "column": 43}}, {"id": 278, "type": "subscript_expression", "text": "a[j]", "parent": 277, "children": [279, 280], "start_point": {"row": 85, "column": 34}, "end_point": {"row": 85, "column": 38}}, {"id": 279, "type": "identifier", "text": "a", "parent": 278, "children": [], "start_point": {"row": 85, "column": 34}, "end_point": {"row": 85, "column": 35}}, {"id": 280, "type": "identifier", "text": "j", "parent": 278, "children": [], "start_point": {"row": 85, "column": 36}, "end_point": {"row": 85, "column": 37}}, {"id": 281, "type": "field_identifier", "text": "size", "parent": 277, "children": [], "start_point": {"row": 85, "column": 39}, "end_point": {"row": 85, "column": 43}}, {"id": 282, "type": "==", "text": "==", "parent": 260, "children": [], "start_point": {"row": 85, "column": 46}, "end_point": {"row": 85, "column": 48}}, {"id": 283, "type": "cast_expression", "text": "(char *) 0", "parent": 260, "children": [284, 288], "start_point": {"row": 85, "column": 49}, "end_point": {"row": 85, "column": 59}}, {"id": 284, "type": "type_descriptor", "text": "char *", "parent": 283, "children": [285, 286], "start_point": {"row": 85, "column": 50}, "end_point": {"row": 85, "column": 56}}, {"id": 285, "type": "primitive_type", "text": "char", "parent": 284, "children": [], "start_point": {"row": 85, "column": 50}, "end_point": {"row": 85, "column": 54}}, {"id": 286, "type": "abstract_pointer_declarator", "text": "*", "parent": 284, "children": [287], "start_point": {"row": 85, "column": 55}, "end_point": {"row": 85, "column": 56}}, {"id": 287, "type": "*", "text": "*", "parent": 286, "children": [], "start_point": {"row": 85, "column": 55}, "end_point": {"row": 85, "column": 56}}, {"id": 288, "type": "number_literal", "text": "0", "parent": 283, "children": [], "start_point": {"row": 85, "column": 58}, "end_point": {"row": 85, "column": 59}}, {"id": 289, "type": "goto_statement", "text": "goto bail;", "parent": 258, "children": [290, 291], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 15}}, {"id": 290, "type": "goto", "text": "goto", "parent": 289, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 9}}, {"id": 291, "type": "statement_identifier", "text": "bail", "parent": 289, "children": [], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 14}}, {"id": 292, "type": "update_expression", "text": "j++", "parent": 199, "children": [293, 294], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 4}}, {"id": 293, "type": "identifier", "text": "j", "parent": 292, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 2}}, {"id": 294, "type": "++", "text": "++", "parent": 292, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 4}}, {"id": 295, "type": "call_expression", "text": "bcopy(bp, (char *) a[j - 1].data, a[j - 1].size)", "parent": 199, "children": [296, 297], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 49}}, {"id": 296, "type": "identifier", "text": "bcopy", "parent": 295, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 6}}, {"id": 297, "type": "argument_list", "text": "(bp, (char *) a[j - 1].data, a[j - 1].size)", "parent": 295, "children": [298, 299, 312], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 49}}, {"id": 298, "type": "identifier", "text": "bp", "parent": 297, "children": [], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 9}}, {"id": 299, "type": "cast_expression", "text": "(char *) a[j - 1].data", "parent": 297, "children": [300, 304], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 33}}, {"id": 300, "type": "type_descriptor", "text": "char *", "parent": 299, "children": [301, 302], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 18}}, {"id": 301, "type": "primitive_type", "text": "char", "parent": 300, "children": [], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 16}}, {"id": 302, "type": "abstract_pointer_declarator", "text": "*", "parent": 300, "children": [303], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 18}}, {"id": 303, "type": "*", "text": "*", "parent": 302, "children": [], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 18}}, {"id": 304, "type": "field_expression", "text": "a[j - 1].data", "parent": 299, "children": [305, 311], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 33}}, {"id": 305, "type": "subscript_expression", "text": "a[j - 1]", "parent": 304, "children": [306, 307], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 28}}, {"id": 306, "type": "identifier", "text": "a", "parent": 305, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 21}}, {"id": 307, "type": "binary_expression", "text": "j - 1", "parent": 305, "children": [308, 309, 310], "start_point": {"row": 96, "column": 22}, "end_point": {"row": 96, "column": 27}}, {"id": 308, "type": "identifier", "text": "j", "parent": 307, "children": [], "start_point": {"row": 96, "column": 22}, "end_point": {"row": 96, "column": 23}}, {"id": 309, "type": "-", "text": "-", "parent": 307, "children": [], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 25}}, {"id": 310, "type": "number_literal", "text": "1", "parent": 307, "children": [], "start_point": {"row": 96, "column": 26}, "end_point": {"row": 96, "column": 27}}, {"id": 311, "type": "field_identifier", "text": "data", "parent": 304, "children": [], "start_point": {"row": 96, "column": 29}, "end_point": {"row": 96, "column": 33}}, {"id": 312, "type": "field_expression", "text": "a[j - 1].size", "parent": 297, "children": [313, 319], "start_point": {"row": 96, "column": 35}, "end_point": {"row": 96, "column": 48}}, {"id": 313, "type": "subscript_expression", "text": "a[j - 1]", "parent": 312, "children": [314, 315], "start_point": {"row": 96, "column": 35}, "end_point": {"row": 96, "column": 43}}, {"id": 314, "type": "identifier", "text": "a", "parent": 313, "children": [], "start_point": {"row": 96, "column": 35}, "end_point": {"row": 96, "column": 36}}, {"id": 315, "type": "binary_expression", "text": "j - 1", "parent": 313, "children": [316, 317, 318], "start_point": {"row": 96, "column": 37}, "end_point": {"row": 96, "column": 42}}, {"id": 316, "type": "identifier", "text": "j", "parent": 315, "children": [], "start_point": {"row": 96, "column": 37}, "end_point": {"row": 96, "column": 38}}, {"id": 317, "type": "-", "text": "-", "parent": 315, "children": [], "start_point": {"row": 96, "column": 39}, "end_point": {"row": 96, "column": 40}}, {"id": 318, "type": "number_literal", "text": "1", "parent": 315, "children": [], "start_point": {"row": 96, "column": 41}, "end_point": {"row": 96, "column": 42}}, {"id": 319, "type": "field_identifier", "text": "size", "parent": 312, "children": [], "start_point": {"row": 96, "column": 44}, "end_point": {"row": 96, "column": 48}}, {"id": 320, "type": "assignment_expression", "text": "bp += a[j - 1].size", "parent": 199, "children": [321, 322, 323], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 20}}, {"id": 321, "type": "identifier", "text": "bp", "parent": 320, "children": [], "start_point": {"row": 97, "column": 1}, "end_point": {"row": 97, "column": 3}}, {"id": 322, "type": "+=", "text": "+=", "parent": 320, "children": [], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 6}}, {"id": 323, "type": "field_expression", "text": "a[j - 1].size", "parent": 320, "children": [324, 330], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 20}}, {"id": 324, "type": "subscript_expression", "text": "a[j - 1]", "parent": 323, "children": [325, 326], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 15}}, {"id": 325, "type": "identifier", "text": "a", "parent": 324, "children": [], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 8}}, {"id": 326, "type": "binary_expression", "text": "j - 1", "parent": 324, "children": [327, 328, 329], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 14}}, {"id": 327, "type": "identifier", "text": "j", "parent": 326, "children": [], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 10}}, {"id": 328, "type": "-", "text": "-", "parent": 326, "children": [], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 12}}, {"id": 329, "type": "number_literal", "text": "1", "parent": 326, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 14}}, {"id": 330, "type": "field_identifier", "text": "size", "parent": 323, "children": [], "start_point": {"row": 97, "column": 16}, "end_point": {"row": 97, "column": 20}}, {"id": 331, "type": "return_statement", "text": "return (o);", "parent": null, "children": [332], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 15}}, {"id": 332, "type": "parenthesized_expression", "text": "(o)", "parent": 331, "children": [333], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 14}}, {"id": 333, "type": "identifier", "text": "o", "parent": 332, "children": [], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 13}}, {"id": 334, "type": "labeled_statement", "text": "bail:\n /* j points one attribute *beyond* what we need to free up */\n\n for (i = 0; i < j; i++)\n\tfree(a[i].data);", "parent": null, "children": [335, 336], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 111, "column": 17}}, {"id": 335, "type": "statement_identifier", "text": "bail", "parent": 334, "children": [], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 6}}, {"id": 336, "type": "for_statement", "text": "for (i = 0; i < j; i++)\n\tfree(a[i].data);", "parent": 334, "children": [337, 341, 345], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 111, "column": 17}}, {"id": 337, "type": "assignment_expression", "text": "i = 0", "parent": 336, "children": [338, 339, 340], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 14}}, {"id": 338, "type": "identifier", "text": "i", "parent": 337, "children": [], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 10}}, {"id": 339, "type": "=", "text": "=", "parent": 337, "children": [], "start_point": {"row": 110, "column": 11}, "end_point": {"row": 110, "column": 12}}, {"id": 340, "type": "number_literal", "text": "0", "parent": 337, "children": [], "start_point": {"row": 110, "column": 13}, "end_point": {"row": 110, "column": 14}}, {"id": 341, "type": "binary_expression", "text": "i < j", "parent": 336, "children": [342, 343, 344], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 21}}, {"id": 342, "type": "identifier", "text": "i", "parent": 341, "children": [], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 17}}, {"id": 343, "type": "<", "text": "<", "parent": 341, "children": [], "start_point": {"row": 110, "column": 18}, "end_point": {"row": 110, "column": 19}}, {"id": 344, "type": "identifier", "text": "j", "parent": 341, "children": [], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 21}}, {"id": 345, "type": "update_expression", "text": "i++", "parent": 336, "children": [346, 347], "start_point": {"row": 110, "column": 23}, "end_point": {"row": 110, "column": 26}}, {"id": 346, "type": "identifier", "text": "i", "parent": 345, "children": [], "start_point": {"row": 110, "column": 23}, "end_point": {"row": 110, "column": 24}}, {"id": 347, "type": "++", "text": "++", "parent": 345, "children": [], "start_point": {"row": 110, "column": 24}, "end_point": {"row": 110, "column": 26}}, {"id": 348, "type": "call_expression", "text": "free(a[i].data)", "parent": 336, "children": [349, 350], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 16}}, {"id": 349, "type": "identifier", "text": "free", "parent": 348, "children": [], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 5}}, {"id": 350, "type": "argument_list", "text": "(a[i].data)", "parent": 348, "children": [351], "start_point": {"row": 111, "column": 5}, "end_point": {"row": 111, "column": 16}}, {"id": 351, "type": "field_expression", "text": "a[i].data", "parent": 350, "children": [352, 355], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 15}}, {"id": 352, "type": "subscript_expression", "text": "a[i]", "parent": 351, "children": [353, 354], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 10}}, {"id": 353, "type": "identifier", "text": "a", "parent": 352, "children": [], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 7}}, {"id": 354, "type": "identifier", "text": "i", "parent": 352, "children": [], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 9}}, {"id": 355, "type": "field_identifier", "text": "data", "parent": 351, "children": [], "start_point": {"row": 111, "column": 11}, "end_point": {"row": 111, "column": 15}}, {"id": 356, "type": "call_expression", "text": "free(a)", "parent": null, "children": [357, 358], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 11}}, {"id": 357, "type": "identifier", "text": "free", "parent": 356, "children": [], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 8}}, {"id": 358, "type": "argument_list", "text": "(a)", "parent": 356, "children": [359], "start_point": {"row": 113, "column": 8}, "end_point": {"row": 113, "column": 11}}, {"id": 359, "type": "identifier", "text": "a", "parent": 358, "children": [], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 10}}, {"id": 360, "type": "call_expression", "text": "free(o)", "parent": null, "children": [361, 362], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 11}}, {"id": 361, "type": "identifier", "text": "free", "parent": 360, "children": [], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 8}}, {"id": 362, "type": "argument_list", "text": "(o)", "parent": 360, "children": [363], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 11}}, {"id": 363, "type": "identifier", "text": "o", "parent": 362, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 10}}, {"id": 364, "type": "return_statement", "text": "return ((Obj *) 0);", "parent": null, "children": [365], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 23}}, {"id": 365, "type": "parenthesized_expression", "text": "((Obj *) 0)", "parent": 364, "children": [366], "start_point": {"row": 116, "column": 11}, "end_point": {"row": 116, "column": 22}}, {"id": 366, "type": "cast_expression", "text": "(Obj *) 0", "parent": 365, "children": [367, 371], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 21}}, {"id": 367, "type": "type_descriptor", "text": "Obj *", "parent": 366, "children": [368, 369], "start_point": {"row": 116, "column": 13}, "end_point": {"row": 116, "column": 18}}, {"id": 368, "type": "type_identifier", "text": "Obj", "parent": 367, "children": [], "start_point": {"row": 116, "column": 13}, "end_point": {"row": 116, "column": 16}}, {"id": 369, "type": "abstract_pointer_declarator", "text": "*", "parent": 367, "children": [370], "start_point": {"row": 116, "column": 17}, "end_point": {"row": 116, "column": 18}}, {"id": 370, "type": "*", "text": "*", "parent": 369, "children": [], "start_point": {"row": 116, "column": 17}, "end_point": {"row": 116, "column": 18}}, {"id": 371, "type": "number_literal", "text": "0", "parent": 366, "children": [], "start_point": {"row": 116, "column": 20}, "end_point": {"row": 116, "column": 21}}, {"id": 372, "type": "function_definition", "text": "int objtoFILE(o, buff)\nObj *o;\nchar *buff;\n{\n int i;\n Attrib *a;\n char *bp;\n\n bp = buff;\n\n /* Write out the object header */\n\n bcopy((char *) &(o->name), bp, sizeof(Objname));\n bp += sizeof(Objname);\n\n bcopy((char *) &(o->at_count), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Now do the attributes, one at a time. */\n\n a = o->atrs;\n for (i = 0; i < o->at_count; i++) {\n\n\t/* Attribute size. */\n\n\tbcopy((char *) &(a[i].size), bp, sizeof(int));\n\tbp += sizeof(int);\n\n\t/* Attribute number */\n\n\tbcopy((char *) &(a[i].attrnum), bp, sizeof(int));\n\tbp += sizeof(int);\n\n\t/* Attribute data */\n\n\tbcopy((char *) a[i].data, bp, a[i].size);\n\tbp += a[i].size;\n }\n\n return (0);\n}", "parent": null, "children": [373, 374, 379, 384], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 160, "column": 1}}, {"id": 373, "type": "primitive_type", "text": "int", "parent": 372, "children": [], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 120, "column": 3}}, {"id": 374, "type": "function_declarator", "text": "objtoFILE(o, buff)", "parent": 372, "children": [375, 376], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 22}}, {"id": 375, "type": "identifier", "text": "objtoFILE", "parent": 374, "children": [], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 13}}, {"id": 376, "type": "parameter_list", "text": "(o, buff)", "parent": 374, "children": [377, 378], "start_point": {"row": 120, "column": 13}, "end_point": {"row": 120, "column": 22}}, {"id": 377, "type": "identifier", "text": "o", "parent": 376, "children": [], "start_point": {"row": 120, "column": 14}, "end_point": {"row": 120, "column": 15}}, {"id": 378, "type": "identifier", "text": "buff", "parent": 376, "children": [], "start_point": {"row": 120, "column": 17}, "end_point": {"row": 120, "column": 21}}, {"id": 379, "type": "declaration", "text": "Obj *o;", "parent": 372, "children": [380, 381], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 7}}, {"id": 380, "type": "type_identifier", "text": "Obj", "parent": 379, "children": [], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 3}}, {"id": 381, "type": "pointer_declarator", "text": "*o", "parent": 379, "children": [382, 383], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 6}}, {"id": 382, "type": "*", "text": "*", "parent": 381, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 5}}, {"id": 383, "type": "identifier", "text": "o", "parent": 381, "children": [], "start_point": {"row": 121, "column": 5}, "end_point": {"row": 121, "column": 6}}, {"id": 384, "type": "declaration", "text": "char *buff;", "parent": 372, "children": [385, 386], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 122, "column": 11}}, {"id": 385, "type": "primitive_type", "text": "char", "parent": 384, "children": [], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 122, "column": 4}}, {"id": 386, "type": "pointer_declarator", "text": "*buff", "parent": 384, "children": [387, 388], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 10}}, {"id": 387, "type": "*", "text": "*", "parent": 386, "children": [], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 6}}, {"id": 388, "type": "identifier", "text": "buff", "parent": 386, "children": [], "start_point": {"row": 122, "column": 6}, "end_point": {"row": 122, "column": 10}}, {"id": 389, "type": "declaration", "text": "int i;", "parent": 372, "children": [390, 391], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 10}}, {"id": 390, "type": "primitive_type", "text": "int", "parent": 389, "children": [], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 7}}, {"id": 391, "type": "identifier", "text": "i", "parent": 389, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 9}}, {"id": 392, "type": "declaration", "text": "Attrib *a;", "parent": 372, "children": [393, 394], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 14}}, {"id": 393, "type": "type_identifier", "text": "Attrib", "parent": 392, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 10}}, {"id": 394, "type": "pointer_declarator", "text": "*a", "parent": 392, "children": [395, 396], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 13}}, {"id": 395, "type": "*", "text": "*", "parent": 394, "children": [], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 12}}, {"id": 396, "type": "identifier", "text": "a", "parent": 394, "children": [], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 13}}, {"id": 397, "type": "declaration", "text": "char *bp;", "parent": 372, "children": [398, 399], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 13}}, {"id": 398, "type": "primitive_type", "text": "char", "parent": 397, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 8}}, {"id": 399, "type": "pointer_declarator", "text": "*bp", "parent": 397, "children": [400, 401], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 12}}, {"id": 400, "type": "*", "text": "*", "parent": 399, "children": [], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 10}}, {"id": 401, "type": "identifier", "text": "bp", "parent": 399, "children": [], "start_point": {"row": 126, "column": 10}, "end_point": {"row": 126, "column": 12}}, {"id": 402, "type": "assignment_expression", "text": "bp = buff", "parent": 372, "children": [403, 404, 405], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 13}}, {"id": 403, "type": "identifier", "text": "bp", "parent": 402, "children": [], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 6}}, {"id": 404, "type": "=", "text": "=", "parent": 402, "children": [], "start_point": {"row": 128, "column": 7}, "end_point": {"row": 128, "column": 8}}, {"id": 405, "type": "identifier", "text": "buff", "parent": 402, "children": [], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 13}}, {"id": 406, "type": "call_expression", "text": "bcopy((char *) &(o->name), bp, sizeof(Objname))", "parent": 372, "children": [407, 408], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 51}}, {"id": 407, "type": "identifier", "text": "bcopy", "parent": 406, "children": [], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 9}}, {"id": 408, "type": "argument_list", "text": "((char *) &(o->name), bp, sizeof(Objname))", "parent": 406, "children": [409, 419, 420], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 51}}, {"id": 409, "type": "cast_expression", "text": "(char *) &(o->name)", "parent": 408, "children": [410, 414], "start_point": {"row": 132, "column": 10}, "end_point": {"row": 132, "column": 29}}, {"id": 410, "type": "type_descriptor", "text": "char *", "parent": 409, "children": [411, 412], "start_point": {"row": 132, "column": 11}, "end_point": {"row": 132, "column": 17}}, {"id": 411, "type": "primitive_type", "text": "char", "parent": 410, "children": [], "start_point": {"row": 132, "column": 11}, "end_point": {"row": 132, "column": 15}}, {"id": 412, "type": "abstract_pointer_declarator", "text": "*", "parent": 410, "children": [413], "start_point": {"row": 132, "column": 16}, "end_point": {"row": 132, "column": 17}}, {"id": 413, "type": "*", "text": "*", "parent": 412, "children": [], "start_point": {"row": 132, "column": 16}, "end_point": {"row": 132, "column": 17}}, {"id": 414, "type": "pointer_expression", "text": "&(o->name)", "parent": 409, "children": [415], "start_point": {"row": 132, "column": 19}, "end_point": {"row": 132, "column": 29}}, {"id": 415, "type": "parenthesized_expression", "text": "(o->name)", "parent": 414, "children": [416], "start_point": {"row": 132, "column": 20}, "end_point": {"row": 132, "column": 29}}, {"id": 416, "type": "field_expression", "text": "o->name", "parent": 415, "children": [417, 418], "start_point": {"row": 132, "column": 21}, "end_point": {"row": 132, "column": 28}}, {"id": 417, "type": "identifier", "text": "o", "parent": 416, "children": [], "start_point": {"row": 132, "column": 21}, "end_point": {"row": 132, "column": 22}}, {"id": 418, "type": "field_identifier", "text": "name", "parent": 416, "children": [], "start_point": {"row": 132, "column": 24}, "end_point": {"row": 132, "column": 28}}, {"id": 419, "type": "identifier", "text": "bp", "parent": 408, "children": [], "start_point": {"row": 132, "column": 31}, "end_point": {"row": 132, "column": 33}}, {"id": 420, "type": "sizeof_expression", "text": "sizeof(Objname)", "parent": 408, "children": [421], "start_point": {"row": 132, "column": 35}, "end_point": {"row": 132, "column": 50}}, {"id": 421, "type": "parenthesized_expression", "text": "(Objname)", "parent": 420, "children": [422], "start_point": {"row": 132, "column": 41}, "end_point": {"row": 132, "column": 50}}, {"id": 422, "type": "identifier", "text": "Objname", "parent": 421, "children": [], "start_point": {"row": 132, "column": 42}, "end_point": {"row": 132, "column": 49}}, {"id": 423, "type": "assignment_expression", "text": "bp += sizeof(Objname)", "parent": 372, "children": [424, 425, 426], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 25}}, {"id": 424, "type": "identifier", "text": "bp", "parent": 423, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 6}}, {"id": 425, "type": "+=", "text": "+=", "parent": 423, "children": [], "start_point": {"row": 133, "column": 7}, "end_point": {"row": 133, "column": 9}}, {"id": 426, "type": "sizeof_expression", "text": "sizeof(Objname)", "parent": 423, "children": [427], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 25}}, {"id": 427, "type": "parenthesized_expression", "text": "(Objname)", "parent": 426, "children": [428], "start_point": {"row": 133, "column": 16}, "end_point": {"row": 133, "column": 25}}, {"id": 428, "type": "identifier", "text": "Objname", "parent": 427, "children": [], "start_point": {"row": 133, "column": 17}, "end_point": {"row": 133, "column": 24}}, {"id": 429, "type": "call_expression", "text": "bcopy((char *) &(o->at_count), bp, sizeof(int))", "parent": 372, "children": [430, 431], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 51}}, {"id": 430, "type": "identifier", "text": "bcopy", "parent": 429, "children": [], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 9}}, {"id": 431, "type": "argument_list", "text": "((char *) &(o->at_count), bp, sizeof(int))", "parent": 429, "children": [432, 442, 443], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 51}}, {"id": 432, "type": "cast_expression", "text": "(char *) &(o->at_count)", "parent": 431, "children": [433, 437], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 33}}, {"id": 433, "type": "type_descriptor", "text": "char *", "parent": 432, "children": [434, 435], "start_point": {"row": 135, "column": 11}, "end_point": {"row": 135, "column": 17}}, {"id": 434, "type": "primitive_type", "text": "char", "parent": 433, "children": [], "start_point": {"row": 135, "column": 11}, "end_point": {"row": 135, "column": 15}}, {"id": 435, "type": "abstract_pointer_declarator", "text": "*", "parent": 433, "children": [436], "start_point": {"row": 135, "column": 16}, "end_point": {"row": 135, "column": 17}}, {"id": 436, "type": "*", "text": "*", "parent": 435, "children": [], "start_point": {"row": 135, "column": 16}, "end_point": {"row": 135, "column": 17}}, {"id": 437, "type": "pointer_expression", "text": "&(o->at_count)", "parent": 432, "children": [438], "start_point": {"row": 135, "column": 19}, "end_point": {"row": 135, "column": 33}}, {"id": 438, "type": "parenthesized_expression", "text": "(o->at_count)", "parent": 437, "children": [439], "start_point": {"row": 135, "column": 20}, "end_point": {"row": 135, "column": 33}}, {"id": 439, "type": "field_expression", "text": "o->at_count", "parent": 438, "children": [440, 441], "start_point": {"row": 135, "column": 21}, "end_point": {"row": 135, "column": 32}}, {"id": 440, "type": "identifier", "text": "o", "parent": 439, "children": [], "start_point": {"row": 135, "column": 21}, "end_point": {"row": 135, "column": 22}}, {"id": 441, "type": "field_identifier", "text": "at_count", "parent": 439, "children": [], "start_point": {"row": 135, "column": 24}, "end_point": {"row": 135, "column": 32}}, {"id": 442, "type": "identifier", "text": "bp", "parent": 431, "children": [], "start_point": {"row": 135, "column": 35}, "end_point": {"row": 135, "column": 37}}, {"id": 443, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 431, "children": [444], "start_point": {"row": 135, "column": 39}, "end_point": {"row": 135, "column": 50}}, {"id": 444, "type": "type_descriptor", "text": "int", "parent": 443, "children": [445], "start_point": {"row": 135, "column": 46}, "end_point": {"row": 135, "column": 49}}, {"id": 445, "type": "primitive_type", "text": "int", "parent": 444, "children": [], "start_point": {"row": 135, "column": 46}, "end_point": {"row": 135, "column": 49}}, {"id": 446, "type": "assignment_expression", "text": "bp += sizeof(int)", "parent": 372, "children": [447, 448, 449], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 21}}, {"id": 447, "type": "identifier", "text": "bp", "parent": 446, "children": [], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 6}}, {"id": 448, "type": "+=", "text": "+=", "parent": 446, "children": [], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 9}}, {"id": 449, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 446, "children": [450], "start_point": {"row": 136, "column": 10}, "end_point": {"row": 136, "column": 21}}, {"id": 450, "type": "type_descriptor", "text": "int", "parent": 449, "children": [451], "start_point": {"row": 136, "column": 17}, "end_point": {"row": 136, "column": 20}}, {"id": 451, "type": "primitive_type", "text": "int", "parent": 450, "children": [], "start_point": {"row": 136, "column": 17}, "end_point": {"row": 136, "column": 20}}, {"id": 452, "type": "assignment_expression", "text": "a = o->atrs", "parent": 372, "children": [453, 454, 455], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 15}}, {"id": 453, "type": "identifier", "text": "a", "parent": 452, "children": [], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 5}}, {"id": 454, "type": "=", "text": "=", "parent": 452, "children": [], "start_point": {"row": 140, "column": 6}, "end_point": {"row": 140, "column": 7}}, {"id": 455, "type": "field_expression", "text": "o->atrs", "parent": 452, "children": [456, 457], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 15}}, {"id": 456, "type": "identifier", "text": "o", "parent": 455, "children": [], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 9}}, {"id": 457, "type": "field_identifier", "text": "atrs", "parent": 455, "children": [], "start_point": {"row": 140, "column": 11}, "end_point": {"row": 140, "column": 15}}, {"id": 458, "type": "for_statement", "text": "for (i = 0; i < o->at_count; i++) {\n\n\t/* Attribute size. */\n\n\tbcopy((char *) &(a[i].size), bp, sizeof(int));\n\tbp += sizeof(int);\n\n\t/* Attribute number */\n\n\tbcopy((char *) &(a[i].attrnum), bp, sizeof(int));\n\tbp += sizeof(int);\n\n\t/* Attribute data */\n\n\tbcopy((char *) a[i].data, bp, a[i].size);\n\tbp += a[i].size;\n }", "parent": 372, "children": [459, 463, 469], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 157, "column": 5}}, {"id": 459, "type": "assignment_expression", "text": "i = 0", "parent": 458, "children": [460, 461, 462], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 14}}, {"id": 460, "type": "identifier", "text": "i", "parent": 459, "children": [], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 10}}, {"id": 461, "type": "=", "text": "=", "parent": 459, "children": [], "start_point": {"row": 141, "column": 11}, "end_point": {"row": 141, "column": 12}}, {"id": 462, "type": "number_literal", "text": "0", "parent": 459, "children": [], "start_point": {"row": 141, "column": 13}, "end_point": {"row": 141, "column": 14}}, {"id": 463, "type": "binary_expression", "text": "i < o->at_count", "parent": 458, "children": [464, 465, 466], "start_point": {"row": 141, "column": 16}, "end_point": {"row": 141, "column": 31}}, {"id": 464, "type": "identifier", "text": "i", "parent": 463, "children": [], "start_point": {"row": 141, "column": 16}, "end_point": {"row": 141, "column": 17}}, {"id": 465, "type": "<", "text": "<", "parent": 463, "children": [], "start_point": {"row": 141, "column": 18}, "end_point": {"row": 141, "column": 19}}, {"id": 466, "type": "field_expression", "text": "o->at_count", "parent": 463, "children": [467, 468], "start_point": {"row": 141, "column": 20}, "end_point": {"row": 141, "column": 31}}, {"id": 467, "type": "identifier", "text": "o", "parent": 466, "children": [], "start_point": {"row": 141, "column": 20}, "end_point": {"row": 141, "column": 21}}, {"id": 468, "type": "field_identifier", "text": "at_count", "parent": 466, "children": [], "start_point": {"row": 141, "column": 23}, "end_point": {"row": 141, "column": 31}}, {"id": 469, "type": "update_expression", "text": "i++", "parent": 458, "children": [470, 471], "start_point": {"row": 141, "column": 33}, "end_point": {"row": 141, "column": 36}}, {"id": 470, "type": "identifier", "text": "i", "parent": 469, "children": [], "start_point": {"row": 141, "column": 33}, "end_point": {"row": 141, "column": 34}}, {"id": 471, "type": "++", "text": "++", "parent": 469, "children": [], "start_point": {"row": 141, "column": 34}, "end_point": {"row": 141, "column": 36}}, {"id": 472, "type": "call_expression", "text": "bcopy((char *) &(a[i].size), bp, sizeof(int))", "parent": 458, "children": [473, 474], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 46}}, {"id": 473, "type": "identifier", "text": "bcopy", "parent": 472, "children": [], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 6}}, {"id": 474, "type": "argument_list", "text": "((char *) &(a[i].size), bp, sizeof(int))", "parent": 472, "children": [475, 487, 488], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 46}}, {"id": 475, "type": "cast_expression", "text": "(char *) &(a[i].size)", "parent": 474, "children": [476, 480], "start_point": {"row": 145, "column": 7}, "end_point": {"row": 145, "column": 28}}, {"id": 476, "type": "type_descriptor", "text": "char *", "parent": 475, "children": [477, 478], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 14}}, {"id": 477, "type": "primitive_type", "text": "char", "parent": 476, "children": [], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 12}}, {"id": 478, "type": "abstract_pointer_declarator", "text": "*", "parent": 476, "children": [479], "start_point": {"row": 145, "column": 13}, "end_point": {"row": 145, "column": 14}}, {"id": 479, "type": "*", "text": "*", "parent": 478, "children": [], "start_point": {"row": 145, "column": 13}, "end_point": {"row": 145, "column": 14}}, {"id": 480, "type": "pointer_expression", "text": "&(a[i].size)", "parent": 475, "children": [481], "start_point": {"row": 145, "column": 16}, "end_point": {"row": 145, "column": 28}}, {"id": 481, "type": "parenthesized_expression", "text": "(a[i].size)", "parent": 480, "children": [482], "start_point": {"row": 145, "column": 17}, "end_point": {"row": 145, "column": 28}}, {"id": 482, "type": "field_expression", "text": "a[i].size", "parent": 481, "children": [483, 486], "start_point": {"row": 145, "column": 18}, "end_point": {"row": 145, "column": 27}}, {"id": 483, "type": "subscript_expression", "text": "a[i]", "parent": 482, "children": [484, 485], "start_point": {"row": 145, "column": 18}, "end_point": {"row": 145, "column": 22}}, {"id": 484, "type": "identifier", "text": "a", "parent": 483, "children": [], "start_point": {"row": 145, "column": 18}, "end_point": {"row": 145, "column": 19}}, {"id": 485, "type": "identifier", "text": "i", "parent": 483, "children": [], "start_point": {"row": 145, "column": 20}, "end_point": {"row": 145, "column": 21}}, {"id": 486, "type": "field_identifier", "text": "size", "parent": 482, "children": [], "start_point": {"row": 145, "column": 23}, "end_point": {"row": 145, "column": 27}}, {"id": 487, "type": "identifier", "text": "bp", "parent": 474, "children": [], "start_point": {"row": 145, "column": 30}, "end_point": {"row": 145, "column": 32}}, {"id": 488, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 474, "children": [489], "start_point": {"row": 145, "column": 34}, "end_point": {"row": 145, "column": 45}}, {"id": 489, "type": "type_descriptor", "text": "int", "parent": 488, "children": [490], "start_point": {"row": 145, "column": 41}, "end_point": {"row": 145, "column": 44}}, {"id": 490, "type": "primitive_type", "text": "int", "parent": 489, "children": [], "start_point": {"row": 145, "column": 41}, "end_point": {"row": 145, "column": 44}}, {"id": 491, "type": "assignment_expression", "text": "bp += sizeof(int)", "parent": 458, "children": [492, 493, 494], "start_point": {"row": 146, "column": 1}, "end_point": {"row": 146, "column": 18}}, {"id": 492, "type": "identifier", "text": "bp", "parent": 491, "children": [], "start_point": {"row": 146, "column": 1}, "end_point": {"row": 146, "column": 3}}, {"id": 493, "type": "+=", "text": "+=", "parent": 491, "children": [], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 6}}, {"id": 494, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 491, "children": [495], "start_point": {"row": 146, "column": 7}, "end_point": {"row": 146, "column": 18}}, {"id": 495, "type": "type_descriptor", "text": "int", "parent": 494, "children": [496], "start_point": {"row": 146, "column": 14}, "end_point": {"row": 146, "column": 17}}, {"id": 496, "type": "primitive_type", "text": "int", "parent": 495, "children": [], "start_point": {"row": 146, "column": 14}, "end_point": {"row": 146, "column": 17}}, {"id": 497, "type": "call_expression", "text": "bcopy((char *) &(a[i].attrnum), bp, sizeof(int))", "parent": 458, "children": [498, 499], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 49}}, {"id": 498, "type": "identifier", "text": "bcopy", "parent": 497, "children": [], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 6}}, {"id": 499, "type": "argument_list", "text": "((char *) &(a[i].attrnum), bp, sizeof(int))", "parent": 497, "children": [500, 512, 513], "start_point": {"row": 150, "column": 6}, "end_point": {"row": 150, "column": 49}}, {"id": 500, "type": "cast_expression", "text": "(char *) &(a[i].attrnum)", "parent": 499, "children": [501, 505], "start_point": {"row": 150, "column": 7}, "end_point": {"row": 150, "column": 31}}, {"id": 501, "type": "type_descriptor", "text": "char *", "parent": 500, "children": [502, 503], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 14}}, {"id": 502, "type": "primitive_type", "text": "char", "parent": 501, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 12}}, {"id": 503, "type": "abstract_pointer_declarator", "text": "*", "parent": 501, "children": [504], "start_point": {"row": 150, "column": 13}, "end_point": {"row": 150, "column": 14}}, {"id": 504, "type": "*", "text": "*", "parent": 503, "children": [], "start_point": {"row": 150, "column": 13}, "end_point": {"row": 150, "column": 14}}, {"id": 505, "type": "pointer_expression", "text": "&(a[i].attrnum)", "parent": 500, "children": [506], "start_point": {"row": 150, "column": 16}, "end_point": {"row": 150, "column": 31}}, {"id": 506, "type": "parenthesized_expression", "text": "(a[i].attrnum)", "parent": 505, "children": [507], "start_point": {"row": 150, "column": 17}, "end_point": {"row": 150, "column": 31}}, {"id": 507, "type": "field_expression", "text": "a[i].attrnum", "parent": 506, "children": [508, 511], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 30}}, {"id": 508, "type": "subscript_expression", "text": "a[i]", "parent": 507, "children": [509, 510], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 22}}, {"id": 509, "type": "identifier", "text": "a", "parent": 508, "children": [], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 19}}, {"id": 510, "type": "identifier", "text": "i", "parent": 508, "children": [], "start_point": {"row": 150, "column": 20}, "end_point": {"row": 150, "column": 21}}, {"id": 511, "type": "field_identifier", "text": "attrnum", "parent": 507, "children": [], "start_point": {"row": 150, "column": 23}, "end_point": {"row": 150, "column": 30}}, {"id": 512, "type": "identifier", "text": "bp", "parent": 499, "children": [], "start_point": {"row": 150, "column": 33}, "end_point": {"row": 150, "column": 35}}, {"id": 513, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 499, "children": [514], "start_point": {"row": 150, "column": 37}, "end_point": {"row": 150, "column": 48}}, {"id": 514, "type": "type_descriptor", "text": "int", "parent": 513, "children": [515], "start_point": {"row": 150, "column": 44}, "end_point": {"row": 150, "column": 47}}, {"id": 515, "type": "primitive_type", "text": "int", "parent": 514, "children": [], "start_point": {"row": 150, "column": 44}, "end_point": {"row": 150, "column": 47}}, {"id": 516, "type": "assignment_expression", "text": "bp += sizeof(int)", "parent": 458, "children": [517, 518, 519], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 151, "column": 18}}, {"id": 517, "type": "identifier", "text": "bp", "parent": 516, "children": [], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 151, "column": 3}}, {"id": 518, "type": "+=", "text": "+=", "parent": 516, "children": [], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 6}}, {"id": 519, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 516, "children": [520], "start_point": {"row": 151, "column": 7}, "end_point": {"row": 151, "column": 18}}, {"id": 520, "type": "type_descriptor", "text": "int", "parent": 519, "children": [521], "start_point": {"row": 151, "column": 14}, "end_point": {"row": 151, "column": 17}}, {"id": 521, "type": "primitive_type", "text": "int", "parent": 520, "children": [], "start_point": {"row": 151, "column": 14}, "end_point": {"row": 151, "column": 17}}, {"id": 522, "type": "call_expression", "text": "bcopy((char *) a[i].data, bp, a[i].size)", "parent": 458, "children": [523, 524], "start_point": {"row": 155, "column": 1}, "end_point": {"row": 155, "column": 41}}, {"id": 523, "type": "identifier", "text": "bcopy", "parent": 522, "children": [], "start_point": {"row": 155, "column": 1}, "end_point": {"row": 155, "column": 6}}, {"id": 524, "type": "argument_list", "text": "((char *) a[i].data, bp, a[i].size)", "parent": 522, "children": [525, 535, 536], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 41}}, {"id": 525, "type": "cast_expression", "text": "(char *) a[i].data", "parent": 524, "children": [526, 530], "start_point": {"row": 155, "column": 7}, "end_point": {"row": 155, "column": 25}}, {"id": 526, "type": "type_descriptor", "text": "char *", "parent": 525, "children": [527, 528], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 14}}, {"id": 527, "type": "primitive_type", "text": "char", "parent": 526, "children": [], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 12}}, {"id": 528, "type": "abstract_pointer_declarator", "text": "*", "parent": 526, "children": [529], "start_point": {"row": 155, "column": 13}, "end_point": {"row": 155, "column": 14}}, {"id": 529, "type": "*", "text": "*", "parent": 528, "children": [], "start_point": {"row": 155, "column": 13}, "end_point": {"row": 155, "column": 14}}, {"id": 530, "type": "field_expression", "text": "a[i].data", "parent": 525, "children": [531, 534], "start_point": {"row": 155, "column": 16}, "end_point": {"row": 155, "column": 25}}, {"id": 531, "type": "subscript_expression", "text": "a[i]", "parent": 530, "children": [532, 533], "start_point": {"row": 155, "column": 16}, "end_point": {"row": 155, "column": 20}}, {"id": 532, "type": "identifier", "text": "a", "parent": 531, "children": [], "start_point": {"row": 155, "column": 16}, "end_point": {"row": 155, "column": 17}}, {"id": 533, "type": "identifier", "text": "i", "parent": 531, "children": [], "start_point": {"row": 155, "column": 18}, "end_point": {"row": 155, "column": 19}}, {"id": 534, "type": "field_identifier", "text": "data", "parent": 530, "children": [], "start_point": {"row": 155, "column": 21}, "end_point": {"row": 155, "column": 25}}, {"id": 535, "type": "identifier", "text": "bp", "parent": 524, "children": [], "start_point": {"row": 155, "column": 27}, "end_point": {"row": 155, "column": 29}}, {"id": 536, "type": "field_expression", "text": "a[i].size", "parent": 524, "children": [537, 540], "start_point": {"row": 155, "column": 31}, "end_point": {"row": 155, "column": 40}}, {"id": 537, "type": "subscript_expression", "text": "a[i]", "parent": 536, "children": [538, 539], "start_point": {"row": 155, "column": 31}, "end_point": {"row": 155, "column": 35}}, {"id": 538, "type": "identifier", "text": "a", "parent": 537, "children": [], "start_point": {"row": 155, "column": 31}, "end_point": {"row": 155, "column": 32}}, {"id": 539, "type": "identifier", "text": "i", "parent": 537, "children": [], "start_point": {"row": 155, "column": 33}, "end_point": {"row": 155, "column": 34}}, {"id": 540, "type": "field_identifier", "text": "size", "parent": 536, "children": [], "start_point": {"row": 155, "column": 36}, "end_point": {"row": 155, "column": 40}}, {"id": 541, "type": "assignment_expression", "text": "bp += a[i].size", "parent": 458, "children": [542, 543, 544], "start_point": {"row": 156, "column": 1}, "end_point": {"row": 156, "column": 16}}, {"id": 542, "type": "identifier", "text": "bp", "parent": 541, "children": [], "start_point": {"row": 156, "column": 1}, "end_point": {"row": 156, "column": 3}}, {"id": 543, "type": "+=", "text": "+=", "parent": 541, "children": [], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 6}}, {"id": 544, "type": "field_expression", "text": "a[i].size", "parent": 541, "children": [545, 548], "start_point": {"row": 156, "column": 7}, "end_point": {"row": 156, "column": 16}}, {"id": 545, "type": "subscript_expression", "text": "a[i]", "parent": 544, "children": [546, 547], "start_point": {"row": 156, "column": 7}, "end_point": {"row": 156, "column": 11}}, {"id": 546, "type": "identifier", "text": "a", "parent": 545, "children": [], "start_point": {"row": 156, "column": 7}, "end_point": {"row": 156, "column": 8}}, {"id": 547, "type": "identifier", "text": "i", "parent": 545, "children": [], "start_point": {"row": 156, "column": 9}, "end_point": {"row": 156, "column": 10}}, {"id": 548, "type": "field_identifier", "text": "size", "parent": 544, "children": [], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 16}}, {"id": 549, "type": "return_statement", "text": "return (0);", "parent": 372, "children": [550], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 15}}, {"id": 550, "type": "parenthesized_expression", "text": "(0)", "parent": 549, "children": [551], "start_point": {"row": 159, "column": 11}, "end_point": {"row": 159, "column": 14}}, {"id": 551, "type": "number_literal", "text": "0", "parent": 550, "children": [], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 13}}, {"id": 552, "type": "function_definition", "text": "int obj_siz(o)\nObj *o;\n{\n int i;\n int siz;\n\n siz = OBJ_HEADER_SIZE;\n\n for (i = 0; i < o->at_count; i++)\n\tsiz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE);\n\n return (siz);\n}", "parent": null, "children": [553, 554, 558], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 176, "column": 1}}, {"id": 553, "type": "primitive_type", "text": "int", "parent": 552, "children": [], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 164, "column": 3}}, {"id": 554, "type": "function_declarator", "text": "obj_siz(o)", "parent": 552, "children": [555, 556], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 14}}, {"id": 555, "type": "identifier", "text": "obj_siz", "parent": 554, "children": [], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 11}}, {"id": 556, "type": "parameter_list", "text": "(o)", "parent": 554, "children": [557], "start_point": {"row": 164, "column": 11}, "end_point": {"row": 164, "column": 14}}, {"id": 557, "type": "identifier", "text": "o", "parent": 556, "children": [], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 164, "column": 13}}, {"id": 558, "type": "declaration", "text": "Obj *o;", "parent": 552, "children": [559, 560], "start_point": {"row": 165, "column": 0}, "end_point": {"row": 165, "column": 7}}, {"id": 559, "type": "type_identifier", "text": "Obj", "parent": 558, "children": [], "start_point": {"row": 165, "column": 0}, "end_point": {"row": 165, "column": 3}}, {"id": 560, "type": "pointer_declarator", "text": "*o", "parent": 558, "children": [561, 562], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 6}}, {"id": 561, "type": "*", "text": "*", "parent": 560, "children": [], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 5}}, {"id": 562, "type": "identifier", "text": "o", "parent": 560, "children": [], "start_point": {"row": 165, "column": 5}, "end_point": {"row": 165, "column": 6}}, {"id": 563, "type": "declaration", "text": "int i;", "parent": 552, "children": [564, 565], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 10}}, {"id": 564, "type": "primitive_type", "text": "int", "parent": 563, "children": [], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 7}}, {"id": 565, "type": "identifier", "text": "i", "parent": 563, "children": [], "start_point": {"row": 167, "column": 8}, "end_point": {"row": 167, "column": 9}}, {"id": 566, "type": "declaration", "text": "int siz;", "parent": 552, "children": [567, 568], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 12}}, {"id": 567, "type": "primitive_type", "text": "int", "parent": 566, "children": [], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 7}}, {"id": 568, "type": "identifier", "text": "siz", "parent": 566, "children": [], "start_point": {"row": 168, "column": 8}, "end_point": {"row": 168, "column": 11}}, {"id": 569, "type": "assignment_expression", "text": "siz = OBJ_HEADER_SIZE", "parent": 552, "children": [570, 571, 572], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 25}}, {"id": 570, "type": "identifier", "text": "siz", "parent": 569, "children": [], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 7}}, {"id": 571, "type": "=", "text": "=", "parent": 569, "children": [], "start_point": {"row": 170, "column": 8}, "end_point": {"row": 170, "column": 9}}, {"id": 572, "type": "identifier", "text": "OBJ_HEADER_SIZE", "parent": 569, "children": [], "start_point": {"row": 170, "column": 10}, "end_point": {"row": 170, "column": 25}}, {"id": 573, "type": "for_statement", "text": "for (i = 0; i < o->at_count; i++)\n\tsiz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE);", "parent": 552, "children": [574, 578, 584], "start_point": {"row": 172, "column": 4}, "end_point": {"row": 173, "column": 49}}, {"id": 574, "type": "assignment_expression", "text": "i = 0", "parent": 573, "children": [575, 576, 577], "start_point": {"row": 172, "column": 9}, "end_point": {"row": 172, "column": 14}}, {"id": 575, "type": "identifier", "text": "i", "parent": 574, "children": [], "start_point": {"row": 172, "column": 9}, "end_point": {"row": 172, "column": 10}}, {"id": 576, "type": "=", "text": "=", "parent": 574, "children": [], "start_point": {"row": 172, "column": 11}, "end_point": {"row": 172, "column": 12}}, {"id": 577, "type": "number_literal", "text": "0", "parent": 574, "children": [], "start_point": {"row": 172, "column": 13}, "end_point": {"row": 172, "column": 14}}, {"id": 578, "type": "binary_expression", "text": "i < o->at_count", "parent": 573, "children": [579, 580, 581], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 31}}, {"id": 579, "type": "identifier", "text": "i", "parent": 578, "children": [], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 17}}, {"id": 580, "type": "<", "text": "<", "parent": 578, "children": [], "start_point": {"row": 172, "column": 18}, "end_point": {"row": 172, "column": 19}}, {"id": 581, "type": "field_expression", "text": "o->at_count", "parent": 578, "children": [582, 583], "start_point": {"row": 172, "column": 20}, "end_point": {"row": 172, "column": 31}}, {"id": 582, "type": "identifier", "text": "o", "parent": 581, "children": [], "start_point": {"row": 172, "column": 20}, "end_point": {"row": 172, "column": 21}}, {"id": 583, "type": "field_identifier", "text": "at_count", "parent": 581, "children": [], "start_point": {"row": 172, "column": 23}, "end_point": {"row": 172, "column": 31}}, {"id": 584, "type": "update_expression", "text": "i++", "parent": 573, "children": [585, 586], "start_point": {"row": 172, "column": 33}, "end_point": {"row": 172, "column": 36}}, {"id": 585, "type": "identifier", "text": "i", "parent": 584, "children": [], "start_point": {"row": 172, "column": 33}, "end_point": {"row": 172, "column": 34}}, {"id": 586, "type": "++", "text": "++", "parent": 584, "children": [], "start_point": {"row": 172, "column": 34}, "end_point": {"row": 172, "column": 36}}, {"id": 587, "type": "assignment_expression", "text": "siz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE)", "parent": 573, "children": [588, 589, 590], "start_point": {"row": 173, "column": 1}, "end_point": {"row": 173, "column": 48}}, {"id": 588, "type": "identifier", "text": "siz", "parent": 587, "children": [], "start_point": {"row": 173, "column": 1}, "end_point": {"row": 173, "column": 4}}, {"id": 589, "type": "+=", "text": "+=", "parent": 587, "children": [], "start_point": {"row": 173, "column": 5}, "end_point": {"row": 173, "column": 7}}, {"id": 590, "type": "parenthesized_expression", "text": "(((o->atrs)[i]).size + ATTR_HEADER_SIZE)", "parent": 587, "children": [591], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 48}}, {"id": 591, "type": "binary_expression", "text": "((o->atrs)[i]).size + ATTR_HEADER_SIZE", "parent": 590, "children": [592, 601, 602], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 47}}, {"id": 592, "type": "field_expression", "text": "((o->atrs)[i]).size", "parent": 591, "children": [593, 600], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 28}}, {"id": 593, "type": "parenthesized_expression", "text": "((o->atrs)[i])", "parent": 592, "children": [594], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 23}}, {"id": 594, "type": "subscript_expression", "text": "(o->atrs)[i]", "parent": 593, "children": [595, 599], "start_point": {"row": 173, "column": 10}, "end_point": {"row": 173, "column": 22}}, {"id": 595, "type": "parenthesized_expression", "text": "(o->atrs)", "parent": 594, "children": [596], "start_point": {"row": 173, "column": 10}, "end_point": {"row": 173, "column": 19}}, {"id": 596, "type": "field_expression", "text": "o->atrs", "parent": 595, "children": [597, 598], "start_point": {"row": 173, "column": 11}, "end_point": {"row": 173, "column": 18}}, {"id": 597, "type": "identifier", "text": "o", "parent": 596, "children": [], "start_point": {"row": 173, "column": 11}, "end_point": {"row": 173, "column": 12}}, {"id": 598, "type": "field_identifier", "text": "atrs", "parent": 596, "children": [], "start_point": {"row": 173, "column": 14}, "end_point": {"row": 173, "column": 18}}, {"id": 599, "type": "identifier", "text": "i", "parent": 594, "children": [], "start_point": {"row": 173, "column": 20}, "end_point": {"row": 173, "column": 21}}, {"id": 600, "type": "field_identifier", "text": "size", "parent": 592, "children": [], "start_point": {"row": 173, "column": 24}, "end_point": {"row": 173, "column": 28}}, {"id": 601, "type": "+", "text": "+", "parent": 591, "children": [], "start_point": {"row": 173, "column": 29}, "end_point": {"row": 173, "column": 30}}, {"id": 602, "type": "identifier", "text": "ATTR_HEADER_SIZE", "parent": 591, "children": [], "start_point": {"row": 173, "column": 31}, "end_point": {"row": 173, "column": 47}}, {"id": 603, "type": "return_statement", "text": "return (siz);", "parent": 552, "children": [604], "start_point": {"row": 175, "column": 4}, "end_point": {"row": 175, "column": 17}}, {"id": 604, "type": "parenthesized_expression", "text": "(siz)", "parent": 603, "children": [605], "start_point": {"row": 175, "column": 11}, "end_point": {"row": 175, "column": 16}}, {"id": 605, "type": "identifier", "text": "siz", "parent": 604, "children": [], "start_point": {"row": 175, "column": 12}, "end_point": {"row": 175, "column": 15}}]}, "node_categories": {"declarations": {"functions": [22, 27, 44, 372, 374, 552, 554], "variables": [18, 25, 29, 40, 47, 53, 57, 62, 67, 379, 384, 389, 392, 397, 558, 563, 566], "classes": [19], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [73, 74, 75, 79, 84, 87, 88, 91, 98, 99, 109, 113, 118, 119, 120, 123, 124, 129, 130, 132, 136, 141, 143, 149, 153, 162, 166, 171, 174, 177, 178, 181, 182, 184, 187, 192, 193, 204, 208, 212, 217, 218, 219, 220, 224, 230, 233, 237, 242, 243, 244, 245, 249, 255, 259, 260, 261, 263, 264, 269, 274, 277, 278, 283, 292, 295, 299, 304, 305, 307, 312, 313, 315, 323, 324, 326, 332, 341, 345, 348, 351, 352, 356, 360, 365, 366, 406, 409, 414, 415, 416, 420, 421, 426, 427, 429, 432, 437, 438, 439, 443, 449, 455, 463, 466, 469, 472, 475, 480, 481, 482, 483, 488, 494, 497, 500, 505, 506, 507, 508, 513, 519, 522, 525, 530, 531, 536, 537, 544, 545, 550, 578, 581, 584, 590, 591, 592, 593, 594, 595, 596, 604], "assignments": [76, 105, 126, 146, 152, 158, 161, 200, 227, 252, 262, 320, 337, 402, 423, 446, 452, 459, 491, 516, 541, 569, 574, 587], "loops": [199, 336, 458, 573], "conditionals": [15, 16, 17, 23, 26, 31, 34, 38, 41, 45, 48, 49, 52, 55, 56, 58, 61, 63, 66, 71, 72, 77, 81, 85, 89, 93, 101, 106, 108, 110, 112, 121, 122, 125, 127, 131, 133, 135, 142, 147, 154, 155, 157, 159, 163, 164, 168, 172, 175, 179, 180, 185, 186, 188, 190, 195, 201, 205, 207, 209, 211, 221, 222, 223, 228, 234, 236, 246, 247, 248, 253, 258, 265, 266, 267, 275, 279, 280, 281, 291, 293, 296, 298, 306, 308, 311, 314, 316, 319, 321, 325, 327, 330, 333, 335, 338, 342, 344, 346, 349, 353, 354, 355, 357, 359, 361, 363, 368, 375, 377, 378, 380, 383, 388, 391, 393, 396, 401, 403, 405, 407, 417, 418, 419, 422, 424, 428, 430, 440, 441, 442, 447, 453, 456, 457, 460, 464, 467, 468, 470, 473, 484, 485, 486, 487, 492, 498, 509, 510, 511, 512, 517, 523, 532, 533, 534, 535, 538, 539, 540, 542, 546, 547, 548, 555, 557, 559, 562, 565, 568, 570, 572, 575, 579, 582, 583, 585, 588, 597, 598, 599, 600, 602, 605], "returns": [97, 191, 331, 364, 549, 603], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 96, 104, 198, 203, 288, 310, 318, 329, 340, 371, 462, 551, 577], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "FDECL(dump_database_internal, (int))"}, {"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "(int)"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "objfromFILE(buff)\nchar *buff"}, {"node_id": 372, "universal_type": "function", "name": "objtoFILE", "text_snippet": "int objtoFILE(o, buff)\nObj *o;\nchar *buff;\n{\n int i;\n Attrib *a;\n char *bp;\n\n bp = buff;"}, {"node_id": 374, "universal_type": "function", "name": "unknown", "text_snippet": "objtoFILE(o, buff)"}, {"node_id": 552, "universal_type": "function", "name": "obj_siz", "text_snippet": "int obj_siz(o)\nObj *o;\n{\n int i;\n int siz;\n\n siz = OBJ_HEADER_SIZE;\n\n for (i = 0; i < o-"}, {"node_id": 554, "universal_type": "function", "name": "unknown", "text_snippet": "obj_siz(o)"}], "class_declarations": [{"node_id": 19, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 0, "text": "#include\t\"autoconf.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include\t\"config.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include\t\"externs.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include\t\"udb.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include\t\"udb_defs.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "\n/*\n * Binary object handling gear. Shit simple.\n * \n * <NAME>, <EMAIL>\n * \n * 1992\n * \n * $Id: udb_obj.c 1.1 02/01/03 00:59:33-00:00 twouters@ $\n */\n\n#include\t\"autoconf.h\"\n#include\t\"config.h\"\n#include\t\"externs.h\"\n#include\t\"udb.h\"\n#include\t\"udb_defs.h\"\n\n#ifndef STANDALONE\nextern void FDECL(dump_database_internal, (int));\n#endif\n\n/* Sizes, on disk, of Object and (within the object) Attribute headers */\n\n#define OBJ_HEADER_SIZE\t\t(sizeof(Objname) + sizeof(int))\n#define ATTR_HEADER_SIZE\t(sizeof(int) * 2)\n\n/*\n * Routines to get Obj's on and off disk. Obj's are stowed in a\n * fairly complex way: an object header with the object ID (not really\n * needed, but there to facilitate possible recoveries of crashed DBs),\n * and an attribute count. This is followed by the attributes.\n * \n * We use the standard library here, and do a lot of fread()s.\n * Trust your standard library. If you think this is inefficient, you have\n * your head up your ass. This means you, Jellan.\n */\n\n\nObj *objfromFILE(buff)\nchar *buff;\n{\n int i, j;\n Obj *o;\n Attrib *a;\n char *bp;\n\n /* Get a new Obj struct */\n\n if ((o = (Obj *) malloc(sizeof(Obj))) == (Obj *) 0)\n\treturn ((Obj *) 0);\n\n bp = buff;\n\n /* Read in the header */\n\n bcopy(bp, (char *) &(o->name), sizeof(Objname));\n bp += sizeof(Objname);\n bcopy(bp, (char *) &i, sizeof(int));\n bp += sizeof(int);\n\n o->at_count = i;\n\n /* Now get an array of Attrs */\n\n a = o->atrs = (Attrib *) malloc(i * sizeof(Attrib));\n if (!o->atrs) {\n\tfree(o);\n\treturn ((Obj *) 0);\n }\n /* Now go get the attrs, one at a time. */\n\n for (j = 0; j < i;) {\n\n\t/* Attribute size */\n\n\tbcopy(bp, (char *) &(a[j].size), sizeof(int));\n\tbp += sizeof(int);\n\n\t/* Attribute number */\n\n\tbcopy(bp, (char *) &(a[j].attrnum), sizeof(int));\n\tbp += sizeof(int);\n\n\t/* get some memory for the data */\n\n\tif ((a[j].data = (char *) malloc(a[j].size)) == (char *) 0)\n\t goto bail;\n\n\t/* Preincrement j, so we know how many to free if this next\n\t * bit fails. \n\t */\n\n\tj++;\n\n\t/* Now get the data */\n\n\tbcopy(bp, (char *) a[j - 1].data, a[j - 1].size);\n\tbp += a[j - 1].size;\n\n }\n\n\n /* Should be all done.. */\n\n return (o);\n\n /* Oh shit. We gotta free up all these little bits of memory. */\n bail:\n /* j points one attribute *beyond* what we need to free up */\n\n for (i = 0; i < j; i++)\n\tfree(a[i].data);\n\n free(a);\n free(o);\n\n return ((Obj *) 0);\n}\n\n\nint objtoFILE(o, buff)\nObj *o;\nchar *buff;\n{\n int i;\n Attrib *a;\n char *bp;\n\n bp = buff;\n\n /* Write out the object header */\n\n bcopy((char *) &(o->name), bp, sizeof(Objname));\n bp += sizeof(Objname);\n\n bcopy((char *) &(o->at_count), bp, sizeof(int));\n bp += sizeof(int);\n\n /* Now do the attributes, one at a time. */\n\n a = o->atrs;\n for (i = 0; i < o->at_count; i++) {\n\n\t/* Attribute size. */\n\n\tbcopy((char *) &(a[i].size), bp, sizeof(int));\n\tbp += sizeof(int);\n\n\t/* Attribute number */\n\n\tbcopy((char *) &(a[i].attrnum), bp, sizeof(int));\n\tbp += sizeof(int);\n\n\t/* Attribute data */\n\n\tbcopy((char *) a[i].data, bp, a[i].size);\n\tbp += a[i].size;\n }\n\n return (0);\n}\n\n/* Return the size, on disk, the thing is going to take up. */\n\nint obj_siz(o)\nObj *o;\n{\n int i;\n int siz;\n\n siz = OBJ_HEADER_SIZE;\n\n for (i = 0; i < o->at_count; i++)\n\tsiz += (((o->atrs)[i]).size + ATTR_HEADER_SIZE);\n\n return (siz);\n}\n"}
80,934
c
//+------------------------------------------------------------------------- // // Microsoft Windows // // Copyright (C) Microsoft Corporation, 1997 - 1999 // // File: security.h // //-------------------------------------------------------------------------- #ifndef __security_h #define __security_h /*----------------------------------------------------------------------------- / CDsSecurityClassFactory /----------------------------------------------------------------------------*/ class CDsSecurityClassFactory : public IClassFactory, CUnknown { public: // IUnkown STDMETHODIMP_(ULONG) AddRef(); STDMETHODIMP_(ULONG) Release(); STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObject); // IClassFactory STDMETHODIMP CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject); STDMETHODIMP LockServer(BOOL fLock); }; /*----------------------------------------------------------------------------- / CDsSecurity /----------------------------------------------------------------------------*/ class CDsSecurity : public IShellExtInit, IShellPropSheetExt, IContextMenu, CUnknown { private: LPSECURITYINFO m_pSI; public: virtual ~CDsSecurity(); // IUnknown STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObject); STDMETHOD_(ULONG, AddRef)(); STDMETHOD_(ULONG, Release)(); // IShellExtInit STDMETHODIMP Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID); // IShellPropSheetExt methods STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE, LPARAM); STDMETHODIMP ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM); // IContextMenu STDMETHODIMP QueryContextMenu(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); STDMETHODIMP InvokeCommand( LPCMINVOKECOMMANDINFO lpcmi); STDMETHODIMP GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax); }; #endif // __security_h
30.81
64
(translation_unit) "//+------------------------------------------------------------------------- \n// \n// Microsoft Windows \n// \n// Copyright (C) Microsoft Corporation, 1997 - 1999 \n// \n// File: security.h \n// \n//-------------------------------------------------------------------------- \n \n#ifndef __security_h \n#define __security_h \n \n \n/*----------------------------------------------------------------------------- \n/ CDsSecurityClassFactory \n/----------------------------------------------------------------------------*/ \n \nclass CDsSecurityClassFactory : public IClassFactory, CUnknown \n{ \npublic: \n // IUnkown \n STDMETHODIMP_(ULONG) AddRef(); \n STDMETHODIMP_(ULONG) Release(); \n STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObject); \n \n // IClassFactory \n STDMETHODIMP CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject); \n STDMETHODIMP LockServer(BOOL fLock); \n}; \n \n \n/*----------------------------------------------------------------------------- \n/ CDsSecurity \n/----------------------------------------------------------------------------*/ \n \nclass CDsSecurity : public IShellExtInit, IShellPropSheetExt, IContextMenu, CUnknown \n{ \nprivate: \n LPSECURITYINFO m_pSI; \n \npublic: \n virtual ~CDsSecurity(); \n \n // IUnknown \n STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObject); \n STDMETHOD_(ULONG, AddRef)(); \n STDMETHOD_(ULONG, Release)(); \n \n // IShellExtInit \n STDMETHODIMP Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID); \n \n // IShellPropSheetExt methods \n STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE, LPARAM); \n STDMETHODIMP ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM); \n \n // IContextMenu \n STDMETHODIMP QueryContextMenu(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); \n STDMETHODIMP InvokeCommand( LPCMINVOKECOMMANDINFO lpcmi); \n STDMETHODIMP GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax); \n}; \n \n \n#endif // __security_h \n" (comment) "//+------------------------------------------------------------------------- " (comment) "// " (comment) "// Microsoft Windows " (comment) "// " (comment) "// Copyright (C) Microsoft Corporation, 1997 - 1999 " (comment) "// " (comment) "// File: security.h " (comment) "// " (comment) "//-------------------------------------------------------------------------- " (preproc_ifdef) "#ifndef __security_h \n#define __security_h \n \n \n/*----------------------------------------------------------------------------- \n/ CDsSecurityClassFactory \n/----------------------------------------------------------------------------*/ \n \nclass CDsSecurityClassFactory : public IClassFactory, CUnknown \n{ \npublic: \n // IUnkown \n STDMETHODIMP_(ULONG) AddRef(); \n STDMETHODIMP_(ULONG) Release(); \n STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObject); \n \n // IClassFactory \n STDMETHODIMP CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject); \n STDMETHODIMP LockServer(BOOL fLock); \n}; \n \n \n/*----------------------------------------------------------------------------- \n/ CDsSecurity \n/----------------------------------------------------------------------------*/ \n \nclass CDsSecurity : public IShellExtInit, IShellPropSheetExt, IContextMenu, CUnknown \n{ \nprivate: \n LPSECURITYINFO m_pSI; \n \npublic: \n virtual ~CDsSecurity(); \n \n // IUnknown \n STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObject); \n STDMETHOD_(ULONG, AddRef)(); \n STDMETHOD_(ULONG, Release)(); \n \n // IShellExtInit \n STDMETHODIMP Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID); \n \n // IShellPropSheetExt methods \n STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE, LPARAM); \n STDMETHODIMP ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM); \n \n // IContextMenu \n STDMETHODIMP QueryContextMenu(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); \n STDMETHODIMP InvokeCommand( LPCMINVOKECOMMANDINFO lpcmi); \n STDMETHODIMP GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax); \n}; \n \n \n#endif" (#ifndef) "#ifndef" (identifier) "__security_h" (preproc_def) "#define __security_h \n" (#define) "#define" (identifier) "__security_h" (comment) "/*----------------------------------------------------------------------------- \n/ CDsSecurityClassFactory \n/----------------------------------------------------------------------------*/" (ERROR) "class CDsSecurityClassFactory : public IClassFactory, CUnknown" (type_identifier) "class" (identifier) "CDsSecurityClassFactory" (ERROR) ": public IClassFactory" (:) ":" (identifier) "public" (identifier) "IClassFactory" (,) "," (identifier) "CUnknown" (compound_statement) "{ \npublic: \n // IUnkown \n STDMETHODIMP_(ULONG) AddRef(); \n STDMETHODIMP_(ULONG) Release(); \n STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObject); \n \n // IClassFactory \n STDMETHODIMP CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject); \n STDMETHODIMP LockServer(BOOL fLock); \n}" ({) "{" (labeled_statement) "public: \n // IUnkown \n STDMETHODIMP_(ULONG) AddRef();" (statement_identifier) "public" (:) ":" (comment) "// IUnkown " (declaration) "STDMETHODIMP_(ULONG) AddRef();" (macro_type_specifier) "STDMETHODIMP_(ULONG)" (identifier) "STDMETHODIMP_" (() "(" (type_descriptor) "ULONG" (type_identifier) "ULONG" ()) ")" (function_declarator) "AddRef()" (identifier) "AddRef" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "STDMETHODIMP_(ULONG) Release();" (macro_type_specifier) "STDMETHODIMP_(ULONG)" (identifier) "STDMETHODIMP_" (() "(" (type_descriptor) "ULONG" (type_identifier) "ULONG" ()) ")" (function_declarator) "Release()" (identifier) "Release" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObject);" (type_identifier) "STDMETHODIMP" (function_declarator) "QueryInterface(REFIID riid, LPVOID* ppvObject)" (identifier) "QueryInterface" (parameter_list) "(REFIID riid, LPVOID* ppvObject)" (() "(" (parameter_declaration) "REFIID riid" (type_identifier) "REFIID" (identifier) "riid" (,) "," (parameter_declaration) "LPVOID* ppvObject" (type_identifier) "LPVOID" (pointer_declarator) "* ppvObject" (*) "*" (identifier) "ppvObject" ()) ")" (;) ";" (comment) "// IClassFactory " (declaration) "STDMETHODIMP CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject);" (type_identifier) "STDMETHODIMP" (function_declarator) "CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject)" (identifier) "CreateInstance" (parameter_list) "(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject)" (() "(" (parameter_declaration) "IUnknown* pOuter" (type_identifier) "IUnknown" (pointer_declarator) "* pOuter" (*) "*" (identifier) "pOuter" (,) "," (parameter_declaration) "REFIID riid" (type_identifier) "REFIID" (identifier) "riid" (,) "," (parameter_declaration) "LPVOID* ppvObject" (type_identifier) "LPVOID" (pointer_declarator) "* ppvObject" (*) "*" (identifier) "ppvObject" ()) ")" (;) ";" (declaration) "STDMETHODIMP LockServer(BOOL fLock);" (type_identifier) "STDMETHODIMP" (function_declarator) "LockServer(BOOL fLock)" (identifier) "LockServer" (parameter_list) "(BOOL fLock)" (() "(" (parameter_declaration) "BOOL fLock" (type_identifier) "BOOL" (identifier) "fLock" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "/*----------------------------------------------------------------------------- \n/ CDsSecurity \n/----------------------------------------------------------------------------*/" (declaration) "class CDsSecurity : public IShellExtInit, IShellPropSheetExt, IContextMenu, CUnknown \n{ \nprivate: \n LPSECURITYINFO m_pSI;" (type_identifier) "class" (ERROR) "CDsSecurity : public" (identifier) "CDsSecurity" (:) ":" (identifier) "public" (identifier) "IShellExtInit" (,) "," (identifier) "IShellPropSheetExt" (,) "," (identifier) "IContextMenu" (,) "," (ERROR) "CUnknown \n{ \nprivate: \n LPSECURITYINFO" (identifier) "CUnknown" ({) "{" (identifier) "private" (:) ":" (identifier) "LPSECURITYINFO" (identifier) "m_pSI" (;) ";" (labeled_statement) "public: \n virtual ~CDsSecurity();" (statement_identifier) "public" (:) ":" (declaration) "virtual ~CDsSecurity();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "CDsSecurity()" (identifier) "CDsSecurity" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// IUnknown " (declaration) "STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObject);" (type_identifier) "STDMETHOD" (function_declarator) "(QueryInterface)(REFIID riid, LPVOID* ppvObject)" (parenthesized_declarator) "(QueryInterface)" (() "(" (identifier) "QueryInterface" ()) ")" (parameter_list) "(REFIID riid, LPVOID* ppvObject)" (() "(" (parameter_declaration) "REFIID riid" (type_identifier) "REFIID" (identifier) "riid" (,) "," (parameter_declaration) "LPVOID* ppvObject" (type_identifier) "LPVOID" (pointer_declarator) "* ppvObject" (*) "*" (identifier) "ppvObject" ()) ")" (;) ";" (expression_statement) "STDMETHOD_(ULONG, AddRef)();" (call_expression) "STDMETHOD_(ULONG, AddRef)()" (call_expression) "STDMETHOD_(ULONG, AddRef)" (identifier) "STDMETHOD_" (argument_list) "(ULONG, AddRef)" (() "(" (identifier) "ULONG" (,) "," (identifier) "AddRef" ()) ")" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "STDMETHOD_(ULONG, Release)();" (call_expression) "STDMETHOD_(ULONG, Release)()" (call_expression) "STDMETHOD_(ULONG, Release)" (identifier) "STDMETHOD_" (argument_list) "(ULONG, Release)" (() "(" (identifier) "ULONG" (,) "," (identifier) "Release" ()) ")" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "// IShellExtInit " (declaration) "STDMETHODIMP Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID);" (type_identifier) "STDMETHODIMP" (function_declarator) "Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID)" (identifier) "Initialize" (parameter_list) "(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID)" (() "(" (parameter_declaration) "LPCITEMIDLIST pIDFolder" (type_identifier) "LPCITEMIDLIST" (identifier) "pIDFolder" (,) "," (parameter_declaration) "LPDATAOBJECT pDataObj" (type_identifier) "LPDATAOBJECT" (identifier) "pDataObj" (,) "," (parameter_declaration) "HKEY hKeyID" (type_identifier) "HKEY" (identifier) "hKeyID" ()) ")" (;) ";" (comment) "// IShellPropSheetExt methods " (declaration) "STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE, LPARAM);" (type_identifier) "STDMETHODIMP" (function_declarator) "AddPages(LPFNADDPROPSHEETPAGE, LPARAM)" (identifier) "AddPages" (parameter_list) "(LPFNADDPROPSHEETPAGE, LPARAM)" (() "(" (parameter_declaration) "LPFNADDPROPSHEETPAGE" (type_identifier) "LPFNADDPROPSHEETPAGE" (,) "," (parameter_declaration) "LPARAM" (type_identifier) "LPARAM" ()) ")" (;) ";" (declaration) "STDMETHODIMP ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM);" (type_identifier) "STDMETHODIMP" (function_declarator) "ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM)" (identifier) "ReplacePage" (parameter_list) "(UINT, LPFNADDPROPSHEETPAGE, LPARAM)" (() "(" (parameter_declaration) "UINT" (type_identifier) "UINT" (,) "," (parameter_declaration) "LPFNADDPROPSHEETPAGE" (type_identifier) "LPFNADDPROPSHEETPAGE" (,) "," (parameter_declaration) "LPARAM" (type_identifier) "LPARAM" ()) ")" (;) ";" (comment) "// IContextMenu " (declaration) "STDMETHODIMP QueryContextMenu(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);" (type_identifier) "STDMETHODIMP" (function_declarator) "QueryContextMenu(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)" (identifier) "QueryContextMenu" (parameter_list) "(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)" (() "(" (parameter_declaration) "HMENU hShellMenu" (type_identifier) "HMENU" (identifier) "hShellMenu" (,) "," (parameter_declaration) "UINT indexMenu" (type_identifier) "UINT" (identifier) "indexMenu" (,) "," (parameter_declaration) "UINT idCmdFirst" (type_identifier) "UINT" (identifier) "idCmdFirst" (,) "," (parameter_declaration) "UINT idCmdLast" (type_identifier) "UINT" (identifier) "idCmdLast" (,) "," (parameter_declaration) "UINT uFlags" (type_identifier) "UINT" (identifier) "uFlags" ()) ")" (;) ";" (declaration) "STDMETHODIMP InvokeCommand( LPCMINVOKECOMMANDINFO lpcmi);" (type_identifier) "STDMETHODIMP" (function_declarator) "InvokeCommand( LPCMINVOKECOMMANDINFO lpcmi)" (identifier) "InvokeCommand" (parameter_list) "( LPCMINVOKECOMMANDINFO lpcmi)" (() "(" (parameter_declaration) "LPCMINVOKECOMMANDINFO lpcmi" (type_identifier) "LPCMINVOKECOMMANDINFO" (identifier) "lpcmi" ()) ")" (;) ";" (declaration) "STDMETHODIMP GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax);" (type_identifier) "STDMETHODIMP" (function_declarator) "GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax)" (identifier) "GetCommandString" (parameter_list) "( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax)" (() "(" (parameter_declaration) "UINT_PTR idCmd" (type_identifier) "UINT_PTR" (identifier) "idCmd" (,) "," (parameter_declaration) "UINT uFlags" (type_identifier) "UINT" (identifier) "uFlags" (,) "," (parameter_declaration) "UINT FAR* reserved" (type_identifier) "UINT" (ERROR) "FAR" (identifier) "FAR" (pointer_declarator) "* reserved" (*) "*" (identifier) "reserved" (,) "," (parameter_declaration) "LPSTR pszName" (type_identifier) "LPSTR" (identifier) "pszName" (,) "," (parameter_declaration) "UINT ccMax" (type_identifier) "UINT" (identifier) "ccMax" ()) ")" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// __security_h "
322
7
{"language": "c", "success": true, "metadata": {"lines": 64, "avg_line_length": 30.81, "nodes": 200, "errors": 0, "source_hash": "f3e49ce442efadd028ea86b8a2fc2de8ad86e16c137d4e4aef5b858232cdfa0d", "categorized_nodes": 159}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __security_h\r\n#define __security_h\r\n\r\n\r\n/*-----------------------------------------------------------------------------\r\n/ CDsSecurityClassFactory\r\n/----------------------------------------------------------------------------*/\r\n\r\nclass CDsSecurityClassFactory : public IClassFactory, CUnknown\r\n{\r\npublic:\r\n // IUnkown\r\n STDMETHODIMP_(ULONG) AddRef();\r\n STDMETHODIMP_(ULONG) Release();\r\n STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObject);\r\n\r\n // IClassFactory\r\n STDMETHODIMP CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject);\r\n STDMETHODIMP LockServer(BOOL fLock);\r\n};\r\n\r\n\r\n/*-----------------------------------------------------------------------------\r\n/ CDsSecurity\r\n/----------------------------------------------------------------------------*/\r\n\r\nclass CDsSecurity : public IShellExtInit, IShellPropSheetExt, IContextMenu, CUnknown\r\n{\r\nprivate:\r\n LPSECURITYINFO m_pSI;\r\n\r\npublic:\r\n virtual ~CDsSecurity();\r\n\r\n // IUnknown\r\n STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObject);\r\n STDMETHOD_(ULONG, AddRef)();\r\n STDMETHOD_(ULONG, Release)();\r\n\r\n // IShellExtInit\r\n STDMETHODIMP Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID);\r\n\r\n // IShellPropSheetExt methods\r\n STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE, LPARAM);\r\n STDMETHODIMP ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM);\r\n\r\n // IContextMenu\r\n STDMETHODIMP QueryContextMenu(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);\r\n STDMETHODIMP InvokeCommand( LPCMINVOKECOMMANDINFO lpcmi);\r\n STDMETHODIMP GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax);\r\n};\r\n\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 67, 77, 85, 113, 127, 136, 147, 167, 175, 199], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 63, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 2, "type": "identifier", "text": "__security_h", "parent": 0, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 20}}, {"id": 3, "type": "preproc_def", "text": "#define __security_h\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 5, "type": "identifier", "text": "__security_h", "parent": 3, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 20}}, {"id": 6, "type": "ERROR", "text": "class CDsSecurityClassFactory : public IClassFactory, CUnknown", "parent": 0, "children": [7, 8, 10], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 62}}, {"id": 7, "type": "identifier", "text": "CDsSecurityClassFactory", "parent": 6, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 29}}, {"id": 8, "type": "ERROR", "text": ": public IClassFactory", "parent": 6, "children": [9], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 52}}, {"id": 9, "type": "identifier", "text": "IClassFactory", "parent": 8, "children": [], "start_point": {"row": 18, "column": 39}, "end_point": {"row": 18, "column": 52}}, {"id": 10, "type": "identifier", "text": "CUnknown", "parent": 6, "children": [], "start_point": {"row": 18, "column": 54}, "end_point": {"row": 18, "column": 62}}, {"id": 11, "type": "labeled_statement", "text": "public:\r\n // IUnkown\r\n STDMETHODIMP_(ULONG) AddRef();", "parent": 0, "children": [12], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 22, "column": 34}}, {"id": 12, "type": "declaration", "text": "STDMETHODIMP_(ULONG) AddRef();", "parent": 11, "children": [13, 17], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 34}}, {"id": 13, "type": "macro_type_specifier", "text": "STDMETHODIMP_(ULONG)", "parent": 12, "children": [14, 15], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 24}}, {"id": 14, "type": "identifier", "text": "STDMETHODIMP_", "parent": 13, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 17}}, {"id": 15, "type": "type_descriptor", "text": "ULONG", "parent": 13, "children": [16], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 23}}, {"id": 16, "type": "type_identifier", "text": "ULONG", "parent": 15, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 23}}, {"id": 17, "type": "function_declarator", "text": "AddRef()", "parent": 12, "children": [18, 19], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 33}}, {"id": 18, "type": "identifier", "text": "AddRef", "parent": 17, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 31}}, {"id": 19, "type": "parameter_list", "text": "()", "parent": 17, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 33}}, {"id": 20, "type": "declaration", "text": "STDMETHODIMP_(ULONG) Release();", "parent": 0, "children": [21, 25], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 35}}, {"id": 21, "type": "macro_type_specifier", "text": "STDMETHODIMP_(ULONG)", "parent": 20, "children": [22, 23], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 24}}, {"id": 22, "type": "identifier", "text": "STDMETHODIMP_", "parent": 21, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 17}}, {"id": 23, "type": "type_descriptor", "text": "ULONG", "parent": 21, "children": [24], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 23}}, {"id": 24, "type": "type_identifier", "text": "ULONG", "parent": 23, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 23}}, {"id": 25, "type": "function_declarator", "text": "Release()", "parent": 20, "children": [26, 27], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 34}}, {"id": 26, "type": "identifier", "text": "Release", "parent": 25, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 32}}, {"id": 27, "type": "parameter_list", "text": "()", "parent": 25, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 34}}, {"id": 28, "type": "declaration", "text": "STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObject);", "parent": 0, "children": [29, 30], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 72}}, {"id": 29, "type": "type_identifier", "text": "STDMETHODIMP", "parent": 28, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 16}}, {"id": 30, "type": "function_declarator", "text": "QueryInterface(REFIID riid, LPVOID* ppvObject)", "parent": 28, "children": [31, 32], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 71}}, {"id": 31, "type": "identifier", "text": "QueryInterface", "parent": 30, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 39}}, {"id": 32, "type": "parameter_list", "text": "(REFIID riid, LPVOID* ppvObject)", "parent": 30, "children": [33, 36], "start_point": {"row": 24, "column": 39}, "end_point": {"row": 24, "column": 71}}, {"id": 33, "type": "parameter_declaration", "text": "REFIID riid", "parent": 32, "children": [34, 35], "start_point": {"row": 24, "column": 40}, "end_point": {"row": 24, "column": 51}}, {"id": 34, "type": "type_identifier", "text": "REFIID", "parent": 33, "children": [], "start_point": {"row": 24, "column": 40}, "end_point": {"row": 24, "column": 46}}, {"id": 35, "type": "identifier", "text": "riid", "parent": 33, "children": [], "start_point": {"row": 24, "column": 47}, "end_point": {"row": 24, "column": 51}}, {"id": 36, "type": "parameter_declaration", "text": "LPVOID* ppvObject", "parent": 32, "children": [37, 38], "start_point": {"row": 24, "column": 53}, "end_point": {"row": 24, "column": 70}}, {"id": 37, "type": "type_identifier", "text": "LPVOID", "parent": 36, "children": [], "start_point": {"row": 24, "column": 53}, "end_point": {"row": 24, "column": 59}}, {"id": 38, "type": "pointer_declarator", "text": "* ppvObject", "parent": 36, "children": [39, 40], "start_point": {"row": 24, "column": 59}, "end_point": {"row": 24, "column": 70}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 24, "column": 59}, "end_point": {"row": 24, "column": 60}}, {"id": 40, "type": "identifier", "text": "ppvObject", "parent": 38, "children": [], "start_point": {"row": 24, "column": 61}, "end_point": {"row": 24, "column": 70}}, {"id": 41, "type": "declaration", "text": "STDMETHODIMP CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject);", "parent": 0, "children": [42, 43], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 82}}, {"id": 42, "type": "type_identifier", "text": "STDMETHODIMP", "parent": 41, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 16}}, {"id": 43, "type": "function_declarator", "text": "CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject)", "parent": 41, "children": [44, 45], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 81}}, {"id": 44, "type": "identifier", "text": "CreateInstance", "parent": 43, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 31}}, {"id": 45, "type": "parameter_list", "text": "(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject)", "parent": 43, "children": [46, 51, 54], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 81}}, {"id": 46, "type": "parameter_declaration", "text": "IUnknown* pOuter", "parent": 45, "children": [47, 48], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 48}}, {"id": 47, "type": "type_identifier", "text": "IUnknown", "parent": 46, "children": [], "start_point": {"row": 27, "column": 32}, "end_point": {"row": 27, "column": 40}}, {"id": 48, "type": "pointer_declarator", "text": "* pOuter", "parent": 46, "children": [49, 50], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 48}}, {"id": 49, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 41}}, {"id": 50, "type": "identifier", "text": "pOuter", "parent": 48, "children": [], "start_point": {"row": 27, "column": 42}, "end_point": {"row": 27, "column": 48}}, {"id": 51, "type": "parameter_declaration", "text": "REFIID riid", "parent": 45, "children": [52, 53], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 61}}, {"id": 52, "type": "type_identifier", "text": "REFIID", "parent": 51, "children": [], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 56}}, {"id": 53, "type": "identifier", "text": "riid", "parent": 51, "children": [], "start_point": {"row": 27, "column": 57}, "end_point": {"row": 27, "column": 61}}, {"id": 54, "type": "parameter_declaration", "text": "LPVOID* ppvObject", "parent": 45, "children": [55, 56], "start_point": {"row": 27, "column": 63}, "end_point": {"row": 27, "column": 80}}, {"id": 55, "type": "type_identifier", "text": "LPVOID", "parent": 54, "children": [], "start_point": {"row": 27, "column": 63}, "end_point": {"row": 27, "column": 69}}, {"id": 56, "type": "pointer_declarator", "text": "* ppvObject", "parent": 54, "children": [57, 58], "start_point": {"row": 27, "column": 69}, "end_point": {"row": 27, "column": 80}}, {"id": 57, "type": "*", "text": "*", "parent": 56, "children": [], "start_point": {"row": 27, "column": 69}, "end_point": {"row": 27, "column": 70}}, {"id": 58, "type": "identifier", "text": "ppvObject", "parent": 56, "children": [], "start_point": {"row": 27, "column": 71}, "end_point": {"row": 27, "column": 80}}, {"id": 59, "type": "declaration", "text": "STDMETHODIMP LockServer(BOOL fLock);", "parent": 0, "children": [60, 61], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 40}}, {"id": 60, "type": "type_identifier", "text": "STDMETHODIMP", "parent": 59, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 16}}, {"id": 61, "type": "function_declarator", "text": "LockServer(BOOL fLock)", "parent": 59, "children": [62, 63], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 39}}, {"id": 62, "type": "identifier", "text": "LockServer", "parent": 61, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 27}}, {"id": 63, "type": "parameter_list", "text": "(BOOL fLock)", "parent": 61, "children": [64], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 39}}, {"id": 64, "type": "parameter_declaration", "text": "BOOL fLock", "parent": 63, "children": [65, 66], "start_point": {"row": 28, "column": 28}, "end_point": {"row": 28, "column": 38}}, {"id": 65, "type": "type_identifier", "text": "BOOL", "parent": 64, "children": [], "start_point": {"row": 28, "column": 28}, "end_point": {"row": 28, "column": 32}}, {"id": 66, "type": "identifier", "text": "fLock", "parent": 64, "children": [], "start_point": {"row": 28, "column": 33}, "end_point": {"row": 28, "column": 38}}, {"id": 67, "type": "declaration", "text": "class CDsSecurity : public IShellExtInit, IShellPropSheetExt, IContextMenu, CUnknown\r\n{\r\nprivate:\r\n LPSECURITYINFO m_pSI;", "parent": 0, "children": [68, 70, 71, 72, 73, 76], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 39, "column": 25}}, {"id": 68, "type": "ERROR", "text": "CDsSecurity : public", "parent": 67, "children": [69], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 26}}, {"id": 69, "type": "identifier", "text": "CDsSecurity", "parent": 68, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 17}}, {"id": 70, "type": "identifier", "text": "IShellExtInit", "parent": 67, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 40}}, {"id": 71, "type": "identifier", "text": "IShellPropSheetExt", "parent": 67, "children": [], "start_point": {"row": 36, "column": 42}, "end_point": {"row": 36, "column": 60}}, {"id": 72, "type": "identifier", "text": "IContextMenu", "parent": 67, "children": [], "start_point": {"row": 36, "column": 62}, "end_point": {"row": 36, "column": 74}}, {"id": 73, "type": "ERROR", "text": "CUnknown\r\n{\r\nprivate:\r\n LPSECURITYINFO", "parent": 67, "children": [74, 75], "start_point": {"row": 36, "column": 76}, "end_point": {"row": 39, "column": 18}}, {"id": 74, "type": "identifier", "text": "CUnknown", "parent": 73, "children": [], "start_point": {"row": 36, "column": 76}, "end_point": {"row": 36, "column": 84}}, {"id": 75, "type": "identifier", "text": "LPSECURITYINFO", "parent": 73, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 18}}, {"id": 76, "type": "identifier", "text": "m_pSI", "parent": 67, "children": [], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 24}}, {"id": 77, "type": "labeled_statement", "text": "public:\r\n virtual ~CDsSecurity();", "parent": 0, "children": [78], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 27}}, {"id": 78, "type": "declaration", "text": "virtual ~CDsSecurity();", "parent": 77, "children": [79, 80, 82], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 27}}, {"id": 79, "type": "type_identifier", "text": "virtual", "parent": 78, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 11}}, {"id": 80, "type": "ERROR", "text": "~", "parent": 78, "children": [81], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 13}}, {"id": 81, "type": "~", "text": "~", "parent": 80, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 13}}, {"id": 82, "type": "function_declarator", "text": "CDsSecurity()", "parent": 78, "children": [83, 84], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 26}}, {"id": 83, "type": "identifier", "text": "CDsSecurity", "parent": 82, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 24}}, {"id": 84, "type": "parameter_list", "text": "()", "parent": 82, "children": [], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 26}}, {"id": 85, "type": "declaration", "text": "STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObject);", "parent": 0, "children": [86, 87], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 62}}, {"id": 86, "type": "type_identifier", "text": "STDMETHOD", "parent": 85, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 13}}, {"id": 87, "type": "function_declarator", "text": "(QueryInterface)(REFIID riid, LPVOID* ppvObject)", "parent": 85, "children": [88, 90], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 61}}, {"id": 88, "type": "parenthesized_declarator", "text": "(QueryInterface)", "parent": 87, "children": [89], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 29}}, {"id": 89, "type": "identifier", "text": "QueryInterface", "parent": 88, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 28}}, {"id": 90, "type": "parameter_list", "text": "(REFIID riid, LPVOID* ppvObject)", "parent": 87, "children": [91, 94], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 61}}, {"id": 91, "type": "parameter_declaration", "text": "REFIID riid", "parent": 90, "children": [92, 93], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 41}}, {"id": 92, "type": "type_identifier", "text": "REFIID", "parent": 91, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 36}}, {"id": 93, "type": "identifier", "text": "riid", "parent": 91, "children": [], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 41}}, {"id": 94, "type": "parameter_declaration", "text": "LPVOID* ppvObject", "parent": 90, "children": [95, 96], "start_point": {"row": 45, "column": 43}, "end_point": {"row": 45, "column": 60}}, {"id": 95, "type": "type_identifier", "text": "LPVOID", "parent": 94, "children": [], "start_point": {"row": 45, "column": 43}, "end_point": {"row": 45, "column": 49}}, {"id": 96, "type": "pointer_declarator", "text": "* ppvObject", "parent": 94, "children": [97, 98], "start_point": {"row": 45, "column": 49}, "end_point": {"row": 45, "column": 60}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 45, "column": 49}, "end_point": {"row": 45, "column": 50}}, {"id": 98, "type": "identifier", "text": "ppvObject", "parent": 96, "children": [], "start_point": {"row": 45, "column": 51}, "end_point": {"row": 45, "column": 60}}, {"id": 99, "type": "call_expression", "text": "STDMETHOD_(ULONG, AddRef)()", "parent": 0, "children": [100, 105], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 31}}, {"id": 100, "type": "call_expression", "text": "STDMETHOD_(ULONG, AddRef)", "parent": 99, "children": [101, 102], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 29}}, {"id": 101, "type": "identifier", "text": "STDMETHOD_", "parent": 100, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 14}}, {"id": 102, "type": "argument_list", "text": "(ULONG, AddRef)", "parent": 100, "children": [103, 104], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 29}}, {"id": 103, "type": "identifier", "text": "ULONG", "parent": 102, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 20}}, {"id": 104, "type": "identifier", "text": "AddRef", "parent": 102, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 28}}, {"id": 105, "type": "argument_list", "text": "()", "parent": 99, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 31}}, {"id": 106, "type": "call_expression", "text": "STDMETHOD_(ULONG, Release)()", "parent": 0, "children": [107, 112], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 32}}, {"id": 107, "type": "call_expression", "text": "STDMETHOD_(ULONG, Release)", "parent": 106, "children": [108, 109], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 30}}, {"id": 108, "type": "identifier", "text": "STDMETHOD_", "parent": 107, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 14}}, {"id": 109, "type": "argument_list", "text": "(ULONG, Release)", "parent": 107, "children": [110, 111], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 30}}, {"id": 110, "type": "identifier", "text": "ULONG", "parent": 109, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 20}}, {"id": 111, "type": "identifier", "text": "Release", "parent": 109, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 29}}, {"id": 112, "type": "argument_list", "text": "()", "parent": 106, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 32}}, {"id": 113, "type": "declaration", "text": "STDMETHODIMP Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID);", "parent": 0, "children": [114, 115], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 89}}, {"id": 114, "type": "type_identifier", "text": "STDMETHODIMP", "parent": 113, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 16}}, {"id": 115, "type": "function_declarator", "text": "Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID)", "parent": 113, "children": [116, 117], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 88}}, {"id": 116, "type": "identifier", "text": "Initialize", "parent": 115, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 27}}, {"id": 117, "type": "parameter_list", "text": "(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID)", "parent": 115, "children": [118, 121, 124], "start_point": {"row": 50, "column": 27}, "end_point": {"row": 50, "column": 88}}, {"id": 118, "type": "parameter_declaration", "text": "LPCITEMIDLIST pIDFolder", "parent": 117, "children": [119, 120], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 51}}, {"id": 119, "type": "type_identifier", "text": "LPCITEMIDLIST", "parent": 118, "children": [], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 41}}, {"id": 120, "type": "identifier", "text": "pIDFolder", "parent": 118, "children": [], "start_point": {"row": 50, "column": 42}, "end_point": {"row": 50, "column": 51}}, {"id": 121, "type": "parameter_declaration", "text": "LPDATAOBJECT pDataObj", "parent": 117, "children": [122, 123], "start_point": {"row": 50, "column": 53}, "end_point": {"row": 50, "column": 74}}, {"id": 122, "type": "type_identifier", "text": "LPDATAOBJECT", "parent": 121, "children": [], "start_point": {"row": 50, "column": 53}, "end_point": {"row": 50, "column": 65}}, {"id": 123, "type": "identifier", "text": "pDataObj", "parent": 121, "children": [], "start_point": {"row": 50, "column": 66}, "end_point": {"row": 50, "column": 74}}, {"id": 124, "type": "parameter_declaration", "text": "HKEY hKeyID", "parent": 117, "children": [125, 126], "start_point": {"row": 50, "column": 76}, "end_point": {"row": 50, "column": 87}}, {"id": 125, "type": "type_identifier", "text": "HKEY", "parent": 124, "children": [], "start_point": {"row": 50, "column": 76}, "end_point": {"row": 50, "column": 80}}, {"id": 126, "type": "identifier", "text": "hKeyID", "parent": 124, "children": [], "start_point": {"row": 50, "column": 81}, "end_point": {"row": 50, "column": 87}}, {"id": 127, "type": "declaration", "text": "STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE, LPARAM);", "parent": 0, "children": [128, 129], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 56}}, {"id": 128, "type": "type_identifier", "text": "STDMETHODIMP", "parent": 127, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 16}}, {"id": 129, "type": "function_declarator", "text": "AddPages(LPFNADDPROPSHEETPAGE, LPARAM)", "parent": 127, "children": [130, 131], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 55}}, {"id": 130, "type": "identifier", "text": "AddPages", "parent": 129, "children": [], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 25}}, {"id": 131, "type": "parameter_list", "text": "(LPFNADDPROPSHEETPAGE, LPARAM)", "parent": 129, "children": [132, 134], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 55}}, {"id": 132, "type": "parameter_declaration", "text": "LPFNADDPROPSHEETPAGE", "parent": 131, "children": [133], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 46}}, {"id": 133, "type": "type_identifier", "text": "LPFNADDPROPSHEETPAGE", "parent": 132, "children": [], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 46}}, {"id": 134, "type": "parameter_declaration", "text": "LPARAM", "parent": 131, "children": [135], "start_point": {"row": 53, "column": 48}, "end_point": {"row": 53, "column": 54}}, {"id": 135, "type": "type_identifier", "text": "LPARAM", "parent": 134, "children": [], "start_point": {"row": 53, "column": 48}, "end_point": {"row": 53, "column": 54}}, {"id": 136, "type": "declaration", "text": "STDMETHODIMP ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM);", "parent": 0, "children": [137, 138], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 65}}, {"id": 137, "type": "type_identifier", "text": "STDMETHODIMP", "parent": 136, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 16}}, {"id": 138, "type": "function_declarator", "text": "ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM)", "parent": 136, "children": [139, 140], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 64}}, {"id": 139, "type": "identifier", "text": "ReplacePage", "parent": 138, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 28}}, {"id": 140, "type": "parameter_list", "text": "(UINT, LPFNADDPROPSHEETPAGE, LPARAM)", "parent": 138, "children": [141, 143, 145], "start_point": {"row": 54, "column": 28}, "end_point": {"row": 54, "column": 64}}, {"id": 141, "type": "parameter_declaration", "text": "UINT", "parent": 140, "children": [142], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 33}}, {"id": 142, "type": "type_identifier", "text": "UINT", "parent": 141, "children": [], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 33}}, {"id": 143, "type": "parameter_declaration", "text": "LPFNADDPROPSHEETPAGE", "parent": 140, "children": [144], "start_point": {"row": 54, "column": 35}, "end_point": {"row": 54, "column": 55}}, {"id": 144, "type": "type_identifier", "text": "LPFNADDPROPSHEETPAGE", "parent": 143, "children": [], "start_point": {"row": 54, "column": 35}, "end_point": {"row": 54, "column": 55}}, {"id": 145, "type": "parameter_declaration", "text": "LPARAM", "parent": 140, "children": [146], "start_point": {"row": 54, "column": 57}, "end_point": {"row": 54, "column": 63}}, {"id": 146, "type": "type_identifier", "text": "LPARAM", "parent": 145, "children": [], "start_point": {"row": 54, "column": 57}, "end_point": {"row": 54, "column": 63}}, {"id": 147, "type": "declaration", "text": "STDMETHODIMP QueryContextMenu(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);", "parent": 0, "children": [148, 149], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 114}}, {"id": 148, "type": "type_identifier", "text": "STDMETHODIMP", "parent": 147, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 16}}, {"id": 149, "type": "function_declarator", "text": "QueryContextMenu(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)", "parent": 147, "children": [150, 151], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 113}}, {"id": 150, "type": "identifier", "text": "QueryContextMenu", "parent": 149, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 33}}, {"id": 151, "type": "parameter_list", "text": "(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)", "parent": 149, "children": [152, 155, 158, 161, 164], "start_point": {"row": 57, "column": 33}, "end_point": {"row": 57, "column": 113}}, {"id": 152, "type": "parameter_declaration", "text": "HMENU hShellMenu", "parent": 151, "children": [153, 154], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 50}}, {"id": 153, "type": "type_identifier", "text": "HMENU", "parent": 152, "children": [], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 39}}, {"id": 154, "type": "identifier", "text": "hShellMenu", "parent": 152, "children": [], "start_point": {"row": 57, "column": 40}, "end_point": {"row": 57, "column": 50}}, {"id": 155, "type": "parameter_declaration", "text": "UINT indexMenu", "parent": 151, "children": [156, 157], "start_point": {"row": 57, "column": 52}, "end_point": {"row": 57, "column": 66}}, {"id": 156, "type": "type_identifier", "text": "UINT", "parent": 155, "children": [], "start_point": {"row": 57, "column": 52}, "end_point": {"row": 57, "column": 56}}, {"id": 157, "type": "identifier", "text": "indexMenu", "parent": 155, "children": [], "start_point": {"row": 57, "column": 57}, "end_point": {"row": 57, "column": 66}}, {"id": 158, "type": "parameter_declaration", "text": "UINT idCmdFirst", "parent": 151, "children": [159, 160], "start_point": {"row": 57, "column": 68}, "end_point": {"row": 57, "column": 83}}, {"id": 159, "type": "type_identifier", "text": "UINT", "parent": 158, "children": [], "start_point": {"row": 57, "column": 68}, "end_point": {"row": 57, "column": 72}}, {"id": 160, "type": "identifier", "text": "idCmdFirst", "parent": 158, "children": [], "start_point": {"row": 57, "column": 73}, "end_point": {"row": 57, "column": 83}}, {"id": 161, "type": "parameter_declaration", "text": "UINT idCmdLast", "parent": 151, "children": [162, 163], "start_point": {"row": 57, "column": 85}, "end_point": {"row": 57, "column": 99}}, {"id": 162, "type": "type_identifier", "text": "UINT", "parent": 161, "children": [], "start_point": {"row": 57, "column": 85}, "end_point": {"row": 57, "column": 89}}, {"id": 163, "type": "identifier", "text": "idCmdLast", "parent": 161, "children": [], "start_point": {"row": 57, "column": 90}, "end_point": {"row": 57, "column": 99}}, {"id": 164, "type": "parameter_declaration", "text": "UINT uFlags", "parent": 151, "children": [165, 166], "start_point": {"row": 57, "column": 101}, "end_point": {"row": 57, "column": 112}}, {"id": 165, "type": "type_identifier", "text": "UINT", "parent": 164, "children": [], "start_point": {"row": 57, "column": 101}, "end_point": {"row": 57, "column": 105}}, {"id": 166, "type": "identifier", "text": "uFlags", "parent": 164, "children": [], "start_point": {"row": 57, "column": 106}, "end_point": {"row": 57, "column": 112}}, {"id": 167, "type": "declaration", "text": "STDMETHODIMP InvokeCommand( LPCMINVOKECOMMANDINFO lpcmi);", "parent": 0, "children": [168, 169], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 61}}, {"id": 168, "type": "type_identifier", "text": "STDMETHODIMP", "parent": 167, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 16}}, {"id": 169, "type": "function_declarator", "text": "InvokeCommand( LPCMINVOKECOMMANDINFO lpcmi)", "parent": 167, "children": [170, 171], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 60}}, {"id": 170, "type": "identifier", "text": "InvokeCommand", "parent": 169, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 30}}, {"id": 171, "type": "parameter_list", "text": "( LPCMINVOKECOMMANDINFO lpcmi)", "parent": 169, "children": [172], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 60}}, {"id": 172, "type": "parameter_declaration", "text": "LPCMINVOKECOMMANDINFO lpcmi", "parent": 171, "children": [173, 174], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 59}}, {"id": 173, "type": "type_identifier", "text": "LPCMINVOKECOMMANDINFO", "parent": 172, "children": [], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 53}}, {"id": 174, "type": "identifier", "text": "lpcmi", "parent": 172, "children": [], "start_point": {"row": 58, "column": 54}, "end_point": {"row": 58, "column": 59}}, {"id": 175, "type": "declaration", "text": "STDMETHODIMP GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax);", "parent": 0, "children": [176, 177], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 111}}, {"id": 176, "type": "type_identifier", "text": "STDMETHODIMP", "parent": 175, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 16}}, {"id": 177, "type": "function_declarator", "text": "GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax)", "parent": 175, "children": [178, 179], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 110}}, {"id": 178, "type": "identifier", "text": "GetCommandString", "parent": 177, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 33}}, {"id": 179, "type": "parameter_list", "text": "( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax)", "parent": 177, "children": [180, 183, 186, 193, 196], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 110}}, {"id": 180, "type": "parameter_declaration", "text": "UINT_PTR idCmd", "parent": 179, "children": [181, 182], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 49}}, {"id": 181, "type": "type_identifier", "text": "UINT_PTR", "parent": 180, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 43}}, {"id": 182, "type": "identifier", "text": "idCmd", "parent": 180, "children": [], "start_point": {"row": 59, "column": 44}, "end_point": {"row": 59, "column": 49}}, {"id": 183, "type": "parameter_declaration", "text": "UINT uFlags", "parent": 179, "children": [184, 185], "start_point": {"row": 59, "column": 51}, "end_point": {"row": 59, "column": 62}}, {"id": 184, "type": "type_identifier", "text": "UINT", "parent": 183, "children": [], "start_point": {"row": 59, "column": 51}, "end_point": {"row": 59, "column": 55}}, {"id": 185, "type": "identifier", "text": "uFlags", "parent": 183, "children": [], "start_point": {"row": 59, "column": 56}, "end_point": {"row": 59, "column": 62}}, {"id": 186, "type": "parameter_declaration", "text": "UINT FAR* reserved", "parent": 179, "children": [187, 188, 190], "start_point": {"row": 59, "column": 64}, "end_point": {"row": 59, "column": 82}}, {"id": 187, "type": "type_identifier", "text": "UINT", "parent": 186, "children": [], "start_point": {"row": 59, "column": 64}, "end_point": {"row": 59, "column": 68}}, {"id": 188, "type": "ERROR", "text": "FAR", "parent": 186, "children": [189], "start_point": {"row": 59, "column": 69}, "end_point": {"row": 59, "column": 72}}, {"id": 189, "type": "identifier", "text": "FAR", "parent": 188, "children": [], "start_point": {"row": 59, "column": 69}, "end_point": {"row": 59, "column": 72}}, {"id": 190, "type": "pointer_declarator", "text": "* reserved", "parent": 186, "children": [191, 192], "start_point": {"row": 59, "column": 72}, "end_point": {"row": 59, "column": 82}}, {"id": 191, "type": "*", "text": "*", "parent": 190, "children": [], "start_point": {"row": 59, "column": 72}, "end_point": {"row": 59, "column": 73}}, {"id": 192, "type": "identifier", "text": "reserved", "parent": 190, "children": [], "start_point": {"row": 59, "column": 74}, "end_point": {"row": 59, "column": 82}}, {"id": 193, "type": "parameter_declaration", "text": "LPSTR pszName", "parent": 179, "children": [194, 195], "start_point": {"row": 59, "column": 84}, "end_point": {"row": 59, "column": 97}}, {"id": 194, "type": "type_identifier", "text": "LPSTR", "parent": 193, "children": [], "start_point": {"row": 59, "column": 84}, "end_point": {"row": 59, "column": 89}}, {"id": 195, "type": "identifier", "text": "pszName", "parent": 193, "children": [], "start_point": {"row": 59, "column": 90}, "end_point": {"row": 59, "column": 97}}, {"id": 196, "type": "parameter_declaration", "text": "UINT ccMax", "parent": 179, "children": [197, 198], "start_point": {"row": 59, "column": 99}, "end_point": {"row": 59, "column": 109}}, {"id": 197, "type": "type_identifier", "text": "UINT", "parent": 196, "children": [], "start_point": {"row": 59, "column": 99}, "end_point": {"row": 59, "column": 103}}, {"id": 198, "type": "identifier", "text": "ccMax", "parent": 196, "children": [], "start_point": {"row": 59, "column": 104}, "end_point": {"row": 59, "column": 109}}, {"id": 199, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 6}}]}, "node_categories": {"declarations": {"functions": [17, 25, 30, 43, 61, 82, 87, 115, 129, 138, 149, 169, 177], "variables": [12, 20, 28, 33, 36, 41, 46, 51, 54, 59, 64, 67, 78, 85, 91, 94, 113, 118, 121, 124, 127, 132, 134, 136, 141, 143, 145, 147, 152, 155, 158, 161, 164, 167, 172, 175, 180, 183, 186, 193, 196], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [99, 100, 106, 107], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 7, 9, 10, 13, 14, 16, 18, 21, 22, 24, 26, 29, 31, 34, 35, 37, 40, 42, 44, 47, 50, 52, 53, 55, 58, 60, 62, 65, 66, 69, 70, 71, 72, 74, 75, 76, 79, 83, 86, 89, 92, 93, 95, 98, 101, 103, 104, 108, 110, 111, 114, 116, 119, 120, 122, 123, 125, 126, 128, 130, 133, 135, 137, 139, 142, 144, 146, 148, 150, 153, 154, 156, 157, 159, 160, 162, 163, 165, 166, 168, 170, 173, 174, 176, 178, 181, 182, 184, 185, 187, 189, 192, 194, 195, 197, 198, 199], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 17, "universal_type": "function", "name": "unknown", "text_snippet": "AddRef()"}, {"node_id": 25, "universal_type": "function", "name": "unknown", "text_snippet": "Release()"}, {"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "QueryInterface(REFIID riid, LPVOID* ppvObject)"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject)"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "LockServer(BOOL fLock)"}, {"node_id": 82, "universal_type": "function", "name": "unknown", "text_snippet": "CDsSecurity()"}, {"node_id": 87, "universal_type": "function", "name": "unknown", "text_snippet": "(QueryInterface)(REFIID riid, LPVOID* ppvObject)"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID)"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "AddPages(LPFNADDPROPSHEETPAGE, LPARAM)"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM)"}, {"node_id": 149, "universal_type": "function", "name": "unknown", "text_snippet": "QueryContextMenu(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)"}, {"node_id": 169, "universal_type": "function", "name": "unknown", "text_snippet": "InvokeCommand( LPCMINVOKECOMMANDINFO lpcmi)"}, {"node_id": 177, "universal_type": "function", "name": "unknown", "text_snippet": "GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//+-------------------------------------------------------------------------\r\n//\r\n// Microsoft Windows\r\n//\r\n// Copyright (C) Microsoft Corporation, 1997 - 1999\r\n//\r\n// File: security.h\r\n//\r\n//--------------------------------------------------------------------------\r\n\r\n#ifndef __security_h\r\n#define __security_h\r\n\r\n\r\n/*-----------------------------------------------------------------------------\r\n/ CDsSecurityClassFactory\r\n/----------------------------------------------------------------------------*/\r\n\r\nclass CDsSecurityClassFactory : public IClassFactory, CUnknown\r\n{\r\npublic:\r\n // IUnkown\r\n STDMETHODIMP_(ULONG) AddRef();\r\n STDMETHODIMP_(ULONG) Release();\r\n STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObject);\r\n\r\n // IClassFactory\r\n STDMETHODIMP CreateInstance(IUnknown* pOuter, REFIID riid, LPVOID* ppvObject);\r\n STDMETHODIMP LockServer(BOOL fLock);\r\n};\r\n\r\n\r\n/*-----------------------------------------------------------------------------\r\n/ CDsSecurity\r\n/----------------------------------------------------------------------------*/\r\n\r\nclass CDsSecurity : public IShellExtInit, IShellPropSheetExt, IContextMenu, CUnknown\r\n{\r\nprivate:\r\n LPSECURITYINFO m_pSI;\r\n\r\npublic:\r\n virtual ~CDsSecurity();\r\n\r\n // IUnknown\r\n STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObject);\r\n STDMETHOD_(ULONG, AddRef)();\r\n STDMETHOD_(ULONG, Release)();\r\n\r\n // IShellExtInit\r\n STDMETHODIMP Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID);\r\n\r\n // IShellPropSheetExt methods\r\n STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE, LPARAM);\r\n STDMETHODIMP ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM);\r\n\r\n // IContextMenu\r\n STDMETHODIMP QueryContextMenu(HMENU hShellMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);\r\n STDMETHODIMP InvokeCommand( LPCMINVOKECOMMANDINFO lpcmi);\r\n STDMETHODIMP GetCommandString( UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved, LPSTR pszName, UINT ccMax);\r\n};\r\n\r\n\r\n#endif // __security_h\r\n"}
80,935
c
#ifndef HASHCHECKER_H #define HASHCHECKER_H #include <QList> #include <QRunnable> #include <QThread> #include <functional> #include "Json/Entity.hpp" #ifdef TARGET_UNIX #define TARGETSTR "linux" #elif TARGET_WINDOWS #define TARGETSTR "windows" #elif TARGET_MACOS #define TARGETSTR "macos" #endif class HashChecker : public QObject, private QRunnable { Q_OBJECT public: static HashChecker * needUpdate(json::Entity const &sheet, QObject *parent = nullptr); static void createGameHash(json::Entity &sheet); void abort(void); void run(); signals: void onComplete(json::Entity data); private: static inline json::Entity _getFor(QString &&absPath, json::Entity &datas, QString &&path); explicit HashChecker(QObject *parent, json::Entity const &sheet); json::Entity _sheet; bool _aborted = false; }; #endif // HASHCHECKER_H
25.35
34
(translation_unit) "#ifndef HASHCHECKER_H\n#define HASHCHECKER_H\n\n#include <QList>\n#include <QRunnable>\n#include <QThread>\n#include <functional>\n#include "Json/Entity.hpp"\n\n#ifdef TARGET_UNIX\n #define TARGETSTR "linux"\n#elif TARGET_WINDOWS\n #define TARGETSTR "windows"\n#elif TARGET_MACOS\n #define TARGETSTR "macos"\n#endif\n\nclass HashChecker : public QObject, private QRunnable\n{\n Q_OBJECT\npublic:\n static HashChecker *\n needUpdate(json::Entity const &sheet, QObject *parent = nullptr);\n static void\n createGameHash(json::Entity &sheet);\n\n void abort(void);\n void run();\nsignals:\n void onComplete(json::Entity data);\nprivate:\n static inline json::Entity\n _getFor(QString &&absPath, json::Entity &datas, QString &&path);\n\n explicit HashChecker(QObject *parent, json::Entity const &sheet);\n\n json::Entity _sheet;\n bool _aborted = false;\n};\n\n#endif // HASHCHECKER_H\n" (preproc_ifdef) "#ifndef HASHCHECKER_H\n#define HASHCHECKER_H\n\n#include <QList>\n#include <QRunnable>\n#include <QThread>\n#include <functional>\n#include "Json/Entity.hpp"\n\n#ifdef TARGET_UNIX\n #define TARGETSTR "linux"\n#elif TARGET_WINDOWS\n #define TARGETSTR "windows"\n#elif TARGET_MACOS\n #define TARGETSTR "macos"\n#endif\n\nclass HashChecker : public QObject, private QRunnable\n{\n Q_OBJECT\npublic:\n static HashChecker *\n needUpdate(json::Entity const &sheet, QObject *parent = nullptr);\n static void\n createGameHash(json::Entity &sheet);\n\n void abort(void);\n void run();\nsignals:\n void onComplete(json::Entity data);\nprivate:\n static inline json::Entity\n _getFor(QString &&absPath, json::Entity &datas, QString &&path);\n\n explicit HashChecker(QObject *parent, json::Entity const &sheet);\n\n json::Entity _sheet;\n bool _aborted = false;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "HASHCHECKER_H" (preproc_def) "#define HASHCHECKER_H\n" (#define) "#define" (identifier) "HASHCHECKER_H" (preproc_include) "#include <QList>\n" (#include) "#include" (system_lib_string) "<QList>" (preproc_include) "#include <QRunnable>\n" (#include) "#include" (system_lib_string) "<QRunnable>" (preproc_include) "#include <QThread>\n" (#include) "#include" (system_lib_string) "<QThread>" (preproc_include) "#include <functional>\n" (#include) "#include" (system_lib_string) "<functional>" (preproc_include) "#include "Json/Entity.hpp"\n" (#include) "#include" (string_literal) ""Json/Entity.hpp"" (") """ (string_content) "Json/Entity.hpp" (") """ (preproc_ifdef) "#ifdef TARGET_UNIX\n #define TARGETSTR "linux"\n#elif TARGET_WINDOWS\n #define TARGETSTR "windows"\n#elif TARGET_MACOS\n #define TARGETSTR "macos"\n#endif" (#ifdef) "#ifdef" (identifier) "TARGET_UNIX" (preproc_def) "#define TARGETSTR "linux"\n" (#define) "#define" (identifier) "TARGETSTR" (preproc_arg) ""linux"" (preproc_elif) "#elif TARGET_WINDOWS\n #define TARGETSTR "windows"\n#elif TARGET_MACOS\n #define TARGETSTR "macos"\n" (#elif) "#elif" (identifier) "TARGET_WINDOWS" ( ) "\n" (preproc_def) "#define TARGETSTR "windows"\n" (#define) "#define" (identifier) "TARGETSTR" (preproc_arg) ""windows"" (preproc_elif) "#elif TARGET_MACOS\n #define TARGETSTR "macos"\n" (#elif) "#elif" (identifier) "TARGET_MACOS" ( ) "\n" (preproc_def) "#define TARGETSTR "macos"\n" (#define) "#define" (identifier) "TARGETSTR" (preproc_arg) ""macos"" (#endif) "#endif" (ERROR) "class HashChecker : public QObject, private QRunnable" (type_identifier) "class" (identifier) "HashChecker" (ERROR) ": public QObject" (:) ":" (identifier) "public" (identifier) "QObject" (,) "," (identifier) "private" (identifier) "QRunnable" (compound_statement) "{\n Q_OBJECT\npublic:\n static HashChecker *\n needUpdate(json::Entity const &sheet, QObject *parent = nullptr);\n static void\n createGameHash(json::Entity &sheet);\n\n void abort(void);\n void run();\nsignals:\n void onComplete(json::Entity data);\nprivate:\n static inline json::Entity\n _getFor(QString &&absPath, json::Entity &datas, QString &&path);\n\n explicit HashChecker(QObject *parent, json::Entity const &sheet);\n\n json::Entity _sheet;\n bool _aborted = false;\n}" ({) "{" (ERROR) "Q_OBJECT\npublic:" (type_identifier) "Q_OBJECT" (identifier) "public" (:) ":" (declaration) "static HashChecker *\n needUpdate(json::Entity const &sheet, QObject *parent = nullptr);" (storage_class_specifier) "static" (static) "static" (type_identifier) "HashChecker" (init_declarator) "*\n needUpdate(json::Entity const &sheet, QObject *parent = nullptr" (pointer_declarator) "*\n needUpdate(json::Entity const &sheet, QObject *parent" (*) "*" (function_declarator) "needUpdate(json::Entity const &sheet, QObject *parent" (identifier) "needUpdate" (parameter_list) "(json::Entity const &sheet, QObject *parent" (() "(" (parameter_declaration) "json::Entity const &sheet" (type_identifier) "json" (ERROR) "::Entity const &" (:) ":" (:) ":" (identifier) "Entity" (identifier) "const" (&) "&" (identifier) "sheet" (,) "," (parameter_declaration) "QObject *parent" (type_identifier) "QObject" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" ()) "" (=) "=" (null) "nullptr" (nullptr) "nullptr" (ERROR) ")" ()) ")" (;) ";" (declaration) "static void\n createGameHash(json::Entity &sheet);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "createGameHash(json::Entity &sheet)" (identifier) "createGameHash" (parameter_list) "(json::Entity &sheet)" (() "(" (parameter_declaration) "json::Entity &sheet" (type_identifier) "json" (ERROR) "::Entity &" (:) ":" (:) ":" (identifier) "Entity" (&) "&" (identifier) "sheet" ()) ")" (;) ";" (declaration) "void abort(void);" (primitive_type) "void" (function_declarator) "abort(void)" (identifier) "abort" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void run();" (primitive_type) "void" (function_declarator) "run()" (identifier) "run" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "signals:\n void onComplete(json::Entity data);" (statement_identifier) "signals" (:) ":" (declaration) "void onComplete(json::Entity data);" (primitive_type) "void" (function_declarator) "onComplete(json::Entity data)" (identifier) "onComplete" (parameter_list) "(json::Entity data)" (() "(" (parameter_declaration) "json::Entity data" (type_identifier) "json" (ERROR) "::Entity" (:) ":" (:) ":" (identifier) "Entity" (identifier) "data" ()) ")" (;) ";" (labeled_statement) "private:\n static inline json::Entity\n _getFor(QString &&absPath, json::Entity &datas, QString &&path);" (statement_identifier) "private" (:) ":" (declaration) "static inline json::Entity\n _getFor(QString &&absPath, json::Entity &datas, QString &&path);" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (type_identifier) "json" (ERROR) "::Entity" (:) ":" (:) ":" (identifier) "Entity" (function_declarator) "_getFor(QString &&absPath, json::Entity &datas, QString &&path)" (identifier) "_getFor" (parameter_list) "(QString &&absPath, json::Entity &datas, QString &&path)" (() "(" (parameter_declaration) "QString &&absPath" (type_identifier) "QString" (ERROR) "&&" (&&) "&&" (identifier) "absPath" (,) "," (parameter_declaration) "json::Entity &datas" (type_identifier) "json" (ERROR) "::Entity &" (:) ":" (:) ":" (identifier) "Entity" (&) "&" (identifier) "datas" (,) "," (parameter_declaration) "QString &&path" (type_identifier) "QString" (ERROR) "&&" (&&) "&&" (identifier) "path" ()) ")" (;) ";" (declaration) "explicit HashChecker(QObject *parent, json::Entity const &sheet);" (type_identifier) "explicit" (function_declarator) "HashChecker(QObject *parent, json::Entity const &sheet)" (identifier) "HashChecker" (parameter_list) "(QObject *parent, json::Entity const &sheet)" (() "(" (parameter_declaration) "QObject *parent" (type_identifier) "QObject" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" (,) "," (parameter_declaration) "json::Entity const &sheet" (type_identifier) "json" (ERROR) "::Entity const &" (:) ":" (:) ":" (identifier) "Entity" (identifier) "const" (&) "&" (identifier) "sheet" ()) ")" (;) ";" (labeled_statement) "json::Entity _sheet;" (statement_identifier) "json" (:) ":" (ERROR) ":" (:) ":" (declaration) "Entity _sheet;" (type_identifier) "Entity" (identifier) "_sheet" (;) ";" (declaration) "bool _aborted = false;" (primitive_type) "bool" (init_declarator) "_aborted = false" (identifier) "_aborted" (=) "=" (false) "false" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// HASHCHECKER_H"
235
13
{"language": "c", "success": true, "metadata": {"lines": 34, "avg_line_length": 25.35, "nodes": 159, "errors": 0, "source_hash": "2419e8cdf7f43cab057d03f8657f475fd26b458e505a7f4e2df95faa5641c23b", "categorized_nodes": 103}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef HASHCHECKER_H\n#define HASHCHECKER_H\n\n#include <QList>\n#include <QRunnable>\n#include <QThread>\n#include <functional>\n#include \"Json/Entity.hpp\"\n\n#ifdef TARGET_UNIX\n #define TARGETSTR \"linux\"\n#elif TARGET_WINDOWS\n #define TARGETSTR \"windows\"\n#elif TARGET_MACOS\n #define TARGETSTR \"macos\"\n#endif\n\nclass HashChecker : public QObject, private QRunnable\n{\n Q_OBJECT\npublic:\n static HashChecker *\n needUpdate(json::Entity const &sheet, QObject *parent = nullptr);\n static void\n createGameHash(json::Entity &sheet);\n\n void abort(void);\n void run();\nsignals:\n void onComplete(json::Entity data);\nprivate:\n static inline json::Entity\n _getFor(QString &&absPath, json::Entity &datas, QString &&path);\n\n explicit HashChecker(QObject *parent, json::Entity const &sheet);\n\n json::Entity _sheet;\n bool _aborted = false;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 45, 158], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 40, "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": "HASHCHECKER_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 21}}, {"id": 3, "type": "preproc_def", "text": "#define HASHCHECKER_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": "HASHCHECKER_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include <QList>\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": "<QList>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 16}}, {"id": 9, "type": "preproc_include", "text": "#include <QRunnable>\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": "<QRunnable>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include <QThread>\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": "<QThread>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include <functional>\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": "<functional>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 21}}, {"id": 18, "type": "preproc_include", "text": "#include \"Json/Entity.hpp\"\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": "\"Json/Entity.hpp\"", "parent": 18, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 26}}, {"id": 21, "type": "preproc_ifdef", "text": "#ifdef TARGET_UNIX\n #define TARGETSTR \"linux\"\n#elif TARGET_WINDOWS\n #define TARGETSTR \"windows\"\n#elif TARGET_MACOS\n #define TARGETSTR \"macos\"\n#endif", "parent": 0, "children": [22, 23, 24, 28, 44], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 22, "type": "#ifdef", "text": "#ifdef", "parent": 21, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 23, "type": "identifier", "text": "TARGET_UNIX", "parent": 21, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 18}}, {"id": 24, "type": "preproc_def", "text": "#define TARGETSTR \"linux\"\n", "parent": 21, "children": [25, 26, 27], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 11, "column": 0}}, {"id": 25, "type": "#define", "text": "#define", "parent": 24, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 8}}, {"id": 26, "type": "identifier", "text": "TARGETSTR", "parent": 24, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 18}}, {"id": 27, "type": "preproc_arg", "text": "\"linux\"", "parent": 24, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 26}}, {"id": 28, "type": "preproc_elif", "text": "#elif TARGET_WINDOWS\n #define TARGETSTR \"windows\"\n#elif TARGET_MACOS\n #define TARGETSTR \"macos\"\n", "parent": 21, "children": [29, 30, 31, 32, 36], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 29, "type": "#elif", "text": "#elif", "parent": 28, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 5}}, {"id": 30, "type": "identifier", "text": "TARGET_WINDOWS", "parent": 28, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 20}}, {"id": 31, "type": "\n", "text": "\n", "parent": 28, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 12, "column": 0}}, {"id": 32, "type": "preproc_def", "text": "#define TARGETSTR \"windows\"\n", "parent": 28, "children": [33, 34, 35], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 13, "column": 0}}, {"id": 33, "type": "#define", "text": "#define", "parent": 32, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 8}}, {"id": 34, "type": "identifier", "text": "TARGETSTR", "parent": 32, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 18}}, {"id": 35, "type": "preproc_arg", "text": "\"windows\"", "parent": 32, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 28}}, {"id": 36, "type": "preproc_elif", "text": "#elif TARGET_MACOS\n #define TARGETSTR \"macos\"\n", "parent": 28, "children": [37, 38, 39, 40], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 37, "type": "#elif", "text": "#elif", "parent": 36, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 5}}, {"id": 38, "type": "identifier", "text": "TARGET_MACOS", "parent": 36, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 18}}, {"id": 39, "type": "\n", "text": "\n", "parent": 36, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 14, "column": 0}}, {"id": 40, "type": "preproc_def", "text": "#define TARGETSTR \"macos\"\n", "parent": 36, "children": [41, 42, 43], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 15, "column": 0}}, {"id": 41, "type": "#define", "text": "#define", "parent": 40, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 8}}, {"id": 42, "type": "identifier", "text": "TARGETSTR", "parent": 40, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 18}}, {"id": 43, "type": "preproc_arg", "text": "\"macos\"", "parent": 40, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 26}}, {"id": 44, "type": "#endif", "text": "#endif", "parent": 21, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 45, "type": "ERROR", "text": "class HashChecker : public QObject, private QRunnable", "parent": 0, "children": [46, 47, 49], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 53}}, {"id": 46, "type": "identifier", "text": "HashChecker", "parent": 45, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 17}}, {"id": 47, "type": "ERROR", "text": ": public QObject", "parent": 45, "children": [48], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 34}}, {"id": 48, "type": "identifier", "text": "QObject", "parent": 47, "children": [], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 34}}, {"id": 49, "type": "identifier", "text": "QRunnable", "parent": 45, "children": [], "start_point": {"row": 17, "column": 44}, "end_point": {"row": 17, "column": 53}}, {"id": 50, "type": "ERROR", "text": "Q_OBJECT\npublic:", "parent": 0, "children": [51], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 20, "column": 7}}, {"id": 51, "type": "type_identifier", "text": "Q_OBJECT", "parent": 50, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 12}}, {"id": 52, "type": "declaration", "text": "static HashChecker *\n needUpdate(json::Entity const &sheet, QObject *parent = nullptr);", "parent": 0, "children": [53, 54], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 22, "column": 69}}, {"id": 53, "type": "type_identifier", "text": "HashChecker", "parent": 52, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 22}}, {"id": 54, "type": "init_declarator", "text": "*\n needUpdate(json::Entity const &sheet, QObject *parent = nullptr", "parent": 52, "children": [55, 70, 71], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 22, "column": 67}}, {"id": 55, "type": "pointer_declarator", "text": "*\n needUpdate(json::Entity const &sheet, QObject *parent", "parent": 54, "children": [56, 57], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 22, "column": 57}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 24}}, {"id": 57, "type": "function_declarator", "text": "needUpdate(json::Entity const &sheet, QObject *parent", "parent": 55, "children": [58, 59], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 57}}, {"id": 58, "type": "identifier", "text": "needUpdate", "parent": 57, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 14}}, {"id": 59, "type": "parameter_list", "text": "(json::Entity const &sheet, QObject *parent", "parent": 57, "children": [60, 65], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 57}}, {"id": 60, "type": "parameter_declaration", "text": "json::Entity const &sheet", "parent": 59, "children": [61, 62, 64], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 40}}, {"id": 61, "type": "type_identifier", "text": "json", "parent": 60, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 19}}, {"id": 62, "type": "ERROR", "text": "::Entity const &", "parent": 60, "children": [63], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 35}}, {"id": 63, "type": "identifier", "text": "Entity", "parent": 62, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 27}}, {"id": 64, "type": "identifier", "text": "sheet", "parent": 60, "children": [], "start_point": {"row": 22, "column": 35}, "end_point": {"row": 22, "column": 40}}, {"id": 65, "type": "parameter_declaration", "text": "QObject *parent", "parent": 59, "children": [66, 67], "start_point": {"row": 22, "column": 42}, "end_point": {"row": 22, "column": 57}}, {"id": 66, "type": "type_identifier", "text": "QObject", "parent": 65, "children": [], "start_point": {"row": 22, "column": 42}, "end_point": {"row": 22, "column": 49}}, {"id": 67, "type": "pointer_declarator", "text": "*parent", "parent": 65, "children": [68, 69], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 57}}, {"id": 68, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 22, "column": 50}, "end_point": {"row": 22, "column": 51}}, {"id": 69, "type": "identifier", "text": "parent", "parent": 67, "children": [], "start_point": {"row": 22, "column": 51}, "end_point": {"row": 22, "column": 57}}, {"id": 70, "type": "=", "text": "=", "parent": 54, "children": [], "start_point": {"row": 22, "column": 58}, "end_point": {"row": 22, "column": 59}}, {"id": 71, "type": "null", "text": "nullptr", "parent": 54, "children": [72], "start_point": {"row": 22, "column": 60}, "end_point": {"row": 22, "column": 67}}, {"id": 72, "type": "nullptr", "text": "nullptr", "parent": 71, "children": [], "start_point": {"row": 22, "column": 60}, "end_point": {"row": 22, "column": 67}}, {"id": 73, "type": "declaration", "text": "static void\n createGameHash(json::Entity &sheet);", "parent": 0, "children": [74, 75], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 24, "column": 40}}, {"id": 74, "type": "primitive_type", "text": "void", "parent": 73, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 15}}, {"id": 75, "type": "function_declarator", "text": "createGameHash(json::Entity &sheet)", "parent": 73, "children": [76, 77], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 39}}, {"id": 76, "type": "identifier", "text": "createGameHash", "parent": 75, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 18}}, {"id": 77, "type": "parameter_list", "text": "(json::Entity &sheet)", "parent": 75, "children": [78], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 39}}, {"id": 78, "type": "parameter_declaration", "text": "json::Entity &sheet", "parent": 77, "children": [79, 80, 82], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 38}}, {"id": 79, "type": "type_identifier", "text": "json", "parent": 78, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 23}}, {"id": 80, "type": "ERROR", "text": "::Entity &", "parent": 78, "children": [81], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 33}}, {"id": 81, "type": "identifier", "text": "Entity", "parent": 80, "children": [], "start_point": {"row": 24, "column": 25}, "end_point": {"row": 24, "column": 31}}, {"id": 82, "type": "identifier", "text": "sheet", "parent": 78, "children": [], "start_point": {"row": 24, "column": 33}, "end_point": {"row": 24, "column": 38}}, {"id": 83, "type": "declaration", "text": "void abort(void);", "parent": 0, "children": [84, 85], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 24}}, {"id": 84, "type": "primitive_type", "text": "void", "parent": 83, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 8}}, {"id": 85, "type": "function_declarator", "text": "abort(void)", "parent": 83, "children": [86, 87], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 23}}, {"id": 86, "type": "identifier", "text": "abort", "parent": 85, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 17}}, {"id": 87, "type": "parameter_list", "text": "(void)", "parent": 85, "children": [88], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 23}}, {"id": 88, "type": "parameter_declaration", "text": "void", "parent": 87, "children": [89], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 22}}, {"id": 89, "type": "primitive_type", "text": "void", "parent": 88, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 22}}, {"id": 90, "type": "declaration", "text": "void run();", "parent": 0, "children": [91, 92], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 18}}, {"id": 91, "type": "primitive_type", "text": "void", "parent": 90, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 8}}, {"id": 92, "type": "function_declarator", "text": "run()", "parent": 90, "children": [93, 94], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 17}}, {"id": 93, "type": "identifier", "text": "run", "parent": 92, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 15}}, {"id": 94, "type": "parameter_list", "text": "()", "parent": 92, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 17}}, {"id": 95, "type": "labeled_statement", "text": "signals:\n void onComplete(json::Entity data);", "parent": 0, "children": [96, 97], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 42}}, {"id": 96, "type": "statement_identifier", "text": "signals", "parent": 95, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 97, "type": "declaration", "text": "void onComplete(json::Entity data);", "parent": 95, "children": [98, 99], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 42}}, {"id": 98, "type": "primitive_type", "text": "void", "parent": 97, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 8}}, {"id": 99, "type": "function_declarator", "text": "onComplete(json::Entity data)", "parent": 97, "children": [100, 101], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 41}}, {"id": 100, "type": "identifier", "text": "onComplete", "parent": 99, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 22}}, {"id": 101, "type": "parameter_list", "text": "(json::Entity data)", "parent": 99, "children": [102], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 41}}, {"id": 102, "type": "parameter_declaration", "text": "json::Entity data", "parent": 101, "children": [103, 104, 106], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 40}}, {"id": 103, "type": "type_identifier", "text": "json", "parent": 102, "children": [], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 27}}, {"id": 104, "type": "ERROR", "text": "::Entity", "parent": 102, "children": [105], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 35}}, {"id": 105, "type": "identifier", "text": "Entity", "parent": 104, "children": [], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 35}}, {"id": 106, "type": "identifier", "text": "data", "parent": 102, "children": [], "start_point": {"row": 29, "column": 36}, "end_point": {"row": 29, "column": 40}}, {"id": 107, "type": "labeled_statement", "text": "private:\n static inline json::Entity\n _getFor(QString &&absPath, json::Entity &datas, QString &&path);", "parent": 0, "children": [108], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 32, "column": 68}}, {"id": 108, "type": "declaration", "text": "static inline json::Entity\n _getFor(QString &&absPath, json::Entity &datas, QString &&path);", "parent": 107, "children": [109, 111, 112, 114], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 32, "column": 68}}, {"id": 109, "type": "storage_class_specifier", "text": "inline", "parent": 108, "children": [110], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 17}}, {"id": 110, "type": "inline", "text": "inline", "parent": 109, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 17}}, {"id": 111, "type": "type_identifier", "text": "json", "parent": 108, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 22}}, {"id": 112, "type": "ERROR", "text": "::Entity", "parent": 108, "children": [113], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 30}}, {"id": 113, "type": "identifier", "text": "Entity", "parent": 112, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 30}}, {"id": 114, "type": "function_declarator", "text": "_getFor(QString &&absPath, json::Entity &datas, QString &&path)", "parent": 108, "children": [115, 116], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 67}}, {"id": 115, "type": "identifier", "text": "_getFor", "parent": 114, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 11}}, {"id": 116, "type": "parameter_list", "text": "(QString &&absPath, json::Entity &datas, QString &&path)", "parent": 114, "children": [117, 122, 127], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 67}}, {"id": 117, "type": "parameter_declaration", "text": "QString &&absPath", "parent": 116, "children": [118, 119, 121], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 29}}, {"id": 118, "type": "type_identifier", "text": "QString", "parent": 117, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 19}}, {"id": 119, "type": "ERROR", "text": "&&", "parent": 117, "children": [120], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 22}}, {"id": 120, "type": "&&", "text": "&&", "parent": 119, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 22}}, {"id": 121, "type": "identifier", "text": "absPath", "parent": 117, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 29}}, {"id": 122, "type": "parameter_declaration", "text": "json::Entity &datas", "parent": 116, "children": [123, 124, 126], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 50}}, {"id": 123, "type": "type_identifier", "text": "json", "parent": 122, "children": [], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 35}}, {"id": 124, "type": "ERROR", "text": "::Entity &", "parent": 122, "children": [125], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 45}}, {"id": 125, "type": "identifier", "text": "Entity", "parent": 124, "children": [], "start_point": {"row": 32, "column": 37}, "end_point": {"row": 32, "column": 43}}, {"id": 126, "type": "identifier", "text": "datas", "parent": 122, "children": [], "start_point": {"row": 32, "column": 45}, "end_point": {"row": 32, "column": 50}}, {"id": 127, "type": "parameter_declaration", "text": "QString &&path", "parent": 116, "children": [128, 129, 131], "start_point": {"row": 32, "column": 52}, "end_point": {"row": 32, "column": 66}}, {"id": 128, "type": "type_identifier", "text": "QString", "parent": 127, "children": [], "start_point": {"row": 32, "column": 52}, "end_point": {"row": 32, "column": 59}}, {"id": 129, "type": "ERROR", "text": "&&", "parent": 127, "children": [130], "start_point": {"row": 32, "column": 60}, "end_point": {"row": 32, "column": 62}}, {"id": 130, "type": "&&", "text": "&&", "parent": 129, "children": [], "start_point": {"row": 32, "column": 60}, "end_point": {"row": 32, "column": 62}}, {"id": 131, "type": "identifier", "text": "path", "parent": 127, "children": [], "start_point": {"row": 32, "column": 62}, "end_point": {"row": 32, "column": 66}}, {"id": 132, "type": "declaration", "text": "explicit HashChecker(QObject *parent, json::Entity const &sheet);", "parent": 0, "children": [133, 134], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 69}}, {"id": 133, "type": "type_identifier", "text": "explicit", "parent": 132, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 12}}, {"id": 134, "type": "function_declarator", "text": "HashChecker(QObject *parent, json::Entity const &sheet)", "parent": 132, "children": [135, 136], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 68}}, {"id": 135, "type": "identifier", "text": "HashChecker", "parent": 134, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 24}}, {"id": 136, "type": "parameter_list", "text": "(QObject *parent, json::Entity const &sheet)", "parent": 134, "children": [137, 142], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 68}}, {"id": 137, "type": "parameter_declaration", "text": "QObject *parent", "parent": 136, "children": [138, 139], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 40}}, {"id": 138, "type": "type_identifier", "text": "QObject", "parent": 137, "children": [], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 32}}, {"id": 139, "type": "pointer_declarator", "text": "*parent", "parent": 137, "children": [140, 141], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 40}}, {"id": 140, "type": "*", "text": "*", "parent": 139, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 34}}, {"id": 141, "type": "identifier", "text": "parent", "parent": 139, "children": [], "start_point": {"row": 34, "column": 34}, "end_point": {"row": 34, "column": 40}}, {"id": 142, "type": "parameter_declaration", "text": "json::Entity const &sheet", "parent": 136, "children": [143, 144, 146], "start_point": {"row": 34, "column": 42}, "end_point": {"row": 34, "column": 67}}, {"id": 143, "type": "type_identifier", "text": "json", "parent": 142, "children": [], "start_point": {"row": 34, "column": 42}, "end_point": {"row": 34, "column": 46}}, {"id": 144, "type": "ERROR", "text": "::Entity const &", "parent": 142, "children": [145], "start_point": {"row": 34, "column": 46}, "end_point": {"row": 34, "column": 62}}, {"id": 145, "type": "identifier", "text": "Entity", "parent": 144, "children": [], "start_point": {"row": 34, "column": 48}, "end_point": {"row": 34, "column": 54}}, {"id": 146, "type": "identifier", "text": "sheet", "parent": 142, "children": [], "start_point": {"row": 34, "column": 62}, "end_point": {"row": 34, "column": 67}}, {"id": 147, "type": "labeled_statement", "text": "json::Entity _sheet;", "parent": 0, "children": [148, 149], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 27}}, {"id": 148, "type": "statement_identifier", "text": "json", "parent": 147, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 149, "type": "declaration", "text": "Entity _sheet;", "parent": 147, "children": [150, 151], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 27}}, {"id": 150, "type": "type_identifier", "text": "Entity", "parent": 149, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 16}}, {"id": 151, "type": "identifier", "text": "_sheet", "parent": 149, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 26}}, {"id": 152, "type": "declaration", "text": "bool _aborted = false;", "parent": 0, "children": [153, 154], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 37}}, {"id": 153, "type": "primitive_type", "text": "bool", "parent": 152, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 8}}, {"id": 154, "type": "init_declarator", "text": "_aborted = false", "parent": 152, "children": [155, 156, 157], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 36}}, {"id": 155, "type": "identifier", "text": "_aborted", "parent": 154, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 28}}, {"id": 156, "type": "=", "text": "=", "parent": 154, "children": [], "start_point": {"row": 37, "column": 29}, "end_point": {"row": 37, "column": 30}}, {"id": 157, "type": "false", "text": "false", "parent": 154, "children": [], "start_point": {"row": 37, "column": 31}, "end_point": {"row": 37, "column": 36}}, {"id": 158, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}]}, "node_categories": {"declarations": {"functions": [57, 75, 85, 92, 99, 114, 134], "variables": [52, 60, 65, 73, 78, 83, 88, 90, 97, 102, 108, 117, 122, 127, 132, 137, 142, 149, 152], "classes": [109], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 21, 22, 23, 26, 28, 29, 30, 34, 36, 37, 38, 42, 44, 46, 48, 49, 51, 53, 58, 61, 63, 64, 66, 69, 76, 79, 81, 82, 86, 93, 96, 100, 103, 105, 106, 111, 113, 115, 118, 121, 123, 125, 126, 128, 131, 133, 135, 138, 141, 143, 145, 146, 148, 150, 151, 155, 158], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "needUpdate(json::Entity const &sheet, QObject *parent"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "createGameHash(json::Entity &sheet)"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "abort(void)"}, {"node_id": 92, "universal_type": "function", "name": "unknown", "text_snippet": "run()"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "onComplete(json::Entity data)"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "_getFor(QString &&absPath, json::Entity &datas, QString &&path)"}, {"node_id": 134, "universal_type": "function", "name": "unknown", "text_snippet": "HashChecker(QObject *parent, json::Entity const &sheet)"}], "class_declarations": [{"node_id": 109, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include <QList>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <QRunnable>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <QThread>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <functional>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"Json/Entity.hpp\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#ifndef HASHCHECKER_H\n#define HASHCHECKER_H\n\n#include <QList>\n#include <QRunnable>\n#include <QThread>\n#include <functional>\n#include \"Json/Entity.hpp\"\n\n#ifdef TARGET_UNIX\n #define TARGETSTR \"linux\"\n#elif TARGET_WINDOWS\n #define TARGETSTR \"windows\"\n#elif TARGET_MACOS\n #define TARGETSTR \"macos\"\n#endif\n\nclass HashChecker : public QObject, private QRunnable\n{\n Q_OBJECT\npublic:\n static HashChecker *\n needUpdate(json::Entity const &sheet, QObject *parent = nullptr);\n static void\n createGameHash(json::Entity &sheet);\n\n void abort(void);\n void run();\nsignals:\n void onComplete(json::Entity data);\nprivate:\n static inline json::Entity\n _getFor(QString &&absPath, json::Entity &datas, QString &&path);\n\n explicit HashChecker(QObject *parent, json::Entity const &sheet);\n\n json::Entity _sheet;\n bool _aborted = false;\n};\n\n#endif // HASHCHECKER_H\n"}
80,936
c
#pragma once #include "base.h" struct Vector { I capacity; I size; I data[1]; }; #define V_IDX(vector, idx) \ ((vector)->data[idx]) struct Vector *vector_get(); struct Vector *vector_get_reserve(I capacity); void vector_release(struct Vector *vector); I vector_size(struct Vector *vector); void vector_set_size(struct Vector **vector, I size); I vector_capacity(struct Vector *vector); void vector_push(struct Vector **vector, I x); I vector_pop(struct Vector *vector);
27.59
17
(translation_unit) "#pragma once\n\n#include "base.h"\n\nstruct Vector {\n I capacity;\n I size;\n I data[1];\n};\n\n#define V_IDX(vector, idx) \\n ((vector)->data[idx])\n\nstruct Vector *vector_get();\nstruct Vector *vector_get_reserve(I capacity);\nvoid vector_release(struct Vector *vector);\nI vector_size(struct Vector *vector);\nvoid vector_set_size(struct Vector **vector, I size);\nI vector_capacity(struct Vector *vector);\nvoid vector_push(struct Vector **vector, I x);\nI vector_pop(struct Vector *vector);\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "base.h"\n" (#include) "#include" (string_literal) ""base.h"" (") """ (string_content) "base.h" (") """ (struct_specifier) "struct Vector {\n I capacity;\n I size;\n I data[1];\n}" (struct) "struct" (type_identifier) "Vector" (field_declaration_list) "{\n I capacity;\n I size;\n I data[1];\n}" ({) "{" (field_declaration) "I capacity;" (type_identifier) "I" (field_identifier) "capacity" (;) ";" (field_declaration) "I size;" (type_identifier) "I" (field_identifier) "size" (;) ";" (field_declaration) "I data[1];" (type_identifier) "I" (array_declarator) "data[1]" (field_identifier) "data" ([) "[" (number_literal) "1" (]) "]" (;) ";" (}) "}" (;) ";" (preproc_function_def) "#define V_IDX(vector, idx) \\n ((vector)->data[idx])\n" (#define) "#define" (identifier) "V_IDX" (preproc_params) "(vector, idx)" (() "(" (identifier) "vector" (,) "," (identifier) "idx" ()) ")" (preproc_arg) "((vector)->data[idx])" (declaration) "struct Vector *vector_get();" (struct_specifier) "struct Vector" (struct) "struct" (type_identifier) "Vector" (pointer_declarator) "*vector_get()" (*) "*" (function_declarator) "vector_get()" (identifier) "vector_get" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "struct Vector *vector_get_reserve(I capacity);" (struct_specifier) "struct Vector" (struct) "struct" (type_identifier) "Vector" (pointer_declarator) "*vector_get_reserve(I capacity)" (*) "*" (function_declarator) "vector_get_reserve(I capacity)" (identifier) "vector_get_reserve" (parameter_list) "(I capacity)" (() "(" (parameter_declaration) "I capacity" (type_identifier) "I" (identifier) "capacity" ()) ")" (;) ";" (declaration) "void vector_release(struct Vector *vector);" (primitive_type) "void" (function_declarator) "vector_release(struct Vector *vector)" (identifier) "vector_release" (parameter_list) "(struct Vector *vector)" (() "(" (parameter_declaration) "struct Vector *vector" (struct_specifier) "struct Vector" (struct) "struct" (type_identifier) "Vector" (pointer_declarator) "*vector" (*) "*" (identifier) "vector" ()) ")" (;) ";" (declaration) "I vector_size(struct Vector *vector);" (type_identifier) "I" (function_declarator) "vector_size(struct Vector *vector)" (identifier) "vector_size" (parameter_list) "(struct Vector *vector)" (() "(" (parameter_declaration) "struct Vector *vector" (struct_specifier) "struct Vector" (struct) "struct" (type_identifier) "Vector" (pointer_declarator) "*vector" (*) "*" (identifier) "vector" ()) ")" (;) ";" (declaration) "void vector_set_size(struct Vector **vector, I size);" (primitive_type) "void" (function_declarator) "vector_set_size(struct Vector **vector, I size)" (identifier) "vector_set_size" (parameter_list) "(struct Vector **vector, I size)" (() "(" (parameter_declaration) "struct Vector **vector" (struct_specifier) "struct Vector" (struct) "struct" (type_identifier) "Vector" (pointer_declarator) "**vector" (*) "*" (pointer_declarator) "*vector" (*) "*" (identifier) "vector" (,) "," (parameter_declaration) "I size" (type_identifier) "I" (identifier) "size" ()) ")" (;) ";" (declaration) "I vector_capacity(struct Vector *vector);" (type_identifier) "I" (function_declarator) "vector_capacity(struct Vector *vector)" (identifier) "vector_capacity" (parameter_list) "(struct Vector *vector)" (() "(" (parameter_declaration) "struct Vector *vector" (struct_specifier) "struct Vector" (struct) "struct" (type_identifier) "Vector" (pointer_declarator) "*vector" (*) "*" (identifier) "vector" ()) ")" (;) ";" (declaration) "void vector_push(struct Vector **vector, I x);" (primitive_type) "void" (function_declarator) "vector_push(struct Vector **vector, I x)" (identifier) "vector_push" (parameter_list) "(struct Vector **vector, I x)" (() "(" (parameter_declaration) "struct Vector **vector" (struct_specifier) "struct Vector" (struct) "struct" (type_identifier) "Vector" (pointer_declarator) "**vector" (*) "*" (pointer_declarator) "*vector" (*) "*" (identifier) "vector" (,) "," (parameter_declaration) "I x" (type_identifier) "I" (identifier) "x" ()) ")" (;) ";" (declaration) "I vector_pop(struct Vector *vector);" (type_identifier) "I" (function_declarator) "vector_pop(struct Vector *vector)" (identifier) "vector_pop" (parameter_list) "(struct Vector *vector)" (() "(" (parameter_declaration) "struct Vector *vector" (struct_specifier) "struct Vector" (struct) "struct" (type_identifier) "Vector" (pointer_declarator) "*vector" (*) "*" (identifier) "vector" ()) ")" (;) ";"
172
0
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 27.59, "nodes": 130, "errors": 0, "source_hash": "bb4548169c2be282c286fc686cc31ff690d7b48a2bdf6bd209e61176651cf0f8", "categorized_nodes": 93}, "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 \"base.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": "\"base.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 17}}, {"id": 6, "type": "struct_specifier", "text": "struct Vector {\n I capacity;\n I size;\n I data[1];\n}", "parent": null, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 7, "type": "struct", "text": "struct", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 8, "type": "type_identifier", "text": "Vector", "parent": 6, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 13}}, {"id": 9, "type": "field_declaration", "text": "I capacity;", "parent": 6, "children": [10, 11], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 15}}, {"id": 10, "type": "type_identifier", "text": "I", "parent": 9, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 5}}, {"id": 11, "type": "field_identifier", "text": "capacity", "parent": 9, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 14}}, {"id": 12, "type": "field_declaration", "text": "I size;", "parent": 6, "children": [13, 14], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 11}}, {"id": 13, "type": "type_identifier", "text": "I", "parent": 12, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 5}}, {"id": 14, "type": "field_identifier", "text": "size", "parent": 12, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 10}}, {"id": 15, "type": "field_declaration", "text": "I data[1];", "parent": 6, "children": [16, 17], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 14}}, {"id": 16, "type": "type_identifier", "text": "I", "parent": 15, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 5}}, {"id": 17, "type": "array_declarator", "text": "data[1]", "parent": 15, "children": [18, 19], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 13}}, {"id": 18, "type": "field_identifier", "text": "data", "parent": 17, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 10}}, {"id": 19, "type": "number_literal", "text": "1", "parent": 17, "children": [], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 12}}, {"id": 20, "type": "preproc_function_def", "text": "#define V_IDX(vector, idx) \\\n ((vector)->data[idx])\n", "parent": null, "children": [21, 22, 23, 26], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 21, "type": "#define", "text": "#define", "parent": 20, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 22, "type": "identifier", "text": "V_IDX", "parent": 20, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 13}}, {"id": 23, "type": "preproc_params", "text": "(vector, idx)", "parent": 20, "children": [24, 25], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 26}}, {"id": 24, "type": "identifier", "text": "vector", "parent": 23, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 20}}, {"id": 25, "type": "identifier", "text": "idx", "parent": 23, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 25}}, {"id": 26, "type": "preproc_arg", "text": "((vector)->data[idx])", "parent": 20, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 25}}, {"id": 27, "type": "declaration", "text": "struct Vector *vector_get();", "parent": null, "children": [28, 31], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 28}}, {"id": 28, "type": "struct_specifier", "text": "struct Vector", "parent": 27, "children": [29, 30], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 13}}, {"id": 29, "type": "struct", "text": "struct", "parent": 28, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 30, "type": "type_identifier", "text": "Vector", "parent": 28, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 13}}, {"id": 31, "type": "pointer_declarator", "text": "*vector_get()", "parent": 27, "children": [32, 33], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 27}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 15}}, {"id": 33, "type": "function_declarator", "text": "vector_get()", "parent": 31, "children": [34, 35], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 27}}, {"id": 34, "type": "identifier", "text": "vector_get", "parent": 33, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 25}}, {"id": 35, "type": "parameter_list", "text": "()", "parent": 33, "children": [], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 27}}, {"id": 36, "type": "declaration", "text": "struct Vector *vector_get_reserve(I capacity);", "parent": null, "children": [37, 40], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 46}}, {"id": 37, "type": "struct_specifier", "text": "struct Vector", "parent": 36, "children": [38, 39], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 13}}, {"id": 38, "type": "struct", "text": "struct", "parent": 37, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 39, "type": "type_identifier", "text": "Vector", "parent": 37, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 13}}, {"id": 40, "type": "pointer_declarator", "text": "*vector_get_reserve(I capacity)", "parent": 36, "children": [41, 42], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 45}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 15}}, {"id": 42, "type": "function_declarator", "text": "vector_get_reserve(I capacity)", "parent": 40, "children": [43, 44], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 45}}, {"id": 43, "type": "identifier", "text": "vector_get_reserve", "parent": 42, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 33}}, {"id": 44, "type": "parameter_list", "text": "(I capacity)", "parent": 42, "children": [45], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 45}}, {"id": 45, "type": "parameter_declaration", "text": "I capacity", "parent": 44, "children": [46, 47], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 44}}, {"id": 46, "type": "type_identifier", "text": "I", "parent": 45, "children": [], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 35}}, {"id": 47, "type": "identifier", "text": "capacity", "parent": 45, "children": [], "start_point": {"row": 14, "column": 36}, "end_point": {"row": 14, "column": 44}}, {"id": 48, "type": "declaration", "text": "void vector_release(struct Vector *vector);", "parent": null, "children": [49, 50], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 43}}, {"id": 49, "type": "primitive_type", "text": "void", "parent": 48, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 4}}, {"id": 50, "type": "function_declarator", "text": "vector_release(struct Vector *vector)", "parent": 48, "children": [51, 52], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 42}}, {"id": 51, "type": "identifier", "text": "vector_release", "parent": 50, "children": [], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 19}}, {"id": 52, "type": "parameter_list", "text": "(struct Vector *vector)", "parent": 50, "children": [53], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 42}}, {"id": 53, "type": "parameter_declaration", "text": "struct Vector *vector", "parent": 52, "children": [54, 57], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 41}}, {"id": 54, "type": "struct_specifier", "text": "struct Vector", "parent": 53, "children": [55, 56], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 33}}, {"id": 55, "type": "struct", "text": "struct", "parent": 54, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 26}}, {"id": 56, "type": "type_identifier", "text": "Vector", "parent": 54, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 33}}, {"id": 57, "type": "pointer_declarator", "text": "*vector", "parent": 53, "children": [58, 59], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 41}}, {"id": 58, "type": "*", "text": "*", "parent": 57, "children": [], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 35}}, {"id": 59, "type": "identifier", "text": "vector", "parent": 57, "children": [], "start_point": {"row": 15, "column": 35}, "end_point": {"row": 15, "column": 41}}, {"id": 60, "type": "declaration", "text": "I vector_size(struct Vector *vector);", "parent": null, "children": [61, 62], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 37}}, {"id": 61, "type": "type_identifier", "text": "I", "parent": 60, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 62, "type": "function_declarator", "text": "vector_size(struct Vector *vector)", "parent": 60, "children": [63, 64], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 36}}, {"id": 63, "type": "identifier", "text": "vector_size", "parent": 62, "children": [], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 13}}, {"id": 64, "type": "parameter_list", "text": "(struct Vector *vector)", "parent": 62, "children": [65], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 36}}, {"id": 65, "type": "parameter_declaration", "text": "struct Vector *vector", "parent": 64, "children": [66, 69], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 35}}, {"id": 66, "type": "struct_specifier", "text": "struct Vector", "parent": 65, "children": [67, 68], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 27}}, {"id": 67, "type": "struct", "text": "struct", "parent": 66, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 20}}, {"id": 68, "type": "type_identifier", "text": "Vector", "parent": 66, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 27}}, {"id": 69, "type": "pointer_declarator", "text": "*vector", "parent": 65, "children": [70, 71], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 35}}, {"id": 70, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 29}}, {"id": 71, "type": "identifier", "text": "vector", "parent": 69, "children": [], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 35}}, {"id": 72, "type": "declaration", "text": "void vector_set_size(struct Vector **vector, I size);", "parent": null, "children": [73, 74], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 53}}, {"id": 73, "type": "primitive_type", "text": "void", "parent": 72, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 4}}, {"id": 74, "type": "function_declarator", "text": "vector_set_size(struct Vector **vector, I size)", "parent": 72, "children": [75, 76], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 52}}, {"id": 75, "type": "identifier", "text": "vector_set_size", "parent": 74, "children": [], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 20}}, {"id": 76, "type": "parameter_list", "text": "(struct Vector **vector, I size)", "parent": 74, "children": [77, 86], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 52}}, {"id": 77, "type": "parameter_declaration", "text": "struct Vector **vector", "parent": 76, "children": [78, 81], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 43}}, {"id": 78, "type": "struct_specifier", "text": "struct Vector", "parent": 77, "children": [79, 80], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 34}}, {"id": 79, "type": "struct", "text": "struct", "parent": 78, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 27}}, {"id": 80, "type": "type_identifier", "text": "Vector", "parent": 78, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 34}}, {"id": 81, "type": "pointer_declarator", "text": "**vector", "parent": 77, "children": [82, 83], "start_point": {"row": 17, "column": 35}, "end_point": {"row": 17, "column": 43}}, {"id": 82, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 17, "column": 35}, "end_point": {"row": 17, "column": 36}}, {"id": 83, "type": "pointer_declarator", "text": "*vector", "parent": 81, "children": [84, 85], "start_point": {"row": 17, "column": 36}, "end_point": {"row": 17, "column": 43}}, {"id": 84, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 17, "column": 36}, "end_point": {"row": 17, "column": 37}}, {"id": 85, "type": "identifier", "text": "vector", "parent": 83, "children": [], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 43}}, {"id": 86, "type": "parameter_declaration", "text": "I size", "parent": 76, "children": [87, 88], "start_point": {"row": 17, "column": 45}, "end_point": {"row": 17, "column": 51}}, {"id": 87, "type": "type_identifier", "text": "I", "parent": 86, "children": [], "start_point": {"row": 17, "column": 45}, "end_point": {"row": 17, "column": 46}}, {"id": 88, "type": "identifier", "text": "size", "parent": 86, "children": [], "start_point": {"row": 17, "column": 47}, "end_point": {"row": 17, "column": 51}}, {"id": 89, "type": "declaration", "text": "I vector_capacity(struct Vector *vector);", "parent": null, "children": [90, 91], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 41}}, {"id": 90, "type": "type_identifier", "text": "I", "parent": 89, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 91, "type": "function_declarator", "text": "vector_capacity(struct Vector *vector)", "parent": 89, "children": [92, 93], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 40}}, {"id": 92, "type": "identifier", "text": "vector_capacity", "parent": 91, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 17}}, {"id": 93, "type": "parameter_list", "text": "(struct Vector *vector)", "parent": 91, "children": [94], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 40}}, {"id": 94, "type": "parameter_declaration", "text": "struct Vector *vector", "parent": 93, "children": [95, 98], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 39}}, {"id": 95, "type": "struct_specifier", "text": "struct Vector", "parent": 94, "children": [96, 97], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 31}}, {"id": 96, "type": "struct", "text": "struct", "parent": 95, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 24}}, {"id": 97, "type": "type_identifier", "text": "Vector", "parent": 95, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 31}}, {"id": 98, "type": "pointer_declarator", "text": "*vector", "parent": 94, "children": [99, 100], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 39}}, {"id": 99, "type": "*", "text": "*", "parent": 98, "children": [], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 33}}, {"id": 100, "type": "identifier", "text": "vector", "parent": 98, "children": [], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 39}}, {"id": 101, "type": "declaration", "text": "void vector_push(struct Vector **vector, I x);", "parent": null, "children": [102, 103], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 46}}, {"id": 102, "type": "primitive_type", "text": "void", "parent": 101, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 4}}, {"id": 103, "type": "function_declarator", "text": "vector_push(struct Vector **vector, I x)", "parent": 101, "children": [104, 105], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 45}}, {"id": 104, "type": "identifier", "text": "vector_push", "parent": 103, "children": [], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 16}}, {"id": 105, "type": "parameter_list", "text": "(struct Vector **vector, I x)", "parent": 103, "children": [106, 115], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 45}}, {"id": 106, "type": "parameter_declaration", "text": "struct Vector **vector", "parent": 105, "children": [107, 110], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 39}}, {"id": 107, "type": "struct_specifier", "text": "struct Vector", "parent": 106, "children": [108, 109], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 30}}, {"id": 108, "type": "struct", "text": "struct", "parent": 107, "children": [], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 23}}, {"id": 109, "type": "type_identifier", "text": "Vector", "parent": 107, "children": [], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 30}}, {"id": 110, "type": "pointer_declarator", "text": "**vector", "parent": 106, "children": [111, 112], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 39}}, {"id": 111, "type": "*", "text": "*", "parent": 110, "children": [], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 32}}, {"id": 112, "type": "pointer_declarator", "text": "*vector", "parent": 110, "children": [113, 114], "start_point": {"row": 19, "column": 32}, "end_point": {"row": 19, "column": 39}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 19, "column": 32}, "end_point": {"row": 19, "column": 33}}, {"id": 114, "type": "identifier", "text": "vector", "parent": 112, "children": [], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 39}}, {"id": 115, "type": "parameter_declaration", "text": "I x", "parent": 105, "children": [116, 117], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 44}}, {"id": 116, "type": "type_identifier", "text": "I", "parent": 115, "children": [], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 42}}, {"id": 117, "type": "identifier", "text": "x", "parent": 115, "children": [], "start_point": {"row": 19, "column": 43}, "end_point": {"row": 19, "column": 44}}, {"id": 118, "type": "declaration", "text": "I vector_pop(struct Vector *vector);", "parent": null, "children": [119, 120], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 36}}, {"id": 119, "type": "type_identifier", "text": "I", "parent": 118, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 120, "type": "function_declarator", "text": "vector_pop(struct Vector *vector)", "parent": 118, "children": [121, 122], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 35}}, {"id": 121, "type": "identifier", "text": "vector_pop", "parent": 120, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 12}}, {"id": 122, "type": "parameter_list", "text": "(struct Vector *vector)", "parent": 120, "children": [123], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 35}}, {"id": 123, "type": "parameter_declaration", "text": "struct Vector *vector", "parent": 122, "children": [124, 127], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 34}}, {"id": 124, "type": "struct_specifier", "text": "struct Vector", "parent": 123, "children": [125, 126], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 26}}, {"id": 125, "type": "struct", "text": "struct", "parent": 124, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 19}}, {"id": 126, "type": "type_identifier", "text": "Vector", "parent": 124, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 26}}, {"id": 127, "type": "pointer_declarator", "text": "*vector", "parent": 123, "children": [128, 129], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 34}}, {"id": 128, "type": "*", "text": "*", "parent": 127, "children": [], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 28}}, {"id": 129, "type": "identifier", "text": "vector", "parent": 127, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 34}}]}, "node_categories": {"declarations": {"functions": [20, 33, 42, 50, 62, 74, 91, 103, 120], "variables": [9, 12, 15, 27, 36, 45, 48, 53, 60, 65, 72, 77, 86, 89, 94, 101, 106, 115, 118, 123], "classes": [6, 7, 28, 29, 37, 38, 54, 55, 66, 67, 78, 79, 95, 96, 107, 108, 124, 125], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [8, 10, 11, 13, 14, 16, 18, 22, 24, 25, 30, 34, 39, 43, 46, 47, 51, 56, 59, 61, 63, 68, 71, 75, 80, 85, 87, 88, 90, 92, 97, 100, 104, 109, 114, 116, 117, 119, 121, 126, 129], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 19], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "#define V_IDX(vector, idx) \\\n ((vector)->data[idx])\n"}, {"node_id": 33, "universal_type": "function", "name": "unknown", "text_snippet": "vector_get()"}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "vector_get_reserve(I capacity)"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "vector_release(struct Vector *vector)"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "vector_size(struct Vector *vector)"}, {"node_id": 74, "universal_type": "function", "name": "unknown", "text_snippet": "vector_set_size(struct Vector **vector, I size)"}, {"node_id": 91, "universal_type": "function", "name": "unknown", "text_snippet": "vector_capacity(struct Vector *vector)"}, {"node_id": 103, "universal_type": "function", "name": "unknown", "text_snippet": "vector_push(struct Vector **vector, I x)"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "vector_pop(struct Vector *vector)"}], "class_declarations": [{"node_id": 6, "universal_type": "class", "name": "Vector", "text_snippet": "struct Vector {\n I capacity;\n I size;\n I data[1];\n}"}, {"node_id": 7, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 28, "universal_type": "class", "name": "Vector", "text_snippet": "struct Vector"}, {"node_id": 29, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 37, "universal_type": "class", "name": "Vector", "text_snippet": "struct Vector"}, {"node_id": 38, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 54, "universal_type": "class", "name": "Vector", "text_snippet": "struct Vector"}, {"node_id": 55, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 66, "universal_type": "class", "name": "Vector", "text_snippet": "struct Vector"}, {"node_id": 67, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 78, "universal_type": "class", "name": "Vector", "text_snippet": "struct Vector"}, {"node_id": 79, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 95, "universal_type": "class", "name": "Vector", "text_snippet": "struct Vector"}, {"node_id": 96, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 107, "universal_type": "class", "name": "Vector", "text_snippet": "struct Vector"}, {"node_id": 108, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 124, "universal_type": "class", "name": "Vector", "text_snippet": "struct Vector"}, {"node_id": 125, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include \"base.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"base.h\"\n\nstruct Vector {\n I capacity;\n I size;\n I data[1];\n};\n\n#define V_IDX(vector, idx) \\\n ((vector)->data[idx])\n\nstruct Vector *vector_get();\nstruct Vector *vector_get_reserve(I capacity);\nvoid vector_release(struct Vector *vector);\nI vector_size(struct Vector *vector);\nvoid vector_set_size(struct Vector **vector, I size);\nI vector_capacity(struct Vector *vector);\nvoid vector_push(struct Vector **vector, I x);\nI vector_pop(struct Vector *vector);\n"}
80,937
c
#pragma once /* Copyright (c) 2021 [<NAME>] - IWindowController.h * * This file contains the interface for a WindowController. * **/ #include <functional> #include <memory> #include "WindowController.h" class WindowModel; class IWindowController { public: /** * Sets up the layout and sets up curses in case of the mainn controller. * @return true if successful */ virtual bool SetUp() = 0; /** * Catches action given to the controller and handles it. * @param aAction - Action to handle, uses Curses keycodes. * @return true - If action successfully performed. */ virtual bool KeyAction(unsigned int aAction) = 0; /** * Redraws and handles windows. * @return true if processing succeeded. */ virtual bool Process() = 0; /** * Tells the parent controller to release the subcontroller. * @param aCallback - Function pointer to the UnsetSubController function of * the parent controller. */ virtual void SetReleaseCallback(std::function<void()> aCallback) = 0; /** * Passes control to a subcontroller. * @param aController - Controller to set. */ virtual void SetSubController(std::unique_ptr<IWindowController> aController) = 0; /** * Releases control to the subcontroller. */ virtual void UnsetSubController() = 0; protected: /** * Gets the subcontroller. * @return */ virtual std::unique_ptr<IWindowController>& GetSubController() = 0; /** * Gets the NCurses windows attached to this controller. * @return reference to windows vector, can be empty. */ virtual std::vector<std::shared_ptr<IWindow>>& GetWindows() = 0; /** * Checks if there is a subcontroller set, used in KeyAction. * @return true if there is a subcontroller set. */ virtual WindowModel& GetWindowModel() = 0; /** * Gets height of the entire window as a reference. * @return height of the window. */ virtual const int& GetHeightReference() = 0; /** * Gets width of the entire window as a reference. * @return width of the window. */ virtual const int& GetWidthReference() = 0; /** * Checks if there is a subcontroller set, used in KeyAction. * @return true if there is a subcontroller set. */ virtual bool HasSubControllerSet() = 0; /** * Sets height of the entire window. Use when obtaining size from for example the setup. * @param aHeigth - Height to set. */ virtual void SetHeight(int aHeigth) = 0; /** * Sets width of the entire window. Use when obtaining size from for example the setup. * @param aWidth - Width to set. */ virtual void SetWidth(int aWidth) = 0; };
31.2
86
(translation_unit) "#pragma once\n\n/* Copyright (c) 2021 [<NAME>] - IWindowController.h\n *\n * This file contains the interface for a WindowController.\n *\n **/\n\n#include <functional>\n#include <memory>\n\n#include "WindowController.h"\n\nclass WindowModel;\nclass IWindowController\n{\npublic:\n /**\n * Sets up the layout and sets up curses in case of the mainn controller.\n * @return true if successful\n */\n virtual bool SetUp() = 0;\n\n /**\n * Catches action given to the controller and handles it.\n * @param aAction - Action to handle, uses Curses keycodes.\n * @return true - If action successfully performed.\n */\n virtual bool KeyAction(unsigned int aAction) = 0;\n\n /**\n * Redraws and handles windows.\n * @return true if processing succeeded.\n */\n virtual bool Process() = 0;\n\n /**\n * Tells the parent controller to release the subcontroller.\n * @param aCallback - Function pointer to the UnsetSubController function of\n * the parent controller.\n */\n virtual void SetReleaseCallback(std::function<void()> aCallback) = 0;\n\n /**\n * Passes control to a subcontroller.\n * @param aController - Controller to set.\n */\n virtual void SetSubController(std::unique_ptr<IWindowController> aController) = 0;\n\n /**\n * Releases control to the subcontroller.\n */\n virtual void UnsetSubController() = 0;\n\nprotected:\n /**\n * Gets the subcontroller.\n * @return\n */\n virtual std::unique_ptr<IWindowController>& GetSubController() = 0;\n\n /**\n * Gets the NCurses windows attached to this controller.\n * @return reference to windows vector, can be empty.\n */\n virtual std::vector<std::shared_ptr<IWindow>>& GetWindows() = 0;\n\n /**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */\n virtual WindowModel& GetWindowModel() = 0;\n\n /**\n * Gets height of the entire window as a reference.\n * @return height of the window.\n */\n virtual const int& GetHeightReference() = 0;\n\n /**\n * Gets width of the entire window as a reference.\n * @return width of the window.\n */\n virtual const int& GetWidthReference() = 0;\n\n /**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */\n virtual bool HasSubControllerSet() = 0;\n\n /**\n * Sets height of the entire window. Use when obtaining size from for example the setup.\n * @param aHeigth - Height to set.\n */\n virtual void SetHeight(int aHeigth) = 0;\n\n /**\n * Sets width of the entire window. Use when obtaining size from for example the setup.\n * @param aWidth - Width to set.\n */\n virtual void SetWidth(int aWidth) = 0;\n};\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (comment) "/* Copyright (c) 2021 [<NAME>] - IWindowController.h\n *\n * This file contains the interface for a WindowController.\n *\n **/" (preproc_include) "#include <functional>\n" (#include) "#include" (system_lib_string) "<functional>" (preproc_include) "#include <memory>\n" (#include) "#include" (system_lib_string) "<memory>" (preproc_include) "#include "WindowController.h"\n" (#include) "#include" (string_literal) ""WindowController.h"" (") """ (string_content) "WindowController.h" (") """ (declaration) "class WindowModel;" (type_identifier) "class" (identifier) "WindowModel" (;) ";" (function_definition) "class IWindowController\n{\npublic:\n /**\n * Sets up the layout and sets up curses in case of the mainn controller.\n * @return true if successful\n */\n virtual bool SetUp() = 0;\n\n /**\n * Catches action given to the controller and handles it.\n * @param aAction - Action to handle, uses Curses keycodes.\n * @return true - If action successfully performed.\n */\n virtual bool KeyAction(unsigned int aAction) = 0;\n\n /**\n * Redraws and handles windows.\n * @return true if processing succeeded.\n */\n virtual bool Process() = 0;\n\n /**\n * Tells the parent controller to release the subcontroller.\n * @param aCallback - Function pointer to the UnsetSubController function of\n * the parent controller.\n */\n virtual void SetReleaseCallback(std::function<void()> aCallback) = 0;\n\n /**\n * Passes control to a subcontroller.\n * @param aController - Controller to set.\n */\n virtual void SetSubController(std::unique_ptr<IWindowController> aController) = 0;\n\n /**\n * Releases control to the subcontroller.\n */\n virtual void UnsetSubController() = 0;\n\nprotected:\n /**\n * Gets the subcontroller.\n * @return\n */\n virtual std::unique_ptr<IWindowController>& GetSubController() = 0;\n\n /**\n * Gets the NCurses windows attached to this controller.\n * @return reference to windows vector, can be empty.\n */\n virtual std::vector<std::shared_ptr<IWindow>>& GetWindows() = 0;\n\n /**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */\n virtual WindowModel& GetWindowModel() = 0;\n\n /**\n * Gets height of the entire window as a reference.\n * @return height of the window.\n */\n virtual const int& GetHeightReference() = 0;\n\n /**\n * Gets width of the entire window as a reference.\n * @return width of the window.\n */\n virtual const int& GetWidthReference() = 0;\n\n /**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */\n virtual bool HasSubControllerSet() = 0;\n\n /**\n * Sets height of the entire window. Use when obtaining size from for example the setup.\n * @param aHeigth - Height to set.\n */\n virtual void SetHeight(int aHeigth) = 0;\n\n /**\n * Sets width of the entire window. Use when obtaining size from for example the setup.\n * @param aWidth - Width to set.\n */\n virtual void SetWidth(int aWidth) = 0;\n}" (type_identifier) "class" (identifier) "IWindowController" (compound_statement) "{\npublic:\n /**\n * Sets up the layout and sets up curses in case of the mainn controller.\n * @return true if successful\n */\n virtual bool SetUp() = 0;\n\n /**\n * Catches action given to the controller and handles it.\n * @param aAction - Action to handle, uses Curses keycodes.\n * @return true - If action successfully performed.\n */\n virtual bool KeyAction(unsigned int aAction) = 0;\n\n /**\n * Redraws and handles windows.\n * @return true if processing succeeded.\n */\n virtual bool Process() = 0;\n\n /**\n * Tells the parent controller to release the subcontroller.\n * @param aCallback - Function pointer to the UnsetSubController function of\n * the parent controller.\n */\n virtual void SetReleaseCallback(std::function<void()> aCallback) = 0;\n\n /**\n * Passes control to a subcontroller.\n * @param aController - Controller to set.\n */\n virtual void SetSubController(std::unique_ptr<IWindowController> aController) = 0;\n\n /**\n * Releases control to the subcontroller.\n */\n virtual void UnsetSubController() = 0;\n\nprotected:\n /**\n * Gets the subcontroller.\n * @return\n */\n virtual std::unique_ptr<IWindowController>& GetSubController() = 0;\n\n /**\n * Gets the NCurses windows attached to this controller.\n * @return reference to windows vector, can be empty.\n */\n virtual std::vector<std::shared_ptr<IWindow>>& GetWindows() = 0;\n\n /**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */\n virtual WindowModel& GetWindowModel() = 0;\n\n /**\n * Gets height of the entire window as a reference.\n * @return height of the window.\n */\n virtual const int& GetHeightReference() = 0;\n\n /**\n * Gets width of the entire window as a reference.\n * @return width of the window.\n */\n virtual const int& GetWidthReference() = 0;\n\n /**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */\n virtual bool HasSubControllerSet() = 0;\n\n /**\n * Sets height of the entire window. Use when obtaining size from for example the setup.\n * @param aHeigth - Height to set.\n */\n virtual void SetHeight(int aHeigth) = 0;\n\n /**\n * Sets width of the entire window. Use when obtaining size from for example the setup.\n * @param aWidth - Width to set.\n */\n virtual void SetWidth(int aWidth) = 0;\n}" ({) "{" (labeled_statement) "public:\n /**\n * Sets up the layout and sets up curses in case of the mainn controller.\n * @return true if successful\n */\n virtual bool SetUp() = 0;" (statement_identifier) "public" (:) ":" (comment) "/**\n * Sets up the layout and sets up curses in case of the mainn controller.\n * @return true if successful\n */" (declaration) "virtual bool SetUp() = 0;" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (init_declarator) "SetUp() = 0" (function_declarator) "SetUp()" (identifier) "SetUp" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Catches action given to the controller and handles it.\n * @param aAction - Action to handle, uses Curses keycodes.\n * @return true - If action successfully performed.\n */" (declaration) "virtual bool KeyAction(unsigned int aAction) = 0;" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (init_declarator) "KeyAction(unsigned int aAction) = 0" (function_declarator) "KeyAction(unsigned int aAction)" (identifier) "KeyAction" (parameter_list) "(unsigned int aAction)" (() "(" (parameter_declaration) "unsigned int aAction" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "aAction" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Redraws and handles windows.\n * @return true if processing succeeded.\n */" (declaration) "virtual bool Process() = 0;" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (init_declarator) "Process() = 0" (function_declarator) "Process()" (identifier) "Process" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Tells the parent controller to release the subcontroller.\n * @param aCallback - Function pointer to the UnsetSubController function of\n * the parent controller.\n */" (declaration) "virtual void SetReleaseCallback(std::function<void()> aCallback) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "SetReleaseCallback(std::function<void()> aCallback) = 0" (function_declarator) "SetReleaseCallback(std::function<void()> aCallback)" (identifier) "SetReleaseCallback" (parameter_list) "(std::function<void()> aCallback)" (() "(" (ERROR) "std::function<" (parameter_declaration) "std::function" (type_identifier) "std" (ERROR) "::" (:) ":" (:) ":" (identifier) "function" (<) "<" (parameter_declaration) "void()> aCallback" (primitive_type) "void" (ERROR) "()>" (abstract_function_declarator) "()" (parameter_list) "()" (() "(" ()) ")" (>) ">" (identifier) "aCallback" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Passes control to a subcontroller.\n * @param aController - Controller to set.\n */" (declaration) "virtual void SetSubController(std::unique_ptr<IWindowController> aController) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "SetSubController(std::unique_ptr<IWindowController> aController) = 0" (function_declarator) "SetSubController(std::unique_ptr<IWindowController> aController)" (identifier) "SetSubController" (parameter_list) "(std::unique_ptr<IWindowController> aController)" (() "(" (parameter_declaration) "std::unique_ptr<IWindowController> aController" (type_identifier) "std" (ERROR) "::unique_ptr<IWindowController>" (:) ":" (:) ":" (identifier) "unique_ptr" (<) "<" (identifier) "IWindowController" (>) ">" (identifier) "aController" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Releases control to the subcontroller.\n */" (declaration) "virtual void UnsetSubController() = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "UnsetSubController() = 0" (function_declarator) "UnsetSubController()" (identifier) "UnsetSubController" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (labeled_statement) "protected:\n /**\n * Gets the subcontroller.\n * @return\n */\n virtual std::unique_ptr<IWindowController>& GetSubController() = 0;" (statement_identifier) "protected" (:) ":" (comment) "/**\n * Gets the subcontroller.\n * @return\n */" (declaration) "virtual std::unique_ptr<IWindowController>& GetSubController() = 0;" (type_identifier) "virtual" (ERROR) "std::unique_ptr<IWindowController>&" (identifier) "std" (:) ":" (:) ":" (identifier) "unique_ptr" (<) "<" (identifier) "IWindowController" (>) ">" (&) "&" (init_declarator) "GetSubController() = 0" (function_declarator) "GetSubController()" (identifier) "GetSubController" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Gets the NCurses windows attached to this controller.\n * @return reference to windows vector, can be empty.\n */" (declaration) "virtual std::vector<std::shared_ptr<IWindow>>& GetWindows() = 0;" (type_identifier) "virtual" (ERROR) "std::vector<std::shared_ptr<IWindow>>&" (identifier) "std" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "std" (:) ":" (:) ":" (identifier) "shared_ptr" (<) "<" (identifier) "IWindow" (>>) ">>" (&) "&" (init_declarator) "GetWindows() = 0" (function_declarator) "GetWindows()" (identifier) "GetWindows" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */" (declaration) "virtual WindowModel" (type_identifier) "virtual" (identifier) "WindowModel" (;) "" (expression_statement) "& GetWindowModel() = 0;" (assignment_expression) "& GetWindowModel() = 0" (pointer_expression) "& GetWindowModel()" (&) "&" (call_expression) "GetWindowModel()" (identifier) "GetWindowModel" (argument_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Gets height of the entire window as a reference.\n * @return height of the window.\n */" (declaration) "virtual const int" (type_identifier) "virtual" (type_qualifier) "const" (const) "const" (identifier) "int" (;) "" (expression_statement) "& GetHeightReference() = 0;" (assignment_expression) "& GetHeightReference() = 0" (pointer_expression) "& GetHeightReference()" (&) "&" (call_expression) "GetHeightReference()" (identifier) "GetHeightReference" (argument_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Gets width of the entire window as a reference.\n * @return width of the window.\n */" (declaration) "virtual const int" (type_identifier) "virtual" (type_qualifier) "const" (const) "const" (identifier) "int" (;) "" (expression_statement) "& GetWidthReference() = 0;" (assignment_expression) "& GetWidthReference() = 0" (pointer_expression) "& GetWidthReference()" (&) "&" (call_expression) "GetWidthReference()" (identifier) "GetWidthReference" (argument_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */" (declaration) "virtual bool HasSubControllerSet() = 0;" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (init_declarator) "HasSubControllerSet() = 0" (function_declarator) "HasSubControllerSet()" (identifier) "HasSubControllerSet" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Sets height of the entire window. Use when obtaining size from for example the setup.\n * @param aHeigth - Height to set.\n */" (declaration) "virtual void SetHeight(int aHeigth) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "SetHeight(int aHeigth) = 0" (function_declarator) "SetHeight(int aHeigth)" (identifier) "SetHeight" (parameter_list) "(int aHeigth)" (() "(" (parameter_declaration) "int aHeigth" (primitive_type) "int" (identifier) "aHeigth" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/**\n * Sets width of the entire window. Use when obtaining size from for example the setup.\n * @param aWidth - Width to set.\n */" (declaration) "virtual void SetWidth(int aWidth) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "SetWidth(int aWidth) = 0" (function_declarator) "SetWidth(int aWidth)" (identifier) "SetWidth" (parameter_list) "(int aWidth)" (() "(" (parameter_declaration) "int aWidth" (primitive_type) "int" (identifier) "aWidth" ()) ")" (=) "=" (number_literal) "0" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
301
15
{"language": "c", "success": true, "metadata": {"lines": 86, "avg_line_length": 31.2, "nodes": 199, "errors": 0, "source_hash": "662b23a310a450789d79b10d783db252469359035ee175eea106a62ff593f9cb", "categorized_nodes": 127}, "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 <functional>\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": "system_lib_string", "text": "<functional>", "parent": 3, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include <memory>\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": "system_lib_string", "text": "<memory>", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include \"WindowController.h\"\n", "parent": null, "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": "\"WindowController.h\"", "parent": 9, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 29}}, {"id": 12, "type": "declaration", "text": "class WindowModel;", "parent": null, "children": [13], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 18}}, {"id": 13, "type": "identifier", "text": "WindowModel", "parent": 12, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 17}}, {"id": 14, "type": "function_definition", "text": "class IWindowController\n{\npublic:\n /**\n * Sets up the layout and sets up curses in case of the mainn controller.\n * @return true if successful\n */\n virtual bool SetUp() = 0;\n\n /**\n * Catches action given to the controller and handles it.\n * @param aAction - Action to handle, uses Curses keycodes.\n * @return true - If action successfully performed.\n */\n virtual bool KeyAction(unsigned int aAction) = 0;\n\n /**\n * Redraws and handles windows.\n * @return true if processing succeeded.\n */\n virtual bool Process() = 0;\n\n /**\n * Tells the parent controller to release the subcontroller.\n * @param aCallback - Function pointer to the UnsetSubController function of\n * the parent controller.\n */\n virtual void SetReleaseCallback(std::function<void()> aCallback) = 0;\n\n /**\n * Passes control to a subcontroller.\n * @param aController - Controller to set.\n */\n virtual void SetSubController(std::unique_ptr<IWindowController> aController) = 0;\n\n /**\n * Releases control to the subcontroller.\n */\n virtual void UnsetSubController() = 0;\n\nprotected:\n /**\n * Gets the subcontroller.\n * @return\n */\n virtual std::unique_ptr<IWindowController>& GetSubController() = 0;\n\n /**\n * Gets the NCurses windows attached to this controller.\n * @return reference to windows vector, can be empty.\n */\n virtual std::vector<std::shared_ptr<IWindow>>& GetWindows() = 0;\n\n /**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */\n virtual WindowModel& GetWindowModel() = 0;\n\n /**\n * Gets height of the entire window as a reference.\n * @return height of the window.\n */\n virtual const int& GetHeightReference() = 0;\n\n /**\n * Gets width of the entire window as a reference.\n * @return width of the window.\n */\n virtual const int& GetWidthReference() = 0;\n\n /**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */\n virtual bool HasSubControllerSet() = 0;\n\n /**\n * Sets height of the entire window. Use when obtaining size from for example the setup.\n * @param aHeigth - Height to set.\n */\n virtual void SetHeight(int aHeigth) = 0;\n\n /**\n * Sets width of the entire window. Use when obtaining size from for example the setup.\n * @param aWidth - Width to set.\n */\n virtual void SetWidth(int aWidth) = 0;\n}", "parent": null, "children": [15], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 102, "column": 1}}, {"id": 15, "type": "identifier", "text": "IWindowController", "parent": 14, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 23}}, {"id": 16, "type": "labeled_statement", "text": "public:\n /**\n * Sets up the layout and sets up curses in case of the mainn controller.\n * @return true if successful\n */\n virtual bool SetUp() = 0;", "parent": 14, "children": [17], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 21, "column": 29}}, {"id": 17, "type": "declaration", "text": "virtual bool SetUp() = 0;", "parent": 16, "children": [18, 19, 21], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 29}}, {"id": 18, "type": "type_identifier", "text": "virtual", "parent": 17, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 11}}, {"id": 19, "type": "ERROR", "text": "bool", "parent": 17, "children": [20], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 16}}, {"id": 20, "type": "identifier", "text": "bool", "parent": 19, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 16}}, {"id": 21, "type": "init_declarator", "text": "SetUp() = 0", "parent": 17, "children": [22, 25, 26], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 28}}, {"id": 22, "type": "function_declarator", "text": "SetUp()", "parent": 21, "children": [23, 24], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 24}}, {"id": 23, "type": "identifier", "text": "SetUp", "parent": 22, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 22}}, {"id": 24, "type": "parameter_list", "text": "()", "parent": 22, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 24}}, {"id": 25, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 26}}, {"id": 26, "type": "number_literal", "text": "0", "parent": 21, "children": [], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 28}}, {"id": 27, "type": "declaration", "text": "virtual bool KeyAction(unsigned int aAction) = 0;", "parent": 14, "children": [28, 29, 31], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 53}}, {"id": 28, "type": "type_identifier", "text": "virtual", "parent": 27, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 11}}, {"id": 29, "type": "ERROR", "text": "bool", "parent": 27, "children": [30], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 16}}, {"id": 30, "type": "identifier", "text": "bool", "parent": 29, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 16}}, {"id": 31, "type": "init_declarator", "text": "KeyAction(unsigned int aAction) = 0", "parent": 27, "children": [32, 40, 41], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 52}}, {"id": 32, "type": "function_declarator", "text": "KeyAction(unsigned int aAction)", "parent": 31, "children": [33, 34], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 48}}, {"id": 33, "type": "identifier", "text": "KeyAction", "parent": 32, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 26}}, {"id": 34, "type": "parameter_list", "text": "(unsigned int aAction)", "parent": 32, "children": [35], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 48}}, {"id": 35, "type": "parameter_declaration", "text": "unsigned int aAction", "parent": 34, "children": [36, 39], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 47}}, {"id": 36, "type": "sized_type_specifier", "text": "unsigned int", "parent": 35, "children": [37, 38], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 39}}, {"id": 37, "type": "unsigned", "text": "unsigned", "parent": 36, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 35}}, {"id": 38, "type": "primitive_type", "text": "int", "parent": 36, "children": [], "start_point": {"row": 28, "column": 36}, "end_point": {"row": 28, "column": 39}}, {"id": 39, "type": "identifier", "text": "aAction", "parent": 35, "children": [], "start_point": {"row": 28, "column": 40}, "end_point": {"row": 28, "column": 47}}, {"id": 40, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 28, "column": 49}, "end_point": {"row": 28, "column": 50}}, {"id": 41, "type": "number_literal", "text": "0", "parent": 31, "children": [], "start_point": {"row": 28, "column": 51}, "end_point": {"row": 28, "column": 52}}, {"id": 42, "type": "declaration", "text": "virtual bool Process() = 0;", "parent": 14, "children": [43, 44, 46], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 31}}, {"id": 43, "type": "type_identifier", "text": "virtual", "parent": 42, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 11}}, {"id": 44, "type": "ERROR", "text": "bool", "parent": 42, "children": [45], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 16}}, {"id": 45, "type": "identifier", "text": "bool", "parent": 44, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 16}}, {"id": 46, "type": "init_declarator", "text": "Process() = 0", "parent": 42, "children": [47, 50, 51], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 30}}, {"id": 47, "type": "function_declarator", "text": "Process()", "parent": 46, "children": [48, 49], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 26}}, {"id": 48, "type": "identifier", "text": "Process", "parent": 47, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 24}}, {"id": 49, "type": "parameter_list", "text": "()", "parent": 47, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 26}}, {"id": 50, "type": "=", "text": "=", "parent": 46, "children": [], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 28}}, {"id": 51, "type": "number_literal", "text": "0", "parent": 46, "children": [], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 30}}, {"id": 52, "type": "declaration", "text": "virtual void SetReleaseCallback(std::function<void()> aCallback) = 0;", "parent": 14, "children": [53, 54, 56], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 73}}, {"id": 53, "type": "type_identifier", "text": "virtual", "parent": 52, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 11}}, {"id": 54, "type": "ERROR", "text": "void", "parent": 52, "children": [55], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 16}}, {"id": 55, "type": "identifier", "text": "void", "parent": 54, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 16}}, {"id": 56, "type": "init_declarator", "text": "SetReleaseCallback(std::function<void()> aCallback) = 0", "parent": 52, "children": [57, 71, 72], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 72}}, {"id": 57, "type": "function_declarator", "text": "SetReleaseCallback(std::function<void()> aCallback)", "parent": 56, "children": [58, 59], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 68}}, {"id": 58, "type": "identifier", "text": "SetReleaseCallback", "parent": 57, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 35}}, {"id": 59, "type": "parameter_list", "text": "(std::function<void()> aCallback)", "parent": 57, "children": [60, 64], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 68}}, {"id": 60, "type": "ERROR", "text": "std::function<", "parent": 59, "children": [61, 63], "start_point": {"row": 41, "column": 36}, "end_point": {"row": 41, "column": 50}}, {"id": 61, "type": "parameter_declaration", "text": "std::function", "parent": 60, "children": [62], "start_point": {"row": 41, "column": 36}, "end_point": {"row": 41, "column": 49}}, {"id": 62, "type": "type_identifier", "text": "std", "parent": 61, "children": [], "start_point": {"row": 41, "column": 36}, "end_point": {"row": 41, "column": 39}}, {"id": 63, "type": "<", "text": "<", "parent": 60, "children": [], "start_point": {"row": 41, "column": 49}, "end_point": {"row": 41, "column": 50}}, {"id": 64, "type": "parameter_declaration", "text": "void()> aCallback", "parent": 59, "children": [65, 66, 70], "start_point": {"row": 41, "column": 50}, "end_point": {"row": 41, "column": 67}}, {"id": 65, "type": "primitive_type", "text": "void", "parent": 64, "children": [], "start_point": {"row": 41, "column": 50}, "end_point": {"row": 41, "column": 54}}, {"id": 66, "type": "ERROR", "text": "()>", "parent": 64, "children": [67, 69], "start_point": {"row": 41, "column": 54}, "end_point": {"row": 41, "column": 57}}, {"id": 67, "type": "abstract_function_declarator", "text": "()", "parent": 66, "children": [68], "start_point": {"row": 41, "column": 54}, "end_point": {"row": 41, "column": 56}}, {"id": 68, "type": "parameter_list", "text": "()", "parent": 67, "children": [], "start_point": {"row": 41, "column": 54}, "end_point": {"row": 41, "column": 56}}, {"id": 69, "type": ">", "text": ">", "parent": 66, "children": [], "start_point": {"row": 41, "column": 56}, "end_point": {"row": 41, "column": 57}}, {"id": 70, "type": "identifier", "text": "aCallback", "parent": 64, "children": [], "start_point": {"row": 41, "column": 58}, "end_point": {"row": 41, "column": 67}}, {"id": 71, "type": "=", "text": "=", "parent": 56, "children": [], "start_point": {"row": 41, "column": 69}, "end_point": {"row": 41, "column": 70}}, {"id": 72, "type": "number_literal", "text": "0", "parent": 56, "children": [], "start_point": {"row": 41, "column": 71}, "end_point": {"row": 41, "column": 72}}, {"id": 73, "type": "declaration", "text": "virtual void SetSubController(std::unique_ptr<IWindowController> aController) = 0;", "parent": 14, "children": [74, 75, 77], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 86}}, {"id": 74, "type": "type_identifier", "text": "virtual", "parent": 73, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 11}}, {"id": 75, "type": "ERROR", "text": "void", "parent": 73, "children": [76], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 16}}, {"id": 76, "type": "identifier", "text": "void", "parent": 75, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 16}}, {"id": 77, "type": "init_declarator", "text": "SetSubController(std::unique_ptr<IWindowController> aController) = 0", "parent": 73, "children": [78, 89, 90], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 85}}, {"id": 78, "type": "function_declarator", "text": "SetSubController(std::unique_ptr<IWindowController> aController)", "parent": 77, "children": [79, 80], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 81}}, {"id": 79, "type": "identifier", "text": "SetSubController", "parent": 78, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 33}}, {"id": 80, "type": "parameter_list", "text": "(std::unique_ptr<IWindowController> aController)", "parent": 78, "children": [81], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 81}}, {"id": 81, "type": "parameter_declaration", "text": "std::unique_ptr<IWindowController> aController", "parent": 80, "children": [82, 83, 88], "start_point": {"row": 47, "column": 34}, "end_point": {"row": 47, "column": 80}}, {"id": 82, "type": "type_identifier", "text": "std", "parent": 81, "children": [], "start_point": {"row": 47, "column": 34}, "end_point": {"row": 47, "column": 37}}, {"id": 83, "type": "ERROR", "text": "::unique_ptr<IWindowController>", "parent": 81, "children": [84, 85, 86, 87], "start_point": {"row": 47, "column": 37}, "end_point": {"row": 47, "column": 68}}, {"id": 84, "type": "identifier", "text": "unique_ptr", "parent": 83, "children": [], "start_point": {"row": 47, "column": 39}, "end_point": {"row": 47, "column": 49}}, {"id": 85, "type": "<", "text": "<", "parent": 83, "children": [], "start_point": {"row": 47, "column": 49}, "end_point": {"row": 47, "column": 50}}, {"id": 86, "type": "identifier", "text": "IWindowController", "parent": 83, "children": [], "start_point": {"row": 47, "column": 50}, "end_point": {"row": 47, "column": 67}}, {"id": 87, "type": ">", "text": ">", "parent": 83, "children": [], "start_point": {"row": 47, "column": 67}, "end_point": {"row": 47, "column": 68}}, {"id": 88, "type": "identifier", "text": "aController", "parent": 81, "children": [], "start_point": {"row": 47, "column": 69}, "end_point": {"row": 47, "column": 80}}, {"id": 89, "type": "=", "text": "=", "parent": 77, "children": [], "start_point": {"row": 47, "column": 82}, "end_point": {"row": 47, "column": 83}}, {"id": 90, "type": "number_literal", "text": "0", "parent": 77, "children": [], "start_point": {"row": 47, "column": 84}, "end_point": {"row": 47, "column": 85}}, {"id": 91, "type": "declaration", "text": "virtual void UnsetSubController() = 0;", "parent": 14, "children": [92, 93, 95], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 42}}, {"id": 92, "type": "type_identifier", "text": "virtual", "parent": 91, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 11}}, {"id": 93, "type": "ERROR", "text": "void", "parent": 91, "children": [94], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 16}}, {"id": 94, "type": "identifier", "text": "void", "parent": 93, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 16}}, {"id": 95, "type": "init_declarator", "text": "UnsetSubController() = 0", "parent": 91, "children": [96, 99, 100], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 41}}, {"id": 96, "type": "function_declarator", "text": "UnsetSubController()", "parent": 95, "children": [97, 98], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 37}}, {"id": 97, "type": "identifier", "text": "UnsetSubController", "parent": 96, "children": [], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 35}}, {"id": 98, "type": "parameter_list", "text": "()", "parent": 96, "children": [], "start_point": {"row": 52, "column": 35}, "end_point": {"row": 52, "column": 37}}, {"id": 99, "type": "=", "text": "=", "parent": 95, "children": [], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 39}}, {"id": 100, "type": "number_literal", "text": "0", "parent": 95, "children": [], "start_point": {"row": 52, "column": 40}, "end_point": {"row": 52, "column": 41}}, {"id": 101, "type": "labeled_statement", "text": "protected:\n /**\n * Gets the subcontroller.\n * @return\n */\n virtual std::unique_ptr<IWindowController>& GetSubController() = 0;", "parent": 14, "children": [102], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 59, "column": 71}}, {"id": 102, "type": "declaration", "text": "virtual std::unique_ptr<IWindowController>& GetSubController() = 0;", "parent": 101, "children": [103, 104, 110], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 71}}, {"id": 103, "type": "type_identifier", "text": "virtual", "parent": 102, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 11}}, {"id": 104, "type": "ERROR", "text": "std::unique_ptr<IWindowController>&", "parent": 102, "children": [105, 106, 107, 108, 109], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 47}}, {"id": 105, "type": "identifier", "text": "std", "parent": 104, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 15}}, {"id": 106, "type": "identifier", "text": "unique_ptr", "parent": 104, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 27}}, {"id": 107, "type": "<", "text": "<", "parent": 104, "children": [], "start_point": {"row": 59, "column": 27}, "end_point": {"row": 59, "column": 28}}, {"id": 108, "type": "identifier", "text": "IWindowController", "parent": 104, "children": [], "start_point": {"row": 59, "column": 28}, "end_point": {"row": 59, "column": 45}}, {"id": 109, "type": ">", "text": ">", "parent": 104, "children": [], "start_point": {"row": 59, "column": 45}, "end_point": {"row": 59, "column": 46}}, {"id": 110, "type": "init_declarator", "text": "GetSubController() = 0", "parent": 102, "children": [111, 114, 115], "start_point": {"row": 59, "column": 48}, "end_point": {"row": 59, "column": 70}}, {"id": 111, "type": "function_declarator", "text": "GetSubController()", "parent": 110, "children": [112, 113], "start_point": {"row": 59, "column": 48}, "end_point": {"row": 59, "column": 66}}, {"id": 112, "type": "identifier", "text": "GetSubController", "parent": 111, "children": [], "start_point": {"row": 59, "column": 48}, "end_point": {"row": 59, "column": 64}}, {"id": 113, "type": "parameter_list", "text": "()", "parent": 111, "children": [], "start_point": {"row": 59, "column": 64}, "end_point": {"row": 59, "column": 66}}, {"id": 114, "type": "=", "text": "=", "parent": 110, "children": [], "start_point": {"row": 59, "column": 67}, "end_point": {"row": 59, "column": 68}}, {"id": 115, "type": "number_literal", "text": "0", "parent": 110, "children": [], "start_point": {"row": 59, "column": 69}, "end_point": {"row": 59, "column": 70}}, {"id": 116, "type": "declaration", "text": "virtual std::vector<std::shared_ptr<IWindow>>& GetWindows() = 0;", "parent": 14, "children": [117, 118, 127], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 68}}, {"id": 117, "type": "type_identifier", "text": "virtual", "parent": 116, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 11}}, {"id": 118, "type": "ERROR", "text": "std::vector<std::shared_ptr<IWindow>>&", "parent": 116, "children": [119, 120, 121, 122, 123, 124, 125, 126], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 50}}, {"id": 119, "type": "identifier", "text": "std", "parent": 118, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 15}}, {"id": 120, "type": "identifier", "text": "vector", "parent": 118, "children": [], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 23}}, {"id": 121, "type": "<", "text": "<", "parent": 118, "children": [], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 24}}, {"id": 122, "type": "identifier", "text": "std", "parent": 118, "children": [], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 27}}, {"id": 123, "type": "identifier", "text": "shared_ptr", "parent": 118, "children": [], "start_point": {"row": 65, "column": 29}, "end_point": {"row": 65, "column": 39}}, {"id": 124, "type": "<", "text": "<", "parent": 118, "children": [], "start_point": {"row": 65, "column": 39}, "end_point": {"row": 65, "column": 40}}, {"id": 125, "type": "identifier", "text": "IWindow", "parent": 118, "children": [], "start_point": {"row": 65, "column": 40}, "end_point": {"row": 65, "column": 47}}, {"id": 126, "type": ">>", "text": ">>", "parent": 118, "children": [], "start_point": {"row": 65, "column": 47}, "end_point": {"row": 65, "column": 49}}, {"id": 127, "type": "init_declarator", "text": "GetWindows() = 0", "parent": 116, "children": [128, 131, 132], "start_point": {"row": 65, "column": 51}, "end_point": {"row": 65, "column": 67}}, {"id": 128, "type": "function_declarator", "text": "GetWindows()", "parent": 127, "children": [129, 130], "start_point": {"row": 65, "column": 51}, "end_point": {"row": 65, "column": 63}}, {"id": 129, "type": "identifier", "text": "GetWindows", "parent": 128, "children": [], "start_point": {"row": 65, "column": 51}, "end_point": {"row": 65, "column": 61}}, {"id": 130, "type": "parameter_list", "text": "()", "parent": 128, "children": [], "start_point": {"row": 65, "column": 61}, "end_point": {"row": 65, "column": 63}}, {"id": 131, "type": "=", "text": "=", "parent": 127, "children": [], "start_point": {"row": 65, "column": 64}, "end_point": {"row": 65, "column": 65}}, {"id": 132, "type": "number_literal", "text": "0", "parent": 127, "children": [], "start_point": {"row": 65, "column": 66}, "end_point": {"row": 65, "column": 67}}, {"id": 133, "type": "declaration", "text": "virtual WindowModel", "parent": 14, "children": [134, 135], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 23}}, {"id": 134, "type": "type_identifier", "text": "virtual", "parent": 133, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 11}}, {"id": 135, "type": "identifier", "text": "WindowModel", "parent": 133, "children": [], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 23}}, {"id": 136, "type": "assignment_expression", "text": "& GetWindowModel() = 0", "parent": 14, "children": [137, 141, 142], "start_point": {"row": 71, "column": 23}, "end_point": {"row": 71, "column": 45}}, {"id": 137, "type": "pointer_expression", "text": "& GetWindowModel()", "parent": 136, "children": [138], "start_point": {"row": 71, "column": 23}, "end_point": {"row": 71, "column": 41}}, {"id": 138, "type": "call_expression", "text": "GetWindowModel()", "parent": 137, "children": [139, 140], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 41}}, {"id": 139, "type": "identifier", "text": "GetWindowModel", "parent": 138, "children": [], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 39}}, {"id": 140, "type": "argument_list", "text": "()", "parent": 138, "children": [], "start_point": {"row": 71, "column": 39}, "end_point": {"row": 71, "column": 41}}, {"id": 141, "type": "=", "text": "=", "parent": 136, "children": [], "start_point": {"row": 71, "column": 42}, "end_point": {"row": 71, "column": 43}}, {"id": 142, "type": "number_literal", "text": "0", "parent": 136, "children": [], "start_point": {"row": 71, "column": 44}, "end_point": {"row": 71, "column": 45}}, {"id": 143, "type": "declaration", "text": "virtual const int", "parent": 14, "children": [144, 145], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 21}}, {"id": 144, "type": "type_identifier", "text": "virtual", "parent": 143, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 11}}, {"id": 145, "type": "identifier", "text": "int", "parent": 143, "children": [], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 21}}, {"id": 146, "type": "assignment_expression", "text": "& GetHeightReference() = 0", "parent": 14, "children": [147, 151, 152], "start_point": {"row": 77, "column": 21}, "end_point": {"row": 77, "column": 47}}, {"id": 147, "type": "pointer_expression", "text": "& GetHeightReference()", "parent": 146, "children": [148], "start_point": {"row": 77, "column": 21}, "end_point": {"row": 77, "column": 43}}, {"id": 148, "type": "call_expression", "text": "GetHeightReference()", "parent": 147, "children": [149, 150], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 43}}, {"id": 149, "type": "identifier", "text": "GetHeightReference", "parent": 148, "children": [], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 41}}, {"id": 150, "type": "argument_list", "text": "()", "parent": 148, "children": [], "start_point": {"row": 77, "column": 41}, "end_point": {"row": 77, "column": 43}}, {"id": 151, "type": "=", "text": "=", "parent": 146, "children": [], "start_point": {"row": 77, "column": 44}, "end_point": {"row": 77, "column": 45}}, {"id": 152, "type": "number_literal", "text": "0", "parent": 146, "children": [], "start_point": {"row": 77, "column": 46}, "end_point": {"row": 77, "column": 47}}, {"id": 153, "type": "declaration", "text": "virtual const int", "parent": 14, "children": [154, 155], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 21}}, {"id": 154, "type": "type_identifier", "text": "virtual", "parent": 153, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 11}}, {"id": 155, "type": "identifier", "text": "int", "parent": 153, "children": [], "start_point": {"row": 83, "column": 18}, "end_point": {"row": 83, "column": 21}}, {"id": 156, "type": "assignment_expression", "text": "& GetWidthReference() = 0", "parent": 14, "children": [157, 161, 162], "start_point": {"row": 83, "column": 21}, "end_point": {"row": 83, "column": 46}}, {"id": 157, "type": "pointer_expression", "text": "& GetWidthReference()", "parent": 156, "children": [158], "start_point": {"row": 83, "column": 21}, "end_point": {"row": 83, "column": 42}}, {"id": 158, "type": "call_expression", "text": "GetWidthReference()", "parent": 157, "children": [159, 160], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 42}}, {"id": 159, "type": "identifier", "text": "GetWidthReference", "parent": 158, "children": [], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 40}}, {"id": 160, "type": "argument_list", "text": "()", "parent": 158, "children": [], "start_point": {"row": 83, "column": 40}, "end_point": {"row": 83, "column": 42}}, {"id": 161, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 83, "column": 43}, "end_point": {"row": 83, "column": 44}}, {"id": 162, "type": "number_literal", "text": "0", "parent": 156, "children": [], "start_point": {"row": 83, "column": 45}, "end_point": {"row": 83, "column": 46}}, {"id": 163, "type": "declaration", "text": "virtual bool HasSubControllerSet() = 0;", "parent": 14, "children": [164, 165, 167], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 43}}, {"id": 164, "type": "type_identifier", "text": "virtual", "parent": 163, "children": [], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 11}}, {"id": 165, "type": "ERROR", "text": "bool", "parent": 163, "children": [166], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 16}}, {"id": 166, "type": "identifier", "text": "bool", "parent": 165, "children": [], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 16}}, {"id": 167, "type": "init_declarator", "text": "HasSubControllerSet() = 0", "parent": 163, "children": [168, 171, 172], "start_point": {"row": 89, "column": 17}, "end_point": {"row": 89, "column": 42}}, {"id": 168, "type": "function_declarator", "text": "HasSubControllerSet()", "parent": 167, "children": [169, 170], "start_point": {"row": 89, "column": 17}, "end_point": {"row": 89, "column": 38}}, {"id": 169, "type": "identifier", "text": "HasSubControllerSet", "parent": 168, "children": [], "start_point": {"row": 89, "column": 17}, "end_point": {"row": 89, "column": 36}}, {"id": 170, "type": "parameter_list", "text": "()", "parent": 168, "children": [], "start_point": {"row": 89, "column": 36}, "end_point": {"row": 89, "column": 38}}, {"id": 171, "type": "=", "text": "=", "parent": 167, "children": [], "start_point": {"row": 89, "column": 39}, "end_point": {"row": 89, "column": 40}}, {"id": 172, "type": "number_literal", "text": "0", "parent": 167, "children": [], "start_point": {"row": 89, "column": 41}, "end_point": {"row": 89, "column": 42}}, {"id": 173, "type": "declaration", "text": "virtual void SetHeight(int aHeigth) = 0;", "parent": 14, "children": [174, 175, 177], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 44}}, {"id": 174, "type": "type_identifier", "text": "virtual", "parent": 173, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 11}}, {"id": 175, "type": "ERROR", "text": "void", "parent": 173, "children": [176], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 16}}, {"id": 176, "type": "identifier", "text": "void", "parent": 175, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 16}}, {"id": 177, "type": "init_declarator", "text": "SetHeight(int aHeigth) = 0", "parent": 173, "children": [178, 184, 185], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 43}}, {"id": 178, "type": "function_declarator", "text": "SetHeight(int aHeigth)", "parent": 177, "children": [179, 180], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 39}}, {"id": 179, "type": "identifier", "text": "SetHeight", "parent": 178, "children": [], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 26}}, {"id": 180, "type": "parameter_list", "text": "(int aHeigth)", "parent": 178, "children": [181], "start_point": {"row": 95, "column": 26}, "end_point": {"row": 95, "column": 39}}, {"id": 181, "type": "parameter_declaration", "text": "int aHeigth", "parent": 180, "children": [182, 183], "start_point": {"row": 95, "column": 27}, "end_point": {"row": 95, "column": 38}}, {"id": 182, "type": "primitive_type", "text": "int", "parent": 181, "children": [], "start_point": {"row": 95, "column": 27}, "end_point": {"row": 95, "column": 30}}, {"id": 183, "type": "identifier", "text": "aHeigth", "parent": 181, "children": [], "start_point": {"row": 95, "column": 31}, "end_point": {"row": 95, "column": 38}}, {"id": 184, "type": "=", "text": "=", "parent": 177, "children": [], "start_point": {"row": 95, "column": 40}, "end_point": {"row": 95, "column": 41}}, {"id": 185, "type": "number_literal", "text": "0", "parent": 177, "children": [], "start_point": {"row": 95, "column": 42}, "end_point": {"row": 95, "column": 43}}, {"id": 186, "type": "declaration", "text": "virtual void SetWidth(int aWidth) = 0;", "parent": 14, "children": [187, 188, 190], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 42}}, {"id": 187, "type": "type_identifier", "text": "virtual", "parent": 186, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 11}}, {"id": 188, "type": "ERROR", "text": "void", "parent": 186, "children": [189], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 16}}, {"id": 189, "type": "identifier", "text": "void", "parent": 188, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 16}}, {"id": 190, "type": "init_declarator", "text": "SetWidth(int aWidth) = 0", "parent": 186, "children": [191, 197, 198], "start_point": {"row": 101, "column": 17}, "end_point": {"row": 101, "column": 41}}, {"id": 191, "type": "function_declarator", "text": "SetWidth(int aWidth)", "parent": 190, "children": [192, 193], "start_point": {"row": 101, "column": 17}, "end_point": {"row": 101, "column": 37}}, {"id": 192, "type": "identifier", "text": "SetWidth", "parent": 191, "children": [], "start_point": {"row": 101, "column": 17}, "end_point": {"row": 101, "column": 25}}, {"id": 193, "type": "parameter_list", "text": "(int aWidth)", "parent": 191, "children": [194], "start_point": {"row": 101, "column": 25}, "end_point": {"row": 101, "column": 37}}, {"id": 194, "type": "parameter_declaration", "text": "int aWidth", "parent": 193, "children": [195, 196], "start_point": {"row": 101, "column": 26}, "end_point": {"row": 101, "column": 36}}, {"id": 195, "type": "primitive_type", "text": "int", "parent": 194, "children": [], "start_point": {"row": 101, "column": 26}, "end_point": {"row": 101, "column": 29}}, {"id": 196, "type": "identifier", "text": "aWidth", "parent": 194, "children": [], "start_point": {"row": 101, "column": 30}, "end_point": {"row": 101, "column": 36}}, {"id": 197, "type": "=", "text": "=", "parent": 190, "children": [], "start_point": {"row": 101, "column": 38}, "end_point": {"row": 101, "column": 39}}, {"id": 198, "type": "number_literal", "text": "0", "parent": 190, "children": [], "start_point": {"row": 101, "column": 40}, "end_point": {"row": 101, "column": 41}}]}, "node_categories": {"declarations": {"functions": [14, 22, 32, 47, 57, 67, 78, 96, 111, 128, 168, 178, 191], "variables": [12, 17, 27, 35, 42, 52, 61, 64, 73, 81, 91, 102, 116, 133, 143, 153, 163, 173, 181, 186, 194], "classes": [], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [137, 138, 147, 148, 157, 158], "assignments": [136, 146, 156], "loops": [], "conditionals": [13, 15, 18, 20, 23, 28, 30, 33, 36, 39, 43, 45, 48, 53, 55, 58, 62, 70, 74, 76, 79, 82, 84, 86, 88, 92, 94, 97, 103, 105, 106, 108, 112, 117, 119, 120, 122, 123, 125, 129, 134, 135, 139, 144, 145, 149, 154, 155, 159, 164, 166, 169, 174, 176, 179, 183, 187, 189, 192, 196], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 26, 41, 51, 72, 90, 100, 115, 132, 142, 152, 162, 172, 185, 198], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 14, "universal_type": "function", "name": "IWindowController", "text_snippet": "class IWindowController\n{\npublic:\n /**\n * Sets up the layout and sets up curses in case of th"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "SetUp()"}, {"node_id": 32, "universal_type": "function", "name": "aAction)", "text_snippet": "KeyAction(unsigned int aAction)"}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "Process()"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "SetReleaseCallback(std::function<void()> aCallback)"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "()"}, {"node_id": 78, "universal_type": "function", "name": "unknown", "text_snippet": "SetSubController(std::unique_ptr<IWindowController> aController)"}, {"node_id": 96, "universal_type": "function", "name": "unknown", "text_snippet": "UnsetSubController()"}, {"node_id": 111, "universal_type": "function", "name": "unknown", "text_snippet": "GetSubController()"}, {"node_id": 128, "universal_type": "function", "name": "unknown", "text_snippet": "GetWindows()"}, {"node_id": 168, "universal_type": "function", "name": "unknown", "text_snippet": "HasSubControllerSet()"}, {"node_id": 178, "universal_type": "function", "name": "unknown", "text_snippet": "SetHeight(int aHeigth)"}, {"node_id": 191, "universal_type": "function", "name": "unknown", "text_snippet": "SetWidth(int aWidth)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <functional>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <memory>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"WindowController.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#pragma once\n\n/* Copyright (c) 2021 [<NAME>] - IWindowController.h\n *\n * This file contains the interface for a WindowController.\n *\n **/\n\n#include <functional>\n#include <memory>\n\n#include \"WindowController.h\"\n\nclass WindowModel;\nclass IWindowController\n{\npublic:\n /**\n * Sets up the layout and sets up curses in case of the mainn controller.\n * @return true if successful\n */\n virtual bool SetUp() = 0;\n\n /**\n * Catches action given to the controller and handles it.\n * @param aAction - Action to handle, uses Curses keycodes.\n * @return true - If action successfully performed.\n */\n virtual bool KeyAction(unsigned int aAction) = 0;\n\n /**\n * Redraws and handles windows.\n * @return true if processing succeeded.\n */\n virtual bool Process() = 0;\n\n /**\n * Tells the parent controller to release the subcontroller.\n * @param aCallback - Function pointer to the UnsetSubController function of\n * the parent controller.\n */\n virtual void SetReleaseCallback(std::function<void()> aCallback) = 0;\n\n /**\n * Passes control to a subcontroller.\n * @param aController - Controller to set.\n */\n virtual void SetSubController(std::unique_ptr<IWindowController> aController) = 0;\n\n /**\n * Releases control to the subcontroller.\n */\n virtual void UnsetSubController() = 0;\n\nprotected:\n /**\n * Gets the subcontroller.\n * @return\n */\n virtual std::unique_ptr<IWindowController>& GetSubController() = 0;\n\n /**\n * Gets the NCurses windows attached to this controller.\n * @return reference to windows vector, can be empty.\n */\n virtual std::vector<std::shared_ptr<IWindow>>& GetWindows() = 0;\n\n /**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */\n virtual WindowModel& GetWindowModel() = 0;\n\n /**\n * Gets height of the entire window as a reference.\n * @return height of the window.\n */\n virtual const int& GetHeightReference() = 0;\n\n /**\n * Gets width of the entire window as a reference.\n * @return width of the window.\n */\n virtual const int& GetWidthReference() = 0;\n\n /**\n * Checks if there is a subcontroller set, used in KeyAction.\n * @return true if there is a subcontroller set.\n */\n virtual bool HasSubControllerSet() = 0;\n\n /**\n * Sets height of the entire window. Use when obtaining size from for example the setup.\n * @param aHeigth - Height to set.\n */\n virtual void SetHeight(int aHeigth) = 0;\n\n /**\n * Sets width of the entire window. Use when obtaining size from for example the setup.\n * @param aWidth - Width to set.\n */\n virtual void SetWidth(int aWidth) = 0;\n};\n"}
80,938
c
#include <pthread.h> #include <errno.h> #include <sys/syscalls.h> int pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) { // XXX: do something with the attributes uint64_t e = 0; sc_do_locking_create_mutex(mutex, &e); return e; } int pthread_mutex_destroy (pthread_mutex_t *mutex) { uint64_t e = 0; sc_do_locking_destroy_mutex(*mutex, &e); return e; } static int __pthread_ensure_mutex(pthread_mutex_t* mutex) { if(!*mutex) { return pthread_mutex_init(mutex, 0); } return 0; } int pthread_mutex_lock (pthread_mutex_t *mutex) { uint64_t e = 0; if((e = __pthread_ensure_mutex(mutex))) { return e; } e = 0; sc_do_locking_lock_mutex(*mutex, 0, &e); return e; } int pthread_mutex_trylock (pthread_mutex_t *mutex) { uint64_t e = 0; if((e = __pthread_ensure_mutex(mutex))) { return e; } e = 0; sc_do_locking_lock_mutex(*mutex, 1, &e); return e; } int pthread_mutex_unlock (pthread_mutex_t *mutex) { uint64_t e = 0; sc_do_locking_unlock_mutex(*mutex, &e); return e; } int pthread_mutexattr_init(pthread_mutexattr_t *attr) { attr->type = PTHREAD_MUTEX_DEFAULT; return 0; } int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) { return 0; } int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) { if( type != PTHREAD_MUTEX_DEFAULT && type != PTHREAD_MUTEX_RECURSIVE ) { return EINVAL; } attr->type = type; return 0; } int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int* type) { *type = attr->type; return 0; }
24.75
64
(translation_unit) "#include <pthread.h>\n#include <errno.h>\n\n#include <sys/syscalls.h>\n\nint pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) {\n // XXX: do something with the attributes\n\n uint64_t e = 0;\n sc_do_locking_create_mutex(mutex, &e);\n return e;\n}\n\nint pthread_mutex_destroy (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n sc_do_locking_destroy_mutex(*mutex, &e);\n return e;\n}\n\nstatic int __pthread_ensure_mutex(pthread_mutex_t* mutex) {\n if(!*mutex) {\n return pthread_mutex_init(mutex, 0);\n }\n\n return 0;\n}\n\nint pthread_mutex_lock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }\n\n e = 0;\n sc_do_locking_lock_mutex(*mutex, 0, &e);\n return e;\n}\n\nint pthread_mutex_trylock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }\n\n e = 0;\n sc_do_locking_lock_mutex(*mutex, 1, &e);\n return e;\n}\n\nint pthread_mutex_unlock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n sc_do_locking_unlock_mutex(*mutex, &e);\n return e;\n}\n\nint pthread_mutexattr_init(pthread_mutexattr_t *attr) {\n attr->type = PTHREAD_MUTEX_DEFAULT;\n return 0;\n}\n\nint pthread_mutexattr_destroy(pthread_mutexattr_t *attr) {\n return 0;\n}\n\nint pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) {\n if(\n type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE\n ) {\n return EINVAL;\n }\n\n attr->type = type;\n\n return 0;\n}\n\nint pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int* type) {\n *type = attr->type;\n return 0;\n}\n" (preproc_include) "#include <pthread.h>\n" (#include) "#include" (system_lib_string) "<pthread.h>" (preproc_include) "#include <errno.h>\n" (#include) "#include" (system_lib_string) "<errno.h>" (preproc_include) "#include <sys/syscalls.h>\n" (#include) "#include" (system_lib_string) "<sys/syscalls.h>" (function_definition) "int pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) {\n // XXX: do something with the attributes\n\n uint64_t e = 0;\n sc_do_locking_create_mutex(mutex, &e);\n return e;\n}" (primitive_type) "int" (function_declarator) "pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)" (identifier) "pthread_mutex_init" (parameter_list) "(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)" (() "(" (parameter_declaration) "pthread_mutex_t *mutex" (type_identifier) "pthread_mutex_t" (pointer_declarator) "*mutex" (*) "*" (identifier) "mutex" (,) "," (parameter_declaration) "const pthread_mutexattr_t *attr" (type_qualifier) "const" (const) "const" (type_identifier) "pthread_mutexattr_t" (pointer_declarator) "*attr" (*) "*" (identifier) "attr" ()) ")" (compound_statement) "{\n // XXX: do something with the attributes\n\n uint64_t e = 0;\n sc_do_locking_create_mutex(mutex, &e);\n return e;\n}" ({) "{" (comment) "// XXX: do something with the attributes" (declaration) "uint64_t e = 0;" (primitive_type) "uint64_t" (init_declarator) "e = 0" (identifier) "e" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "sc_do_locking_create_mutex(mutex, &e);" (call_expression) "sc_do_locking_create_mutex(mutex, &e)" (identifier) "sc_do_locking_create_mutex" (argument_list) "(mutex, &e)" (() "(" (identifier) "mutex" (,) "," (pointer_expression) "&e" (&) "&" (identifier) "e" ()) ")" (;) ";" (return_statement) "return e;" (return) "return" (identifier) "e" (;) ";" (}) "}" (function_definition) "int pthread_mutex_destroy (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n sc_do_locking_destroy_mutex(*mutex, &e);\n return e;\n}" (primitive_type) "int" (function_declarator) "pthread_mutex_destroy (pthread_mutex_t *mutex)" (identifier) "pthread_mutex_destroy" (parameter_list) "(pthread_mutex_t *mutex)" (() "(" (parameter_declaration) "pthread_mutex_t *mutex" (type_identifier) "pthread_mutex_t" (pointer_declarator) "*mutex" (*) "*" (identifier) "mutex" ()) ")" (compound_statement) "{\n uint64_t e = 0;\n sc_do_locking_destroy_mutex(*mutex, &e);\n return e;\n}" ({) "{" (declaration) "uint64_t e = 0;" (primitive_type) "uint64_t" (init_declarator) "e = 0" (identifier) "e" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "sc_do_locking_destroy_mutex(*mutex, &e);" (call_expression) "sc_do_locking_destroy_mutex(*mutex, &e)" (identifier) "sc_do_locking_destroy_mutex" (argument_list) "(*mutex, &e)" (() "(" (pointer_expression) "*mutex" (*) "*" (identifier) "mutex" (,) "," (pointer_expression) "&e" (&) "&" (identifier) "e" ()) ")" (;) ";" (return_statement) "return e;" (return) "return" (identifier) "e" (;) ";" (}) "}" (function_definition) "static int __pthread_ensure_mutex(pthread_mutex_t* mutex) {\n if(!*mutex) {\n return pthread_mutex_init(mutex, 0);\n }\n\n return 0;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "__pthread_ensure_mutex(pthread_mutex_t* mutex)" (identifier) "__pthread_ensure_mutex" (parameter_list) "(pthread_mutex_t* mutex)" (() "(" (parameter_declaration) "pthread_mutex_t* mutex" (type_identifier) "pthread_mutex_t" (pointer_declarator) "* mutex" (*) "*" (identifier) "mutex" ()) ")" (compound_statement) "{\n if(!*mutex) {\n return pthread_mutex_init(mutex, 0);\n }\n\n return 0;\n}" ({) "{" (if_statement) "if(!*mutex) {\n return pthread_mutex_init(mutex, 0);\n }" (if) "if" (parenthesized_expression) "(!*mutex)" (() "(" (unary_expression) "!*mutex" (!) "!" (pointer_expression) "*mutex" (*) "*" (identifier) "mutex" ()) ")" (compound_statement) "{\n return pthread_mutex_init(mutex, 0);\n }" ({) "{" (return_statement) "return pthread_mutex_init(mutex, 0);" (return) "return" (call_expression) "pthread_mutex_init(mutex, 0)" (identifier) "pthread_mutex_init" (argument_list) "(mutex, 0)" (() "(" (identifier) "mutex" (,) "," (number_literal) "0" ()) ")" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "int pthread_mutex_lock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }\n\n e = 0;\n sc_do_locking_lock_mutex(*mutex, 0, &e);\n return e;\n}" (primitive_type) "int" (function_declarator) "pthread_mutex_lock (pthread_mutex_t *mutex)" (identifier) "pthread_mutex_lock" (parameter_list) "(pthread_mutex_t *mutex)" (() "(" (parameter_declaration) "pthread_mutex_t *mutex" (type_identifier) "pthread_mutex_t" (pointer_declarator) "*mutex" (*) "*" (identifier) "mutex" ()) ")" (compound_statement) "{\n uint64_t e = 0;\n if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }\n\n e = 0;\n sc_do_locking_lock_mutex(*mutex, 0, &e);\n return e;\n}" ({) "{" (declaration) "uint64_t e = 0;" (primitive_type) "uint64_t" (init_declarator) "e = 0" (identifier) "e" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }" (if) "if" (parenthesized_expression) "((e = __pthread_ensure_mutex(mutex)))" (() "(" (parenthesized_expression) "(e = __pthread_ensure_mutex(mutex))" (() "(" (assignment_expression) "e = __pthread_ensure_mutex(mutex)" (identifier) "e" (=) "=" (call_expression) "__pthread_ensure_mutex(mutex)" (identifier) "__pthread_ensure_mutex" (argument_list) "(mutex)" (() "(" (identifier) "mutex" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n return e;\n }" ({) "{" (return_statement) "return e;" (return) "return" (identifier) "e" (;) ";" (}) "}" (expression_statement) "e = 0;" (assignment_expression) "e = 0" (identifier) "e" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "sc_do_locking_lock_mutex(*mutex, 0, &e);" (call_expression) "sc_do_locking_lock_mutex(*mutex, 0, &e)" (identifier) "sc_do_locking_lock_mutex" (argument_list) "(*mutex, 0, &e)" (() "(" (pointer_expression) "*mutex" (*) "*" (identifier) "mutex" (,) "," (number_literal) "0" (,) "," (pointer_expression) "&e" (&) "&" (identifier) "e" ()) ")" (;) ";" (return_statement) "return e;" (return) "return" (identifier) "e" (;) ";" (}) "}" (function_definition) "int pthread_mutex_trylock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }\n\n e = 0;\n sc_do_locking_lock_mutex(*mutex, 1, &e);\n return e;\n}" (primitive_type) "int" (function_declarator) "pthread_mutex_trylock (pthread_mutex_t *mutex)" (identifier) "pthread_mutex_trylock" (parameter_list) "(pthread_mutex_t *mutex)" (() "(" (parameter_declaration) "pthread_mutex_t *mutex" (type_identifier) "pthread_mutex_t" (pointer_declarator) "*mutex" (*) "*" (identifier) "mutex" ()) ")" (compound_statement) "{\n uint64_t e = 0;\n if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }\n\n e = 0;\n sc_do_locking_lock_mutex(*mutex, 1, &e);\n return e;\n}" ({) "{" (declaration) "uint64_t e = 0;" (primitive_type) "uint64_t" (init_declarator) "e = 0" (identifier) "e" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }" (if) "if" (parenthesized_expression) "((e = __pthread_ensure_mutex(mutex)))" (() "(" (parenthesized_expression) "(e = __pthread_ensure_mutex(mutex))" (() "(" (assignment_expression) "e = __pthread_ensure_mutex(mutex)" (identifier) "e" (=) "=" (call_expression) "__pthread_ensure_mutex(mutex)" (identifier) "__pthread_ensure_mutex" (argument_list) "(mutex)" (() "(" (identifier) "mutex" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n return e;\n }" ({) "{" (return_statement) "return e;" (return) "return" (identifier) "e" (;) ";" (}) "}" (expression_statement) "e = 0;" (assignment_expression) "e = 0" (identifier) "e" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "sc_do_locking_lock_mutex(*mutex, 1, &e);" (call_expression) "sc_do_locking_lock_mutex(*mutex, 1, &e)" (identifier) "sc_do_locking_lock_mutex" (argument_list) "(*mutex, 1, &e)" (() "(" (pointer_expression) "*mutex" (*) "*" (identifier) "mutex" (,) "," (number_literal) "1" (,) "," (pointer_expression) "&e" (&) "&" (identifier) "e" ()) ")" (;) ";" (return_statement) "return e;" (return) "return" (identifier) "e" (;) ";" (}) "}" (function_definition) "int pthread_mutex_unlock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n sc_do_locking_unlock_mutex(*mutex, &e);\n return e;\n}" (primitive_type) "int" (function_declarator) "pthread_mutex_unlock (pthread_mutex_t *mutex)" (identifier) "pthread_mutex_unlock" (parameter_list) "(pthread_mutex_t *mutex)" (() "(" (parameter_declaration) "pthread_mutex_t *mutex" (type_identifier) "pthread_mutex_t" (pointer_declarator) "*mutex" (*) "*" (identifier) "mutex" ()) ")" (compound_statement) "{\n uint64_t e = 0;\n sc_do_locking_unlock_mutex(*mutex, &e);\n return e;\n}" ({) "{" (declaration) "uint64_t e = 0;" (primitive_type) "uint64_t" (init_declarator) "e = 0" (identifier) "e" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "sc_do_locking_unlock_mutex(*mutex, &e);" (call_expression) "sc_do_locking_unlock_mutex(*mutex, &e)" (identifier) "sc_do_locking_unlock_mutex" (argument_list) "(*mutex, &e)" (() "(" (pointer_expression) "*mutex" (*) "*" (identifier) "mutex" (,) "," (pointer_expression) "&e" (&) "&" (identifier) "e" ()) ")" (;) ";" (return_statement) "return e;" (return) "return" (identifier) "e" (;) ";" (}) "}" (function_definition) "int pthread_mutexattr_init(pthread_mutexattr_t *attr) {\n attr->type = PTHREAD_MUTEX_DEFAULT;\n return 0;\n}" (primitive_type) "int" (function_declarator) "pthread_mutexattr_init(pthread_mutexattr_t *attr)" (identifier) "pthread_mutexattr_init" (parameter_list) "(pthread_mutexattr_t *attr)" (() "(" (parameter_declaration) "pthread_mutexattr_t *attr" (type_identifier) "pthread_mutexattr_t" (pointer_declarator) "*attr" (*) "*" (identifier) "attr" ()) ")" (compound_statement) "{\n attr->type = PTHREAD_MUTEX_DEFAULT;\n return 0;\n}" ({) "{" (expression_statement) "attr->type = PTHREAD_MUTEX_DEFAULT;" (assignment_expression) "attr->type = PTHREAD_MUTEX_DEFAULT" (field_expression) "attr->type" (identifier) "attr" (->) "->" (field_identifier) "type" (=) "=" (identifier) "PTHREAD_MUTEX_DEFAULT" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) {\n return 0;\n}" (primitive_type) "int" (function_declarator) "pthread_mutexattr_destroy(pthread_mutexattr_t *attr)" (identifier) "pthread_mutexattr_destroy" (parameter_list) "(pthread_mutexattr_t *attr)" (() "(" (parameter_declaration) "pthread_mutexattr_t *attr" (type_identifier) "pthread_mutexattr_t" (pointer_declarator) "*attr" (*) "*" (identifier) "attr" ()) ")" (compound_statement) "{\n return 0;\n}" ({) "{" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) {\n if(\n type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE\n ) {\n return EINVAL;\n }\n\n attr->type = type;\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)" (identifier) "pthread_mutexattr_settype" (parameter_list) "(pthread_mutexattr_t *attr, int type)" (() "(" (parameter_declaration) "pthread_mutexattr_t *attr" (type_identifier) "pthread_mutexattr_t" (pointer_declarator) "*attr" (*) "*" (identifier) "attr" (,) "," (parameter_declaration) "int type" (primitive_type) "int" (identifier) "type" ()) ")" (compound_statement) "{\n if(\n type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE\n ) {\n return EINVAL;\n }\n\n attr->type = type;\n\n return 0;\n}" ({) "{" (if_statement) "if(\n type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE\n ) {\n return EINVAL;\n }" (if) "if" (parenthesized_expression) "(\n type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE\n )" (() "(" (binary_expression) "type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE" (binary_expression) "type != PTHREAD_MUTEX_DEFAULT" (identifier) "type" (!=) "!=" (identifier) "PTHREAD_MUTEX_DEFAULT" (&&) "&&" (binary_expression) "type != PTHREAD_MUTEX_RECURSIVE" (identifier) "type" (!=) "!=" (identifier) "PTHREAD_MUTEX_RECURSIVE" ()) ")" (compound_statement) "{\n return EINVAL;\n }" ({) "{" (return_statement) "return EINVAL;" (return) "return" (identifier) "EINVAL" (;) ";" (}) "}" (expression_statement) "attr->type = type;" (assignment_expression) "attr->type = type" (field_expression) "attr->type" (identifier) "attr" (->) "->" (field_identifier) "type" (=) "=" (identifier) "type" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int* type) {\n *type = attr->type;\n return 0;\n}" (primitive_type) "int" (function_declarator) "pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int* type)" (identifier) "pthread_mutexattr_gettype" (parameter_list) "(const pthread_mutexattr_t *attr, int* type)" (() "(" (parameter_declaration) "const pthread_mutexattr_t *attr" (type_qualifier) "const" (const) "const" (type_identifier) "pthread_mutexattr_t" (pointer_declarator) "*attr" (*) "*" (identifier) "attr" (,) "," (parameter_declaration) "int* type" (primitive_type) "int" (pointer_declarator) "* type" (*) "*" (identifier) "type" ()) ")" (compound_statement) "{\n *type = attr->type;\n return 0;\n}" ({) "{" (expression_statement) "*type = attr->type;" (assignment_expression) "*type = attr->type" (pointer_expression) "*type" (*) "*" (identifier) "type" (=) "=" (field_expression) "attr->type" (identifier) "attr" (->) "->" (field_identifier) "type" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
465
0
{"language": "c", "success": true, "metadata": {"lines": 64, "avg_line_length": 24.75, "nodes": 291, "errors": 0, "source_hash": "413459d63b6ec3e7d60bc562cd25b3c39a3f7bbb2389466500403b9ac6647d8f", "categorized_nodes": 205}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <pthread.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": "<pthread.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "preproc_include", "text": "#include <errno.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": "<errno.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <sys/syscalls.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": "<sys/syscalls.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 25}}, {"id": 9, "type": "function_definition", "text": "int pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) {\n // XXX: do something with the attributes\n\n uint64_t e = 0;\n sc_do_locking_create_mutex(mutex, &e);\n return e;\n}", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 10, "type": "primitive_type", "text": "int", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 3}}, {"id": 11, "type": "function_declarator", "text": "pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)", "parent": 9, "children": [12, 13], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 80}}, {"id": 12, "type": "identifier", "text": "pthread_mutex_init", "parent": 11, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 22}}, {"id": 13, "type": "parameter_list", "text": "(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)", "parent": 11, "children": [14, 19], "start_point": {"row": 5, "column": 23}, "end_point": {"row": 5, "column": 80}}, {"id": 14, "type": "parameter_declaration", "text": "pthread_mutex_t *mutex", "parent": 13, "children": [15, 16], "start_point": {"row": 5, "column": 24}, "end_point": {"row": 5, "column": 46}}, {"id": 15, "type": "type_identifier", "text": "pthread_mutex_t", "parent": 14, "children": [], "start_point": {"row": 5, "column": 24}, "end_point": {"row": 5, "column": 39}}, {"id": 16, "type": "pointer_declarator", "text": "*mutex", "parent": 14, "children": [17, 18], "start_point": {"row": 5, "column": 40}, "end_point": {"row": 5, "column": 46}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 5, "column": 40}, "end_point": {"row": 5, "column": 41}}, {"id": 18, "type": "identifier", "text": "mutex", "parent": 16, "children": [], "start_point": {"row": 5, "column": 41}, "end_point": {"row": 5, "column": 46}}, {"id": 19, "type": "parameter_declaration", "text": "const pthread_mutexattr_t *attr", "parent": 13, "children": [20, 21], "start_point": {"row": 5, "column": 48}, "end_point": {"row": 5, "column": 79}}, {"id": 20, "type": "type_identifier", "text": "pthread_mutexattr_t", "parent": 19, "children": [], "start_point": {"row": 5, "column": 54}, "end_point": {"row": 5, "column": 73}}, {"id": 21, "type": "pointer_declarator", "text": "*attr", "parent": 19, "children": [22, 23], "start_point": {"row": 5, "column": 74}, "end_point": {"row": 5, "column": 79}}, {"id": 22, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 5, "column": 74}, "end_point": {"row": 5, "column": 75}}, {"id": 23, "type": "identifier", "text": "attr", "parent": 21, "children": [], "start_point": {"row": 5, "column": 75}, "end_point": {"row": 5, "column": 79}}, {"id": 24, "type": "declaration", "text": "uint64_t e = 0;", "parent": 9, "children": [25, 26], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 19}}, {"id": 25, "type": "primitive_type", "text": "uint64_t", "parent": 24, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 12}}, {"id": 26, "type": "init_declarator", "text": "e = 0", "parent": 24, "children": [27, 28, 29], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 18}}, {"id": 27, "type": "identifier", "text": "e", "parent": 26, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 14}}, {"id": 28, "type": "=", "text": "=", "parent": 26, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 16}}, {"id": 29, "type": "number_literal", "text": "0", "parent": 26, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 18}}, {"id": 30, "type": "call_expression", "text": "sc_do_locking_create_mutex(mutex, &e)", "parent": 9, "children": [31, 32], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 41}}, {"id": 31, "type": "identifier", "text": "sc_do_locking_create_mutex", "parent": 30, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 30}}, {"id": 32, "type": "argument_list", "text": "(mutex, &e)", "parent": 30, "children": [33, 34], "start_point": {"row": 9, "column": 30}, "end_point": {"row": 9, "column": 41}}, {"id": 33, "type": "identifier", "text": "mutex", "parent": 32, "children": [], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 36}}, {"id": 34, "type": "pointer_expression", "text": "&e", "parent": 32, "children": [35], "start_point": {"row": 9, "column": 38}, "end_point": {"row": 9, "column": 40}}, {"id": 35, "type": "identifier", "text": "e", "parent": 34, "children": [], "start_point": {"row": 9, "column": 39}, "end_point": {"row": 9, "column": 40}}, {"id": 36, "type": "return_statement", "text": "return e;", "parent": 9, "children": [37], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 13}}, {"id": 37, "type": "identifier", "text": "e", "parent": 36, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 12}}, {"id": 38, "type": "function_definition", "text": "int pthread_mutex_destroy (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n sc_do_locking_destroy_mutex(*mutex, &e);\n return e;\n}", "parent": null, "children": [39, 40], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 39, "type": "primitive_type", "text": "int", "parent": 38, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 3}}, {"id": 40, "type": "function_declarator", "text": "pthread_mutex_destroy (pthread_mutex_t *mutex)", "parent": 38, "children": [41, 42], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 50}}, {"id": 41, "type": "identifier", "text": "pthread_mutex_destroy", "parent": 40, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 25}}, {"id": 42, "type": "parameter_list", "text": "(pthread_mutex_t *mutex)", "parent": 40, "children": [43], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 50}}, {"id": 43, "type": "parameter_declaration", "text": "pthread_mutex_t *mutex", "parent": 42, "children": [44, 45], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 49}}, {"id": 44, "type": "type_identifier", "text": "pthread_mutex_t", "parent": 43, "children": [], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 42}}, {"id": 45, "type": "pointer_declarator", "text": "*mutex", "parent": 43, "children": [46, 47], "start_point": {"row": 13, "column": 43}, "end_point": {"row": 13, "column": 49}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 13, "column": 43}, "end_point": {"row": 13, "column": 44}}, {"id": 47, "type": "identifier", "text": "mutex", "parent": 45, "children": [], "start_point": {"row": 13, "column": 44}, "end_point": {"row": 13, "column": 49}}, {"id": 48, "type": "declaration", "text": "uint64_t e = 0;", "parent": 38, "children": [49, 50], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 19}}, {"id": 49, "type": "primitive_type", "text": "uint64_t", "parent": 48, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 12}}, {"id": 50, "type": "init_declarator", "text": "e = 0", "parent": 48, "children": [51, 52, 53], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 18}}, {"id": 51, "type": "identifier", "text": "e", "parent": 50, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 14}}, {"id": 52, "type": "=", "text": "=", "parent": 50, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 16}}, {"id": 53, "type": "number_literal", "text": "0", "parent": 50, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 18}}, {"id": 54, "type": "call_expression", "text": "sc_do_locking_destroy_mutex(*mutex, &e)", "parent": 38, "children": [55, 56], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 43}}, {"id": 55, "type": "identifier", "text": "sc_do_locking_destroy_mutex", "parent": 54, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 31}}, {"id": 56, "type": "argument_list", "text": "(*mutex, &e)", "parent": 54, "children": [57, 60], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 43}}, {"id": 57, "type": "pointer_expression", "text": "*mutex", "parent": 56, "children": [58, 59], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 38}}, {"id": 58, "type": "*", "text": "*", "parent": 57, "children": [], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 33}}, {"id": 59, "type": "identifier", "text": "mutex", "parent": 57, "children": [], "start_point": {"row": 15, "column": 33}, "end_point": {"row": 15, "column": 38}}, {"id": 60, "type": "pointer_expression", "text": "&e", "parent": 56, "children": [61], "start_point": {"row": 15, "column": 40}, "end_point": {"row": 15, "column": 42}}, {"id": 61, "type": "identifier", "text": "e", "parent": 60, "children": [], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 42}}, {"id": 62, "type": "return_statement", "text": "return e;", "parent": 38, "children": [63], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 13}}, {"id": 63, "type": "identifier", "text": "e", "parent": 62, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 12}}, {"id": 64, "type": "function_definition", "text": "static int __pthread_ensure_mutex(pthread_mutex_t* mutex) {\n if(!*mutex) {\n return pthread_mutex_init(mutex, 0);\n }\n\n return 0;\n}", "parent": null, "children": [65, 66], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 65, "type": "primitive_type", "text": "int", "parent": 64, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 10}}, {"id": 66, "type": "function_declarator", "text": "__pthread_ensure_mutex(pthread_mutex_t* mutex)", "parent": 64, "children": [67, 68], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 57}}, {"id": 67, "type": "identifier", "text": "__pthread_ensure_mutex", "parent": 66, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 33}}, {"id": 68, "type": "parameter_list", "text": "(pthread_mutex_t* mutex)", "parent": 66, "children": [69], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 57}}, {"id": 69, "type": "parameter_declaration", "text": "pthread_mutex_t* mutex", "parent": 68, "children": [70, 71], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 56}}, {"id": 70, "type": "type_identifier", "text": "pthread_mutex_t", "parent": 69, "children": [], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 49}}, {"id": 71, "type": "pointer_declarator", "text": "* mutex", "parent": 69, "children": [72, 73], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 56}}, {"id": 72, "type": "*", "text": "*", "parent": 71, "children": [], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 50}}, {"id": 73, "type": "identifier", "text": "mutex", "parent": 71, "children": [], "start_point": {"row": 19, "column": 51}, "end_point": {"row": 19, "column": 56}}, {"id": 74, "type": "if_statement", "text": "if(!*mutex) {\n return pthread_mutex_init(mutex, 0);\n }", "parent": 64, "children": [75], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 22, "column": 5}}, {"id": 75, "type": "parenthesized_expression", "text": "(!*mutex)", "parent": 74, "children": [76], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 15}}, {"id": 76, "type": "unary_expression", "text": "!*mutex", "parent": 75, "children": [77, 78], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 14}}, {"id": 77, "type": "!", "text": "!", "parent": 76, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 8}}, {"id": 78, "type": "pointer_expression", "text": "*mutex", "parent": 76, "children": [79, 80], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 14}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 9}}, {"id": 80, "type": "identifier", "text": "mutex", "parent": 78, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 14}}, {"id": 81, "type": "return_statement", "text": "return pthread_mutex_init(mutex, 0);", "parent": 74, "children": [82], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 44}}, {"id": 82, "type": "call_expression", "text": "pthread_mutex_init(mutex, 0)", "parent": 81, "children": [83, 84], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 43}}, {"id": 83, "type": "identifier", "text": "pthread_mutex_init", "parent": 82, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 33}}, {"id": 84, "type": "argument_list", "text": "(mutex, 0)", "parent": 82, "children": [85, 86], "start_point": {"row": 21, "column": 33}, "end_point": {"row": 21, "column": 43}}, {"id": 85, "type": "identifier", "text": "mutex", "parent": 84, "children": [], "start_point": {"row": 21, "column": 34}, "end_point": {"row": 21, "column": 39}}, {"id": 86, "type": "number_literal", "text": "0", "parent": 84, "children": [], "start_point": {"row": 21, "column": 41}, "end_point": {"row": 21, "column": 42}}, {"id": 87, "type": "return_statement", "text": "return 0;", "parent": 64, "children": [88], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 13}}, {"id": 88, "type": "number_literal", "text": "0", "parent": 87, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 12}}, {"id": 89, "type": "function_definition", "text": "int pthread_mutex_lock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }\n\n e = 0;\n sc_do_locking_lock_mutex(*mutex, 0, &e);\n return e;\n}", "parent": null, "children": [90, 91], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 90, "type": "primitive_type", "text": "int", "parent": 89, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 3}}, {"id": 91, "type": "function_declarator", "text": "pthread_mutex_lock (pthread_mutex_t *mutex)", "parent": 89, "children": [92, 93], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 47}}, {"id": 92, "type": "identifier", "text": "pthread_mutex_lock", "parent": 91, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 22}}, {"id": 93, "type": "parameter_list", "text": "(pthread_mutex_t *mutex)", "parent": 91, "children": [94], "start_point": {"row": 27, "column": 23}, "end_point": {"row": 27, "column": 47}}, {"id": 94, "type": "parameter_declaration", "text": "pthread_mutex_t *mutex", "parent": 93, "children": [95, 96], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 46}}, {"id": 95, "type": "type_identifier", "text": "pthread_mutex_t", "parent": 94, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 39}}, {"id": 96, "type": "pointer_declarator", "text": "*mutex", "parent": 94, "children": [97, 98], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 46}}, {"id": 97, "type": "*", "text": "*", "parent": 96, "children": [], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 41}}, {"id": 98, "type": "identifier", "text": "mutex", "parent": 96, "children": [], "start_point": {"row": 27, "column": 41}, "end_point": {"row": 27, "column": 46}}, {"id": 99, "type": "declaration", "text": "uint64_t e = 0;", "parent": 89, "children": [100, 101], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 19}}, {"id": 100, "type": "primitive_type", "text": "uint64_t", "parent": 99, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 12}}, {"id": 101, "type": "init_declarator", "text": "e = 0", "parent": 99, "children": [102, 103, 104], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 18}}, {"id": 102, "type": "identifier", "text": "e", "parent": 101, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 14}}, {"id": 103, "type": "=", "text": "=", "parent": 101, "children": [], "start_point": {"row": 28, "column": 15}, "end_point": {"row": 28, "column": 16}}, {"id": 104, "type": "number_literal", "text": "0", "parent": 101, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 105, "type": "if_statement", "text": "if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }", "parent": 89, "children": [106], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 31, "column": 5}}, {"id": 106, "type": "parenthesized_expression", "text": "((e = __pthread_ensure_mutex(mutex)))", "parent": 105, "children": [107], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 43}}, {"id": 107, "type": "parenthesized_expression", "text": "(e = __pthread_ensure_mutex(mutex))", "parent": 106, "children": [108], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 42}}, {"id": 108, "type": "assignment_expression", "text": "e = __pthread_ensure_mutex(mutex)", "parent": 107, "children": [109, 110, 111], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 41}}, {"id": 109, "type": "identifier", "text": "e", "parent": 108, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 9}}, {"id": 110, "type": "=", "text": "=", "parent": 108, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 11}}, {"id": 111, "type": "call_expression", "text": "__pthread_ensure_mutex(mutex)", "parent": 108, "children": [112, 113], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 41}}, {"id": 112, "type": "identifier", "text": "__pthread_ensure_mutex", "parent": 111, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 34}}, {"id": 113, "type": "argument_list", "text": "(mutex)", "parent": 111, "children": [114], "start_point": {"row": 29, "column": 34}, "end_point": {"row": 29, "column": 41}}, {"id": 114, "type": "identifier", "text": "mutex", "parent": 113, "children": [], "start_point": {"row": 29, "column": 35}, "end_point": {"row": 29, "column": 40}}, {"id": 115, "type": "return_statement", "text": "return e;", "parent": 105, "children": [116], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 17}}, {"id": 116, "type": "identifier", "text": "e", "parent": 115, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 16}}, {"id": 117, "type": "assignment_expression", "text": "e = 0", "parent": 89, "children": [118, 119, 120], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 9}}, {"id": 118, "type": "identifier", "text": "e", "parent": 117, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 5}}, {"id": 119, "type": "=", "text": "=", "parent": 117, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 7}}, {"id": 120, "type": "number_literal", "text": "0", "parent": 117, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 9}}, {"id": 121, "type": "call_expression", "text": "sc_do_locking_lock_mutex(*mutex, 0, &e)", "parent": 89, "children": [122, 123], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 43}}, {"id": 122, "type": "identifier", "text": "sc_do_locking_lock_mutex", "parent": 121, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 28}}, {"id": 123, "type": "argument_list", "text": "(*mutex, 0, &e)", "parent": 121, "children": [124, 127, 128], "start_point": {"row": 34, "column": 28}, "end_point": {"row": 34, "column": 43}}, {"id": 124, "type": "pointer_expression", "text": "*mutex", "parent": 123, "children": [125, 126], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 35}}, {"id": 125, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 30}}, {"id": 126, "type": "identifier", "text": "mutex", "parent": 124, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 35}}, {"id": 127, "type": "number_literal", "text": "0", "parent": 123, "children": [], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 38}}, {"id": 128, "type": "pointer_expression", "text": "&e", "parent": 123, "children": [129], "start_point": {"row": 34, "column": 40}, "end_point": {"row": 34, "column": 42}}, {"id": 129, "type": "identifier", "text": "e", "parent": 128, "children": [], "start_point": {"row": 34, "column": 41}, "end_point": {"row": 34, "column": 42}}, {"id": 130, "type": "return_statement", "text": "return e;", "parent": 89, "children": [131], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 13}}, {"id": 131, "type": "identifier", "text": "e", "parent": 130, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 12}}, {"id": 132, "type": "function_definition", "text": "int pthread_mutex_trylock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }\n\n e = 0;\n sc_do_locking_lock_mutex(*mutex, 1, &e);\n return e;\n}", "parent": null, "children": [133, 134], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 133, "type": "primitive_type", "text": "int", "parent": 132, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 3}}, {"id": 134, "type": "function_declarator", "text": "pthread_mutex_trylock (pthread_mutex_t *mutex)", "parent": 132, "children": [135, 136], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 50}}, {"id": 135, "type": "identifier", "text": "pthread_mutex_trylock", "parent": 134, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 25}}, {"id": 136, "type": "parameter_list", "text": "(pthread_mutex_t *mutex)", "parent": 134, "children": [137], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 38, "column": 50}}, {"id": 137, "type": "parameter_declaration", "text": "pthread_mutex_t *mutex", "parent": 136, "children": [138, 139], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 49}}, {"id": 138, "type": "type_identifier", "text": "pthread_mutex_t", "parent": 137, "children": [], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 42}}, {"id": 139, "type": "pointer_declarator", "text": "*mutex", "parent": 137, "children": [140, 141], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 49}}, {"id": 140, "type": "*", "text": "*", "parent": 139, "children": [], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 44}}, {"id": 141, "type": "identifier", "text": "mutex", "parent": 139, "children": [], "start_point": {"row": 38, "column": 44}, "end_point": {"row": 38, "column": 49}}, {"id": 142, "type": "declaration", "text": "uint64_t e = 0;", "parent": 132, "children": [143, 144], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 19}}, {"id": 143, "type": "primitive_type", "text": "uint64_t", "parent": 142, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 12}}, {"id": 144, "type": "init_declarator", "text": "e = 0", "parent": 142, "children": [145, 146, 147], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 18}}, {"id": 145, "type": "identifier", "text": "e", "parent": 144, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 14}}, {"id": 146, "type": "=", "text": "=", "parent": 144, "children": [], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 16}}, {"id": 147, "type": "number_literal", "text": "0", "parent": 144, "children": [], "start_point": {"row": 39, "column": 17}, "end_point": {"row": 39, "column": 18}}, {"id": 148, "type": "if_statement", "text": "if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }", "parent": 132, "children": [149], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 42, "column": 5}}, {"id": 149, "type": "parenthesized_expression", "text": "((e = __pthread_ensure_mutex(mutex)))", "parent": 148, "children": [150], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 43}}, {"id": 150, "type": "parenthesized_expression", "text": "(e = __pthread_ensure_mutex(mutex))", "parent": 149, "children": [151], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 42}}, {"id": 151, "type": "assignment_expression", "text": "e = __pthread_ensure_mutex(mutex)", "parent": 150, "children": [152, 153, 154], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 41}}, {"id": 152, "type": "identifier", "text": "e", "parent": 151, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 9}}, {"id": 153, "type": "=", "text": "=", "parent": 151, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 11}}, {"id": 154, "type": "call_expression", "text": "__pthread_ensure_mutex(mutex)", "parent": 151, "children": [155, 156], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 41}}, {"id": 155, "type": "identifier", "text": "__pthread_ensure_mutex", "parent": 154, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 34}}, {"id": 156, "type": "argument_list", "text": "(mutex)", "parent": 154, "children": [157], "start_point": {"row": 40, "column": 34}, "end_point": {"row": 40, "column": 41}}, {"id": 157, "type": "identifier", "text": "mutex", "parent": 156, "children": [], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 40}}, {"id": 158, "type": "return_statement", "text": "return e;", "parent": 148, "children": [159], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 17}}, {"id": 159, "type": "identifier", "text": "e", "parent": 158, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 16}}, {"id": 160, "type": "assignment_expression", "text": "e = 0", "parent": 132, "children": [161, 162, 163], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 9}}, {"id": 161, "type": "identifier", "text": "e", "parent": 160, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 5}}, {"id": 162, "type": "=", "text": "=", "parent": 160, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 7}}, {"id": 163, "type": "number_literal", "text": "0", "parent": 160, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 9}}, {"id": 164, "type": "call_expression", "text": "sc_do_locking_lock_mutex(*mutex, 1, &e)", "parent": 132, "children": [165, 166], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 43}}, {"id": 165, "type": "identifier", "text": "sc_do_locking_lock_mutex", "parent": 164, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 28}}, {"id": 166, "type": "argument_list", "text": "(*mutex, 1, &e)", "parent": 164, "children": [167, 170, 171], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 43}}, {"id": 167, "type": "pointer_expression", "text": "*mutex", "parent": 166, "children": [168, 169], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 35}}, {"id": 168, "type": "*", "text": "*", "parent": 167, "children": [], "start_point": {"row": 45, "column": 29}, "end_point": {"row": 45, "column": 30}}, {"id": 169, "type": "identifier", "text": "mutex", "parent": 167, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 35}}, {"id": 170, "type": "number_literal", "text": "1", "parent": 166, "children": [], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 38}}, {"id": 171, "type": "pointer_expression", "text": "&e", "parent": 166, "children": [172], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 42}}, {"id": 172, "type": "identifier", "text": "e", "parent": 171, "children": [], "start_point": {"row": 45, "column": 41}, "end_point": {"row": 45, "column": 42}}, {"id": 173, "type": "return_statement", "text": "return e;", "parent": 132, "children": [174], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 13}}, {"id": 174, "type": "identifier", "text": "e", "parent": 173, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 12}}, {"id": 175, "type": "function_definition", "text": "int pthread_mutex_unlock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n sc_do_locking_unlock_mutex(*mutex, &e);\n return e;\n}", "parent": null, "children": [176, 177], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 53, "column": 1}}, {"id": 176, "type": "primitive_type", "text": "int", "parent": 175, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 3}}, {"id": 177, "type": "function_declarator", "text": "pthread_mutex_unlock (pthread_mutex_t *mutex)", "parent": 175, "children": [178, 179], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 49}}, {"id": 178, "type": "identifier", "text": "pthread_mutex_unlock", "parent": 177, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 24}}, {"id": 179, "type": "parameter_list", "text": "(pthread_mutex_t *mutex)", "parent": 177, "children": [180], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 49}}, {"id": 180, "type": "parameter_declaration", "text": "pthread_mutex_t *mutex", "parent": 179, "children": [181, 182], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 48}}, {"id": 181, "type": "type_identifier", "text": "pthread_mutex_t", "parent": 180, "children": [], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 41}}, {"id": 182, "type": "pointer_declarator", "text": "*mutex", "parent": 180, "children": [183, 184], "start_point": {"row": 49, "column": 42}, "end_point": {"row": 49, "column": 48}}, {"id": 183, "type": "*", "text": "*", "parent": 182, "children": [], "start_point": {"row": 49, "column": 42}, "end_point": {"row": 49, "column": 43}}, {"id": 184, "type": "identifier", "text": "mutex", "parent": 182, "children": [], "start_point": {"row": 49, "column": 43}, "end_point": {"row": 49, "column": 48}}, {"id": 185, "type": "declaration", "text": "uint64_t e = 0;", "parent": 175, "children": [186, 187], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 19}}, {"id": 186, "type": "primitive_type", "text": "uint64_t", "parent": 185, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 12}}, {"id": 187, "type": "init_declarator", "text": "e = 0", "parent": 185, "children": [188, 189, 190], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 18}}, {"id": 188, "type": "identifier", "text": "e", "parent": 187, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 14}}, {"id": 189, "type": "=", "text": "=", "parent": 187, "children": [], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 16}}, {"id": 190, "type": "number_literal", "text": "0", "parent": 187, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 18}}, {"id": 191, "type": "call_expression", "text": "sc_do_locking_unlock_mutex(*mutex, &e)", "parent": 175, "children": [192, 193], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 42}}, {"id": 192, "type": "identifier", "text": "sc_do_locking_unlock_mutex", "parent": 191, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 30}}, {"id": 193, "type": "argument_list", "text": "(*mutex, &e)", "parent": 191, "children": [194, 197], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 42}}, {"id": 194, "type": "pointer_expression", "text": "*mutex", "parent": 193, "children": [195, 196], "start_point": {"row": 51, "column": 31}, "end_point": {"row": 51, "column": 37}}, {"id": 195, "type": "*", "text": "*", "parent": 194, "children": [], "start_point": {"row": 51, "column": 31}, "end_point": {"row": 51, "column": 32}}, {"id": 196, "type": "identifier", "text": "mutex", "parent": 194, "children": [], "start_point": {"row": 51, "column": 32}, "end_point": {"row": 51, "column": 37}}, {"id": 197, "type": "pointer_expression", "text": "&e", "parent": 193, "children": [198], "start_point": {"row": 51, "column": 39}, "end_point": {"row": 51, "column": 41}}, {"id": 198, "type": "identifier", "text": "e", "parent": 197, "children": [], "start_point": {"row": 51, "column": 40}, "end_point": {"row": 51, "column": 41}}, {"id": 199, "type": "return_statement", "text": "return e;", "parent": 175, "children": [200], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 13}}, {"id": 200, "type": "identifier", "text": "e", "parent": 199, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 12}}, {"id": 201, "type": "function_definition", "text": "int pthread_mutexattr_init(pthread_mutexattr_t *attr) {\n attr->type = PTHREAD_MUTEX_DEFAULT;\n return 0;\n}", "parent": null, "children": [202, 203], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 58, "column": 1}}, {"id": 202, "type": "primitive_type", "text": "int", "parent": 201, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 3}}, {"id": 203, "type": "function_declarator", "text": "pthread_mutexattr_init(pthread_mutexattr_t *attr)", "parent": 201, "children": [204, 205], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 53}}, {"id": 204, "type": "identifier", "text": "pthread_mutexattr_init", "parent": 203, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 26}}, {"id": 205, "type": "parameter_list", "text": "(pthread_mutexattr_t *attr)", "parent": 203, "children": [206], "start_point": {"row": 55, "column": 26}, "end_point": {"row": 55, "column": 53}}, {"id": 206, "type": "parameter_declaration", "text": "pthread_mutexattr_t *attr", "parent": 205, "children": [207, 208], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 52}}, {"id": 207, "type": "type_identifier", "text": "pthread_mutexattr_t", "parent": 206, "children": [], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 46}}, {"id": 208, "type": "pointer_declarator", "text": "*attr", "parent": 206, "children": [209, 210], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 52}}, {"id": 209, "type": "*", "text": "*", "parent": 208, "children": [], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 48}}, {"id": 210, "type": "identifier", "text": "attr", "parent": 208, "children": [], "start_point": {"row": 55, "column": 48}, "end_point": {"row": 55, "column": 52}}, {"id": 211, "type": "assignment_expression", "text": "attr->type = PTHREAD_MUTEX_DEFAULT", "parent": 201, "children": [212, 215, 216], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 38}}, {"id": 212, "type": "field_expression", "text": "attr->type", "parent": 211, "children": [213, 214], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 14}}, {"id": 213, "type": "identifier", "text": "attr", "parent": 212, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 8}}, {"id": 214, "type": "field_identifier", "text": "type", "parent": 212, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 14}}, {"id": 215, "type": "=", "text": "=", "parent": 211, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 16}}, {"id": 216, "type": "identifier", "text": "PTHREAD_MUTEX_DEFAULT", "parent": 211, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 38}}, {"id": 217, "type": "return_statement", "text": "return 0;", "parent": 201, "children": [218], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 13}}, {"id": 218, "type": "number_literal", "text": "0", "parent": 217, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 12}}, {"id": 219, "type": "function_definition", "text": "int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) {\n return 0;\n}", "parent": null, "children": [220, 221], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 220, "type": "primitive_type", "text": "int", "parent": 219, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 3}}, {"id": 221, "type": "function_declarator", "text": "pthread_mutexattr_destroy(pthread_mutexattr_t *attr)", "parent": 219, "children": [222, 223], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 56}}, {"id": 222, "type": "identifier", "text": "pthread_mutexattr_destroy", "parent": 221, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 29}}, {"id": 223, "type": "parameter_list", "text": "(pthread_mutexattr_t *attr)", "parent": 221, "children": [224], "start_point": {"row": 60, "column": 29}, "end_point": {"row": 60, "column": 56}}, {"id": 224, "type": "parameter_declaration", "text": "pthread_mutexattr_t *attr", "parent": 223, "children": [225, 226], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 55}}, {"id": 225, "type": "type_identifier", "text": "pthread_mutexattr_t", "parent": 224, "children": [], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 49}}, {"id": 226, "type": "pointer_declarator", "text": "*attr", "parent": 224, "children": [227, 228], "start_point": {"row": 60, "column": 50}, "end_point": {"row": 60, "column": 55}}, {"id": 227, "type": "*", "text": "*", "parent": 226, "children": [], "start_point": {"row": 60, "column": 50}, "end_point": {"row": 60, "column": 51}}, {"id": 228, "type": "identifier", "text": "attr", "parent": 226, "children": [], "start_point": {"row": 60, "column": 51}, "end_point": {"row": 60, "column": 55}}, {"id": 229, "type": "return_statement", "text": "return 0;", "parent": 219, "children": [230], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 13}}, {"id": 230, "type": "number_literal", "text": "0", "parent": 229, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 12}}, {"id": 231, "type": "function_definition", "text": "int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) {\n if(\n type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE\n ) {\n return EINVAL;\n }\n\n attr->type = type;\n\n return 0;\n}", "parent": null, "children": [232, 233], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 75, "column": 1}}, {"id": 232, "type": "primitive_type", "text": "int", "parent": 231, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 3}}, {"id": 233, "type": "function_declarator", "text": "pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)", "parent": 231, "children": [234, 235], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 66}}, {"id": 234, "type": "identifier", "text": "pthread_mutexattr_settype", "parent": 233, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 29}}, {"id": 235, "type": "parameter_list", "text": "(pthread_mutexattr_t *attr, int type)", "parent": 233, "children": [236, 241], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 66}}, {"id": 236, "type": "parameter_declaration", "text": "pthread_mutexattr_t *attr", "parent": 235, "children": [237, 238], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 55}}, {"id": 237, "type": "type_identifier", "text": "pthread_mutexattr_t", "parent": 236, "children": [], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 49}}, {"id": 238, "type": "pointer_declarator", "text": "*attr", "parent": 236, "children": [239, 240], "start_point": {"row": 64, "column": 50}, "end_point": {"row": 64, "column": 55}}, {"id": 239, "type": "*", "text": "*", "parent": 238, "children": [], "start_point": {"row": 64, "column": 50}, "end_point": {"row": 64, "column": 51}}, {"id": 240, "type": "identifier", "text": "attr", "parent": 238, "children": [], "start_point": {"row": 64, "column": 51}, "end_point": {"row": 64, "column": 55}}, {"id": 241, "type": "parameter_declaration", "text": "int type", "parent": 235, "children": [242, 243], "start_point": {"row": 64, "column": 57}, "end_point": {"row": 64, "column": 65}}, {"id": 242, "type": "primitive_type", "text": "int", "parent": 241, "children": [], "start_point": {"row": 64, "column": 57}, "end_point": {"row": 64, "column": 60}}, {"id": 243, "type": "identifier", "text": "type", "parent": 241, "children": [], "start_point": {"row": 64, "column": 61}, "end_point": {"row": 64, "column": 65}}, {"id": 244, "type": "if_statement", "text": "if(\n type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE\n ) {\n return EINVAL;\n }", "parent": 231, "children": [245], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 70, "column": 5}}, {"id": 245, "type": "parenthesized_expression", "text": "(\n type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE\n )", "parent": 244, "children": [246], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 68, "column": 5}}, {"id": 246, "type": "binary_expression", "text": "type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE", "parent": 245, "children": [247, 251, 252], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 67, "column": 39}}, {"id": 247, "type": "binary_expression", "text": "type != PTHREAD_MUTEX_DEFAULT", "parent": 246, "children": [248, 249, 250], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 37}}, {"id": 248, "type": "identifier", "text": "type", "parent": 247, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 12}}, {"id": 249, "type": "!=", "text": "!=", "parent": 247, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 15}}, {"id": 250, "type": "identifier", "text": "PTHREAD_MUTEX_DEFAULT", "parent": 247, "children": [], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 37}}, {"id": 251, "type": "&&", "text": "&&", "parent": 246, "children": [], "start_point": {"row": 66, "column": 38}, "end_point": {"row": 66, "column": 40}}, {"id": 252, "type": "binary_expression", "text": "type != PTHREAD_MUTEX_RECURSIVE", "parent": 246, "children": [253, 254, 255], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 39}}, {"id": 253, "type": "identifier", "text": "type", "parent": 252, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 12}}, {"id": 254, "type": "!=", "text": "!=", "parent": 252, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 15}}, {"id": 255, "type": "identifier", "text": "PTHREAD_MUTEX_RECURSIVE", "parent": 252, "children": [], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 39}}, {"id": 256, "type": "return_statement", "text": "return EINVAL;", "parent": 244, "children": [257], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 22}}, {"id": 257, "type": "identifier", "text": "EINVAL", "parent": 256, "children": [], "start_point": {"row": 69, "column": 15}, "end_point": {"row": 69, "column": 21}}, {"id": 258, "type": "assignment_expression", "text": "attr->type = type", "parent": 231, "children": [259, 262, 263], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 21}}, {"id": 259, "type": "field_expression", "text": "attr->type", "parent": 258, "children": [260, 261], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 14}}, {"id": 260, "type": "identifier", "text": "attr", "parent": 259, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 8}}, {"id": 261, "type": "field_identifier", "text": "type", "parent": 259, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 14}}, {"id": 262, "type": "=", "text": "=", "parent": 258, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 16}}, {"id": 263, "type": "identifier", "text": "type", "parent": 258, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 21}}, {"id": 264, "type": "return_statement", "text": "return 0;", "parent": 231, "children": [265], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 13}}, {"id": 265, "type": "number_literal", "text": "0", "parent": 264, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 12}}, {"id": 266, "type": "function_definition", "text": "int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int* type) {\n *type = attr->type;\n return 0;\n}", "parent": null, "children": [267, 268], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 267, "type": "primitive_type", "text": "int", "parent": 266, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 3}}, {"id": 268, "type": "function_declarator", "text": "pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int* type)", "parent": 266, "children": [269, 270], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 73}}, {"id": 269, "type": "identifier", "text": "pthread_mutexattr_gettype", "parent": 268, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 29}}, {"id": 270, "type": "parameter_list", "text": "(const pthread_mutexattr_t *attr, int* type)", "parent": 268, "children": [271, 276], "start_point": {"row": 77, "column": 29}, "end_point": {"row": 77, "column": 73}}, {"id": 271, "type": "parameter_declaration", "text": "const pthread_mutexattr_t *attr", "parent": 270, "children": [272, 273], "start_point": {"row": 77, "column": 30}, "end_point": {"row": 77, "column": 61}}, {"id": 272, "type": "type_identifier", "text": "pthread_mutexattr_t", "parent": 271, "children": [], "start_point": {"row": 77, "column": 36}, "end_point": {"row": 77, "column": 55}}, {"id": 273, "type": "pointer_declarator", "text": "*attr", "parent": 271, "children": [274, 275], "start_point": {"row": 77, "column": 56}, "end_point": {"row": 77, "column": 61}}, {"id": 274, "type": "*", "text": "*", "parent": 273, "children": [], "start_point": {"row": 77, "column": 56}, "end_point": {"row": 77, "column": 57}}, {"id": 275, "type": "identifier", "text": "attr", "parent": 273, "children": [], "start_point": {"row": 77, "column": 57}, "end_point": {"row": 77, "column": 61}}, {"id": 276, "type": "parameter_declaration", "text": "int* type", "parent": 270, "children": [277, 278], "start_point": {"row": 77, "column": 63}, "end_point": {"row": 77, "column": 72}}, {"id": 277, "type": "primitive_type", "text": "int", "parent": 276, "children": [], "start_point": {"row": 77, "column": 63}, "end_point": {"row": 77, "column": 66}}, {"id": 278, "type": "pointer_declarator", "text": "* type", "parent": 276, "children": [279, 280], "start_point": {"row": 77, "column": 66}, "end_point": {"row": 77, "column": 72}}, {"id": 279, "type": "*", "text": "*", "parent": 278, "children": [], "start_point": {"row": 77, "column": 66}, "end_point": {"row": 77, "column": 67}}, {"id": 280, "type": "identifier", "text": "type", "parent": 278, "children": [], "start_point": {"row": 77, "column": 68}, "end_point": {"row": 77, "column": 72}}, {"id": 281, "type": "assignment_expression", "text": "*type = attr->type", "parent": 266, "children": [282, 285, 286], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 22}}, {"id": 282, "type": "pointer_expression", "text": "*type", "parent": 281, "children": [283, 284], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 9}}, {"id": 283, "type": "*", "text": "*", "parent": 282, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 5}}, {"id": 284, "type": "identifier", "text": "type", "parent": 282, "children": [], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 9}}, {"id": 285, "type": "=", "text": "=", "parent": 281, "children": [], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 11}}, {"id": 286, "type": "field_expression", "text": "attr->type", "parent": 281, "children": [287, 288], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 22}}, {"id": 287, "type": "identifier", "text": "attr", "parent": 286, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 16}}, {"id": 288, "type": "field_identifier", "text": "type", "parent": 286, "children": [], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 78, "column": 22}}, {"id": 289, "type": "return_statement", "text": "return 0;", "parent": 266, "children": [290], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 13}}, {"id": 290, "type": "number_literal", "text": "0", "parent": 289, "children": [], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 12}}]}, "node_categories": {"declarations": {"functions": [9, 11, 38, 40, 64, 66, 89, 91, 132, 134, 175, 177, 201, 203, 219, 221, 231, 233, 266, 268], "variables": [14, 19, 24, 43, 48, 69, 94, 99, 137, 142, 180, 185, 206, 224, 236, 241, 271, 276], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [30, 34, 54, 57, 60, 75, 76, 78, 82, 106, 107, 111, 121, 124, 128, 149, 150, 154, 164, 167, 171, 191, 194, 197, 212, 245, 246, 247, 252, 259, 282, 286], "assignments": [108, 117, 151, 160, 211, 258, 281], "loops": [], "conditionals": [12, 15, 18, 20, 23, 27, 31, 33, 35, 37, 41, 44, 47, 51, 55, 59, 61, 63, 67, 70, 73, 74, 80, 83, 85, 92, 95, 98, 102, 105, 109, 112, 114, 116, 118, 122, 126, 129, 131, 135, 138, 141, 145, 148, 152, 155, 157, 159, 161, 165, 169, 172, 174, 178, 181, 184, 188, 192, 196, 198, 200, 204, 207, 210, 213, 214, 216, 222, 225, 228, 234, 237, 240, 243, 244, 248, 250, 253, 255, 257, 260, 261, 263, 269, 272, 275, 280, 284, 287, 288], "returns": [36, 62, 81, 87, 115, 130, 158, 173, 199, 217, 229, 256, 264, 289], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 29, 53, 86, 88, 104, 120, 127, 147, 163, 170, 190, 218, 230, 265, 290], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "pthread_mutex_init", "text_snippet": "int pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) {\n // XXX: do so"}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)"}, {"node_id": 38, "universal_type": "function", "name": "pthread_mutex_destroy", "text_snippet": "int pthread_mutex_destroy (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n sc_do_locking_destroy_m"}, {"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "pthread_mutex_destroy (pthread_mutex_t *mutex)"}, {"node_id": 64, "universal_type": "function", "name": "__pthread_ensure_mutex", "text_snippet": "static int __pthread_ensure_mutex(pthread_mutex_t* mutex) {\n if(!*mutex) {\n return pthread"}, {"node_id": 66, "universal_type": "function", "name": "unknown", "text_snippet": "__pthread_ensure_mutex(pthread_mutex_t* mutex)"}, {"node_id": 89, "universal_type": "function", "name": "pthread_mutex_lock", "text_snippet": "int pthread_mutex_lock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n if((e = __pthread_ensure_m"}, {"node_id": 91, "universal_type": "function", "name": "unknown", "text_snippet": "pthread_mutex_lock (pthread_mutex_t *mutex)"}, {"node_id": 132, "universal_type": "function", "name": "pthread_mutex_trylock", "text_snippet": "int pthread_mutex_trylock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n if((e = __pthread_ensur"}, {"node_id": 134, "universal_type": "function", "name": "unknown", "text_snippet": "pthread_mutex_trylock (pthread_mutex_t *mutex)"}, {"node_id": 175, "universal_type": "function", "name": "pthread_mutex_unlock", "text_snippet": "int pthread_mutex_unlock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n sc_do_locking_unlock_mut"}, {"node_id": 177, "universal_type": "function", "name": "unknown", "text_snippet": "pthread_mutex_unlock (pthread_mutex_t *mutex)"}, {"node_id": 201, "universal_type": "function", "name": "pthread_mutexattr_init", "text_snippet": "int pthread_mutexattr_init(pthread_mutexattr_t *attr) {\n attr->type = PTHREAD_MUTEX_DEFAULT;\n "}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "pthread_mutexattr_init(pthread_mutexattr_t *attr)"}, {"node_id": 219, "universal_type": "function", "name": "pthread_mutexattr_destroy", "text_snippet": "int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) {\n return 0;\n}"}, {"node_id": 221, "universal_type": "function", "name": "unknown", "text_snippet": "pthread_mutexattr_destroy(pthread_mutexattr_t *attr)"}, {"node_id": 231, "universal_type": "function", "name": "pthread_mutexattr_settype", "text_snippet": "int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) {\n if(\n type != PTHREAD"}, {"node_id": 233, "universal_type": "function", "name": "type)", "text_snippet": "pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)"}, {"node_id": 266, "universal_type": "function", "name": "pthread_mutexattr_gettype", "text_snippet": "int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int* type) {\n *type = attr->type;\n"}, {"node_id": 268, "universal_type": "function", "name": "unknown", "text_snippet": "pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int* type)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <pthread.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <errno.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <sys/syscalls.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#include <pthread.h>\n#include <errno.h>\n\n#include <sys/syscalls.h>\n\nint pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) {\n // XXX: do something with the attributes\n\n uint64_t e = 0;\n sc_do_locking_create_mutex(mutex, &e);\n return e;\n}\n\nint pthread_mutex_destroy (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n sc_do_locking_destroy_mutex(*mutex, &e);\n return e;\n}\n\nstatic int __pthread_ensure_mutex(pthread_mutex_t* mutex) {\n if(!*mutex) {\n return pthread_mutex_init(mutex, 0);\n }\n\n return 0;\n}\n\nint pthread_mutex_lock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }\n\n e = 0;\n sc_do_locking_lock_mutex(*mutex, 0, &e);\n return e;\n}\n\nint pthread_mutex_trylock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n if((e = __pthread_ensure_mutex(mutex))) {\n return e;\n }\n\n e = 0;\n sc_do_locking_lock_mutex(*mutex, 1, &e);\n return e;\n}\n\nint pthread_mutex_unlock (pthread_mutex_t *mutex) {\n uint64_t e = 0;\n sc_do_locking_unlock_mutex(*mutex, &e);\n return e;\n}\n\nint pthread_mutexattr_init(pthread_mutexattr_t *attr) {\n attr->type = PTHREAD_MUTEX_DEFAULT;\n return 0;\n}\n\nint pthread_mutexattr_destroy(pthread_mutexattr_t *attr) {\n return 0;\n}\n\nint pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) {\n if(\n type != PTHREAD_MUTEX_DEFAULT &&\n type != PTHREAD_MUTEX_RECURSIVE\n ) {\n return EINVAL;\n }\n\n attr->type = type;\n\n return 0;\n}\n\nint pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int* type) {\n *type = attr->type;\n return 0;\n}\n"}
80,939
c
/* * Copyright (c) 2021 Synopsys. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_ #define ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_ #define AUX_MPU_EN_BANK_MASK BIT(0) #define AUX_MPU_EN_IC BIT(12) #define AUX_MPU_EN_DC BIT(13) #define AUX_MPU_EN_ENABLE BIT(30) #define AUX_MPU_EN_DISABLE ~BIT(30) /* * The size of the region is a 5-bit field, the three MSB bits are * represented in [11:9] and the two LSB bits are represented in [1:0]. * Together these fields specify the size of the region in bytes: * 00000-00011 Reserved * 0x4 32 0x5 64 0x6 128 0x7 256 * 0x8 512 0x9 1k 0xA 2K 0xB 4K * 0xC 8K 0xD 16K 0xE 32K 0xF 64K * 0x10 128K 0x11 256K 0x12 512K 0x13 1M * 0x14 2M 0x15 4M 0x16 8M 0x17 16M * 0x18 32M 0x19 64M 0x1A 128M 0x1B 256M * 0x1C 512M 0x1D 1G 0x1E 2G 0x1F 4G * * Bit ... 12 11 10 9 8 3 2 1 0 * ------+------------+------+---+-----------+ * ... | SIZE[11:9] | ATTR | R | SIZE[1:0] | * ------+------------+------+---+-----------+ */ /* arrange size into proper bit field in RDP aux reg*/ #define AUX_MPU_RDP_REGION_SIZE(size) (((size - 1) & BIT_MASK(2)) | \ (((size - 1) & (BIT_MASK(3) << 2)) << 7)) /* recover size from bit fields in RDP aux reg*/ #define AUX_MPU_RDP_SIZE_SHIFT(rdp) ((rdp & BIT_MASK(2)) | (((rdp >> 9) & BIT_MASK(3)) << 2)) #define AUX_MPU_RDB_VALID_MASK BIT(0) #define AUX_MPU_RDP_ATTR_MASK (BIT_MASK(6) << 3) #define AUX_MPU_RDP_SIZE_MASK ((BIT_MASK(3) << 9) | BIT_MASK(2)) /* Global code cacheability that applies to a region * 0x0: (Default) Code is cacheable in all levels of the cache hierarchy * 0x1: Code is not cacheable in any level of the cache hierarchy */ #define AUX_MPU_RDB_IC BIT(12) /* Global data cacheability that applies to a region * 0x0: (Default) Data is cacheable in all levels of the cache hierarchy * 0x1: Data is not cacheable in any level of the cache hierarchy */ #define AUX_MPU_RDB_DC BIT(13) /* Define a MPU region as non-volatile * 0x0: (Default) The memory space for this MPU region is treated as a volatile uncached space. * 0x1: The memory space for this MPU region is non-volatile */ #define AUX_MPU_RDB_NV BIT(14) /* For MPU version 6, the minimum protection region size is 32 bytes */ #define ARC_FEATURE_MPU_ALIGNMENT_BITS 5 #define ARC_FEATURE_MPU_BANK_SIZE 16 /** * This internal function select a MPU bank */ static inline void _bank_select(uint32_t bank) { uint32_t val; val = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK); z_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank); } /** * This internal function initializes a MPU region */ static inline void _region_init(uint32_t index, uint32_t region_addr, uint32_t size, uint32_t region_attr) { uint32_t bank = index / ARC_FEATURE_MPU_BANK_SIZE; index = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U; if (size > 0) { uint8_t bits = find_msb_set(size) - 1; if (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) { bits = ARC_FEATURE_MPU_ALIGNMENT_BITS; } if (BIT(bits) < size) { bits++; } /* Clear size bits and IC, DC bits, and set NV bit * The default value of NV bit is 0 which means the region is volatile and uncached. * Setting the NV bit here has no effect on mpu v6 but is for the * forward compatibility to mpu v7. Currently we do not allow to toggle these bits * until we implement the control of these region properties * TODO: support uncacheable regions and volatile uncached regions */ region_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC); region_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV; region_addr |= AUX_MPU_RDB_VALID_MASK; } else { region_addr = 0U; } _bank_select(bank); z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr); z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr); } /** * This internal function is utilized by the MPU driver to parse the intent * type (i.e. THREAD_STACK_REGION) and return the correct region index. */ static inline int get_region_index_by_type(uint32_t type) { /* * The new MPU regions are allocated per type after the statically * configured regions. The type is one-indexed rather than * zero-indexed. * * For ARC MPU v6, the smaller index has higher priority, so the * index is allocated in reverse order. Static regions start from * the biggest index, then thread related regions. * */ switch (type) { case THREAD_STACK_USER_REGION: return get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION; case THREAD_STACK_REGION: case THREAD_APP_DATA_REGION: case THREAD_DOMAIN_PARTITION_REGION: /* * Start domain partition region from stack guard region * since stack guard is not supported. */ return get_num_regions() - mpu_config.num_regions - type + 1; default: __ASSERT(0, "Unsupported type"); return -EINVAL; } } /** * This internal function checks if region is enabled or not */ static inline bool _is_enabled_region(uint32_t r_index) { uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE; uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U; _bank_select(bank); return ((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK); } /** * This internal function check if the given buffer in in the region */ static inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size) { uint32_t r_addr_start; uint32_t r_addr_end; uint32_t r_size_lshift; uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE; uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U; _bank_select(bank); r_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK); r_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK; r_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift); r_addr_end = r_addr_start + (1 << (r_size_lshift + 1)); if (start >= r_addr_start && (start + size) <= r_addr_end) { return true; } return false; } /** * This internal function check if the region is user accessible or not */ static inline bool _is_user_accessible_region(uint32_t r_index, int write) { uint32_t r_ap; uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE; uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U; _bank_select(bank); r_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index); r_ap &= AUX_MPU_RDP_ATTR_MASK; if (write) { return ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) == (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)); } return ((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) == (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)); } #endif /* ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_ */
36.79
179
(translation_unit) "/*\n * Copyright (c) 2021 Synopsys.\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n#ifndef ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_\n#define ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_\n\n#define AUX_MPU_EN_BANK_MASK BIT(0)\n#define AUX_MPU_EN_IC BIT(12)\n#define AUX_MPU_EN_DC BIT(13)\n#define AUX_MPU_EN_ENABLE BIT(30)\n#define AUX_MPU_EN_DISABLE ~BIT(30)\n\n/*\n * The size of the region is a 5-bit field, the three MSB bits are\n * represented in [11:9] and the two LSB bits are represented in [1:0].\n * Together these fields specify the size of the region in bytes:\n * 00000-00011 Reserved\n * 0x4 32 0x5 64 0x6 128 0x7 256\n * 0x8 512 0x9 1k 0xA 2K 0xB 4K\n * 0xC 8K 0xD 16K 0xE 32K 0xF 64K\n * 0x10 128K 0x11 256K 0x12 512K 0x13 1M\n * 0x14 2M 0x15 4M 0x16 8M 0x17 16M\n * 0x18 32M 0x19 64M 0x1A 128M 0x1B 256M\n * 0x1C 512M 0x1D 1G 0x1E 2G 0x1F 4G\n *\n * Bit ... 12 11 10 9 8 3 2 1 0\n * ------+------------+------+---+-----------+\n * ... | SIZE[11:9] | ATTR | R | SIZE[1:0] |\n * ------+------------+------+---+-----------+\n */\n/* arrange size into proper bit field in RDP aux reg*/\n#define AUX_MPU_RDP_REGION_SIZE(size) (((size - 1) & BIT_MASK(2)) | \\n (((size - 1) & (BIT_MASK(3) << 2)) << 7))\n/* recover size from bit fields in RDP aux reg*/\n#define AUX_MPU_RDP_SIZE_SHIFT(rdp) ((rdp & BIT_MASK(2)) | (((rdp >> 9) & BIT_MASK(3)) << 2))\n\n#define AUX_MPU_RDB_VALID_MASK BIT(0)\n#define AUX_MPU_RDP_ATTR_MASK (BIT_MASK(6) << 3)\n#define AUX_MPU_RDP_SIZE_MASK ((BIT_MASK(3) << 9) | BIT_MASK(2))\n/* Global code cacheability that applies to a region\n * 0x0: (Default) Code is cacheable in all levels of the cache hierarchy\n * 0x1: Code is not cacheable in any level of the cache hierarchy\n */\n#define AUX_MPU_RDB_IC BIT(12)\n/* Global data cacheability that applies to a region\n * 0x0: (Default) Data is cacheable in all levels of the cache hierarchy\n * 0x1: Data is not cacheable in any level of the cache hierarchy\n */\n#define AUX_MPU_RDB_DC BIT(13)\n/* Define a MPU region as non-volatile\n * 0x0: (Default) The memory space for this MPU region is treated as a volatile uncached space.\n * 0x1: The memory space for this MPU region is non-volatile\n */\n#define AUX_MPU_RDB_NV BIT(14)\n\n/* For MPU version 6, the minimum protection region size is 32 bytes */\n#define ARC_FEATURE_MPU_ALIGNMENT_BITS 5\n#define ARC_FEATURE_MPU_BANK_SIZE 16\n\n/**\n * This internal function select a MPU bank\n */\nstatic inline void _bank_select(uint32_t bank)\n{\n uint32_t val;\n\n val = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank);\n}\n/**\n * This internal function initializes a MPU region\n */\nstatic inline void _region_init(uint32_t index, uint32_t region_addr,\n uint32_t size, uint32_t region_attr)\n{\n uint32_t bank = index / ARC_FEATURE_MPU_BANK_SIZE;\n\n index = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n if (size > 0) {\n uint8_t bits = find_msb_set(size) - 1;\n\n if (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n bits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n }\n\n if (BIT(bits) < size) {\n bits++;\n }\n\n /* Clear size bits and IC, DC bits, and set NV bit\n * The default value of NV bit is 0 which means the region is volatile and uncached.\n * Setting the NV bit here has no effect on mpu v6 but is for the\n * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n * until we implement the control of these region properties\n * TODO: support uncacheable regions and volatile uncached regions\n */\n region_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);\n region_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;\n region_addr |= AUX_MPU_RDB_VALID_MASK;\n } else {\n region_addr = 0U;\n }\n\n _bank_select(bank);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr);\n}\n\n/**\n * This internal function is utilized by the MPU driver to parse the intent\n * type (i.e. THREAD_STACK_REGION) and return the correct region index.\n */\nstatic inline int get_region_index_by_type(uint32_t type)\n{\n /*\n * The new MPU regions are allocated per type after the statically\n * configured regions. The type is one-indexed rather than\n * zero-indexed.\n *\n * For ARC MPU v6, the smaller index has higher priority, so the\n * index is allocated in reverse order. Static regions start from\n * the biggest index, then thread related regions.\n *\n */\n switch (type) {\n case THREAD_STACK_USER_REGION:\n return get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;\n case THREAD_STACK_REGION:\n case THREAD_APP_DATA_REGION:\n case THREAD_DOMAIN_PARTITION_REGION:\n /*\n * Start domain partition region from stack guard region\n * since stack guard is not supported.\n */\n return get_num_regions() - mpu_config.num_regions - type + 1;\n default:\n __ASSERT(0, "Unsupported type");\n return -EINVAL;\n }\n}\n\n/**\n * This internal function checks if region is enabled or not\n */\nstatic inline bool _is_enabled_region(uint32_t r_index)\n{\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n return ((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK);\n}\n\n/**\n * This internal function check if the given buffer in in the region\n */\nstatic inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)\n{\n uint32_t r_addr_start;\n uint32_t r_addr_end;\n uint32_t r_size_lshift;\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n r_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK);\n r_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK;\n r_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift);\n r_addr_end = r_addr_start + (1 << (r_size_lshift + 1));\n\n if (start >= r_addr_start && (start + size) <= r_addr_end) {\n return true;\n }\n\n return false;\n}\n\n/**\n * This internal function check if the region is user accessible or not\n */\nstatic inline bool _is_user_accessible_region(uint32_t r_index, int write)\n{\n uint32_t r_ap;\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n r_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index);\n\n r_ap &= AUX_MPU_RDP_ATTR_MASK;\n\n if (write) {\n return ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));\n }\n\n return ((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR));\n}\n\n#endif /* ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_ */\n" (comment) "/*\n * Copyright (c) 2021 Synopsys.\n *\n * SPDX-License-Identifier: Apache-2.0\n */" (preproc_ifdef) "#ifndef ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_\n#define ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_\n\n#define AUX_MPU_EN_BANK_MASK BIT(0)\n#define AUX_MPU_EN_IC BIT(12)\n#define AUX_MPU_EN_DC BIT(13)\n#define AUX_MPU_EN_ENABLE BIT(30)\n#define AUX_MPU_EN_DISABLE ~BIT(30)\n\n/*\n * The size of the region is a 5-bit field, the three MSB bits are\n * represented in [11:9] and the two LSB bits are represented in [1:0].\n * Together these fields specify the size of the region in bytes:\n * 00000-00011 Reserved\n * 0x4 32 0x5 64 0x6 128 0x7 256\n * 0x8 512 0x9 1k 0xA 2K 0xB 4K\n * 0xC 8K 0xD 16K 0xE 32K 0xF 64K\n * 0x10 128K 0x11 256K 0x12 512K 0x13 1M\n * 0x14 2M 0x15 4M 0x16 8M 0x17 16M\n * 0x18 32M 0x19 64M 0x1A 128M 0x1B 256M\n * 0x1C 512M 0x1D 1G 0x1E 2G 0x1F 4G\n *\n * Bit ... 12 11 10 9 8 3 2 1 0\n * ------+------------+------+---+-----------+\n * ... | SIZE[11:9] | ATTR | R | SIZE[1:0] |\n * ------+------------+------+---+-----------+\n */\n/* arrange size into proper bit field in RDP aux reg*/\n#define AUX_MPU_RDP_REGION_SIZE(size) (((size - 1) & BIT_MASK(2)) | \\n (((size - 1) & (BIT_MASK(3) << 2)) << 7))\n/* recover size from bit fields in RDP aux reg*/\n#define AUX_MPU_RDP_SIZE_SHIFT(rdp) ((rdp & BIT_MASK(2)) | (((rdp >> 9) & BIT_MASK(3)) << 2))\n\n#define AUX_MPU_RDB_VALID_MASK BIT(0)\n#define AUX_MPU_RDP_ATTR_MASK (BIT_MASK(6) << 3)\n#define AUX_MPU_RDP_SIZE_MASK ((BIT_MASK(3) << 9) | BIT_MASK(2))\n/* Global code cacheability that applies to a region\n * 0x0: (Default) Code is cacheable in all levels of the cache hierarchy\n * 0x1: Code is not cacheable in any level of the cache hierarchy\n */\n#define AUX_MPU_RDB_IC BIT(12)\n/* Global data cacheability that applies to a region\n * 0x0: (Default) Data is cacheable in all levels of the cache hierarchy\n * 0x1: Data is not cacheable in any level of the cache hierarchy\n */\n#define AUX_MPU_RDB_DC BIT(13)\n/* Define a MPU region as non-volatile\n * 0x0: (Default) The memory space for this MPU region is treated as a volatile uncached space.\n * 0x1: The memory space for this MPU region is non-volatile\n */\n#define AUX_MPU_RDB_NV BIT(14)\n\n/* For MPU version 6, the minimum protection region size is 32 bytes */\n#define ARC_FEATURE_MPU_ALIGNMENT_BITS 5\n#define ARC_FEATURE_MPU_BANK_SIZE 16\n\n/**\n * This internal function select a MPU bank\n */\nstatic inline void _bank_select(uint32_t bank)\n{\n uint32_t val;\n\n val = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank);\n}\n/**\n * This internal function initializes a MPU region\n */\nstatic inline void _region_init(uint32_t index, uint32_t region_addr,\n uint32_t size, uint32_t region_attr)\n{\n uint32_t bank = index / ARC_FEATURE_MPU_BANK_SIZE;\n\n index = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n if (size > 0) {\n uint8_t bits = find_msb_set(size) - 1;\n\n if (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n bits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n }\n\n if (BIT(bits) < size) {\n bits++;\n }\n\n /* Clear size bits and IC, DC bits, and set NV bit\n * The default value of NV bit is 0 which means the region is volatile and uncached.\n * Setting the NV bit here has no effect on mpu v6 but is for the\n * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n * until we implement the control of these region properties\n * TODO: support uncacheable regions and volatile uncached regions\n */\n region_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);\n region_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;\n region_addr |= AUX_MPU_RDB_VALID_MASK;\n } else {\n region_addr = 0U;\n }\n\n _bank_select(bank);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr);\n}\n\n/**\n * This internal function is utilized by the MPU driver to parse the intent\n * type (i.e. THREAD_STACK_REGION) and return the correct region index.\n */\nstatic inline int get_region_index_by_type(uint32_t type)\n{\n /*\n * The new MPU regions are allocated per type after the statically\n * configured regions. The type is one-indexed rather than\n * zero-indexed.\n *\n * For ARC MPU v6, the smaller index has higher priority, so the\n * index is allocated in reverse order. Static regions start from\n * the biggest index, then thread related regions.\n *\n */\n switch (type) {\n case THREAD_STACK_USER_REGION:\n return get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;\n case THREAD_STACK_REGION:\n case THREAD_APP_DATA_REGION:\n case THREAD_DOMAIN_PARTITION_REGION:\n /*\n * Start domain partition region from stack guard region\n * since stack guard is not supported.\n */\n return get_num_regions() - mpu_config.num_regions - type + 1;\n default:\n __ASSERT(0, "Unsupported type");\n return -EINVAL;\n }\n}\n\n/**\n * This internal function checks if region is enabled or not\n */\nstatic inline bool _is_enabled_region(uint32_t r_index)\n{\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n return ((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK);\n}\n\n/**\n * This internal function check if the given buffer in in the region\n */\nstatic inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)\n{\n uint32_t r_addr_start;\n uint32_t r_addr_end;\n uint32_t r_size_lshift;\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n r_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK);\n r_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK;\n r_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift);\n r_addr_end = r_addr_start + (1 << (r_size_lshift + 1));\n\n if (start >= r_addr_start && (start + size) <= r_addr_end) {\n return true;\n }\n\n return false;\n}\n\n/**\n * This internal function check if the region is user accessible or not\n */\nstatic inline bool _is_user_accessible_region(uint32_t r_index, int write)\n{\n uint32_t r_ap;\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n r_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index);\n\n r_ap &= AUX_MPU_RDP_ATTR_MASK;\n\n if (write) {\n return ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));\n }\n\n return ((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR));\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_" (preproc_def) "#define ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_\n" (#define) "#define" (identifier) "ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_" (preproc_def) "#define AUX_MPU_EN_BANK_MASK BIT(0)\n" (#define) "#define" (identifier) "AUX_MPU_EN_BANK_MASK" (preproc_arg) "BIT(0)" (preproc_def) "#define AUX_MPU_EN_IC BIT(12)\n" (#define) "#define" (identifier) "AUX_MPU_EN_IC" (preproc_arg) "BIT(12)" (preproc_def) "#define AUX_MPU_EN_DC BIT(13)\n" (#define) "#define" (identifier) "AUX_MPU_EN_DC" (preproc_arg) "BIT(13)" (preproc_def) "#define AUX_MPU_EN_ENABLE BIT(30)\n" (#define) "#define" (identifier) "AUX_MPU_EN_ENABLE" (preproc_arg) "BIT(30)" (preproc_def) "#define AUX_MPU_EN_DISABLE ~BIT(30)\n" (#define) "#define" (identifier) "AUX_MPU_EN_DISABLE" (preproc_arg) "~BIT(30)" (comment) "/*\n * The size of the region is a 5-bit field, the three MSB bits are\n * represented in [11:9] and the two LSB bits are represented in [1:0].\n * Together these fields specify the size of the region in bytes:\n * 00000-00011 Reserved\n * 0x4 32 0x5 64 0x6 128 0x7 256\n * 0x8 512 0x9 1k 0xA 2K 0xB 4K\n * 0xC 8K 0xD 16K 0xE 32K 0xF 64K\n * 0x10 128K 0x11 256K 0x12 512K 0x13 1M\n * 0x14 2M 0x15 4M 0x16 8M 0x17 16M\n * 0x18 32M 0x19 64M 0x1A 128M 0x1B 256M\n * 0x1C 512M 0x1D 1G 0x1E 2G 0x1F 4G\n *\n * Bit ... 12 11 10 9 8 3 2 1 0\n * ------+------------+------+---+-----------+\n * ... | SIZE[11:9] | ATTR | R | SIZE[1:0] |\n * ------+------------+------+---+-----------+\n */" (comment) "/* arrange size into proper bit field in RDP aux reg*/" (preproc_function_def) "#define AUX_MPU_RDP_REGION_SIZE(size) (((size - 1) & BIT_MASK(2)) | \\n (((size - 1) & (BIT_MASK(3) << 2)) << 7))\n" (#define) "#define" (identifier) "AUX_MPU_RDP_REGION_SIZE" (preproc_params) "(size)" (() "(" (identifier) "size" ()) ")" (preproc_arg) "(((size - 1) & BIT_MASK(2)) | \\n (((size - 1) & (BIT_MASK(3) << 2)) << 7))" (comment) "/* recover size from bit fields in RDP aux reg*/" (preproc_function_def) "#define AUX_MPU_RDP_SIZE_SHIFT(rdp) ((rdp & BIT_MASK(2)) | (((rdp >> 9) & BIT_MASK(3)) << 2))\n" (#define) "#define" (identifier) "AUX_MPU_RDP_SIZE_SHIFT" (preproc_params) "(rdp)" (() "(" (identifier) "rdp" ()) ")" (preproc_arg) "((rdp & BIT_MASK(2)) | (((rdp >> 9) & BIT_MASK(3)) << 2))" (preproc_def) "#define AUX_MPU_RDB_VALID_MASK BIT(0)\n" (#define) "#define" (identifier) "AUX_MPU_RDB_VALID_MASK" (preproc_arg) "BIT(0)" (preproc_def) "#define AUX_MPU_RDP_ATTR_MASK (BIT_MASK(6) << 3)\n" (#define) "#define" (identifier) "AUX_MPU_RDP_ATTR_MASK" (preproc_arg) "(BIT_MASK(6) << 3)" (preproc_def) "#define AUX_MPU_RDP_SIZE_MASK ((BIT_MASK(3) << 9) | BIT_MASK(2))\n" (#define) "#define" (identifier) "AUX_MPU_RDP_SIZE_MASK" (preproc_arg) "((BIT_MASK(3) << 9) | BIT_MASK(2))" (comment) "/* Global code cacheability that applies to a region\n * 0x0: (Default) Code is cacheable in all levels of the cache hierarchy\n * 0x1: Code is not cacheable in any level of the cache hierarchy\n */" (preproc_def) "#define AUX_MPU_RDB_IC BIT(12)\n" (#define) "#define" (identifier) "AUX_MPU_RDB_IC" (preproc_arg) "BIT(12)" (comment) "/* Global data cacheability that applies to a region\n * 0x0: (Default) Data is cacheable in all levels of the cache hierarchy\n * 0x1: Data is not cacheable in any level of the cache hierarchy\n */" (preproc_def) "#define AUX_MPU_RDB_DC BIT(13)\n" (#define) "#define" (identifier) "AUX_MPU_RDB_DC" (preproc_arg) "BIT(13)" (comment) "/* Define a MPU region as non-volatile\n * 0x0: (Default) The memory space for this MPU region is treated as a volatile uncached space.\n * 0x1: The memory space for this MPU region is non-volatile\n */" (preproc_def) "#define AUX_MPU_RDB_NV BIT(14)\n" (#define) "#define" (identifier) "AUX_MPU_RDB_NV" (preproc_arg) "BIT(14)" (comment) "/* For MPU version 6, the minimum protection region size is 32 bytes */" (preproc_def) "#define ARC_FEATURE_MPU_ALIGNMENT_BITS 5\n" (#define) "#define" (identifier) "ARC_FEATURE_MPU_ALIGNMENT_BITS" (preproc_arg) "5" (preproc_def) "#define ARC_FEATURE_MPU_BANK_SIZE 16\n" (#define) "#define" (identifier) "ARC_FEATURE_MPU_BANK_SIZE" (preproc_arg) "16" (comment) "/**\n * This internal function select a MPU bank\n */" (function_definition) "static inline void _bank_select(uint32_t bank)\n{\n uint32_t val;\n\n val = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "_bank_select(uint32_t bank)" (identifier) "_bank_select" (parameter_list) "(uint32_t bank)" (() "(" (parameter_declaration) "uint32_t bank" (primitive_type) "uint32_t" (identifier) "bank" ()) ")" (compound_statement) "{\n uint32_t val;\n\n val = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank);\n}" ({) "{" (declaration) "uint32_t val;" (primitive_type) "uint32_t" (identifier) "val" (;) ";" (expression_statement) "val = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK);" (assignment_expression) "val = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK)" (identifier) "val" (=) "=" (binary_expression) "z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK)" (call_expression) "z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN)" (identifier) "z_arc_v2_aux_reg_read" (argument_list) "(_ARC_V2_MPU_EN)" (() "(" (identifier) "_ARC_V2_MPU_EN" ()) ")" (&) "&" (parenthesized_expression) "(~AUX_MPU_EN_BANK_MASK)" (() "(" (unary_expression) "~AUX_MPU_EN_BANK_MASK" (~) "~" (identifier) "AUX_MPU_EN_BANK_MASK" ()) ")" (;) ";" (expression_statement) "z_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank);" (call_expression) "z_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank)" (identifier) "z_arc_v2_aux_reg_write" (argument_list) "(_ARC_V2_MPU_EN, val | bank)" (() "(" (identifier) "_ARC_V2_MPU_EN" (,) "," (binary_expression) "val | bank" (identifier) "val" (|) "|" (identifier) "bank" ()) ")" (;) ";" (}) "}" (comment) "/**\n * This internal function initializes a MPU region\n */" (function_definition) "static inline void _region_init(uint32_t index, uint32_t region_addr,\n uint32_t size, uint32_t region_attr)\n{\n uint32_t bank = index / ARC_FEATURE_MPU_BANK_SIZE;\n\n index = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n if (size > 0) {\n uint8_t bits = find_msb_set(size) - 1;\n\n if (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n bits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n }\n\n if (BIT(bits) < size) {\n bits++;\n }\n\n /* Clear size bits and IC, DC bits, and set NV bit\n * The default value of NV bit is 0 which means the region is volatile and uncached.\n * Setting the NV bit here has no effect on mpu v6 but is for the\n * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n * until we implement the control of these region properties\n * TODO: support uncacheable regions and volatile uncached regions\n */\n region_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);\n region_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;\n region_addr |= AUX_MPU_RDB_VALID_MASK;\n } else {\n region_addr = 0U;\n }\n\n _bank_select(bank);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "_region_init(uint32_t index, uint32_t region_addr,\n uint32_t size, uint32_t region_attr)" (identifier) "_region_init" (parameter_list) "(uint32_t index, uint32_t region_addr,\n uint32_t size, uint32_t region_attr)" (() "(" (parameter_declaration) "uint32_t index" (primitive_type) "uint32_t" (identifier) "index" (,) "," (parameter_declaration) "uint32_t region_addr" (primitive_type) "uint32_t" (identifier) "region_addr" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" (,) "," (parameter_declaration) "uint32_t region_attr" (primitive_type) "uint32_t" (identifier) "region_attr" ()) ")" (compound_statement) "{\n uint32_t bank = index / ARC_FEATURE_MPU_BANK_SIZE;\n\n index = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n if (size > 0) {\n uint8_t bits = find_msb_set(size) - 1;\n\n if (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n bits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n }\n\n if (BIT(bits) < size) {\n bits++;\n }\n\n /* Clear size bits and IC, DC bits, and set NV bit\n * The default value of NV bit is 0 which means the region is volatile and uncached.\n * Setting the NV bit here has no effect on mpu v6 but is for the\n * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n * until we implement the control of these region properties\n * TODO: support uncacheable regions and volatile uncached regions\n */\n region_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);\n region_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;\n region_addr |= AUX_MPU_RDB_VALID_MASK;\n } else {\n region_addr = 0U;\n }\n\n _bank_select(bank);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr);\n z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr);\n}" ({) "{" (declaration) "uint32_t bank = index / ARC_FEATURE_MPU_BANK_SIZE;" (primitive_type) "uint32_t" (init_declarator) "bank = index / ARC_FEATURE_MPU_BANK_SIZE" (identifier) "bank" (=) "=" (binary_expression) "index / ARC_FEATURE_MPU_BANK_SIZE" (identifier) "index" (/) "/" (identifier) "ARC_FEATURE_MPU_BANK_SIZE" (;) ";" (expression_statement) "index = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;" (assignment_expression) "index = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U" (identifier) "index" (=) "=" (binary_expression) "(index % ARC_FEATURE_MPU_BANK_SIZE) * 2U" (parenthesized_expression) "(index % ARC_FEATURE_MPU_BANK_SIZE)" (() "(" (binary_expression) "index % ARC_FEATURE_MPU_BANK_SIZE" (identifier) "index" (%) "%" (identifier) "ARC_FEATURE_MPU_BANK_SIZE" ()) ")" (*) "*" (number_literal) "2U" (;) ";" (if_statement) "if (size > 0) {\n uint8_t bits = find_msb_set(size) - 1;\n\n if (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n bits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n }\n\n if (BIT(bits) < size) {\n bits++;\n }\n\n /* Clear size bits and IC, DC bits, and set NV bit\n * The default value of NV bit is 0 which means the region is volatile and uncached.\n * Setting the NV bit here has no effect on mpu v6 but is for the\n * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n * until we implement the control of these region properties\n * TODO: support uncacheable regions and volatile uncached regions\n */\n region_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);\n region_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;\n region_addr |= AUX_MPU_RDB_VALID_MASK;\n } else {\n region_addr = 0U;\n }" (if) "if" (parenthesized_expression) "(size > 0)" (() "(" (binary_expression) "size > 0" (identifier) "size" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n uint8_t bits = find_msb_set(size) - 1;\n\n if (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n bits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n }\n\n if (BIT(bits) < size) {\n bits++;\n }\n\n /* Clear size bits and IC, DC bits, and set NV bit\n * The default value of NV bit is 0 which means the region is volatile and uncached.\n * Setting the NV bit here has no effect on mpu v6 but is for the\n * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n * until we implement the control of these region properties\n * TODO: support uncacheable regions and volatile uncached regions\n */\n region_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);\n region_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;\n region_addr |= AUX_MPU_RDB_VALID_MASK;\n }" ({) "{" (declaration) "uint8_t bits = find_msb_set(size) - 1;" (primitive_type) "uint8_t" (init_declarator) "bits = find_msb_set(size) - 1" (identifier) "bits" (=) "=" (binary_expression) "find_msb_set(size) - 1" (call_expression) "find_msb_set(size)" (identifier) "find_msb_set" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" (-) "-" (number_literal) "1" (;) ";" (if_statement) "if (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n bits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n }" (if) "if" (parenthesized_expression) "(bits < ARC_FEATURE_MPU_ALIGNMENT_BITS)" (() "(" (binary_expression) "bits < ARC_FEATURE_MPU_ALIGNMENT_BITS" (identifier) "bits" (<) "<" (identifier) "ARC_FEATURE_MPU_ALIGNMENT_BITS" ()) ")" (compound_statement) "{\n bits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n }" ({) "{" (expression_statement) "bits = ARC_FEATURE_MPU_ALIGNMENT_BITS;" (assignment_expression) "bits = ARC_FEATURE_MPU_ALIGNMENT_BITS" (identifier) "bits" (=) "=" (identifier) "ARC_FEATURE_MPU_ALIGNMENT_BITS" (;) ";" (}) "}" (if_statement) "if (BIT(bits) < size) {\n bits++;\n }" (if) "if" (parenthesized_expression) "(BIT(bits) < size)" (() "(" (binary_expression) "BIT(bits) < size" (call_expression) "BIT(bits)" (identifier) "BIT" (argument_list) "(bits)" (() "(" (identifier) "bits" ()) ")" (<) "<" (identifier) "size" ()) ")" (compound_statement) "{\n bits++;\n }" ({) "{" (expression_statement) "bits++;" (update_expression) "bits++" (identifier) "bits" (++) "++" (;) ";" (}) "}" (comment) "/* Clear size bits and IC, DC bits, and set NV bit\n * The default value of NV bit is 0 which means the region is volatile and uncached.\n * Setting the NV bit here has no effect on mpu v6 but is for the\n * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n * until we implement the control of these region properties\n * TODO: support uncacheable regions and volatile uncached regions\n */" (expression_statement) "region_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);" (assignment_expression) "region_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC)" (identifier) "region_attr" (&=) "&=" (unary_expression) "~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC)" (~) "~" (parenthesized_expression) "(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC)" (() "(" (binary_expression) "AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC" (binary_expression) "AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC" (identifier) "AUX_MPU_RDP_SIZE_MASK" (|) "|" (identifier) "AUX_MPU_RDB_IC" (|) "|" (identifier) "AUX_MPU_RDB_DC" ()) ")" (;) ";" (expression_statement) "region_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;" (assignment_expression) "region_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV" (identifier) "region_attr" (|=) "|=" (binary_expression) "AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV" (call_expression) "AUX_MPU_RDP_REGION_SIZE(bits)" (identifier) "AUX_MPU_RDP_REGION_SIZE" (argument_list) "(bits)" (() "(" (identifier) "bits" ()) ")" (|) "|" (identifier) "AUX_MPU_RDB_NV" (;) ";" (expression_statement) "region_addr |= AUX_MPU_RDB_VALID_MASK;" (assignment_expression) "region_addr |= AUX_MPU_RDB_VALID_MASK" (identifier) "region_addr" (|=) "|=" (identifier) "AUX_MPU_RDB_VALID_MASK" (;) ";" (}) "}" (else_clause) "else {\n region_addr = 0U;\n }" (else) "else" (compound_statement) "{\n region_addr = 0U;\n }" ({) "{" (expression_statement) "region_addr = 0U;" (assignment_expression) "region_addr = 0U" (identifier) "region_addr" (=) "=" (number_literal) "0U" (;) ";" (}) "}" (expression_statement) "_bank_select(bank);" (call_expression) "_bank_select(bank)" (identifier) "_bank_select" (argument_list) "(bank)" (() "(" (identifier) "bank" ()) ")" (;) ";" (expression_statement) "z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr);" (call_expression) "z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr)" (identifier) "z_arc_v2_aux_reg_write" (argument_list) "(_ARC_V2_MPU_RDP0 + index, region_attr)" (() "(" (binary_expression) "_ARC_V2_MPU_RDP0 + index" (identifier) "_ARC_V2_MPU_RDP0" (+) "+" (identifier) "index" (,) "," (identifier) "region_attr" ()) ")" (;) ";" (expression_statement) "z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr);" (call_expression) "z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr)" (identifier) "z_arc_v2_aux_reg_write" (argument_list) "(_ARC_V2_MPU_RDB0 + index, region_addr)" (() "(" (binary_expression) "_ARC_V2_MPU_RDB0 + index" (identifier) "_ARC_V2_MPU_RDB0" (+) "+" (identifier) "index" (,) "," (identifier) "region_addr" ()) ")" (;) ";" (}) "}" (comment) "/**\n * This internal function is utilized by the MPU driver to parse the intent\n * type (i.e. THREAD_STACK_REGION) and return the correct region index.\n */" (function_definition) "static inline int get_region_index_by_type(uint32_t type)\n{\n /*\n * The new MPU regions are allocated per type after the statically\n * configured regions. The type is one-indexed rather than\n * zero-indexed.\n *\n * For ARC MPU v6, the smaller index has higher priority, so the\n * index is allocated in reverse order. Static regions start from\n * the biggest index, then thread related regions.\n *\n */\n switch (type) {\n case THREAD_STACK_USER_REGION:\n return get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;\n case THREAD_STACK_REGION:\n case THREAD_APP_DATA_REGION:\n case THREAD_DOMAIN_PARTITION_REGION:\n /*\n * Start domain partition region from stack guard region\n * since stack guard is not supported.\n */\n return get_num_regions() - mpu_config.num_regions - type + 1;\n default:\n __ASSERT(0, "Unsupported type");\n return -EINVAL;\n }\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "get_region_index_by_type(uint32_t type)" (identifier) "get_region_index_by_type" (parameter_list) "(uint32_t type)" (() "(" (parameter_declaration) "uint32_t type" (primitive_type) "uint32_t" (identifier) "type" ()) ")" (compound_statement) "{\n /*\n * The new MPU regions are allocated per type after the statically\n * configured regions. The type is one-indexed rather than\n * zero-indexed.\n *\n * For ARC MPU v6, the smaller index has higher priority, so the\n * index is allocated in reverse order. Static regions start from\n * the biggest index, then thread related regions.\n *\n */\n switch (type) {\n case THREAD_STACK_USER_REGION:\n return get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;\n case THREAD_STACK_REGION:\n case THREAD_APP_DATA_REGION:\n case THREAD_DOMAIN_PARTITION_REGION:\n /*\n * Start domain partition region from stack guard region\n * since stack guard is not supported.\n */\n return get_num_regions() - mpu_config.num_regions - type + 1;\n default:\n __ASSERT(0, "Unsupported type");\n return -EINVAL;\n }\n}" ({) "{" (comment) "/*\n * The new MPU regions are allocated per type after the statically\n * configured regions. The type is one-indexed rather than\n * zero-indexed.\n *\n * For ARC MPU v6, the smaller index has higher priority, so the\n * index is allocated in reverse order. Static regions start from\n * the biggest index, then thread related regions.\n *\n */" (switch_statement) "switch (type) {\n case THREAD_STACK_USER_REGION:\n return get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;\n case THREAD_STACK_REGION:\n case THREAD_APP_DATA_REGION:\n case THREAD_DOMAIN_PARTITION_REGION:\n /*\n * Start domain partition region from stack guard region\n * since stack guard is not supported.\n */\n return get_num_regions() - mpu_config.num_regions - type + 1;\n default:\n __ASSERT(0, "Unsupported type");\n return -EINVAL;\n }" (switch) "switch" (parenthesized_expression) "(type)" (() "(" (identifier) "type" ()) ")" (compound_statement) "{\n case THREAD_STACK_USER_REGION:\n return get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;\n case THREAD_STACK_REGION:\n case THREAD_APP_DATA_REGION:\n case THREAD_DOMAIN_PARTITION_REGION:\n /*\n * Start domain partition region from stack guard region\n * since stack guard is not supported.\n */\n return get_num_regions() - mpu_config.num_regions - type + 1;\n default:\n __ASSERT(0, "Unsupported type");\n return -EINVAL;\n }" ({) "{" (case_statement) "case THREAD_STACK_USER_REGION:\n return get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;" (case) "case" (identifier) "THREAD_STACK_USER_REGION" (:) ":" (return_statement) "return get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;" (return) "return" (binary_expression) "get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION" (binary_expression) "get_num_regions() - mpu_config.num_regions" (call_expression) "get_num_regions()" (identifier) "get_num_regions" (argument_list) "()" (() "(" ()) ")" (-) "-" (field_expression) "mpu_config.num_regions" (identifier) "mpu_config" (.) "." (field_identifier) "num_regions" (-) "-" (identifier) "THREAD_STACK_REGION" (;) ";" (case_statement) "case THREAD_STACK_REGION:" (case) "case" (identifier) "THREAD_STACK_REGION" (:) ":" (case_statement) "case THREAD_APP_DATA_REGION:" (case) "case" (identifier) "THREAD_APP_DATA_REGION" (:) ":" (case_statement) "case THREAD_DOMAIN_PARTITION_REGION:\n /*\n * Start domain partition region from stack guard region\n * since stack guard is not supported.\n */\n return get_num_regions() - mpu_config.num_regions - type + 1;" (case) "case" (identifier) "THREAD_DOMAIN_PARTITION_REGION" (:) ":" (comment) "/*\n * Start domain partition region from stack guard region\n * since stack guard is not supported.\n */" (return_statement) "return get_num_regions() - mpu_config.num_regions - type + 1;" (return) "return" (binary_expression) "get_num_regions() - mpu_config.num_regions - type + 1" (binary_expression) "get_num_regions() - mpu_config.num_regions - type" (binary_expression) "get_num_regions() - mpu_config.num_regions" (call_expression) "get_num_regions()" (identifier) "get_num_regions" (argument_list) "()" (() "(" ()) ")" (-) "-" (field_expression) "mpu_config.num_regions" (identifier) "mpu_config" (.) "." (field_identifier) "num_regions" (-) "-" (identifier) "type" (+) "+" (number_literal) "1" (;) ";" (case_statement) "default:\n __ASSERT(0, "Unsupported type");\n return -EINVAL;" (default) "default" (:) ":" (expression_statement) "__ASSERT(0, "Unsupported type");" (call_expression) "__ASSERT(0, "Unsupported type")" (identifier) "__ASSERT" (argument_list) "(0, "Unsupported type")" (() "(" (number_literal) "0" (,) "," (string_literal) ""Unsupported type"" (") """ (string_content) "Unsupported type" (") """ ()) ")" (;) ";" (return_statement) "return -EINVAL;" (return) "return" (unary_expression) "-EINVAL" (-) "-" (identifier) "EINVAL" (;) ";" (}) "}" (}) "}" (comment) "/**\n * This internal function checks if region is enabled or not\n */" (function_definition) "static inline bool _is_enabled_region(uint32_t r_index)\n{\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n return ((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "bool" (function_declarator) "_is_enabled_region(uint32_t r_index)" (identifier) "_is_enabled_region" (parameter_list) "(uint32_t r_index)" (() "(" (parameter_declaration) "uint32_t r_index" (primitive_type) "uint32_t" (identifier) "r_index" ()) ")" (compound_statement) "{\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n return ((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK);\n}" ({) "{" (declaration) "uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;" (primitive_type) "uint32_t" (init_declarator) "bank = r_index / ARC_FEATURE_MPU_BANK_SIZE" (identifier) "bank" (=) "=" (binary_expression) "r_index / ARC_FEATURE_MPU_BANK_SIZE" (identifier) "r_index" (/) "/" (identifier) "ARC_FEATURE_MPU_BANK_SIZE" (;) ";" (declaration) "uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;" (primitive_type) "uint32_t" (init_declarator) "index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U" (identifier) "index" (=) "=" (binary_expression) "(r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U" (parenthesized_expression) "(r_index % ARC_FEATURE_MPU_BANK_SIZE)" (() "(" (binary_expression) "r_index % ARC_FEATURE_MPU_BANK_SIZE" (identifier) "r_index" (%) "%" (identifier) "ARC_FEATURE_MPU_BANK_SIZE" ()) ")" (*) "*" (number_literal) "2U" (;) ";" (expression_statement) "_bank_select(bank);" (call_expression) "_bank_select(bank)" (identifier) "_bank_select" (argument_list) "(bank)" (() "(" (identifier) "bank" ()) ")" (;) ";" (return_statement) "return ((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK);" (return) "return" (parenthesized_expression) "((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK)" (() "(" (binary_expression) "(z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK" (parenthesized_expression) "(z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n & AUX_MPU_RDB_VALID_MASK)" (() "(" (binary_expression) "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n & AUX_MPU_RDB_VALID_MASK" (call_expression) "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)" (identifier) "z_arc_v2_aux_reg_read" (argument_list) "(_ARC_V2_MPU_RDB0 + index)" (() "(" (binary_expression) "_ARC_V2_MPU_RDB0 + index" (identifier) "_ARC_V2_MPU_RDB0" (+) "+" (identifier) "index" ()) ")" (&) "&" (identifier) "AUX_MPU_RDB_VALID_MASK" ()) ")" (==) "==" (identifier) "AUX_MPU_RDB_VALID_MASK" ()) ")" (;) ";" (}) "}" (comment) "/**\n * This internal function check if the given buffer in in the region\n */" (function_definition) "static inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)\n{\n uint32_t r_addr_start;\n uint32_t r_addr_end;\n uint32_t r_size_lshift;\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n r_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK);\n r_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK;\n r_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift);\n r_addr_end = r_addr_start + (1 << (r_size_lshift + 1));\n\n if (start >= r_addr_start && (start + size) <= r_addr_end) {\n return true;\n }\n\n return false;\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "bool" (function_declarator) "_is_in_region(uint32_t r_index, uint32_t start, uint32_t size)" (identifier) "_is_in_region" (parameter_list) "(uint32_t r_index, uint32_t start, uint32_t size)" (() "(" (parameter_declaration) "uint32_t r_index" (primitive_type) "uint32_t" (identifier) "r_index" (,) "," (parameter_declaration) "uint32_t start" (primitive_type) "uint32_t" (identifier) "start" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n uint32_t r_addr_start;\n uint32_t r_addr_end;\n uint32_t r_size_lshift;\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n r_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK);\n r_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK;\n r_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift);\n r_addr_end = r_addr_start + (1 << (r_size_lshift + 1));\n\n if (start >= r_addr_start && (start + size) <= r_addr_end) {\n return true;\n }\n\n return false;\n}" ({) "{" (declaration) "uint32_t r_addr_start;" (primitive_type) "uint32_t" (identifier) "r_addr_start" (;) ";" (declaration) "uint32_t r_addr_end;" (primitive_type) "uint32_t" (identifier) "r_addr_end" (;) ";" (declaration) "uint32_t r_size_lshift;" (primitive_type) "uint32_t" (identifier) "r_size_lshift" (;) ";" (declaration) "uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;" (primitive_type) "uint32_t" (init_declarator) "bank = r_index / ARC_FEATURE_MPU_BANK_SIZE" (identifier) "bank" (=) "=" (binary_expression) "r_index / ARC_FEATURE_MPU_BANK_SIZE" (identifier) "r_index" (/) "/" (identifier) "ARC_FEATURE_MPU_BANK_SIZE" (;) ";" (declaration) "uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;" (primitive_type) "uint32_t" (init_declarator) "index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U" (identifier) "index" (=) "=" (binary_expression) "(r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U" (parenthesized_expression) "(r_index % ARC_FEATURE_MPU_BANK_SIZE)" (() "(" (binary_expression) "r_index % ARC_FEATURE_MPU_BANK_SIZE" (identifier) "r_index" (%) "%" (identifier) "ARC_FEATURE_MPU_BANK_SIZE" ()) ")" (*) "*" (number_literal) "2U" (;) ";" (expression_statement) "_bank_select(bank);" (call_expression) "_bank_select(bank)" (identifier) "_bank_select" (argument_list) "(bank)" (() "(" (identifier) "bank" ()) ")" (;) ";" (expression_statement) "r_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK);" (assignment_expression) "r_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK)" (identifier) "r_addr_start" (=) "=" (binary_expression) "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK)" (call_expression) "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)" (identifier) "z_arc_v2_aux_reg_read" (argument_list) "(_ARC_V2_MPU_RDB0 + index)" (() "(" (binary_expression) "_ARC_V2_MPU_RDB0 + index" (identifier) "_ARC_V2_MPU_RDB0" (+) "+" (identifier) "index" ()) ")" (&) "&" (parenthesized_expression) "(~AUX_MPU_RDB_VALID_MASK)" (() "(" (unary_expression) "~AUX_MPU_RDB_VALID_MASK" (~) "~" (identifier) "AUX_MPU_RDB_VALID_MASK" ()) ")" (;) ";" (expression_statement) "r_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK;" (assignment_expression) "r_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK" (identifier) "r_size_lshift" (=) "=" (binary_expression) "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK" (call_expression) "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index)" (identifier) "z_arc_v2_aux_reg_read" (argument_list) "(_ARC_V2_MPU_RDP0 + index)" (() "(" (binary_expression) "_ARC_V2_MPU_RDP0 + index" (identifier) "_ARC_V2_MPU_RDP0" (+) "+" (identifier) "index" ()) ")" (&) "&" (identifier) "AUX_MPU_RDP_SIZE_MASK" (;) ";" (expression_statement) "r_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift);" (assignment_expression) "r_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift)" (identifier) "r_size_lshift" (=) "=" (call_expression) "AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift)" (identifier) "AUX_MPU_RDP_SIZE_SHIFT" (argument_list) "(r_size_lshift)" (() "(" (identifier) "r_size_lshift" ()) ")" (;) ";" (expression_statement) "r_addr_end = r_addr_start + (1 << (r_size_lshift + 1));" (assignment_expression) "r_addr_end = r_addr_start + (1 << (r_size_lshift + 1))" (identifier) "r_addr_end" (=) "=" (binary_expression) "r_addr_start + (1 << (r_size_lshift + 1))" (identifier) "r_addr_start" (+) "+" (parenthesized_expression) "(1 << (r_size_lshift + 1))" (() "(" (binary_expression) "1 << (r_size_lshift + 1)" (number_literal) "1" (<<) "<<" (parenthesized_expression) "(r_size_lshift + 1)" (() "(" (binary_expression) "r_size_lshift + 1" (identifier) "r_size_lshift" (+) "+" (number_literal) "1" ()) ")" ()) ")" (;) ";" (if_statement) "if (start >= r_addr_start && (start + size) <= r_addr_end) {\n return true;\n }" (if) "if" (parenthesized_expression) "(start >= r_addr_start && (start + size) <= r_addr_end)" (() "(" (binary_expression) "start >= r_addr_start && (start + size) <= r_addr_end" (binary_expression) "start >= r_addr_start" (identifier) "start" (>=) ">=" (identifier) "r_addr_start" (&&) "&&" (binary_expression) "(start + size) <= r_addr_end" (parenthesized_expression) "(start + size)" (() "(" (binary_expression) "start + size" (identifier) "start" (+) "+" (identifier) "size" ()) ")" (<=) "<=" (identifier) "r_addr_end" ()) ")" (compound_statement) "{\n return true;\n }" ({) "{" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (comment) "/**\n * This internal function check if the region is user accessible or not\n */" (function_definition) "static inline bool _is_user_accessible_region(uint32_t r_index, int write)\n{\n uint32_t r_ap;\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n r_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index);\n\n r_ap &= AUX_MPU_RDP_ATTR_MASK;\n\n if (write) {\n return ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));\n }\n\n return ((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR));\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "bool" (function_declarator) "_is_user_accessible_region(uint32_t r_index, int write)" (identifier) "_is_user_accessible_region" (parameter_list) "(uint32_t r_index, int write)" (() "(" (parameter_declaration) "uint32_t r_index" (primitive_type) "uint32_t" (identifier) "r_index" (,) "," (parameter_declaration) "int write" (primitive_type) "int" (identifier) "write" ()) ")" (compound_statement) "{\n uint32_t r_ap;\n uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n _bank_select(bank);\n r_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index);\n\n r_ap &= AUX_MPU_RDP_ATTR_MASK;\n\n if (write) {\n return ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));\n }\n\n return ((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR));\n}" ({) "{" (declaration) "uint32_t r_ap;" (primitive_type) "uint32_t" (identifier) "r_ap" (;) ";" (declaration) "uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;" (primitive_type) "uint32_t" (init_declarator) "bank = r_index / ARC_FEATURE_MPU_BANK_SIZE" (identifier) "bank" (=) "=" (binary_expression) "r_index / ARC_FEATURE_MPU_BANK_SIZE" (identifier) "r_index" (/) "/" (identifier) "ARC_FEATURE_MPU_BANK_SIZE" (;) ";" (declaration) "uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;" (primitive_type) "uint32_t" (init_declarator) "index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U" (identifier) "index" (=) "=" (binary_expression) "(r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U" (parenthesized_expression) "(r_index % ARC_FEATURE_MPU_BANK_SIZE)" (() "(" (binary_expression) "r_index % ARC_FEATURE_MPU_BANK_SIZE" (identifier) "r_index" (%) "%" (identifier) "ARC_FEATURE_MPU_BANK_SIZE" ()) ")" (*) "*" (number_literal) "2U" (;) ";" (expression_statement) "_bank_select(bank);" (call_expression) "_bank_select(bank)" (identifier) "_bank_select" (argument_list) "(bank)" (() "(" (identifier) "bank" ()) ")" (;) ";" (expression_statement) "r_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index);" (assignment_expression) "r_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index)" (identifier) "r_ap" (=) "=" (call_expression) "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index)" (identifier) "z_arc_v2_aux_reg_read" (argument_list) "(_ARC_V2_MPU_RDP0 + index)" (() "(" (binary_expression) "_ARC_V2_MPU_RDP0 + index" (identifier) "_ARC_V2_MPU_RDP0" (+) "+" (identifier) "index" ()) ")" (;) ";" (expression_statement) "r_ap &= AUX_MPU_RDP_ATTR_MASK;" (assignment_expression) "r_ap &= AUX_MPU_RDP_ATTR_MASK" (identifier) "r_ap" (&=) "&=" (identifier) "AUX_MPU_RDP_ATTR_MASK" (;) ";" (if_statement) "if (write) {\n return ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));\n }" (if) "if" (parenthesized_expression) "(write)" (() "(" (identifier) "write" ()) ")" (compound_statement) "{\n return ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));\n }" ({) "{" (return_statement) "return ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));" (return) "return" (parenthesized_expression) "((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW))" (() "(" (binary_expression) "(r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)" (parenthesized_expression) "(r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW))" (() "(" (binary_expression) "r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)" (identifier) "r_ap" (&) "&" (parenthesized_expression) "(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)" (() "(" (binary_expression) "AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW" (identifier) "AUX_MPU_ATTR_UW" (|) "|" (identifier) "AUX_MPU_ATTR_KW" ()) ")" ()) ")" (==) "==" (parenthesized_expression) "(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)" (() "(" (binary_expression) "AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW" (identifier) "AUX_MPU_ATTR_UW" (|) "|" (identifier) "AUX_MPU_ATTR_KW" ()) ")" ()) ")" (;) ";" (}) "}" (return_statement) "return ((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR));" (return) "return" (parenthesized_expression) "((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR))" (() "(" (binary_expression) "(r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)" (parenthesized_expression) "(r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR))" (() "(" (binary_expression) "r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)" (identifier) "r_ap" (&) "&" (parenthesized_expression) "(AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)" (() "(" (binary_expression) "AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR" (identifier) "AUX_MPU_ATTR_UR" (|) "|" (identifier) "AUX_MPU_ATTR_KR" ()) ")" ()) ")" (==) "==" (parenthesized_expression) "(AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)" (() "(" (binary_expression) "AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR" (identifier) "AUX_MPU_ATTR_UR" (|) "|" (identifier) "AUX_MPU_ATTR_KR" ()) ")" ()) ")" (;) ";" (}) "}" (#endif) "#endif" (comment) "/* ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_ */"
844
0
{"language": "c", "success": true, "metadata": {"lines": 179, "avg_line_length": 36.79, "nodes": 555, "errors": 0, "source_hash": "a748c62c48a0930fe5884906c2009602ff91eab82a89df5c2f93523f382f1964", "categorized_nodes": 371}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_\n#define ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_\n\n#define AUX_MPU_EN_BANK_MASK BIT(0)\n#define AUX_MPU_EN_IC\t\tBIT(12)\n#define AUX_MPU_EN_DC\t\tBIT(13)\n#define AUX_MPU_EN_ENABLE BIT(30)\n#define AUX_MPU_EN_DISABLE ~BIT(30)\n\n/*\n * The size of the region is a 5-bit field, the three MSB bits are\n * represented in [11:9] and the two LSB bits are represented in [1:0].\n * Together these fields specify the size of the region in bytes:\n * 00000-00011\tReserved\n * 0x4 32\t\t0x5 64\t\t0x6 128\t0x7 256\n * 0x8 512\t\t0x9 1k\t\t0xA 2K\t\t0xB 4K\n * 0xC 8K\t\t0xD 16K\t0xE 32K\t0xF 64K\n * 0x10 128K\t0x11 256K\t0x12 512K\t0x13 1M\n * 0x14 2M\t\t0x15 4M\t\t0x16 8M\t\t0x17 16M\n * 0x18 32M\t\t0x19 64M\t0x1A 128M\t0x1B 256M\n * 0x1C 512M\t0x1D 1G\t\t0x1E 2G\t\t0x1F 4G\n *\n * Bit ... 12 11 10 9 8 3 2 1 0\n * ------+------------+------+---+-----------+\n * ... | SIZE[11:9] | ATTR | R | SIZE[1:0] |\n * ------+------------+------+---+-----------+\n */\n/* arrange size into proper bit field in RDP aux reg*/\n#define AUX_MPU_RDP_REGION_SIZE(size) (((size - 1) & BIT_MASK(2)) | \\\n\t\t\t\t\t(((size - 1) & (BIT_MASK(3) << 2)) << 7))\n/* recover size from bit fields in RDP aux reg*/\n#define AUX_MPU_RDP_SIZE_SHIFT(rdp) ((rdp & BIT_MASK(2)) | (((rdp >> 9) & BIT_MASK(3)) << 2))\n\n#define AUX_MPU_RDB_VALID_MASK BIT(0)\n#define AUX_MPU_RDP_ATTR_MASK (BIT_MASK(6) << 3)\n#define AUX_MPU_RDP_SIZE_MASK ((BIT_MASK(3) << 9) | BIT_MASK(2))\n/* Global code cacheability that applies to a region\n * 0x0: (Default) Code is cacheable in all levels of the cache hierarchy\n * 0x1: Code is not cacheable in any level of the cache hierarchy\n */\n#define AUX_MPU_RDB_IC\t\tBIT(12)\n/* Global data cacheability that applies to a region\n * 0x0: (Default) Data is cacheable in all levels of the cache hierarchy\n * 0x1: Data is not cacheable in any level of the cache hierarchy\n */\n#define AUX_MPU_RDB_DC\t\tBIT(13)\n/* Define a MPU region as non-volatile\n * 0x0: (Default) The memory space for this MPU region is treated as a volatile uncached space.\n * 0x1: The memory space for this MPU region is non-volatile\n */\n#define AUX_MPU_RDB_NV\t\tBIT(14)\n\n/* For MPU version 6, the minimum protection region size is 32 bytes */\n#define ARC_FEATURE_MPU_ALIGNMENT_BITS 5\n#define ARC_FEATURE_MPU_BANK_SIZE 16\n\n/**\n * This internal function select a MPU bank\n */\nstatic inline void _bank_select(uint32_t bank)\n{\n\tuint32_t val;\n\n\tval = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK);\n\tz_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank);\n}\n/**\n * This internal function initializes a MPU region\n */\nstatic inline void _region_init(uint32_t index, uint32_t region_addr,\n\t\t\t\tuint32_t size, uint32_t region_attr)\n{\n\tuint32_t bank = index / ARC_FEATURE_MPU_BANK_SIZE;\n\n\tindex = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\tif (size > 0) {\n\t\tuint8_t bits = find_msb_set(size) - 1;\n\n\t\tif (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n\t\t\tbits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n\t\t}\n\n\t\tif (BIT(bits) < size) {\n\t\t\tbits++;\n\t\t}\n\n\t\t/* Clear size bits and IC, DC bits, and set NV bit\n\t\t * The default value of NV bit is 0 which means the region is volatile and uncached.\n\t\t * Setting the NV bit here has no effect on mpu v6 but is for the\n\t\t * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n\t\t * until we implement the control of these region properties\n\t\t * TODO: support uncacheable regions and volatile uncached regions\n\t\t */\n\t\tregion_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);\n\t\tregion_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;\n\t\tregion_addr |= AUX_MPU_RDB_VALID_MASK;\n\t} else {\n\t\tregion_addr = 0U;\n\t}\n\n\t_bank_select(bank);\n\tz_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr);\n\tz_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr);\n}\n\n/**\n * This internal function is utilized by the MPU driver to parse the intent\n * type (i.e. THREAD_STACK_REGION) and return the correct region index.\n */\nstatic inline int get_region_index_by_type(uint32_t type)\n{\n\t/*\n\t * The new MPU regions are allocated per type after the statically\n\t * configured regions. The type is one-indexed rather than\n\t * zero-indexed.\n\t *\n\t * For ARC MPU v6, the smaller index has higher priority, so the\n\t * index is allocated in reverse order. Static regions start from\n\t * the biggest index, then thread related regions.\n\t *\n\t */\n\tswitch (type) {\n\tcase THREAD_STACK_USER_REGION:\n\t\treturn get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;\n\tcase THREAD_STACK_REGION:\n\tcase THREAD_APP_DATA_REGION:\n\tcase THREAD_DOMAIN_PARTITION_REGION:\n\t\t/*\n\t\t * Start domain partition region from stack guard region\n\t\t * since stack guard is not supported.\n\t\t */\n\t\treturn get_num_regions() - mpu_config.num_regions - type + 1;\n\tdefault:\n\t\t__ASSERT(0, \"Unsupported type\");\n\t\treturn -EINVAL;\n\t}\n}\n\n/**\n * This internal function checks if region is enabled or not\n */\nstatic inline bool _is_enabled_region(uint32_t r_index)\n{\n\tuint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n\tuint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\t_bank_select(bank);\n\treturn ((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n\t\t & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK);\n}\n\n/**\n * This internal function check if the given buffer in in the region\n */\nstatic inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)\n{\n\tuint32_t r_addr_start;\n\tuint32_t r_addr_end;\n\tuint32_t r_size_lshift;\n\tuint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n\tuint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\t_bank_select(bank);\n\tr_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK);\n\tr_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK;\n\tr_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift);\n\tr_addr_end = r_addr_start + (1 << (r_size_lshift + 1));\n\n\tif (start >= r_addr_start && (start + size) <= r_addr_end) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * This internal function check if the region is user accessible or not\n */\nstatic inline bool _is_user_accessible_region(uint32_t r_index, int write)\n{\n\tuint32_t r_ap;\n\tuint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n\tuint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\t_bank_select(bank);\n\tr_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index);\n\n\tr_ap &= AUX_MPU_RDP_ATTR_MASK;\n\n\tif (write) {\n\t\treturn ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n\t\t\t(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));\n\t}\n\n\treturn ((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n\t\t(AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR));\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 10, 14, 18, 22, 26, 32, 38, 42, 46, 50, 54, 58, 62, 66, 70, 102, 230, 294, 345, 465, 554], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 204, "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": "ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 55}}, {"id": 3, "type": "preproc_def", "text": "#define ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_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": "ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_", "parent": 3, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 55}}, {"id": 6, "type": "preproc_def", "text": "#define AUX_MPU_EN_BANK_MASK BIT(0)\n", "parent": 0, "children": [7, 8, 9], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 8, "type": "identifier", "text": "AUX_MPU_EN_BANK_MASK", "parent": 6, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 28}}, {"id": 9, "type": "preproc_arg", "text": "BIT(0)", "parent": 6, "children": [], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 35}}, {"id": 10, "type": "preproc_def", "text": "#define AUX_MPU_EN_IC\t\tBIT(12)\n", "parent": 0, "children": [11, 12, 13], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 11, "type": "#define", "text": "#define", "parent": 10, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 12, "type": "identifier", "text": "AUX_MPU_EN_IC", "parent": 10, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 21}}, {"id": 13, "type": "preproc_arg", "text": "BIT(12)", "parent": 10, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 30}}, {"id": 14, "type": "preproc_def", "text": "#define AUX_MPU_EN_DC\t\tBIT(13)\n", "parent": 0, "children": [15, 16, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 15, "type": "#define", "text": "#define", "parent": 14, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 16, "type": "identifier", "text": "AUX_MPU_EN_DC", "parent": 14, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 21}}, {"id": 17, "type": "preproc_arg", "text": "BIT(13)", "parent": 14, "children": [], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 30}}, {"id": 18, "type": "preproc_def", "text": "#define AUX_MPU_EN_ENABLE BIT(30)\n", "parent": 0, "children": [19, 20, 21], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 19, "type": "#define", "text": "#define", "parent": 18, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 20, "type": "identifier", "text": "AUX_MPU_EN_ENABLE", "parent": 18, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 25}}, {"id": 21, "type": "preproc_arg", "text": "BIT(30)", "parent": 18, "children": [], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 35}}, {"id": 22, "type": "preproc_def", "text": "#define AUX_MPU_EN_DISABLE ~BIT(30)\n", "parent": 0, "children": [23, 24, 25], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 23, "type": "#define", "text": "#define", "parent": 22, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 24, "type": "identifier", "text": "AUX_MPU_EN_DISABLE", "parent": 22, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 26}}, {"id": 25, "type": "preproc_arg", "text": "~BIT(30)", "parent": 22, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 36}}, {"id": 26, "type": "preproc_function_def", "text": "#define AUX_MPU_RDP_REGION_SIZE(size) (((size - 1) & BIT_MASK(2)) | \\\n\t\t\t\t\t(((size - 1) & (BIT_MASK(3) << 2)) << 7))\n", "parent": 0, "children": [27, 28, 29, 31], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 27, "type": "#define", "text": "#define", "parent": 26, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 28, "type": "identifier", "text": "AUX_MPU_RDP_REGION_SIZE", "parent": 26, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 31}}, {"id": 29, "type": "preproc_params", "text": "(size)", "parent": 26, "children": [30], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 37}}, {"id": 30, "type": "identifier", "text": "size", "parent": 29, "children": [], "start_point": {"row": 33, "column": 32}, "end_point": {"row": 33, "column": 36}}, {"id": 31, "type": "preproc_arg", "text": "(((size - 1) & BIT_MASK(2)) | \\\n\t\t\t\t\t(((size - 1) & (BIT_MASK(3) << 2)) << 7))", "parent": 26, "children": [], "start_point": {"row": 33, "column": 39}, "end_point": {"row": 34, "column": 46}}, {"id": 32, "type": "preproc_function_def", "text": "#define AUX_MPU_RDP_SIZE_SHIFT(rdp) ((rdp & BIT_MASK(2)) | (((rdp >> 9) & BIT_MASK(3)) << 2))\n", "parent": 0, "children": [33, 34, 35, 37], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 33, "type": "#define", "text": "#define", "parent": 32, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 34, "type": "identifier", "text": "AUX_MPU_RDP_SIZE_SHIFT", "parent": 32, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 30}}, {"id": 35, "type": "preproc_params", "text": "(rdp)", "parent": 32, "children": [36], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 35}}, {"id": 36, "type": "identifier", "text": "rdp", "parent": 35, "children": [], "start_point": {"row": 36, "column": 31}, "end_point": {"row": 36, "column": 34}}, {"id": 37, "type": "preproc_arg", "text": "((rdp & BIT_MASK(2)) | (((rdp >> 9) & BIT_MASK(3)) << 2))", "parent": 32, "children": [], "start_point": {"row": 36, "column": 40}, "end_point": {"row": 36, "column": 97}}, {"id": 38, "type": "preproc_def", "text": "#define AUX_MPU_RDB_VALID_MASK BIT(0)\n", "parent": 0, "children": [39, 40, 41], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 39, "type": "#define", "text": "#define", "parent": 38, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 40, "type": "identifier", "text": "AUX_MPU_RDB_VALID_MASK", "parent": 38, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 30}}, {"id": 41, "type": "preproc_arg", "text": "BIT(0)", "parent": 38, "children": [], "start_point": {"row": 38, "column": 31}, "end_point": {"row": 38, "column": 37}}, {"id": 42, "type": "preproc_def", "text": "#define AUX_MPU_RDP_ATTR_MASK (BIT_MASK(6) << 3)\n", "parent": 0, "children": [43, 44, 45], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 43, "type": "#define", "text": "#define", "parent": 42, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 7}}, {"id": 44, "type": "identifier", "text": "AUX_MPU_RDP_ATTR_MASK", "parent": 42, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 29}}, {"id": 45, "type": "preproc_arg", "text": "(BIT_MASK(6) << 3)", "parent": 42, "children": [], "start_point": {"row": 39, "column": 31}, "end_point": {"row": 39, "column": 49}}, {"id": 46, "type": "preproc_def", "text": "#define AUX_MPU_RDP_SIZE_MASK ((BIT_MASK(3) << 9) | BIT_MASK(2))\n", "parent": 0, "children": [47, 48, 49], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 0}}, {"id": 47, "type": "#define", "text": "#define", "parent": 46, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 7}}, {"id": 48, "type": "identifier", "text": "AUX_MPU_RDP_SIZE_MASK", "parent": 46, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 29}}, {"id": 49, "type": "preproc_arg", "text": "((BIT_MASK(3) << 9) | BIT_MASK(2))", "parent": 46, "children": [], "start_point": {"row": 40, "column": 31}, "end_point": {"row": 40, "column": 65}}, {"id": 50, "type": "preproc_def", "text": "#define AUX_MPU_RDB_IC\t\tBIT(12)\n", "parent": 0, "children": [51, 52, 53], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 0}}, {"id": 51, "type": "#define", "text": "#define", "parent": 50, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 7}}, {"id": 52, "type": "identifier", "text": "AUX_MPU_RDB_IC", "parent": 50, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 22}}, {"id": 53, "type": "preproc_arg", "text": "BIT(12)", "parent": 50, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 31}}, {"id": 54, "type": "preproc_def", "text": "#define AUX_MPU_RDB_DC\t\tBIT(13)\n", "parent": 0, "children": [55, 56, 57], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 0}}, {"id": 55, "type": "#define", "text": "#define", "parent": 54, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 7}}, {"id": 56, "type": "identifier", "text": "AUX_MPU_RDB_DC", "parent": 54, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 22}}, {"id": 57, "type": "preproc_arg", "text": "BIT(13)", "parent": 54, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 31}}, {"id": 58, "type": "preproc_def", "text": "#define AUX_MPU_RDB_NV\t\tBIT(14)\n", "parent": 0, "children": [59, 60, 61], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 56, "column": 0}}, {"id": 59, "type": "#define", "text": "#define", "parent": 58, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 7}}, {"id": 60, "type": "identifier", "text": "AUX_MPU_RDB_NV", "parent": 58, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 22}}, {"id": 61, "type": "preproc_arg", "text": "BIT(14)", "parent": 58, "children": [], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 31}}, {"id": 62, "type": "preproc_def", "text": "#define ARC_FEATURE_MPU_ALIGNMENT_BITS 5\n", "parent": 0, "children": [63, 64, 65], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 59, "column": 0}}, {"id": 63, "type": "#define", "text": "#define", "parent": 62, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 7}}, {"id": 64, "type": "identifier", "text": "ARC_FEATURE_MPU_ALIGNMENT_BITS", "parent": 62, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 38}}, {"id": 65, "type": "preproc_arg", "text": "5", "parent": 62, "children": [], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 40}}, {"id": 66, "type": "preproc_def", "text": "#define ARC_FEATURE_MPU_BANK_SIZE 16\n", "parent": 0, "children": [67, 68, 69], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 60, "column": 0}}, {"id": 67, "type": "#define", "text": "#define", "parent": 66, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 7}}, {"id": 68, "type": "identifier", "text": "ARC_FEATURE_MPU_BANK_SIZE", "parent": 66, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 33}}, {"id": 69, "type": "preproc_arg", "text": "16", "parent": 66, "children": [], "start_point": {"row": 59, "column": 39}, "end_point": {"row": 59, "column": 41}}, {"id": 70, "type": "function_definition", "text": "static inline void _bank_select(uint32_t bank)\n{\n\tuint32_t val;\n\n\tval = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK);\n\tz_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank);\n}", "parent": 0, "children": [71, 73, 74], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 70, "column": 1}}, {"id": 71, "type": "storage_class_specifier", "text": "inline", "parent": 70, "children": [72], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 13}}, {"id": 72, "type": "inline", "text": "inline", "parent": 71, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 13}}, {"id": 73, "type": "primitive_type", "text": "void", "parent": 70, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 18}}, {"id": 74, "type": "function_declarator", "text": "_bank_select(uint32_t bank)", "parent": 70, "children": [75, 76], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 46}}, {"id": 75, "type": "identifier", "text": "_bank_select", "parent": 74, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 31}}, {"id": 76, "type": "parameter_list", "text": "(uint32_t bank)", "parent": 74, "children": [77], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 46}}, {"id": 77, "type": "parameter_declaration", "text": "uint32_t bank", "parent": 76, "children": [78, 79], "start_point": {"row": 64, "column": 32}, "end_point": {"row": 64, "column": 45}}, {"id": 78, "type": "primitive_type", "text": "uint32_t", "parent": 77, "children": [], "start_point": {"row": 64, "column": 32}, "end_point": {"row": 64, "column": 40}}, {"id": 79, "type": "identifier", "text": "bank", "parent": 77, "children": [], "start_point": {"row": 64, "column": 41}, "end_point": {"row": 64, "column": 45}}, {"id": 80, "type": "declaration", "text": "uint32_t val;", "parent": 70, "children": [81, 82], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 14}}, {"id": 81, "type": "primitive_type", "text": "uint32_t", "parent": 80, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 9}}, {"id": 82, "type": "identifier", "text": "val", "parent": 80, "children": [], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 13}}, {"id": 83, "type": "assignment_expression", "text": "val = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK)", "parent": 70, "children": [84, 85, 86], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 70}}, {"id": 84, "type": "identifier", "text": "val", "parent": 83, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 4}}, {"id": 85, "type": "=", "text": "=", "parent": 83, "children": [], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 6}}, {"id": 86, "type": "binary_expression", "text": "z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK)", "parent": 83, "children": [87, 91], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 70}}, {"id": 87, "type": "call_expression", "text": "z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN)", "parent": 86, "children": [88, 89], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 44}}, {"id": 88, "type": "identifier", "text": "z_arc_v2_aux_reg_read", "parent": 87, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 28}}, {"id": 89, "type": "argument_list", "text": "(_ARC_V2_MPU_EN)", "parent": 87, "children": [90], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 44}}, {"id": 90, "type": "identifier", "text": "_ARC_V2_MPU_EN", "parent": 89, "children": [], "start_point": {"row": 68, "column": 29}, "end_point": {"row": 68, "column": 43}}, {"id": 91, "type": "parenthesized_expression", "text": "(~AUX_MPU_EN_BANK_MASK)", "parent": 86, "children": [92], "start_point": {"row": 68, "column": 47}, "end_point": {"row": 68, "column": 70}}, {"id": 92, "type": "unary_expression", "text": "~AUX_MPU_EN_BANK_MASK", "parent": 91, "children": [93, 94], "start_point": {"row": 68, "column": 48}, "end_point": {"row": 68, "column": 69}}, {"id": 93, "type": "~", "text": "~", "parent": 92, "children": [], "start_point": {"row": 68, "column": 48}, "end_point": {"row": 68, "column": 49}}, {"id": 94, "type": "identifier", "text": "AUX_MPU_EN_BANK_MASK", "parent": 92, "children": [], "start_point": {"row": 68, "column": 49}, "end_point": {"row": 68, "column": 69}}, {"id": 95, "type": "call_expression", "text": "z_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank)", "parent": 70, "children": [96, 97], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 51}}, {"id": 96, "type": "identifier", "text": "z_arc_v2_aux_reg_write", "parent": 95, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 23}}, {"id": 97, "type": "argument_list", "text": "(_ARC_V2_MPU_EN, val | bank)", "parent": 95, "children": [98, 99], "start_point": {"row": 69, "column": 23}, "end_point": {"row": 69, "column": 51}}, {"id": 98, "type": "identifier", "text": "_ARC_V2_MPU_EN", "parent": 97, "children": [], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 38}}, {"id": 99, "type": "binary_expression", "text": "val | bank", "parent": 97, "children": [100, 101], "start_point": {"row": 69, "column": 40}, "end_point": {"row": 69, "column": 50}}, {"id": 100, "type": "identifier", "text": "val", "parent": 99, "children": [], "start_point": {"row": 69, "column": 40}, "end_point": {"row": 69, "column": 43}}, {"id": 101, "type": "identifier", "text": "bank", "parent": 99, "children": [], "start_point": {"row": 69, "column": 46}, "end_point": {"row": 69, "column": 50}}, {"id": 102, "type": "function_definition", "text": "static inline void _region_init(uint32_t index, uint32_t region_addr,\n\t\t\t\tuint32_t size, uint32_t region_attr)\n{\n\tuint32_t bank = index / ARC_FEATURE_MPU_BANK_SIZE;\n\n\tindex = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\tif (size > 0) {\n\t\tuint8_t bits = find_msb_set(size) - 1;\n\n\t\tif (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n\t\t\tbits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n\t\t}\n\n\t\tif (BIT(bits) < size) {\n\t\t\tbits++;\n\t\t}\n\n\t\t/* Clear size bits and IC, DC bits, and set NV bit\n\t\t * The default value of NV bit is 0 which means the region is volatile and uncached.\n\t\t * Setting the NV bit here has no effect on mpu v6 but is for the\n\t\t * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n\t\t * until we implement the control of these region properties\n\t\t * TODO: support uncacheable regions and volatile uncached regions\n\t\t */\n\t\tregion_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);\n\t\tregion_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;\n\t\tregion_addr |= AUX_MPU_RDB_VALID_MASK;\n\t} else {\n\t\tregion_addr = 0U;\n\t}\n\n\t_bank_select(bank);\n\tz_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr);\n\tz_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr);\n}", "parent": 0, "children": [103, 105, 106], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 109, "column": 1}}, {"id": 103, "type": "storage_class_specifier", "text": "inline", "parent": 102, "children": [104], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 13}}, {"id": 104, "type": "inline", "text": "inline", "parent": 103, "children": [], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 13}}, {"id": 105, "type": "primitive_type", "text": "void", "parent": 102, "children": [], "start_point": {"row": 74, "column": 14}, "end_point": {"row": 74, "column": 18}}, {"id": 106, "type": "function_declarator", "text": "_region_init(uint32_t index, uint32_t region_addr,\n\t\t\t\tuint32_t size, uint32_t region_attr)", "parent": 102, "children": [107, 108], "start_point": {"row": 74, "column": 19}, "end_point": {"row": 75, "column": 40}}, {"id": 107, "type": "identifier", "text": "_region_init", "parent": 106, "children": [], "start_point": {"row": 74, "column": 19}, "end_point": {"row": 74, "column": 31}}, {"id": 108, "type": "parameter_list", "text": "(uint32_t index, uint32_t region_addr,\n\t\t\t\tuint32_t size, uint32_t region_attr)", "parent": 106, "children": [109, 112, 115, 118], "start_point": {"row": 74, "column": 31}, "end_point": {"row": 75, "column": 40}}, {"id": 109, "type": "parameter_declaration", "text": "uint32_t index", "parent": 108, "children": [110, 111], "start_point": {"row": 74, "column": 32}, "end_point": {"row": 74, "column": 46}}, {"id": 110, "type": "primitive_type", "text": "uint32_t", "parent": 109, "children": [], "start_point": {"row": 74, "column": 32}, "end_point": {"row": 74, "column": 40}}, {"id": 111, "type": "identifier", "text": "index", "parent": 109, "children": [], "start_point": {"row": 74, "column": 41}, "end_point": {"row": 74, "column": 46}}, {"id": 112, "type": "parameter_declaration", "text": "uint32_t region_addr", "parent": 108, "children": [113, 114], "start_point": {"row": 74, "column": 48}, "end_point": {"row": 74, "column": 68}}, {"id": 113, "type": "primitive_type", "text": "uint32_t", "parent": 112, "children": [], "start_point": {"row": 74, "column": 48}, "end_point": {"row": 74, "column": 56}}, {"id": 114, "type": "identifier", "text": "region_addr", "parent": 112, "children": [], "start_point": {"row": 74, "column": 57}, "end_point": {"row": 74, "column": 68}}, {"id": 115, "type": "parameter_declaration", "text": "uint32_t size", "parent": 108, "children": [116, 117], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 17}}, {"id": 116, "type": "primitive_type", "text": "uint32_t", "parent": 115, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 12}}, {"id": 117, "type": "identifier", "text": "size", "parent": 115, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 17}}, {"id": 118, "type": "parameter_declaration", "text": "uint32_t region_attr", "parent": 108, "children": [119, 120], "start_point": {"row": 75, "column": 19}, "end_point": {"row": 75, "column": 39}}, {"id": 119, "type": "primitive_type", "text": "uint32_t", "parent": 118, "children": [], "start_point": {"row": 75, "column": 19}, "end_point": {"row": 75, "column": 27}}, {"id": 120, "type": "identifier", "text": "region_attr", "parent": 118, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 39}}, {"id": 121, "type": "declaration", "text": "uint32_t bank = index / ARC_FEATURE_MPU_BANK_SIZE;", "parent": 102, "children": [122, 123], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 51}}, {"id": 122, "type": "primitive_type", "text": "uint32_t", "parent": 121, "children": [], "start_point": {"row": 77, "column": 1}, "end_point": {"row": 77, "column": 9}}, {"id": 123, "type": "init_declarator", "text": "bank = index / ARC_FEATURE_MPU_BANK_SIZE", "parent": 121, "children": [124, 125, 126], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 50}}, {"id": 124, "type": "identifier", "text": "bank", "parent": 123, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 14}}, {"id": 125, "type": "=", "text": "=", "parent": 123, "children": [], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 16}}, {"id": 126, "type": "binary_expression", "text": "index / ARC_FEATURE_MPU_BANK_SIZE", "parent": 123, "children": [127, 128, 129], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 50}}, {"id": 127, "type": "identifier", "text": "index", "parent": 126, "children": [], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 22}}, {"id": 128, "type": "/", "text": "/", "parent": 126, "children": [], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 24}}, {"id": 129, "type": "identifier", "text": "ARC_FEATURE_MPU_BANK_SIZE", "parent": 126, "children": [], "start_point": {"row": 77, "column": 25}, "end_point": {"row": 77, "column": 50}}, {"id": 130, "type": "assignment_expression", "text": "index = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U", "parent": 102, "children": [131, 132, 133], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 49}}, {"id": 131, "type": "identifier", "text": "index", "parent": 130, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 6}}, {"id": 132, "type": "=", "text": "=", "parent": 130, "children": [], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 8}}, {"id": 133, "type": "binary_expression", "text": "(index % ARC_FEATURE_MPU_BANK_SIZE) * 2U", "parent": 130, "children": [134, 139, 140], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 49}}, {"id": 134, "type": "parenthesized_expression", "text": "(index % ARC_FEATURE_MPU_BANK_SIZE)", "parent": 133, "children": [135], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 44}}, {"id": 135, "type": "binary_expression", "text": "index % ARC_FEATURE_MPU_BANK_SIZE", "parent": 134, "children": [136, 137, 138], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 43}}, {"id": 136, "type": "identifier", "text": "index", "parent": 135, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 15}}, {"id": 137, "type": "%", "text": "%", "parent": 135, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 17}}, {"id": 138, "type": "identifier", "text": "ARC_FEATURE_MPU_BANK_SIZE", "parent": 135, "children": [], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 43}}, {"id": 139, "type": "*", "text": "*", "parent": 133, "children": [], "start_point": {"row": 79, "column": 45}, "end_point": {"row": 79, "column": 46}}, {"id": 140, "type": "number_literal", "text": "2U", "parent": 133, "children": [], "start_point": {"row": 79, "column": 47}, "end_point": {"row": 79, "column": 49}}, {"id": 141, "type": "if_statement", "text": "if (size > 0) {\n\t\tuint8_t bits = find_msb_set(size) - 1;\n\n\t\tif (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n\t\t\tbits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n\t\t}\n\n\t\tif (BIT(bits) < size) {\n\t\t\tbits++;\n\t\t}\n\n\t\t/* Clear size bits and IC, DC bits, and set NV bit\n\t\t * The default value of NV bit is 0 which means the region is volatile and uncached.\n\t\t * Setting the NV bit here has no effect on mpu v6 but is for the\n\t\t * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n\t\t * until we implement the control of these region properties\n\t\t * TODO: support uncacheable regions and volatile uncached regions\n\t\t */\n\t\tregion_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);\n\t\tregion_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;\n\t\tregion_addr |= AUX_MPU_RDB_VALID_MASK;\n\t} else {\n\t\tregion_addr = 0U;\n\t}", "parent": 102, "children": [142, 205], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 104, "column": 2}}, {"id": 142, "type": "parenthesized_expression", "text": "(size > 0)", "parent": 141, "children": [143], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 14}}, {"id": 143, "type": "binary_expression", "text": "size > 0", "parent": 142, "children": [144, 145, 146], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 13}}, {"id": 144, "type": "identifier", "text": "size", "parent": 143, "children": [], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 9}}, {"id": 145, "type": ">", "text": ">", "parent": 143, "children": [], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 11}}, {"id": 146, "type": "number_literal", "text": "0", "parent": 143, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 13}}, {"id": 147, "type": "declaration", "text": "uint8_t bits = find_msb_set(size) - 1;", "parent": 141, "children": [148, 149], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 40}}, {"id": 148, "type": "primitive_type", "text": "uint8_t", "parent": 147, "children": [], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 9}}, {"id": 149, "type": "init_declarator", "text": "bits = find_msb_set(size) - 1", "parent": 147, "children": [150, 151, 152], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 39}}, {"id": 150, "type": "identifier", "text": "bits", "parent": 149, "children": [], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 14}}, {"id": 151, "type": "=", "text": "=", "parent": 149, "children": [], "start_point": {"row": 82, "column": 15}, "end_point": {"row": 82, "column": 16}}, {"id": 152, "type": "binary_expression", "text": "find_msb_set(size) - 1", "parent": 149, "children": [153, 157, 158], "start_point": {"row": 82, "column": 17}, "end_point": {"row": 82, "column": 39}}, {"id": 153, "type": "call_expression", "text": "find_msb_set(size)", "parent": 152, "children": [154, 155], "start_point": {"row": 82, "column": 17}, "end_point": {"row": 82, "column": 35}}, {"id": 154, "type": "identifier", "text": "find_msb_set", "parent": 153, "children": [], "start_point": {"row": 82, "column": 17}, "end_point": {"row": 82, "column": 29}}, {"id": 155, "type": "argument_list", "text": "(size)", "parent": 153, "children": [156], "start_point": {"row": 82, "column": 29}, "end_point": {"row": 82, "column": 35}}, {"id": 156, "type": "identifier", "text": "size", "parent": 155, "children": [], "start_point": {"row": 82, "column": 30}, "end_point": {"row": 82, "column": 34}}, {"id": 157, "type": "-", "text": "-", "parent": 152, "children": [], "start_point": {"row": 82, "column": 36}, "end_point": {"row": 82, "column": 37}}, {"id": 158, "type": "number_literal", "text": "1", "parent": 152, "children": [], "start_point": {"row": 82, "column": 38}, "end_point": {"row": 82, "column": 39}}, {"id": 159, "type": "if_statement", "text": "if (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n\t\t\tbits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n\t\t}", "parent": 141, "children": [160], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 86, "column": 3}}, {"id": 160, "type": "parenthesized_expression", "text": "(bits < ARC_FEATURE_MPU_ALIGNMENT_BITS)", "parent": 159, "children": [161], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 44}}, {"id": 161, "type": "binary_expression", "text": "bits < ARC_FEATURE_MPU_ALIGNMENT_BITS", "parent": 160, "children": [162, 163, 164], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 43}}, {"id": 162, "type": "identifier", "text": "bits", "parent": 161, "children": [], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 10}}, {"id": 163, "type": "<", "text": "<", "parent": 161, "children": [], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 12}}, {"id": 164, "type": "identifier", "text": "ARC_FEATURE_MPU_ALIGNMENT_BITS", "parent": 161, "children": [], "start_point": {"row": 84, "column": 13}, "end_point": {"row": 84, "column": 43}}, {"id": 165, "type": "assignment_expression", "text": "bits = ARC_FEATURE_MPU_ALIGNMENT_BITS", "parent": 159, "children": [166, 167, 168], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 40}}, {"id": 166, "type": "identifier", "text": "bits", "parent": 165, "children": [], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 7}}, {"id": 167, "type": "=", "text": "=", "parent": 165, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 9}}, {"id": 168, "type": "identifier", "text": "ARC_FEATURE_MPU_ALIGNMENT_BITS", "parent": 165, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 40}}, {"id": 169, "type": "if_statement", "text": "if (BIT(bits) < size) {\n\t\t\tbits++;\n\t\t}", "parent": 141, "children": [170], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 90, "column": 3}}, {"id": 170, "type": "parenthesized_expression", "text": "(BIT(bits) < size)", "parent": 169, "children": [171], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 23}}, {"id": 171, "type": "binary_expression", "text": "BIT(bits) < size", "parent": 170, "children": [172, 176, 177], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 22}}, {"id": 172, "type": "call_expression", "text": "BIT(bits)", "parent": 171, "children": [173, 174], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 15}}, {"id": 173, "type": "identifier", "text": "BIT", "parent": 172, "children": [], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 9}}, {"id": 174, "type": "argument_list", "text": "(bits)", "parent": 172, "children": [175], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 15}}, {"id": 175, "type": "identifier", "text": "bits", "parent": 174, "children": [], "start_point": {"row": 88, "column": 10}, "end_point": {"row": 88, "column": 14}}, {"id": 176, "type": "<", "text": "<", "parent": 171, "children": [], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 17}}, {"id": 177, "type": "identifier", "text": "size", "parent": 171, "children": [], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 22}}, {"id": 178, "type": "update_expression", "text": "bits++", "parent": 169, "children": [179, 180], "start_point": {"row": 89, "column": 3}, "end_point": {"row": 89, "column": 9}}, {"id": 179, "type": "identifier", "text": "bits", "parent": 178, "children": [], "start_point": {"row": 89, "column": 3}, "end_point": {"row": 89, "column": 7}}, {"id": 180, "type": "++", "text": "++", "parent": 178, "children": [], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 9}}, {"id": 181, "type": "assignment_expression", "text": "region_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC)", "parent": 141, "children": [182, 183, 184], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 75}}, {"id": 182, "type": "identifier", "text": "region_attr", "parent": 181, "children": [], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 13}}, {"id": 183, "type": "&=", "text": "&=", "parent": 181, "children": [], "start_point": {"row": 99, "column": 14}, "end_point": {"row": 99, "column": 16}}, {"id": 184, "type": "unary_expression", "text": "~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC)", "parent": 181, "children": [185, 186], "start_point": {"row": 99, "column": 17}, "end_point": {"row": 99, "column": 75}}, {"id": 185, "type": "~", "text": "~", "parent": 184, "children": [], "start_point": {"row": 99, "column": 17}, "end_point": {"row": 99, "column": 18}}, {"id": 186, "type": "parenthesized_expression", "text": "(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC)", "parent": 184, "children": [187], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 99, "column": 75}}, {"id": 187, "type": "binary_expression", "text": "AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC", "parent": 186, "children": [188, 191], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 74}}, {"id": 188, "type": "binary_expression", "text": "AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC", "parent": 187, "children": [189, 190], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 57}}, {"id": 189, "type": "identifier", "text": "AUX_MPU_RDP_SIZE_MASK", "parent": 188, "children": [], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 40}}, {"id": 190, "type": "identifier", "text": "AUX_MPU_RDB_IC", "parent": 188, "children": [], "start_point": {"row": 99, "column": 43}, "end_point": {"row": 99, "column": 57}}, {"id": 191, "type": "identifier", "text": "AUX_MPU_RDB_DC", "parent": 187, "children": [], "start_point": {"row": 99, "column": 60}, "end_point": {"row": 99, "column": 74}}, {"id": 192, "type": "assignment_expression", "text": "region_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV", "parent": 141, "children": [193, 194, 195], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 63}}, {"id": 193, "type": "identifier", "text": "region_attr", "parent": 192, "children": [], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 13}}, {"id": 194, "type": "|=", "text": "|=", "parent": 192, "children": [], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 16}}, {"id": 195, "type": "binary_expression", "text": "AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV", "parent": 192, "children": [196, 200], "start_point": {"row": 100, "column": 17}, "end_point": {"row": 100, "column": 63}}, {"id": 196, "type": "call_expression", "text": "AUX_MPU_RDP_REGION_SIZE(bits)", "parent": 195, "children": [197, 198], "start_point": {"row": 100, "column": 17}, "end_point": {"row": 100, "column": 46}}, {"id": 197, "type": "identifier", "text": "AUX_MPU_RDP_REGION_SIZE", "parent": 196, "children": [], "start_point": {"row": 100, "column": 17}, "end_point": {"row": 100, "column": 40}}, {"id": 198, "type": "argument_list", "text": "(bits)", "parent": 196, "children": [199], "start_point": {"row": 100, "column": 40}, "end_point": {"row": 100, "column": 46}}, {"id": 199, "type": "identifier", "text": "bits", "parent": 198, "children": [], "start_point": {"row": 100, "column": 41}, "end_point": {"row": 100, "column": 45}}, {"id": 200, "type": "identifier", "text": "AUX_MPU_RDB_NV", "parent": 195, "children": [], "start_point": {"row": 100, "column": 49}, "end_point": {"row": 100, "column": 63}}, {"id": 201, "type": "assignment_expression", "text": "region_addr |= AUX_MPU_RDB_VALID_MASK", "parent": 141, "children": [202, 203, 204], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 39}}, {"id": 202, "type": "identifier", "text": "region_addr", "parent": 201, "children": [], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 13}}, {"id": 203, "type": "|=", "text": "|=", "parent": 201, "children": [], "start_point": {"row": 101, "column": 14}, "end_point": {"row": 101, "column": 16}}, {"id": 204, "type": "identifier", "text": "AUX_MPU_RDB_VALID_MASK", "parent": 201, "children": [], "start_point": {"row": 101, "column": 17}, "end_point": {"row": 101, "column": 39}}, {"id": 205, "type": "else_clause", "text": "else {\n\t\tregion_addr = 0U;\n\t}", "parent": 141, "children": [], "start_point": {"row": 102, "column": 3}, "end_point": {"row": 104, "column": 2}}, {"id": 206, "type": "assignment_expression", "text": "region_addr = 0U", "parent": 205, "children": [207, 208, 209], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 18}}, {"id": 207, "type": "identifier", "text": "region_addr", "parent": 206, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 13}}, {"id": 208, "type": "=", "text": "=", "parent": 206, "children": [], "start_point": {"row": 103, "column": 14}, "end_point": {"row": 103, "column": 15}}, {"id": 209, "type": "number_literal", "text": "0U", "parent": 206, "children": [], "start_point": {"row": 103, "column": 16}, "end_point": {"row": 103, "column": 18}}, {"id": 210, "type": "call_expression", "text": "_bank_select(bank)", "parent": 102, "children": [211, 212], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 19}}, {"id": 211, "type": "identifier", "text": "_bank_select", "parent": 210, "children": [], "start_point": {"row": 106, "column": 1}, "end_point": {"row": 106, "column": 13}}, {"id": 212, "type": "argument_list", "text": "(bank)", "parent": 210, "children": [213], "start_point": {"row": 106, "column": 13}, "end_point": {"row": 106, "column": 19}}, {"id": 213, "type": "identifier", "text": "bank", "parent": 212, "children": [], "start_point": {"row": 106, "column": 14}, "end_point": {"row": 106, "column": 18}}, {"id": 214, "type": "call_expression", "text": "z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr)", "parent": 102, "children": [215, 216], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 62}}, {"id": 215, "type": "identifier", "text": "z_arc_v2_aux_reg_write", "parent": 214, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 23}}, {"id": 216, "type": "argument_list", "text": "(_ARC_V2_MPU_RDP0 + index, region_attr)", "parent": 214, "children": [217, 221], "start_point": {"row": 107, "column": 23}, "end_point": {"row": 107, "column": 62}}, {"id": 217, "type": "binary_expression", "text": "_ARC_V2_MPU_RDP0 + index", "parent": 216, "children": [218, 219, 220], "start_point": {"row": 107, "column": 24}, "end_point": {"row": 107, "column": 48}}, {"id": 218, "type": "identifier", "text": "_ARC_V2_MPU_RDP0", "parent": 217, "children": [], "start_point": {"row": 107, "column": 24}, "end_point": {"row": 107, "column": 40}}, {"id": 219, "type": "+", "text": "+", "parent": 217, "children": [], "start_point": {"row": 107, "column": 41}, "end_point": {"row": 107, "column": 42}}, {"id": 220, "type": "identifier", "text": "index", "parent": 217, "children": [], "start_point": {"row": 107, "column": 43}, "end_point": {"row": 107, "column": 48}}, {"id": 221, "type": "identifier", "text": "region_attr", "parent": 216, "children": [], "start_point": {"row": 107, "column": 50}, "end_point": {"row": 107, "column": 61}}, {"id": 222, "type": "call_expression", "text": "z_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr)", "parent": 102, "children": [223, 224], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 62}}, {"id": 223, "type": "identifier", "text": "z_arc_v2_aux_reg_write", "parent": 222, "children": [], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 23}}, {"id": 224, "type": "argument_list", "text": "(_ARC_V2_MPU_RDB0 + index, region_addr)", "parent": 222, "children": [225, 229], "start_point": {"row": 108, "column": 23}, "end_point": {"row": 108, "column": 62}}, {"id": 225, "type": "binary_expression", "text": "_ARC_V2_MPU_RDB0 + index", "parent": 224, "children": [226, 227, 228], "start_point": {"row": 108, "column": 24}, "end_point": {"row": 108, "column": 48}}, {"id": 226, "type": "identifier", "text": "_ARC_V2_MPU_RDB0", "parent": 225, "children": [], "start_point": {"row": 108, "column": 24}, "end_point": {"row": 108, "column": 40}}, {"id": 227, "type": "+", "text": "+", "parent": 225, "children": [], "start_point": {"row": 108, "column": 41}, "end_point": {"row": 108, "column": 42}}, {"id": 228, "type": "identifier", "text": "index", "parent": 225, "children": [], "start_point": {"row": 108, "column": 43}, "end_point": {"row": 108, "column": 48}}, {"id": 229, "type": "identifier", "text": "region_addr", "parent": 224, "children": [], "start_point": {"row": 108, "column": 50}, "end_point": {"row": 108, "column": 61}}, {"id": 230, "type": "function_definition", "text": "static inline int get_region_index_by_type(uint32_t type)\n{\n\t/*\n\t * The new MPU regions are allocated per type after the statically\n\t * configured regions. The type is one-indexed rather than\n\t * zero-indexed.\n\t *\n\t * For ARC MPU v6, the smaller index has higher priority, so the\n\t * index is allocated in reverse order. Static regions start from\n\t * the biggest index, then thread related regions.\n\t *\n\t */\n\tswitch (type) {\n\tcase THREAD_STACK_USER_REGION:\n\t\treturn get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;\n\tcase THREAD_STACK_REGION:\n\tcase THREAD_APP_DATA_REGION:\n\tcase THREAD_DOMAIN_PARTITION_REGION:\n\t\t/*\n\t\t * Start domain partition region from stack guard region\n\t\t * since stack guard is not supported.\n\t\t */\n\t\treturn get_num_regions() - mpu_config.num_regions - type + 1;\n\tdefault:\n\t\t__ASSERT(0, \"Unsupported type\");\n\t\treturn -EINVAL;\n\t}\n}", "parent": 0, "children": [231, 233, 234], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 142, "column": 1}}, {"id": 231, "type": "storage_class_specifier", "text": "inline", "parent": 230, "children": [232], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 13}}, {"id": 232, "type": "inline", "text": "inline", "parent": 231, "children": [], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 13}}, {"id": 233, "type": "primitive_type", "text": "int", "parent": 230, "children": [], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 17}}, {"id": 234, "type": "function_declarator", "text": "get_region_index_by_type(uint32_t type)", "parent": 230, "children": [235, 236], "start_point": {"row": 115, "column": 18}, "end_point": {"row": 115, "column": 57}}, {"id": 235, "type": "identifier", "text": "get_region_index_by_type", "parent": 234, "children": [], "start_point": {"row": 115, "column": 18}, "end_point": {"row": 115, "column": 42}}, {"id": 236, "type": "parameter_list", "text": "(uint32_t type)", "parent": 234, "children": [237], "start_point": {"row": 115, "column": 42}, "end_point": {"row": 115, "column": 57}}, {"id": 237, "type": "parameter_declaration", "text": "uint32_t type", "parent": 236, "children": [238, 239], "start_point": {"row": 115, "column": 43}, "end_point": {"row": 115, "column": 56}}, {"id": 238, "type": "primitive_type", "text": "uint32_t", "parent": 237, "children": [], "start_point": {"row": 115, "column": 43}, "end_point": {"row": 115, "column": 51}}, {"id": 239, "type": "identifier", "text": "type", "parent": 237, "children": [], "start_point": {"row": 115, "column": 52}, "end_point": {"row": 115, "column": 56}}, {"id": 240, "type": "switch_statement", "text": "switch (type) {\n\tcase THREAD_STACK_USER_REGION:\n\t\treturn get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;\n\tcase THREAD_STACK_REGION:\n\tcase THREAD_APP_DATA_REGION:\n\tcase THREAD_DOMAIN_PARTITION_REGION:\n\t\t/*\n\t\t * Start domain partition region from stack guard region\n\t\t * since stack guard is not supported.\n\t\t */\n\t\treturn get_num_regions() - mpu_config.num_regions - type + 1;\n\tdefault:\n\t\t__ASSERT(0, \"Unsupported type\");\n\t\treturn -EINVAL;\n\t}", "parent": 230, "children": [241, 242], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 141, "column": 2}}, {"id": 241, "type": "switch", "text": "switch", "parent": 240, "children": [], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 7}}, {"id": 242, "type": "parenthesized_expression", "text": "(type)", "parent": 240, "children": [243], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 14}}, {"id": 243, "type": "identifier", "text": "type", "parent": 242, "children": [], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 13}}, {"id": 244, "type": "case_statement", "text": "case THREAD_STACK_USER_REGION:\n\t\treturn get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;", "parent": 240, "children": [245, 246, 247], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 129, "column": 74}}, {"id": 245, "type": "case", "text": "case", "parent": 244, "children": [], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 5}}, {"id": 246, "type": "identifier", "text": "THREAD_STACK_USER_REGION", "parent": 244, "children": [], "start_point": {"row": 128, "column": 6}, "end_point": {"row": 128, "column": 30}}, {"id": 247, "type": "return_statement", "text": "return get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;", "parent": 244, "children": [248], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 74}}, {"id": 248, "type": "binary_expression", "text": "get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION", "parent": 247, "children": [249, 257, 258], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 73}}, {"id": 249, "type": "binary_expression", "text": "get_num_regions() - mpu_config.num_regions", "parent": 248, "children": [250, 253, 254], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 51}}, {"id": 250, "type": "call_expression", "text": "get_num_regions()", "parent": 249, "children": [251, 252], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 26}}, {"id": 251, "type": "identifier", "text": "get_num_regions", "parent": 250, "children": [], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 24}}, {"id": 252, "type": "argument_list", "text": "()", "parent": 250, "children": [], "start_point": {"row": 129, "column": 24}, "end_point": {"row": 129, "column": 26}}, {"id": 253, "type": "-", "text": "-", "parent": 249, "children": [], "start_point": {"row": 129, "column": 27}, "end_point": {"row": 129, "column": 28}}, {"id": 254, "type": "field_expression", "text": "mpu_config.num_regions", "parent": 249, "children": [255, 256], "start_point": {"row": 129, "column": 29}, "end_point": {"row": 129, "column": 51}}, {"id": 255, "type": "identifier", "text": "mpu_config", "parent": 254, "children": [], "start_point": {"row": 129, "column": 29}, "end_point": {"row": 129, "column": 39}}, {"id": 256, "type": "field_identifier", "text": "num_regions", "parent": 254, "children": [], "start_point": {"row": 129, "column": 40}, "end_point": {"row": 129, "column": 51}}, {"id": 257, "type": "-", "text": "-", "parent": 248, "children": [], "start_point": {"row": 129, "column": 52}, "end_point": {"row": 129, "column": 53}}, {"id": 258, "type": "identifier", "text": "THREAD_STACK_REGION", "parent": 248, "children": [], "start_point": {"row": 129, "column": 54}, "end_point": {"row": 129, "column": 73}}, {"id": 259, "type": "case_statement", "text": "case THREAD_STACK_REGION:", "parent": 240, "children": [260, 261], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 26}}, {"id": 260, "type": "case", "text": "case", "parent": 259, "children": [], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 5}}, {"id": 261, "type": "identifier", "text": "THREAD_STACK_REGION", "parent": 259, "children": [], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 25}}, {"id": 262, "type": "case_statement", "text": "case THREAD_APP_DATA_REGION:", "parent": 240, "children": [263, 264], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 29}}, {"id": 263, "type": "case", "text": "case", "parent": 262, "children": [], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 5}}, {"id": 264, "type": "identifier", "text": "THREAD_APP_DATA_REGION", "parent": 262, "children": [], "start_point": {"row": 131, "column": 6}, "end_point": {"row": 131, "column": 28}}, {"id": 265, "type": "case_statement", "text": "case THREAD_DOMAIN_PARTITION_REGION:\n\t\t/*\n\t\t * Start domain partition region from stack guard region\n\t\t * since stack guard is not supported.\n\t\t */\n\t\treturn get_num_regions() - mpu_config.num_regions - type + 1;", "parent": 240, "children": [266, 267, 268], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 137, "column": 63}}, {"id": 266, "type": "case", "text": "case", "parent": 265, "children": [], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 132, "column": 5}}, {"id": 267, "type": "identifier", "text": "THREAD_DOMAIN_PARTITION_REGION", "parent": 265, "children": [], "start_point": {"row": 132, "column": 6}, "end_point": {"row": 132, "column": 36}}, {"id": 268, "type": "return_statement", "text": "return get_num_regions() - mpu_config.num_regions - type + 1;", "parent": 265, "children": [269], "start_point": {"row": 137, "column": 2}, "end_point": {"row": 137, "column": 63}}, {"id": 269, "type": "binary_expression", "text": "get_num_regions() - mpu_config.num_regions - type + 1", "parent": 268, "children": [270, 281, 282], "start_point": {"row": 137, "column": 9}, "end_point": {"row": 137, "column": 62}}, {"id": 270, "type": "binary_expression", "text": "get_num_regions() - mpu_config.num_regions - type", "parent": 269, "children": [271, 279, 280], "start_point": {"row": 137, "column": 9}, "end_point": {"row": 137, "column": 58}}, {"id": 271, "type": "binary_expression", "text": "get_num_regions() - mpu_config.num_regions", "parent": 270, "children": [272, 275, 276], "start_point": {"row": 137, "column": 9}, "end_point": {"row": 137, "column": 51}}, {"id": 272, "type": "call_expression", "text": "get_num_regions()", "parent": 271, "children": [273, 274], "start_point": {"row": 137, "column": 9}, "end_point": {"row": 137, "column": 26}}, {"id": 273, "type": "identifier", "text": "get_num_regions", "parent": 272, "children": [], "start_point": {"row": 137, "column": 9}, "end_point": {"row": 137, "column": 24}}, {"id": 274, "type": "argument_list", "text": "()", "parent": 272, "children": [], "start_point": {"row": 137, "column": 24}, "end_point": {"row": 137, "column": 26}}, {"id": 275, "type": "-", "text": "-", "parent": 271, "children": [], "start_point": {"row": 137, "column": 27}, "end_point": {"row": 137, "column": 28}}, {"id": 276, "type": "field_expression", "text": "mpu_config.num_regions", "parent": 271, "children": [277, 278], "start_point": {"row": 137, "column": 29}, "end_point": {"row": 137, "column": 51}}, {"id": 277, "type": "identifier", "text": "mpu_config", "parent": 276, "children": [], "start_point": {"row": 137, "column": 29}, "end_point": {"row": 137, "column": 39}}, {"id": 278, "type": "field_identifier", "text": "num_regions", "parent": 276, "children": [], "start_point": {"row": 137, "column": 40}, "end_point": {"row": 137, "column": 51}}, {"id": 279, "type": "-", "text": "-", "parent": 270, "children": [], "start_point": {"row": 137, "column": 52}, "end_point": {"row": 137, "column": 53}}, {"id": 280, "type": "identifier", "text": "type", "parent": 270, "children": [], "start_point": {"row": 137, "column": 54}, "end_point": {"row": 137, "column": 58}}, {"id": 281, "type": "+", "text": "+", "parent": 269, "children": [], "start_point": {"row": 137, "column": 59}, "end_point": {"row": 137, "column": 60}}, {"id": 282, "type": "number_literal", "text": "1", "parent": 269, "children": [], "start_point": {"row": 137, "column": 61}, "end_point": {"row": 137, "column": 62}}, {"id": 283, "type": "case_statement", "text": "default:\n\t\t__ASSERT(0, \"Unsupported type\");\n\t\treturn -EINVAL;", "parent": 240, "children": [284, 290], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 140, "column": 17}}, {"id": 284, "type": "default", "text": "default", "parent": 283, "children": [], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 8}}, {"id": 285, "type": "call_expression", "text": "__ASSERT(0, \"Unsupported type\")", "parent": 283, "children": [286, 287], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 139, "column": 33}}, {"id": 286, "type": "identifier", "text": "__ASSERT", "parent": 285, "children": [], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 139, "column": 10}}, {"id": 287, "type": "argument_list", "text": "(0, \"Unsupported type\")", "parent": 285, "children": [288, 289], "start_point": {"row": 139, "column": 10}, "end_point": {"row": 139, "column": 33}}, {"id": 288, "type": "number_literal", "text": "0", "parent": 287, "children": [], "start_point": {"row": 139, "column": 11}, "end_point": {"row": 139, "column": 12}}, {"id": 289, "type": "string_literal", "text": "\"Unsupported type\"", "parent": 287, "children": [], "start_point": {"row": 139, "column": 14}, "end_point": {"row": 139, "column": 32}}, {"id": 290, "type": "return_statement", "text": "return -EINVAL;", "parent": 283, "children": [291], "start_point": {"row": 140, "column": 2}, "end_point": {"row": 140, "column": 17}}, {"id": 291, "type": "unary_expression", "text": "-EINVAL", "parent": 290, "children": [292, 293], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 16}}, {"id": 292, "type": "-", "text": "-", "parent": 291, "children": [], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 10}}, {"id": 293, "type": "identifier", "text": "EINVAL", "parent": 291, "children": [], "start_point": {"row": 140, "column": 10}, "end_point": {"row": 140, "column": 16}}, {"id": 294, "type": "function_definition", "text": "static inline bool _is_enabled_region(uint32_t r_index)\n{\n\tuint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n\tuint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\t_bank_select(bank);\n\treturn ((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n\t\t & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK);\n}", "parent": 0, "children": [295, 297, 298], "start_point": {"row": 147, "column": 0}, "end_point": {"row": 155, "column": 1}}, {"id": 295, "type": "storage_class_specifier", "text": "inline", "parent": 294, "children": [296], "start_point": {"row": 147, "column": 7}, "end_point": {"row": 147, "column": 13}}, {"id": 296, "type": "inline", "text": "inline", "parent": 295, "children": [], "start_point": {"row": 147, "column": 7}, "end_point": {"row": 147, "column": 13}}, {"id": 297, "type": "primitive_type", "text": "bool", "parent": 294, "children": [], "start_point": {"row": 147, "column": 14}, "end_point": {"row": 147, "column": 18}}, {"id": 298, "type": "function_declarator", "text": "_is_enabled_region(uint32_t r_index)", "parent": 294, "children": [299, 300], "start_point": {"row": 147, "column": 19}, "end_point": {"row": 147, "column": 55}}, {"id": 299, "type": "identifier", "text": "_is_enabled_region", "parent": 298, "children": [], "start_point": {"row": 147, "column": 19}, "end_point": {"row": 147, "column": 37}}, {"id": 300, "type": "parameter_list", "text": "(uint32_t r_index)", "parent": 298, "children": [301], "start_point": {"row": 147, "column": 37}, "end_point": {"row": 147, "column": 55}}, {"id": 301, "type": "parameter_declaration", "text": "uint32_t r_index", "parent": 300, "children": [302, 303], "start_point": {"row": 147, "column": 38}, "end_point": {"row": 147, "column": 54}}, {"id": 302, "type": "primitive_type", "text": "uint32_t", "parent": 301, "children": [], "start_point": {"row": 147, "column": 38}, "end_point": {"row": 147, "column": 46}}, {"id": 303, "type": "identifier", "text": "r_index", "parent": 301, "children": [], "start_point": {"row": 147, "column": 47}, "end_point": {"row": 147, "column": 54}}, {"id": 304, "type": "declaration", "text": "uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;", "parent": 294, "children": [305, 306], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 53}}, {"id": 305, "type": "primitive_type", "text": "uint32_t", "parent": 304, "children": [], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 9}}, {"id": 306, "type": "init_declarator", "text": "bank = r_index / ARC_FEATURE_MPU_BANK_SIZE", "parent": 304, "children": [307, 308, 309], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 52}}, {"id": 307, "type": "identifier", "text": "bank", "parent": 306, "children": [], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 14}}, {"id": 308, "type": "=", "text": "=", "parent": 306, "children": [], "start_point": {"row": 149, "column": 15}, "end_point": {"row": 149, "column": 16}}, {"id": 309, "type": "binary_expression", "text": "r_index / ARC_FEATURE_MPU_BANK_SIZE", "parent": 306, "children": [310, 311, 312], "start_point": {"row": 149, "column": 17}, "end_point": {"row": 149, "column": 52}}, {"id": 310, "type": "identifier", "text": "r_index", "parent": 309, "children": [], "start_point": {"row": 149, "column": 17}, "end_point": {"row": 149, "column": 24}}, {"id": 311, "type": "/", "text": "/", "parent": 309, "children": [], "start_point": {"row": 149, "column": 25}, "end_point": {"row": 149, "column": 26}}, {"id": 312, "type": "identifier", "text": "ARC_FEATURE_MPU_BANK_SIZE", "parent": 309, "children": [], "start_point": {"row": 149, "column": 27}, "end_point": {"row": 149, "column": 52}}, {"id": 313, "type": "declaration", "text": "uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;", "parent": 294, "children": [314, 315], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 61}}, {"id": 314, "type": "primitive_type", "text": "uint32_t", "parent": 313, "children": [], "start_point": {"row": 150, "column": 1}, "end_point": {"row": 150, "column": 9}}, {"id": 315, "type": "init_declarator", "text": "index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U", "parent": 313, "children": [316, 317, 318], "start_point": {"row": 150, "column": 10}, "end_point": {"row": 150, "column": 60}}, {"id": 316, "type": "identifier", "text": "index", "parent": 315, "children": [], "start_point": {"row": 150, "column": 10}, "end_point": {"row": 150, "column": 15}}, {"id": 317, "type": "=", "text": "=", "parent": 315, "children": [], "start_point": {"row": 150, "column": 16}, "end_point": {"row": 150, "column": 17}}, {"id": 318, "type": "binary_expression", "text": "(r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U", "parent": 315, "children": [319, 324, 325], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 60}}, {"id": 319, "type": "parenthesized_expression", "text": "(r_index % ARC_FEATURE_MPU_BANK_SIZE)", "parent": 318, "children": [320], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 55}}, {"id": 320, "type": "binary_expression", "text": "r_index % ARC_FEATURE_MPU_BANK_SIZE", "parent": 319, "children": [321, 322, 323], "start_point": {"row": 150, "column": 19}, "end_point": {"row": 150, "column": 54}}, {"id": 321, "type": "identifier", "text": "r_index", "parent": 320, "children": [], "start_point": {"row": 150, "column": 19}, "end_point": {"row": 150, "column": 26}}, {"id": 322, "type": "%", "text": "%", "parent": 320, "children": [], "start_point": {"row": 150, "column": 27}, "end_point": {"row": 150, "column": 28}}, {"id": 323, "type": "identifier", "text": "ARC_FEATURE_MPU_BANK_SIZE", "parent": 320, "children": [], "start_point": {"row": 150, "column": 29}, "end_point": {"row": 150, "column": 54}}, {"id": 324, "type": "*", "text": "*", "parent": 318, "children": [], "start_point": {"row": 150, "column": 56}, "end_point": {"row": 150, "column": 57}}, {"id": 325, "type": "number_literal", "text": "2U", "parent": 318, "children": [], "start_point": {"row": 150, "column": 58}, "end_point": {"row": 150, "column": 60}}, {"id": 326, "type": "call_expression", "text": "_bank_select(bank)", "parent": 294, "children": [327, 328], "start_point": {"row": 152, "column": 1}, "end_point": {"row": 152, "column": 19}}, {"id": 327, "type": "identifier", "text": "_bank_select", "parent": 326, "children": [], "start_point": {"row": 152, "column": 1}, "end_point": {"row": 152, "column": 13}}, {"id": 328, "type": "argument_list", "text": "(bank)", "parent": 326, "children": [329], "start_point": {"row": 152, "column": 13}, "end_point": {"row": 152, "column": 19}}, {"id": 329, "type": "identifier", "text": "bank", "parent": 328, "children": [], "start_point": {"row": 152, "column": 14}, "end_point": {"row": 152, "column": 18}}, {"id": 330, "type": "return_statement", "text": "return ((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n\t\t & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK);", "parent": 294, "children": [331], "start_point": {"row": 153, "column": 1}, "end_point": {"row": 154, "column": 56}}, {"id": 331, "type": "parenthesized_expression", "text": "((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n\t\t & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK)", "parent": 330, "children": [332], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 154, "column": 55}}, {"id": 332, "type": "binary_expression", "text": "(z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n\t\t & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK", "parent": 331, "children": [333, 343, 344], "start_point": {"row": 153, "column": 9}, "end_point": {"row": 154, "column": 54}}, {"id": 333, "type": "parenthesized_expression", "text": "(z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n\t\t & AUX_MPU_RDB_VALID_MASK)", "parent": 332, "children": [334], "start_point": {"row": 153, "column": 9}, "end_point": {"row": 154, "column": 28}}, {"id": 334, "type": "binary_expression", "text": "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n\t\t & AUX_MPU_RDB_VALID_MASK", "parent": 333, "children": [335, 342], "start_point": {"row": 153, "column": 10}, "end_point": {"row": 154, "column": 27}}, {"id": 335, "type": "call_expression", "text": "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)", "parent": 334, "children": [336, 337], "start_point": {"row": 153, "column": 10}, "end_point": {"row": 153, "column": 57}}, {"id": 336, "type": "identifier", "text": "z_arc_v2_aux_reg_read", "parent": 335, "children": [], "start_point": {"row": 153, "column": 10}, "end_point": {"row": 153, "column": 31}}, {"id": 337, "type": "argument_list", "text": "(_ARC_V2_MPU_RDB0 + index)", "parent": 335, "children": [338], "start_point": {"row": 153, "column": 31}, "end_point": {"row": 153, "column": 57}}, {"id": 338, "type": "binary_expression", "text": "_ARC_V2_MPU_RDB0 + index", "parent": 337, "children": [339, 340, 341], "start_point": {"row": 153, "column": 32}, "end_point": {"row": 153, "column": 56}}, {"id": 339, "type": "identifier", "text": "_ARC_V2_MPU_RDB0", "parent": 338, "children": [], "start_point": {"row": 153, "column": 32}, "end_point": {"row": 153, "column": 48}}, {"id": 340, "type": "+", "text": "+", "parent": 338, "children": [], "start_point": {"row": 153, "column": 49}, "end_point": {"row": 153, "column": 50}}, {"id": 341, "type": "identifier", "text": "index", "parent": 338, "children": [], "start_point": {"row": 153, "column": 51}, "end_point": {"row": 153, "column": 56}}, {"id": 342, "type": "identifier", "text": "AUX_MPU_RDB_VALID_MASK", "parent": 334, "children": [], "start_point": {"row": 154, "column": 5}, "end_point": {"row": 154, "column": 27}}, {"id": 343, "type": "==", "text": "==", "parent": 332, "children": [], "start_point": {"row": 154, "column": 29}, "end_point": {"row": 154, "column": 31}}, {"id": 344, "type": "identifier", "text": "AUX_MPU_RDB_VALID_MASK", "parent": 332, "children": [], "start_point": {"row": 154, "column": 32}, "end_point": {"row": 154, "column": 54}}, {"id": 345, "type": "function_definition", "text": "static inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)\n{\n\tuint32_t r_addr_start;\n\tuint32_t r_addr_end;\n\tuint32_t r_size_lshift;\n\tuint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n\tuint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\t_bank_select(bank);\n\tr_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK);\n\tr_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK;\n\tr_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift);\n\tr_addr_end = r_addr_start + (1 << (r_size_lshift + 1));\n\n\tif (start >= r_addr_start && (start + size) <= r_addr_end) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "parent": 0, "children": [346, 348, 349], "start_point": {"row": 160, "column": 0}, "end_point": {"row": 179, "column": 1}}, {"id": 346, "type": "storage_class_specifier", "text": "inline", "parent": 345, "children": [347], "start_point": {"row": 160, "column": 7}, "end_point": {"row": 160, "column": 13}}, {"id": 347, "type": "inline", "text": "inline", "parent": 346, "children": [], "start_point": {"row": 160, "column": 7}, "end_point": {"row": 160, "column": 13}}, {"id": 348, "type": "primitive_type", "text": "bool", "parent": 345, "children": [], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 18}}, {"id": 349, "type": "function_declarator", "text": "_is_in_region(uint32_t r_index, uint32_t start, uint32_t size)", "parent": 345, "children": [350, 351], "start_point": {"row": 160, "column": 19}, "end_point": {"row": 160, "column": 81}}, {"id": 350, "type": "identifier", "text": "_is_in_region", "parent": 349, "children": [], "start_point": {"row": 160, "column": 19}, "end_point": {"row": 160, "column": 32}}, {"id": 351, "type": "parameter_list", "text": "(uint32_t r_index, uint32_t start, uint32_t size)", "parent": 349, "children": [352, 355, 358], "start_point": {"row": 160, "column": 32}, "end_point": {"row": 160, "column": 81}}, {"id": 352, "type": "parameter_declaration", "text": "uint32_t r_index", "parent": 351, "children": [353, 354], "start_point": {"row": 160, "column": 33}, "end_point": {"row": 160, "column": 49}}, {"id": 353, "type": "primitive_type", "text": "uint32_t", "parent": 352, "children": [], "start_point": {"row": 160, "column": 33}, "end_point": {"row": 160, "column": 41}}, {"id": 354, "type": "identifier", "text": "r_index", "parent": 352, "children": [], "start_point": {"row": 160, "column": 42}, "end_point": {"row": 160, "column": 49}}, {"id": 355, "type": "parameter_declaration", "text": "uint32_t start", "parent": 351, "children": [356, 357], "start_point": {"row": 160, "column": 51}, "end_point": {"row": 160, "column": 65}}, {"id": 356, "type": "primitive_type", "text": "uint32_t", "parent": 355, "children": [], "start_point": {"row": 160, "column": 51}, "end_point": {"row": 160, "column": 59}}, {"id": 357, "type": "identifier", "text": "start", "parent": 355, "children": [], "start_point": {"row": 160, "column": 60}, "end_point": {"row": 160, "column": 65}}, {"id": 358, "type": "parameter_declaration", "text": "uint32_t size", "parent": 351, "children": [359, 360], "start_point": {"row": 160, "column": 67}, "end_point": {"row": 160, "column": 80}}, {"id": 359, "type": "primitive_type", "text": "uint32_t", "parent": 358, "children": [], "start_point": {"row": 160, "column": 67}, "end_point": {"row": 160, "column": 75}}, {"id": 360, "type": "identifier", "text": "size", "parent": 358, "children": [], "start_point": {"row": 160, "column": 76}, "end_point": {"row": 160, "column": 80}}, {"id": 361, "type": "declaration", "text": "uint32_t r_addr_start;", "parent": 345, "children": [362, 363], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 23}}, {"id": 362, "type": "primitive_type", "text": "uint32_t", "parent": 361, "children": [], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 9}}, {"id": 363, "type": "identifier", "text": "r_addr_start", "parent": 361, "children": [], "start_point": {"row": 162, "column": 10}, "end_point": {"row": 162, "column": 22}}, {"id": 364, "type": "declaration", "text": "uint32_t r_addr_end;", "parent": 345, "children": [365, 366], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 21}}, {"id": 365, "type": "primitive_type", "text": "uint32_t", "parent": 364, "children": [], "start_point": {"row": 163, "column": 1}, "end_point": {"row": 163, "column": 9}}, {"id": 366, "type": "identifier", "text": "r_addr_end", "parent": 364, "children": [], "start_point": {"row": 163, "column": 10}, "end_point": {"row": 163, "column": 20}}, {"id": 367, "type": "declaration", "text": "uint32_t r_size_lshift;", "parent": 345, "children": [368, 369], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 24}}, {"id": 368, "type": "primitive_type", "text": "uint32_t", "parent": 367, "children": [], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 9}}, {"id": 369, "type": "identifier", "text": "r_size_lshift", "parent": 367, "children": [], "start_point": {"row": 164, "column": 10}, "end_point": {"row": 164, "column": 23}}, {"id": 370, "type": "declaration", "text": "uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;", "parent": 345, "children": [371, 372], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 53}}, {"id": 371, "type": "primitive_type", "text": "uint32_t", "parent": 370, "children": [], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 9}}, {"id": 372, "type": "init_declarator", "text": "bank = r_index / ARC_FEATURE_MPU_BANK_SIZE", "parent": 370, "children": [373, 374, 375], "start_point": {"row": 165, "column": 10}, "end_point": {"row": 165, "column": 52}}, {"id": 373, "type": "identifier", "text": "bank", "parent": 372, "children": [], "start_point": {"row": 165, "column": 10}, "end_point": {"row": 165, "column": 14}}, {"id": 374, "type": "=", "text": "=", "parent": 372, "children": [], "start_point": {"row": 165, "column": 15}, "end_point": {"row": 165, "column": 16}}, {"id": 375, "type": "binary_expression", "text": "r_index / ARC_FEATURE_MPU_BANK_SIZE", "parent": 372, "children": [376, 377, 378], "start_point": {"row": 165, "column": 17}, "end_point": {"row": 165, "column": 52}}, {"id": 376, "type": "identifier", "text": "r_index", "parent": 375, "children": [], "start_point": {"row": 165, "column": 17}, "end_point": {"row": 165, "column": 24}}, {"id": 377, "type": "/", "text": "/", "parent": 375, "children": [], "start_point": {"row": 165, "column": 25}, "end_point": {"row": 165, "column": 26}}, {"id": 378, "type": "identifier", "text": "ARC_FEATURE_MPU_BANK_SIZE", "parent": 375, "children": [], "start_point": {"row": 165, "column": 27}, "end_point": {"row": 165, "column": 52}}, {"id": 379, "type": "declaration", "text": "uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;", "parent": 345, "children": [380, 381], "start_point": {"row": 166, "column": 1}, "end_point": {"row": 166, "column": 61}}, {"id": 380, "type": "primitive_type", "text": "uint32_t", "parent": 379, "children": [], "start_point": {"row": 166, "column": 1}, "end_point": {"row": 166, "column": 9}}, {"id": 381, "type": "init_declarator", "text": "index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U", "parent": 379, "children": [382, 383, 384], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 60}}, {"id": 382, "type": "identifier", "text": "index", "parent": 381, "children": [], "start_point": {"row": 166, "column": 10}, "end_point": {"row": 166, "column": 15}}, {"id": 383, "type": "=", "text": "=", "parent": 381, "children": [], "start_point": {"row": 166, "column": 16}, "end_point": {"row": 166, "column": 17}}, {"id": 384, "type": "binary_expression", "text": "(r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U", "parent": 381, "children": [385, 390, 391], "start_point": {"row": 166, "column": 18}, "end_point": {"row": 166, "column": 60}}, {"id": 385, "type": "parenthesized_expression", "text": "(r_index % ARC_FEATURE_MPU_BANK_SIZE)", "parent": 384, "children": [386], "start_point": {"row": 166, "column": 18}, "end_point": {"row": 166, "column": 55}}, {"id": 386, "type": "binary_expression", "text": "r_index % ARC_FEATURE_MPU_BANK_SIZE", "parent": 385, "children": [387, 388, 389], "start_point": {"row": 166, "column": 19}, "end_point": {"row": 166, "column": 54}}, {"id": 387, "type": "identifier", "text": "r_index", "parent": 386, "children": [], "start_point": {"row": 166, "column": 19}, "end_point": {"row": 166, "column": 26}}, {"id": 388, "type": "%", "text": "%", "parent": 386, "children": [], "start_point": {"row": 166, "column": 27}, "end_point": {"row": 166, "column": 28}}, {"id": 389, "type": "identifier", "text": "ARC_FEATURE_MPU_BANK_SIZE", "parent": 386, "children": [], "start_point": {"row": 166, "column": 29}, "end_point": {"row": 166, "column": 54}}, {"id": 390, "type": "*", "text": "*", "parent": 384, "children": [], "start_point": {"row": 166, "column": 56}, "end_point": {"row": 166, "column": 57}}, {"id": 391, "type": "number_literal", "text": "2U", "parent": 384, "children": [], "start_point": {"row": 166, "column": 58}, "end_point": {"row": 166, "column": 60}}, {"id": 392, "type": "call_expression", "text": "_bank_select(bank)", "parent": 345, "children": [393, 394], "start_point": {"row": 168, "column": 1}, "end_point": {"row": 168, "column": 19}}, {"id": 393, "type": "identifier", "text": "_bank_select", "parent": 392, "children": [], "start_point": {"row": 168, "column": 1}, "end_point": {"row": 168, "column": 13}}, {"id": 394, "type": "argument_list", "text": "(bank)", "parent": 392, "children": [395], "start_point": {"row": 168, "column": 13}, "end_point": {"row": 168, "column": 19}}, {"id": 395, "type": "identifier", "text": "bank", "parent": 394, "children": [], "start_point": {"row": 168, "column": 14}, "end_point": {"row": 168, "column": 18}}, {"id": 396, "type": "assignment_expression", "text": "r_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK)", "parent": 345, "children": [397, 398, 399], "start_point": {"row": 169, "column": 1}, "end_point": {"row": 169, "column": 91}}, {"id": 397, "type": "identifier", "text": "r_addr_start", "parent": 396, "children": [], "start_point": {"row": 169, "column": 1}, "end_point": {"row": 169, "column": 13}}, {"id": 398, "type": "=", "text": "=", "parent": 396, "children": [], "start_point": {"row": 169, "column": 14}, "end_point": {"row": 169, "column": 15}}, {"id": 399, "type": "binary_expression", "text": "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK)", "parent": 396, "children": [400, 407], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 169, "column": 91}}, {"id": 400, "type": "call_expression", "text": "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)", "parent": 399, "children": [401, 402], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 169, "column": 63}}, {"id": 401, "type": "identifier", "text": "z_arc_v2_aux_reg_read", "parent": 400, "children": [], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 169, "column": 37}}, {"id": 402, "type": "argument_list", "text": "(_ARC_V2_MPU_RDB0 + index)", "parent": 400, "children": [403], "start_point": {"row": 169, "column": 37}, "end_point": {"row": 169, "column": 63}}, {"id": 403, "type": "binary_expression", "text": "_ARC_V2_MPU_RDB0 + index", "parent": 402, "children": [404, 405, 406], "start_point": {"row": 169, "column": 38}, "end_point": {"row": 169, "column": 62}}, {"id": 404, "type": "identifier", "text": "_ARC_V2_MPU_RDB0", "parent": 403, "children": [], "start_point": {"row": 169, "column": 38}, "end_point": {"row": 169, "column": 54}}, {"id": 405, "type": "+", "text": "+", "parent": 403, "children": [], "start_point": {"row": 169, "column": 55}, "end_point": {"row": 169, "column": 56}}, {"id": 406, "type": "identifier", "text": "index", "parent": 403, "children": [], "start_point": {"row": 169, "column": 57}, "end_point": {"row": 169, "column": 62}}, {"id": 407, "type": "parenthesized_expression", "text": "(~AUX_MPU_RDB_VALID_MASK)", "parent": 399, "children": [408], "start_point": {"row": 169, "column": 66}, "end_point": {"row": 169, "column": 91}}, {"id": 408, "type": "unary_expression", "text": "~AUX_MPU_RDB_VALID_MASK", "parent": 407, "children": [409, 410], "start_point": {"row": 169, "column": 67}, "end_point": {"row": 169, "column": 90}}, {"id": 409, "type": "~", "text": "~", "parent": 408, "children": [], "start_point": {"row": 169, "column": 67}, "end_point": {"row": 169, "column": 68}}, {"id": 410, "type": "identifier", "text": "AUX_MPU_RDB_VALID_MASK", "parent": 408, "children": [], "start_point": {"row": 169, "column": 68}, "end_point": {"row": 169, "column": 90}}, {"id": 411, "type": "assignment_expression", "text": "r_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK", "parent": 345, "children": [412, 413, 414], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 170, "column": 88}}, {"id": 412, "type": "identifier", "text": "r_size_lshift", "parent": 411, "children": [], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 170, "column": 14}}, {"id": 413, "type": "=", "text": "=", "parent": 411, "children": [], "start_point": {"row": 170, "column": 15}, "end_point": {"row": 170, "column": 16}}, {"id": 414, "type": "binary_expression", "text": "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK", "parent": 411, "children": [415, 422], "start_point": {"row": 170, "column": 17}, "end_point": {"row": 170, "column": 88}}, {"id": 415, "type": "call_expression", "text": "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index)", "parent": 414, "children": [416, 417], "start_point": {"row": 170, "column": 17}, "end_point": {"row": 170, "column": 64}}, {"id": 416, "type": "identifier", "text": "z_arc_v2_aux_reg_read", "parent": 415, "children": [], "start_point": {"row": 170, "column": 17}, "end_point": {"row": 170, "column": 38}}, {"id": 417, "type": "argument_list", "text": "(_ARC_V2_MPU_RDP0 + index)", "parent": 415, "children": [418], "start_point": {"row": 170, "column": 38}, "end_point": {"row": 170, "column": 64}}, {"id": 418, "type": "binary_expression", "text": "_ARC_V2_MPU_RDP0 + index", "parent": 417, "children": [419, 420, 421], "start_point": {"row": 170, "column": 39}, "end_point": {"row": 170, "column": 63}}, {"id": 419, "type": "identifier", "text": "_ARC_V2_MPU_RDP0", "parent": 418, "children": [], "start_point": {"row": 170, "column": 39}, "end_point": {"row": 170, "column": 55}}, {"id": 420, "type": "+", "text": "+", "parent": 418, "children": [], "start_point": {"row": 170, "column": 56}, "end_point": {"row": 170, "column": 57}}, {"id": 421, "type": "identifier", "text": "index", "parent": 418, "children": [], "start_point": {"row": 170, "column": 58}, "end_point": {"row": 170, "column": 63}}, {"id": 422, "type": "identifier", "text": "AUX_MPU_RDP_SIZE_MASK", "parent": 414, "children": [], "start_point": {"row": 170, "column": 67}, "end_point": {"row": 170, "column": 88}}, {"id": 423, "type": "assignment_expression", "text": "r_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift)", "parent": 345, "children": [424, 425, 426], "start_point": {"row": 171, "column": 1}, "end_point": {"row": 171, "column": 54}}, {"id": 424, "type": "identifier", "text": "r_size_lshift", "parent": 423, "children": [], "start_point": {"row": 171, "column": 1}, "end_point": {"row": 171, "column": 14}}, {"id": 425, "type": "=", "text": "=", "parent": 423, "children": [], "start_point": {"row": 171, "column": 15}, "end_point": {"row": 171, "column": 16}}, {"id": 426, "type": "call_expression", "text": "AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift)", "parent": 423, "children": [427, 428], "start_point": {"row": 171, "column": 17}, "end_point": {"row": 171, "column": 54}}, {"id": 427, "type": "identifier", "text": "AUX_MPU_RDP_SIZE_SHIFT", "parent": 426, "children": [], "start_point": {"row": 171, "column": 17}, "end_point": {"row": 171, "column": 39}}, {"id": 428, "type": "argument_list", "text": "(r_size_lshift)", "parent": 426, "children": [429], "start_point": {"row": 171, "column": 39}, "end_point": {"row": 171, "column": 54}}, {"id": 429, "type": "identifier", "text": "r_size_lshift", "parent": 428, "children": [], "start_point": {"row": 171, "column": 40}, "end_point": {"row": 171, "column": 53}}, {"id": 430, "type": "assignment_expression", "text": "r_addr_end = r_addr_start + (1 << (r_size_lshift + 1))", "parent": 345, "children": [431, 432, 433], "start_point": {"row": 172, "column": 1}, "end_point": {"row": 172, "column": 56}}, {"id": 431, "type": "identifier", "text": "r_addr_end", "parent": 430, "children": [], "start_point": {"row": 172, "column": 1}, "end_point": {"row": 172, "column": 11}}, {"id": 432, "type": "=", "text": "=", "parent": 430, "children": [], "start_point": {"row": 172, "column": 12}, "end_point": {"row": 172, "column": 13}}, {"id": 433, "type": "binary_expression", "text": "r_addr_start + (1 << (r_size_lshift + 1))", "parent": 430, "children": [434, 435, 436], "start_point": {"row": 172, "column": 14}, "end_point": {"row": 172, "column": 56}}, {"id": 434, "type": "identifier", "text": "r_addr_start", "parent": 433, "children": [], "start_point": {"row": 172, "column": 14}, "end_point": {"row": 172, "column": 26}}, {"id": 435, "type": "+", "text": "+", "parent": 433, "children": [], "start_point": {"row": 172, "column": 28}, "end_point": {"row": 172, "column": 29}}, {"id": 436, "type": "parenthesized_expression", "text": "(1 << (r_size_lshift + 1))", "parent": 433, "children": [437], "start_point": {"row": 172, "column": 30}, "end_point": {"row": 172, "column": 56}}, {"id": 437, "type": "binary_expression", "text": "1 << (r_size_lshift + 1)", "parent": 436, "children": [438, 439, 440], "start_point": {"row": 172, "column": 31}, "end_point": {"row": 172, "column": 55}}, {"id": 438, "type": "number_literal", "text": "1", "parent": 437, "children": [], "start_point": {"row": 172, "column": 31}, "end_point": {"row": 172, "column": 32}}, {"id": 439, "type": "<<", "text": "<<", "parent": 437, "children": [], "start_point": {"row": 172, "column": 33}, "end_point": {"row": 172, "column": 35}}, {"id": 440, "type": "parenthesized_expression", "text": "(r_size_lshift + 1)", "parent": 437, "children": [441], "start_point": {"row": 172, "column": 36}, "end_point": {"row": 172, "column": 55}}, {"id": 441, "type": "binary_expression", "text": "r_size_lshift + 1", "parent": 440, "children": [442, 443, 444], "start_point": {"row": 172, "column": 37}, "end_point": {"row": 172, "column": 54}}, {"id": 442, "type": "identifier", "text": "r_size_lshift", "parent": 441, "children": [], "start_point": {"row": 172, "column": 37}, "end_point": {"row": 172, "column": 50}}, {"id": 443, "type": "+", "text": "+", "parent": 441, "children": [], "start_point": {"row": 172, "column": 51}, "end_point": {"row": 172, "column": 52}}, {"id": 444, "type": "number_literal", "text": "1", "parent": 441, "children": [], "start_point": {"row": 172, "column": 53}, "end_point": {"row": 172, "column": 54}}, {"id": 445, "type": "if_statement", "text": "if (start >= r_addr_start && (start + size) <= r_addr_end) {\n\t\treturn true;\n\t}", "parent": 345, "children": [446], "start_point": {"row": 174, "column": 1}, "end_point": {"row": 176, "column": 2}}, {"id": 446, "type": "parenthesized_expression", "text": "(start >= r_addr_start && (start + size) <= r_addr_end)", "parent": 445, "children": [447], "start_point": {"row": 174, "column": 4}, "end_point": {"row": 174, "column": 59}}, {"id": 447, "type": "binary_expression", "text": "start >= r_addr_start && (start + size) <= r_addr_end", "parent": 446, "children": [448, 452, 453], "start_point": {"row": 174, "column": 5}, "end_point": {"row": 174, "column": 58}}, {"id": 448, "type": "binary_expression", "text": "start >= r_addr_start", "parent": 447, "children": [449, 450, 451], "start_point": {"row": 174, "column": 5}, "end_point": {"row": 174, "column": 26}}, {"id": 449, "type": "identifier", "text": "start", "parent": 448, "children": [], "start_point": {"row": 174, "column": 5}, "end_point": {"row": 174, "column": 10}}, {"id": 450, "type": ">=", "text": ">=", "parent": 448, "children": [], "start_point": {"row": 174, "column": 11}, "end_point": {"row": 174, "column": 13}}, {"id": 451, "type": "identifier", "text": "r_addr_start", "parent": 448, "children": [], "start_point": {"row": 174, "column": 14}, "end_point": {"row": 174, "column": 26}}, {"id": 452, "type": "&&", "text": "&&", "parent": 447, "children": [], "start_point": {"row": 174, "column": 27}, "end_point": {"row": 174, "column": 29}}, {"id": 453, "type": "binary_expression", "text": "(start + size) <= r_addr_end", "parent": 447, "children": [454, 459, 460], "start_point": {"row": 174, "column": 30}, "end_point": {"row": 174, "column": 58}}, {"id": 454, "type": "parenthesized_expression", "text": "(start + size)", "parent": 453, "children": [455], "start_point": {"row": 174, "column": 30}, "end_point": {"row": 174, "column": 44}}, {"id": 455, "type": "binary_expression", "text": "start + size", "parent": 454, "children": [456, 457, 458], "start_point": {"row": 174, "column": 31}, "end_point": {"row": 174, "column": 43}}, {"id": 456, "type": "identifier", "text": "start", "parent": 455, "children": [], "start_point": {"row": 174, "column": 31}, "end_point": {"row": 174, "column": 36}}, {"id": 457, "type": "+", "text": "+", "parent": 455, "children": [], "start_point": {"row": 174, "column": 37}, "end_point": {"row": 174, "column": 38}}, {"id": 458, "type": "identifier", "text": "size", "parent": 455, "children": [], "start_point": {"row": 174, "column": 39}, "end_point": {"row": 174, "column": 43}}, {"id": 459, "type": "<=", "text": "<=", "parent": 453, "children": [], "start_point": {"row": 174, "column": 45}, "end_point": {"row": 174, "column": 47}}, {"id": 460, "type": "identifier", "text": "r_addr_end", "parent": 453, "children": [], "start_point": {"row": 174, "column": 48}, "end_point": {"row": 174, "column": 58}}, {"id": 461, "type": "return_statement", "text": "return true;", "parent": 445, "children": [462], "start_point": {"row": 175, "column": 2}, "end_point": {"row": 175, "column": 14}}, {"id": 462, "type": "true", "text": "true", "parent": 461, "children": [], "start_point": {"row": 175, "column": 9}, "end_point": {"row": 175, "column": 13}}, {"id": 463, "type": "return_statement", "text": "return false;", "parent": 345, "children": [464], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 14}}, {"id": 464, "type": "false", "text": "false", "parent": 463, "children": [], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 13}}, {"id": 465, "type": "function_definition", "text": "static inline bool _is_user_accessible_region(uint32_t r_index, int write)\n{\n\tuint32_t r_ap;\n\tuint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n\tuint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\t_bank_select(bank);\n\tr_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index);\n\n\tr_ap &= AUX_MPU_RDP_ATTR_MASK;\n\n\tif (write) {\n\t\treturn ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n\t\t\t(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));\n\t}\n\n\treturn ((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n\t\t(AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR));\n}", "parent": 0, "children": [466, 468, 469], "start_point": {"row": 184, "column": 0}, "end_point": {"row": 202, "column": 1}}, {"id": 466, "type": "storage_class_specifier", "text": "inline", "parent": 465, "children": [467], "start_point": {"row": 184, "column": 7}, "end_point": {"row": 184, "column": 13}}, {"id": 467, "type": "inline", "text": "inline", "parent": 466, "children": [], "start_point": {"row": 184, "column": 7}, "end_point": {"row": 184, "column": 13}}, {"id": 468, "type": "primitive_type", "text": "bool", "parent": 465, "children": [], "start_point": {"row": 184, "column": 14}, "end_point": {"row": 184, "column": 18}}, {"id": 469, "type": "function_declarator", "text": "_is_user_accessible_region(uint32_t r_index, int write)", "parent": 465, "children": [470, 471], "start_point": {"row": 184, "column": 19}, "end_point": {"row": 184, "column": 74}}, {"id": 470, "type": "identifier", "text": "_is_user_accessible_region", "parent": 469, "children": [], "start_point": {"row": 184, "column": 19}, "end_point": {"row": 184, "column": 45}}, {"id": 471, "type": "parameter_list", "text": "(uint32_t r_index, int write)", "parent": 469, "children": [472, 475], "start_point": {"row": 184, "column": 45}, "end_point": {"row": 184, "column": 74}}, {"id": 472, "type": "parameter_declaration", "text": "uint32_t r_index", "parent": 471, "children": [473, 474], "start_point": {"row": 184, "column": 46}, "end_point": {"row": 184, "column": 62}}, {"id": 473, "type": "primitive_type", "text": "uint32_t", "parent": 472, "children": [], "start_point": {"row": 184, "column": 46}, "end_point": {"row": 184, "column": 54}}, {"id": 474, "type": "identifier", "text": "r_index", "parent": 472, "children": [], "start_point": {"row": 184, "column": 55}, "end_point": {"row": 184, "column": 62}}, {"id": 475, "type": "parameter_declaration", "text": "int write", "parent": 471, "children": [476, 477], "start_point": {"row": 184, "column": 64}, "end_point": {"row": 184, "column": 73}}, {"id": 476, "type": "primitive_type", "text": "int", "parent": 475, "children": [], "start_point": {"row": 184, "column": 64}, "end_point": {"row": 184, "column": 67}}, {"id": 477, "type": "identifier", "text": "write", "parent": 475, "children": [], "start_point": {"row": 184, "column": 68}, "end_point": {"row": 184, "column": 73}}, {"id": 478, "type": "declaration", "text": "uint32_t r_ap;", "parent": 465, "children": [479, 480], "start_point": {"row": 186, "column": 1}, "end_point": {"row": 186, "column": 15}}, {"id": 479, "type": "primitive_type", "text": "uint32_t", "parent": 478, "children": [], "start_point": {"row": 186, "column": 1}, "end_point": {"row": 186, "column": 9}}, {"id": 480, "type": "identifier", "text": "r_ap", "parent": 478, "children": [], "start_point": {"row": 186, "column": 10}, "end_point": {"row": 186, "column": 14}}, {"id": 481, "type": "declaration", "text": "uint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;", "parent": 465, "children": [482, 483], "start_point": {"row": 187, "column": 1}, "end_point": {"row": 187, "column": 53}}, {"id": 482, "type": "primitive_type", "text": "uint32_t", "parent": 481, "children": [], "start_point": {"row": 187, "column": 1}, "end_point": {"row": 187, "column": 9}}, {"id": 483, "type": "init_declarator", "text": "bank = r_index / ARC_FEATURE_MPU_BANK_SIZE", "parent": 481, "children": [484, 485, 486], "start_point": {"row": 187, "column": 10}, "end_point": {"row": 187, "column": 52}}, {"id": 484, "type": "identifier", "text": "bank", "parent": 483, "children": [], "start_point": {"row": 187, "column": 10}, "end_point": {"row": 187, "column": 14}}, {"id": 485, "type": "=", "text": "=", "parent": 483, "children": [], "start_point": {"row": 187, "column": 15}, "end_point": {"row": 187, "column": 16}}, {"id": 486, "type": "binary_expression", "text": "r_index / ARC_FEATURE_MPU_BANK_SIZE", "parent": 483, "children": [487, 488, 489], "start_point": {"row": 187, "column": 17}, "end_point": {"row": 187, "column": 52}}, {"id": 487, "type": "identifier", "text": "r_index", "parent": 486, "children": [], "start_point": {"row": 187, "column": 17}, "end_point": {"row": 187, "column": 24}}, {"id": 488, "type": "/", "text": "/", "parent": 486, "children": [], "start_point": {"row": 187, "column": 25}, "end_point": {"row": 187, "column": 26}}, {"id": 489, "type": "identifier", "text": "ARC_FEATURE_MPU_BANK_SIZE", "parent": 486, "children": [], "start_point": {"row": 187, "column": 27}, "end_point": {"row": 187, "column": 52}}, {"id": 490, "type": "declaration", "text": "uint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;", "parent": 465, "children": [491, 492], "start_point": {"row": 188, "column": 1}, "end_point": {"row": 188, "column": 61}}, {"id": 491, "type": "primitive_type", "text": "uint32_t", "parent": 490, "children": [], "start_point": {"row": 188, "column": 1}, "end_point": {"row": 188, "column": 9}}, {"id": 492, "type": "init_declarator", "text": "index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U", "parent": 490, "children": [493, 494, 495], "start_point": {"row": 188, "column": 10}, "end_point": {"row": 188, "column": 60}}, {"id": 493, "type": "identifier", "text": "index", "parent": 492, "children": [], "start_point": {"row": 188, "column": 10}, "end_point": {"row": 188, "column": 15}}, {"id": 494, "type": "=", "text": "=", "parent": 492, "children": [], "start_point": {"row": 188, "column": 16}, "end_point": {"row": 188, "column": 17}}, {"id": 495, "type": "binary_expression", "text": "(r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U", "parent": 492, "children": [496, 501, 502], "start_point": {"row": 188, "column": 18}, "end_point": {"row": 188, "column": 60}}, {"id": 496, "type": "parenthesized_expression", "text": "(r_index % ARC_FEATURE_MPU_BANK_SIZE)", "parent": 495, "children": [497], "start_point": {"row": 188, "column": 18}, "end_point": {"row": 188, "column": 55}}, {"id": 497, "type": "binary_expression", "text": "r_index % ARC_FEATURE_MPU_BANK_SIZE", "parent": 496, "children": [498, 499, 500], "start_point": {"row": 188, "column": 19}, "end_point": {"row": 188, "column": 54}}, {"id": 498, "type": "identifier", "text": "r_index", "parent": 497, "children": [], "start_point": {"row": 188, "column": 19}, "end_point": {"row": 188, "column": 26}}, {"id": 499, "type": "%", "text": "%", "parent": 497, "children": [], "start_point": {"row": 188, "column": 27}, "end_point": {"row": 188, "column": 28}}, {"id": 500, "type": "identifier", "text": "ARC_FEATURE_MPU_BANK_SIZE", "parent": 497, "children": [], "start_point": {"row": 188, "column": 29}, "end_point": {"row": 188, "column": 54}}, {"id": 501, "type": "*", "text": "*", "parent": 495, "children": [], "start_point": {"row": 188, "column": 56}, "end_point": {"row": 188, "column": 57}}, {"id": 502, "type": "number_literal", "text": "2U", "parent": 495, "children": [], "start_point": {"row": 188, "column": 58}, "end_point": {"row": 188, "column": 60}}, {"id": 503, "type": "call_expression", "text": "_bank_select(bank)", "parent": 465, "children": [504, 505], "start_point": {"row": 190, "column": 1}, "end_point": {"row": 190, "column": 19}}, {"id": 504, "type": "identifier", "text": "_bank_select", "parent": 503, "children": [], "start_point": {"row": 190, "column": 1}, "end_point": {"row": 190, "column": 13}}, {"id": 505, "type": "argument_list", "text": "(bank)", "parent": 503, "children": [506], "start_point": {"row": 190, "column": 13}, "end_point": {"row": 190, "column": 19}}, {"id": 506, "type": "identifier", "text": "bank", "parent": 505, "children": [], "start_point": {"row": 190, "column": 14}, "end_point": {"row": 190, "column": 18}}, {"id": 507, "type": "assignment_expression", "text": "r_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index)", "parent": 465, "children": [508, 509, 510], "start_point": {"row": 191, "column": 1}, "end_point": {"row": 191, "column": 55}}, {"id": 508, "type": "identifier", "text": "r_ap", "parent": 507, "children": [], "start_point": {"row": 191, "column": 1}, "end_point": {"row": 191, "column": 5}}, {"id": 509, "type": "=", "text": "=", "parent": 507, "children": [], "start_point": {"row": 191, "column": 6}, "end_point": {"row": 191, "column": 7}}, {"id": 510, "type": "call_expression", "text": "z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index)", "parent": 507, "children": [511, 512], "start_point": {"row": 191, "column": 8}, "end_point": {"row": 191, "column": 55}}, {"id": 511, "type": "identifier", "text": "z_arc_v2_aux_reg_read", "parent": 510, "children": [], "start_point": {"row": 191, "column": 8}, "end_point": {"row": 191, "column": 29}}, {"id": 512, "type": "argument_list", "text": "(_ARC_V2_MPU_RDP0 + index)", "parent": 510, "children": [513], "start_point": {"row": 191, "column": 29}, "end_point": {"row": 191, "column": 55}}, {"id": 513, "type": "binary_expression", "text": "_ARC_V2_MPU_RDP0 + index", "parent": 512, "children": [514, 515, 516], "start_point": {"row": 191, "column": 30}, "end_point": {"row": 191, "column": 54}}, {"id": 514, "type": "identifier", "text": "_ARC_V2_MPU_RDP0", "parent": 513, "children": [], "start_point": {"row": 191, "column": 30}, "end_point": {"row": 191, "column": 46}}, {"id": 515, "type": "+", "text": "+", "parent": 513, "children": [], "start_point": {"row": 191, "column": 47}, "end_point": {"row": 191, "column": 48}}, {"id": 516, "type": "identifier", "text": "index", "parent": 513, "children": [], "start_point": {"row": 191, "column": 49}, "end_point": {"row": 191, "column": 54}}, {"id": 517, "type": "assignment_expression", "text": "r_ap &= AUX_MPU_RDP_ATTR_MASK", "parent": 465, "children": [518, 519, 520], "start_point": {"row": 193, "column": 1}, "end_point": {"row": 193, "column": 30}}, {"id": 518, "type": "identifier", "text": "r_ap", "parent": 517, "children": [], "start_point": {"row": 193, "column": 1}, "end_point": {"row": 193, "column": 5}}, {"id": 519, "type": "&=", "text": "&=", "parent": 517, "children": [], "start_point": {"row": 193, "column": 6}, "end_point": {"row": 193, "column": 8}}, {"id": 520, "type": "identifier", "text": "AUX_MPU_RDP_ATTR_MASK", "parent": 517, "children": [], "start_point": {"row": 193, "column": 9}, "end_point": {"row": 193, "column": 30}}, {"id": 521, "type": "if_statement", "text": "if (write) {\n\t\treturn ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n\t\t\t(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));\n\t}", "parent": 465, "children": [522], "start_point": {"row": 195, "column": 1}, "end_point": {"row": 198, "column": 2}}, {"id": 522, "type": "parenthesized_expression", "text": "(write)", "parent": 521, "children": [523], "start_point": {"row": 195, "column": 4}, "end_point": {"row": 195, "column": 11}}, {"id": 523, "type": "identifier", "text": "write", "parent": 522, "children": [], "start_point": {"row": 195, "column": 5}, "end_point": {"row": 195, "column": 10}}, {"id": 524, "type": "return_statement", "text": "return ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n\t\t\t(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));", "parent": 521, "children": [525], "start_point": {"row": 196, "column": 2}, "end_point": {"row": 197, "column": 40}}, {"id": 525, "type": "parenthesized_expression", "text": "((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n\t\t\t(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW))", "parent": 524, "children": [526], "start_point": {"row": 196, "column": 9}, "end_point": {"row": 197, "column": 39}}, {"id": 526, "type": "binary_expression", "text": "(r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n\t\t\t(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)", "parent": 525, "children": [527, 534, 535], "start_point": {"row": 196, "column": 10}, "end_point": {"row": 197, "column": 38}}, {"id": 527, "type": "parenthesized_expression", "text": "(r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW))", "parent": 526, "children": [528], "start_point": {"row": 196, "column": 10}, "end_point": {"row": 196, "column": 54}}, {"id": 528, "type": "binary_expression", "text": "r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)", "parent": 527, "children": [529, 530], "start_point": {"row": 196, "column": 11}, "end_point": {"row": 196, "column": 53}}, {"id": 529, "type": "identifier", "text": "r_ap", "parent": 528, "children": [], "start_point": {"row": 196, "column": 11}, "end_point": {"row": 196, "column": 15}}, {"id": 530, "type": "parenthesized_expression", "text": "(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)", "parent": 528, "children": [531], "start_point": {"row": 196, "column": 18}, "end_point": {"row": 196, "column": 53}}, {"id": 531, "type": "binary_expression", "text": "AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW", "parent": 530, "children": [532, 533], "start_point": {"row": 196, "column": 19}, "end_point": {"row": 196, "column": 52}}, {"id": 532, "type": "identifier", "text": "AUX_MPU_ATTR_UW", "parent": 531, "children": [], "start_point": {"row": 196, "column": 19}, "end_point": {"row": 196, "column": 34}}, {"id": 533, "type": "identifier", "text": "AUX_MPU_ATTR_KW", "parent": 531, "children": [], "start_point": {"row": 196, "column": 37}, "end_point": {"row": 196, "column": 52}}, {"id": 534, "type": "==", "text": "==", "parent": 526, "children": [], "start_point": {"row": 196, "column": 55}, "end_point": {"row": 196, "column": 57}}, {"id": 535, "type": "parenthesized_expression", "text": "(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)", "parent": 526, "children": [536], "start_point": {"row": 197, "column": 3}, "end_point": {"row": 197, "column": 38}}, {"id": 536, "type": "binary_expression", "text": "AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW", "parent": 535, "children": [537, 538], "start_point": {"row": 197, "column": 4}, "end_point": {"row": 197, "column": 37}}, {"id": 537, "type": "identifier", "text": "AUX_MPU_ATTR_UW", "parent": 536, "children": [], "start_point": {"row": 197, "column": 4}, "end_point": {"row": 197, "column": 19}}, {"id": 538, "type": "identifier", "text": "AUX_MPU_ATTR_KW", "parent": 536, "children": [], "start_point": {"row": 197, "column": 22}, "end_point": {"row": 197, "column": 37}}, {"id": 539, "type": "return_statement", "text": "return ((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n\t\t(AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR));", "parent": 465, "children": [540], "start_point": {"row": 200, "column": 1}, "end_point": {"row": 201, "column": 39}}, {"id": 540, "type": "parenthesized_expression", "text": "((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n\t\t(AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR))", "parent": 539, "children": [541], "start_point": {"row": 200, "column": 8}, "end_point": {"row": 201, "column": 38}}, {"id": 541, "type": "binary_expression", "text": "(r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n\t\t(AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)", "parent": 540, "children": [542, 549, 550], "start_point": {"row": 200, "column": 9}, "end_point": {"row": 201, "column": 37}}, {"id": 542, "type": "parenthesized_expression", "text": "(r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR))", "parent": 541, "children": [543], "start_point": {"row": 200, "column": 9}, "end_point": {"row": 200, "column": 53}}, {"id": 543, "type": "binary_expression", "text": "r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)", "parent": 542, "children": [544, 545], "start_point": {"row": 200, "column": 10}, "end_point": {"row": 200, "column": 52}}, {"id": 544, "type": "identifier", "text": "r_ap", "parent": 543, "children": [], "start_point": {"row": 200, "column": 10}, "end_point": {"row": 200, "column": 14}}, {"id": 545, "type": "parenthesized_expression", "text": "(AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)", "parent": 543, "children": [546], "start_point": {"row": 200, "column": 17}, "end_point": {"row": 200, "column": 52}}, {"id": 546, "type": "binary_expression", "text": "AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR", "parent": 545, "children": [547, 548], "start_point": {"row": 200, "column": 18}, "end_point": {"row": 200, "column": 51}}, {"id": 547, "type": "identifier", "text": "AUX_MPU_ATTR_UR", "parent": 546, "children": [], "start_point": {"row": 200, "column": 18}, "end_point": {"row": 200, "column": 33}}, {"id": 548, "type": "identifier", "text": "AUX_MPU_ATTR_KR", "parent": 546, "children": [], "start_point": {"row": 200, "column": 36}, "end_point": {"row": 200, "column": 51}}, {"id": 549, "type": "==", "text": "==", "parent": 541, "children": [], "start_point": {"row": 200, "column": 54}, "end_point": {"row": 200, "column": 56}}, {"id": 550, "type": "parenthesized_expression", "text": "(AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)", "parent": 541, "children": [551], "start_point": {"row": 201, "column": 2}, "end_point": {"row": 201, "column": 37}}, {"id": 551, "type": "binary_expression", "text": "AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR", "parent": 550, "children": [552, 553], "start_point": {"row": 201, "column": 3}, "end_point": {"row": 201, "column": 36}}, {"id": 552, "type": "identifier", "text": "AUX_MPU_ATTR_UR", "parent": 551, "children": [], "start_point": {"row": 201, "column": 3}, "end_point": {"row": 201, "column": 18}}, {"id": 553, "type": "identifier", "text": "AUX_MPU_ATTR_KR", "parent": 551, "children": [], "start_point": {"row": 201, "column": 21}, "end_point": {"row": 201, "column": 36}}, {"id": 554, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 204, "column": 0}, "end_point": {"row": 204, "column": 6}}]}, "node_categories": {"declarations": {"functions": [26, 32, 70, 74, 102, 106, 230, 234, 294, 298, 345, 349, 465, 469], "variables": [77, 80, 109, 112, 115, 118, 121, 147, 237, 301, 304, 313, 352, 355, 358, 361, 364, 367, 370, 379, 472, 475, 478, 481, 490], "classes": [71, 103, 231, 295, 346, 466], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [86, 87, 91, 92, 95, 99, 126, 133, 134, 135, 142, 143, 152, 153, 160, 161, 170, 171, 172, 178, 184, 186, 187, 188, 195, 196, 210, 214, 217, 222, 225, 242, 248, 249, 250, 254, 269, 270, 271, 272, 276, 285, 291, 309, 318, 319, 320, 326, 331, 332, 333, 334, 335, 338, 375, 384, 385, 386, 392, 399, 400, 403, 407, 408, 414, 415, 418, 426, 433, 436, 437, 440, 441, 446, 447, 448, 453, 454, 455, 486, 495, 496, 497, 503, 510, 513, 522, 525, 526, 527, 528, 530, 531, 535, 536, 540, 541, 542, 543, 545, 546, 550, 551], "assignments": [83, 130, 165, 181, 192, 201, 206, 396, 411, 423, 430, 507, 517], "loops": [], "conditionals": [0, 1, 2, 5, 8, 12, 16, 20, 24, 28, 30, 34, 36, 40, 44, 48, 52, 56, 60, 64, 68, 75, 79, 82, 84, 88, 90, 94, 96, 98, 100, 101, 107, 111, 114, 117, 120, 124, 127, 129, 131, 136, 138, 141, 144, 150, 154, 156, 159, 162, 164, 166, 168, 169, 173, 175, 177, 179, 182, 189, 190, 191, 193, 197, 199, 200, 202, 204, 207, 211, 213, 215, 218, 220, 221, 223, 226, 228, 229, 235, 239, 240, 241, 243, 244, 245, 246, 251, 255, 256, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 273, 277, 278, 280, 283, 286, 293, 299, 303, 307, 310, 312, 316, 321, 323, 327, 329, 336, 339, 341, 342, 344, 350, 354, 357, 360, 363, 366, 369, 373, 376, 378, 382, 387, 389, 393, 395, 397, 401, 404, 406, 410, 412, 416, 419, 421, 422, 424, 427, 429, 431, 434, 442, 445, 449, 451, 456, 458, 460, 470, 474, 477, 480, 484, 487, 489, 493, 498, 500, 504, 506, 508, 511, 514, 516, 518, 520, 521, 523, 529, 532, 533, 537, 538, 544, 547, 548, 552, 553, 554], "returns": [247, 268, 290, 330, 461, 463, 524, 539], "exceptions": []}, "expressions": {"calls": [], "literals": [140, 146, 158, 209, 282, 288, 289, 325, 391, 438, 444, 502], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "#define AUX_MPU_RDP_REGION_SIZE(size) (((size - 1) & BIT_MASK(2)) | \\\n\t\t\t\t\t(((size - 1) & (BIT_MASK"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "#define AUX_MPU_RDP_SIZE_SHIFT(rdp) ((rdp & BIT_MASK(2)) | (((rdp >> 9) & BIT_MASK(3)) << 2))\n"}, {"node_id": 70, "universal_type": "function", "name": "_bank_select", "text_snippet": "static inline void _bank_select(uint32_t bank)\n{\n\tuint32_t val;\n\n\tval = z_arc_v2_aux_reg_read(_ARC_V"}, {"node_id": 74, "universal_type": "function", "name": "unknown", "text_snippet": "_bank_select(uint32_t bank)"}, {"node_id": 102, "universal_type": "function", "name": "_region_init", "text_snippet": "static inline void _region_init(uint32_t index, uint32_t region_addr,\n\t\t\t\tuint32_t size, uint32_t re"}, {"node_id": 106, "universal_type": "function", "name": "unknown", "text_snippet": "_region_init(uint32_t index, uint32_t region_addr,\n\t\t\t\tuint32_t size, uint32_t region_attr)"}, {"node_id": 230, "universal_type": "function", "name": "get_region_index_by_type", "text_snippet": "static inline int get_region_index_by_type(uint32_t type)\n{\n\t/*\n\t * The new MPU regions are allocate"}, {"node_id": 234, "universal_type": "function", "name": "unknown", "text_snippet": "get_region_index_by_type(uint32_t type)"}, {"node_id": 294, "universal_type": "function", "name": "_is_enabled_region", "text_snippet": "static inline bool _is_enabled_region(uint32_t r_index)\n{\n\tuint32_t bank = r_index / ARC_FEATURE_MPU"}, {"node_id": 298, "universal_type": "function", "name": "unknown", "text_snippet": "_is_enabled_region(uint32_t r_index)"}, {"node_id": 345, "universal_type": "function", "name": "_is_in_region", "text_snippet": "static inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)\n{\n\tuint32_t r_addr"}, {"node_id": 349, "universal_type": "function", "name": "unknown", "text_snippet": "_is_in_region(uint32_t r_index, uint32_t start, uint32_t size)"}, {"node_id": 465, "universal_type": "function", "name": "_is_user_accessible_region", "text_snippet": "static inline bool _is_user_accessible_region(uint32_t r_index, int write)\n{\n\tuint32_t r_ap;\n\tuint32"}, {"node_id": 469, "universal_type": "function", "name": "write)", "text_snippet": "_is_user_accessible_region(uint32_t r_index, int write)"}], "class_declarations": [{"node_id": 71, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 103, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 231, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 295, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 346, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 466, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": []}, "original_source_code": "/*\n * Copyright (c) 2021 Synopsys.\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n#ifndef ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_\n#define ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_\n\n#define AUX_MPU_EN_BANK_MASK BIT(0)\n#define AUX_MPU_EN_IC\t\tBIT(12)\n#define AUX_MPU_EN_DC\t\tBIT(13)\n#define AUX_MPU_EN_ENABLE BIT(30)\n#define AUX_MPU_EN_DISABLE ~BIT(30)\n\n/*\n * The size of the region is a 5-bit field, the three MSB bits are\n * represented in [11:9] and the two LSB bits are represented in [1:0].\n * Together these fields specify the size of the region in bytes:\n * 00000-00011\tReserved\n * 0x4 32\t\t0x5 64\t\t0x6 128\t0x7 256\n * 0x8 512\t\t0x9 1k\t\t0xA 2K\t\t0xB 4K\n * 0xC 8K\t\t0xD 16K\t0xE 32K\t0xF 64K\n * 0x10 128K\t0x11 256K\t0x12 512K\t0x13 1M\n * 0x14 2M\t\t0x15 4M\t\t0x16 8M\t\t0x17 16M\n * 0x18 32M\t\t0x19 64M\t0x1A 128M\t0x1B 256M\n * 0x1C 512M\t0x1D 1G\t\t0x1E 2G\t\t0x1F 4G\n *\n * Bit ... 12 11 10 9 8 3 2 1 0\n * ------+------------+------+---+-----------+\n * ... | SIZE[11:9] | ATTR | R | SIZE[1:0] |\n * ------+------------+------+---+-----------+\n */\n/* arrange size into proper bit field in RDP aux reg*/\n#define AUX_MPU_RDP_REGION_SIZE(size) (((size - 1) & BIT_MASK(2)) | \\\n\t\t\t\t\t(((size - 1) & (BIT_MASK(3) << 2)) << 7))\n/* recover size from bit fields in RDP aux reg*/\n#define AUX_MPU_RDP_SIZE_SHIFT(rdp) ((rdp & BIT_MASK(2)) | (((rdp >> 9) & BIT_MASK(3)) << 2))\n\n#define AUX_MPU_RDB_VALID_MASK BIT(0)\n#define AUX_MPU_RDP_ATTR_MASK (BIT_MASK(6) << 3)\n#define AUX_MPU_RDP_SIZE_MASK ((BIT_MASK(3) << 9) | BIT_MASK(2))\n/* Global code cacheability that applies to a region\n * 0x0: (Default) Code is cacheable in all levels of the cache hierarchy\n * 0x1: Code is not cacheable in any level of the cache hierarchy\n */\n#define AUX_MPU_RDB_IC\t\tBIT(12)\n/* Global data cacheability that applies to a region\n * 0x0: (Default) Data is cacheable in all levels of the cache hierarchy\n * 0x1: Data is not cacheable in any level of the cache hierarchy\n */\n#define AUX_MPU_RDB_DC\t\tBIT(13)\n/* Define a MPU region as non-volatile\n * 0x0: (Default) The memory space for this MPU region is treated as a volatile uncached space.\n * 0x1: The memory space for this MPU region is non-volatile\n */\n#define AUX_MPU_RDB_NV\t\tBIT(14)\n\n/* For MPU version 6, the minimum protection region size is 32 bytes */\n#define ARC_FEATURE_MPU_ALIGNMENT_BITS 5\n#define ARC_FEATURE_MPU_BANK_SIZE 16\n\n/**\n * This internal function select a MPU bank\n */\nstatic inline void _bank_select(uint32_t bank)\n{\n\tuint32_t val;\n\n\tval = z_arc_v2_aux_reg_read(_ARC_V2_MPU_EN) & (~AUX_MPU_EN_BANK_MASK);\n\tz_arc_v2_aux_reg_write(_ARC_V2_MPU_EN, val | bank);\n}\n/**\n * This internal function initializes a MPU region\n */\nstatic inline void _region_init(uint32_t index, uint32_t region_addr,\n\t\t\t\tuint32_t size, uint32_t region_attr)\n{\n\tuint32_t bank = index / ARC_FEATURE_MPU_BANK_SIZE;\n\n\tindex = (index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\tif (size > 0) {\n\t\tuint8_t bits = find_msb_set(size) - 1;\n\n\t\tif (bits < ARC_FEATURE_MPU_ALIGNMENT_BITS) {\n\t\t\tbits = ARC_FEATURE_MPU_ALIGNMENT_BITS;\n\t\t}\n\n\t\tif (BIT(bits) < size) {\n\t\t\tbits++;\n\t\t}\n\n\t\t/* Clear size bits and IC, DC bits, and set NV bit\n\t\t * The default value of NV bit is 0 which means the region is volatile and uncached.\n\t\t * Setting the NV bit here has no effect on mpu v6 but is for the\n\t\t * forward compatibility to mpu v7. Currently we do not allow to toggle these bits\n\t\t * until we implement the control of these region properties\n\t\t * TODO: support uncacheable regions and volatile uncached regions\n\t\t */\n\t\tregion_attr &= ~(AUX_MPU_RDP_SIZE_MASK | AUX_MPU_RDB_IC | AUX_MPU_RDB_DC);\n\t\tregion_attr |= AUX_MPU_RDP_REGION_SIZE(bits) | AUX_MPU_RDB_NV;\n\t\tregion_addr |= AUX_MPU_RDB_VALID_MASK;\n\t} else {\n\t\tregion_addr = 0U;\n\t}\n\n\t_bank_select(bank);\n\tz_arc_v2_aux_reg_write(_ARC_V2_MPU_RDP0 + index, region_attr);\n\tz_arc_v2_aux_reg_write(_ARC_V2_MPU_RDB0 + index, region_addr);\n}\n\n/**\n * This internal function is utilized by the MPU driver to parse the intent\n * type (i.e. THREAD_STACK_REGION) and return the correct region index.\n */\nstatic inline int get_region_index_by_type(uint32_t type)\n{\n\t/*\n\t * The new MPU regions are allocated per type after the statically\n\t * configured regions. The type is one-indexed rather than\n\t * zero-indexed.\n\t *\n\t * For ARC MPU v6, the smaller index has higher priority, so the\n\t * index is allocated in reverse order. Static regions start from\n\t * the biggest index, then thread related regions.\n\t *\n\t */\n\tswitch (type) {\n\tcase THREAD_STACK_USER_REGION:\n\t\treturn get_num_regions() - mpu_config.num_regions - THREAD_STACK_REGION;\n\tcase THREAD_STACK_REGION:\n\tcase THREAD_APP_DATA_REGION:\n\tcase THREAD_DOMAIN_PARTITION_REGION:\n\t\t/*\n\t\t * Start domain partition region from stack guard region\n\t\t * since stack guard is not supported.\n\t\t */\n\t\treturn get_num_regions() - mpu_config.num_regions - type + 1;\n\tdefault:\n\t\t__ASSERT(0, \"Unsupported type\");\n\t\treturn -EINVAL;\n\t}\n}\n\n/**\n * This internal function checks if region is enabled or not\n */\nstatic inline bool _is_enabled_region(uint32_t r_index)\n{\n\tuint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n\tuint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\t_bank_select(bank);\n\treturn ((z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index)\n\t\t & AUX_MPU_RDB_VALID_MASK) == AUX_MPU_RDB_VALID_MASK);\n}\n\n/**\n * This internal function check if the given buffer in in the region\n */\nstatic inline bool _is_in_region(uint32_t r_index, uint32_t start, uint32_t size)\n{\n\tuint32_t r_addr_start;\n\tuint32_t r_addr_end;\n\tuint32_t r_size_lshift;\n\tuint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n\tuint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\t_bank_select(bank);\n\tr_addr_start = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDB0 + index) & (~AUX_MPU_RDB_VALID_MASK);\n\tr_size_lshift = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index) & AUX_MPU_RDP_SIZE_MASK;\n\tr_size_lshift = AUX_MPU_RDP_SIZE_SHIFT(r_size_lshift);\n\tr_addr_end = r_addr_start + (1 << (r_size_lshift + 1));\n\n\tif (start >= r_addr_start && (start + size) <= r_addr_end) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n/**\n * This internal function check if the region is user accessible or not\n */\nstatic inline bool _is_user_accessible_region(uint32_t r_index, int write)\n{\n\tuint32_t r_ap;\n\tuint32_t bank = r_index / ARC_FEATURE_MPU_BANK_SIZE;\n\tuint32_t index = (r_index % ARC_FEATURE_MPU_BANK_SIZE) * 2U;\n\n\t_bank_select(bank);\n\tr_ap = z_arc_v2_aux_reg_read(_ARC_V2_MPU_RDP0 + index);\n\n\tr_ap &= AUX_MPU_RDP_ATTR_MASK;\n\n\tif (write) {\n\t\treturn ((r_ap & (AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW)) ==\n\t\t\t(AUX_MPU_ATTR_UW | AUX_MPU_ATTR_KW));\n\t}\n\n\treturn ((r_ap & (AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR)) ==\n\t\t(AUX_MPU_ATTR_UR | AUX_MPU_ATTR_KR));\n}\n\n#endif /* ZEPHYR_ARCH_ARC_CORE_MPU_ARC_MPU_V6_INTERNAL_H_ */\n"}
80,940
c
#include <wx/wx.h> #include "AboutDialog.h" enum WinLine { H_1, H_2, H_3, V_1, V_2, V_3, D_1, D_2 }; class TicTacToe : public wxFrame { public: TicTacToe(const wxString& title); void OnClick(wxCommandEvent& event); void OnNewGame(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); void OnExit(wxCommandEvent& event); void OnCCO(wxCommandEvent& event); void EnableButtons(bool e); void DarkenButtons(bool e); void Reset(); bool IsWinOrDraw(); void UpdatePlayerInfo(); void MakeMove(int move, wxPoint* p); void WinIfCan(); void FillTheFirstBlank(wxString w); int HasToBlock(); void BlockOpponent(); int CanWin(); bool CheckIfWon(); bool CheckIfDraw(); void UpdateScore(); wxMenuBar *menubar; wxMenu *menuGame; wxBoxSizer *sizer; wxGridSizer *gs; wxTextCtrl *player; wxTextCtrl *score; int scoreX, scoreO, scoreTies; wxCheckBox *cCo; wxButton *bNew; wxButton *b00, *b01, *b02, *b10, *b11, *b12, *b20, *b21, *b22; char who; char v[3][3]; int moves; char board[9]; bool ComputerOpponent, hasAnyWon; WinLine wl; }; const int ID_TP = 100; const int ID_TS = 101; const int ID_BNG = 102; const int ID_MNG = 103; const int ID_MAB = 104; const int ID_MEX = 105; const int ID_CCO = 106; const int ID_B00 = 200; const int ID_B01 = 201; const int ID_B02 = 202; const int ID_B10 = 210; const int ID_B11 = 211; const int ID_B12 = 212; const int ID_B20 = 220; const int ID_B21 = 221; const int ID_B22 = 222;
20.81
69
(translation_unit) "#include <wx/wx.h>\n#include "AboutDialog.h"\n\nenum WinLine\n{\n H_1,\n H_2,\n H_3,\n V_1,\n V_2,\n V_3,\n D_1,\n D_2\n};\n\nclass TicTacToe : public wxFrame\n{\npublic:\n TicTacToe(const wxString& title);\n void OnClick(wxCommandEvent& event);\n void OnNewGame(wxCommandEvent& event);\n void OnAbout(wxCommandEvent& event);\n void OnExit(wxCommandEvent& event);\n void OnCCO(wxCommandEvent& event);\n void EnableButtons(bool e);\n void DarkenButtons(bool e);\n void Reset();\n bool IsWinOrDraw();\n void UpdatePlayerInfo();\n void MakeMove(int move, wxPoint* p);\n void WinIfCan();\n void FillTheFirstBlank(wxString w);\n int HasToBlock();\n void BlockOpponent();\n int CanWin();\n bool CheckIfWon();\n bool CheckIfDraw();\n void UpdateScore();\n\n wxMenuBar *menubar;\n wxMenu *menuGame;\n\n wxBoxSizer *sizer;\n wxGridSizer *gs;\n wxTextCtrl *player;\n wxTextCtrl *score;\n int scoreX, scoreO, scoreTies;\n wxCheckBox *cCo;\n wxButton *bNew;\n wxButton *b00, *b01, *b02, *b10, *b11, *b12, *b20, *b21, *b22;\n char who;\n char v[3][3];\n int moves;\n char board[9];\n bool ComputerOpponent, hasAnyWon;\n WinLine wl;\n};\n\nconst int ID_TP = 100;\nconst int ID_TS = 101;\nconst int ID_BNG = 102;\nconst int ID_MNG = 103;\nconst int ID_MAB = 104;\nconst int ID_MEX = 105;\nconst int ID_CCO = 106;\n\nconst int ID_B00 = 200;\nconst int ID_B01 = 201;\nconst int ID_B02 = 202;\nconst int ID_B10 = 210;\nconst int ID_B11 = 211;\nconst int ID_B12 = 212;\nconst int ID_B20 = 220;\nconst int ID_B21 = 221;\nconst int ID_B22 = 222;\n" (preproc_include) "#include <wx/wx.h>\n" (#include) "#include" (system_lib_string) "<wx/wx.h>" (preproc_include) "#include "AboutDialog.h"\n" (#include) "#include" (string_literal) ""AboutDialog.h"" (") """ (string_content) "AboutDialog.h" (") """ (enum_specifier) "enum WinLine\n{\n H_1,\n H_2,\n H_3,\n V_1,\n V_2,\n V_3,\n D_1,\n D_2\n}" (enum) "enum" (type_identifier) "WinLine" (enumerator_list) "{\n H_1,\n H_2,\n H_3,\n V_1,\n V_2,\n V_3,\n D_1,\n D_2\n}" ({) "{" (enumerator) "H_1" (identifier) "H_1" (,) "," (enumerator) "H_2" (identifier) "H_2" (,) "," (enumerator) "H_3" (identifier) "H_3" (,) "," (enumerator) "V_1" (identifier) "V_1" (,) "," (enumerator) "V_2" (identifier) "V_2" (,) "," (enumerator) "V_3" (identifier) "V_3" (,) "," (enumerator) "D_1" (identifier) "D_1" (,) "," (enumerator) "D_2" (identifier) "D_2" (}) "}" (;) ";" (function_definition) "class TicTacToe : public wxFrame\n{\npublic:\n TicTacToe(const wxString& title);\n void OnClick(wxCommandEvent& event);\n void OnNewGame(wxCommandEvent& event);\n void OnAbout(wxCommandEvent& event);\n void OnExit(wxCommandEvent& event);\n void OnCCO(wxCommandEvent& event);\n void EnableButtons(bool e);\n void DarkenButtons(bool e);\n void Reset();\n bool IsWinOrDraw();\n void UpdatePlayerInfo();\n void MakeMove(int move, wxPoint* p);\n void WinIfCan();\n void FillTheFirstBlank(wxString w);\n int HasToBlock();\n void BlockOpponent();\n int CanWin();\n bool CheckIfWon();\n bool CheckIfDraw();\n void UpdateScore();\n\n wxMenuBar *menubar;\n wxMenu *menuGame;\n\n wxBoxSizer *sizer;\n wxGridSizer *gs;\n wxTextCtrl *player;\n wxTextCtrl *score;\n int scoreX, scoreO, scoreTies;\n wxCheckBox *cCo;\n wxButton *bNew;\n wxButton *b00, *b01, *b02, *b10, *b11, *b12, *b20, *b21, *b22;\n char who;\n char v[3][3];\n int moves;\n char board[9];\n bool ComputerOpponent, hasAnyWon;\n WinLine wl;\n}" (type_identifier) "class" (identifier) "TicTacToe" (ERROR) ": public wxFrame" (:) ":" (identifier) "public" (identifier) "wxFrame" (compound_statement) "{\npublic:\n TicTacToe(const wxString& title);\n void OnClick(wxCommandEvent& event);\n void OnNewGame(wxCommandEvent& event);\n void OnAbout(wxCommandEvent& event);\n void OnExit(wxCommandEvent& event);\n void OnCCO(wxCommandEvent& event);\n void EnableButtons(bool e);\n void DarkenButtons(bool e);\n void Reset();\n bool IsWinOrDraw();\n void UpdatePlayerInfo();\n void MakeMove(int move, wxPoint* p);\n void WinIfCan();\n void FillTheFirstBlank(wxString w);\n int HasToBlock();\n void BlockOpponent();\n int CanWin();\n bool CheckIfWon();\n bool CheckIfDraw();\n void UpdateScore();\n\n wxMenuBar *menubar;\n wxMenu *menuGame;\n\n wxBoxSizer *sizer;\n wxGridSizer *gs;\n wxTextCtrl *player;\n wxTextCtrl *score;\n int scoreX, scoreO, scoreTies;\n wxCheckBox *cCo;\n wxButton *bNew;\n wxButton *b00, *b01, *b02, *b10, *b11, *b12, *b20, *b21, *b22;\n char who;\n char v[3][3];\n int moves;\n char board[9];\n bool ComputerOpponent, hasAnyWon;\n WinLine wl;\n}" ({) "{" (labeled_statement) "public:\n TicTacToe(const wxString& title);" (statement_identifier) "public" (:) ":" (declaration) "TicTacToe(const wxString& title);" (macro_type_specifier) "TicTacToe(const wxString& title)" (identifier) "TicTacToe" (() "(" (type_descriptor) "const wxString" (type_qualifier) "const" (const) "const" (type_identifier) "wxString" (ERROR) "& title" (&) "&" (identifier) "title" ()) ")" (identifier) "" (;) ";" (declaration) "void OnClick(wxCommandEvent& event);" (primitive_type) "void" (function_declarator) "OnClick(wxCommandEvent& event)" (identifier) "OnClick" (parameter_list) "(wxCommandEvent& event)" (() "(" (parameter_declaration) "wxCommandEvent& event" (type_identifier) "wxCommandEvent" (ERROR) "&" (&) "&" (identifier) "event" ()) ")" (;) ";" (declaration) "void OnNewGame(wxCommandEvent& event);" (primitive_type) "void" (function_declarator) "OnNewGame(wxCommandEvent& event)" (identifier) "OnNewGame" (parameter_list) "(wxCommandEvent& event)" (() "(" (parameter_declaration) "wxCommandEvent& event" (type_identifier) "wxCommandEvent" (ERROR) "&" (&) "&" (identifier) "event" ()) ")" (;) ";" (declaration) "void OnAbout(wxCommandEvent& event);" (primitive_type) "void" (function_declarator) "OnAbout(wxCommandEvent& event)" (identifier) "OnAbout" (parameter_list) "(wxCommandEvent& event)" (() "(" (parameter_declaration) "wxCommandEvent& event" (type_identifier) "wxCommandEvent" (ERROR) "&" (&) "&" (identifier) "event" ()) ")" (;) ";" (declaration) "void OnExit(wxCommandEvent& event);" (primitive_type) "void" (function_declarator) "OnExit(wxCommandEvent& event)" (identifier) "OnExit" (parameter_list) "(wxCommandEvent& event)" (() "(" (parameter_declaration) "wxCommandEvent& event" (type_identifier) "wxCommandEvent" (ERROR) "&" (&) "&" (identifier) "event" ()) ")" (;) ";" (declaration) "void OnCCO(wxCommandEvent& event);" (primitive_type) "void" (function_declarator) "OnCCO(wxCommandEvent& event)" (identifier) "OnCCO" (parameter_list) "(wxCommandEvent& event)" (() "(" (parameter_declaration) "wxCommandEvent& event" (type_identifier) "wxCommandEvent" (ERROR) "&" (&) "&" (identifier) "event" ()) ")" (;) ";" (declaration) "void EnableButtons(bool e);" (primitive_type) "void" (function_declarator) "EnableButtons(bool e)" (identifier) "EnableButtons" (parameter_list) "(bool e)" (() "(" (parameter_declaration) "bool e" (primitive_type) "bool" (identifier) "e" ()) ")" (;) ";" (declaration) "void DarkenButtons(bool e);" (primitive_type) "void" (function_declarator) "DarkenButtons(bool e)" (identifier) "DarkenButtons" (parameter_list) "(bool e)" (() "(" (parameter_declaration) "bool e" (primitive_type) "bool" (identifier) "e" ()) ")" (;) ";" (declaration) "void Reset();" (primitive_type) "void" (function_declarator) "Reset()" (identifier) "Reset" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool IsWinOrDraw();" (primitive_type) "bool" (function_declarator) "IsWinOrDraw()" (identifier) "IsWinOrDraw" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void UpdatePlayerInfo();" (primitive_type) "void" (function_declarator) "UpdatePlayerInfo()" (identifier) "UpdatePlayerInfo" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void MakeMove(int move, wxPoint* p);" (primitive_type) "void" (function_declarator) "MakeMove(int move, wxPoint* p)" (identifier) "MakeMove" (parameter_list) "(int move, wxPoint* p)" (() "(" (parameter_declaration) "int move" (primitive_type) "int" (identifier) "move" (,) "," (parameter_declaration) "wxPoint* p" (type_identifier) "wxPoint" (pointer_declarator) "* p" (*) "*" (identifier) "p" ()) ")" (;) ";" (declaration) "void WinIfCan();" (primitive_type) "void" (function_declarator) "WinIfCan()" (identifier) "WinIfCan" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void FillTheFirstBlank(wxString w);" (primitive_type) "void" (function_declarator) "FillTheFirstBlank(wxString w)" (identifier) "FillTheFirstBlank" (parameter_list) "(wxString w)" (() "(" (parameter_declaration) "wxString w" (type_identifier) "wxString" (identifier) "w" ()) ")" (;) ";" (declaration) "int HasToBlock();" (primitive_type) "int" (function_declarator) "HasToBlock()" (identifier) "HasToBlock" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void BlockOpponent();" (primitive_type) "void" (function_declarator) "BlockOpponent()" (identifier) "BlockOpponent" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "int CanWin();" (primitive_type) "int" (function_declarator) "CanWin()" (identifier) "CanWin" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool CheckIfWon();" (primitive_type) "bool" (function_declarator) "CheckIfWon()" (identifier) "CheckIfWon" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool CheckIfDraw();" (primitive_type) "bool" (function_declarator) "CheckIfDraw()" (identifier) "CheckIfDraw" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void UpdateScore();" (primitive_type) "void" (function_declarator) "UpdateScore()" (identifier) "UpdateScore" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "wxMenuBar *menubar;" (type_identifier) "wxMenuBar" (pointer_declarator) "*menubar" (*) "*" (identifier) "menubar" (;) ";" (declaration) "wxMenu *menuGame;" (type_identifier) "wxMenu" (pointer_declarator) "*menuGame" (*) "*" (identifier) "menuGame" (;) ";" (declaration) "wxBoxSizer *sizer;" (type_identifier) "wxBoxSizer" (pointer_declarator) "*sizer" (*) "*" (identifier) "sizer" (;) ";" (declaration) "wxGridSizer *gs;" (type_identifier) "wxGridSizer" (pointer_declarator) "*gs" (*) "*" (identifier) "gs" (;) ";" (declaration) "wxTextCtrl *player;" (type_identifier) "wxTextCtrl" (pointer_declarator) "*player" (*) "*" (identifier) "player" (;) ";" (declaration) "wxTextCtrl *score;" (type_identifier) "wxTextCtrl" (pointer_declarator) "*score" (*) "*" (identifier) "score" (;) ";" (declaration) "int scoreX, scoreO, scoreTies;" (primitive_type) "int" (identifier) "scoreX" (,) "," (identifier) "scoreO" (,) "," (identifier) "scoreTies" (;) ";" (declaration) "wxCheckBox *cCo;" (type_identifier) "wxCheckBox" (pointer_declarator) "*cCo" (*) "*" (identifier) "cCo" (;) ";" (declaration) "wxButton *bNew;" (type_identifier) "wxButton" (pointer_declarator) "*bNew" (*) "*" (identifier) "bNew" (;) ";" (declaration) "wxButton *b00, *b01, *b02, *b10, *b11, *b12, *b20, *b21, *b22;" (type_identifier) "wxButton" (pointer_declarator) "*b00" (*) "*" (identifier) "b00" (,) "," (pointer_declarator) "*b01" (*) "*" (identifier) "b01" (,) "," (pointer_declarator) "*b02" (*) "*" (identifier) "b02" (,) "," (pointer_declarator) "*b10" (*) "*" (identifier) "b10" (,) "," (pointer_declarator) "*b11" (*) "*" (identifier) "b11" (,) "," (pointer_declarator) "*b12" (*) "*" (identifier) "b12" (,) "," (pointer_declarator) "*b20" (*) "*" (identifier) "b20" (,) "," (pointer_declarator) "*b21" (*) "*" (identifier) "b21" (,) "," (pointer_declarator) "*b22" (*) "*" (identifier) "b22" (;) ";" (declaration) "char who;" (primitive_type) "char" (identifier) "who" (;) ";" (declaration) "char v[3][3];" (primitive_type) "char" (array_declarator) "v[3][3]" (array_declarator) "v[3]" (identifier) "v" ([) "[" (number_literal) "3" (]) "]" ([) "[" (number_literal) "3" (]) "]" (;) ";" (declaration) "int moves;" (primitive_type) "int" (identifier) "moves" (;) ";" (declaration) "char board[9];" (primitive_type) "char" (array_declarator) "board[9]" (identifier) "board" ([) "[" (number_literal) "9" (]) "]" (;) ";" (declaration) "bool ComputerOpponent, hasAnyWon;" (primitive_type) "bool" (identifier) "ComputerOpponent" (,) "," (identifier) "hasAnyWon" (;) ";" (declaration) "WinLine wl;" (type_identifier) "WinLine" (identifier) "wl" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (declaration) "const int ID_TP = 100;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_TP = 100" (identifier) "ID_TP" (=) "=" (number_literal) "100" (;) ";" (declaration) "const int ID_TS = 101;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_TS = 101" (identifier) "ID_TS" (=) "=" (number_literal) "101" (;) ";" (declaration) "const int ID_BNG = 102;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_BNG = 102" (identifier) "ID_BNG" (=) "=" (number_literal) "102" (;) ";" (declaration) "const int ID_MNG = 103;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_MNG = 103" (identifier) "ID_MNG" (=) "=" (number_literal) "103" (;) ";" (declaration) "const int ID_MAB = 104;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_MAB = 104" (identifier) "ID_MAB" (=) "=" (number_literal) "104" (;) ";" (declaration) "const int ID_MEX = 105;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_MEX = 105" (identifier) "ID_MEX" (=) "=" (number_literal) "105" (;) ";" (declaration) "const int ID_CCO = 106;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_CCO = 106" (identifier) "ID_CCO" (=) "=" (number_literal) "106" (;) ";" (declaration) "const int ID_B00 = 200;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_B00 = 200" (identifier) "ID_B00" (=) "=" (number_literal) "200" (;) ";" (declaration) "const int ID_B01 = 201;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_B01 = 201" (identifier) "ID_B01" (=) "=" (number_literal) "201" (;) ";" (declaration) "const int ID_B02 = 202;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_B02 = 202" (identifier) "ID_B02" (=) "=" (number_literal) "202" (;) ";" (declaration) "const int ID_B10 = 210;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_B10 = 210" (identifier) "ID_B10" (=) "=" (number_literal) "210" (;) ";" (declaration) "const int ID_B11 = 211;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_B11 = 211" (identifier) "ID_B11" (=) "=" (number_literal) "211" (;) ";" (declaration) "const int ID_B12 = 212;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_B12 = 212" (identifier) "ID_B12" (=) "=" (number_literal) "212" (;) ";" (declaration) "const int ID_B20 = 220;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_B20 = 220" (identifier) "ID_B20" (=) "=" (number_literal) "220" (;) ";" (declaration) "const int ID_B21 = 221;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_B21 = 221" (identifier) "ID_B21" (=) "=" (number_literal) "221" (;) ";" (declaration) "const int ID_B22 = 222;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "ID_B22 = 222" (identifier) "ID_B22" (=) "=" (number_literal) "222" (;) ";"
540
7
{"language": "c", "success": true, "metadata": {"lines": 69, "avg_line_length": 20.81, "nodes": 361, "errors": 0, "source_hash": "4a263119923730c051fdabed30cbe9bf0b46b32127590e6aa2ee3c9003fc003f", "categorized_nodes": 223}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <wx/wx.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": "<wx/wx.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include \"AboutDialog.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": "\"AboutDialog.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 24}}, {"id": 6, "type": "enum_specifier", "text": "enum WinLine\n{\n H_1,\n H_2,\n H_3,\n V_1,\n V_2,\n V_3,\n D_1,\n D_2\n}", "parent": null, "children": [7, 8, 9], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 7, "type": "enum", "text": "enum", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 4}}, {"id": 8, "type": "type_identifier", "text": "WinLine", "parent": 6, "children": [], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 12}}, {"id": 9, "type": "enumerator_list", "text": "{\n H_1,\n H_2,\n H_3,\n V_1,\n V_2,\n V_3,\n D_1,\n D_2\n}", "parent": 6, "children": [10, 12, 14, 16, 18, 20, 22, 24], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 10, "type": "enumerator", "text": "H_1", "parent": 9, "children": [11], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 7}}, {"id": 11, "type": "identifier", "text": "H_1", "parent": 10, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 7}}, {"id": 12, "type": "enumerator", "text": "H_2", "parent": 9, "children": [13], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 7}}, {"id": 13, "type": "identifier", "text": "H_2", "parent": 12, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 7}}, {"id": 14, "type": "enumerator", "text": "H_3", "parent": 9, "children": [15], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 7}}, {"id": 15, "type": "identifier", "text": "H_3", "parent": 14, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 7}}, {"id": 16, "type": "enumerator", "text": "V_1", "parent": 9, "children": [17], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 7}}, {"id": 17, "type": "identifier", "text": "V_1", "parent": 16, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 7}}, {"id": 18, "type": "enumerator", "text": "V_2", "parent": 9, "children": [19], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 7}}, {"id": 19, "type": "identifier", "text": "V_2", "parent": 18, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 7}}, {"id": 20, "type": "enumerator", "text": "V_3", "parent": 9, "children": [21], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 7}}, {"id": 21, "type": "identifier", "text": "V_3", "parent": 20, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 7}}, {"id": 22, "type": "enumerator", "text": "D_1", "parent": 9, "children": [23], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 7}}, {"id": 23, "type": "identifier", "text": "D_1", "parent": 22, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 7}}, {"id": 24, "type": "enumerator", "text": "D_2", "parent": 9, "children": [25], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 7}}, {"id": 25, "type": "identifier", "text": "D_2", "parent": 24, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 7}}, {"id": 26, "type": "function_definition", "text": "class TicTacToe : public wxFrame\n{\npublic:\n TicTacToe(const wxString& title);\n void OnClick(wxCommandEvent& event);\n void OnNewGame(wxCommandEvent& event);\n void OnAbout(wxCommandEvent& event);\n void OnExit(wxCommandEvent& event);\n void OnCCO(wxCommandEvent& event);\n void EnableButtons(bool e);\n void DarkenButtons(bool e);\n void Reset();\n bool IsWinOrDraw();\n void UpdatePlayerInfo();\n void MakeMove(int move, wxPoint* p);\n void WinIfCan();\n void FillTheFirstBlank(wxString w);\n int HasToBlock();\n void BlockOpponent();\n int CanWin();\n bool CheckIfWon();\n bool CheckIfDraw();\n void UpdateScore();\n\n wxMenuBar *menubar;\n wxMenu *menuGame;\n\n wxBoxSizer *sizer;\n wxGridSizer *gs;\n wxTextCtrl *player;\n wxTextCtrl *score;\n int scoreX, scoreO, scoreTies;\n wxCheckBox *cCo;\n wxButton *bNew;\n wxButton *b00, *b01, *b02, *b10, *b11, *b12, *b20, *b21, *b22;\n char who;\n char v[3][3];\n int moves;\n char board[9];\n bool ComputerOpponent, hasAnyWon;\n WinLine wl;\n}", "parent": null, "children": [27, 28], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 27, "type": "identifier", "text": "TicTacToe", "parent": 26, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 15}}, {"id": 28, "type": "ERROR", "text": ": public wxFrame", "parent": 26, "children": [29], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 32}}, {"id": 29, "type": "identifier", "text": "wxFrame", "parent": 28, "children": [], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 32}}, {"id": 30, "type": "labeled_statement", "text": "public:\n TicTacToe(const wxString& title);", "parent": 26, "children": [31], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 35}}, {"id": 31, "type": "declaration", "text": "TicTacToe(const wxString& title);", "parent": 30, "children": [32, 38], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 35}}, {"id": 32, "type": "macro_type_specifier", "text": "TicTacToe(const wxString& title)", "parent": 31, "children": [33, 34, 36], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 34}}, {"id": 33, "type": "identifier", "text": "TicTacToe", "parent": 32, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 11}}, {"id": 34, "type": "type_descriptor", "text": "const wxString", "parent": 32, "children": [35], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 26}}, {"id": 35, "type": "type_identifier", "text": "wxString", "parent": 34, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 26}}, {"id": 36, "type": "ERROR", "text": "& title", "parent": 32, "children": [37], "start_point": {"row": 18, "column": 26}, "end_point": {"row": 18, "column": 33}}, {"id": 37, "type": "identifier", "text": "title", "parent": 36, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 33}}, {"id": 38, "type": "identifier", "text": "", "parent": 31, "children": [], "start_point": {"row": 18, "column": 34}, "end_point": {"row": 18, "column": 34}}, {"id": 39, "type": "declaration", "text": "void OnClick(wxCommandEvent& event);", "parent": 26, "children": [40, 41], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 38}}, {"id": 40, "type": "primitive_type", "text": "void", "parent": 39, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 6}}, {"id": 41, "type": "function_declarator", "text": "OnClick(wxCommandEvent& event)", "parent": 39, "children": [42, 43], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 37}}, {"id": 42, "type": "identifier", "text": "OnClick", "parent": 41, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 14}}, {"id": 43, "type": "parameter_list", "text": "(wxCommandEvent& event)", "parent": 41, "children": [44], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 37}}, {"id": 44, "type": "parameter_declaration", "text": "wxCommandEvent& event", "parent": 43, "children": [45, 46], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 36}}, {"id": 45, "type": "type_identifier", "text": "wxCommandEvent", "parent": 44, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 29}}, {"id": 46, "type": "identifier", "text": "event", "parent": 44, "children": [], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 36}}, {"id": 47, "type": "declaration", "text": "void OnNewGame(wxCommandEvent& event);", "parent": 26, "children": [48, 49], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 40}}, {"id": 48, "type": "primitive_type", "text": "void", "parent": 47, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 6}}, {"id": 49, "type": "function_declarator", "text": "OnNewGame(wxCommandEvent& event)", "parent": 47, "children": [50, 51], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 39}}, {"id": 50, "type": "identifier", "text": "OnNewGame", "parent": 49, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 16}}, {"id": 51, "type": "parameter_list", "text": "(wxCommandEvent& event)", "parent": 49, "children": [52], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 39}}, {"id": 52, "type": "parameter_declaration", "text": "wxCommandEvent& event", "parent": 51, "children": [53, 54], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 38}}, {"id": 53, "type": "type_identifier", "text": "wxCommandEvent", "parent": 52, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 31}}, {"id": 54, "type": "identifier", "text": "event", "parent": 52, "children": [], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 38}}, {"id": 55, "type": "declaration", "text": "void OnAbout(wxCommandEvent& event);", "parent": 26, "children": [56, 57], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 38}}, {"id": 56, "type": "primitive_type", "text": "void", "parent": 55, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 6}}, {"id": 57, "type": "function_declarator", "text": "OnAbout(wxCommandEvent& event)", "parent": 55, "children": [58, 59], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 37}}, {"id": 58, "type": "identifier", "text": "OnAbout", "parent": 57, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 14}}, {"id": 59, "type": "parameter_list", "text": "(wxCommandEvent& event)", "parent": 57, "children": [60], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 37}}, {"id": 60, "type": "parameter_declaration", "text": "wxCommandEvent& event", "parent": 59, "children": [61, 62], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 36}}, {"id": 61, "type": "type_identifier", "text": "wxCommandEvent", "parent": 60, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 29}}, {"id": 62, "type": "identifier", "text": "event", "parent": 60, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 36}}, {"id": 63, "type": "declaration", "text": "void OnExit(wxCommandEvent& event);", "parent": 26, "children": [64, 65], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 37}}, {"id": 64, "type": "primitive_type", "text": "void", "parent": 63, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 6}}, {"id": 65, "type": "function_declarator", "text": "OnExit(wxCommandEvent& event)", "parent": 63, "children": [66, 67], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 36}}, {"id": 66, "type": "identifier", "text": "OnExit", "parent": 65, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 13}}, {"id": 67, "type": "parameter_list", "text": "(wxCommandEvent& event)", "parent": 65, "children": [68], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 36}}, {"id": 68, "type": "parameter_declaration", "text": "wxCommandEvent& event", "parent": 67, "children": [69, 70], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 35}}, {"id": 69, "type": "type_identifier", "text": "wxCommandEvent", "parent": 68, "children": [], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 28}}, {"id": 70, "type": "identifier", "text": "event", "parent": 68, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 35}}, {"id": 71, "type": "declaration", "text": "void OnCCO(wxCommandEvent& event);", "parent": 26, "children": [72, 73], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 36}}, {"id": 72, "type": "primitive_type", "text": "void", "parent": 71, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 6}}, {"id": 73, "type": "function_declarator", "text": "OnCCO(wxCommandEvent& event)", "parent": 71, "children": [74, 75], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 35}}, {"id": 74, "type": "identifier", "text": "OnCCO", "parent": 73, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 12}}, {"id": 75, "type": "parameter_list", "text": "(wxCommandEvent& event)", "parent": 73, "children": [76], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 35}}, {"id": 76, "type": "parameter_declaration", "text": "wxCommandEvent& event", "parent": 75, "children": [77, 78], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 34}}, {"id": 77, "type": "type_identifier", "text": "wxCommandEvent", "parent": 76, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 27}}, {"id": 78, "type": "identifier", "text": "event", "parent": 76, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 34}}, {"id": 79, "type": "declaration", "text": "void EnableButtons(bool e);", "parent": 26, "children": [80, 81], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 29}}, {"id": 80, "type": "primitive_type", "text": "void", "parent": 79, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 6}}, {"id": 81, "type": "function_declarator", "text": "EnableButtons(bool e)", "parent": 79, "children": [82, 83], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 28}}, {"id": 82, "type": "identifier", "text": "EnableButtons", "parent": 81, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 20}}, {"id": 83, "type": "parameter_list", "text": "(bool e)", "parent": 81, "children": [84], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 28}}, {"id": 84, "type": "parameter_declaration", "text": "bool e", "parent": 83, "children": [85, 86], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 27}}, {"id": 85, "type": "primitive_type", "text": "bool", "parent": 84, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 25}}, {"id": 86, "type": "identifier", "text": "e", "parent": 84, "children": [], "start_point": {"row": 24, "column": 26}, "end_point": {"row": 24, "column": 27}}, {"id": 87, "type": "declaration", "text": "void DarkenButtons(bool e);", "parent": 26, "children": [88, 89], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 29}}, {"id": 88, "type": "primitive_type", "text": "void", "parent": 87, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 6}}, {"id": 89, "type": "function_declarator", "text": "DarkenButtons(bool e)", "parent": 87, "children": [90, 91], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 28}}, {"id": 90, "type": "identifier", "text": "DarkenButtons", "parent": 89, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 20}}, {"id": 91, "type": "parameter_list", "text": "(bool e)", "parent": 89, "children": [92], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 28}}, {"id": 92, "type": "parameter_declaration", "text": "bool e", "parent": 91, "children": [93, 94], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 27}}, {"id": 93, "type": "primitive_type", "text": "bool", "parent": 92, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 25}}, {"id": 94, "type": "identifier", "text": "e", "parent": 92, "children": [], "start_point": {"row": 25, "column": 26}, "end_point": {"row": 25, "column": 27}}, {"id": 95, "type": "declaration", "text": "void Reset();", "parent": 26, "children": [96, 97], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 15}}, {"id": 96, "type": "primitive_type", "text": "void", "parent": 95, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 6}}, {"id": 97, "type": "function_declarator", "text": "Reset()", "parent": 95, "children": [98, 99], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 14}}, {"id": 98, "type": "identifier", "text": "Reset", "parent": 97, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 12}}, {"id": 99, "type": "parameter_list", "text": "()", "parent": 97, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 14}}, {"id": 100, "type": "declaration", "text": "bool IsWinOrDraw();", "parent": 26, "children": [101, 102], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 21}}, {"id": 101, "type": "primitive_type", "text": "bool", "parent": 100, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 6}}, {"id": 102, "type": "function_declarator", "text": "IsWinOrDraw()", "parent": 100, "children": [103, 104], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 20}}, {"id": 103, "type": "identifier", "text": "IsWinOrDraw", "parent": 102, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 18}}, {"id": 104, "type": "parameter_list", "text": "()", "parent": 102, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 20}}, {"id": 105, "type": "declaration", "text": "void UpdatePlayerInfo();", "parent": 26, "children": [106, 107], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 26}}, {"id": 106, "type": "primitive_type", "text": "void", "parent": 105, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 6}}, {"id": 107, "type": "function_declarator", "text": "UpdatePlayerInfo()", "parent": 105, "children": [108, 109], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 25}}, {"id": 108, "type": "identifier", "text": "UpdatePlayerInfo", "parent": 107, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 23}}, {"id": 109, "type": "parameter_list", "text": "()", "parent": 107, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 25}}, {"id": 110, "type": "declaration", "text": "void MakeMove(int move, wxPoint* p);", "parent": 26, "children": [111, 112], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 38}}, {"id": 111, "type": "primitive_type", "text": "void", "parent": 110, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 6}}, {"id": 112, "type": "function_declarator", "text": "MakeMove(int move, wxPoint* p)", "parent": 110, "children": [113, 114], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 37}}, {"id": 113, "type": "identifier", "text": "MakeMove", "parent": 112, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 15}}, {"id": 114, "type": "parameter_list", "text": "(int move, wxPoint* p)", "parent": 112, "children": [115, 118], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 37}}, {"id": 115, "type": "parameter_declaration", "text": "int move", "parent": 114, "children": [116, 117], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 24}}, {"id": 116, "type": "primitive_type", "text": "int", "parent": 115, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 19}}, {"id": 117, "type": "identifier", "text": "move", "parent": 115, "children": [], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 24}}, {"id": 118, "type": "parameter_declaration", "text": "wxPoint* p", "parent": 114, "children": [119, 120], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 36}}, {"id": 119, "type": "type_identifier", "text": "wxPoint", "parent": 118, "children": [], "start_point": {"row": 29, "column": 26}, "end_point": {"row": 29, "column": 33}}, {"id": 120, "type": "pointer_declarator", "text": "* p", "parent": 118, "children": [121, 122], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 29, "column": 36}}, {"id": 121, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 29, "column": 34}}, {"id": 122, "type": "identifier", "text": "p", "parent": 120, "children": [], "start_point": {"row": 29, "column": 35}, "end_point": {"row": 29, "column": 36}}, {"id": 123, "type": "declaration", "text": "void WinIfCan();", "parent": 26, "children": [124, 125], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 18}}, {"id": 124, "type": "primitive_type", "text": "void", "parent": 123, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 6}}, {"id": 125, "type": "function_declarator", "text": "WinIfCan()", "parent": 123, "children": [126, 127], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 17}}, {"id": 126, "type": "identifier", "text": "WinIfCan", "parent": 125, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 15}}, {"id": 127, "type": "parameter_list", "text": "()", "parent": 125, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 17}}, {"id": 128, "type": "declaration", "text": "void FillTheFirstBlank(wxString w);", "parent": 26, "children": [129, 130], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 37}}, {"id": 129, "type": "primitive_type", "text": "void", "parent": 128, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 6}}, {"id": 130, "type": "function_declarator", "text": "FillTheFirstBlank(wxString w)", "parent": 128, "children": [131, 132], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 36}}, {"id": 131, "type": "identifier", "text": "FillTheFirstBlank", "parent": 130, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 24}}, {"id": 132, "type": "parameter_list", "text": "(wxString w)", "parent": 130, "children": [133], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 36}}, {"id": 133, "type": "parameter_declaration", "text": "wxString w", "parent": 132, "children": [134, 135], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 35}}, {"id": 134, "type": "type_identifier", "text": "wxString", "parent": 133, "children": [], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 33}}, {"id": 135, "type": "identifier", "text": "w", "parent": 133, "children": [], "start_point": {"row": 31, "column": 34}, "end_point": {"row": 31, "column": 35}}, {"id": 136, "type": "declaration", "text": "int HasToBlock();", "parent": 26, "children": [137, 138], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 19}}, {"id": 137, "type": "primitive_type", "text": "int", "parent": 136, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 5}}, {"id": 138, "type": "function_declarator", "text": "HasToBlock()", "parent": 136, "children": [139, 140], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 18}}, {"id": 139, "type": "identifier", "text": "HasToBlock", "parent": 138, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 16}}, {"id": 140, "type": "parameter_list", "text": "()", "parent": 138, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 18}}, {"id": 141, "type": "declaration", "text": "void BlockOpponent();", "parent": 26, "children": [142, 143], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 23}}, {"id": 142, "type": "primitive_type", "text": "void", "parent": 141, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 6}}, {"id": 143, "type": "function_declarator", "text": "BlockOpponent()", "parent": 141, "children": [144, 145], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 22}}, {"id": 144, "type": "identifier", "text": "BlockOpponent", "parent": 143, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 20}}, {"id": 145, "type": "parameter_list", "text": "()", "parent": 143, "children": [], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 22}}, {"id": 146, "type": "declaration", "text": "int CanWin();", "parent": 26, "children": [147, 148], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 15}}, {"id": 147, "type": "primitive_type", "text": "int", "parent": 146, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 5}}, {"id": 148, "type": "function_declarator", "text": "CanWin()", "parent": 146, "children": [149, 150], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 14}}, {"id": 149, "type": "identifier", "text": "CanWin", "parent": 148, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 12}}, {"id": 150, "type": "parameter_list", "text": "()", "parent": 148, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 14}}, {"id": 151, "type": "declaration", "text": "bool CheckIfWon();", "parent": 26, "children": [152, 153], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 20}}, {"id": 152, "type": "primitive_type", "text": "bool", "parent": 151, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 6}}, {"id": 153, "type": "function_declarator", "text": "CheckIfWon()", "parent": 151, "children": [154, 155], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 19}}, {"id": 154, "type": "identifier", "text": "CheckIfWon", "parent": 153, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 17}}, {"id": 155, "type": "parameter_list", "text": "()", "parent": 153, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 19}}, {"id": 156, "type": "declaration", "text": "bool CheckIfDraw();", "parent": 26, "children": [157, 158], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 21}}, {"id": 157, "type": "primitive_type", "text": "bool", "parent": 156, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 6}}, {"id": 158, "type": "function_declarator", "text": "CheckIfDraw()", "parent": 156, "children": [159, 160], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 20}}, {"id": 159, "type": "identifier", "text": "CheckIfDraw", "parent": 158, "children": [], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 18}}, {"id": 160, "type": "parameter_list", "text": "()", "parent": 158, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 20}}, {"id": 161, "type": "declaration", "text": "void UpdateScore();", "parent": 26, "children": [162, 163], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 21}}, {"id": 162, "type": "primitive_type", "text": "void", "parent": 161, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 163, "type": "function_declarator", "text": "UpdateScore()", "parent": 161, "children": [164, 165], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 20}}, {"id": 164, "type": "identifier", "text": "UpdateScore", "parent": 163, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 18}}, {"id": 165, "type": "parameter_list", "text": "()", "parent": 163, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 20}}, {"id": 166, "type": "declaration", "text": "wxMenuBar *menubar;", "parent": 26, "children": [167, 168], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 21}}, {"id": 167, "type": "type_identifier", "text": "wxMenuBar", "parent": 166, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 11}}, {"id": 168, "type": "pointer_declarator", "text": "*menubar", "parent": 166, "children": [169, 170], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 20}}, {"id": 169, "type": "*", "text": "*", "parent": 168, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 13}}, {"id": 170, "type": "identifier", "text": "menubar", "parent": 168, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 20}}, {"id": 171, "type": "declaration", "text": "wxMenu *menuGame;", "parent": 26, "children": [172, 173], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 19}}, {"id": 172, "type": "type_identifier", "text": "wxMenu", "parent": 171, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 8}}, {"id": 173, "type": "pointer_declarator", "text": "*menuGame", "parent": 171, "children": [174, 175], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 18}}, {"id": 174, "type": "*", "text": "*", "parent": 173, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 10}}, {"id": 175, "type": "identifier", "text": "menuGame", "parent": 173, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 18}}, {"id": 176, "type": "declaration", "text": "wxBoxSizer *sizer;", "parent": 26, "children": [177, 178], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 20}}, {"id": 177, "type": "type_identifier", "text": "wxBoxSizer", "parent": 176, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 12}}, {"id": 178, "type": "pointer_declarator", "text": "*sizer", "parent": 176, "children": [179, 180], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 19}}, {"id": 179, "type": "*", "text": "*", "parent": 178, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 14}}, {"id": 180, "type": "identifier", "text": "sizer", "parent": 178, "children": [], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 19}}, {"id": 181, "type": "declaration", "text": "wxGridSizer *gs;", "parent": 26, "children": [182, 183], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 18}}, {"id": 182, "type": "type_identifier", "text": "wxGridSizer", "parent": 181, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 13}}, {"id": 183, "type": "pointer_declarator", "text": "*gs", "parent": 181, "children": [184, 185], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 17}}, {"id": 184, "type": "*", "text": "*", "parent": 183, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 15}}, {"id": 185, "type": "identifier", "text": "gs", "parent": 183, "children": [], "start_point": {"row": 43, "column": 15}, "end_point": {"row": 43, "column": 17}}, {"id": 186, "type": "declaration", "text": "wxTextCtrl *player;", "parent": 26, "children": [187, 188], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 21}}, {"id": 187, "type": "type_identifier", "text": "wxTextCtrl", "parent": 186, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 12}}, {"id": 188, "type": "pointer_declarator", "text": "*player", "parent": 186, "children": [189, 190], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 20}}, {"id": 189, "type": "*", "text": "*", "parent": 188, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 14}}, {"id": 190, "type": "identifier", "text": "player", "parent": 188, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 20}}, {"id": 191, "type": "declaration", "text": "wxTextCtrl *score;", "parent": 26, "children": [192, 193], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 20}}, {"id": 192, "type": "type_identifier", "text": "wxTextCtrl", "parent": 191, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 12}}, {"id": 193, "type": "pointer_declarator", "text": "*score", "parent": 191, "children": [194, 195], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 19}}, {"id": 194, "type": "*", "text": "*", "parent": 193, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 14}}, {"id": 195, "type": "identifier", "text": "score", "parent": 193, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 19}}, {"id": 196, "type": "declaration", "text": "int scoreX, scoreO, scoreTies;", "parent": 26, "children": [197, 198, 199, 200], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 32}}, {"id": 197, "type": "primitive_type", "text": "int", "parent": 196, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 5}}, {"id": 198, "type": "identifier", "text": "scoreX", "parent": 196, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 12}}, {"id": 199, "type": "identifier", "text": "scoreO", "parent": 196, "children": [], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 20}}, {"id": 200, "type": "identifier", "text": "scoreTies", "parent": 196, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 31}}, {"id": 201, "type": "declaration", "text": "wxCheckBox *cCo;", "parent": 26, "children": [202, 203], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 18}}, {"id": 202, "type": "type_identifier", "text": "wxCheckBox", "parent": 201, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 12}}, {"id": 203, "type": "pointer_declarator", "text": "*cCo", "parent": 201, "children": [204, 205], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 17}}, {"id": 204, "type": "*", "text": "*", "parent": 203, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 14}}, {"id": 205, "type": "identifier", "text": "cCo", "parent": 203, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 17}}, {"id": 206, "type": "declaration", "text": "wxButton *bNew;", "parent": 26, "children": [207, 208], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 17}}, {"id": 207, "type": "type_identifier", "text": "wxButton", "parent": 206, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 10}}, {"id": 208, "type": "pointer_declarator", "text": "*bNew", "parent": 206, "children": [209, 210], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 16}}, {"id": 209, "type": "*", "text": "*", "parent": 208, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 12}}, {"id": 210, "type": "identifier", "text": "bNew", "parent": 208, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 16}}, {"id": 211, "type": "declaration", "text": "wxButton *b00, *b01, *b02, *b10, *b11, *b12, *b20, *b21, *b22;", "parent": 26, "children": [212, 213, 216, 219, 222, 225, 228, 231, 234, 237], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 64}}, {"id": 212, "type": "type_identifier", "text": "wxButton", "parent": 211, "children": [], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 10}}, {"id": 213, "type": "pointer_declarator", "text": "*b00", "parent": 211, "children": [214, 215], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 15}}, {"id": 214, "type": "*", "text": "*", "parent": 213, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 12}}, {"id": 215, "type": "identifier", "text": "b00", "parent": 213, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 15}}, {"id": 216, "type": "pointer_declarator", "text": "*b01", "parent": 211, "children": [217, 218], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 21}}, {"id": 217, "type": "*", "text": "*", "parent": 216, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 18}}, {"id": 218, "type": "identifier", "text": "b01", "parent": 216, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 21}}, {"id": 219, "type": "pointer_declarator", "text": "*b02", "parent": 211, "children": [220, 221], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 27}}, {"id": 220, "type": "*", "text": "*", "parent": 219, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 24}}, {"id": 221, "type": "identifier", "text": "b02", "parent": 219, "children": [], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 27}}, {"id": 222, "type": "pointer_declarator", "text": "*b10", "parent": 211, "children": [223, 224], "start_point": {"row": 49, "column": 29}, "end_point": {"row": 49, "column": 33}}, {"id": 223, "type": "*", "text": "*", "parent": 222, "children": [], "start_point": {"row": 49, "column": 29}, "end_point": {"row": 49, "column": 30}}, {"id": 224, "type": "identifier", "text": "b10", "parent": 222, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 33}}, {"id": 225, "type": "pointer_declarator", "text": "*b11", "parent": 211, "children": [226, 227], "start_point": {"row": 49, "column": 35}, "end_point": {"row": 49, "column": 39}}, {"id": 226, "type": "*", "text": "*", "parent": 225, "children": [], "start_point": {"row": 49, "column": 35}, "end_point": {"row": 49, "column": 36}}, {"id": 227, "type": "identifier", "text": "b11", "parent": 225, "children": [], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 39}}, {"id": 228, "type": "pointer_declarator", "text": "*b12", "parent": 211, "children": [229, 230], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 45}}, {"id": 229, "type": "*", "text": "*", "parent": 228, "children": [], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 42}}, {"id": 230, "type": "identifier", "text": "b12", "parent": 228, "children": [], "start_point": {"row": 49, "column": 42}, "end_point": {"row": 49, "column": 45}}, {"id": 231, "type": "pointer_declarator", "text": "*b20", "parent": 211, "children": [232, 233], "start_point": {"row": 49, "column": 47}, "end_point": {"row": 49, "column": 51}}, {"id": 232, "type": "*", "text": "*", "parent": 231, "children": [], "start_point": {"row": 49, "column": 47}, "end_point": {"row": 49, "column": 48}}, {"id": 233, "type": "identifier", "text": "b20", "parent": 231, "children": [], "start_point": {"row": 49, "column": 48}, "end_point": {"row": 49, "column": 51}}, {"id": 234, "type": "pointer_declarator", "text": "*b21", "parent": 211, "children": [235, 236], "start_point": {"row": 49, "column": 53}, "end_point": {"row": 49, "column": 57}}, {"id": 235, "type": "*", "text": "*", "parent": 234, "children": [], "start_point": {"row": 49, "column": 53}, "end_point": {"row": 49, "column": 54}}, {"id": 236, "type": "identifier", "text": "b21", "parent": 234, "children": [], "start_point": {"row": 49, "column": 54}, "end_point": {"row": 49, "column": 57}}, {"id": 237, "type": "pointer_declarator", "text": "*b22", "parent": 211, "children": [238, 239], "start_point": {"row": 49, "column": 59}, "end_point": {"row": 49, "column": 63}}, {"id": 238, "type": "*", "text": "*", "parent": 237, "children": [], "start_point": {"row": 49, "column": 59}, "end_point": {"row": 49, "column": 60}}, {"id": 239, "type": "identifier", "text": "b22", "parent": 237, "children": [], "start_point": {"row": 49, "column": 60}, "end_point": {"row": 49, "column": 63}}, {"id": 240, "type": "declaration", "text": "char who;", "parent": 26, "children": [241, 242], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 11}}, {"id": 241, "type": "primitive_type", "text": "char", "parent": 240, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 6}}, {"id": 242, "type": "identifier", "text": "who", "parent": 240, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 10}}, {"id": 243, "type": "declaration", "text": "char v[3][3];", "parent": 26, "children": [244, 245], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 15}}, {"id": 244, "type": "primitive_type", "text": "char", "parent": 243, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 6}}, {"id": 245, "type": "array_declarator", "text": "v[3][3]", "parent": 243, "children": [246, 249], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 14}}, {"id": 246, "type": "array_declarator", "text": "v[3]", "parent": 245, "children": [247, 248], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 11}}, {"id": 247, "type": "identifier", "text": "v", "parent": 246, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 8}}, {"id": 248, "type": "number_literal", "text": "3", "parent": 246, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 10}}, {"id": 249, "type": "number_literal", "text": "3", "parent": 245, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 13}}, {"id": 250, "type": "declaration", "text": "int moves;", "parent": 26, "children": [251, 252], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 12}}, {"id": 251, "type": "primitive_type", "text": "int", "parent": 250, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 5}}, {"id": 252, "type": "identifier", "text": "moves", "parent": 250, "children": [], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 11}}, {"id": 253, "type": "declaration", "text": "char board[9];", "parent": 26, "children": [254, 255], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 16}}, {"id": 254, "type": "primitive_type", "text": "char", "parent": 253, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 6}}, {"id": 255, "type": "array_declarator", "text": "board[9]", "parent": 253, "children": [256, 257], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 15}}, {"id": 256, "type": "identifier", "text": "board", "parent": 255, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 12}}, {"id": 257, "type": "number_literal", "text": "9", "parent": 255, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 14}}, {"id": 258, "type": "declaration", "text": "bool ComputerOpponent, hasAnyWon;", "parent": 26, "children": [259, 260, 261], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 35}}, {"id": 259, "type": "primitive_type", "text": "bool", "parent": 258, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 6}}, {"id": 260, "type": "identifier", "text": "ComputerOpponent", "parent": 258, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 23}}, {"id": 261, "type": "identifier", "text": "hasAnyWon", "parent": 258, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 34}}, {"id": 262, "type": "declaration", "text": "WinLine wl;", "parent": 26, "children": [263, 264], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 13}}, {"id": 263, "type": "type_identifier", "text": "WinLine", "parent": 262, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 9}}, {"id": 264, "type": "identifier", "text": "wl", "parent": 262, "children": [], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 12}}, {"id": 265, "type": "declaration", "text": "const int ID_TP = 100;", "parent": null, "children": [266, 267], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 22}}, {"id": 266, "type": "primitive_type", "text": "int", "parent": 265, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 9}}, {"id": 267, "type": "init_declarator", "text": "ID_TP = 100", "parent": 265, "children": [268, 269, 270], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 21}}, {"id": 268, "type": "identifier", "text": "ID_TP", "parent": 267, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 15}}, {"id": 269, "type": "=", "text": "=", "parent": 267, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 17}}, {"id": 270, "type": "number_literal", "text": "100", "parent": 267, "children": [], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 21}}, {"id": 271, "type": "declaration", "text": "const int ID_TS = 101;", "parent": null, "children": [272, 273], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 22}}, {"id": 272, "type": "primitive_type", "text": "int", "parent": 271, "children": [], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 9}}, {"id": 273, "type": "init_declarator", "text": "ID_TS = 101", "parent": 271, "children": [274, 275, 276], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 21}}, {"id": 274, "type": "identifier", "text": "ID_TS", "parent": 273, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 15}}, {"id": 275, "type": "=", "text": "=", "parent": 273, "children": [], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 59, "column": 17}}, {"id": 276, "type": "number_literal", "text": "101", "parent": 273, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 21}}, {"id": 277, "type": "declaration", "text": "const int ID_BNG = 102;", "parent": null, "children": [278, 279], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 23}}, {"id": 278, "type": "primitive_type", "text": "int", "parent": 277, "children": [], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 9}}, {"id": 279, "type": "init_declarator", "text": "ID_BNG = 102", "parent": 277, "children": [280, 281, 282], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 22}}, {"id": 280, "type": "identifier", "text": "ID_BNG", "parent": 279, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 16}}, {"id": 281, "type": "=", "text": "=", "parent": 279, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 18}}, {"id": 282, "type": "number_literal", "text": "102", "parent": 279, "children": [], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 22}}, {"id": 283, "type": "declaration", "text": "const int ID_MNG = 103;", "parent": null, "children": [284, 285], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 23}}, {"id": 284, "type": "primitive_type", "text": "int", "parent": 283, "children": [], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 9}}, {"id": 285, "type": "init_declarator", "text": "ID_MNG = 103", "parent": 283, "children": [286, 287, 288], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 22}}, {"id": 286, "type": "identifier", "text": "ID_MNG", "parent": 285, "children": [], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 16}}, {"id": 287, "type": "=", "text": "=", "parent": 285, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 18}}, {"id": 288, "type": "number_literal", "text": "103", "parent": 285, "children": [], "start_point": {"row": 61, "column": 19}, "end_point": {"row": 61, "column": 22}}, {"id": 289, "type": "declaration", "text": "const int ID_MAB = 104;", "parent": null, "children": [290, 291], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 23}}, {"id": 290, "type": "primitive_type", "text": "int", "parent": 289, "children": [], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 9}}, {"id": 291, "type": "init_declarator", "text": "ID_MAB = 104", "parent": 289, "children": [292, 293, 294], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 22}}, {"id": 292, "type": "identifier", "text": "ID_MAB", "parent": 291, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 16}}, {"id": 293, "type": "=", "text": "=", "parent": 291, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 18}}, {"id": 294, "type": "number_literal", "text": "104", "parent": 291, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 22}}, {"id": 295, "type": "declaration", "text": "const int ID_MEX = 105;", "parent": null, "children": [296, 297], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 23}}, {"id": 296, "type": "primitive_type", "text": "int", "parent": 295, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 9}}, {"id": 297, "type": "init_declarator", "text": "ID_MEX = 105", "parent": 295, "children": [298, 299, 300], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 22}}, {"id": 298, "type": "identifier", "text": "ID_MEX", "parent": 297, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 16}}, {"id": 299, "type": "=", "text": "=", "parent": 297, "children": [], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 18}}, {"id": 300, "type": "number_literal", "text": "105", "parent": 297, "children": [], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 22}}, {"id": 301, "type": "declaration", "text": "const int ID_CCO = 106;", "parent": null, "children": [302, 303], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 23}}, {"id": 302, "type": "primitive_type", "text": "int", "parent": 301, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 9}}, {"id": 303, "type": "init_declarator", "text": "ID_CCO = 106", "parent": 301, "children": [304, 305, 306], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 22}}, {"id": 304, "type": "identifier", "text": "ID_CCO", "parent": 303, "children": [], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 16}}, {"id": 305, "type": "=", "text": "=", "parent": 303, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 18}}, {"id": 306, "type": "number_literal", "text": "106", "parent": 303, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 22}}, {"id": 307, "type": "declaration", "text": "const int ID_B00 = 200;", "parent": null, "children": [308, 309], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 23}}, {"id": 308, "type": "primitive_type", "text": "int", "parent": 307, "children": [], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 9}}, {"id": 309, "type": "init_declarator", "text": "ID_B00 = 200", "parent": 307, "children": [310, 311, 312], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 22}}, {"id": 310, "type": "identifier", "text": "ID_B00", "parent": 309, "children": [], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 16}}, {"id": 311, "type": "=", "text": "=", "parent": 309, "children": [], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 18}}, {"id": 312, "type": "number_literal", "text": "200", "parent": 309, "children": [], "start_point": {"row": 66, "column": 19}, "end_point": {"row": 66, "column": 22}}, {"id": 313, "type": "declaration", "text": "const int ID_B01 = 201;", "parent": null, "children": [314, 315], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 23}}, {"id": 314, "type": "primitive_type", "text": "int", "parent": 313, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 9}}, {"id": 315, "type": "init_declarator", "text": "ID_B01 = 201", "parent": 313, "children": [316, 317, 318], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 22}}, {"id": 316, "type": "identifier", "text": "ID_B01", "parent": 315, "children": [], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 16}}, {"id": 317, "type": "=", "text": "=", "parent": 315, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 18}}, {"id": 318, "type": "number_literal", "text": "201", "parent": 315, "children": [], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 22}}, {"id": 319, "type": "declaration", "text": "const int ID_B02 = 202;", "parent": null, "children": [320, 321], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 23}}, {"id": 320, "type": "primitive_type", "text": "int", "parent": 319, "children": [], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 9}}, {"id": 321, "type": "init_declarator", "text": "ID_B02 = 202", "parent": 319, "children": [322, 323, 324], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 22}}, {"id": 322, "type": "identifier", "text": "ID_B02", "parent": 321, "children": [], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 16}}, {"id": 323, "type": "=", "text": "=", "parent": 321, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 18}}, {"id": 324, "type": "number_literal", "text": "202", "parent": 321, "children": [], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 22}}, {"id": 325, "type": "declaration", "text": "const int ID_B10 = 210;", "parent": null, "children": [326, 327], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 23}}, {"id": 326, "type": "primitive_type", "text": "int", "parent": 325, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 9}}, {"id": 327, "type": "init_declarator", "text": "ID_B10 = 210", "parent": 325, "children": [328, 329, 330], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 22}}, {"id": 328, "type": "identifier", "text": "ID_B10", "parent": 327, "children": [], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 16}}, {"id": 329, "type": "=", "text": "=", "parent": 327, "children": [], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 18}}, {"id": 330, "type": "number_literal", "text": "210", "parent": 327, "children": [], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 22}}, {"id": 331, "type": "declaration", "text": "const int ID_B11 = 211;", "parent": null, "children": [332, 333], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 23}}, {"id": 332, "type": "primitive_type", "text": "int", "parent": 331, "children": [], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 9}}, {"id": 333, "type": "init_declarator", "text": "ID_B11 = 211", "parent": 331, "children": [334, 335, 336], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 22}}, {"id": 334, "type": "identifier", "text": "ID_B11", "parent": 333, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 16}}, {"id": 335, "type": "=", "text": "=", "parent": 333, "children": [], "start_point": {"row": 70, "column": 17}, "end_point": {"row": 70, "column": 18}}, {"id": 336, "type": "number_literal", "text": "211", "parent": 333, "children": [], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 22}}, {"id": 337, "type": "declaration", "text": "const int ID_B12 = 212;", "parent": null, "children": [338, 339], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 23}}, {"id": 338, "type": "primitive_type", "text": "int", "parent": 337, "children": [], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 9}}, {"id": 339, "type": "init_declarator", "text": "ID_B12 = 212", "parent": 337, "children": [340, 341, 342], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 22}}, {"id": 340, "type": "identifier", "text": "ID_B12", "parent": 339, "children": [], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 16}}, {"id": 341, "type": "=", "text": "=", "parent": 339, "children": [], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 18}}, {"id": 342, "type": "number_literal", "text": "212", "parent": 339, "children": [], "start_point": {"row": 71, "column": 19}, "end_point": {"row": 71, "column": 22}}, {"id": 343, "type": "declaration", "text": "const int ID_B20 = 220;", "parent": null, "children": [344, 345], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 23}}, {"id": 344, "type": "primitive_type", "text": "int", "parent": 343, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 9}}, {"id": 345, "type": "init_declarator", "text": "ID_B20 = 220", "parent": 343, "children": [346, 347, 348], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 22}}, {"id": 346, "type": "identifier", "text": "ID_B20", "parent": 345, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 16}}, {"id": 347, "type": "=", "text": "=", "parent": 345, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 18}}, {"id": 348, "type": "number_literal", "text": "220", "parent": 345, "children": [], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 22}}, {"id": 349, "type": "declaration", "text": "const int ID_B21 = 221;", "parent": null, "children": [350, 351], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 23}}, {"id": 350, "type": "primitive_type", "text": "int", "parent": 349, "children": [], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 9}}, {"id": 351, "type": "init_declarator", "text": "ID_B21 = 221", "parent": 349, "children": [352, 353, 354], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 22}}, {"id": 352, "type": "identifier", "text": "ID_B21", "parent": 351, "children": [], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 16}}, {"id": 353, "type": "=", "text": "=", "parent": 351, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 18}}, {"id": 354, "type": "number_literal", "text": "221", "parent": 351, "children": [], "start_point": {"row": 73, "column": 19}, "end_point": {"row": 73, "column": 22}}, {"id": 355, "type": "declaration", "text": "const int ID_B22 = 222;", "parent": null, "children": [356, 357], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 23}}, {"id": 356, "type": "primitive_type", "text": "int", "parent": 355, "children": [], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 9}}, {"id": 357, "type": "init_declarator", "text": "ID_B22 = 222", "parent": 355, "children": [358, 359, 360], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 22}}, {"id": 358, "type": "identifier", "text": "ID_B22", "parent": 357, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 16}}, {"id": 359, "type": "=", "text": "=", "parent": 357, "children": [], "start_point": {"row": 74, "column": 17}, "end_point": {"row": 74, "column": 18}}, {"id": 360, "type": "number_literal", "text": "222", "parent": 357, "children": [], "start_point": {"row": 74, "column": 19}, "end_point": {"row": 74, "column": 22}}]}, "node_categories": {"declarations": {"functions": [26, 41, 49, 57, 65, 73, 81, 89, 97, 102, 107, 112, 125, 130, 138, 143, 148, 153, 158, 163], "variables": [31, 39, 44, 47, 52, 55, 60, 63, 68, 71, 76, 79, 84, 87, 92, 95, 100, 105, 110, 115, 118, 123, 128, 133, 136, 141, 146, 151, 156, 161, 166, 171, 176, 181, 186, 191, 196, 201, 206, 211, 240, 243, 250, 253, 258, 262, 265, 271, 277, 283, 289, 295, 301, 307, 313, 319, 325, 331, 337, 343, 349, 355], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": [6, 7, 9, 10, 12, 14, 16, 18, 20, 22, 24]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [8, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 32, 33, 35, 37, 38, 42, 45, 46, 50, 53, 54, 58, 61, 62, 66, 69, 70, 74, 77, 78, 82, 86, 90, 94, 98, 103, 108, 113, 117, 119, 122, 126, 131, 134, 135, 139, 144, 149, 154, 159, 164, 167, 170, 172, 175, 177, 180, 182, 185, 187, 190, 192, 195, 198, 199, 200, 202, 205, 207, 210, 212, 215, 218, 221, 224, 227, 230, 233, 236, 239, 242, 247, 252, 256, 260, 261, 263, 264, 268, 274, 280, 286, 292, 298, 304, 310, 316, 322, 328, 334, 340, 346, 352, 358], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 248, 249, 257, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 26, "universal_type": "function", "name": "TicTacToe", "text_snippet": "class TicTacToe : public wxFrame\n{\npublic:\n TicTacToe(const wxString& title);\n void OnClick(wxComm"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "OnClick(wxCommandEvent& event)"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "OnNewGame(wxCommandEvent& event)"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "OnAbout(wxCommandEvent& event)"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "OnExit(wxCommandEvent& event)"}, {"node_id": 73, "universal_type": "function", "name": "unknown", "text_snippet": "OnCCO(wxCommandEvent& event)"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "EnableButtons(bool e)"}, {"node_id": 89, "universal_type": "function", "name": "unknown", "text_snippet": "DarkenButtons(bool e)"}, {"node_id": 97, "universal_type": "function", "name": "unknown", "text_snippet": "Reset()"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "IsWinOrDraw()"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "UpdatePlayerInfo()"}, {"node_id": 112, "universal_type": "function", "name": "unknown", "text_snippet": "MakeMove(int move, wxPoint* p)"}, {"node_id": 125, "universal_type": "function", "name": "unknown", "text_snippet": "WinIfCan()"}, {"node_id": 130, "universal_type": "function", "name": "unknown", "text_snippet": "FillTheFirstBlank(wxString w)"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "HasToBlock()"}, {"node_id": 143, "universal_type": "function", "name": "unknown", "text_snippet": "BlockOpponent()"}, {"node_id": 148, "universal_type": "function", "name": "unknown", "text_snippet": "CanWin()"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "CheckIfWon()"}, {"node_id": 158, "universal_type": "function", "name": "unknown", "text_snippet": "CheckIfDraw()"}, {"node_id": 163, "universal_type": "function", "name": "unknown", "text_snippet": "UpdateScore()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <wx/wx.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"AboutDialog.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <wx/wx.h>\n#include \"AboutDialog.h\"\n\nenum WinLine\n{\n H_1,\n H_2,\n H_3,\n V_1,\n V_2,\n V_3,\n D_1,\n D_2\n};\n\nclass TicTacToe : public wxFrame\n{\npublic:\n TicTacToe(const wxString& title);\n void OnClick(wxCommandEvent& event);\n void OnNewGame(wxCommandEvent& event);\n void OnAbout(wxCommandEvent& event);\n void OnExit(wxCommandEvent& event);\n void OnCCO(wxCommandEvent& event);\n void EnableButtons(bool e);\n void DarkenButtons(bool e);\n void Reset();\n bool IsWinOrDraw();\n void UpdatePlayerInfo();\n void MakeMove(int move, wxPoint* p);\n void WinIfCan();\n void FillTheFirstBlank(wxString w);\n int HasToBlock();\n void BlockOpponent();\n int CanWin();\n bool CheckIfWon();\n bool CheckIfDraw();\n void UpdateScore();\n\n wxMenuBar *menubar;\n wxMenu *menuGame;\n\n wxBoxSizer *sizer;\n wxGridSizer *gs;\n wxTextCtrl *player;\n wxTextCtrl *score;\n int scoreX, scoreO, scoreTies;\n wxCheckBox *cCo;\n wxButton *bNew;\n wxButton *b00, *b01, *b02, *b10, *b11, *b12, *b20, *b21, *b22;\n char who;\n char v[3][3];\n int moves;\n char board[9];\n bool ComputerOpponent, hasAnyWon;\n WinLine wl;\n};\n\nconst int ID_TP = 100;\nconst int ID_TS = 101;\nconst int ID_BNG = 102;\nconst int ID_MNG = 103;\nconst int ID_MAB = 104;\nconst int ID_MEX = 105;\nconst int ID_CCO = 106;\n\nconst int ID_B00 = 200;\nconst int ID_B01 = 201;\nconst int ID_B02 = 202;\nconst int ID_B10 = 210;\nconst int ID_B11 = 211;\nconst int ID_B12 = 212;\nconst int ID_B20 = 220;\nconst int ID_B21 = 221;\nconst int ID_B22 = 222;\n"}
80,941
c
/* * params_test.h * * Created on: May 26, 2013 * Author: petera */ #ifndef PARAMS_TEST_H_ #define PARAMS_TEST_H_ //////////////// TEST PARAMS //////////////// // default test total emulated spi flash size #define PHYS_FLASH_SIZE (16*1024*1024) // default test spiffs file system size #define SPIFFS_FLASH_SIZE (2*1024*1024) // default test spiffs file system offset in emulated spi flash #define SPIFFS_PHYS_ADDR (4*1024*1024) // default test sector size #define SECTOR_SIZE 65536 // default test logical block size #define LOG_BLOCK (SECTOR_SIZE*2) // default test logical page size #define LOG_PAGE (SECTOR_SIZE/256) // default test number of filedescs #define DEFAULT_NUM_FD 8 // default test number of cache pages #define DEFAULT_NUM_CACHE_PAGES 8 // When testing, test bench create reference files for comparison on // the actual hard drive. By default, put these on ram drive for speed. #define TEST_PATH "/dev/shm/spiffs/test-data/" #define ASSERT(c, m) real_assert((c),(m), __FILE__, __LINE__); void real_assert(int c, const char *n, const char *file, int l); /////////// SPIFFS BUILD CONFIG //////////// // test using filesystem magic #define SPIFFS_USE_MAGIC 1 // test using filesystem magic length #define SPIFFS_USE_MAGIC_LENGTH 1 // test using extra param in callback #define SPIFFS_HAL_CALLBACK_EXTRA 1 // test using filehandle offset #define SPIFFS_FILEHDL_OFFSET 1 // use this offset #define TEST_SPIFFS_FILEHDL_OFFSET 0x1000 // dbg output #define SPIFFS_DBG(...) //printf(__VA_ARGS__) #define SPIFFS_GC_DBG(...) //printf(__VA_ARGS__) #define SPIFFS_CACHE_DBG(...) //printf(__VA_ARGS__) #define SPIFFS_CHECK_DBG(...) //printf(__VA_ARGS__) // needed types typedef signed int s32_t; typedef unsigned int u32_t; typedef signed short s16_t; typedef unsigned short u16_t; typedef signed char s8_t; typedef unsigned char u8_t; #endif /* PARAMS_TEST_H_ */
35.31
54
(translation_unit) "/*\n * params_test.h\n *\n * Created on: May 26, 2013\n * Author: petera\n */\n\n#ifndef PARAMS_TEST_H_\n#define PARAMS_TEST_H_\n\n//////////////// TEST PARAMS ////////////////\n\n// default test total emulated spi flash size\n#define PHYS_FLASH_SIZE (16*1024*1024)\n// default test spiffs file system size\n#define SPIFFS_FLASH_SIZE (2*1024*1024)\n// default test spiffs file system offset in emulated spi flash\n#define SPIFFS_PHYS_ADDR (4*1024*1024)\n// default test sector size\n#define SECTOR_SIZE 65536\n// default test logical block size\n#define LOG_BLOCK (SECTOR_SIZE*2)\n// default test logical page size\n#define LOG_PAGE (SECTOR_SIZE/256)\n// default test number of filedescs\n#define DEFAULT_NUM_FD 8\n// default test number of cache pages\n#define DEFAULT_NUM_CACHE_PAGES 8\n\n// When testing, test bench create reference files for comparison on\n// the actual hard drive. By default, put these on ram drive for speed.\n#define TEST_PATH "/dev/shm/spiffs/test-data/"\n\n#define ASSERT(c, m) real_assert((c),(m), __FILE__, __LINE__);\nvoid real_assert(int c, const char *n, const char *file, int l);\n\n/////////// SPIFFS BUILD CONFIG ////////////\n\n// test using filesystem magic\n#define SPIFFS_USE_MAGIC 1\n// test using filesystem magic length\n#define SPIFFS_USE_MAGIC_LENGTH 1\n// test using extra param in callback\n#define SPIFFS_HAL_CALLBACK_EXTRA 1\n// test using filehandle offset\n#define SPIFFS_FILEHDL_OFFSET 1\n// use this offset\n#define TEST_SPIFFS_FILEHDL_OFFSET 0x1000\n\n// dbg output\n#define SPIFFS_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_GC_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_CACHE_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_CHECK_DBG(...) //printf(__VA_ARGS__)\n\n// needed types\ntypedef signed int s32_t;\ntypedef unsigned int u32_t;\ntypedef signed short s16_t;\ntypedef unsigned short u16_t;\ntypedef signed char s8_t;\ntypedef unsigned char u8_t;\n\n#endif /* PARAMS_TEST_H_ */\n" (comment) "/*\n * params_test.h\n *\n * Created on: May 26, 2013\n * Author: petera\n */" (preproc_ifdef) "#ifndef PARAMS_TEST_H_\n#define PARAMS_TEST_H_\n\n//////////////// TEST PARAMS ////////////////\n\n// default test total emulated spi flash size\n#define PHYS_FLASH_SIZE (16*1024*1024)\n// default test spiffs file system size\n#define SPIFFS_FLASH_SIZE (2*1024*1024)\n// default test spiffs file system offset in emulated spi flash\n#define SPIFFS_PHYS_ADDR (4*1024*1024)\n// default test sector size\n#define SECTOR_SIZE 65536\n// default test logical block size\n#define LOG_BLOCK (SECTOR_SIZE*2)\n// default test logical page size\n#define LOG_PAGE (SECTOR_SIZE/256)\n// default test number of filedescs\n#define DEFAULT_NUM_FD 8\n// default test number of cache pages\n#define DEFAULT_NUM_CACHE_PAGES 8\n\n// When testing, test bench create reference files for comparison on\n// the actual hard drive. By default, put these on ram drive for speed.\n#define TEST_PATH "/dev/shm/spiffs/test-data/"\n\n#define ASSERT(c, m) real_assert((c),(m), __FILE__, __LINE__);\nvoid real_assert(int c, const char *n, const char *file, int l);\n\n/////////// SPIFFS BUILD CONFIG ////////////\n\n// test using filesystem magic\n#define SPIFFS_USE_MAGIC 1\n// test using filesystem magic length\n#define SPIFFS_USE_MAGIC_LENGTH 1\n// test using extra param in callback\n#define SPIFFS_HAL_CALLBACK_EXTRA 1\n// test using filehandle offset\n#define SPIFFS_FILEHDL_OFFSET 1\n// use this offset\n#define TEST_SPIFFS_FILEHDL_OFFSET 0x1000\n\n// dbg output\n#define SPIFFS_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_GC_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_CACHE_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_CHECK_DBG(...) //printf(__VA_ARGS__)\n\n// needed types\ntypedef signed int s32_t;\ntypedef unsigned int u32_t;\ntypedef signed short s16_t;\ntypedef unsigned short u16_t;\ntypedef signed char s8_t;\ntypedef unsigned char u8_t;\n\n#endif" (#ifndef) "#ifndef" (identifier) "PARAMS_TEST_H_" (preproc_def) "#define PARAMS_TEST_H_\n" (#define) "#define" (identifier) "PARAMS_TEST_H_" (comment) "//////////////// TEST PARAMS ////////////////" (comment) "// default test total emulated spi flash size" (preproc_def) "#define PHYS_FLASH_SIZE (16*1024*1024)\n" (#define) "#define" (identifier) "PHYS_FLASH_SIZE" (preproc_arg) "(16*1024*1024)" (comment) "// default test spiffs file system size" (preproc_def) "#define SPIFFS_FLASH_SIZE (2*1024*1024)\n" (#define) "#define" (identifier) "SPIFFS_FLASH_SIZE" (preproc_arg) "(2*1024*1024)" (comment) "// default test spiffs file system offset in emulated spi flash" (preproc_def) "#define SPIFFS_PHYS_ADDR (4*1024*1024)\n" (#define) "#define" (identifier) "SPIFFS_PHYS_ADDR" (preproc_arg) "(4*1024*1024)" (comment) "// default test sector size" (preproc_def) "#define SECTOR_SIZE 65536\n" (#define) "#define" (identifier) "SECTOR_SIZE" (preproc_arg) "65536" (comment) "// default test logical block size" (preproc_def) "#define LOG_BLOCK (SECTOR_SIZE*2)\n" (#define) "#define" (identifier) "LOG_BLOCK" (preproc_arg) "(SECTOR_SIZE*2)" (comment) "// default test logical page size" (preproc_def) "#define LOG_PAGE (SECTOR_SIZE/256)\n" (#define) "#define" (identifier) "LOG_PAGE" (preproc_arg) "(SECTOR_SIZE/256)" (comment) "// default test number of filedescs" (preproc_def) "#define DEFAULT_NUM_FD 8\n" (#define) "#define" (identifier) "DEFAULT_NUM_FD" (preproc_arg) "8" (comment) "// default test number of cache pages" (preproc_def) "#define DEFAULT_NUM_CACHE_PAGES 8\n" (#define) "#define" (identifier) "DEFAULT_NUM_CACHE_PAGES" (preproc_arg) "8" (comment) "// When testing, test bench create reference files for comparison on" (comment) "// the actual hard drive. By default, put these on ram drive for speed." (preproc_def) "#define TEST_PATH "/dev/shm/spiffs/test-data/"\n" (#define) "#define" (identifier) "TEST_PATH" (preproc_arg) ""/dev/shm/spiffs/test-data/"" (preproc_function_def) "#define ASSERT(c, m) real_assert((c),(m), __FILE__, __LINE__);\n" (#define) "#define" (identifier) "ASSERT" (preproc_params) "(c, m)" (() "(" (identifier) "c" (,) "," (identifier) "m" ()) ")" (preproc_arg) "real_assert((c),(m), __FILE__, __LINE__);" (declaration) "void real_assert(int c, const char *n, const char *file, int l);" (primitive_type) "void" (function_declarator) "real_assert(int c, const char *n, const char *file, int l)" (identifier) "real_assert" (parameter_list) "(int c, const char *n, const char *file, int l)" (() "(" (parameter_declaration) "int c" (primitive_type) "int" (identifier) "c" (,) "," (parameter_declaration) "const char *n" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*n" (*) "*" (identifier) "n" (,) "," (parameter_declaration) "const char *file" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*file" (*) "*" (identifier) "file" (,) "," (parameter_declaration) "int l" (primitive_type) "int" (identifier) "l" ()) ")" (;) ";" (comment) "/////////// SPIFFS BUILD CONFIG ////////////" (comment) "// test using filesystem magic" (preproc_def) "#define SPIFFS_USE_MAGIC 1\n" (#define) "#define" (identifier) "SPIFFS_USE_MAGIC" (preproc_arg) "1" (comment) "// test using filesystem magic length" (preproc_def) "#define SPIFFS_USE_MAGIC_LENGTH 1\n" (#define) "#define" (identifier) "SPIFFS_USE_MAGIC_LENGTH" (preproc_arg) "1" (comment) "// test using extra param in callback" (preproc_def) "#define SPIFFS_HAL_CALLBACK_EXTRA 1\n" (#define) "#define" (identifier) "SPIFFS_HAL_CALLBACK_EXTRA" (preproc_arg) "1" (comment) "// test using filehandle offset" (preproc_def) "#define SPIFFS_FILEHDL_OFFSET 1\n" (#define) "#define" (identifier) "SPIFFS_FILEHDL_OFFSET" (preproc_arg) "1" (comment) "// use this offset" (preproc_def) "#define TEST_SPIFFS_FILEHDL_OFFSET 0x1000\n" (#define) "#define" (identifier) "TEST_SPIFFS_FILEHDL_OFFSET" (preproc_arg) "0x1000" (comment) "// dbg output" (preproc_function_def) "#define SPIFFS_DBG(...) //printf(__VA_ARGS__)\n" (#define) "#define" (identifier) "SPIFFS_DBG" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (comment) "//printf(__VA_ARGS__)" (preproc_function_def) "#define SPIFFS_GC_DBG(...) //printf(__VA_ARGS__)\n" (#define) "#define" (identifier) "SPIFFS_GC_DBG" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (comment) "//printf(__VA_ARGS__)" (preproc_function_def) "#define SPIFFS_CACHE_DBG(...) //printf(__VA_ARGS__)\n" (#define) "#define" (identifier) "SPIFFS_CACHE_DBG" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (comment) "//printf(__VA_ARGS__)" (preproc_function_def) "#define SPIFFS_CHECK_DBG(...) //printf(__VA_ARGS__)\n" (#define) "#define" (identifier) "SPIFFS_CHECK_DBG" (preproc_params) "(...)" (() "(" (...) "..." ()) ")" (comment) "//printf(__VA_ARGS__)" (comment) "// needed types" (type_definition) "typedef signed int s32_t;" (typedef) "typedef" (sized_type_specifier) "signed int" (signed) "signed" (primitive_type) "int" (type_identifier) "s32_t" (;) ";" (type_definition) "typedef unsigned int u32_t;" (typedef) "typedef" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (type_identifier) "u32_t" (;) ";" (type_definition) "typedef signed short s16_t;" (typedef) "typedef" (sized_type_specifier) "signed short" (signed) "signed" (short) "short" (type_identifier) "s16_t" (;) ";" (type_definition) "typedef unsigned short u16_t;" (typedef) "typedef" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (type_identifier) "u16_t" (;) ";" (type_definition) "typedef signed char s8_t;" (typedef) "typedef" (sized_type_specifier) "signed char" (signed) "signed" (primitive_type) "char" (type_identifier) "s8_t" (;) ";" (type_definition) "typedef unsigned char u8_t;" (typedef) "typedef" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (type_identifier) "u8_t" (;) ";" (#endif) "#endif" (comment) "/* PARAMS_TEST_H_ */"
200
0
{"language": "c", "success": true, "metadata": {"lines": 54, "avg_line_length": 35.31, "nodes": 143, "errors": 0, "source_hash": "cfe8209f2cf439ec8ba8cd0f6a9d81340b333626839f55beae89fd17f1807eff", "categorized_nodes": 60}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef PARAMS_TEST_H_\n#define PARAMS_TEST_H_\n\n//////////////// TEST PARAMS ////////////////\n\n// default test total emulated spi flash size\n#define PHYS_FLASH_SIZE (16*1024*1024)\n// default test spiffs file system size\n#define SPIFFS_FLASH_SIZE (2*1024*1024)\n// default test spiffs file system offset in emulated spi flash\n#define SPIFFS_PHYS_ADDR (4*1024*1024)\n// default test sector size\n#define SECTOR_SIZE 65536\n// default test logical block size\n#define LOG_BLOCK (SECTOR_SIZE*2)\n// default test logical page size\n#define LOG_PAGE (SECTOR_SIZE/256)\n// default test number of filedescs\n#define DEFAULT_NUM_FD 8\n// default test number of cache pages\n#define DEFAULT_NUM_CACHE_PAGES 8\n\n// When testing, test bench create reference files for comparison on\n// the actual hard drive. By default, put these on ram drive for speed.\n#define TEST_PATH \"/dev/shm/spiffs/test-data/\"\n\n#define ASSERT(c, m) real_assert((c),(m), __FILE__, __LINE__);\nvoid real_assert(int c, const char *n, const char *file, int l);\n\n/////////// SPIFFS BUILD CONFIG ////////////\n\n// test using filesystem magic\n#define SPIFFS_USE_MAGIC 1\n// test using filesystem magic length\n#define SPIFFS_USE_MAGIC_LENGTH 1\n// test using extra param in callback\n#define SPIFFS_HAL_CALLBACK_EXTRA 1\n// test using filehandle offset\n#define SPIFFS_FILEHDL_OFFSET 1\n// use this offset\n#define TEST_SPIFFS_FILEHDL_OFFSET 0x1000\n\n// dbg output\n#define SPIFFS_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_GC_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_CACHE_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_CHECK_DBG(...) //printf(__VA_ARGS__)\n\n// needed types\ntypedef signed int s32_t;\ntypedef unsigned int u32_t;\ntypedef signed short s16_t;\ntypedef unsigned short u16_t;\ntypedef signed char s8_t;\ntypedef unsigned char u8_t;\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 49, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 112, 118, 124, 130, 136, 142], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 63, "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": "PARAMS_TEST_H_", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define PARAMS_TEST_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": "PARAMS_TEST_H_", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 22}}, {"id": 6, "type": "preproc_def", "text": "#define PHYS_FLASH_SIZE (16*1024*1024)\n", "parent": 0, "children": [7, 8, 9], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 8, "type": "identifier", "text": "PHYS_FLASH_SIZE", "parent": 6, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 23}}, {"id": 9, "type": "preproc_arg", "text": "(16*1024*1024)", "parent": 6, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 44}}, {"id": 10, "type": "preproc_def", "text": "#define SPIFFS_FLASH_SIZE (2*1024*1024)\n", "parent": 0, "children": [11, 12, 13], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 11, "type": "#define", "text": "#define", "parent": 10, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 12, "type": "identifier", "text": "SPIFFS_FLASH_SIZE", "parent": 10, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 25}}, {"id": 13, "type": "preproc_arg", "text": "(2*1024*1024)", "parent": 10, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 43}}, {"id": 14, "type": "preproc_def", "text": "#define SPIFFS_PHYS_ADDR (4*1024*1024)\n", "parent": 0, "children": [15, 16, 17], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 15, "type": "#define", "text": "#define", "parent": 14, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 16, "type": "identifier", "text": "SPIFFS_PHYS_ADDR", "parent": 14, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 24}}, {"id": 17, "type": "preproc_arg", "text": "(4*1024*1024)", "parent": 14, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 43}}, {"id": 18, "type": "preproc_def", "text": "#define SECTOR_SIZE 65536\n", "parent": 0, "children": [19, 20, 21], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 19, "type": "#define", "text": "#define", "parent": 18, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 20, "type": "identifier", "text": "SECTOR_SIZE", "parent": 18, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 19}}, {"id": 21, "type": "preproc_arg", "text": "65536", "parent": 18, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 33}}, {"id": 22, "type": "preproc_def", "text": "#define LOG_BLOCK (SECTOR_SIZE*2)\n", "parent": 0, "children": [23, 24, 25], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 23, "type": "#define", "text": "#define", "parent": 22, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 24, "type": "identifier", "text": "LOG_BLOCK", "parent": 22, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 17}}, {"id": 25, "type": "preproc_arg", "text": "(SECTOR_SIZE*2)", "parent": 22, "children": [], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 43}}, {"id": 26, "type": "preproc_def", "text": "#define LOG_PAGE (SECTOR_SIZE/256)\n", "parent": 0, "children": [27, 28, 29], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 27, "type": "#define", "text": "#define", "parent": 26, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 28, "type": "identifier", "text": "LOG_PAGE", "parent": 26, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 16}}, {"id": 29, "type": "preproc_arg", "text": "(SECTOR_SIZE/256)", "parent": 26, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 45}}, {"id": 30, "type": "preproc_def", "text": "#define DEFAULT_NUM_FD 8\n", "parent": 0, "children": [31, 32, 33], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 31, "type": "#define", "text": "#define", "parent": 30, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 32, "type": "identifier", "text": "DEFAULT_NUM_FD", "parent": 30, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 22}}, {"id": 33, "type": "preproc_arg", "text": "8", "parent": 30, "children": [], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 35}}, {"id": 34, "type": "preproc_def", "text": "#define DEFAULT_NUM_CACHE_PAGES 8\n", "parent": 0, "children": [35, 36, 37], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 35, "type": "#define", "text": "#define", "parent": 34, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 36, "type": "identifier", "text": "DEFAULT_NUM_CACHE_PAGES", "parent": 34, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 31}}, {"id": 37, "type": "preproc_arg", "text": "8", "parent": 34, "children": [], "start_point": {"row": 27, "column": 34}, "end_point": {"row": 27, "column": 35}}, {"id": 38, "type": "preproc_def", "text": "#define TEST_PATH \"/dev/shm/spiffs/test-data/\"\n", "parent": 0, "children": [39, 40, 41], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 39, "type": "#define", "text": "#define", "parent": 38, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 40, "type": "identifier", "text": "TEST_PATH", "parent": 38, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 17}}, {"id": 41, "type": "preproc_arg", "text": "\"/dev/shm/spiffs/test-data/\"", "parent": 38, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 46}}, {"id": 42, "type": "preproc_function_def", "text": "#define ASSERT(c, m) real_assert((c),(m), __FILE__, __LINE__);\n", "parent": 0, "children": [43, 44, 45, 48], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 43, "type": "#define", "text": "#define", "parent": 42, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 44, "type": "identifier", "text": "ASSERT", "parent": 42, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 14}}, {"id": 45, "type": "preproc_params", "text": "(c, m)", "parent": 42, "children": [46, 47], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 20}}, {"id": 46, "type": "identifier", "text": "c", "parent": 45, "children": [], "start_point": {"row": 33, "column": 15}, "end_point": {"row": 33, "column": 16}}, {"id": 47, "type": "identifier", "text": "m", "parent": 45, "children": [], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 19}}, {"id": 48, "type": "preproc_arg", "text": "real_assert((c),(m), __FILE__, __LINE__);", "parent": 42, "children": [], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 62}}, {"id": 49, "type": "declaration", "text": "void real_assert(int c, const char *n, const char *file, int l);", "parent": 0, "children": [50, 51], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 64}}, {"id": 50, "type": "primitive_type", "text": "void", "parent": 49, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 4}}, {"id": 51, "type": "function_declarator", "text": "real_assert(int c, const char *n, const char *file, int l)", "parent": 49, "children": [52, 53], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 63}}, {"id": 52, "type": "identifier", "text": "real_assert", "parent": 51, "children": [], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 16}}, {"id": 53, "type": "parameter_list", "text": "(int c, const char *n, const char *file, int l)", "parent": 51, "children": [54, 57, 62, 67], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 63}}, {"id": 54, "type": "parameter_declaration", "text": "int c", "parent": 53, "children": [55, 56], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 22}}, {"id": 55, "type": "primitive_type", "text": "int", "parent": 54, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 20}}, {"id": 56, "type": "identifier", "text": "c", "parent": 54, "children": [], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 22}}, {"id": 57, "type": "parameter_declaration", "text": "const char *n", "parent": 53, "children": [58, 59], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 37}}, {"id": 58, "type": "primitive_type", "text": "char", "parent": 57, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 34}}, {"id": 59, "type": "pointer_declarator", "text": "*n", "parent": 57, "children": [60, 61], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 37}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 36}}, {"id": 61, "type": "identifier", "text": "n", "parent": 59, "children": [], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 37}}, {"id": 62, "type": "parameter_declaration", "text": "const char *file", "parent": 53, "children": [63, 64], "start_point": {"row": 34, "column": 39}, "end_point": {"row": 34, "column": 55}}, {"id": 63, "type": "primitive_type", "text": "char", "parent": 62, "children": [], "start_point": {"row": 34, "column": 45}, "end_point": {"row": 34, "column": 49}}, {"id": 64, "type": "pointer_declarator", "text": "*file", "parent": 62, "children": [65, 66], "start_point": {"row": 34, "column": 50}, "end_point": {"row": 34, "column": 55}}, {"id": 65, "type": "*", "text": "*", "parent": 64, "children": [], "start_point": {"row": 34, "column": 50}, "end_point": {"row": 34, "column": 51}}, {"id": 66, "type": "identifier", "text": "file", "parent": 64, "children": [], "start_point": {"row": 34, "column": 51}, "end_point": {"row": 34, "column": 55}}, {"id": 67, "type": "parameter_declaration", "text": "int l", "parent": 53, "children": [68, 69], "start_point": {"row": 34, "column": 57}, "end_point": {"row": 34, "column": 62}}, {"id": 68, "type": "primitive_type", "text": "int", "parent": 67, "children": [], "start_point": {"row": 34, "column": 57}, "end_point": {"row": 34, "column": 60}}, {"id": 69, "type": "identifier", "text": "l", "parent": 67, "children": [], "start_point": {"row": 34, "column": 61}, "end_point": {"row": 34, "column": 62}}, {"id": 70, "type": "preproc_def", "text": "#define SPIFFS_USE_MAGIC 1\n", "parent": 0, "children": [71, 72, 73], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 71, "type": "#define", "text": "#define", "parent": 70, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 7}}, {"id": 72, "type": "identifier", "text": "SPIFFS_USE_MAGIC", "parent": 70, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 24}}, {"id": 73, "type": "preproc_arg", "text": "1", "parent": 70, "children": [], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 29}}, {"id": 74, "type": "preproc_def", "text": "#define SPIFFS_USE_MAGIC_LENGTH 1\n", "parent": 0, "children": [75, 76, 77], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 0}}, {"id": 75, "type": "#define", "text": "#define", "parent": 74, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 7}}, {"id": 76, "type": "identifier", "text": "SPIFFS_USE_MAGIC_LENGTH", "parent": 74, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 31}}, {"id": 77, "type": "preproc_arg", "text": "1", "parent": 74, "children": [], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 35}}, {"id": 78, "type": "preproc_def", "text": "#define SPIFFS_HAL_CALLBACK_EXTRA 1\n", "parent": 0, "children": [79, 80, 81], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 79, "type": "#define", "text": "#define", "parent": 78, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 80, "type": "identifier", "text": "SPIFFS_HAL_CALLBACK_EXTRA", "parent": 78, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 33}}, {"id": 81, "type": "preproc_arg", "text": "1", "parent": 78, "children": [], "start_point": {"row": 43, "column": 40}, "end_point": {"row": 43, "column": 41}}, {"id": 82, "type": "preproc_def", "text": "#define SPIFFS_FILEHDL_OFFSET 1\n", "parent": 0, "children": [83, 84, 85], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 0}}, {"id": 83, "type": "#define", "text": "#define", "parent": 82, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 7}}, {"id": 84, "type": "identifier", "text": "SPIFFS_FILEHDL_OFFSET", "parent": 82, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 29}}, {"id": 85, "type": "preproc_arg", "text": "1", "parent": 82, "children": [], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 41}}, {"id": 86, "type": "preproc_def", "text": "#define TEST_SPIFFS_FILEHDL_OFFSET 0x1000\n", "parent": 0, "children": [87, 88, 89], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 48, "column": 0}}, {"id": 87, "type": "#define", "text": "#define", "parent": 86, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 7}}, {"id": 88, "type": "identifier", "text": "TEST_SPIFFS_FILEHDL_OFFSET", "parent": 86, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 34}}, {"id": 89, "type": "preproc_arg", "text": "0x1000", "parent": 86, "children": [], "start_point": {"row": 47, "column": 40}, "end_point": {"row": 47, "column": 46}}, {"id": 90, "type": "preproc_function_def", "text": "#define SPIFFS_DBG(...) //printf(__VA_ARGS__)\n", "parent": 0, "children": [91, 92, 93], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 0}}, {"id": 91, "type": "#define", "text": "#define", "parent": 90, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 7}}, {"id": 92, "type": "identifier", "text": "SPIFFS_DBG", "parent": 90, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 18}}, {"id": 93, "type": "preproc_params", "text": "(...)", "parent": 90, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 23}}, {"id": 94, "type": "preproc_function_def", "text": "#define SPIFFS_GC_DBG(...) //printf(__VA_ARGS__)\n", "parent": 0, "children": [95, 96, 97], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 52, "column": 0}}, {"id": 95, "type": "#define", "text": "#define", "parent": 94, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 7}}, {"id": 96, "type": "identifier", "text": "SPIFFS_GC_DBG", "parent": 94, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 21}}, {"id": 97, "type": "preproc_params", "text": "(...)", "parent": 94, "children": [], "start_point": {"row": 51, "column": 21}, "end_point": {"row": 51, "column": 26}}, {"id": 98, "type": "preproc_function_def", "text": "#define SPIFFS_CACHE_DBG(...) //printf(__VA_ARGS__)\n", "parent": 0, "children": [99, 100, 101], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 0}}, {"id": 99, "type": "#define", "text": "#define", "parent": 98, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 7}}, {"id": 100, "type": "identifier", "text": "SPIFFS_CACHE_DBG", "parent": 98, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 24}}, {"id": 101, "type": "preproc_params", "text": "(...)", "parent": 98, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 29}}, {"id": 102, "type": "preproc_function_def", "text": "#define SPIFFS_CHECK_DBG(...) //printf(__VA_ARGS__)\n", "parent": 0, "children": [103, 104, 105], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 54, "column": 0}}, {"id": 103, "type": "#define", "text": "#define", "parent": 102, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 7}}, {"id": 104, "type": "identifier", "text": "SPIFFS_CHECK_DBG", "parent": 102, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 24}}, {"id": 105, "type": "preproc_params", "text": "(...)", "parent": 102, "children": [], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 29}}, {"id": 106, "type": "type_definition", "text": "typedef signed int s32_t;", "parent": 0, "children": [107, 108, 111], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 25}}, {"id": 107, "type": "typedef", "text": "typedef", "parent": 106, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 7}}, {"id": 108, "type": "sized_type_specifier", "text": "signed int", "parent": 106, "children": [109, 110], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 18}}, {"id": 109, "type": "signed", "text": "signed", "parent": 108, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 14}}, {"id": 110, "type": "primitive_type", "text": "int", "parent": 108, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 18}}, {"id": 111, "type": "type_identifier", "text": "s32_t", "parent": 106, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 24}}, {"id": 112, "type": "type_definition", "text": "typedef unsigned int u32_t;", "parent": 0, "children": [113, 114, 117], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 27}}, {"id": 113, "type": "typedef", "text": "typedef", "parent": 112, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 7}}, {"id": 114, "type": "sized_type_specifier", "text": "unsigned int", "parent": 112, "children": [115, 116], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 20}}, {"id": 115, "type": "unsigned", "text": "unsigned", "parent": 114, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 16}}, {"id": 116, "type": "primitive_type", "text": "int", "parent": 114, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 20}}, {"id": 117, "type": "type_identifier", "text": "u32_t", "parent": 112, "children": [], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 26}}, {"id": 118, "type": "type_definition", "text": "typedef signed short s16_t;", "parent": 0, "children": [119, 120, 123], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 27}}, {"id": 119, "type": "typedef", "text": "typedef", "parent": 118, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 7}}, {"id": 120, "type": "sized_type_specifier", "text": "signed short", "parent": 118, "children": [121, 122], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 20}}, {"id": 121, "type": "signed", "text": "signed", "parent": 120, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 14}}, {"id": 122, "type": "short", "text": "short", "parent": 120, "children": [], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 20}}, {"id": 123, "type": "type_identifier", "text": "s16_t", "parent": 118, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 26}}, {"id": 124, "type": "type_definition", "text": "typedef unsigned short u16_t;", "parent": 0, "children": [125, 126, 129], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 29}}, {"id": 125, "type": "typedef", "text": "typedef", "parent": 124, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 7}}, {"id": 126, "type": "sized_type_specifier", "text": "unsigned short", "parent": 124, "children": [127, 128], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 22}}, {"id": 127, "type": "unsigned", "text": "unsigned", "parent": 126, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 16}}, {"id": 128, "type": "short", "text": "short", "parent": 126, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 22}}, {"id": 129, "type": "type_identifier", "text": "u16_t", "parent": 124, "children": [], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 28}}, {"id": 130, "type": "type_definition", "text": "typedef signed char s8_t;", "parent": 0, "children": [131, 132, 135], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 25}}, {"id": 131, "type": "typedef", "text": "typedef", "parent": 130, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 7}}, {"id": 132, "type": "sized_type_specifier", "text": "signed char", "parent": 130, "children": [133, 134], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 19}}, {"id": 133, "type": "signed", "text": "signed", "parent": 132, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 14}}, {"id": 134, "type": "primitive_type", "text": "char", "parent": 132, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 19}}, {"id": 135, "type": "type_identifier", "text": "s8_t", "parent": 130, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 24}}, {"id": 136, "type": "type_definition", "text": "typedef unsigned char u8_t;", "parent": 0, "children": [137, 138, 141], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 27}}, {"id": 137, "type": "typedef", "text": "typedef", "parent": 136, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 7}}, {"id": 138, "type": "sized_type_specifier", "text": "unsigned char", "parent": 136, "children": [139, 140], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 21}}, {"id": 139, "type": "unsigned", "text": "unsigned", "parent": 138, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 16}}, {"id": 140, "type": "primitive_type", "text": "char", "parent": 138, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 21}}, {"id": 141, "type": "type_identifier", "text": "u8_t", "parent": 136, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 26}}, {"id": 142, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 6}}]}, "node_categories": {"declarations": {"functions": [42, 51, 90, 94, 98, 102], "variables": [49, 54, 57, 62, 67, 106, 112, 118, 124, 130, 136], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 46, 47, 52, 56, 61, 66, 69, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, 142], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "#define ASSERT(c, m) real_assert((c),(m), __FILE__, __LINE__);\n"}, {"node_id": 51, "universal_type": "function", "name": "l)", "text_snippet": "real_assert(int c, const char *n, const char *file, int l)"}, {"node_id": 90, "universal_type": "function", "name": "unknown", "text_snippet": "#define SPIFFS_DBG(...) //printf(__VA_ARGS__)\n"}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "#define SPIFFS_GC_DBG(...) //printf(__VA_ARGS__)\n"}, {"node_id": 98, "universal_type": "function", "name": "unknown", "text_snippet": "#define SPIFFS_CACHE_DBG(...) //printf(__VA_ARGS__)\n"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "#define SPIFFS_CHECK_DBG(...) //printf(__VA_ARGS__)\n"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/*\n * params_test.h\n *\n * Created on: May 26, 2013\n * Author: petera\n */\n\n#ifndef PARAMS_TEST_H_\n#define PARAMS_TEST_H_\n\n//////////////// TEST PARAMS ////////////////\n\n// default test total emulated spi flash size\n#define PHYS_FLASH_SIZE (16*1024*1024)\n// default test spiffs file system size\n#define SPIFFS_FLASH_SIZE (2*1024*1024)\n// default test spiffs file system offset in emulated spi flash\n#define SPIFFS_PHYS_ADDR (4*1024*1024)\n// default test sector size\n#define SECTOR_SIZE 65536\n// default test logical block size\n#define LOG_BLOCK (SECTOR_SIZE*2)\n// default test logical page size\n#define LOG_PAGE (SECTOR_SIZE/256)\n// default test number of filedescs\n#define DEFAULT_NUM_FD 8\n// default test number of cache pages\n#define DEFAULT_NUM_CACHE_PAGES 8\n\n// When testing, test bench create reference files for comparison on\n// the actual hard drive. By default, put these on ram drive for speed.\n#define TEST_PATH \"/dev/shm/spiffs/test-data/\"\n\n#define ASSERT(c, m) real_assert((c),(m), __FILE__, __LINE__);\nvoid real_assert(int c, const char *n, const char *file, int l);\n\n/////////// SPIFFS BUILD CONFIG ////////////\n\n// test using filesystem magic\n#define SPIFFS_USE_MAGIC 1\n// test using filesystem magic length\n#define SPIFFS_USE_MAGIC_LENGTH 1\n// test using extra param in callback\n#define SPIFFS_HAL_CALLBACK_EXTRA 1\n// test using filehandle offset\n#define SPIFFS_FILEHDL_OFFSET 1\n// use this offset\n#define TEST_SPIFFS_FILEHDL_OFFSET 0x1000\n\n// dbg output\n#define SPIFFS_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_GC_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_CACHE_DBG(...) //printf(__VA_ARGS__)\n#define SPIFFS_CHECK_DBG(...) //printf(__VA_ARGS__)\n\n// needed types\ntypedef signed int s32_t;\ntypedef unsigned int u32_t;\ntypedef signed short s16_t;\ntypedef unsigned short u16_t;\ntypedef signed char s8_t;\ntypedef unsigned char u8_t;\n\n#endif /* PARAMS_TEST_H_ */\n"}
80,942
c
#ifndef __SYSUTL_H__ #define __SYSUTL_H__ #include <time.h> #include <stdint.h> #include <stdio.h> #include <string> #include <vector> #include <map> #include "base.h" class sys_utl { public: static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles); static int open_tun_device(std::string & dev_name,bool persist_mode); static bool set_cloexec(int fd_handle); static std::string kernel_version(); static bool kernel_version(int & version_major, int & version_feature,int & version_minor); static int tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len); static int tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len); }; #endif
33.83
24
(translation_unit) "#ifndef __SYSUTL_H__ \n#define __SYSUTL_H__ \n \n#include <time.h> \n#include <stdint.h> \n#include <stdio.h> \n#include <string> \n#include <vector> \n#include <map> \n \n#include "base.h" \n \nclass sys_utl \n{ \npublic: \n static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles); \n static int open_tun_device(std::string & dev_name,bool persist_mode); \n static bool set_cloexec(int fd_handle); \n static std::string kernel_version(); \n static bool kernel_version(int & version_major, int & version_feature,int & version_minor); \n static int tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len); \n static int tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len); \n}; \n#endif \n \n" (preproc_ifdef) "#ifndef __SYSUTL_H__ \n#define __SYSUTL_H__ \n \n#include <time.h> \n#include <stdint.h> \n#include <stdio.h> \n#include <string> \n#include <vector> \n#include <map> \n \n#include "base.h" \n \nclass sys_utl \n{ \npublic: \n static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles); \n static int open_tun_device(std::string & dev_name,bool persist_mode); \n static bool set_cloexec(int fd_handle); \n static std::string kernel_version(); \n static bool kernel_version(int & version_major, int & version_feature,int & version_minor); \n static int tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len); \n static int tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len); \n}; \n#endif" (#ifndef) "#ifndef" (identifier) "__SYSUTL_H__" (preproc_def) "#define __SYSUTL_H__ \n" (#define) "#define" (identifier) "__SYSUTL_H__" (preproc_include) "#include <time.h> \n" (#include) "#include" (system_lib_string) "<time.h>" (preproc_include) "#include <stdint.h> \n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_include) "#include <stdio.h> \n" (#include) "#include" (system_lib_string) "<stdio.h>" (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 "base.h" \n" (#include) "#include" (string_literal) ""base.h"" (") """ (string_content) "base.h" (") """ (function_definition) "class sys_utl \n{ \npublic: \n static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles); \n static int open_tun_device(std::string & dev_name,bool persist_mode); \n static bool set_cloexec(int fd_handle); \n static std::string kernel_version(); \n static bool kernel_version(int & version_major, int & version_feature,int & version_minor); \n static int tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len); \n static int tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len); \n}" (type_identifier) "class" (identifier) "sys_utl" (compound_statement) "{ \npublic: \n static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles); \n static int open_tun_device(std::string & dev_name,bool persist_mode); \n static bool set_cloexec(int fd_handle); \n static std::string kernel_version(); \n static bool kernel_version(int & version_major, int & version_feature,int & version_minor); \n static int tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len); \n static int tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len); \n}" ({) "{" (labeled_statement) "public: \n static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles);" (statement_identifier) "public" (:) ":" (declaration) "static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles);" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles)" (identifier) "open_tun_mq_devivce" (parameter_list) "(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles)" (() "(" (parameter_declaration) "std::string & dev_name" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "dev_name" (,) "," (parameter_declaration) "int request_queues" (primitive_type) "int" (identifier) "request_queues" (,) "," (parameter_declaration) "std::vector<fd_handle_t> & queue_handles" (type_identifier) "std" (ERROR) "::vector<fd_handle_t> &" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "fd_handle_t" (>) ">" (&) "&" (identifier) "queue_handles" ()) ")" (;) ";" (declaration) "static int open_tun_device(std::string & dev_name,bool persist_mode);" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "open_tun_device(std::string & dev_name,bool persist_mode)" (identifier) "open_tun_device" (parameter_list) "(std::string & dev_name,bool persist_mode)" (() "(" (parameter_declaration) "std::string & dev_name" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "dev_name" (,) "," (parameter_declaration) "bool persist_mode" (primitive_type) "bool" (identifier) "persist_mode" ()) ")" (;) ";" (declaration) "static bool set_cloexec(int fd_handle);" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "set_cloexec(int fd_handle)" (identifier) "set_cloexec" (parameter_list) "(int fd_handle)" (() "(" (parameter_declaration) "int fd_handle" (primitive_type) "int" (identifier) "fd_handle" ()) ")" (;) ";" (declaration) "static std::string kernel_version();" (storage_class_specifier) "static" (static) "static" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (function_declarator) "kernel_version()" (identifier) "kernel_version" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static bool kernel_version(int & version_major, int & version_feature,int & version_minor);" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "kernel_version(int & version_major, int & version_feature,int & version_minor)" (identifier) "kernel_version" (parameter_list) "(int & version_major, int & version_feature,int & version_minor)" (() "(" (parameter_declaration) "int & version_major" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "version_major" (,) "," (parameter_declaration) "int & version_feature" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "version_feature" (,) "," (parameter_declaration) "int & version_minor" (primitive_type) "int" (ERROR) "&" (&) "&" (identifier) "version_minor" ()) ")" (;) ";" (declaration) "static int tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len);" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len)" (identifier) "tun_dev_write" (parameter_list) "(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len)" (() "(" (parameter_declaration) "fd_handle_t tun_dev_handle" (type_identifier) "fd_handle_t" (identifier) "tun_dev_handle" (,) "," (parameter_declaration) "void* ptr_ip_packet" (primitive_type) "void" (pointer_declarator) "* ptr_ip_packet" (*) "*" (identifier) "ptr_ip_packet" (,) "," (parameter_declaration) "const int32_t packet_len" (type_qualifier) "const" (const) "const" (primitive_type) "int32_t" (identifier) "packet_len" ()) ")" (;) ";" (declaration) "static int tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len);" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len)" (identifier) "tun_dev_read" (parameter_list) "(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len)" (() "(" (parameter_declaration) "fd_handle_t tun_dev_handle" (type_identifier) "fd_handle_t" (identifier) "tun_dev_handle" (,) "," (parameter_declaration) "void* ptr_ip_buffer" (primitive_type) "void" (pointer_declarator) "* ptr_ip_buffer" (*) "*" (identifier) "ptr_ip_buffer" (,) "," (parameter_declaration) "const int32_t buffer_len" (type_qualifier) "const" (const) "const" (primitive_type) "int32_t" (identifier) "buffer_len" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif"
203
7
{"language": "c", "success": true, "metadata": {"lines": 24, "avg_line_length": 33.83, "nodes": 126, "errors": 0, "source_hash": "1b8e28ed2ffa1ee2b50c4dddf259195f57ab89cb8dd57b1e3f09cb8d9cc7855b", "categorized_nodes": 90}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __SYSUTL_H__\r\n#define __SYSUTL_H__\r\n\r\n#include <time.h>\r\n#include <stdint.h>\r\n#include <stdio.h>\r\n#include <string>\r\n#include <vector>\r\n#include <map>\r\n\r\n#include \"base.h\"\r\n\r\nclass sys_utl\r\n{\r\npublic:\r\n static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles);\r\n static int open_tun_device(std::string & dev_name,bool persist_mode);\r\n static bool set_cloexec(int fd_handle);\r\n static std::string kernel_version();\r\n static bool kernel_version(int & version_major, int & version_feature,int & version_minor);\r\n static int tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len); \r\n static int tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len);\r\n};\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 125], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 23, "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": "__SYSUTL_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "preproc_def", "text": "#define __SYSUTL_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": "__SYSUTL_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include <time.h>\r\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": "<time.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <stdint.h>\r\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": "preproc_include", "text": "#include <stdio.h>\r\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": "<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>\r\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": "<string>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 17}}, {"id": 18, "type": "preproc_include", "text": "#include <vector>\r\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": "system_lib_string", "text": "<vector>", "parent": 18, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 17}}, {"id": 21, "type": "preproc_include", "text": "#include <map>\r\n", "parent": 0, "children": [22, 23], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<map>", "parent": 21, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 14}}, {"id": 24, "type": "preproc_include", "text": "#include \"base.h\"\r\n", "parent": 0, "children": [25, 26], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"base.h\"", "parent": 24, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 17}}, {"id": 27, "type": "function_definition", "text": "class sys_utl\r\n{\r\npublic:\r\n static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles);\r\n static int open_tun_device(std::string & dev_name,bool persist_mode);\r\n static bool set_cloexec(int fd_handle);\r\n static std::string kernel_version();\r\n static bool kernel_version(int & version_major, int & version_feature,int & version_minor);\r\n static int tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len); \r\n static int tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len);\r\n}", "parent": 0, "children": [28], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 28, "type": "identifier", "text": "sys_utl", "parent": 27, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 13}}, {"id": 29, "type": "labeled_statement", "text": "public:\r\n static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles);", "parent": 27, "children": [30], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 122}}, {"id": 30, "type": "declaration", "text": "static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles);", "parent": 29, "children": [31, 32], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 122}}, {"id": 31, "type": "primitive_type", "text": "int", "parent": 30, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 14}}, {"id": 32, "type": "function_declarator", "text": "open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles)", "parent": 30, "children": [33, 34], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 121}}, {"id": 33, "type": "identifier", "text": "open_tun_mq_devivce", "parent": 32, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 37}}, {"id": 34, "type": "parameter_list", "text": "(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles)", "parent": 32, "children": [35, 40, 43], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 121}}, {"id": 35, "type": "parameter_declaration", "text": "std::string & dev_name", "parent": 34, "children": [36, 37, 39], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 60}}, {"id": 36, "type": "type_identifier", "text": "std", "parent": 35, "children": [], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 41}}, {"id": 37, "type": "ERROR", "text": "::string &", "parent": 35, "children": [38], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 51}}, {"id": 38, "type": "identifier", "text": "string", "parent": 37, "children": [], "start_point": {"row": 15, "column": 43}, "end_point": {"row": 15, "column": 49}}, {"id": 39, "type": "identifier", "text": "dev_name", "parent": 35, "children": [], "start_point": {"row": 15, "column": 52}, "end_point": {"row": 15, "column": 60}}, {"id": 40, "type": "parameter_declaration", "text": "int request_queues", "parent": 34, "children": [41, 42], "start_point": {"row": 15, "column": 61}, "end_point": {"row": 15, "column": 79}}, {"id": 41, "type": "primitive_type", "text": "int", "parent": 40, "children": [], "start_point": {"row": 15, "column": 61}, "end_point": {"row": 15, "column": 64}}, {"id": 42, "type": "identifier", "text": "request_queues", "parent": 40, "children": [], "start_point": {"row": 15, "column": 65}, "end_point": {"row": 15, "column": 79}}, {"id": 43, "type": "parameter_declaration", "text": "std::vector<fd_handle_t> & queue_handles", "parent": 34, "children": [44, 45, 50], "start_point": {"row": 15, "column": 80}, "end_point": {"row": 15, "column": 120}}, {"id": 44, "type": "type_identifier", "text": "std", "parent": 43, "children": [], "start_point": {"row": 15, "column": 80}, "end_point": {"row": 15, "column": 83}}, {"id": 45, "type": "ERROR", "text": "::vector<fd_handle_t> &", "parent": 43, "children": [46, 47, 48, 49], "start_point": {"row": 15, "column": 83}, "end_point": {"row": 15, "column": 106}}, {"id": 46, "type": "identifier", "text": "vector", "parent": 45, "children": [], "start_point": {"row": 15, "column": 85}, "end_point": {"row": 15, "column": 91}}, {"id": 47, "type": "<", "text": "<", "parent": 45, "children": [], "start_point": {"row": 15, "column": 91}, "end_point": {"row": 15, "column": 92}}, {"id": 48, "type": "identifier", "text": "fd_handle_t", "parent": 45, "children": [], "start_point": {"row": 15, "column": 92}, "end_point": {"row": 15, "column": 103}}, {"id": 49, "type": ">", "text": ">", "parent": 45, "children": [], "start_point": {"row": 15, "column": 103}, "end_point": {"row": 15, "column": 104}}, {"id": 50, "type": "identifier", "text": "queue_handles", "parent": 43, "children": [], "start_point": {"row": 15, "column": 107}, "end_point": {"row": 15, "column": 120}}, {"id": 51, "type": "declaration", "text": "static int open_tun_device(std::string & dev_name,bool persist_mode);", "parent": 27, "children": [52, 53], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 78}}, {"id": 52, "type": "primitive_type", "text": "int", "parent": 51, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 14}}, {"id": 53, "type": "function_declarator", "text": "open_tun_device(std::string & dev_name,bool persist_mode)", "parent": 51, "children": [54, 55], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 77}}, {"id": 54, "type": "identifier", "text": "open_tun_device", "parent": 53, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 35}}, {"id": 55, "type": "parameter_list", "text": "(std::string & dev_name,bool persist_mode)", "parent": 53, "children": [56, 61], "start_point": {"row": 16, "column": 35}, "end_point": {"row": 16, "column": 77}}, {"id": 56, "type": "parameter_declaration", "text": "std::string & dev_name", "parent": 55, "children": [57, 58, 60], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 58}}, {"id": 57, "type": "type_identifier", "text": "std", "parent": 56, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 39}}, {"id": 58, "type": "ERROR", "text": "::string &", "parent": 56, "children": [59], "start_point": {"row": 16, "column": 39}, "end_point": {"row": 16, "column": 49}}, {"id": 59, "type": "identifier", "text": "string", "parent": 58, "children": [], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 47}}, {"id": 60, "type": "identifier", "text": "dev_name", "parent": 56, "children": [], "start_point": {"row": 16, "column": 50}, "end_point": {"row": 16, "column": 58}}, {"id": 61, "type": "parameter_declaration", "text": "bool persist_mode", "parent": 55, "children": [62, 63], "start_point": {"row": 16, "column": 59}, "end_point": {"row": 16, "column": 76}}, {"id": 62, "type": "primitive_type", "text": "bool", "parent": 61, "children": [], "start_point": {"row": 16, "column": 59}, "end_point": {"row": 16, "column": 63}}, {"id": 63, "type": "identifier", "text": "persist_mode", "parent": 61, "children": [], "start_point": {"row": 16, "column": 64}, "end_point": {"row": 16, "column": 76}}, {"id": 64, "type": "declaration", "text": "static bool set_cloexec(int fd_handle);", "parent": 27, "children": [65, 66], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 43}}, {"id": 65, "type": "primitive_type", "text": "bool", "parent": 64, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 15}}, {"id": 66, "type": "function_declarator", "text": "set_cloexec(int fd_handle)", "parent": 64, "children": [67, 68], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 42}}, {"id": 67, "type": "identifier", "text": "set_cloexec", "parent": 66, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 27}}, {"id": 68, "type": "parameter_list", "text": "(int fd_handle)", "parent": 66, "children": [69], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 42}}, {"id": 69, "type": "parameter_declaration", "text": "int fd_handle", "parent": 68, "children": [70, 71], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 41}}, {"id": 70, "type": "primitive_type", "text": "int", "parent": 69, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 31}}, {"id": 71, "type": "identifier", "text": "fd_handle", "parent": 69, "children": [], "start_point": {"row": 17, "column": 32}, "end_point": {"row": 17, "column": 41}}, {"id": 72, "type": "declaration", "text": "static std::string kernel_version();", "parent": 27, "children": [73, 74, 76], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 41}}, {"id": 73, "type": "type_identifier", "text": "std", "parent": 72, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 14}}, {"id": 74, "type": "ERROR", "text": "::string", "parent": 72, "children": [75], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 22}}, {"id": 75, "type": "identifier", "text": "string", "parent": 74, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 22}}, {"id": 76, "type": "function_declarator", "text": "kernel_version()", "parent": 72, "children": [77, 78], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 40}}, {"id": 77, "type": "identifier", "text": "kernel_version", "parent": 76, "children": [], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 38}}, {"id": 78, "type": "parameter_list", "text": "()", "parent": 76, "children": [], "start_point": {"row": 18, "column": 38}, "end_point": {"row": 18, "column": 40}}, {"id": 79, "type": "declaration", "text": "static bool kernel_version(int & version_major, int & version_feature,int & version_minor);", "parent": 27, "children": [80, 81], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 103}}, {"id": 80, "type": "primitive_type", "text": "bool", "parent": 79, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 15}}, {"id": 81, "type": "function_declarator", "text": "kernel_version(int & version_major, int & version_feature,int & version_minor)", "parent": 79, "children": [82, 83], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 102}}, {"id": 82, "type": "identifier", "text": "kernel_version", "parent": 81, "children": [], "start_point": {"row": 19, "column": 24}, "end_point": {"row": 19, "column": 38}}, {"id": 83, "type": "parameter_list", "text": "(int & version_major, int & version_feature,int & version_minor)", "parent": 81, "children": [84, 87, 90], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 102}}, {"id": 84, "type": "parameter_declaration", "text": "int & version_major", "parent": 83, "children": [85, 86], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 58}}, {"id": 85, "type": "primitive_type", "text": "int", "parent": 84, "children": [], "start_point": {"row": 19, "column": 39}, "end_point": {"row": 19, "column": 42}}, {"id": 86, "type": "identifier", "text": "version_major", "parent": 84, "children": [], "start_point": {"row": 19, "column": 45}, "end_point": {"row": 19, "column": 58}}, {"id": 87, "type": "parameter_declaration", "text": "int & version_feature", "parent": 83, "children": [88, 89], "start_point": {"row": 19, "column": 60}, "end_point": {"row": 19, "column": 81}}, {"id": 88, "type": "primitive_type", "text": "int", "parent": 87, "children": [], "start_point": {"row": 19, "column": 60}, "end_point": {"row": 19, "column": 63}}, {"id": 89, "type": "identifier", "text": "version_feature", "parent": 87, "children": [], "start_point": {"row": 19, "column": 66}, "end_point": {"row": 19, "column": 81}}, {"id": 90, "type": "parameter_declaration", "text": "int & version_minor", "parent": 83, "children": [91, 92], "start_point": {"row": 19, "column": 82}, "end_point": {"row": 19, "column": 101}}, {"id": 91, "type": "primitive_type", "text": "int", "parent": 90, "children": [], "start_point": {"row": 19, "column": 82}, "end_point": {"row": 19, "column": 85}}, {"id": 92, "type": "identifier", "text": "version_minor", "parent": 90, "children": [], "start_point": {"row": 19, "column": 88}, "end_point": {"row": 19, "column": 101}}, {"id": 93, "type": "declaration", "text": "static int tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len);", "parent": 27, "children": [94, 95], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 106}}, {"id": 94, "type": "primitive_type", "text": "int", "parent": 93, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 14}}, {"id": 95, "type": "function_declarator", "text": "tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len)", "parent": 93, "children": [96, 97], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 105}}, {"id": 96, "type": "identifier", "text": "tun_dev_write", "parent": 95, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 30}}, {"id": 97, "type": "parameter_list", "text": "(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len)", "parent": 95, "children": [98, 101, 106], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 105}}, {"id": 98, "type": "parameter_declaration", "text": "fd_handle_t tun_dev_handle", "parent": 97, "children": [99, 100], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 57}}, {"id": 99, "type": "type_identifier", "text": "fd_handle_t", "parent": 98, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 42}}, {"id": 100, "type": "identifier", "text": "tun_dev_handle", "parent": 98, "children": [], "start_point": {"row": 20, "column": 43}, "end_point": {"row": 20, "column": 57}}, {"id": 101, "type": "parameter_declaration", "text": "void* ptr_ip_packet", "parent": 97, "children": [102, 103], "start_point": {"row": 20, "column": 59}, "end_point": {"row": 20, "column": 78}}, {"id": 102, "type": "primitive_type", "text": "void", "parent": 101, "children": [], "start_point": {"row": 20, "column": 59}, "end_point": {"row": 20, "column": 63}}, {"id": 103, "type": "pointer_declarator", "text": "* ptr_ip_packet", "parent": 101, "children": [104, 105], "start_point": {"row": 20, "column": 63}, "end_point": {"row": 20, "column": 78}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 20, "column": 63}, "end_point": {"row": 20, "column": 64}}, {"id": 105, "type": "identifier", "text": "ptr_ip_packet", "parent": 103, "children": [], "start_point": {"row": 20, "column": 65}, "end_point": {"row": 20, "column": 78}}, {"id": 106, "type": "parameter_declaration", "text": "const int32_t packet_len", "parent": 97, "children": [107, 108], "start_point": {"row": 20, "column": 80}, "end_point": {"row": 20, "column": 104}}, {"id": 107, "type": "primitive_type", "text": "int32_t", "parent": 106, "children": [], "start_point": {"row": 20, "column": 86}, "end_point": {"row": 20, "column": 93}}, {"id": 108, "type": "identifier", "text": "packet_len", "parent": 106, "children": [], "start_point": {"row": 20, "column": 94}, "end_point": {"row": 20, "column": 104}}, {"id": 109, "type": "declaration", "text": "static int tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len);", "parent": 27, "children": [110, 111], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 104}}, {"id": 110, "type": "primitive_type", "text": "int", "parent": 109, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 14}}, {"id": 111, "type": "function_declarator", "text": "tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len)", "parent": 109, "children": [112, 113], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 103}}, {"id": 112, "type": "identifier", "text": "tun_dev_read", "parent": 111, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 29}}, {"id": 113, "type": "parameter_list", "text": "(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len)", "parent": 111, "children": [114, 117, 122], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 103}}, {"id": 114, "type": "parameter_declaration", "text": "fd_handle_t tun_dev_handle", "parent": 113, "children": [115, 116], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 56}}, {"id": 115, "type": "type_identifier", "text": "fd_handle_t", "parent": 114, "children": [], "start_point": {"row": 21, "column": 30}, "end_point": {"row": 21, "column": 41}}, {"id": 116, "type": "identifier", "text": "tun_dev_handle", "parent": 114, "children": [], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 56}}, {"id": 117, "type": "parameter_declaration", "text": "void* ptr_ip_buffer", "parent": 113, "children": [118, 119], "start_point": {"row": 21, "column": 57}, "end_point": {"row": 21, "column": 76}}, {"id": 118, "type": "primitive_type", "text": "void", "parent": 117, "children": [], "start_point": {"row": 21, "column": 57}, "end_point": {"row": 21, "column": 61}}, {"id": 119, "type": "pointer_declarator", "text": "* ptr_ip_buffer", "parent": 117, "children": [120, 121], "start_point": {"row": 21, "column": 61}, "end_point": {"row": 21, "column": 76}}, {"id": 120, "type": "*", "text": "*", "parent": 119, "children": [], "start_point": {"row": 21, "column": 61}, "end_point": {"row": 21, "column": 62}}, {"id": 121, "type": "identifier", "text": "ptr_ip_buffer", "parent": 119, "children": [], "start_point": {"row": 21, "column": 63}, "end_point": {"row": 21, "column": 76}}, {"id": 122, "type": "parameter_declaration", "text": "const int32_t buffer_len", "parent": 113, "children": [123, 124], "start_point": {"row": 21, "column": 78}, "end_point": {"row": 21, "column": 102}}, {"id": 123, "type": "primitive_type", "text": "int32_t", "parent": 122, "children": [], "start_point": {"row": 21, "column": 84}, "end_point": {"row": 21, "column": 91}}, {"id": 124, "type": "identifier", "text": "buffer_len", "parent": 122, "children": [], "start_point": {"row": 21, "column": 92}, "end_point": {"row": 21, "column": 102}}, {"id": 125, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}]}, "node_categories": {"declarations": {"functions": [27, 32, 53, 66, 76, 81, 95, 111], "variables": [30, 35, 40, 43, 51, 56, 61, 64, 69, 72, 79, 84, 87, 90, 93, 98, 101, 106, 109, 114, 117, 122], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 28, 33, 36, 38, 39, 42, 44, 46, 48, 50, 54, 57, 59, 60, 63, 67, 71, 73, 75, 77, 82, 86, 89, 92, 96, 99, 100, 105, 108, 112, 115, 116, 121, 124, 125], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 27, "universal_type": "function", "name": "sys_utl", "text_snippet": "class sys_utl\r\n{\r\npublic:\r\n static int open_tun_mq_devivce(std::string & dev_name,int request_"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handl"}, {"node_id": 53, "universal_type": "function", "name": "unknown", "text_snippet": "open_tun_device(std::string & dev_name,bool persist_mode)"}, {"node_id": 66, "universal_type": "function", "name": "unknown", "text_snippet": "set_cloexec(int fd_handle)"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "kernel_version()"}, {"node_id": 81, "universal_type": "function", "name": "&", "text_snippet": "kernel_version(int & version_major, int & version_feature,int & version_minor)"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len)"}, {"node_id": 111, "universal_type": "function", "name": "unknown", "text_snippet": "tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <time.h>\r\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdint.h>\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <stdio.h>\r\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <string>\r\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <vector>\r\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <map>\r\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"base.h\"\r\n"}, {"node_id": 25, "text": "#include"}]}, "original_source_code": "#ifndef __SYSUTL_H__\r\n#define __SYSUTL_H__\r\n\r\n#include <time.h>\r\n#include <stdint.h>\r\n#include <stdio.h>\r\n#include <string>\r\n#include <vector>\r\n#include <map>\r\n\r\n#include \"base.h\"\r\n\r\nclass sys_utl\r\n{\r\npublic:\r\n static int open_tun_mq_devivce(std::string & dev_name,int request_queues,std::vector<fd_handle_t> & queue_handles);\r\n static int open_tun_device(std::string & dev_name,bool persist_mode);\r\n static bool set_cloexec(int fd_handle);\r\n static std::string kernel_version();\r\n static bool kernel_version(int & version_major, int & version_feature,int & version_minor);\r\n static int tun_dev_write(fd_handle_t tun_dev_handle, void* ptr_ip_packet, const int32_t packet_len); \r\n static int tun_dev_read(fd_handle_t tun_dev_handle,void* ptr_ip_buffer, const int32_t buffer_len);\r\n};\r\n#endif\r\n\r\n"}
80,943
c
#import <Foundation/Foundation.h> @class XMPPStream; @class XMPPJID; @class XMPPUser; @class XMPPResource; @class XMPPIQ; @class XMPPMessage; @class XMPPPresence; @class MulticastDelegate; #if !TARGET_OS_IPHONE @class SCNotificationManager; #endif @interface XMPPClient : NSObject { MulticastDelegate *multicastDelegate; NSString *domain; UInt16 port; XMPPJID *myJID; NSString *password; int priority; Byte flags; XMPPStream *xmppStream; NSError *streamError; NSMutableDictionary *roster; XMPPUser *myUser; NSMutableArray *earlyPresenceElements; #if !TARGET_OS_IPHONE SCNotificationManager *scNotificationManager; #endif } - (id)init; - (void)addDelegate:(id)delegate; - (void)removeDelegate:(id)delegate; - (NSString *)domain; - (void)setDomain:(NSString *)domain; - (UInt16)port; - (void)setPort:(UInt16)port; - (BOOL)usesOldStyleSSL; - (void)setUsesOldStyleSSL:(BOOL)flag; - (XMPPJID *)myJID; - (void)setMyJID:(XMPPJID *)jid; - (NSString *)password; - (void)setPassword:(NSString *)password; - (int)priority; - (void)setPriority:(int)priority; - (BOOL)allowsSelfSignedCertificates; - (void)setAllowsSelfSignedCertificates:(BOOL)flag; - (BOOL)allowsSSLHostNameMismatch; - (void)setAllowsSSLHostNameMismatch:(BOOL)flag; - (BOOL)isDisconnected; - (BOOL)isConnected; - (BOOL)isSecure; - (NSError *)streamError; - (BOOL)autoLogin; - (void)setAutoLogin:(BOOL)flag; - (BOOL)autoRoster; - (void)setAutoRoster:(BOOL)flag; - (BOOL)autoPresence; - (void)setAutoPresence:(BOOL)flag; - (BOOL)autoReconnect; - (void)setAutoReconnect:(BOOL)flag; - (void)connect; - (void)disconnect; - (BOOL)supportsInBandRegistration; - (void)registerUser; - (BOOL)supportsPlainAuthentication; - (BOOL)supportsDigestMD5Authentication; - (BOOL)allowsPlaintextAuth; - (void)setAllowsPlaintextAuth:(BOOL)flag; - (void)authenticateUser; - (BOOL)isAuthenticated; - (void)goOnline; - (void)goOffline; - (void)fetchRoster; - (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName; - (void)removeBuddy:(XMPPJID *)jid; - (void)setNickname:(NSString *)nickname forBuddy:(XMPPJID *)jid; - (void)acceptBuddyRequest:(XMPPJID *)jid; - (void)rejectBuddyRequest:(XMPPJID *)jid; - (NSArray *)sortedUsersByName; - (NSArray *)sortedUsersByAvailabilityName; - (NSArray *)sortedAvailableUsersByName; - (NSArray *)sortedUnavailableUsersByName; - (NSArray *)unsortedUsers; - (NSArray *)unsortedAvailableUsers; - (NSArray *)unsortedUnavailableUsers; - (NSArray *)sortedResources:(BOOL)includeResourcesForMyUserExcludingMyself; - (XMPPUser *)userForJID:(XMPPJID *)jid; - (XMPPResource *)resourceForJID:(XMPPJID *)jid; - (XMPPUser *)myUser; - (void)sendElement:(NSXMLElement *)element; - (void)sendElement:(NSXMLElement *)element andNotifyMe:(long)tag; - (void)sendMessage:(NSString *)message toJID:(XMPPJID *)jid; @end //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @interface NSObject (XMPPClientDelegate) - (void)xmppClientConnecting:(XMPPClient *)sender; - (void)xmppClientDidConnect:(XMPPClient *)sender; - (void)xmppClientDidNotConnect:(XMPPClient *)sender; - (void)xmppClientDidDisconnect:(XMPPClient *)sender; - (void)xmppClientDidRegister:(XMPPClient *)sender; - (void)xmppClient:(XMPPClient *)sender didNotRegister:(NSXMLElement *)error; - (void)xmppClientDidAuthenticate:(XMPPClient *)sender; - (void)xmppClient:(XMPPClient *)sender didNotAuthenticate:(NSXMLElement *)error; - (void)xmppClientDidUpdateRoster:(XMPPClient *)sender; - (void)xmppClient:(XMPPClient *)sender didReceiveBuddyRequest:(XMPPJID *)jid; - (void)xmppClient:(XMPPClient *)sender didReceiveIQ:(XMPPIQ *)iq; - (void)xmppClient:(XMPPClient *)sender didReceiveMessage:(XMPPMessage *)message; @end
31.83
118
(ERROR) "#import <Foundation/Foundation.h>\n\n@class XMPPStream;\n@class XMPPJID;\n@class XMPPUser;\n@class XMPPResource;\n@class XMPPIQ;\n@class XMPPMessage;\n@class XMPPPresence;\n@class MulticastDelegate;\n\n#if !TARGET_OS_IPHONE\n @class SCNotificationManager;\n#endif\n\n@interface XMPPClient : NSObject\n{\n MulticastDelegate *multicastDelegate;\n \n NSString *domain;\n UInt16 port;\n \n XMPPJID *myJID;\n NSString *password;\n int priority;\n \n Byte flags;\n \n XMPPStream *xmppStream;\n NSError *streamError;\n \n NSMutableDictionary *roster;\n XMPPUser *myUser;\n \n NSMutableArray *earlyPresenceElements;\n \n#if !TARGET_OS_IPHONE \n SCNotificationManager *scNotificationManager;\n#endif\n}\n\n- (id)init;\n\n- (void)addDelegate:(id)delegate;\n- (void)removeDelegate:(id)delegate;\n\n- (NSString *)domain;\n- (void)setDomain:(NSString *)domain;\n\n- (UInt16)port;\n- (void)setPort:(UInt16)port;\n\n- (BOOL)usesOldStyleSSL;\n- (void)setUsesOldStyleSSL:(BOOL)flag;\n\n- (XMPPJID *)myJID;\n- (void)setMyJID:(XMPPJID *)jid;\n\n- (NSString *)password;\n- (void)setPassword:(NSString *)password;\n\n- (int)priority;\n- (void)setPriority:(int)priority;\n\n- (BOOL)allowsSelfSignedCertificates;\n- (void)setAllowsSelfSignedCertificates:(BOOL)flag;\n\n- (BOOL)allowsSSLHostNameMismatch;\n- (void)setAllowsSSLHostNameMismatch:(BOOL)flag;\n\n- (BOOL)isDisconnected;\n- (BOOL)isConnected;\n- (BOOL)isSecure;\n\n- (NSError *)streamError;\n\n- (BOOL)autoLogin;\n- (void)setAutoLogin:(BOOL)flag;\n\n- (BOOL)autoRoster;\n- (void)setAutoRoster:(BOOL)flag;\n\n- (BOOL)autoPresence;\n- (void)setAutoPresence:(BOOL)flag;\n\n- (BOOL)autoReconnect;\n- (void)setAutoReconnect:(BOOL)flag;\n\n- (void)connect;\n- (void)disconnect;\n\n- (BOOL)supportsInBandRegistration;\n- (void)registerUser;\n\n- (BOOL)supportsPlainAuthentication;\n- (BOOL)supportsDigestMD5Authentication;\n\n- (BOOL)allowsPlaintextAuth;\n- (void)setAllowsPlaintextAuth:(BOOL)flag;\n\n- (void)authenticateUser;\n\n- (BOOL)isAuthenticated;\n\n- (void)goOnline;\n- (void)goOffline;\n\n- (void)fetchRoster;\n\n- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy:(XMPPJID *)jid;\n\n- (void)setNickname:(NSString *)nickname forBuddy:(XMPPJID *)jid;\n\n- (void)acceptBuddyRequest:(XMPPJID *)jid;\n- (void)rejectBuddyRequest:(XMPPJID *)jid;\n\n- (NSArray *)sortedUsersByName;\n- (NSArray *)sortedUsersByAvailabilityName;\n\n- (NSArray *)sortedAvailableUsersByName;\n- (NSArray *)sortedUnavailableUsersByName;\n\n- (NSArray *)unsortedUsers;\n- (NSArray *)unsortedAvailableUsers;\n- (NSArray *)unsortedUnavailableUsers;\n\n- (NSArray *)sortedResources:(BOOL)includeResourcesForMyUserExcludingMyself;\n\n- (XMPPUser *)userForJID:(XMPPJID *)jid;\n- (XMPPResource *)resourceForJID:(XMPPJID *)jid;\n\n- (XMPPUser *)myUser;\n\n- (void)sendElement:(NSXMLElement *)element;\n- (void)sendElement:(NSXMLElement *)element andNotifyMe:(long)tag;\n\n- (void)sendMessage:(NSString *)message toJID:(XMPPJID *)jid;\n\n@end\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n#pragma mark -\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n@interface NSObject (XMPPClientDelegate)\n\n- (void)xmppClientConnecting:(XMPPClient *)sender;\n- (void)xmppClientDidConnect:(XMPPClient *)sender;\n- (void)xmppClientDidNotConnect:(XMPPClient *)sender;\n- (void)xmppClientDidDisconnect:(XMPPClient *)sender;\n\n- (void)xmppClientDidRegister:(XMPPClient *)sender;\n- (void)xmppClient:(XMPPClient *)sender didNotRegister:(NSXMLElement *)error;\n\n- (void)xmppClientDidAuthenticate:(XMPPClient *)sender;\n- (void)xmppClient:(XMPPClient *)sender didNotAuthenticate:(NSXMLElement *)error;\n\n- (void)xmppClientDidUpdateRoster:(XMPPClient *)sender;\n\n- (void)xmppClient:(XMPPClient *)sender didReceiveBuddyRequest:(XMPPJID *)jid;\n\n- (void)xmppClient:(XMPPClient *)sender didReceiveIQ:(XMPPIQ *)iq;\n- (void)xmppClient:(XMPPClient *)sender didReceiveMessage:(XMPPMessage *)message;\n\n@end\n" (preproc_call) "#import <Foundation/Foundation.h>\n" (preproc_directive) "#import" (preproc_arg) "<Foundation/Foundation.h>" (ERROR) "@" (ERROR) "@" (declaration) "class XMPPStream;" (type_identifier) "class" (identifier) "XMPPStream" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "class XMPPJID;" (type_identifier) "class" (identifier) "XMPPJID" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "class XMPPUser;" (type_identifier) "class" (identifier) "XMPPUser" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "class XMPPResource;" (type_identifier) "class" (identifier) "XMPPResource" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "class XMPPIQ;" (type_identifier) "class" (identifier) "XMPPIQ" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "class XMPPMessage;" (type_identifier) "class" (identifier) "XMPPMessage" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "class XMPPPresence;" (type_identifier) "class" (identifier) "XMPPPresence" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "class MulticastDelegate;" (type_identifier) "class" (identifier) "MulticastDelegate" (;) ";" (preproc_if) "#if !TARGET_OS_IPHONE\n @class SCNotificationManager;\n#endif" (#if) "#if" (unary_expression) "!TARGET_OS_IPHONE" (!) "!" (identifier) "TARGET_OS_IPHONE" ( ) "\n" (ERROR) "@" (ERROR) "@" (declaration) "class SCNotificationManager;" (type_identifier) "class" (identifier) "SCNotificationManager" (;) ";" (#endif) "#endif" (ERROR) "@" (ERROR) "@" (function_definition) "interface XMPPClient : NSObject\n{\n MulticastDelegate *multicastDelegate;\n \n NSString *domain;\n UInt16 port;\n \n XMPPJID *myJID;\n NSString *password;\n int priority;\n \n Byte flags;\n \n XMPPStream *xmppStream;\n NSError *streamError;\n \n NSMutableDictionary *roster;\n XMPPUser *myUser;\n \n NSMutableArray *earlyPresenceElements;\n \n#if !TARGET_OS_IPHONE \n SCNotificationManager *scNotificationManager;\n#endif\n}" (type_identifier) "interface" (identifier) "XMPPClient" (ERROR) ": NSObject" (:) ":" (identifier) "NSObject" (compound_statement) "{\n MulticastDelegate *multicastDelegate;\n \n NSString *domain;\n UInt16 port;\n \n XMPPJID *myJID;\n NSString *password;\n int priority;\n \n Byte flags;\n \n XMPPStream *xmppStream;\n NSError *streamError;\n \n NSMutableDictionary *roster;\n XMPPUser *myUser;\n \n NSMutableArray *earlyPresenceElements;\n \n#if !TARGET_OS_IPHONE \n SCNotificationManager *scNotificationManager;\n#endif\n}" ({) "{" (declaration) "MulticastDelegate *multicastDelegate;" (type_identifier) "MulticastDelegate" (pointer_declarator) "*multicastDelegate" (*) "*" (identifier) "multicastDelegate" (;) ";" (declaration) "NSString *domain;" (type_identifier) "NSString" (pointer_declarator) "*domain" (*) "*" (identifier) "domain" (;) ";" (declaration) "UInt16 port;" (type_identifier) "UInt16" (identifier) "port" (;) ";" (declaration) "XMPPJID *myJID;" (type_identifier) "XMPPJID" (pointer_declarator) "*myJID" (*) "*" (identifier) "myJID" (;) ";" (declaration) "NSString *password;" (type_identifier) "NSString" (pointer_declarator) "*password" (*) "*" (identifier) "password" (;) ";" (declaration) "int priority;" (primitive_type) "int" (identifier) "priority" (;) ";" (declaration) "Byte flags;" (type_identifier) "Byte" (identifier) "flags" (;) ";" (declaration) "XMPPStream *xmppStream;" (type_identifier) "XMPPStream" (pointer_declarator) "*xmppStream" (*) "*" (identifier) "xmppStream" (;) ";" (declaration) "NSError *streamError;" (type_identifier) "NSError" (pointer_declarator) "*streamError" (*) "*" (identifier) "streamError" (;) ";" (declaration) "NSMutableDictionary *roster;" (type_identifier) "NSMutableDictionary" (pointer_declarator) "*roster" (*) "*" (identifier) "roster" (;) ";" (declaration) "XMPPUser *myUser;" (type_identifier) "XMPPUser" (pointer_declarator) "*myUser" (*) "*" (identifier) "myUser" (;) ";" (declaration) "NSMutableArray *earlyPresenceElements;" (type_identifier) "NSMutableArray" (pointer_declarator) "*earlyPresenceElements" (*) "*" (identifier) "earlyPresenceElements" (;) ";" (preproc_if) "#if !TARGET_OS_IPHONE \n SCNotificationManager *scNotificationManager;\n#endif" (#if) "#if" (unary_expression) "!TARGET_OS_IPHONE" (!) "!" (identifier) "TARGET_OS_IPHONE" ( ) "\n" (declaration) "SCNotificationManager *scNotificationManager;" (type_identifier) "SCNotificationManager" (pointer_declarator) "*scNotificationManager" (*) "*" (identifier) "scNotificationManager" (;) ";" (#endif) "#endif" (}) "}" (expression_statement) "- (id)init;" (unary_expression) "- (id)init" (-) "-" (cast_expression) "(id)init" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "init" (;) ";" (expression_statement) "- (void)addDelegate:(id)delegate;" (unary_expression) "- (void)addDelegate" (-) "-" (cast_expression) "(void)addDelegate" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "addDelegate" (ERROR) ":(id)delegate" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "delegate" (;) ";" (expression_statement) "- (void)removeDelegate:(id)delegate;" (unary_expression) "- (void)removeDelegate" (-) "-" (cast_expression) "(void)removeDelegate" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "removeDelegate" (ERROR) ":(id)delegate" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "delegate" (;) ";" (expression_statement) "- (NSString *)domain;" (unary_expression) "- (NSString *)domain" (-) "-" (cast_expression) "(NSString *)domain" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "domain" (;) ";" (expression_statement) "- (void)setDomain:(NSString *)domain;" (update_expression) "- (void)setDomain:(NSString *)domain" (binary_expression) "- (void)setDomain:(NSString *)domain" (unary_expression) "- (void)setDomain" (-) "-" (cast_expression) "(void)setDomain" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setDomain" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "domain" (--) "" (;) ";" (expression_statement) "- (UInt16)port;" (unary_expression) "- (UInt16)port" (-) "-" (cast_expression) "(UInt16)port" (() "(" (type_descriptor) "UInt16" (type_identifier) "UInt16" ()) ")" (identifier) "port" (;) ";" (expression_statement) "- (void)setPort:(UInt16)port;" (unary_expression) "- (void)setPort" (-) "-" (cast_expression) "(void)setPort" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setPort" (ERROR) ":(UInt16)port" (:) ":" (() "(" (identifier) "UInt16" ()) ")" (identifier) "port" (;) ";" (expression_statement) "- (BOOL)usesOldStyleSSL;" (unary_expression) "- (BOOL)usesOldStyleSSL" (-) "-" (cast_expression) "(BOOL)usesOldStyleSSL" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "usesOldStyleSSL" (;) ";" (expression_statement) "- (void)setUsesOldStyleSSL:(BOOL)flag;" (unary_expression) "- (void)setUsesOldStyleSSL" (-) "-" (cast_expression) "(void)setUsesOldStyleSSL" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setUsesOldStyleSSL" (ERROR) ":(BOOL)flag" (:) ":" (() "(" (identifier) "BOOL" ()) ")" (identifier) "flag" (;) ";" (expression_statement) "- (XMPPJID *)myJID;" (unary_expression) "- (XMPPJID *)myJID" (-) "-" (cast_expression) "(XMPPJID *)myJID" (() "(" (type_descriptor) "XMPPJID *" (type_identifier) "XMPPJID" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "myJID" (;) ";" (expression_statement) "- (void)setMyJID:(XMPPJID *)jid;" (update_expression) "- (void)setMyJID:(XMPPJID *)jid" (binary_expression) "- (void)setMyJID:(XMPPJID *)jid" (unary_expression) "- (void)setMyJID" (-) "-" (cast_expression) "(void)setMyJID" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setMyJID" (ERROR) ":(XMPPJID" (:) ":" (() "(" (identifier) "XMPPJID" (*) "*" (ERROR) ")" ()) ")" (identifier) "jid" (--) "" (;) ";" (expression_statement) "- (NSString *)password;" (unary_expression) "- (NSString *)password" (-) "-" (cast_expression) "(NSString *)password" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "password" (;) ";" (expression_statement) "- (void)setPassword:(NSString *)password;" (update_expression) "- (void)setPassword:(NSString *)password" (binary_expression) "- (void)setPassword:(NSString *)password" (unary_expression) "- (void)setPassword" (-) "-" (cast_expression) "(void)setPassword" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setPassword" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "password" (--) "" (;) ";" (expression_statement) "- (int)priority;" (unary_expression) "- (int)priority" (-) "-" (cast_expression) "(int)priority" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (identifier) "priority" (;) ";" (expression_statement) "- (void)setPriority:(int)priority;" (unary_expression) "- (void)setPriority" (-) "-" (cast_expression) "(void)setPriority" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setPriority" (ERROR) ":(int)priority" (:) ":" (() "(" (primitive_type) "int" ()) ")" (identifier) "priority" (;) ";" (expression_statement) "- (BOOL)allowsSelfSignedCertificates;" (unary_expression) "- (BOOL)allowsSelfSignedCertificates" (-) "-" (cast_expression) "(BOOL)allowsSelfSignedCertificates" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "allowsSelfSignedCertificates" (;) ";" (expression_statement) "- (void)setAllowsSelfSignedCertificates:(BOOL)flag;" (unary_expression) "- (void)setAllowsSelfSignedCertificates" (-) "-" (cast_expression) "(void)setAllowsSelfSignedCertificates" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setAllowsSelfSignedCertificates" (ERROR) ":(BOOL)flag" (:) ":" (() "(" (identifier) "BOOL" ()) ")" (identifier) "flag" (;) ";" (expression_statement) "- (BOOL)allowsSSLHostNameMismatch;" (unary_expression) "- (BOOL)allowsSSLHostNameMismatch" (-) "-" (cast_expression) "(BOOL)allowsSSLHostNameMismatch" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "allowsSSLHostNameMismatch" (;) ";" (expression_statement) "- (void)setAllowsSSLHostNameMismatch:(BOOL)flag;" (unary_expression) "- (void)setAllowsSSLHostNameMismatch" (-) "-" (cast_expression) "(void)setAllowsSSLHostNameMismatch" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setAllowsSSLHostNameMismatch" (ERROR) ":(BOOL)flag" (:) ":" (() "(" (identifier) "BOOL" ()) ")" (identifier) "flag" (;) ";" (expression_statement) "- (BOOL)isDisconnected;" (unary_expression) "- (BOOL)isDisconnected" (-) "-" (cast_expression) "(BOOL)isDisconnected" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "isDisconnected" (;) ";" (expression_statement) "- (BOOL)isConnected;" (unary_expression) "- (BOOL)isConnected" (-) "-" (cast_expression) "(BOOL)isConnected" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "isConnected" (;) ";" (expression_statement) "- (BOOL)isSecure;" (unary_expression) "- (BOOL)isSecure" (-) "-" (cast_expression) "(BOOL)isSecure" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "isSecure" (;) ";" (expression_statement) "- (NSError *)streamError;" (unary_expression) "- (NSError *)streamError" (-) "-" (cast_expression) "(NSError *)streamError" (() "(" (type_descriptor) "NSError *" (type_identifier) "NSError" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "streamError" (;) ";" (expression_statement) "- (BOOL)autoLogin;" (unary_expression) "- (BOOL)autoLogin" (-) "-" (cast_expression) "(BOOL)autoLogin" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "autoLogin" (;) ";" (expression_statement) "- (void)setAutoLogin:(BOOL)flag;" (unary_expression) "- (void)setAutoLogin" (-) "-" (cast_expression) "(void)setAutoLogin" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setAutoLogin" (ERROR) ":(BOOL)flag" (:) ":" (() "(" (identifier) "BOOL" ()) ")" (identifier) "flag" (;) ";" (expression_statement) "- (BOOL)autoRoster;" (unary_expression) "- (BOOL)autoRoster" (-) "-" (cast_expression) "(BOOL)autoRoster" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "autoRoster" (;) ";" (expression_statement) "- (void)setAutoRoster:(BOOL)flag;" (unary_expression) "- (void)setAutoRoster" (-) "-" (cast_expression) "(void)setAutoRoster" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setAutoRoster" (ERROR) ":(BOOL)flag" (:) ":" (() "(" (identifier) "BOOL" ()) ")" (identifier) "flag" (;) ";" (expression_statement) "- (BOOL)autoPresence;" (unary_expression) "- (BOOL)autoPresence" (-) "-" (cast_expression) "(BOOL)autoPresence" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "autoPresence" (;) ";" (expression_statement) "- (void)setAutoPresence:(BOOL)flag;" (unary_expression) "- (void)setAutoPresence" (-) "-" (cast_expression) "(void)setAutoPresence" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setAutoPresence" (ERROR) ":(BOOL)flag" (:) ":" (() "(" (identifier) "BOOL" ()) ")" (identifier) "flag" (;) ";" (expression_statement) "- (BOOL)autoReconnect;" (unary_expression) "- (BOOL)autoReconnect" (-) "-" (cast_expression) "(BOOL)autoReconnect" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "autoReconnect" (;) ";" (expression_statement) "- (void)setAutoReconnect:(BOOL)flag;" (unary_expression) "- (void)setAutoReconnect" (-) "-" (cast_expression) "(void)setAutoReconnect" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setAutoReconnect" (ERROR) ":(BOOL)flag" (:) ":" (() "(" (identifier) "BOOL" ()) ")" (identifier) "flag" (;) ";" (expression_statement) "- (void)connect;" (unary_expression) "- (void)connect" (-) "-" (cast_expression) "(void)connect" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "connect" (;) ";" (expression_statement) "- (void)disconnect;" (unary_expression) "- (void)disconnect" (-) "-" (cast_expression) "(void)disconnect" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "disconnect" (;) ";" (expression_statement) "- (BOOL)supportsInBandRegistration;" (unary_expression) "- (BOOL)supportsInBandRegistration" (-) "-" (cast_expression) "(BOOL)supportsInBandRegistration" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "supportsInBandRegistration" (;) ";" (expression_statement) "- (void)registerUser;" (unary_expression) "- (void)registerUser" (-) "-" (cast_expression) "(void)registerUser" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "registerUser" (;) ";" (expression_statement) "- (BOOL)supportsPlainAuthentication;" (unary_expression) "- (BOOL)supportsPlainAuthentication" (-) "-" (cast_expression) "(BOOL)supportsPlainAuthentication" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "supportsPlainAuthentication" (;) ";" (expression_statement) "- (BOOL)supportsDigestMD5Authentication;" (unary_expression) "- (BOOL)supportsDigestMD5Authentication" (-) "-" (cast_expression) "(BOOL)supportsDigestMD5Authentication" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "supportsDigestMD5Authentication" (;) ";" (expression_statement) "- (BOOL)allowsPlaintextAuth;" (unary_expression) "- (BOOL)allowsPlaintextAuth" (-) "-" (cast_expression) "(BOOL)allowsPlaintextAuth" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "allowsPlaintextAuth" (;) ";" (expression_statement) "- (void)setAllowsPlaintextAuth:(BOOL)flag;" (unary_expression) "- (void)setAllowsPlaintextAuth" (-) "-" (cast_expression) "(void)setAllowsPlaintextAuth" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setAllowsPlaintextAuth" (ERROR) ":(BOOL)flag" (:) ":" (() "(" (identifier) "BOOL" ()) ")" (identifier) "flag" (;) ";" (expression_statement) "- (void)authenticateUser;" (unary_expression) "- (void)authenticateUser" (-) "-" (cast_expression) "(void)authenticateUser" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "authenticateUser" (;) ";" (expression_statement) "- (BOOL)isAuthenticated;" (unary_expression) "- (BOOL)isAuthenticated" (-) "-" (cast_expression) "(BOOL)isAuthenticated" (() "(" (type_descriptor) "BOOL" (type_identifier) "BOOL" ()) ")" (identifier) "isAuthenticated" (;) ";" (expression_statement) "- (void)goOnline;" (unary_expression) "- (void)goOnline" (-) "-" (cast_expression) "(void)goOnline" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "goOnline" (;) ";" (expression_statement) "- (void)goOffline;" (unary_expression) "- (void)goOffline" (-) "-" (cast_expression) "(void)goOffline" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "goOffline" (;) ";" (expression_statement) "- (void)fetchRoster;" (unary_expression) "- (void)fetchRoster" (-) "-" (cast_expression) "(void)fetchRoster" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "fetchRoster" (;) ";" (binary_expression) "- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy:(XMPPJID *)jid;\n\n- (void)setNickname:(NSString *)nickname" (binary_expression) "- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy:(XMPPJID *)jid;\n\n- (void)setNickname" (binary_expression) "- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy:(XMPPJID *)jid" (binary_expression) "- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy" (binary_expression) "- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName" (binary_expression) "- (void)addBuddy:(XMPPJID *)jid withNickname" (unary_expression) "- (void)addBuddy" (-) "-" (cast_expression) "(void)addBuddy" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "addBuddy" (ERROR) ":(XMPPJID" (:) ":" (() "(" (identifier) "XMPPJID" (*) "*" (ERROR) ")jid" ()) ")" (identifier) "jid" (identifier) "withNickname" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "optionalName" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(void)removeBuddy" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "removeBuddy" (ERROR) ":(XMPPJID" (:) ":" (() "(" (identifier) "XMPPJID" (*) "*" (ERROR) ")" ()) ")" (identifier) "jid" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(void)setNickname" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "setNickname" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "nickname" (identifier) "forBuddy" (:) ":" (() "(" (identifier) "XMPPJID" (*) "*" ()) ")" (identifier) "jid" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "acceptBuddyRequest" (:) ":" (() "(" (identifier) "XMPPJID" (*) "*" ()) ")" (identifier) "jid" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "rejectBuddyRequest" (:) ":" (() "(" (identifier) "XMPPJID" (*) "*" ()) ")" (identifier) "jid" (;) ";" (-) "-" (() "(" (identifier) "NSArray" (*) "*" ()) ")" (identifier) "sortedUsersByName" (;) ";" (-) "-" (() "(" (identifier) "NSArray" (*) "*" ()) ")" (identifier) "sortedUsersByAvailabilityName" (;) ";" (-) "-" (() "(" (identifier) "NSArray" (*) "*" ()) ")" (identifier) "sortedAvailableUsersByName" (;) ";" (-) "-" (() "(" (identifier) "NSArray" (*) "*" ()) ")" (identifier) "sortedUnavailableUsersByName" (;) ";" (-) "-" (() "(" (identifier) "NSArray" (*) "*" ()) ")" (identifier) "unsortedUsers" (;) ";" (-) "-" (() "(" (identifier) "NSArray" (*) "*" ()) ")" (identifier) "unsortedAvailableUsers" (;) ";" (-) "-" (() "(" (identifier) "NSArray" (*) "*" ()) ")" (identifier) "unsortedUnavailableUsers" (;) ";" (-) "-" (() "(" (identifier) "NSArray" (*) "*" ()) ")" (identifier) "sortedResources" (:) ":" (() "(" (identifier) "BOOL" ()) ")" (identifier) "includeResourcesForMyUserExcludingMyself" (;) ";" (-) "-" (() "(" (identifier) "XMPPUser" (*) "*" ()) ")" (identifier) "userForJID" (:) ":" (() "(" (identifier) "XMPPJID" (*) "*" ()) ")" (identifier) "jid" (;) ";" (-) "-" (() "(" (identifier) "XMPPResource" (*) "*" ()) ")" (identifier) "resourceForJID" (:) ":" (() "(" (identifier) "XMPPJID" (*) "*" ()) ")" (identifier) "jid" (;) ";" (-) "-" (() "(" (identifier) "XMPPUser" (*) "*" ()) ")" (identifier) "myUser" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "sendElement" (:) ":" (() "(" (identifier) "NSXMLElement" (*) "*" ()) ")" (identifier) "element" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "sendElement" (:) ":" (() "(" (identifier) "NSXMLElement" (*) "*" ()) ")" (identifier) "element" (identifier) "andNotifyMe" (:) ":" (() "(" (long) "long" ()) ")" (identifier) "tag" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "sendMessage" (:) ":" (() "(" (identifier) "NSString" (*) "*" ()) ")" (identifier) "message" (identifier) "toJID" (:) ":" (() "(" (identifier) "XMPPJID" (*) "*" ()) ")" (identifier) "jid" (;) ";" (ERROR) "@" (identifier) "end" (comment) "////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////" (preproc_directive) "#pragma" (identifier) "mark" (-) "-" (comment) "////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////" (ERROR) "@" (identifier) "interface" (identifier) "NSObject" (() "(" (identifier) "XMPPClientDelegate" ()) ")" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClientConnecting" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClientDidConnect" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClientDidNotConnect" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClientDidDisconnect" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClientDidRegister" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClient" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (identifier) "didNotRegister" (:) ":" (() "(" (identifier) "NSXMLElement" (*) "*" ()) ")" (identifier) "error" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClientDidAuthenticate" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClient" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (identifier) "didNotAuthenticate" (:) ":" (() "(" (identifier) "NSXMLElement" (*) "*" ()) ")" (identifier) "error" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClientDidUpdateRoster" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClient" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (identifier) "didReceiveBuddyRequest" (:) ":" (() "(" (identifier) "XMPPJID" (*) "*" ()) ")" (identifier) "jid" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClient" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (identifier) "didReceiveIQ" (:) ":" (() "(" (identifier) "XMPPIQ" (*) "*" ()) ")" (identifier) "iq" (;) ";" (-) "-" (() "(" (primitive_type) "void" ()) ")" (identifier) "xmppClient" (:) ":" (() "(" (identifier) "XMPPClient" (*) "*" ()) ")" (identifier) "sender" (identifier) "didReceiveMessage" (:) ":" (() "(" (identifier) "XMPPMessage" (*) "*" ()) ")" (identifier) "message" (;) ";" (ERROR) "@" (identifier) "end"
1,142
53
{"language": "c", "success": true, "metadata": {"lines": 118, "avg_line_length": 31.83, "nodes": 683, "errors": 0, "source_hash": "b67a190494636f084321a391f4ee54c3e49b48ffcf88ad244d559c51821954c6", "categorized_nodes": 387}, "ast": {"root": "ERROR", "nodes": [{"id": 0, "type": "ERROR", "text": "#import <Foundation/Foundation.h>\n\n@class XMPPStream;\n@class XMPPJID;\n@class XMPPUser;\n@class XMPPResource;\n@class XMPPIQ;\n@class XMPPMessage;\n@class XMPPPresence;\n@class MulticastDelegate;\n\n#if !TARGET_OS_IPHONE\n @class SCNotificationManager;\n#endif\n\n@interface XMPPClient : NSObject\n{\n\tMulticastDelegate *multicastDelegate;\n\t\n\tNSString *domain;\n\tUInt16 port;\n\t\n\tXMPPJID *myJID;\n\tNSString *password;\n\tint priority;\n\t\n\tByte flags;\n\t\n\tXMPPStream *xmppStream;\n\tNSError *streamError;\n\t\n\tNSMutableDictionary *roster;\n\tXMPPUser *myUser;\n\t\n\tNSMutableArray *earlyPresenceElements;\n\t\n#if !TARGET_OS_IPHONE\t\n\tSCNotificationManager *scNotificationManager;\n#endif\n}\n\n- (id)init;\n\n- (void)addDelegate:(id)delegate;\n- (void)removeDelegate:(id)delegate;\n\n- (NSString *)domain;\n- (void)setDomain:(NSString *)domain;\n\n- (UInt16)port;\n- (void)setPort:(UInt16)port;\n\n- (BOOL)usesOldStyleSSL;\n- (void)setUsesOldStyleSSL:(BOOL)flag;\n\n- (XMPPJID *)myJID;\n- (void)setMyJID:(XMPPJID *)jid;\n\n- (NSString *)password;\n- (void)setPassword:(NSString *)password;\n\n- (int)priority;\n- (void)setPriority:(int)priority;\n\n- (BOOL)allowsSelfSignedCertificates;\n- (void)setAllowsSelfSignedCertificates:(BOOL)flag;\n\n- (BOOL)allowsSSLHostNameMismatch;\n- (void)setAllowsSSLHostNameMismatch:(BOOL)flag;\n\n- (BOOL)isDisconnected;\n- (BOOL)isConnected;\n- (BOOL)isSecure;\n\n- (NSError *)streamError;\n\n- (BOOL)autoLogin;\n- (void)setAutoLogin:(BOOL)flag;\n\n- (BOOL)autoRoster;\n- (void)setAutoRoster:(BOOL)flag;\n\n- (BOOL)autoPresence;\n- (void)setAutoPresence:(BOOL)flag;\n\n- (BOOL)autoReconnect;\n- (void)setAutoReconnect:(BOOL)flag;\n\n- (void)connect;\n- (void)disconnect;\n\n- (BOOL)supportsInBandRegistration;\n- (void)registerUser;\n\n- (BOOL)supportsPlainAuthentication;\n- (BOOL)supportsDigestMD5Authentication;\n\n- (BOOL)allowsPlaintextAuth;\n- (void)setAllowsPlaintextAuth:(BOOL)flag;\n\n- (void)authenticateUser;\n\n- (BOOL)isAuthenticated;\n\n- (void)goOnline;\n- (void)goOffline;\n\n- (void)fetchRoster;\n\n- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy:(XMPPJID *)jid;\n\n- (void)setNickname:(NSString *)nickname forBuddy:(XMPPJID *)jid;\n\n- (void)acceptBuddyRequest:(XMPPJID *)jid;\n- (void)rejectBuddyRequest:(XMPPJID *)jid;\n\n- (NSArray *)sortedUsersByName;\n- (NSArray *)sortedUsersByAvailabilityName;\n\n- (NSArray *)sortedAvailableUsersByName;\n- (NSArray *)sortedUnavailableUsersByName;\n\n- (NSArray *)unsortedUsers;\n- (NSArray *)unsortedAvailableUsers;\n- (NSArray *)unsortedUnavailableUsers;\n\n- (NSArray *)sortedResources:(BOOL)includeResourcesForMyUserExcludingMyself;\n\n- (XMPPUser *)userForJID:(XMPPJID *)jid;\n- (XMPPResource *)resourceForJID:(XMPPJID *)jid;\n\n- (XMPPUser *)myUser;\n\n- (void)sendElement:(NSXMLElement *)element;\n- (void)sendElement:(NSXMLElement *)element andNotifyMe:(long)tag;\n\n- (void)sendMessage:(NSString *)message toJID:(XMPPJID *)jid;\n\n@end\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n#pragma mark -\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n@interface NSObject (XMPPClientDelegate)\n\n- (void)xmppClientConnecting:(XMPPClient *)sender;\n- (void)xmppClientDidConnect:(XMPPClient *)sender;\n- (void)xmppClientDidNotConnect:(XMPPClient *)sender;\n- (void)xmppClientDidDisconnect:(XMPPClient *)sender;\n\n- (void)xmppClientDidRegister:(XMPPClient *)sender;\n- (void)xmppClient:(XMPPClient *)sender didNotRegister:(NSXMLElement *)error;\n\n- (void)xmppClientDidAuthenticate:(XMPPClient *)sender;\n- (void)xmppClient:(XMPPClient *)sender didNotAuthenticate:(NSXMLElement *)error;\n\n- (void)xmppClientDidUpdateRoster:(XMPPClient *)sender;\n\n- (void)xmppClient:(XMPPClient *)sender didReceiveBuddyRequest:(XMPPJID *)jid;\n\n- (void)xmppClient:(XMPPClient *)sender didReceiveIQ:(XMPPIQ *)iq;\n- (void)xmppClient:(XMPPClient *)sender didReceiveMessage:(XMPPMessage *)message;\n\n@end\n", "parent": null, "children": [1, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 47, 49, 449, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 166, "column": 0}}, {"id": 1, "type": "preproc_call", "text": "#import <Foundation/Foundation.h>\n", "parent": 0, "children": [2, 3], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 2, "type": "preproc_directive", "text": "#import", "parent": 1, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 3, "type": "preproc_arg", "text": "<Foundation/Foundation.h>", "parent": 1, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 33}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 0, "children": [5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 1}}, {"id": 5, "type": "ERROR", "text": "@", "parent": 4, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 1}}, {"id": 6, "type": "declaration", "text": "class XMPPStream;", "parent": 0, "children": [7], "start_point": {"row": 2, "column": 1}, "end_point": {"row": 2, "column": 18}}, {"id": 7, "type": "identifier", "text": "XMPPStream", "parent": 6, "children": [], "start_point": {"row": 2, "column": 7}, "end_point": {"row": 2, "column": 17}}, {"id": 8, "type": "ERROR", "text": "@", "parent": 0, "children": [9], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 1}}, {"id": 9, "type": "ERROR", "text": "@", "parent": 8, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 1}}, {"id": 10, "type": "declaration", "text": "class XMPPJID;", "parent": 0, "children": [11], "start_point": {"row": 3, "column": 1}, "end_point": {"row": 3, "column": 15}}, {"id": 11, "type": "identifier", "text": "XMPPJID", "parent": 10, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 14}}, {"id": 12, "type": "ERROR", "text": "@", "parent": 0, "children": [13], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 1}}, {"id": 13, "type": "ERROR", "text": "@", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 1}}, {"id": 14, "type": "declaration", "text": "class XMPPUser;", "parent": 0, "children": [15], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 16}}, {"id": 15, "type": "identifier", "text": "XMPPUser", "parent": 14, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 15}}, {"id": 16, "type": "ERROR", "text": "@", "parent": 0, "children": [17], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 1}}, {"id": 17, "type": "ERROR", "text": "@", "parent": 16, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 1}}, {"id": 18, "type": "declaration", "text": "class XMPPResource;", "parent": 0, "children": [19], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 20}}, {"id": 19, "type": "identifier", "text": "XMPPResource", "parent": 18, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 19}}, {"id": 20, "type": "ERROR", "text": "@", "parent": 0, "children": [21], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 1}}, {"id": 21, "type": "ERROR", "text": "@", "parent": 20, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 1}}, {"id": 22, "type": "declaration", "text": "class XMPPIQ;", "parent": 0, "children": [23], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 14}}, {"id": 23, "type": "identifier", "text": "XMPPIQ", "parent": 22, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 13}}, {"id": 24, "type": "ERROR", "text": "@", "parent": 0, "children": [25], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 1}}, {"id": 25, "type": "ERROR", "text": "@", "parent": 24, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 1}}, {"id": 26, "type": "declaration", "text": "class XMPPMessage;", "parent": 0, "children": [27], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 19}}, {"id": 27, "type": "identifier", "text": "XMPPMessage", "parent": 26, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 18}}, {"id": 28, "type": "ERROR", "text": "@", "parent": 0, "children": [29], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 29, "type": "ERROR", "text": "@", "parent": 28, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 30, "type": "declaration", "text": "class XMPPPresence;", "parent": 0, "children": [31], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 20}}, {"id": 31, "type": "identifier", "text": "XMPPPresence", "parent": 30, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 19}}, {"id": 32, "type": "ERROR", "text": "@", "parent": 0, "children": [33], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 33, "type": "ERROR", "text": "@", "parent": 32, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 34, "type": "declaration", "text": "class MulticastDelegate;", "parent": 0, "children": [35], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 25}}, {"id": 35, "type": "identifier", "text": "MulticastDelegate", "parent": 34, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 24}}, {"id": 36, "type": "preproc_if", "text": "#if !TARGET_OS_IPHONE\n @class SCNotificationManager;\n#endif", "parent": 0, "children": [37, 38, 41, 42, 44, 46], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 37, "type": "#if", "text": "#if", "parent": 36, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 3}}, {"id": 38, "type": "unary_expression", "text": "!TARGET_OS_IPHONE", "parent": 36, "children": [39, 40], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 21}}, {"id": 39, "type": "!", "text": "!", "parent": 38, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 5}}, {"id": 40, "type": "identifier", "text": "TARGET_OS_IPHONE", "parent": 38, "children": [], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 21}}, {"id": 41, "type": "\n", "text": "\n", "parent": 36, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 12, "column": 0}}, {"id": 42, "type": "ERROR", "text": "@", "parent": 36, "children": [43], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 3}}, {"id": 43, "type": "ERROR", "text": "@", "parent": 42, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 3}}, {"id": 44, "type": "declaration", "text": "class SCNotificationManager;", "parent": 36, "children": [45], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 31}}, {"id": 45, "type": "identifier", "text": "SCNotificationManager", "parent": 44, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 30}}, {"id": 46, "type": "#endif", "text": "#endif", "parent": 36, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 47, "type": "ERROR", "text": "@", "parent": 0, "children": [48], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 48, "type": "ERROR", "text": "@", "parent": 47, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 49, "type": "function_definition", "text": "interface XMPPClient : NSObject\n{\n\tMulticastDelegate *multicastDelegate;\n\t\n\tNSString *domain;\n\tUInt16 port;\n\t\n\tXMPPJID *myJID;\n\tNSString *password;\n\tint priority;\n\t\n\tByte flags;\n\t\n\tXMPPStream *xmppStream;\n\tNSError *streamError;\n\t\n\tNSMutableDictionary *roster;\n\tXMPPUser *myUser;\n\t\n\tNSMutableArray *earlyPresenceElements;\n\t\n#if !TARGET_OS_IPHONE\t\n\tSCNotificationManager *scNotificationManager;\n#endif\n}", "parent": 0, "children": [50, 51, 52], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 39, "column": 1}}, {"id": 50, "type": "type_identifier", "text": "interface", "parent": 49, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 10}}, {"id": 51, "type": "identifier", "text": "XMPPClient", "parent": 49, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 21}}, {"id": 52, "type": "ERROR", "text": ": NSObject", "parent": 49, "children": [53], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 32}}, {"id": 53, "type": "identifier", "text": "NSObject", "parent": 52, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 32}}, {"id": 54, "type": "declaration", "text": "MulticastDelegate *multicastDelegate;", "parent": 49, "children": [55, 56], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 38}}, {"id": 55, "type": "type_identifier", "text": "MulticastDelegate", "parent": 54, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 18}}, {"id": 56, "type": "pointer_declarator", "text": "*multicastDelegate", "parent": 54, "children": [57, 58], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 37}}, {"id": 57, "type": "*", "text": "*", "parent": 56, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 20}}, {"id": 58, "type": "identifier", "text": "multicastDelegate", "parent": 56, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 37}}, {"id": 59, "type": "declaration", "text": "NSString *domain;", "parent": 49, "children": [60, 61], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 18}}, {"id": 60, "type": "type_identifier", "text": "NSString", "parent": 59, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 9}}, {"id": 61, "type": "pointer_declarator", "text": "*domain", "parent": 59, "children": [62, 63], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 17}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 11}}, {"id": 63, "type": "identifier", "text": "domain", "parent": 61, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 17}}, {"id": 64, "type": "declaration", "text": "UInt16 port;", "parent": 49, "children": [65, 66], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 13}}, {"id": 65, "type": "type_identifier", "text": "UInt16", "parent": 64, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 7}}, {"id": 66, "type": "identifier", "text": "port", "parent": 64, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 12}}, {"id": 67, "type": "declaration", "text": "XMPPJID *myJID;", "parent": 49, "children": [68, 69], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 16}}, {"id": 68, "type": "type_identifier", "text": "XMPPJID", "parent": 67, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 8}}, {"id": 69, "type": "pointer_declarator", "text": "*myJID", "parent": 67, "children": [70, 71], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 15}}, {"id": 70, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 10}}, {"id": 71, "type": "identifier", "text": "myJID", "parent": 69, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 15}}, {"id": 72, "type": "declaration", "text": "NSString *password;", "parent": 49, "children": [73, 74], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 20}}, {"id": 73, "type": "type_identifier", "text": "NSString", "parent": 72, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 74, "type": "pointer_declarator", "text": "*password", "parent": 72, "children": [75, 76], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 19}}, {"id": 75, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 11}}, {"id": 76, "type": "identifier", "text": "password", "parent": 74, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 19}}, {"id": 77, "type": "declaration", "text": "int priority;", "parent": 49, "children": [78, 79], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 14}}, {"id": 78, "type": "primitive_type", "text": "int", "parent": 77, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 4}}, {"id": 79, "type": "identifier", "text": "priority", "parent": 77, "children": [], "start_point": {"row": 24, "column": 5}, "end_point": {"row": 24, "column": 13}}, {"id": 80, "type": "declaration", "text": "Byte flags;", "parent": 49, "children": [81, 82], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 12}}, {"id": 81, "type": "type_identifier", "text": "Byte", "parent": 80, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 5}}, {"id": 82, "type": "identifier", "text": "flags", "parent": 80, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 11}}, {"id": 83, "type": "declaration", "text": "XMPPStream *xmppStream;", "parent": 49, "children": [84, 85], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 24}}, {"id": 84, "type": "type_identifier", "text": "XMPPStream", "parent": 83, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 11}}, {"id": 85, "type": "pointer_declarator", "text": "*xmppStream", "parent": 83, "children": [86, 87], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 23}}, {"id": 86, "type": "*", "text": "*", "parent": 85, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 13}}, {"id": 87, "type": "identifier", "text": "xmppStream", "parent": 85, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 23}}, {"id": 88, "type": "declaration", "text": "NSError *streamError;", "parent": 49, "children": [89, 90], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 22}}, {"id": 89, "type": "type_identifier", "text": "NSError", "parent": 88, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 8}}, {"id": 90, "type": "pointer_declarator", "text": "*streamError", "parent": 88, "children": [91, 92], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 21}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 10}}, {"id": 92, "type": "identifier", "text": "streamError", "parent": 90, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 21}}, {"id": 93, "type": "declaration", "text": "NSMutableDictionary *roster;", "parent": 49, "children": [94, 95], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 29}}, {"id": 94, "type": "type_identifier", "text": "NSMutableDictionary", "parent": 93, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 20}}, {"id": 95, "type": "pointer_declarator", "text": "*roster", "parent": 93, "children": [96, 97], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 28}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 22}}, {"id": 97, "type": "identifier", "text": "roster", "parent": 95, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 28}}, {"id": 98, "type": "declaration", "text": "XMPPUser *myUser;", "parent": 49, "children": [99, 100], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 18}}, {"id": 99, "type": "type_identifier", "text": "XMPPUser", "parent": 98, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 9}}, {"id": 100, "type": "pointer_declarator", "text": "*myUser", "parent": 98, "children": [101, 102], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 17}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 11}}, {"id": 102, "type": "identifier", "text": "myUser", "parent": 100, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 17}}, {"id": 103, "type": "declaration", "text": "NSMutableArray *earlyPresenceElements;", "parent": 49, "children": [104, 105], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 39}}, {"id": 104, "type": "type_identifier", "text": "NSMutableArray", "parent": 103, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 15}}, {"id": 105, "type": "pointer_declarator", "text": "*earlyPresenceElements", "parent": 103, "children": [106, 107], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 38}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 107, "type": "identifier", "text": "earlyPresenceElements", "parent": 105, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 38}}, {"id": 108, "type": "preproc_if", "text": "#if !TARGET_OS_IPHONE\t\n\tSCNotificationManager *scNotificationManager;\n#endif", "parent": 49, "children": [109, 110, 113, 114, 119], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 109, "type": "#if", "text": "#if", "parent": 108, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 3}}, {"id": 110, "type": "unary_expression", "text": "!TARGET_OS_IPHONE", "parent": 108, "children": [111, 112], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 21}}, {"id": 111, "type": "!", "text": "!", "parent": 110, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 5}}, {"id": 112, "type": "identifier", "text": "TARGET_OS_IPHONE", "parent": 110, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 21}}, {"id": 113, "type": "\n", "text": "\n", "parent": 108, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 37, "column": 0}}, {"id": 114, "type": "declaration", "text": "SCNotificationManager *scNotificationManager;", "parent": 108, "children": [115, 116], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 46}}, {"id": 115, "type": "type_identifier", "text": "SCNotificationManager", "parent": 114, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 22}}, {"id": 116, "type": "pointer_declarator", "text": "*scNotificationManager", "parent": 114, "children": [117, 118], "start_point": {"row": 37, "column": 23}, "end_point": {"row": 37, "column": 45}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 37, "column": 23}, "end_point": {"row": 37, "column": 24}}, {"id": 118, "type": "identifier", "text": "scNotificationManager", "parent": 116, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 45}}, {"id": 119, "type": "#endif", "text": "#endif", "parent": 108, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 120, "type": "unary_expression", "text": "- (id)init", "parent": 0, "children": [121, 122], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 10}}, {"id": 121, "type": "-", "text": "-", "parent": 120, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 122, "type": "cast_expression", "text": "(id)init", "parent": 120, "children": [123, 125], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 10}}, {"id": 123, "type": "type_descriptor", "text": "id", "parent": 122, "children": [124], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 5}}, {"id": 124, "type": "type_identifier", "text": "id", "parent": 123, "children": [], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 5}}, {"id": 125, "type": "identifier", "text": "init", "parent": 122, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 10}}, {"id": 126, "type": "unary_expression", "text": "- (void)addDelegate", "parent": 0, "children": [127, 128], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 19}}, {"id": 127, "type": "-", "text": "-", "parent": 126, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 128, "type": "cast_expression", "text": "(void)addDelegate", "parent": 126, "children": [129, 131], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 19}}, {"id": 129, "type": "type_descriptor", "text": "void", "parent": 128, "children": [130], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 7}}, {"id": 130, "type": "primitive_type", "text": "void", "parent": 129, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 7}}, {"id": 131, "type": "identifier", "text": "addDelegate", "parent": 128, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 19}}, {"id": 132, "type": "ERROR", "text": ":(id)delegate", "parent": 0, "children": [133, 134], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 32}}, {"id": 133, "type": "identifier", "text": "id", "parent": 132, "children": [], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 23}}, {"id": 134, "type": "identifier", "text": "delegate", "parent": 132, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 32}}, {"id": 135, "type": "unary_expression", "text": "- (void)removeDelegate", "parent": 0, "children": [136, 137], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 22}}, {"id": 136, "type": "-", "text": "-", "parent": 135, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 137, "type": "cast_expression", "text": "(void)removeDelegate", "parent": 135, "children": [138, 140], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 22}}, {"id": 138, "type": "type_descriptor", "text": "void", "parent": 137, "children": [139], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 7}}, {"id": 139, "type": "primitive_type", "text": "void", "parent": 138, "children": [], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 7}}, {"id": 140, "type": "identifier", "text": "removeDelegate", "parent": 137, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 22}}, {"id": 141, "type": "ERROR", "text": ":(id)delegate", "parent": 0, "children": [142, 143], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 35}}, {"id": 142, "type": "identifier", "text": "id", "parent": 141, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 26}}, {"id": 143, "type": "identifier", "text": "delegate", "parent": 141, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 35}}, {"id": 144, "type": "unary_expression", "text": "- (NSString *)domain", "parent": 0, "children": [145, 146], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 20}}, {"id": 145, "type": "-", "text": "-", "parent": 144, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 1}}, {"id": 146, "type": "cast_expression", "text": "(NSString *)domain", "parent": 144, "children": [147, 151], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 20}}, {"id": 147, "type": "type_descriptor", "text": "NSString *", "parent": 146, "children": [148, 149], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 13}}, {"id": 148, "type": "type_identifier", "text": "NSString", "parent": 147, "children": [], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 11}}, {"id": 149, "type": "abstract_pointer_declarator", "text": "*", "parent": 147, "children": [150], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 13}}, {"id": 150, "type": "*", "text": "*", "parent": 149, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 13}}, {"id": 151, "type": "identifier", "text": "domain", "parent": 146, "children": [], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 20}}, {"id": 152, "type": "update_expression", "text": "- (void)setDomain:(NSString *)domain", "parent": 0, "children": [153, 164], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 36}}, {"id": 153, "type": "binary_expression", "text": "- (void)setDomain:(NSString *)domain", "parent": 152, "children": [154, 160, 162, 163], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 36}}, {"id": 154, "type": "unary_expression", "text": "- (void)setDomain", "parent": 153, "children": [155, 156], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 17}}, {"id": 155, "type": "-", "text": "-", "parent": 154, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 156, "type": "cast_expression", "text": "(void)setDomain", "parent": 154, "children": [157, 159], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 17}}, {"id": 157, "type": "type_descriptor", "text": "void", "parent": 156, "children": [158], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 7}}, {"id": 158, "type": "primitive_type", "text": "void", "parent": 157, "children": [], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 7}}, {"id": 159, "type": "identifier", "text": "setDomain", "parent": 156, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 17}}, {"id": 160, "type": "ERROR", "text": ":(NSString", "parent": 153, "children": [161], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 27}}, {"id": 161, "type": "identifier", "text": "NSString", "parent": 160, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 27}}, {"id": 162, "type": "*", "text": "*", "parent": 153, "children": [], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 29}}, {"id": 163, "type": "identifier", "text": "domain", "parent": 153, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 36}}, {"id": 164, "type": "--", "text": "", "parent": 152, "children": [], "start_point": {"row": 47, "column": 36}, "end_point": {"row": 47, "column": 36}}, {"id": 165, "type": "unary_expression", "text": "- (UInt16)port", "parent": 0, "children": [166, 167], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 14}}, {"id": 166, "type": "-", "text": "-", "parent": 165, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 167, "type": "cast_expression", "text": "(UInt16)port", "parent": 165, "children": [168, 170], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 168, "type": "type_descriptor", "text": "UInt16", "parent": 167, "children": [169], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 9}}, {"id": 169, "type": "type_identifier", "text": "UInt16", "parent": 168, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 9}}, {"id": 170, "type": "identifier", "text": "port", "parent": 167, "children": [], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 14}}, {"id": 171, "type": "unary_expression", "text": "- (void)setPort", "parent": 0, "children": [172, 173], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 15}}, {"id": 172, "type": "-", "text": "-", "parent": 171, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 173, "type": "cast_expression", "text": "(void)setPort", "parent": 171, "children": [174, 176], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 15}}, {"id": 174, "type": "type_descriptor", "text": "void", "parent": 173, "children": [175], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 7}}, {"id": 175, "type": "primitive_type", "text": "void", "parent": 174, "children": [], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 7}}, {"id": 176, "type": "identifier", "text": "setPort", "parent": 173, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 15}}, {"id": 177, "type": "ERROR", "text": ":(UInt16)port", "parent": 0, "children": [178, 179], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 28}}, {"id": 178, "type": "identifier", "text": "UInt16", "parent": 177, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 23}}, {"id": 179, "type": "identifier", "text": "port", "parent": 177, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 28}}, {"id": 180, "type": "unary_expression", "text": "- (BOOL)usesOldStyleSSL", "parent": 0, "children": [181, 182], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 23}}, {"id": 181, "type": "-", "text": "-", "parent": 180, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 1}}, {"id": 182, "type": "cast_expression", "text": "(BOOL)usesOldStyleSSL", "parent": 180, "children": [183, 185], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 23}}, {"id": 183, "type": "type_descriptor", "text": "BOOL", "parent": 182, "children": [184], "start_point": {"row": 52, "column": 3}, "end_point": {"row": 52, "column": 7}}, {"id": 184, "type": "type_identifier", "text": "BOOL", "parent": 183, "children": [], "start_point": {"row": 52, "column": 3}, "end_point": {"row": 52, "column": 7}}, {"id": 185, "type": "identifier", "text": "usesOldStyleSSL", "parent": 182, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 23}}, {"id": 186, "type": "unary_expression", "text": "- (void)setUsesOldStyleSSL", "parent": 0, "children": [187, 188], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 26}}, {"id": 187, "type": "-", "text": "-", "parent": 186, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 1}}, {"id": 188, "type": "cast_expression", "text": "(void)setUsesOldStyleSSL", "parent": 186, "children": [189, 191], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 26}}, {"id": 189, "type": "type_descriptor", "text": "void", "parent": 188, "children": [190], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 7}}, {"id": 190, "type": "primitive_type", "text": "void", "parent": 189, "children": [], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 7}}, {"id": 191, "type": "identifier", "text": "setUsesOldStyleSSL", "parent": 188, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 26}}, {"id": 192, "type": "ERROR", "text": ":(BOOL)flag", "parent": 0, "children": [193, 194], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 37}}, {"id": 193, "type": "identifier", "text": "BOOL", "parent": 192, "children": [], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 32}}, {"id": 194, "type": "identifier", "text": "flag", "parent": 192, "children": [], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 37}}, {"id": 195, "type": "unary_expression", "text": "- (XMPPJID *)myJID", "parent": 0, "children": [196, 197], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 18}}, {"id": 196, "type": "-", "text": "-", "parent": 195, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 197, "type": "cast_expression", "text": "(XMPPJID *)myJID", "parent": 195, "children": [198, 202], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 18}}, {"id": 198, "type": "type_descriptor", "text": "XMPPJID *", "parent": 197, "children": [199, 200], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 12}}, {"id": 199, "type": "type_identifier", "text": "XMPPJID", "parent": 198, "children": [], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 10}}, {"id": 200, "type": "abstract_pointer_declarator", "text": "*", "parent": 198, "children": [201], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 12}}, {"id": 201, "type": "*", "text": "*", "parent": 200, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 12}}, {"id": 202, "type": "identifier", "text": "myJID", "parent": 197, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 18}}, {"id": 203, "type": "update_expression", "text": "- (void)setMyJID:(XMPPJID *)jid", "parent": 0, "children": [204, 215], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 31}}, {"id": 204, "type": "binary_expression", "text": "- (void)setMyJID:(XMPPJID *)jid", "parent": 203, "children": [205, 211, 213, 214], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 31}}, {"id": 205, "type": "unary_expression", "text": "- (void)setMyJID", "parent": 204, "children": [206, 207], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 16}}, {"id": 206, "type": "-", "text": "-", "parent": 205, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 207, "type": "cast_expression", "text": "(void)setMyJID", "parent": 205, "children": [208, 210], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 16}}, {"id": 208, "type": "type_descriptor", "text": "void", "parent": 207, "children": [209], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 7}}, {"id": 209, "type": "primitive_type", "text": "void", "parent": 208, "children": [], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 7}}, {"id": 210, "type": "identifier", "text": "setMyJID", "parent": 207, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 16}}, {"id": 211, "type": "ERROR", "text": ":(XMPPJID", "parent": 204, "children": [212], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 25}}, {"id": 212, "type": "identifier", "text": "XMPPJID", "parent": 211, "children": [], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 25}}, {"id": 213, "type": "*", "text": "*", "parent": 204, "children": [], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 27}}, {"id": 214, "type": "identifier", "text": "jid", "parent": 204, "children": [], "start_point": {"row": 56, "column": 28}, "end_point": {"row": 56, "column": 31}}, {"id": 215, "type": "--", "text": "", "parent": 203, "children": [], "start_point": {"row": 56, "column": 31}, "end_point": {"row": 56, "column": 31}}, {"id": 216, "type": "unary_expression", "text": "- (NSString *)password", "parent": 0, "children": [217, 218], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 22}}, {"id": 217, "type": "-", "text": "-", "parent": 216, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 1}}, {"id": 218, "type": "cast_expression", "text": "(NSString *)password", "parent": 216, "children": [219, 223], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 22}}, {"id": 219, "type": "type_descriptor", "text": "NSString *", "parent": 218, "children": [220, 221], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 13}}, {"id": 220, "type": "type_identifier", "text": "NSString", "parent": 219, "children": [], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 11}}, {"id": 221, "type": "abstract_pointer_declarator", "text": "*", "parent": 219, "children": [222], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 13}}, {"id": 222, "type": "*", "text": "*", "parent": 221, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 13}}, {"id": 223, "type": "identifier", "text": "password", "parent": 218, "children": [], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 22}}, {"id": 224, "type": "update_expression", "text": "- (void)setPassword:(NSString *)password", "parent": 0, "children": [225, 236], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 40}}, {"id": 225, "type": "binary_expression", "text": "- (void)setPassword:(NSString *)password", "parent": 224, "children": [226, 232, 234, 235], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 40}}, {"id": 226, "type": "unary_expression", "text": "- (void)setPassword", "parent": 225, "children": [227, 228], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 19}}, {"id": 227, "type": "-", "text": "-", "parent": 226, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 228, "type": "cast_expression", "text": "(void)setPassword", "parent": 226, "children": [229, 231], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 19}}, {"id": 229, "type": "type_descriptor", "text": "void", "parent": 228, "children": [230], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 7}}, {"id": 230, "type": "primitive_type", "text": "void", "parent": 229, "children": [], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 7}}, {"id": 231, "type": "identifier", "text": "setPassword", "parent": 228, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 19}}, {"id": 232, "type": "ERROR", "text": ":(NSString", "parent": 225, "children": [233], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 29}}, {"id": 233, "type": "identifier", "text": "NSString", "parent": 232, "children": [], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 29}}, {"id": 234, "type": "*", "text": "*", "parent": 225, "children": [], "start_point": {"row": 59, "column": 30}, "end_point": {"row": 59, "column": 31}}, {"id": 235, "type": "identifier", "text": "password", "parent": 225, "children": [], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 40}}, {"id": 236, "type": "--", "text": "", "parent": 224, "children": [], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 40}}, {"id": 237, "type": "unary_expression", "text": "- (int)priority", "parent": 0, "children": [238, 239], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 15}}, {"id": 238, "type": "-", "text": "-", "parent": 237, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 1}}, {"id": 239, "type": "cast_expression", "text": "(int)priority", "parent": 237, "children": [240, 242], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 15}}, {"id": 240, "type": "type_descriptor", "text": "int", "parent": 239, "children": [241], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 6}}, {"id": 241, "type": "primitive_type", "text": "int", "parent": 240, "children": [], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 6}}, {"id": 242, "type": "identifier", "text": "priority", "parent": 239, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 15}}, {"id": 243, "type": "unary_expression", "text": "- (void)setPriority", "parent": 0, "children": [244, 245], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 19}}, {"id": 244, "type": "-", "text": "-", "parent": 243, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 245, "type": "cast_expression", "text": "(void)setPriority", "parent": 243, "children": [246, 248], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 19}}, {"id": 246, "type": "type_descriptor", "text": "void", "parent": 245, "children": [247], "start_point": {"row": 62, "column": 3}, "end_point": {"row": 62, "column": 7}}, {"id": 247, "type": "primitive_type", "text": "void", "parent": 246, "children": [], "start_point": {"row": 62, "column": 3}, "end_point": {"row": 62, "column": 7}}, {"id": 248, "type": "identifier", "text": "setPriority", "parent": 245, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 19}}, {"id": 249, "type": "ERROR", "text": ":(int)priority", "parent": 0, "children": [250, 251], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 33}}, {"id": 250, "type": "primitive_type", "text": "int", "parent": 249, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 24}}, {"id": 251, "type": "identifier", "text": "priority", "parent": 249, "children": [], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 33}}, {"id": 252, "type": "unary_expression", "text": "- (BOOL)allowsSelfSignedCertificates", "parent": 0, "children": [253, 254], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 36}}, {"id": 253, "type": "-", "text": "-", "parent": 252, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 254, "type": "cast_expression", "text": "(BOOL)allowsSelfSignedCertificates", "parent": 252, "children": [255, 257], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 36}}, {"id": 255, "type": "type_descriptor", "text": "BOOL", "parent": 254, "children": [256], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 64, "column": 7}}, {"id": 256, "type": "type_identifier", "text": "BOOL", "parent": 255, "children": [], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 64, "column": 7}}, {"id": 257, "type": "identifier", "text": "allowsSelfSignedCertificates", "parent": 254, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 36}}, {"id": 258, "type": "unary_expression", "text": "- (void)setAllowsSelfSignedCertificates", "parent": 0, "children": [259, 260], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 39}}, {"id": 259, "type": "-", "text": "-", "parent": 258, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 260, "type": "cast_expression", "text": "(void)setAllowsSelfSignedCertificates", "parent": 258, "children": [261, 263], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 39}}, {"id": 261, "type": "type_descriptor", "text": "void", "parent": 260, "children": [262], "start_point": {"row": 65, "column": 3}, "end_point": {"row": 65, "column": 7}}, {"id": 262, "type": "primitive_type", "text": "void", "parent": 261, "children": [], "start_point": {"row": 65, "column": 3}, "end_point": {"row": 65, "column": 7}}, {"id": 263, "type": "identifier", "text": "setAllowsSelfSignedCertificates", "parent": 260, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 39}}, {"id": 264, "type": "ERROR", "text": ":(BOOL)flag", "parent": 0, "children": [265, 266], "start_point": {"row": 65, "column": 39}, "end_point": {"row": 65, "column": 50}}, {"id": 265, "type": "identifier", "text": "BOOL", "parent": 264, "children": [], "start_point": {"row": 65, "column": 41}, "end_point": {"row": 65, "column": 45}}, {"id": 266, "type": "identifier", "text": "flag", "parent": 264, "children": [], "start_point": {"row": 65, "column": 46}, "end_point": {"row": 65, "column": 50}}, {"id": 267, "type": "unary_expression", "text": "- (BOOL)allowsSSLHostNameMismatch", "parent": 0, "children": [268, 269], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 33}}, {"id": 268, "type": "-", "text": "-", "parent": 267, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 1}}, {"id": 269, "type": "cast_expression", "text": "(BOOL)allowsSSLHostNameMismatch", "parent": 267, "children": [270, 272], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 33}}, {"id": 270, "type": "type_descriptor", "text": "BOOL", "parent": 269, "children": [271], "start_point": {"row": 67, "column": 3}, "end_point": {"row": 67, "column": 7}}, {"id": 271, "type": "type_identifier", "text": "BOOL", "parent": 270, "children": [], "start_point": {"row": 67, "column": 3}, "end_point": {"row": 67, "column": 7}}, {"id": 272, "type": "identifier", "text": "allowsSSLHostNameMismatch", "parent": 269, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 33}}, {"id": 273, "type": "unary_expression", "text": "- (void)setAllowsSSLHostNameMismatch", "parent": 0, "children": [274, 275], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 36}}, {"id": 274, "type": "-", "text": "-", "parent": 273, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 275, "type": "cast_expression", "text": "(void)setAllowsSSLHostNameMismatch", "parent": 273, "children": [276, 278], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 36}}, {"id": 276, "type": "type_descriptor", "text": "void", "parent": 275, "children": [277], "start_point": {"row": 68, "column": 3}, "end_point": {"row": 68, "column": 7}}, {"id": 277, "type": "primitive_type", "text": "void", "parent": 276, "children": [], "start_point": {"row": 68, "column": 3}, "end_point": {"row": 68, "column": 7}}, {"id": 278, "type": "identifier", "text": "setAllowsSSLHostNameMismatch", "parent": 275, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 36}}, {"id": 279, "type": "ERROR", "text": ":(BOOL)flag", "parent": 0, "children": [280, 281], "start_point": {"row": 68, "column": 36}, "end_point": {"row": 68, "column": 47}}, {"id": 280, "type": "identifier", "text": "BOOL", "parent": 279, "children": [], "start_point": {"row": 68, "column": 38}, "end_point": {"row": 68, "column": 42}}, {"id": 281, "type": "identifier", "text": "flag", "parent": 279, "children": [], "start_point": {"row": 68, "column": 43}, "end_point": {"row": 68, "column": 47}}, {"id": 282, "type": "unary_expression", "text": "- (BOOL)isDisconnected", "parent": 0, "children": [283, 284], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 22}}, {"id": 283, "type": "-", "text": "-", "parent": 282, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 1}}, {"id": 284, "type": "cast_expression", "text": "(BOOL)isDisconnected", "parent": 282, "children": [285, 287], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 22}}, {"id": 285, "type": "type_descriptor", "text": "BOOL", "parent": 284, "children": [286], "start_point": {"row": 70, "column": 3}, "end_point": {"row": 70, "column": 7}}, {"id": 286, "type": "type_identifier", "text": "BOOL", "parent": 285, "children": [], "start_point": {"row": 70, "column": 3}, "end_point": {"row": 70, "column": 7}}, {"id": 287, "type": "identifier", "text": "isDisconnected", "parent": 284, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 22}}, {"id": 288, "type": "unary_expression", "text": "- (BOOL)isConnected", "parent": 0, "children": [289, 290], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 19}}, {"id": 289, "type": "-", "text": "-", "parent": 288, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 290, "type": "cast_expression", "text": "(BOOL)isConnected", "parent": 288, "children": [291, 293], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 19}}, {"id": 291, "type": "type_descriptor", "text": "BOOL", "parent": 290, "children": [292], "start_point": {"row": 71, "column": 3}, "end_point": {"row": 71, "column": 7}}, {"id": 292, "type": "type_identifier", "text": "BOOL", "parent": 291, "children": [], "start_point": {"row": 71, "column": 3}, "end_point": {"row": 71, "column": 7}}, {"id": 293, "type": "identifier", "text": "isConnected", "parent": 290, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 19}}, {"id": 294, "type": "unary_expression", "text": "- (BOOL)isSecure", "parent": 0, "children": [295, 296], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 16}}, {"id": 295, "type": "-", "text": "-", "parent": 294, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 1}}, {"id": 296, "type": "cast_expression", "text": "(BOOL)isSecure", "parent": 294, "children": [297, 299], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 16}}, {"id": 297, "type": "type_descriptor", "text": "BOOL", "parent": 296, "children": [298], "start_point": {"row": 72, "column": 3}, "end_point": {"row": 72, "column": 7}}, {"id": 298, "type": "type_identifier", "text": "BOOL", "parent": 297, "children": [], "start_point": {"row": 72, "column": 3}, "end_point": {"row": 72, "column": 7}}, {"id": 299, "type": "identifier", "text": "isSecure", "parent": 296, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 16}}, {"id": 300, "type": "unary_expression", "text": "- (NSError *)streamError", "parent": 0, "children": [301, 302], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 24}}, {"id": 301, "type": "-", "text": "-", "parent": 300, "children": [], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 302, "type": "cast_expression", "text": "(NSError *)streamError", "parent": 300, "children": [303, 307], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 24}}, {"id": 303, "type": "type_descriptor", "text": "NSError *", "parent": 302, "children": [304, 305], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 12}}, {"id": 304, "type": "type_identifier", "text": "NSError", "parent": 303, "children": [], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 10}}, {"id": 305, "type": "abstract_pointer_declarator", "text": "*", "parent": 303, "children": [306], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 12}}, {"id": 306, "type": "*", "text": "*", "parent": 305, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 12}}, {"id": 307, "type": "identifier", "text": "streamError", "parent": 302, "children": [], "start_point": {"row": 74, "column": 13}, "end_point": {"row": 74, "column": 24}}, {"id": 308, "type": "unary_expression", "text": "- (BOOL)autoLogin", "parent": 0, "children": [309, 310], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 17}}, {"id": 309, "type": "-", "text": "-", "parent": 308, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 1}}, {"id": 310, "type": "cast_expression", "text": "(BOOL)autoLogin", "parent": 308, "children": [311, 313], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 17}}, {"id": 311, "type": "type_descriptor", "text": "BOOL", "parent": 310, "children": [312], "start_point": {"row": 76, "column": 3}, "end_point": {"row": 76, "column": 7}}, {"id": 312, "type": "type_identifier", "text": "BOOL", "parent": 311, "children": [], "start_point": {"row": 76, "column": 3}, "end_point": {"row": 76, "column": 7}}, {"id": 313, "type": "identifier", "text": "autoLogin", "parent": 310, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 17}}, {"id": 314, "type": "unary_expression", "text": "- (void)setAutoLogin", "parent": 0, "children": [315, 316], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 20}}, {"id": 315, "type": "-", "text": "-", "parent": 314, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 1}}, {"id": 316, "type": "cast_expression", "text": "(void)setAutoLogin", "parent": 314, "children": [317, 319], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 20}}, {"id": 317, "type": "type_descriptor", "text": "void", "parent": 316, "children": [318], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 7}}, {"id": 318, "type": "primitive_type", "text": "void", "parent": 317, "children": [], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 7}}, {"id": 319, "type": "identifier", "text": "setAutoLogin", "parent": 316, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 20}}, {"id": 320, "type": "ERROR", "text": ":(BOOL)flag", "parent": 0, "children": [321, 322], "start_point": {"row": 77, "column": 20}, "end_point": {"row": 77, "column": 31}}, {"id": 321, "type": "identifier", "text": "BOOL", "parent": 320, "children": [], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 26}}, {"id": 322, "type": "identifier", "text": "flag", "parent": 320, "children": [], "start_point": {"row": 77, "column": 27}, "end_point": {"row": 77, "column": 31}}, {"id": 323, "type": "unary_expression", "text": "- (BOOL)autoRoster", "parent": 0, "children": [324, 325], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 18}}, {"id": 324, "type": "-", "text": "-", "parent": 323, "children": [], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 1}}, {"id": 325, "type": "cast_expression", "text": "(BOOL)autoRoster", "parent": 323, "children": [326, 328], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 18}}, {"id": 326, "type": "type_descriptor", "text": "BOOL", "parent": 325, "children": [327], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 7}}, {"id": 327, "type": "type_identifier", "text": "BOOL", "parent": 326, "children": [], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 7}}, {"id": 328, "type": "identifier", "text": "autoRoster", "parent": 325, "children": [], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 18}}, {"id": 329, "type": "unary_expression", "text": "- (void)setAutoRoster", "parent": 0, "children": [330, 331], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 21}}, {"id": 330, "type": "-", "text": "-", "parent": 329, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 331, "type": "cast_expression", "text": "(void)setAutoRoster", "parent": 329, "children": [332, 334], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 21}}, {"id": 332, "type": "type_descriptor", "text": "void", "parent": 331, "children": [333], "start_point": {"row": 80, "column": 3}, "end_point": {"row": 80, "column": 7}}, {"id": 333, "type": "primitive_type", "text": "void", "parent": 332, "children": [], "start_point": {"row": 80, "column": 3}, "end_point": {"row": 80, "column": 7}}, {"id": 334, "type": "identifier", "text": "setAutoRoster", "parent": 331, "children": [], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 21}}, {"id": 335, "type": "ERROR", "text": ":(BOOL)flag", "parent": 0, "children": [336, 337], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 32}}, {"id": 336, "type": "identifier", "text": "BOOL", "parent": 335, "children": [], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 27}}, {"id": 337, "type": "identifier", "text": "flag", "parent": 335, "children": [], "start_point": {"row": 80, "column": 28}, "end_point": {"row": 80, "column": 32}}, {"id": 338, "type": "unary_expression", "text": "- (BOOL)autoPresence", "parent": 0, "children": [339, 340], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 20}}, {"id": 339, "type": "-", "text": "-", "parent": 338, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 1}}, {"id": 340, "type": "cast_expression", "text": "(BOOL)autoPresence", "parent": 338, "children": [341, 343], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 20}}, {"id": 341, "type": "type_descriptor", "text": "BOOL", "parent": 340, "children": [342], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 7}}, {"id": 342, "type": "type_identifier", "text": "BOOL", "parent": 341, "children": [], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 7}}, {"id": 343, "type": "identifier", "text": "autoPresence", "parent": 340, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 20}}, {"id": 344, "type": "unary_expression", "text": "- (void)setAutoPresence", "parent": 0, "children": [345, 346], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 23}}, {"id": 345, "type": "-", "text": "-", "parent": 344, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 1}}, {"id": 346, "type": "cast_expression", "text": "(void)setAutoPresence", "parent": 344, "children": [347, 349], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 23}}, {"id": 347, "type": "type_descriptor", "text": "void", "parent": 346, "children": [348], "start_point": {"row": 83, "column": 3}, "end_point": {"row": 83, "column": 7}}, {"id": 348, "type": "primitive_type", "text": "void", "parent": 347, "children": [], "start_point": {"row": 83, "column": 3}, "end_point": {"row": 83, "column": 7}}, {"id": 349, "type": "identifier", "text": "setAutoPresence", "parent": 346, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 23}}, {"id": 350, "type": "ERROR", "text": ":(BOOL)flag", "parent": 0, "children": [351, 352], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 34}}, {"id": 351, "type": "identifier", "text": "BOOL", "parent": 350, "children": [], "start_point": {"row": 83, "column": 25}, "end_point": {"row": 83, "column": 29}}, {"id": 352, "type": "identifier", "text": "flag", "parent": 350, "children": [], "start_point": {"row": 83, "column": 30}, "end_point": {"row": 83, "column": 34}}, {"id": 353, "type": "unary_expression", "text": "- (BOOL)autoReconnect", "parent": 0, "children": [354, 355], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 21}}, {"id": 354, "type": "-", "text": "-", "parent": 353, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 1}}, {"id": 355, "type": "cast_expression", "text": "(BOOL)autoReconnect", "parent": 353, "children": [356, 358], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 21}}, {"id": 356, "type": "type_descriptor", "text": "BOOL", "parent": 355, "children": [357], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 7}}, {"id": 357, "type": "type_identifier", "text": "BOOL", "parent": 356, "children": [], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 7}}, {"id": 358, "type": "identifier", "text": "autoReconnect", "parent": 355, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 21}}, {"id": 359, "type": "unary_expression", "text": "- (void)setAutoReconnect", "parent": 0, "children": [360, 361], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 24}}, {"id": 360, "type": "-", "text": "-", "parent": 359, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 1}}, {"id": 361, "type": "cast_expression", "text": "(void)setAutoReconnect", "parent": 359, "children": [362, 364], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 24}}, {"id": 362, "type": "type_descriptor", "text": "void", "parent": 361, "children": [363], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 7}}, {"id": 363, "type": "primitive_type", "text": "void", "parent": 362, "children": [], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 7}}, {"id": 364, "type": "identifier", "text": "setAutoReconnect", "parent": 361, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 24}}, {"id": 365, "type": "ERROR", "text": ":(BOOL)flag", "parent": 0, "children": [366, 367], "start_point": {"row": 86, "column": 24}, "end_point": {"row": 86, "column": 35}}, {"id": 366, "type": "identifier", "text": "BOOL", "parent": 365, "children": [], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 30}}, {"id": 367, "type": "identifier", "text": "flag", "parent": 365, "children": [], "start_point": {"row": 86, "column": 31}, "end_point": {"row": 86, "column": 35}}, {"id": 368, "type": "unary_expression", "text": "- (void)connect", "parent": 0, "children": [369, 370], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 15}}, {"id": 369, "type": "-", "text": "-", "parent": 368, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 1}}, {"id": 370, "type": "cast_expression", "text": "(void)connect", "parent": 368, "children": [371, 373], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 15}}, {"id": 371, "type": "type_descriptor", "text": "void", "parent": 370, "children": [372], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 7}}, {"id": 372, "type": "primitive_type", "text": "void", "parent": 371, "children": [], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 7}}, {"id": 373, "type": "identifier", "text": "connect", "parent": 370, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 15}}, {"id": 374, "type": "unary_expression", "text": "- (void)disconnect", "parent": 0, "children": [375, 376], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 18}}, {"id": 375, "type": "-", "text": "-", "parent": 374, "children": [], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 1}}, {"id": 376, "type": "cast_expression", "text": "(void)disconnect", "parent": 374, "children": [377, 379], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 18}}, {"id": 377, "type": "type_descriptor", "text": "void", "parent": 376, "children": [378], "start_point": {"row": 89, "column": 3}, "end_point": {"row": 89, "column": 7}}, {"id": 378, "type": "primitive_type", "text": "void", "parent": 377, "children": [], "start_point": {"row": 89, "column": 3}, "end_point": {"row": 89, "column": 7}}, {"id": 379, "type": "identifier", "text": "disconnect", "parent": 376, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 18}}, {"id": 380, "type": "unary_expression", "text": "- (BOOL)supportsInBandRegistration", "parent": 0, "children": [381, 382], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 34}}, {"id": 381, "type": "-", "text": "-", "parent": 380, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 1}}, {"id": 382, "type": "cast_expression", "text": "(BOOL)supportsInBandRegistration", "parent": 380, "children": [383, 385], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 34}}, {"id": 383, "type": "type_descriptor", "text": "BOOL", "parent": 382, "children": [384], "start_point": {"row": 91, "column": 3}, "end_point": {"row": 91, "column": 7}}, {"id": 384, "type": "type_identifier", "text": "BOOL", "parent": 383, "children": [], "start_point": {"row": 91, "column": 3}, "end_point": {"row": 91, "column": 7}}, {"id": 385, "type": "identifier", "text": "supportsInBandRegistration", "parent": 382, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 34}}, {"id": 386, "type": "unary_expression", "text": "- (void)registerUser", "parent": 0, "children": [387, 388], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 20}}, {"id": 387, "type": "-", "text": "-", "parent": 386, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 1}}, {"id": 388, "type": "cast_expression", "text": "(void)registerUser", "parent": 386, "children": [389, 391], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 20}}, {"id": 389, "type": "type_descriptor", "text": "void", "parent": 388, "children": [390], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 7}}, {"id": 390, "type": "primitive_type", "text": "void", "parent": 389, "children": [], "start_point": {"row": 92, "column": 3}, "end_point": {"row": 92, "column": 7}}, {"id": 391, "type": "identifier", "text": "registerUser", "parent": 388, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 20}}, {"id": 392, "type": "unary_expression", "text": "- (BOOL)supportsPlainAuthentication", "parent": 0, "children": [393, 394], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 35}}, {"id": 393, "type": "-", "text": "-", "parent": 392, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 1}}, {"id": 394, "type": "cast_expression", "text": "(BOOL)supportsPlainAuthentication", "parent": 392, "children": [395, 397], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 35}}, {"id": 395, "type": "type_descriptor", "text": "BOOL", "parent": 394, "children": [396], "start_point": {"row": 94, "column": 3}, "end_point": {"row": 94, "column": 7}}, {"id": 396, "type": "type_identifier", "text": "BOOL", "parent": 395, "children": [], "start_point": {"row": 94, "column": 3}, "end_point": {"row": 94, "column": 7}}, {"id": 397, "type": "identifier", "text": "supportsPlainAuthentication", "parent": 394, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 35}}, {"id": 398, "type": "unary_expression", "text": "- (BOOL)supportsDigestMD5Authentication", "parent": 0, "children": [399, 400], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 39}}, {"id": 399, "type": "-", "text": "-", "parent": 398, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 1}}, {"id": 400, "type": "cast_expression", "text": "(BOOL)supportsDigestMD5Authentication", "parent": 398, "children": [401, 403], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 39}}, {"id": 401, "type": "type_descriptor", "text": "BOOL", "parent": 400, "children": [402], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 7}}, {"id": 402, "type": "type_identifier", "text": "BOOL", "parent": 401, "children": [], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 7}}, {"id": 403, "type": "identifier", "text": "supportsDigestMD5Authentication", "parent": 400, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 39}}, {"id": 404, "type": "unary_expression", "text": "- (BOOL)allowsPlaintextAuth", "parent": 0, "children": [405, 406], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 27}}, {"id": 405, "type": "-", "text": "-", "parent": 404, "children": [], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 1}}, {"id": 406, "type": "cast_expression", "text": "(BOOL)allowsPlaintextAuth", "parent": 404, "children": [407, 409], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 27}}, {"id": 407, "type": "type_descriptor", "text": "BOOL", "parent": 406, "children": [408], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 7}}, {"id": 408, "type": "type_identifier", "text": "BOOL", "parent": 407, "children": [], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 7}}, {"id": 409, "type": "identifier", "text": "allowsPlaintextAuth", "parent": 406, "children": [], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 27}}, {"id": 410, "type": "unary_expression", "text": "- (void)setAllowsPlaintextAuth", "parent": 0, "children": [411, 412], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 30}}, {"id": 411, "type": "-", "text": "-", "parent": 410, "children": [], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 1}}, {"id": 412, "type": "cast_expression", "text": "(void)setAllowsPlaintextAuth", "parent": 410, "children": [413, 415], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 30}}, {"id": 413, "type": "type_descriptor", "text": "void", "parent": 412, "children": [414], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 7}}, {"id": 414, "type": "primitive_type", "text": "void", "parent": 413, "children": [], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 7}}, {"id": 415, "type": "identifier", "text": "setAllowsPlaintextAuth", "parent": 412, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 30}}, {"id": 416, "type": "ERROR", "text": ":(BOOL)flag", "parent": 0, "children": [417, 418], "start_point": {"row": 98, "column": 30}, "end_point": {"row": 98, "column": 41}}, {"id": 417, "type": "identifier", "text": "BOOL", "parent": 416, "children": [], "start_point": {"row": 98, "column": 32}, "end_point": {"row": 98, "column": 36}}, {"id": 418, "type": "identifier", "text": "flag", "parent": 416, "children": [], "start_point": {"row": 98, "column": 37}, "end_point": {"row": 98, "column": 41}}, {"id": 419, "type": "unary_expression", "text": "- (void)authenticateUser", "parent": 0, "children": [420, 421], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 24}}, {"id": 420, "type": "-", "text": "-", "parent": 419, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 1}}, {"id": 421, "type": "cast_expression", "text": "(void)authenticateUser", "parent": 419, "children": [422, 424], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 24}}, {"id": 422, "type": "type_descriptor", "text": "void", "parent": 421, "children": [423], "start_point": {"row": 100, "column": 3}, "end_point": {"row": 100, "column": 7}}, {"id": 423, "type": "primitive_type", "text": "void", "parent": 422, "children": [], "start_point": {"row": 100, "column": 3}, "end_point": {"row": 100, "column": 7}}, {"id": 424, "type": "identifier", "text": "authenticateUser", "parent": 421, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 24}}, {"id": 425, "type": "unary_expression", "text": "- (BOOL)isAuthenticated", "parent": 0, "children": [426, 427], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 23}}, {"id": 426, "type": "-", "text": "-", "parent": 425, "children": [], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 1}}, {"id": 427, "type": "cast_expression", "text": "(BOOL)isAuthenticated", "parent": 425, "children": [428, 430], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 23}}, {"id": 428, "type": "type_descriptor", "text": "BOOL", "parent": 427, "children": [429], "start_point": {"row": 102, "column": 3}, "end_point": {"row": 102, "column": 7}}, {"id": 429, "type": "type_identifier", "text": "BOOL", "parent": 428, "children": [], "start_point": {"row": 102, "column": 3}, "end_point": {"row": 102, "column": 7}}, {"id": 430, "type": "identifier", "text": "isAuthenticated", "parent": 427, "children": [], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 23}}, {"id": 431, "type": "unary_expression", "text": "- (void)goOnline", "parent": 0, "children": [432, 433], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 16}}, {"id": 432, "type": "-", "text": "-", "parent": 431, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 1}}, {"id": 433, "type": "cast_expression", "text": "(void)goOnline", "parent": 431, "children": [434, 436], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 16}}, {"id": 434, "type": "type_descriptor", "text": "void", "parent": 433, "children": [435], "start_point": {"row": 104, "column": 3}, "end_point": {"row": 104, "column": 7}}, {"id": 435, "type": "primitive_type", "text": "void", "parent": 434, "children": [], "start_point": {"row": 104, "column": 3}, "end_point": {"row": 104, "column": 7}}, {"id": 436, "type": "identifier", "text": "goOnline", "parent": 433, "children": [], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 16}}, {"id": 437, "type": "unary_expression", "text": "- (void)goOffline", "parent": 0, "children": [438, 439], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 17}}, {"id": 438, "type": "-", "text": "-", "parent": 437, "children": [], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 1}}, {"id": 439, "type": "cast_expression", "text": "(void)goOffline", "parent": 437, "children": [440, 442], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 17}}, {"id": 440, "type": "type_descriptor", "text": "void", "parent": 439, "children": [441], "start_point": {"row": 105, "column": 3}, "end_point": {"row": 105, "column": 7}}, {"id": 441, "type": "primitive_type", "text": "void", "parent": 440, "children": [], "start_point": {"row": 105, "column": 3}, "end_point": {"row": 105, "column": 7}}, {"id": 442, "type": "identifier", "text": "goOffline", "parent": 439, "children": [], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 17}}, {"id": 443, "type": "unary_expression", "text": "- (void)fetchRoster", "parent": 0, "children": [444, 445], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 19}}, {"id": 444, "type": "-", "text": "-", "parent": 443, "children": [], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 1}}, {"id": 445, "type": "cast_expression", "text": "(void)fetchRoster", "parent": 443, "children": [446, 448], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 19}}, {"id": 446, "type": "type_descriptor", "text": "void", "parent": 445, "children": [447], "start_point": {"row": 107, "column": 3}, "end_point": {"row": 107, "column": 7}}, {"id": 447, "type": "primitive_type", "text": "void", "parent": 446, "children": [], "start_point": {"row": 107, "column": 3}, "end_point": {"row": 107, "column": 7}}, {"id": 448, "type": "identifier", "text": "fetchRoster", "parent": 445, "children": [], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 19}}, {"id": 449, "type": "binary_expression", "text": "- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy:(XMPPJID *)jid;\n\n- (void)setNickname:(NSString *)nickname", "parent": 0, "children": [450, 485, 487, 488], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 112, "column": 40}}, {"id": 450, "type": "binary_expression", "text": "- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy:(XMPPJID *)jid;\n\n- (void)setNickname", "parent": 449, "children": [451, 480, 481], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 112, "column": 19}}, {"id": 451, "type": "binary_expression", "text": "- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy:(XMPPJID *)jid", "parent": 450, "children": [452, 476, 478, 479], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 110, "column": 34}}, {"id": 452, "type": "binary_expression", "text": "- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy", "parent": 451, "children": [453, 471, 472], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 110, "column": 19}}, {"id": 453, "type": "binary_expression", "text": "- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName", "parent": 452, "children": [454, 467, 469, 470], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 69}}, {"id": 454, "type": "binary_expression", "text": "- (void)addBuddy:(XMPPJID *)jid withNickname", "parent": 453, "children": [455, 461, 463, 464, 466], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 44}}, {"id": 455, "type": "unary_expression", "text": "- (void)addBuddy", "parent": 454, "children": [456, 457], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 16}}, {"id": 456, "type": "-", "text": "-", "parent": 455, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 1}}, {"id": 457, "type": "cast_expression", "text": "(void)addBuddy", "parent": 455, "children": [458, 460], "start_point": {"row": 109, "column": 2}, "end_point": {"row": 109, "column": 16}}, {"id": 458, "type": "type_descriptor", "text": "void", "parent": 457, "children": [459], "start_point": {"row": 109, "column": 3}, "end_point": {"row": 109, "column": 7}}, {"id": 459, "type": "primitive_type", "text": "void", "parent": 458, "children": [], "start_point": {"row": 109, "column": 3}, "end_point": {"row": 109, "column": 7}}, {"id": 460, "type": "identifier", "text": "addBuddy", "parent": 457, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 16}}, {"id": 461, "type": "ERROR", "text": ":(XMPPJID", "parent": 454, "children": [462], "start_point": {"row": 109, "column": 16}, "end_point": {"row": 109, "column": 25}}, {"id": 462, "type": "identifier", "text": "XMPPJID", "parent": 461, "children": [], "start_point": {"row": 109, "column": 18}, "end_point": {"row": 109, "column": 25}}, {"id": 463, "type": "*", "text": "*", "parent": 454, "children": [], "start_point": {"row": 109, "column": 26}, "end_point": {"row": 109, "column": 27}}, {"id": 464, "type": "ERROR", "text": ")jid", "parent": 454, "children": [465], "start_point": {"row": 109, "column": 27}, "end_point": {"row": 109, "column": 31}}, {"id": 465, "type": "identifier", "text": "jid", "parent": 464, "children": [], "start_point": {"row": 109, "column": 28}, "end_point": {"row": 109, "column": 31}}, {"id": 466, "type": "identifier", "text": "withNickname", "parent": 454, "children": [], "start_point": {"row": 109, "column": 32}, "end_point": {"row": 109, "column": 44}}, {"id": 467, "type": "ERROR", "text": ":(NSString", "parent": 453, "children": [468], "start_point": {"row": 109, "column": 44}, "end_point": {"row": 109, "column": 54}}, {"id": 468, "type": "identifier", "text": "NSString", "parent": 467, "children": [], "start_point": {"row": 109, "column": 46}, "end_point": {"row": 109, "column": 54}}, {"id": 469, "type": "*", "text": "*", "parent": 453, "children": [], "start_point": {"row": 109, "column": 55}, "end_point": {"row": 109, "column": 56}}, {"id": 470, "type": "identifier", "text": "optionalName", "parent": 453, "children": [], "start_point": {"row": 109, "column": 57}, "end_point": {"row": 109, "column": 69}}, {"id": 471, "type": "-", "text": "-", "parent": 452, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 1}}, {"id": 472, "type": "cast_expression", "text": "(void)removeBuddy", "parent": 452, "children": [473, 475], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 19}}, {"id": 473, "type": "type_descriptor", "text": "void", "parent": 472, "children": [474], "start_point": {"row": 110, "column": 3}, "end_point": {"row": 110, "column": 7}}, {"id": 474, "type": "primitive_type", "text": "void", "parent": 473, "children": [], "start_point": {"row": 110, "column": 3}, "end_point": {"row": 110, "column": 7}}, {"id": 475, "type": "identifier", "text": "removeBuddy", "parent": 472, "children": [], "start_point": {"row": 110, "column": 8}, "end_point": {"row": 110, "column": 19}}, {"id": 476, "type": "ERROR", "text": ":(XMPPJID", "parent": 451, "children": [477], "start_point": {"row": 110, "column": 19}, "end_point": {"row": 110, "column": 28}}, {"id": 477, "type": "identifier", "text": "XMPPJID", "parent": 476, "children": [], "start_point": {"row": 110, "column": 21}, "end_point": {"row": 110, "column": 28}}, {"id": 478, "type": "*", "text": "*", "parent": 451, "children": [], "start_point": {"row": 110, "column": 29}, "end_point": {"row": 110, "column": 30}}, {"id": 479, "type": "identifier", "text": "jid", "parent": 451, "children": [], "start_point": {"row": 110, "column": 31}, "end_point": {"row": 110, "column": 34}}, {"id": 480, "type": "-", "text": "-", "parent": 450, "children": [], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 112, "column": 1}}, {"id": 481, "type": "cast_expression", "text": "(void)setNickname", "parent": 450, "children": [482, 484], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 112, "column": 19}}, {"id": 482, "type": "type_descriptor", "text": "void", "parent": 481, "children": [483], "start_point": {"row": 112, "column": 3}, "end_point": {"row": 112, "column": 7}}, {"id": 483, "type": "primitive_type", "text": "void", "parent": 482, "children": [], "start_point": {"row": 112, "column": 3}, "end_point": {"row": 112, "column": 7}}, {"id": 484, "type": "identifier", "text": "setNickname", "parent": 481, "children": [], "start_point": {"row": 112, "column": 8}, "end_point": {"row": 112, "column": 19}}, {"id": 485, "type": "ERROR", "text": ":(NSString", "parent": 449, "children": [486], "start_point": {"row": 112, "column": 19}, "end_point": {"row": 112, "column": 29}}, {"id": 486, "type": "identifier", "text": "NSString", "parent": 485, "children": [], "start_point": {"row": 112, "column": 21}, "end_point": {"row": 112, "column": 29}}, {"id": 487, "type": "*", "text": "*", "parent": 449, "children": [], "start_point": {"row": 112, "column": 30}, "end_point": {"row": 112, "column": 31}}, {"id": 488, "type": "identifier", "text": "nickname", "parent": 449, "children": [], "start_point": {"row": 112, "column": 32}, "end_point": {"row": 112, "column": 40}}, {"id": 489, "type": "identifier", "text": "forBuddy", "parent": 0, "children": [], "start_point": {"row": 112, "column": 41}, "end_point": {"row": 112, "column": 49}}, {"id": 490, "type": "identifier", "text": "XMPPJID", "parent": 0, "children": [], "start_point": {"row": 112, "column": 51}, "end_point": {"row": 112, "column": 58}}, {"id": 491, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 112, "column": 59}, "end_point": {"row": 112, "column": 60}}, {"id": 492, "type": "identifier", "text": "jid", "parent": 0, "children": [], "start_point": {"row": 112, "column": 61}, "end_point": {"row": 112, "column": 64}}, {"id": 493, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 1}}, {"id": 494, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 114, "column": 3}, "end_point": {"row": 114, "column": 7}}, {"id": 495, "type": "identifier", "text": "acceptBuddyRequest", "parent": 0, "children": [], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 26}}, {"id": 496, "type": "identifier", "text": "XMPPJID", "parent": 0, "children": [], "start_point": {"row": 114, "column": 28}, "end_point": {"row": 114, "column": 35}}, {"id": 497, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 114, "column": 36}, "end_point": {"row": 114, "column": 37}}, {"id": 498, "type": "identifier", "text": "jid", "parent": 0, "children": [], "start_point": {"row": 114, "column": 38}, "end_point": {"row": 114, "column": 41}}, {"id": 499, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 1}}, {"id": 500, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 115, "column": 3}, "end_point": {"row": 115, "column": 7}}, {"id": 501, "type": "identifier", "text": "rejectBuddyRequest", "parent": 0, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 26}}, {"id": 502, "type": "identifier", "text": "XMPPJID", "parent": 0, "children": [], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 35}}, {"id": 503, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 115, "column": 36}, "end_point": {"row": 115, "column": 37}}, {"id": 504, "type": "identifier", "text": "jid", "parent": 0, "children": [], "start_point": {"row": 115, "column": 38}, "end_point": {"row": 115, "column": 41}}, {"id": 505, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 117, "column": 0}, "end_point": {"row": 117, "column": 1}}, {"id": 506, "type": "identifier", "text": "NSArray", "parent": 0, "children": [], "start_point": {"row": 117, "column": 3}, "end_point": {"row": 117, "column": 10}}, {"id": 507, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 12}}, {"id": 508, "type": "identifier", "text": "sortedUsersByName", "parent": 0, "children": [], "start_point": {"row": 117, "column": 13}, "end_point": {"row": 117, "column": 30}}, {"id": 509, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 118, "column": 1}}, {"id": 510, "type": "identifier", "text": "NSArray", "parent": 0, "children": [], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 10}}, {"id": 511, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 118, "column": 11}, "end_point": {"row": 118, "column": 12}}, {"id": 512, "type": "identifier", "text": "sortedUsersByAvailabilityName", "parent": 0, "children": [], "start_point": {"row": 118, "column": 13}, "end_point": {"row": 118, "column": 42}}, {"id": 513, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 120, "column": 1}}, {"id": 514, "type": "identifier", "text": "NSArray", "parent": 0, "children": [], "start_point": {"row": 120, "column": 3}, "end_point": {"row": 120, "column": 10}}, {"id": 515, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 120, "column": 11}, "end_point": {"row": 120, "column": 12}}, {"id": 516, "type": "identifier", "text": "sortedAvailableUsersByName", "parent": 0, "children": [], "start_point": {"row": 120, "column": 13}, "end_point": {"row": 120, "column": 39}}, {"id": 517, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 1}}, {"id": 518, "type": "identifier", "text": "NSArray", "parent": 0, "children": [], "start_point": {"row": 121, "column": 3}, "end_point": {"row": 121, "column": 10}}, {"id": 519, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 121, "column": 11}, "end_point": {"row": 121, "column": 12}}, {"id": 520, "type": "identifier", "text": "sortedUnavailableUsersByName", "parent": 0, "children": [], "start_point": {"row": 121, "column": 13}, "end_point": {"row": 121, "column": 41}}, {"id": 521, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 1}}, {"id": 522, "type": "identifier", "text": "NSArray", "parent": 0, "children": [], "start_point": {"row": 123, "column": 3}, "end_point": {"row": 123, "column": 10}}, {"id": 523, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 123, "column": 11}, "end_point": {"row": 123, "column": 12}}, {"id": 524, "type": "identifier", "text": "unsortedUsers", "parent": 0, "children": [], "start_point": {"row": 123, "column": 13}, "end_point": {"row": 123, "column": 26}}, {"id": 525, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 124, "column": 1}}, {"id": 526, "type": "identifier", "text": "NSArray", "parent": 0, "children": [], "start_point": {"row": 124, "column": 3}, "end_point": {"row": 124, "column": 10}}, {"id": 527, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 124, "column": 11}, "end_point": {"row": 124, "column": 12}}, {"id": 528, "type": "identifier", "text": "unsortedAvailableUsers", "parent": 0, "children": [], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 35}}, {"id": 529, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 1}}, {"id": 530, "type": "identifier", "text": "NSArray", "parent": 0, "children": [], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 10}}, {"id": 531, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 12}}, {"id": 532, "type": "identifier", "text": "unsortedUnavailableUsers", "parent": 0, "children": [], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 37}}, {"id": 533, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 127, "column": 1}}, {"id": 534, "type": "identifier", "text": "NSArray", "parent": 0, "children": [], "start_point": {"row": 127, "column": 3}, "end_point": {"row": 127, "column": 10}}, {"id": 535, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 127, "column": 11}, "end_point": {"row": 127, "column": 12}}, {"id": 536, "type": "identifier", "text": "sortedResources", "parent": 0, "children": [], "start_point": {"row": 127, "column": 13}, "end_point": {"row": 127, "column": 28}}, {"id": 537, "type": "identifier", "text": "BOOL", "parent": 0, "children": [], "start_point": {"row": 127, "column": 30}, "end_point": {"row": 127, "column": 34}}, {"id": 538, "type": "identifier", "text": "includeResourcesForMyUserExcludingMyself", "parent": 0, "children": [], "start_point": {"row": 127, "column": 35}, "end_point": {"row": 127, "column": 75}}, {"id": 539, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 129, "column": 1}}, {"id": 540, "type": "identifier", "text": "XMPPUser", "parent": 0, "children": [], "start_point": {"row": 129, "column": 3}, "end_point": {"row": 129, "column": 11}}, {"id": 541, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 129, "column": 12}, "end_point": {"row": 129, "column": 13}}, {"id": 542, "type": "identifier", "text": "userForJID", "parent": 0, "children": [], "start_point": {"row": 129, "column": 14}, "end_point": {"row": 129, "column": 24}}, {"id": 543, "type": "identifier", "text": "XMPPJID", "parent": 0, "children": [], "start_point": {"row": 129, "column": 26}, "end_point": {"row": 129, "column": 33}}, {"id": 544, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 129, "column": 34}, "end_point": {"row": 129, "column": 35}}, {"id": 545, "type": "identifier", "text": "jid", "parent": 0, "children": [], "start_point": {"row": 129, "column": 36}, "end_point": {"row": 129, "column": 39}}, {"id": 546, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 130, "column": 0}, "end_point": {"row": 130, "column": 1}}, {"id": 547, "type": "identifier", "text": "XMPPResource", "parent": 0, "children": [], "start_point": {"row": 130, "column": 3}, "end_point": {"row": 130, "column": 15}}, {"id": 548, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 130, "column": 16}, "end_point": {"row": 130, "column": 17}}, {"id": 549, "type": "identifier", "text": "resourceForJID", "parent": 0, "children": [], "start_point": {"row": 130, "column": 18}, "end_point": {"row": 130, "column": 32}}, {"id": 550, "type": "identifier", "text": "XMPPJID", "parent": 0, "children": [], "start_point": {"row": 130, "column": 34}, "end_point": {"row": 130, "column": 41}}, {"id": 551, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 130, "column": 42}, "end_point": {"row": 130, "column": 43}}, {"id": 552, "type": "identifier", "text": "jid", "parent": 0, "children": [], "start_point": {"row": 130, "column": 44}, "end_point": {"row": 130, "column": 47}}, {"id": 553, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 132, "column": 1}}, {"id": 554, "type": "identifier", "text": "XMPPUser", "parent": 0, "children": [], "start_point": {"row": 132, "column": 3}, "end_point": {"row": 132, "column": 11}}, {"id": 555, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 132, "column": 12}, "end_point": {"row": 132, "column": 13}}, {"id": 556, "type": "identifier", "text": "myUser", "parent": 0, "children": [], "start_point": {"row": 132, "column": 14}, "end_point": {"row": 132, "column": 20}}, {"id": 557, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 134, "column": 0}, "end_point": {"row": 134, "column": 1}}, {"id": 558, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 134, "column": 3}, "end_point": {"row": 134, "column": 7}}, {"id": 559, "type": "identifier", "text": "sendElement", "parent": 0, "children": [], "start_point": {"row": 134, "column": 8}, "end_point": {"row": 134, "column": 19}}, {"id": 560, "type": "identifier", "text": "NSXMLElement", "parent": 0, "children": [], "start_point": {"row": 134, "column": 21}, "end_point": {"row": 134, "column": 33}}, {"id": 561, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 134, "column": 34}, "end_point": {"row": 134, "column": 35}}, {"id": 562, "type": "identifier", "text": "element", "parent": 0, "children": [], "start_point": {"row": 134, "column": 36}, "end_point": {"row": 134, "column": 43}}, {"id": 563, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 135, "column": 0}, "end_point": {"row": 135, "column": 1}}, {"id": 564, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 135, "column": 3}, "end_point": {"row": 135, "column": 7}}, {"id": 565, "type": "identifier", "text": "sendElement", "parent": 0, "children": [], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 19}}, {"id": 566, "type": "identifier", "text": "NSXMLElement", "parent": 0, "children": [], "start_point": {"row": 135, "column": 21}, "end_point": {"row": 135, "column": 33}}, {"id": 567, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 135, "column": 34}, "end_point": {"row": 135, "column": 35}}, {"id": 568, "type": "identifier", "text": "element", "parent": 0, "children": [], "start_point": {"row": 135, "column": 36}, "end_point": {"row": 135, "column": 43}}, {"id": 569, "type": "identifier", "text": "andNotifyMe", "parent": 0, "children": [], "start_point": {"row": 135, "column": 44}, "end_point": {"row": 135, "column": 55}}, {"id": 570, "type": "long", "text": "long", "parent": 0, "children": [], "start_point": {"row": 135, "column": 57}, "end_point": {"row": 135, "column": 61}}, {"id": 571, "type": "identifier", "text": "tag", "parent": 0, "children": [], "start_point": {"row": 135, "column": 62}, "end_point": {"row": 135, "column": 65}}, {"id": 572, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 137, "column": 1}}, {"id": 573, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 137, "column": 3}, "end_point": {"row": 137, "column": 7}}, {"id": 574, "type": "identifier", "text": "sendMessage", "parent": 0, "children": [], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 19}}, {"id": 575, "type": "identifier", "text": "NSString", "parent": 0, "children": [], "start_point": {"row": 137, "column": 21}, "end_point": {"row": 137, "column": 29}}, {"id": 576, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 137, "column": 30}, "end_point": {"row": 137, "column": 31}}, {"id": 577, "type": "identifier", "text": "message", "parent": 0, "children": [], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 39}}, {"id": 578, "type": "identifier", "text": "toJID", "parent": 0, "children": [], "start_point": {"row": 137, "column": 40}, "end_point": {"row": 137, "column": 45}}, {"id": 579, "type": "identifier", "text": "XMPPJID", "parent": 0, "children": [], "start_point": {"row": 137, "column": 47}, "end_point": {"row": 137, "column": 54}}, {"id": 580, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 137, "column": 55}, "end_point": {"row": 137, "column": 56}}, {"id": 581, "type": "identifier", "text": "jid", "parent": 0, "children": [], "start_point": {"row": 137, "column": 57}, "end_point": {"row": 137, "column": 60}}, {"id": 582, "type": "ERROR", "text": "@", "parent": 0, "children": [], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 1}}, {"id": 583, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 142, "column": 0}, "end_point": {"row": 142, "column": 7}}, {"id": 584, "type": "identifier", "text": "mark", "parent": 0, "children": [], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 12}}, {"id": 585, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 142, "column": 13}, "end_point": {"row": 142, "column": 14}}, {"id": 586, "type": "ERROR", "text": "@", "parent": 0, "children": [], "start_point": {"row": 145, "column": 0}, "end_point": {"row": 145, "column": 1}}, {"id": 587, "type": "identifier", "text": "interface", "parent": 0, "children": [], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 10}}, {"id": 588, "type": "identifier", "text": "NSObject", "parent": 0, "children": [], "start_point": {"row": 145, "column": 11}, "end_point": {"row": 145, "column": 19}}, {"id": 589, "type": "identifier", "text": "XMPPClientDelegate", "parent": 0, "children": [], "start_point": {"row": 145, "column": 21}, "end_point": {"row": 145, "column": 39}}, {"id": 590, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 147, "column": 0}, "end_point": {"row": 147, "column": 1}}, {"id": 591, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 7}}, {"id": 592, "type": "identifier", "text": "xmppClientConnecting", "parent": 0, "children": [], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 28}}, {"id": 593, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 147, "column": 30}, "end_point": {"row": 147, "column": 40}}, {"id": 594, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 147, "column": 41}, "end_point": {"row": 147, "column": 42}}, {"id": 595, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 147, "column": 43}, "end_point": {"row": 147, "column": 49}}, {"id": 596, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 148, "column": 0}, "end_point": {"row": 148, "column": 1}}, {"id": 597, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 148, "column": 3}, "end_point": {"row": 148, "column": 7}}, {"id": 598, "type": "identifier", "text": "xmppClientDidConnect", "parent": 0, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 28}}, {"id": 599, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 148, "column": 30}, "end_point": {"row": 148, "column": 40}}, {"id": 600, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 148, "column": 41}, "end_point": {"row": 148, "column": 42}}, {"id": 601, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 148, "column": 43}, "end_point": {"row": 148, "column": 49}}, {"id": 602, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 149, "column": 0}, "end_point": {"row": 149, "column": 1}}, {"id": 603, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 149, "column": 3}, "end_point": {"row": 149, "column": 7}}, {"id": 604, "type": "identifier", "text": "xmppClientDidNotConnect", "parent": 0, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 31}}, {"id": 605, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 149, "column": 33}, "end_point": {"row": 149, "column": 43}}, {"id": 606, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 149, "column": 44}, "end_point": {"row": 149, "column": 45}}, {"id": 607, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 149, "column": 46}, "end_point": {"row": 149, "column": 52}}, {"id": 608, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 150, "column": 1}}, {"id": 609, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 150, "column": 3}, "end_point": {"row": 150, "column": 7}}, {"id": 610, "type": "identifier", "text": "xmppClientDidDisconnect", "parent": 0, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 31}}, {"id": 611, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 150, "column": 33}, "end_point": {"row": 150, "column": 43}}, {"id": 612, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 150, "column": 44}, "end_point": {"row": 150, "column": 45}}, {"id": 613, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 150, "column": 46}, "end_point": {"row": 150, "column": 52}}, {"id": 614, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 152, "column": 0}, "end_point": {"row": 152, "column": 1}}, {"id": 615, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 152, "column": 3}, "end_point": {"row": 152, "column": 7}}, {"id": 616, "type": "identifier", "text": "xmppClientDidRegister", "parent": 0, "children": [], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 29}}, {"id": 617, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 152, "column": 31}, "end_point": {"row": 152, "column": 41}}, {"id": 618, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 152, "column": 42}, "end_point": {"row": 152, "column": 43}}, {"id": 619, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 152, "column": 44}, "end_point": {"row": 152, "column": 50}}, {"id": 620, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 153, "column": 0}, "end_point": {"row": 153, "column": 1}}, {"id": 621, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 153, "column": 3}, "end_point": {"row": 153, "column": 7}}, {"id": 622, "type": "identifier", "text": "xmppClient", "parent": 0, "children": [], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 18}}, {"id": 623, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 153, "column": 20}, "end_point": {"row": 153, "column": 30}}, {"id": 624, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 153, "column": 31}, "end_point": {"row": 153, "column": 32}}, {"id": 625, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 153, "column": 33}, "end_point": {"row": 153, "column": 39}}, {"id": 626, "type": "identifier", "text": "didNotRegister", "parent": 0, "children": [], "start_point": {"row": 153, "column": 40}, "end_point": {"row": 153, "column": 54}}, {"id": 627, "type": "identifier", "text": "NSXMLElement", "parent": 0, "children": [], "start_point": {"row": 153, "column": 56}, "end_point": {"row": 153, "column": 68}}, {"id": 628, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 153, "column": 69}, "end_point": {"row": 153, "column": 70}}, {"id": 629, "type": "identifier", "text": "error", "parent": 0, "children": [], "start_point": {"row": 153, "column": 71}, "end_point": {"row": 153, "column": 76}}, {"id": 630, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 155, "column": 0}, "end_point": {"row": 155, "column": 1}}, {"id": 631, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 155, "column": 3}, "end_point": {"row": 155, "column": 7}}, {"id": 632, "type": "identifier", "text": "xmppClientDidAuthenticate", "parent": 0, "children": [], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 33}}, {"id": 633, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 155, "column": 35}, "end_point": {"row": 155, "column": 45}}, {"id": 634, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 155, "column": 46}, "end_point": {"row": 155, "column": 47}}, {"id": 635, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 155, "column": 48}, "end_point": {"row": 155, "column": 54}}, {"id": 636, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 156, "column": 0}, "end_point": {"row": 156, "column": 1}}, {"id": 637, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 156, "column": 3}, "end_point": {"row": 156, "column": 7}}, {"id": 638, "type": "identifier", "text": "xmppClient", "parent": 0, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 18}}, {"id": 639, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 156, "column": 20}, "end_point": {"row": 156, "column": 30}}, {"id": 640, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 156, "column": 31}, "end_point": {"row": 156, "column": 32}}, {"id": 641, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 156, "column": 33}, "end_point": {"row": 156, "column": 39}}, {"id": 642, "type": "identifier", "text": "didNotAuthenticate", "parent": 0, "children": [], "start_point": {"row": 156, "column": 40}, "end_point": {"row": 156, "column": 58}}, {"id": 643, "type": "identifier", "text": "NSXMLElement", "parent": 0, "children": [], "start_point": {"row": 156, "column": 60}, "end_point": {"row": 156, "column": 72}}, {"id": 644, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 156, "column": 73}, "end_point": {"row": 156, "column": 74}}, {"id": 645, "type": "identifier", "text": "error", "parent": 0, "children": [], "start_point": {"row": 156, "column": 75}, "end_point": {"row": 156, "column": 80}}, {"id": 646, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 158, "column": 0}, "end_point": {"row": 158, "column": 1}}, {"id": 647, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 158, "column": 3}, "end_point": {"row": 158, "column": 7}}, {"id": 648, "type": "identifier", "text": "xmppClientDidUpdateRoster", "parent": 0, "children": [], "start_point": {"row": 158, "column": 8}, "end_point": {"row": 158, "column": 33}}, {"id": 649, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 158, "column": 35}, "end_point": {"row": 158, "column": 45}}, {"id": 650, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 158, "column": 46}, "end_point": {"row": 158, "column": 47}}, {"id": 651, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 158, "column": 48}, "end_point": {"row": 158, "column": 54}}, {"id": 652, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 160, "column": 0}, "end_point": {"row": 160, "column": 1}}, {"id": 653, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 160, "column": 3}, "end_point": {"row": 160, "column": 7}}, {"id": 654, "type": "identifier", "text": "xmppClient", "parent": 0, "children": [], "start_point": {"row": 160, "column": 8}, "end_point": {"row": 160, "column": 18}}, {"id": 655, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 160, "column": 20}, "end_point": {"row": 160, "column": 30}}, {"id": 656, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 160, "column": 31}, "end_point": {"row": 160, "column": 32}}, {"id": 657, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 160, "column": 33}, "end_point": {"row": 160, "column": 39}}, {"id": 658, "type": "identifier", "text": "didReceiveBuddyRequest", "parent": 0, "children": [], "start_point": {"row": 160, "column": 40}, "end_point": {"row": 160, "column": 62}}, {"id": 659, "type": "identifier", "text": "XMPPJID", "parent": 0, "children": [], "start_point": {"row": 160, "column": 64}, "end_point": {"row": 160, "column": 71}}, {"id": 660, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 160, "column": 72}, "end_point": {"row": 160, "column": 73}}, {"id": 661, "type": "identifier", "text": "jid", "parent": 0, "children": [], "start_point": {"row": 160, "column": 74}, "end_point": {"row": 160, "column": 77}}, {"id": 662, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 162, "column": 0}, "end_point": {"row": 162, "column": 1}}, {"id": 663, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 162, "column": 3}, "end_point": {"row": 162, "column": 7}}, {"id": 664, "type": "identifier", "text": "xmppClient", "parent": 0, "children": [], "start_point": {"row": 162, "column": 8}, "end_point": {"row": 162, "column": 18}}, {"id": 665, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 162, "column": 20}, "end_point": {"row": 162, "column": 30}}, {"id": 666, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 162, "column": 31}, "end_point": {"row": 162, "column": 32}}, {"id": 667, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 162, "column": 33}, "end_point": {"row": 162, "column": 39}}, {"id": 668, "type": "identifier", "text": "didReceiveIQ", "parent": 0, "children": [], "start_point": {"row": 162, "column": 40}, "end_point": {"row": 162, "column": 52}}, {"id": 669, "type": "identifier", "text": "XMPPIQ", "parent": 0, "children": [], "start_point": {"row": 162, "column": 54}, "end_point": {"row": 162, "column": 60}}, {"id": 670, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 162, "column": 61}, "end_point": {"row": 162, "column": 62}}, {"id": 671, "type": "identifier", "text": "iq", "parent": 0, "children": [], "start_point": {"row": 162, "column": 63}, "end_point": {"row": 162, "column": 65}}, {"id": 672, "type": "-", "text": "-", "parent": 0, "children": [], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 163, "column": 1}}, {"id": 673, "type": "primitive_type", "text": "void", "parent": 0, "children": [], "start_point": {"row": 163, "column": 3}, "end_point": {"row": 163, "column": 7}}, {"id": 674, "type": "identifier", "text": "xmppClient", "parent": 0, "children": [], "start_point": {"row": 163, "column": 8}, "end_point": {"row": 163, "column": 18}}, {"id": 675, "type": "identifier", "text": "XMPPClient", "parent": 0, "children": [], "start_point": {"row": 163, "column": 20}, "end_point": {"row": 163, "column": 30}}, {"id": 676, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 163, "column": 31}, "end_point": {"row": 163, "column": 32}}, {"id": 677, "type": "identifier", "text": "sender", "parent": 0, "children": [], "start_point": {"row": 163, "column": 33}, "end_point": {"row": 163, "column": 39}}, {"id": 678, "type": "identifier", "text": "didReceiveMessage", "parent": 0, "children": [], "start_point": {"row": 163, "column": 40}, "end_point": {"row": 163, "column": 57}}, {"id": 679, "type": "identifier", "text": "XMPPMessage", "parent": 0, "children": [], "start_point": {"row": 163, "column": 59}, "end_point": {"row": 163, "column": 70}}, {"id": 680, "type": "*", "text": "*", "parent": 0, "children": [], "start_point": {"row": 163, "column": 71}, "end_point": {"row": 163, "column": 72}}, {"id": 681, "type": "identifier", "text": "message", "parent": 0, "children": [], "start_point": {"row": 163, "column": 73}, "end_point": {"row": 163, "column": 80}}, {"id": 682, "type": "ERROR", "text": "@", "parent": 0, "children": [], "start_point": {"row": 165, "column": 0}, "end_point": {"row": 165, "column": 1}}]}, "node_categories": {"declarations": {"functions": [49], "variables": [6, 10, 14, 18, 22, 26, 30, 34, 44, 54, 59, 64, 67, 72, 77, 80, 83, 88, 93, 98, 103, 114], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [38, 110, 120, 122, 126, 128, 135, 137, 144, 146, 152, 153, 154, 156, 165, 167, 171, 173, 180, 182, 186, 188, 195, 197, 203, 204, 205, 207, 216, 218, 224, 225, 226, 228, 237, 239, 243, 245, 252, 254, 258, 260, 267, 269, 273, 275, 282, 284, 288, 290, 294, 296, 300, 302, 308, 310, 314, 316, 323, 325, 329, 331, 338, 340, 344, 346, 353, 355, 359, 361, 368, 370, 374, 376, 380, 382, 386, 388, 392, 394, 398, 400, 404, 406, 410, 412, 419, 421, 425, 427, 431, 433, 437, 439, 443, 445, 449, 450, 451, 452, 453, 454, 455, 457, 472, 481], "assignments": [], "loops": [], "conditionals": [7, 11, 15, 19, 23, 27, 31, 35, 36, 37, 40, 45, 46, 50, 51, 53, 55, 58, 60, 63, 65, 66, 68, 71, 73, 76, 79, 81, 82, 84, 87, 89, 92, 94, 97, 99, 102, 104, 107, 108, 109, 112, 115, 118, 119, 124, 125, 131, 133, 134, 140, 142, 143, 148, 151, 159, 161, 163, 169, 170, 176, 178, 179, 184, 185, 191, 193, 194, 199, 202, 210, 212, 214, 220, 223, 231, 233, 235, 242, 248, 251, 256, 257, 263, 265, 266, 271, 272, 278, 280, 281, 286, 287, 292, 293, 298, 299, 304, 307, 312, 313, 319, 321, 322, 327, 328, 334, 336, 337, 342, 343, 349, 351, 352, 357, 358, 364, 366, 367, 373, 379, 384, 385, 391, 396, 397, 402, 403, 408, 409, 415, 417, 418, 424, 429, 430, 436, 442, 448, 460, 462, 465, 466, 468, 470, 475, 477, 479, 484, 486, 488, 489, 490, 492, 495, 496, 498, 501, 502, 504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, 526, 528, 530, 532, 534, 536, 537, 538, 540, 542, 543, 545, 547, 549, 550, 552, 554, 556, 559, 560, 562, 565, 566, 568, 569, 571, 574, 575, 577, 578, 579, 581, 584, 587, 588, 589, 592, 593, 595, 598, 599, 601, 604, 605, 607, 610, 611, 613, 616, 617, 619, 622, 623, 625, 626, 627, 629, 632, 633, 635, 638, 639, 641, 642, 643, 645, 648, 649, 651, 654, 655, 657, 658, 659, 661, 664, 665, 667, 668, 669, 671, 674, 675, 677, 678, 679, 681], "returns": [], "exceptions": []}, "expressions": {"calls": [1], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 49, "universal_type": "function", "name": "XMPPClient", "text_snippet": "interface XMPPClient : NSObject\n{\n\tMulticastDelegate *multicastDelegate;\n\t\n\tNSString *domain;\n\tUInt1"}], "class_declarations": [], "import_statements": []}, "original_source_code": "#import <Foundation/Foundation.h>\n\n@class XMPPStream;\n@class XMPPJID;\n@class XMPPUser;\n@class XMPPResource;\n@class XMPPIQ;\n@class XMPPMessage;\n@class XMPPPresence;\n@class MulticastDelegate;\n\n#if !TARGET_OS_IPHONE\n @class SCNotificationManager;\n#endif\n\n@interface XMPPClient : NSObject\n{\n\tMulticastDelegate *multicastDelegate;\n\t\n\tNSString *domain;\n\tUInt16 port;\n\t\n\tXMPPJID *myJID;\n\tNSString *password;\n\tint priority;\n\t\n\tByte flags;\n\t\n\tXMPPStream *xmppStream;\n\tNSError *streamError;\n\t\n\tNSMutableDictionary *roster;\n\tXMPPUser *myUser;\n\t\n\tNSMutableArray *earlyPresenceElements;\n\t\n#if !TARGET_OS_IPHONE\t\n\tSCNotificationManager *scNotificationManager;\n#endif\n}\n\n- (id)init;\n\n- (void)addDelegate:(id)delegate;\n- (void)removeDelegate:(id)delegate;\n\n- (NSString *)domain;\n- (void)setDomain:(NSString *)domain;\n\n- (UInt16)port;\n- (void)setPort:(UInt16)port;\n\n- (BOOL)usesOldStyleSSL;\n- (void)setUsesOldStyleSSL:(BOOL)flag;\n\n- (XMPPJID *)myJID;\n- (void)setMyJID:(XMPPJID *)jid;\n\n- (NSString *)password;\n- (void)setPassword:(NSString *)password;\n\n- (int)priority;\n- (void)setPriority:(int)priority;\n\n- (BOOL)allowsSelfSignedCertificates;\n- (void)setAllowsSelfSignedCertificates:(BOOL)flag;\n\n- (BOOL)allowsSSLHostNameMismatch;\n- (void)setAllowsSSLHostNameMismatch:(BOOL)flag;\n\n- (BOOL)isDisconnected;\n- (BOOL)isConnected;\n- (BOOL)isSecure;\n\n- (NSError *)streamError;\n\n- (BOOL)autoLogin;\n- (void)setAutoLogin:(BOOL)flag;\n\n- (BOOL)autoRoster;\n- (void)setAutoRoster:(BOOL)flag;\n\n- (BOOL)autoPresence;\n- (void)setAutoPresence:(BOOL)flag;\n\n- (BOOL)autoReconnect;\n- (void)setAutoReconnect:(BOOL)flag;\n\n- (void)connect;\n- (void)disconnect;\n\n- (BOOL)supportsInBandRegistration;\n- (void)registerUser;\n\n- (BOOL)supportsPlainAuthentication;\n- (BOOL)supportsDigestMD5Authentication;\n\n- (BOOL)allowsPlaintextAuth;\n- (void)setAllowsPlaintextAuth:(BOOL)flag;\n\n- (void)authenticateUser;\n\n- (BOOL)isAuthenticated;\n\n- (void)goOnline;\n- (void)goOffline;\n\n- (void)fetchRoster;\n\n- (void)addBuddy:(XMPPJID *)jid withNickname:(NSString *)optionalName;\n- (void)removeBuddy:(XMPPJID *)jid;\n\n- (void)setNickname:(NSString *)nickname forBuddy:(XMPPJID *)jid;\n\n- (void)acceptBuddyRequest:(XMPPJID *)jid;\n- (void)rejectBuddyRequest:(XMPPJID *)jid;\n\n- (NSArray *)sortedUsersByName;\n- (NSArray *)sortedUsersByAvailabilityName;\n\n- (NSArray *)sortedAvailableUsersByName;\n- (NSArray *)sortedUnavailableUsersByName;\n\n- (NSArray *)unsortedUsers;\n- (NSArray *)unsortedAvailableUsers;\n- (NSArray *)unsortedUnavailableUsers;\n\n- (NSArray *)sortedResources:(BOOL)includeResourcesForMyUserExcludingMyself;\n\n- (XMPPUser *)userForJID:(XMPPJID *)jid;\n- (XMPPResource *)resourceForJID:(XMPPJID *)jid;\n\n- (XMPPUser *)myUser;\n\n- (void)sendElement:(NSXMLElement *)element;\n- (void)sendElement:(NSXMLElement *)element andNotifyMe:(long)tag;\n\n- (void)sendMessage:(NSString *)message toJID:(XMPPJID *)jid;\n\n@end\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n#pragma mark -\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n@interface NSObject (XMPPClientDelegate)\n\n- (void)xmppClientConnecting:(XMPPClient *)sender;\n- (void)xmppClientDidConnect:(XMPPClient *)sender;\n- (void)xmppClientDidNotConnect:(XMPPClient *)sender;\n- (void)xmppClientDidDisconnect:(XMPPClient *)sender;\n\n- (void)xmppClientDidRegister:(XMPPClient *)sender;\n- (void)xmppClient:(XMPPClient *)sender didNotRegister:(NSXMLElement *)error;\n\n- (void)xmppClientDidAuthenticate:(XMPPClient *)sender;\n- (void)xmppClient:(XMPPClient *)sender didNotAuthenticate:(NSXMLElement *)error;\n\n- (void)xmppClientDidUpdateRoster:(XMPPClient *)sender;\n\n- (void)xmppClient:(XMPPClient *)sender didReceiveBuddyRequest:(XMPPJID *)jid;\n\n- (void)xmppClient:(XMPPClient *)sender didReceiveIQ:(XMPPIQ *)iq;\n- (void)xmppClient:(XMPPClient *)sender didReceiveMessage:(XMPPMessage *)message;\n\n@end\n"}
80,944
c
/* * Configuration control preamble ********************************************* * * PROJECT: C++ Library * * TITLE: Data Tip window (aka. enhanced Tooltips) * FILENAME: tfxdatatip.h * * CREATED: 10 April 1997 * ORIGINATOR: <NAME> * * (c) Copyright 1997 * Technisoft Ltd. * ****************************************************************************** * ISSUE HISTORY * * 10-APR-1997 SAJW * Issue 0.1 Created * * 18-APR-1997 SAJW * Issue 1.0 First release * ****************************************************************************** */ /* * Module preamble ************************************************************ * * NAME: Data tips * * DESCRIPTION: This module provides the data tips used for displaying * data information to the user in a ToolTip format. * * HIERARCHY: CWnd * | * +---- TFXDataTip * * LIMITATIONS: None * * REFERENCES: None * ****************************************************************************** */ #ifndef _tfxdatatip_h__ #define _tfxdatatip_h__ /* * Class preamble ************************************************************* * * NAME: TFXDataTip * BASE CLASS(es): CWnd * * DESCRIPTION: This class provides a DataTip conotrol. This is used to * display pop-up information on a view to the user. When * a data tip control is enabled, then after the information * has been set the window will be displayed provided that * the mouse does not move within a specified time delay. * * Once the tip is visible, then it remains visible until * the user moves the tip outside of a catch area * immediately around its display position. * * PUBLIC INTERFACE: * Methods: constructor constructs a DataTip window * SetOffset sets the offset from the cursor position * Create creates the DataTip window * Set sets the DataTip information (starts time) * Hide hides the DataTip window * * On turns the DataTip window on/off * IsOn returns the status of the DataTip * * SetDelay sets the delay for all DataTips * * Operators: none * * Data members: none * ****************************************************************************** * REVISION HISTORY * * 18-APR-1997 SAJW First release * ****************************************************************************** */ class TFXDataTip : public CWnd { // Construction public: TFXDataTip(); // Attributes public: void SetOffset(long x, long y); void SetOffset(CPoint offset); // Operations public: virtual BOOL Create(CWnd* pParentWnd); void Set(CPoint point, const CString& tip); void Hide( ); void On(BOOL on); BOOL IsOn( ) const; // class operations public: static void SetDelay(short delay); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(TFXDataTip) public: virtual BOOL DestroyWindow(); virtual BOOL PreTranslateMessage(MSG* pMsg); //}}AFX_VIRTUAL // Implementation public: virtual ~TFXDataTip(); // Generated message map functions protected: //{{AFX_MSG(TFXDataTip) afx_msg void OnPaint(); afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg void OnTimer(UINT nIDEvent); //}}AFX_MSG DECLARE_MESSAGE_MAP() protected: void Display( ); protected: CWnd* m_parent; CString m_tip; CPoint m_offset; CRect m_captureRect; CPoint m_origin; BOOL m_ready; BOOL m_on; UINT m_timer; protected: static void RegisterWnd( ); static void Initialise( ); static BOOL _registered; static short _delay; static short _count; // keyboard hook static LRESULT CALLBACK KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam); static HHOOK _hookProc; static TFXDataTip* _current; }; // inline object methods inline void TFXDataTip::On(BOOL on) { m_on = on; } inline BOOL TFXDataTip::IsOn( ) const { return m_on; } inline void TFXDataTip::SetOffset(long x, long y) { m_offset = CPoint(x, y); } inline void TFXDataTip::SetOffset(CPoint offset) { m_offset = offset; } // inline methods for class inline void TFXDataTip::SetDelay(short delay) { _delay = delay; } #endif
29.02
160
(translation_unit) "/*\n* Configuration control preamble *********************************************\n*\n* PROJECT: C++ Library\n*\n* TITLE: Data Tip window (aka. enhanced Tooltips)\n* FILENAME: tfxdatatip.h\n*\n* CREATED: 10 April 1997\n* ORIGINATOR: <NAME>\n*\n* (c) Copyright 1997\n* Technisoft Ltd.\n*\n******************************************************************************\n* ISSUE HISTORY \n*\n* 10-APR-1997 SAJW\n* Issue 0.1 Created \n*\n* 18-APR-1997 SAJW\n* Issue 1.0 First release\n*\n******************************************************************************\n */\n\n\n/*\n* Module preamble ************************************************************\n*\n* NAME: Data tips\n*\n* DESCRIPTION: This module provides the data tips used for displaying\n* data information to the user in a ToolTip format.\n*\n* HIERARCHY: CWnd\n* |\n* +---- TFXDataTip\n*\n* LIMITATIONS: None\n*\n* REFERENCES: None\n*\n******************************************************************************\n*/\n#ifndef _tfxdatatip_h__\n #define _tfxdatatip_h__\n\n/*\n \n* Class preamble *************************************************************\n*\n* NAME: TFXDataTip\n* BASE CLASS(es): CWnd\n*\n* DESCRIPTION: This class provides a DataTip conotrol. This is used to \n* display pop-up information on a view to the user. When\n* a data tip control is enabled, then after the information\n* has been set the window will be displayed provided that \n* the mouse does not move within a specified time delay.\n*\n* Once the tip is visible, then it remains visible until\n* the user moves the tip outside of a catch area \n* immediately around its display position.\n*\n* PUBLIC INTERFACE:\n* Methods: constructor constructs a DataTip window\n* SetOffset sets the offset from the cursor position\n* Create creates the DataTip window\n* Set sets the DataTip information (starts time)\n* Hide hides the DataTip window\n*\n* On turns the DataTip window on/off\n* IsOn returns the status of the DataTip\n*\n* SetDelay sets the delay for all DataTips\n*\n* Operators: none\n*\n* Data members: none\n*\n******************************************************************************\n* REVISION HISTORY \n*\n* 18-APR-1997 SAJW First release\n*\n******************************************************************************\n*/\nclass TFXDataTip : public CWnd\n{\n// Construction\npublic:\n TFXDataTip();\n\n// Attributes\npublic:\n void SetOffset(long x, long y);\n void SetOffset(CPoint offset);\n\n// Operations\npublic:\n virtual BOOL Create(CWnd* pParentWnd);\n void Set(CPoint point, const CString& tip);\n void Hide( );\n\n void On(BOOL on);\n BOOL IsOn( ) const;\n\n// class operations\npublic:\n static void SetDelay(short delay);\n\n// Overrides\n // ClassWizard generated virtual function overrides\n //{{AFX_VIRTUAL(TFXDataTip)\n public:\n virtual BOOL DestroyWindow();\n virtual BOOL PreTranslateMessage(MSG* pMsg);\n //}}AFX_VIRTUAL\n\n// Implementation\npublic:\n virtual ~TFXDataTip();\n\n // Generated message map functions\nprotected:\n //{{AFX_MSG(TFXDataTip)\n afx_msg void OnPaint();\n afx_msg void OnMouseMove(UINT nFlags, CPoint point);\n afx_msg void OnTimer(UINT nIDEvent);\n //}}AFX_MSG\n DECLARE_MESSAGE_MAP()\n\nprotected:\n void Display( );\n\nprotected:\n CWnd* m_parent;\n CString m_tip;\n CPoint m_offset;\n CRect m_captureRect;\n CPoint m_origin;\n BOOL m_ready;\n BOOL m_on;\n UINT m_timer;\n\nprotected:\n static void RegisterWnd( );\n static void Initialise( );\n\n static BOOL _registered;\n static short _delay;\n static short _count;\n\n // keyboard hook\n static LRESULT CALLBACK KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam); \n static HHOOK _hookProc;\n static TFXDataTip* _current;\n};\n\n\n// inline object methods\ninline void TFXDataTip::On(BOOL on)\n { m_on = on; }\ninline BOOL TFXDataTip::IsOn( ) const\n { return m_on; }\n\ninline void TFXDataTip::SetOffset(long x, long y)\n { m_offset = CPoint(x, y); }\ninline void TFXDataTip::SetOffset(CPoint offset)\n { m_offset = offset; }\n\n// inline methods for class\ninline void TFXDataTip::SetDelay(short delay)\n { _delay = delay; }\n\n\n\n#endif\n\n" (comment) "/*\n* Configuration control preamble *********************************************\n*\n* PROJECT: C++ Library\n*\n* TITLE: Data Tip window (aka. enhanced Tooltips)\n* FILENAME: tfxdatatip.h\n*\n* CREATED: 10 April 1997\n* ORIGINATOR: <NAME>\n*\n* (c) Copyright 1997\n* Technisoft Ltd.\n*\n******************************************************************************\n* ISSUE HISTORY \n*\n* 10-APR-1997 SAJW\n* Issue 0.1 Created \n*\n* 18-APR-1997 SAJW\n* Issue 1.0 First release\n*\n******************************************************************************\n */" (comment) "/*\n* Module preamble ************************************************************\n*\n* NAME: Data tips\n*\n* DESCRIPTION: This module provides the data tips used for displaying\n* data information to the user in a ToolTip format.\n*\n* HIERARCHY: CWnd\n* |\n* +---- TFXDataTip\n*\n* LIMITATIONS: None\n*\n* REFERENCES: None\n*\n******************************************************************************\n*/" (preproc_ifdef) "#ifndef _tfxdatatip_h__\n #define _tfxdatatip_h__\n\n/*\n \n* Class preamble *************************************************************\n*\n* NAME: TFXDataTip\n* BASE CLASS(es): CWnd\n*\n* DESCRIPTION: This class provides a DataTip conotrol. This is used to \n* display pop-up information on a view to the user. When\n* a data tip control is enabled, then after the information\n* has been set the window will be displayed provided that \n* the mouse does not move within a specified time delay.\n*\n* Once the tip is visible, then it remains visible until\n* the user moves the tip outside of a catch area \n* immediately around its display position.\n*\n* PUBLIC INTERFACE:\n* Methods: constructor constructs a DataTip window\n* SetOffset sets the offset from the cursor position\n* Create creates the DataTip window\n* Set sets the DataTip information (starts time)\n* Hide hides the DataTip window\n*\n* On turns the DataTip window on/off\n* IsOn returns the status of the DataTip\n*\n* SetDelay sets the delay for all DataTips\n*\n* Operators: none\n*\n* Data members: none\n*\n******************************************************************************\n* REVISION HISTORY \n*\n* 18-APR-1997 SAJW First release\n*\n******************************************************************************\n*/\nclass TFXDataTip : public CWnd\n{\n// Construction\npublic:\n TFXDataTip();\n\n// Attributes\npublic:\n void SetOffset(long x, long y);\n void SetOffset(CPoint offset);\n\n// Operations\npublic:\n virtual BOOL Create(CWnd* pParentWnd);\n void Set(CPoint point, const CString& tip);\n void Hide( );\n\n void On(BOOL on);\n BOOL IsOn( ) const;\n\n// class operations\npublic:\n static void SetDelay(short delay);\n\n// Overrides\n // ClassWizard generated virtual function overrides\n //{{AFX_VIRTUAL(TFXDataTip)\n public:\n virtual BOOL DestroyWindow();\n virtual BOOL PreTranslateMessage(MSG* pMsg);\n //}}AFX_VIRTUAL\n\n// Implementation\npublic:\n virtual ~TFXDataTip();\n\n // Generated message map functions\nprotected:\n //{{AFX_MSG(TFXDataTip)\n afx_msg void OnPaint();\n afx_msg void OnMouseMove(UINT nFlags, CPoint point);\n afx_msg void OnTimer(UINT nIDEvent);\n //}}AFX_MSG\n DECLARE_MESSAGE_MAP()\n\nprotected:\n void Display( );\n\nprotected:\n CWnd* m_parent;\n CString m_tip;\n CPoint m_offset;\n CRect m_captureRect;\n CPoint m_origin;\n BOOL m_ready;\n BOOL m_on;\n UINT m_timer;\n\nprotected:\n static void RegisterWnd( );\n static void Initialise( );\n\n static BOOL _registered;\n static short _delay;\n static short _count;\n\n // keyboard hook\n static LRESULT CALLBACK KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam); \n static HHOOK _hookProc;\n static TFXDataTip* _current;\n};\n\n\n// inline object methods\ninline void TFXDataTip::On(BOOL on)\n { m_on = on; }\ninline BOOL TFXDataTip::IsOn( ) const\n { return m_on; }\n\ninline void TFXDataTip::SetOffset(long x, long y)\n { m_offset = CPoint(x, y); }\ninline void TFXDataTip::SetOffset(CPoint offset)\n { m_offset = offset; }\n\n// inline methods for class\ninline void TFXDataTip::SetDelay(short delay)\n { _delay = delay; }\n\n\n\n#endif" (#ifndef) "#ifndef" (identifier) "_tfxdatatip_h__" (preproc_def) "#define _tfxdatatip_h__\n" (#define) "#define" (identifier) "_tfxdatatip_h__" (comment) "/*\n \n* Class preamble *************************************************************\n*\n* NAME: TFXDataTip\n* BASE CLASS(es): CWnd\n*\n* DESCRIPTION: This class provides a DataTip conotrol. This is used to \n* display pop-up information on a view to the user. When\n* a data tip control is enabled, then after the information\n* has been set the window will be displayed provided that \n* the mouse does not move within a specified time delay.\n*\n* Once the tip is visible, then it remains visible until\n* the user moves the tip outside of a catch area \n* immediately around its display position.\n*\n* PUBLIC INTERFACE:\n* Methods: constructor constructs a DataTip window\n* SetOffset sets the offset from the cursor position\n* Create creates the DataTip window\n* Set sets the DataTip information (starts time)\n* Hide hides the DataTip window\n*\n* On turns the DataTip window on/off\n* IsOn returns the status of the DataTip\n*\n* SetDelay sets the delay for all DataTips\n*\n* Operators: none\n*\n* Data members: none\n*\n******************************************************************************\n* REVISION HISTORY \n*\n* 18-APR-1997 SAJW First release\n*\n******************************************************************************\n*/" (function_definition) "class TFXDataTip : public CWnd\n{\n// Construction\npublic:\n TFXDataTip();\n\n// Attributes\npublic:\n void SetOffset(long x, long y);\n void SetOffset(CPoint offset);\n\n// Operations\npublic:\n virtual BOOL Create(CWnd* pParentWnd);\n void Set(CPoint point, const CString& tip);\n void Hide( );\n\n void On(BOOL on);\n BOOL IsOn( ) const;\n\n// class operations\npublic:\n static void SetDelay(short delay);\n\n// Overrides\n // ClassWizard generated virtual function overrides\n //{{AFX_VIRTUAL(TFXDataTip)\n public:\n virtual BOOL DestroyWindow();\n virtual BOOL PreTranslateMessage(MSG* pMsg);\n //}}AFX_VIRTUAL\n\n// Implementation\npublic:\n virtual ~TFXDataTip();\n\n // Generated message map functions\nprotected:\n //{{AFX_MSG(TFXDataTip)\n afx_msg void OnPaint();\n afx_msg void OnMouseMove(UINT nFlags, CPoint point);\n afx_msg void OnTimer(UINT nIDEvent);\n //}}AFX_MSG\n DECLARE_MESSAGE_MAP()\n\nprotected:\n void Display( );\n\nprotected:\n CWnd* m_parent;\n CString m_tip;\n CPoint m_offset;\n CRect m_captureRect;\n CPoint m_origin;\n BOOL m_ready;\n BOOL m_on;\n UINT m_timer;\n\nprotected:\n static void RegisterWnd( );\n static void Initialise( );\n\n static BOOL _registered;\n static short _delay;\n static short _count;\n\n // keyboard hook\n static LRESULT CALLBACK KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam); \n static HHOOK _hookProc;\n static TFXDataTip* _current;\n}" (type_identifier) "class" (identifier) "TFXDataTip" (ERROR) ": public CWnd" (:) ":" (identifier) "public" (identifier) "CWnd" (compound_statement) "{\n// Construction\npublic:\n TFXDataTip();\n\n// Attributes\npublic:\n void SetOffset(long x, long y);\n void SetOffset(CPoint offset);\n\n// Operations\npublic:\n virtual BOOL Create(CWnd* pParentWnd);\n void Set(CPoint point, const CString& tip);\n void Hide( );\n\n void On(BOOL on);\n BOOL IsOn( ) const;\n\n// class operations\npublic:\n static void SetDelay(short delay);\n\n// Overrides\n // ClassWizard generated virtual function overrides\n //{{AFX_VIRTUAL(TFXDataTip)\n public:\n virtual BOOL DestroyWindow();\n virtual BOOL PreTranslateMessage(MSG* pMsg);\n //}}AFX_VIRTUAL\n\n// Implementation\npublic:\n virtual ~TFXDataTip();\n\n // Generated message map functions\nprotected:\n //{{AFX_MSG(TFXDataTip)\n afx_msg void OnPaint();\n afx_msg void OnMouseMove(UINT nFlags, CPoint point);\n afx_msg void OnTimer(UINT nIDEvent);\n //}}AFX_MSG\n DECLARE_MESSAGE_MAP()\n\nprotected:\n void Display( );\n\nprotected:\n CWnd* m_parent;\n CString m_tip;\n CPoint m_offset;\n CRect m_captureRect;\n CPoint m_origin;\n BOOL m_ready;\n BOOL m_on;\n UINT m_timer;\n\nprotected:\n static void RegisterWnd( );\n static void Initialise( );\n\n static BOOL _registered;\n static short _delay;\n static short _count;\n\n // keyboard hook\n static LRESULT CALLBACK KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam); \n static HHOOK _hookProc;\n static TFXDataTip* _current;\n}" ({) "{" (comment) "// Construction" (labeled_statement) "public:\n TFXDataTip();" (statement_identifier) "public" (:) ":" (expression_statement) "TFXDataTip();" (call_expression) "TFXDataTip()" (identifier) "TFXDataTip" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Attributes" (labeled_statement) "public:\n void SetOffset(long x, long y);" (statement_identifier) "public" (:) ":" (declaration) "void SetOffset(long x, long y);" (primitive_type) "void" (function_declarator) "SetOffset(long x, long y)" (identifier) "SetOffset" (parameter_list) "(long x, long y)" (() "(" (parameter_declaration) "long x" (sized_type_specifier) "long" (long) "long" (identifier) "x" (,) "," (parameter_declaration) "long y" (sized_type_specifier) "long" (long) "long" (identifier) "y" ()) ")" (;) ";" (declaration) "void SetOffset(CPoint offset);" (primitive_type) "void" (function_declarator) "SetOffset(CPoint offset)" (identifier) "SetOffset" (parameter_list) "(CPoint offset)" (() "(" (parameter_declaration) "CPoint offset" (type_identifier) "CPoint" (identifier) "offset" ()) ")" (;) ";" (comment) "// Operations" (labeled_statement) "public:\n virtual BOOL Create(CWnd* pParentWnd);" (statement_identifier) "public" (:) ":" (declaration) "virtual BOOL Create(CWnd* pParentWnd);" (type_identifier) "virtual" (ERROR) "BOOL" (identifier) "BOOL" (function_declarator) "Create(CWnd* pParentWnd)" (identifier) "Create" (parameter_list) "(CWnd* pParentWnd)" (() "(" (parameter_declaration) "CWnd* pParentWnd" (type_identifier) "CWnd" (pointer_declarator) "* pParentWnd" (*) "*" (identifier) "pParentWnd" ()) ")" (;) ";" (declaration) "void Set(CPoint point, const CString& tip);" (primitive_type) "void" (function_declarator) "Set(CPoint point, const CString& tip)" (identifier) "Set" (parameter_list) "(CPoint point, const CString& tip)" (() "(" (parameter_declaration) "CPoint point" (type_identifier) "CPoint" (identifier) "point" (,) "," (parameter_declaration) "const CString& tip" (type_qualifier) "const" (const) "const" (type_identifier) "CString" (ERROR) "&" (&) "&" (identifier) "tip" ()) ")" (;) ";" (declaration) "void Hide( );" (primitive_type) "void" (function_declarator) "Hide( )" (identifier) "Hide" (parameter_list) "( )" (() "(" ()) ")" (;) ";" (declaration) "void On(BOOL on);" (primitive_type) "void" (function_declarator) "On(BOOL on)" (identifier) "On" (parameter_list) "(BOOL on)" (() "(" (parameter_declaration) "BOOL on" (type_identifier) "BOOL" (identifier) "on" ()) ")" (;) ";" (ERROR) "BOOL IsOn( ) const" (type_identifier) "BOOL" (function_declarator) "IsOn( )" (identifier) "IsOn" (parameter_list) "( )" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (expression_statement) ";" (;) ";" (comment) "// class operations" (labeled_statement) "public:\n static void SetDelay(short delay);" (statement_identifier) "public" (:) ":" (declaration) "static void SetDelay(short delay);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "SetDelay(short delay)" (identifier) "SetDelay" (parameter_list) "(short delay)" (() "(" (parameter_declaration) "short delay" (sized_type_specifier) "short" (short) "short" (identifier) "delay" ()) ")" (;) ";" (comment) "// Overrides" (comment) "// ClassWizard generated virtual function overrides" (comment) "//{{AFX_VIRTUAL(TFXDataTip)" (labeled_statement) "public:\n virtual BOOL DestroyWindow();" (statement_identifier) "public" (:) ":" (declaration) "virtual BOOL DestroyWindow();" (type_identifier) "virtual" (ERROR) "BOOL" (identifier) "BOOL" (function_declarator) "DestroyWindow()" (identifier) "DestroyWindow" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual BOOL PreTranslateMessage(MSG* pMsg);" (type_identifier) "virtual" (ERROR) "BOOL" (identifier) "BOOL" (function_declarator) "PreTranslateMessage(MSG* pMsg)" (identifier) "PreTranslateMessage" (parameter_list) "(MSG* pMsg)" (() "(" (parameter_declaration) "MSG* pMsg" (type_identifier) "MSG" (pointer_declarator) "* pMsg" (*) "*" (identifier) "pMsg" ()) ")" (;) ";" (comment) "//}}AFX_VIRTUAL" (comment) "// Implementation" (labeled_statement) "public:\n virtual ~TFXDataTip();" (statement_identifier) "public" (:) ":" (declaration) "virtual ~TFXDataTip();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "TFXDataTip()" (identifier) "TFXDataTip" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Generated message map functions" (labeled_statement) "protected:\n //{{AFX_MSG(TFXDataTip)\n afx_msg void OnPaint();" (statement_identifier) "protected" (:) ":" (comment) "//{{AFX_MSG(TFXDataTip)" (declaration) "afx_msg void OnPaint();" (type_identifier) "afx_msg" (ERROR) "void" (identifier) "void" (function_declarator) "OnPaint()" (identifier) "OnPaint" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "afx_msg void OnMouseMove(UINT nFlags, CPoint point);" (type_identifier) "afx_msg" (ERROR) "void" (identifier) "void" (function_declarator) "OnMouseMove(UINT nFlags, CPoint point)" (identifier) "OnMouseMove" (parameter_list) "(UINT nFlags, CPoint point)" (() "(" (parameter_declaration) "UINT nFlags" (type_identifier) "UINT" (identifier) "nFlags" (,) "," (parameter_declaration) "CPoint point" (type_identifier) "CPoint" (identifier) "point" ()) ")" (;) ";" (declaration) "afx_msg void OnTimer(UINT nIDEvent);" (type_identifier) "afx_msg" (ERROR) "void" (identifier) "void" (function_declarator) "OnTimer(UINT nIDEvent)" (identifier) "OnTimer" (parameter_list) "(UINT nIDEvent)" (() "(" (parameter_declaration) "UINT nIDEvent" (type_identifier) "UINT" (identifier) "nIDEvent" ()) ")" (;) ";" (comment) "//}}AFX_MSG" (expression_statement) "DECLARE_MESSAGE_MAP()" (call_expression) "DECLARE_MESSAGE_MAP()" (identifier) "DECLARE_MESSAGE_MAP" (argument_list) "()" (() "(" ()) ")" (;) "" (labeled_statement) "protected:\n void Display( );" (statement_identifier) "protected" (:) ":" (declaration) "void Display( );" (primitive_type) "void" (function_declarator) "Display( )" (identifier) "Display" (parameter_list) "( )" (() "(" ()) ")" (;) ";" (labeled_statement) "protected:\n CWnd* m_parent;" (statement_identifier) "protected" (:) ":" (declaration) "CWnd* m_parent;" (type_identifier) "CWnd" (pointer_declarator) "* m_parent" (*) "*" (identifier) "m_parent" (;) ";" (declaration) "CString m_tip;" (type_identifier) "CString" (identifier) "m_tip" (;) ";" (declaration) "CPoint m_offset;" (type_identifier) "CPoint" (identifier) "m_offset" (;) ";" (declaration) "CRect m_captureRect;" (type_identifier) "CRect" (identifier) "m_captureRect" (;) ";" (declaration) "CPoint m_origin;" (type_identifier) "CPoint" (identifier) "m_origin" (;) ";" (declaration) "BOOL m_ready;" (type_identifier) "BOOL" (identifier) "m_ready" (;) ";" (declaration) "BOOL m_on;" (type_identifier) "BOOL" (identifier) "m_on" (;) ";" (declaration) "UINT m_timer;" (type_identifier) "UINT" (identifier) "m_timer" (;) ";" (labeled_statement) "protected:\n static void RegisterWnd( );" (statement_identifier) "protected" (:) ":" (declaration) "static void RegisterWnd( );" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "RegisterWnd( )" (identifier) "RegisterWnd" (parameter_list) "( )" (() "(" ()) ")" (;) ";" (declaration) "static void Initialise( );" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "Initialise( )" (identifier) "Initialise" (parameter_list) "( )" (() "(" ()) ")" (;) ";" (declaration) "static BOOL _registered;" (storage_class_specifier) "static" (static) "static" (type_identifier) "BOOL" (identifier) "_registered" (;) ";" (declaration) "static short _delay;" (storage_class_specifier) "static" (static) "static" (sized_type_specifier) "short" (short) "short" (identifier) "_delay" (;) ";" (declaration) "static short _count;" (storage_class_specifier) "static" (static) "static" (sized_type_specifier) "short" (short) "short" (identifier) "_count" (;) ";" (comment) "// keyboard hook" (declaration) "static LRESULT CALLBACK KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam);" (storage_class_specifier) "static" (static) "static" (type_identifier) "LRESULT" (ERROR) "CALLBACK" (identifier) "CALLBACK" (function_declarator) "KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam)" (identifier) "KeyboardHookCallback" (parameter_list) "(int code, WPARAM wParam, LPARAM lParam)" (() "(" (parameter_declaration) "int code" (primitive_type) "int" (identifier) "code" (,) "," (parameter_declaration) "WPARAM wParam" (type_identifier) "WPARAM" (identifier) "wParam" (,) "," (parameter_declaration) "LPARAM lParam" (type_identifier) "LPARAM" (identifier) "lParam" ()) ")" (;) ";" (declaration) "static HHOOK _hookProc;" (storage_class_specifier) "static" (static) "static" (type_identifier) "HHOOK" (identifier) "_hookProc" (;) ";" (declaration) "static TFXDataTip* _current;" (storage_class_specifier) "static" (static) "static" (type_identifier) "TFXDataTip" (pointer_declarator) "* _current" (*) "*" (identifier) "_current" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "// inline object methods" (function_definition) "inline void TFXDataTip::On(BOOL on)\n { m_on = on; }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "TFXDataTip::" (identifier) "TFXDataTip" (:) ":" (:) ":" (function_declarator) "On(BOOL on)" (identifier) "On" (parameter_list) "(BOOL on)" (() "(" (parameter_declaration) "BOOL on" (type_identifier) "BOOL" (identifier) "on" ()) ")" (compound_statement) "{ m_on = on; }" ({) "{" (expression_statement) "m_on = on;" (assignment_expression) "m_on = on" (identifier) "m_on" (=) "=" (identifier) "on" (;) ";" (}) "}" (ERROR) "inline BOOL TFXDataTip::IsOn( ) const" (storage_class_specifier) "inline" (inline) "inline" (type_identifier) "BOOL" (ERROR) "TFXDataTip::" (identifier) "TFXDataTip" (:) ":" (:) ":" (function_declarator) "IsOn( )" (identifier) "IsOn" (parameter_list) "( )" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_on; }" ({) "{" (return_statement) "return m_on;" (return) "return" (identifier) "m_on" (;) ";" (}) "}" (function_definition) "inline void TFXDataTip::SetOffset(long x, long y)\n { m_offset = CPoint(x, y); }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "TFXDataTip::" (identifier) "TFXDataTip" (:) ":" (:) ":" (function_declarator) "SetOffset(long x, long y)" (identifier) "SetOffset" (parameter_list) "(long x, long y)" (() "(" (parameter_declaration) "long x" (sized_type_specifier) "long" (long) "long" (identifier) "x" (,) "," (parameter_declaration) "long y" (sized_type_specifier) "long" (long) "long" (identifier) "y" ()) ")" (compound_statement) "{ m_offset = CPoint(x, y); }" ({) "{" (expression_statement) "m_offset = CPoint(x, y);" (assignment_expression) "m_offset = CPoint(x, y)" (identifier) "m_offset" (=) "=" (call_expression) "CPoint(x, y)" (identifier) "CPoint" (argument_list) "(x, y)" (() "(" (identifier) "x" (,) "," (identifier) "y" ()) ")" (;) ";" (}) "}" (function_definition) "inline void TFXDataTip::SetOffset(CPoint offset)\n { m_offset = offset; }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "TFXDataTip::" (identifier) "TFXDataTip" (:) ":" (:) ":" (function_declarator) "SetOffset(CPoint offset)" (identifier) "SetOffset" (parameter_list) "(CPoint offset)" (() "(" (parameter_declaration) "CPoint offset" (type_identifier) "CPoint" (identifier) "offset" ()) ")" (compound_statement) "{ m_offset = offset; }" ({) "{" (expression_statement) "m_offset = offset;" (assignment_expression) "m_offset = offset" (identifier) "m_offset" (=) "=" (identifier) "offset" (;) ";" (}) "}" (comment) "// inline methods for class" (function_definition) "inline void TFXDataTip::SetDelay(short delay)\n { _delay = delay; }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (ERROR) "TFXDataTip::" (identifier) "TFXDataTip" (:) ":" (:) ":" (function_declarator) "SetDelay(short delay)" (identifier) "SetDelay" (parameter_list) "(short delay)" (() "(" (parameter_declaration) "short delay" (sized_type_specifier) "short" (short) "short" (identifier) "delay" ()) ")" (compound_statement) "{ _delay = delay; }" ({) "{" (expression_statement) "_delay = delay;" (assignment_expression) "_delay = delay" (identifier) "_delay" (=) "=" (identifier) "delay" (;) ";" (}) "}" (#endif) "#endif"
518
17
{"language": "c", "success": true, "metadata": {"lines": 160, "avg_line_length": 29.02, "nodes": 315, "errors": 0, "source_hash": "60d0dc711500a208589c2e73cbdda96f710016e0a16e4202c54091e88e58e6dd", "categorized_nodes": 221}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _tfxdatatip_h__\n #define _tfxdatatip_h__\n\n/*\n\f\n* Class preamble *************************************************************\n*\n* NAME: TFXDataTip\n* BASE CLASS(es): CWnd\n*\n* DESCRIPTION: This class provides a DataTip conotrol. This is used to \n* display pop-up information on a view to the user. When\n* a data tip control is enabled, then after the information\n* has been set the window will be displayed provided that \n* the mouse does not move within a specified time delay.\n*\n* Once the tip is visible, then it remains visible until\n* the user moves the tip outside of a catch area \n* immediately around its display position.\n*\n* PUBLIC INTERFACE:\n* Methods: constructor constructs a DataTip window\n* SetOffset sets the offset from the cursor position\n* Create creates the DataTip window\n* Set sets the DataTip information (starts time)\n* Hide hides the DataTip window\n*\n* On turns the DataTip window on/off\n* IsOn returns the status of the DataTip\n*\n* SetDelay sets the delay for all DataTips\n*\n* Operators: none\n*\n* Data members: none\n*\n******************************************************************************\n* REVISION HISTORY \n*\n* 18-APR-1997 SAJW First release\n*\n******************************************************************************\n*/\nclass TFXDataTip : public CWnd\n{\n// Construction\npublic:\n\tTFXDataTip();\n\n// Attributes\npublic:\n void SetOffset(long x, long y);\n void SetOffset(CPoint offset);\n\n// Operations\npublic:\n\tvirtual BOOL Create(CWnd* pParentWnd);\n void Set(CPoint point, const CString& tip);\n void Hide( );\n\n void On(BOOL on);\n BOOL IsOn( ) const;\n\n// class operations\npublic:\n static void SetDelay(short delay);\n\n// Overrides\n\t// ClassWizard generated virtual function overrides\n\t//{{AFX_VIRTUAL(TFXDataTip)\n\tpublic:\n\tvirtual BOOL DestroyWindow();\n\tvirtual BOOL PreTranslateMessage(MSG* pMsg);\n\t//}}AFX_VIRTUAL\n\n// Implementation\npublic:\n\tvirtual ~TFXDataTip();\n\n\t// Generated message map functions\nprotected:\n\t//{{AFX_MSG(TFXDataTip)\n\tafx_msg void OnPaint();\n\tafx_msg void OnMouseMove(UINT nFlags, CPoint point);\n\tafx_msg void OnTimer(UINT nIDEvent);\n\t//}}AFX_MSG\n\tDECLARE_MESSAGE_MAP()\n\nprotected:\n void Display( );\n\nprotected:\n CWnd* m_parent;\n CString m_tip;\n CPoint m_offset;\n CRect m_captureRect;\n CPoint m_origin;\n BOOL m_ready;\n BOOL m_on;\n UINT m_timer;\n\nprotected:\n static void RegisterWnd( );\n static void Initialise( );\n\n static BOOL _registered;\n static short _delay;\n static short _count;\n\n // keyboard hook\n static LRESULT CALLBACK KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam);\t\n static HHOOK _hookProc;\n static TFXDataTip* _current;\n};\n\n\n// inline object methods\ninline void TFXDataTip::On(BOOL on)\n { m_on = on; }\ninline BOOL TFXDataTip::IsOn( ) const\n { return m_on; }\n\ninline void TFXDataTip::SetOffset(long x, long y)\n { m_offset = CPoint(x, y); }\ninline void TFXDataTip::SetOffset(CPoint offset)\n { m_offset = offset; }\n\n// inline methods for class\ninline void TFXDataTip::SetDelay(short delay)\n { _delay = delay; }\n\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 229, 245, 256, 281, 297, 314], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 178, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 7}}, {"id": 2, "type": "identifier", "text": "_tfxdatatip_h__", "parent": 0, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "#define _tfxdatatip_h__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 47, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 11}}, {"id": 5, "type": "identifier", "text": "_tfxdatatip_h__", "parent": 3, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 27}}, {"id": 6, "type": "function_definition", "text": "class TFXDataTip : public CWnd\n{\n// Construction\npublic:\n\tTFXDataTip();\n\n// Attributes\npublic:\n void SetOffset(long x, long y);\n void SetOffset(CPoint offset);\n\n// Operations\npublic:\n\tvirtual BOOL Create(CWnd* pParentWnd);\n void Set(CPoint point, const CString& tip);\n void Hide( );\n\n void On(BOOL on);\n BOOL IsOn( ) const;\n\n// class operations\npublic:\n static void SetDelay(short delay);\n\n// Overrides\n\t// ClassWizard generated virtual function overrides\n\t//{{AFX_VIRTUAL(TFXDataTip)\n\tpublic:\n\tvirtual BOOL DestroyWindow();\n\tvirtual BOOL PreTranslateMessage(MSG* pMsg);\n\t//}}AFX_VIRTUAL\n\n// Implementation\npublic:\n\tvirtual ~TFXDataTip();\n\n\t// Generated message map functions\nprotected:\n\t//{{AFX_MSG(TFXDataTip)\n\tafx_msg void OnPaint();\n\tafx_msg void OnMouseMove(UINT nFlags, CPoint point);\n\tafx_msg void OnTimer(UINT nIDEvent);\n\t//}}AFX_MSG\n\tDECLARE_MESSAGE_MAP()\n\nprotected:\n void Display( );\n\nprotected:\n CWnd* m_parent;\n CString m_tip;\n CPoint m_offset;\n CRect m_captureRect;\n CPoint m_origin;\n BOOL m_ready;\n BOOL m_on;\n UINT m_timer;\n\nprotected:\n static void RegisterWnd( );\n static void Initialise( );\n\n static BOOL _registered;\n static short _delay;\n static short _count;\n\n // keyboard hook\n static LRESULT CALLBACK KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam);\t\n static HHOOK _hookProc;\n static TFXDataTip* _current;\n}", "parent": 0, "children": [7, 8], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 158, "column": 1}}, {"id": 7, "type": "identifier", "text": "TFXDataTip", "parent": 6, "children": [], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 16}}, {"id": 8, "type": "ERROR", "text": ": public CWnd", "parent": 6, "children": [9], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 30}}, {"id": 9, "type": "identifier", "text": "CWnd", "parent": 8, "children": [], "start_point": {"row": 88, "column": 26}, "end_point": {"row": 88, "column": 30}}, {"id": 10, "type": "labeled_statement", "text": "public:\n\tTFXDataTip();", "parent": 6, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 92, "column": 14}}, {"id": 11, "type": "call_expression", "text": "TFXDataTip()", "parent": 10, "children": [12, 13], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 13}}, {"id": 12, "type": "identifier", "text": "TFXDataTip", "parent": 11, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 11}}, {"id": 13, "type": "argument_list", "text": "()", "parent": 11, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 13}}, {"id": 14, "type": "labeled_statement", "text": "public:\n void SetOffset(long x, long y);", "parent": 6, "children": [15], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 96, "column": 35}}, {"id": 15, "type": "declaration", "text": "void SetOffset(long x, long y);", "parent": 14, "children": [16, 17], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 35}}, {"id": 16, "type": "primitive_type", "text": "void", "parent": 15, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 8}}, {"id": 17, "type": "function_declarator", "text": "SetOffset(long x, long y)", "parent": 15, "children": [18, 19], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 34}}, {"id": 18, "type": "identifier", "text": "SetOffset", "parent": 17, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 18}}, {"id": 19, "type": "parameter_list", "text": "(long x, long y)", "parent": 17, "children": [20, 24], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 34}}, {"id": 20, "type": "parameter_declaration", "text": "long x", "parent": 19, "children": [21, 23], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 25}}, {"id": 21, "type": "sized_type_specifier", "text": "long", "parent": 20, "children": [22], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 23}}, {"id": 22, "type": "long", "text": "long", "parent": 21, "children": [], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 23}}, {"id": 23, "type": "identifier", "text": "x", "parent": 20, "children": [], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 25}}, {"id": 24, "type": "parameter_declaration", "text": "long y", "parent": 19, "children": [25, 27], "start_point": {"row": 96, "column": 27}, "end_point": {"row": 96, "column": 33}}, {"id": 25, "type": "sized_type_specifier", "text": "long", "parent": 24, "children": [26], "start_point": {"row": 96, "column": 27}, "end_point": {"row": 96, "column": 31}}, {"id": 26, "type": "long", "text": "long", "parent": 25, "children": [], "start_point": {"row": 96, "column": 27}, "end_point": {"row": 96, "column": 31}}, {"id": 27, "type": "identifier", "text": "y", "parent": 24, "children": [], "start_point": {"row": 96, "column": 32}, "end_point": {"row": 96, "column": 33}}, {"id": 28, "type": "declaration", "text": "void SetOffset(CPoint offset);", "parent": 6, "children": [29, 30], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 34}}, {"id": 29, "type": "primitive_type", "text": "void", "parent": 28, "children": [], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 8}}, {"id": 30, "type": "function_declarator", "text": "SetOffset(CPoint offset)", "parent": 28, "children": [31, 32], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 33}}, {"id": 31, "type": "identifier", "text": "SetOffset", "parent": 30, "children": [], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 18}}, {"id": 32, "type": "parameter_list", "text": "(CPoint offset)", "parent": 30, "children": [33], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 33}}, {"id": 33, "type": "parameter_declaration", "text": "CPoint offset", "parent": 32, "children": [34, 35], "start_point": {"row": 97, "column": 19}, "end_point": {"row": 97, "column": 32}}, {"id": 34, "type": "type_identifier", "text": "CPoint", "parent": 33, "children": [], "start_point": {"row": 97, "column": 19}, "end_point": {"row": 97, "column": 25}}, {"id": 35, "type": "identifier", "text": "offset", "parent": 33, "children": [], "start_point": {"row": 97, "column": 26}, "end_point": {"row": 97, "column": 32}}, {"id": 36, "type": "labeled_statement", "text": "public:\n\tvirtual BOOL Create(CWnd* pParentWnd);", "parent": 6, "children": [37], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 101, "column": 39}}, {"id": 37, "type": "declaration", "text": "virtual BOOL Create(CWnd* pParentWnd);", "parent": 36, "children": [38, 39, 41], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 39}}, {"id": 38, "type": "type_identifier", "text": "virtual", "parent": 37, "children": [], "start_point": {"row": 101, "column": 1}, "end_point": {"row": 101, "column": 8}}, {"id": 39, "type": "ERROR", "text": "BOOL", "parent": 37, "children": [40], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 13}}, {"id": 40, "type": "identifier", "text": "BOOL", "parent": 39, "children": [], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 13}}, {"id": 41, "type": "function_declarator", "text": "Create(CWnd* pParentWnd)", "parent": 37, "children": [42, 43], "start_point": {"row": 101, "column": 14}, "end_point": {"row": 101, "column": 38}}, {"id": 42, "type": "identifier", "text": "Create", "parent": 41, "children": [], "start_point": {"row": 101, "column": 14}, "end_point": {"row": 101, "column": 20}}, {"id": 43, "type": "parameter_list", "text": "(CWnd* pParentWnd)", "parent": 41, "children": [44], "start_point": {"row": 101, "column": 20}, "end_point": {"row": 101, "column": 38}}, {"id": 44, "type": "parameter_declaration", "text": "CWnd* pParentWnd", "parent": 43, "children": [45, 46], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 37}}, {"id": 45, "type": "type_identifier", "text": "CWnd", "parent": 44, "children": [], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 25}}, {"id": 46, "type": "pointer_declarator", "text": "* pParentWnd", "parent": 44, "children": [47, 48], "start_point": {"row": 101, "column": 25}, "end_point": {"row": 101, "column": 37}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 101, "column": 25}, "end_point": {"row": 101, "column": 26}}, {"id": 48, "type": "identifier", "text": "pParentWnd", "parent": 46, "children": [], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 37}}, {"id": 49, "type": "declaration", "text": "void Set(CPoint point, const CString& tip);", "parent": 6, "children": [50, 51], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 47}}, {"id": 50, "type": "primitive_type", "text": "void", "parent": 49, "children": [], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 8}}, {"id": 51, "type": "function_declarator", "text": "Set(CPoint point, const CString& tip)", "parent": 49, "children": [52, 53], "start_point": {"row": 102, "column": 9}, "end_point": {"row": 102, "column": 46}}, {"id": 52, "type": "identifier", "text": "Set", "parent": 51, "children": [], "start_point": {"row": 102, "column": 9}, "end_point": {"row": 102, "column": 12}}, {"id": 53, "type": "parameter_list", "text": "(CPoint point, const CString& tip)", "parent": 51, "children": [54, 57], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 46}}, {"id": 54, "type": "parameter_declaration", "text": "CPoint point", "parent": 53, "children": [55, 56], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 25}}, {"id": 55, "type": "type_identifier", "text": "CPoint", "parent": 54, "children": [], "start_point": {"row": 102, "column": 13}, "end_point": {"row": 102, "column": 19}}, {"id": 56, "type": "identifier", "text": "point", "parent": 54, "children": [], "start_point": {"row": 102, "column": 20}, "end_point": {"row": 102, "column": 25}}, {"id": 57, "type": "parameter_declaration", "text": "const CString& tip", "parent": 53, "children": [58, 59], "start_point": {"row": 102, "column": 27}, "end_point": {"row": 102, "column": 45}}, {"id": 58, "type": "type_identifier", "text": "CString", "parent": 57, "children": [], "start_point": {"row": 102, "column": 33}, "end_point": {"row": 102, "column": 40}}, {"id": 59, "type": "identifier", "text": "tip", "parent": 57, "children": [], "start_point": {"row": 102, "column": 42}, "end_point": {"row": 102, "column": 45}}, {"id": 60, "type": "declaration", "text": "void Hide( );", "parent": 6, "children": [61, 62], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 17}}, {"id": 61, "type": "primitive_type", "text": "void", "parent": 60, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 8}}, {"id": 62, "type": "function_declarator", "text": "Hide( )", "parent": 60, "children": [63, 64], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 16}}, {"id": 63, "type": "identifier", "text": "Hide", "parent": 62, "children": [], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 13}}, {"id": 64, "type": "parameter_list", "text": "( )", "parent": 62, "children": [], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 16}}, {"id": 65, "type": "declaration", "text": "void On(BOOL on);", "parent": 6, "children": [66, 67], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 21}}, {"id": 66, "type": "primitive_type", "text": "void", "parent": 65, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 8}}, {"id": 67, "type": "function_declarator", "text": "On(BOOL on)", "parent": 65, "children": [68, 69], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 20}}, {"id": 68, "type": "identifier", "text": "On", "parent": 67, "children": [], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 11}}, {"id": 69, "type": "parameter_list", "text": "(BOOL on)", "parent": 67, "children": [70], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 20}}, {"id": 70, "type": "parameter_declaration", "text": "BOOL on", "parent": 69, "children": [71, 72], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 19}}, {"id": 71, "type": "type_identifier", "text": "BOOL", "parent": 70, "children": [], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 16}}, {"id": 72, "type": "identifier", "text": "on", "parent": 70, "children": [], "start_point": {"row": 105, "column": 17}, "end_point": {"row": 105, "column": 19}}, {"id": 73, "type": "ERROR", "text": "BOOL IsOn( ) const", "parent": 6, "children": [74, 75], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 22}}, {"id": 74, "type": "type_identifier", "text": "BOOL", "parent": 73, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 8}}, {"id": 75, "type": "function_declarator", "text": "IsOn( )", "parent": 73, "children": [76, 77], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 16}}, {"id": 76, "type": "identifier", "text": "IsOn", "parent": 75, "children": [], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 13}}, {"id": 77, "type": "parameter_list", "text": "( )", "parent": 75, "children": [], "start_point": {"row": 106, "column": 13}, "end_point": {"row": 106, "column": 16}}, {"id": 78, "type": "labeled_statement", "text": "public:\n static void SetDelay(short delay);", "parent": 6, "children": [79], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 110, "column": 38}}, {"id": 79, "type": "declaration", "text": "static void SetDelay(short delay);", "parent": 78, "children": [80, 81], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 38}}, {"id": 80, "type": "primitive_type", "text": "void", "parent": 79, "children": [], "start_point": {"row": 110, "column": 11}, "end_point": {"row": 110, "column": 15}}, {"id": 81, "type": "function_declarator", "text": "SetDelay(short delay)", "parent": 79, "children": [82, 83], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 37}}, {"id": 82, "type": "identifier", "text": "SetDelay", "parent": 81, "children": [], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 24}}, {"id": 83, "type": "parameter_list", "text": "(short delay)", "parent": 81, "children": [84], "start_point": {"row": 110, "column": 24}, "end_point": {"row": 110, "column": 37}}, {"id": 84, "type": "parameter_declaration", "text": "short delay", "parent": 83, "children": [85, 87], "start_point": {"row": 110, "column": 25}, "end_point": {"row": 110, "column": 36}}, {"id": 85, "type": "sized_type_specifier", "text": "short", "parent": 84, "children": [86], "start_point": {"row": 110, "column": 25}, "end_point": {"row": 110, "column": 30}}, {"id": 86, "type": "short", "text": "short", "parent": 85, "children": [], "start_point": {"row": 110, "column": 25}, "end_point": {"row": 110, "column": 30}}, {"id": 87, "type": "identifier", "text": "delay", "parent": 84, "children": [], "start_point": {"row": 110, "column": 31}, "end_point": {"row": 110, "column": 36}}, {"id": 88, "type": "labeled_statement", "text": "public:\n\tvirtual BOOL DestroyWindow();", "parent": 6, "children": [89], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 116, "column": 30}}, {"id": 89, "type": "declaration", "text": "virtual BOOL DestroyWindow();", "parent": 88, "children": [90, 91, 93], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 30}}, {"id": 90, "type": "type_identifier", "text": "virtual", "parent": 89, "children": [], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 8}}, {"id": 91, "type": "ERROR", "text": "BOOL", "parent": 89, "children": [92], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 13}}, {"id": 92, "type": "identifier", "text": "BOOL", "parent": 91, "children": [], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 13}}, {"id": 93, "type": "function_declarator", "text": "DestroyWindow()", "parent": 89, "children": [94, 95], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 29}}, {"id": 94, "type": "identifier", "text": "DestroyWindow", "parent": 93, "children": [], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 27}}, {"id": 95, "type": "parameter_list", "text": "()", "parent": 93, "children": [], "start_point": {"row": 116, "column": 27}, "end_point": {"row": 116, "column": 29}}, {"id": 96, "type": "declaration", "text": "virtual BOOL PreTranslateMessage(MSG* pMsg);", "parent": 6, "children": [97, 98, 100], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 45}}, {"id": 97, "type": "type_identifier", "text": "virtual", "parent": 96, "children": [], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 8}}, {"id": 98, "type": "ERROR", "text": "BOOL", "parent": 96, "children": [99], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 13}}, {"id": 99, "type": "identifier", "text": "BOOL", "parent": 98, "children": [], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 13}}, {"id": 100, "type": "function_declarator", "text": "PreTranslateMessage(MSG* pMsg)", "parent": 96, "children": [101, 102], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 44}}, {"id": 101, "type": "identifier", "text": "PreTranslateMessage", "parent": 100, "children": [], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 33}}, {"id": 102, "type": "parameter_list", "text": "(MSG* pMsg)", "parent": 100, "children": [103], "start_point": {"row": 117, "column": 33}, "end_point": {"row": 117, "column": 44}}, {"id": 103, "type": "parameter_declaration", "text": "MSG* pMsg", "parent": 102, "children": [104, 105], "start_point": {"row": 117, "column": 34}, "end_point": {"row": 117, "column": 43}}, {"id": 104, "type": "type_identifier", "text": "MSG", "parent": 103, "children": [], "start_point": {"row": 117, "column": 34}, "end_point": {"row": 117, "column": 37}}, {"id": 105, "type": "pointer_declarator", "text": "* pMsg", "parent": 103, "children": [106, 107], "start_point": {"row": 117, "column": 37}, "end_point": {"row": 117, "column": 43}}, {"id": 106, "type": "*", "text": "*", "parent": 105, "children": [], "start_point": {"row": 117, "column": 37}, "end_point": {"row": 117, "column": 38}}, {"id": 107, "type": "identifier", "text": "pMsg", "parent": 105, "children": [], "start_point": {"row": 117, "column": 39}, "end_point": {"row": 117, "column": 43}}, {"id": 108, "type": "labeled_statement", "text": "public:\n\tvirtual ~TFXDataTip();", "parent": 6, "children": [109], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 122, "column": 23}}, {"id": 109, "type": "declaration", "text": "virtual ~TFXDataTip();", "parent": 108, "children": [110, 111, 113], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 23}}, {"id": 110, "type": "type_identifier", "text": "virtual", "parent": 109, "children": [], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 8}}, {"id": 111, "type": "ERROR", "text": "~", "parent": 109, "children": [112], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 10}}, {"id": 112, "type": "~", "text": "~", "parent": 111, "children": [], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 10}}, {"id": 113, "type": "function_declarator", "text": "TFXDataTip()", "parent": 109, "children": [114, 115], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 22}}, {"id": 114, "type": "identifier", "text": "TFXDataTip", "parent": 113, "children": [], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 20}}, {"id": 115, "type": "parameter_list", "text": "()", "parent": 113, "children": [], "start_point": {"row": 122, "column": 20}, "end_point": {"row": 122, "column": 22}}, {"id": 116, "type": "labeled_statement", "text": "protected:\n\t//{{AFX_MSG(TFXDataTip)\n\tafx_msg void OnPaint();", "parent": 6, "children": [117], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 127, "column": 24}}, {"id": 117, "type": "declaration", "text": "afx_msg void OnPaint();", "parent": 116, "children": [118, 119, 121], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 24}}, {"id": 118, "type": "type_identifier", "text": "afx_msg", "parent": 117, "children": [], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 8}}, {"id": 119, "type": "ERROR", "text": "void", "parent": 117, "children": [120], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 13}}, {"id": 120, "type": "identifier", "text": "void", "parent": 119, "children": [], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 13}}, {"id": 121, "type": "function_declarator", "text": "OnPaint()", "parent": 117, "children": [122, 123], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 23}}, {"id": 122, "type": "identifier", "text": "OnPaint", "parent": 121, "children": [], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 21}}, {"id": 123, "type": "parameter_list", "text": "()", "parent": 121, "children": [], "start_point": {"row": 127, "column": 21}, "end_point": {"row": 127, "column": 23}}, {"id": 124, "type": "declaration", "text": "afx_msg void OnMouseMove(UINT nFlags, CPoint point);", "parent": 6, "children": [125, 126, 128], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 53}}, {"id": 125, "type": "type_identifier", "text": "afx_msg", "parent": 124, "children": [], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 8}}, {"id": 126, "type": "ERROR", "text": "void", "parent": 124, "children": [127], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 13}}, {"id": 127, "type": "identifier", "text": "void", "parent": 126, "children": [], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 13}}, {"id": 128, "type": "function_declarator", "text": "OnMouseMove(UINT nFlags, CPoint point)", "parent": 124, "children": [129, 130], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 52}}, {"id": 129, "type": "identifier", "text": "OnMouseMove", "parent": 128, "children": [], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 25}}, {"id": 130, "type": "parameter_list", "text": "(UINT nFlags, CPoint point)", "parent": 128, "children": [131, 134], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 52}}, {"id": 131, "type": "parameter_declaration", "text": "UINT nFlags", "parent": 130, "children": [132, 133], "start_point": {"row": 128, "column": 26}, "end_point": {"row": 128, "column": 37}}, {"id": 132, "type": "type_identifier", "text": "UINT", "parent": 131, "children": [], "start_point": {"row": 128, "column": 26}, "end_point": {"row": 128, "column": 30}}, {"id": 133, "type": "identifier", "text": "nFlags", "parent": 131, "children": [], "start_point": {"row": 128, "column": 31}, "end_point": {"row": 128, "column": 37}}, {"id": 134, "type": "parameter_declaration", "text": "CPoint point", "parent": 130, "children": [135, 136], "start_point": {"row": 128, "column": 39}, "end_point": {"row": 128, "column": 51}}, {"id": 135, "type": "type_identifier", "text": "CPoint", "parent": 134, "children": [], "start_point": {"row": 128, "column": 39}, "end_point": {"row": 128, "column": 45}}, {"id": 136, "type": "identifier", "text": "point", "parent": 134, "children": [], "start_point": {"row": 128, "column": 46}, "end_point": {"row": 128, "column": 51}}, {"id": 137, "type": "declaration", "text": "afx_msg void OnTimer(UINT nIDEvent);", "parent": 6, "children": [138, 139, 141], "start_point": {"row": 129, "column": 1}, "end_point": {"row": 129, "column": 37}}, {"id": 138, "type": "type_identifier", "text": "afx_msg", "parent": 137, "children": [], "start_point": {"row": 129, "column": 1}, "end_point": {"row": 129, "column": 8}}, {"id": 139, "type": "ERROR", "text": "void", "parent": 137, "children": [140], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 13}}, {"id": 140, "type": "identifier", "text": "void", "parent": 139, "children": [], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 13}}, {"id": 141, "type": "function_declarator", "text": "OnTimer(UINT nIDEvent)", "parent": 137, "children": [142, 143], "start_point": {"row": 129, "column": 14}, "end_point": {"row": 129, "column": 36}}, {"id": 142, "type": "identifier", "text": "OnTimer", "parent": 141, "children": [], "start_point": {"row": 129, "column": 14}, "end_point": {"row": 129, "column": 21}}, {"id": 143, "type": "parameter_list", "text": "(UINT nIDEvent)", "parent": 141, "children": [144], "start_point": {"row": 129, "column": 21}, "end_point": {"row": 129, "column": 36}}, {"id": 144, "type": "parameter_declaration", "text": "UINT nIDEvent", "parent": 143, "children": [145, 146], "start_point": {"row": 129, "column": 22}, "end_point": {"row": 129, "column": 35}}, {"id": 145, "type": "type_identifier", "text": "UINT", "parent": 144, "children": [], "start_point": {"row": 129, "column": 22}, "end_point": {"row": 129, "column": 26}}, {"id": 146, "type": "identifier", "text": "nIDEvent", "parent": 144, "children": [], "start_point": {"row": 129, "column": 27}, "end_point": {"row": 129, "column": 35}}, {"id": 147, "type": "call_expression", "text": "DECLARE_MESSAGE_MAP()", "parent": 6, "children": [148, 149], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 22}}, {"id": 148, "type": "identifier", "text": "DECLARE_MESSAGE_MAP", "parent": 147, "children": [], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 20}}, {"id": 149, "type": "argument_list", "text": "()", "parent": 147, "children": [], "start_point": {"row": 131, "column": 20}, "end_point": {"row": 131, "column": 22}}, {"id": 150, "type": "labeled_statement", "text": "protected:\n void Display( );", "parent": 6, "children": [151], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 134, "column": 20}}, {"id": 151, "type": "declaration", "text": "void Display( );", "parent": 150, "children": [152, 153], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 20}}, {"id": 152, "type": "primitive_type", "text": "void", "parent": 151, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 8}}, {"id": 153, "type": "function_declarator", "text": "Display( )", "parent": 151, "children": [154, 155], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 19}}, {"id": 154, "type": "identifier", "text": "Display", "parent": 153, "children": [], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 16}}, {"id": 155, "type": "parameter_list", "text": "( )", "parent": 153, "children": [], "start_point": {"row": 134, "column": 16}, "end_point": {"row": 134, "column": 19}}, {"id": 156, "type": "labeled_statement", "text": "protected:\n CWnd* m_parent;", "parent": 6, "children": [157], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 137, "column": 21}}, {"id": 157, "type": "declaration", "text": "CWnd* m_parent;", "parent": 156, "children": [158, 159], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 21}}, {"id": 158, "type": "type_identifier", "text": "CWnd", "parent": 157, "children": [], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 8}}, {"id": 159, "type": "pointer_declarator", "text": "* m_parent", "parent": 157, "children": [160, 161], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 20}}, {"id": 160, "type": "*", "text": "*", "parent": 159, "children": [], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 9}}, {"id": 161, "type": "identifier", "text": "m_parent", "parent": 159, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 20}}, {"id": 162, "type": "declaration", "text": "CString m_tip;", "parent": 6, "children": [163, 164], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 18}}, {"id": 163, "type": "type_identifier", "text": "CString", "parent": 162, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 11}}, {"id": 164, "type": "identifier", "text": "m_tip", "parent": 162, "children": [], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 138, "column": 17}}, {"id": 165, "type": "declaration", "text": "CPoint m_offset;", "parent": 6, "children": [166, 167], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 21}}, {"id": 166, "type": "type_identifier", "text": "CPoint", "parent": 165, "children": [], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 10}}, {"id": 167, "type": "identifier", "text": "m_offset", "parent": 165, "children": [], "start_point": {"row": 139, "column": 12}, "end_point": {"row": 139, "column": 20}}, {"id": 168, "type": "declaration", "text": "CRect m_captureRect;", "parent": 6, "children": [169, 170], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 26}}, {"id": 169, "type": "type_identifier", "text": "CRect", "parent": 168, "children": [], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 140, "column": 9}}, {"id": 170, "type": "identifier", "text": "m_captureRect", "parent": 168, "children": [], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 25}}, {"id": 171, "type": "declaration", "text": "CPoint m_origin;", "parent": 6, "children": [172, 173], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 21}}, {"id": 172, "type": "type_identifier", "text": "CPoint", "parent": 171, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 10}}, {"id": 173, "type": "identifier", "text": "m_origin", "parent": 171, "children": [], "start_point": {"row": 141, "column": 12}, "end_point": {"row": 141, "column": 20}}, {"id": 174, "type": "declaration", "text": "BOOL m_ready;", "parent": 6, "children": [175, 176], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 20}}, {"id": 175, "type": "type_identifier", "text": "BOOL", "parent": 174, "children": [], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 8}}, {"id": 176, "type": "identifier", "text": "m_ready", "parent": 174, "children": [], "start_point": {"row": 142, "column": 12}, "end_point": {"row": 142, "column": 19}}, {"id": 177, "type": "declaration", "text": "BOOL m_on;", "parent": 6, "children": [178, 179], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 17}}, {"id": 178, "type": "type_identifier", "text": "BOOL", "parent": 177, "children": [], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 8}}, {"id": 179, "type": "identifier", "text": "m_on", "parent": 177, "children": [], "start_point": {"row": 143, "column": 12}, "end_point": {"row": 143, "column": 16}}, {"id": 180, "type": "declaration", "text": "UINT m_timer;", "parent": 6, "children": [181, 182], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 20}}, {"id": 181, "type": "type_identifier", "text": "UINT", "parent": 180, "children": [], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 8}}, {"id": 182, "type": "identifier", "text": "m_timer", "parent": 180, "children": [], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 19}}, {"id": 183, "type": "labeled_statement", "text": "protected:\n static void RegisterWnd( );", "parent": 6, "children": [184], "start_point": {"row": 146, "column": 0}, "end_point": {"row": 147, "column": 31}}, {"id": 184, "type": "declaration", "text": "static void RegisterWnd( );", "parent": 183, "children": [185, 186], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 31}}, {"id": 185, "type": "primitive_type", "text": "void", "parent": 184, "children": [], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 15}}, {"id": 186, "type": "function_declarator", "text": "RegisterWnd( )", "parent": 184, "children": [187, 188], "start_point": {"row": 147, "column": 16}, "end_point": {"row": 147, "column": 30}}, {"id": 187, "type": "identifier", "text": "RegisterWnd", "parent": 186, "children": [], "start_point": {"row": 147, "column": 16}, "end_point": {"row": 147, "column": 27}}, {"id": 188, "type": "parameter_list", "text": "( )", "parent": 186, "children": [], "start_point": {"row": 147, "column": 27}, "end_point": {"row": 147, "column": 30}}, {"id": 189, "type": "declaration", "text": "static void Initialise( );", "parent": 6, "children": [190, 191], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 30}}, {"id": 190, "type": "primitive_type", "text": "void", "parent": 189, "children": [], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 15}}, {"id": 191, "type": "function_declarator", "text": "Initialise( )", "parent": 189, "children": [192, 193], "start_point": {"row": 148, "column": 16}, "end_point": {"row": 148, "column": 29}}, {"id": 192, "type": "identifier", "text": "Initialise", "parent": 191, "children": [], "start_point": {"row": 148, "column": 16}, "end_point": {"row": 148, "column": 26}}, {"id": 193, "type": "parameter_list", "text": "( )", "parent": 191, "children": [], "start_point": {"row": 148, "column": 26}, "end_point": {"row": 148, "column": 29}}, {"id": 194, "type": "declaration", "text": "static BOOL _registered;", "parent": 6, "children": [195, 196], "start_point": {"row": 150, "column": 4}, "end_point": {"row": 150, "column": 28}}, {"id": 195, "type": "type_identifier", "text": "BOOL", "parent": 194, "children": [], "start_point": {"row": 150, "column": 11}, "end_point": {"row": 150, "column": 15}}, {"id": 196, "type": "identifier", "text": "_registered", "parent": 194, "children": [], "start_point": {"row": 150, "column": 16}, "end_point": {"row": 150, "column": 27}}, {"id": 197, "type": "declaration", "text": "static short _delay;", "parent": 6, "children": [198, 200], "start_point": {"row": 151, "column": 4}, "end_point": {"row": 151, "column": 24}}, {"id": 198, "type": "sized_type_specifier", "text": "short", "parent": 197, "children": [199], "start_point": {"row": 151, "column": 11}, "end_point": {"row": 151, "column": 16}}, {"id": 199, "type": "short", "text": "short", "parent": 198, "children": [], "start_point": {"row": 151, "column": 11}, "end_point": {"row": 151, "column": 16}}, {"id": 200, "type": "identifier", "text": "_delay", "parent": 197, "children": [], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 23}}, {"id": 201, "type": "declaration", "text": "static short _count;", "parent": 6, "children": [202, 204], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 24}}, {"id": 202, "type": "sized_type_specifier", "text": "short", "parent": 201, "children": [203], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 16}}, {"id": 203, "type": "short", "text": "short", "parent": 202, "children": [], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 16}}, {"id": 204, "type": "identifier", "text": "_count", "parent": 201, "children": [], "start_point": {"row": 152, "column": 17}, "end_point": {"row": 152, "column": 23}}, {"id": 205, "type": "declaration", "text": "static LRESULT CALLBACK KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam);", "parent": 6, "children": [206, 207, 209], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 89}}, {"id": 206, "type": "type_identifier", "text": "LRESULT", "parent": 205, "children": [], "start_point": {"row": 155, "column": 11}, "end_point": {"row": 155, "column": 18}}, {"id": 207, "type": "ERROR", "text": "CALLBACK", "parent": 205, "children": [208], "start_point": {"row": 155, "column": 19}, "end_point": {"row": 155, "column": 27}}, {"id": 208, "type": "identifier", "text": "CALLBACK", "parent": 207, "children": [], "start_point": {"row": 155, "column": 19}, "end_point": {"row": 155, "column": 27}}, {"id": 209, "type": "function_declarator", "text": "KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam)", "parent": 205, "children": [210, 211], "start_point": {"row": 155, "column": 28}, "end_point": {"row": 155, "column": 88}}, {"id": 210, "type": "identifier", "text": "KeyboardHookCallback", "parent": 209, "children": [], "start_point": {"row": 155, "column": 28}, "end_point": {"row": 155, "column": 48}}, {"id": 211, "type": "parameter_list", "text": "(int code, WPARAM wParam, LPARAM lParam)", "parent": 209, "children": [212, 215, 218], "start_point": {"row": 155, "column": 48}, "end_point": {"row": 155, "column": 88}}, {"id": 212, "type": "parameter_declaration", "text": "int code", "parent": 211, "children": [213, 214], "start_point": {"row": 155, "column": 49}, "end_point": {"row": 155, "column": 57}}, {"id": 213, "type": "primitive_type", "text": "int", "parent": 212, "children": [], "start_point": {"row": 155, "column": 49}, "end_point": {"row": 155, "column": 52}}, {"id": 214, "type": "identifier", "text": "code", "parent": 212, "children": [], "start_point": {"row": 155, "column": 53}, "end_point": {"row": 155, "column": 57}}, {"id": 215, "type": "parameter_declaration", "text": "WPARAM wParam", "parent": 211, "children": [216, 217], "start_point": {"row": 155, "column": 59}, "end_point": {"row": 155, "column": 72}}, {"id": 216, "type": "type_identifier", "text": "WPARAM", "parent": 215, "children": [], "start_point": {"row": 155, "column": 59}, "end_point": {"row": 155, "column": 65}}, {"id": 217, "type": "identifier", "text": "wParam", "parent": 215, "children": [], "start_point": {"row": 155, "column": 66}, "end_point": {"row": 155, "column": 72}}, {"id": 218, "type": "parameter_declaration", "text": "LPARAM lParam", "parent": 211, "children": [219, 220], "start_point": {"row": 155, "column": 74}, "end_point": {"row": 155, "column": 87}}, {"id": 219, "type": "type_identifier", "text": "LPARAM", "parent": 218, "children": [], "start_point": {"row": 155, "column": 74}, "end_point": {"row": 155, "column": 80}}, {"id": 220, "type": "identifier", "text": "lParam", "parent": 218, "children": [], "start_point": {"row": 155, "column": 81}, "end_point": {"row": 155, "column": 87}}, {"id": 221, "type": "declaration", "text": "static HHOOK _hookProc;", "parent": 6, "children": [222, 223], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 27}}, {"id": 222, "type": "type_identifier", "text": "HHOOK", "parent": 221, "children": [], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 16}}, {"id": 223, "type": "identifier", "text": "_hookProc", "parent": 221, "children": [], "start_point": {"row": 156, "column": 17}, "end_point": {"row": 156, "column": 26}}, {"id": 224, "type": "declaration", "text": "static TFXDataTip* _current;", "parent": 6, "children": [225, 226], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 32}}, {"id": 225, "type": "type_identifier", "text": "TFXDataTip", "parent": 224, "children": [], "start_point": {"row": 157, "column": 11}, "end_point": {"row": 157, "column": 21}}, {"id": 226, "type": "pointer_declarator", "text": "* _current", "parent": 224, "children": [227, 228], "start_point": {"row": 157, "column": 21}, "end_point": {"row": 157, "column": 31}}, {"id": 227, "type": "*", "text": "*", "parent": 226, "children": [], "start_point": {"row": 157, "column": 21}, "end_point": {"row": 157, "column": 22}}, {"id": 228, "type": "identifier", "text": "_current", "parent": 226, "children": [], "start_point": {"row": 157, "column": 23}, "end_point": {"row": 157, "column": 31}}, {"id": 229, "type": "function_definition", "text": "inline void TFXDataTip::On(BOOL on)\n { m_on = on; }", "parent": 0, "children": [230, 232, 233, 235], "start_point": {"row": 162, "column": 0}, "end_point": {"row": 163, "column": 18}}, {"id": 230, "type": "storage_class_specifier", "text": "inline", "parent": 229, "children": [231], "start_point": {"row": 162, "column": 0}, "end_point": {"row": 162, "column": 6}}, {"id": 231, "type": "inline", "text": "inline", "parent": 230, "children": [], "start_point": {"row": 162, "column": 0}, "end_point": {"row": 162, "column": 6}}, {"id": 232, "type": "primitive_type", "text": "void", "parent": 229, "children": [], "start_point": {"row": 162, "column": 7}, "end_point": {"row": 162, "column": 11}}, {"id": 233, "type": "ERROR", "text": "TFXDataTip::", "parent": 229, "children": [234], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 24}}, {"id": 234, "type": "identifier", "text": "TFXDataTip", "parent": 233, "children": [], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 22}}, {"id": 235, "type": "function_declarator", "text": "On(BOOL on)", "parent": 229, "children": [236, 237], "start_point": {"row": 162, "column": 24}, "end_point": {"row": 162, "column": 35}}, {"id": 236, "type": "identifier", "text": "On", "parent": 235, "children": [], "start_point": {"row": 162, "column": 24}, "end_point": {"row": 162, "column": 26}}, {"id": 237, "type": "parameter_list", "text": "(BOOL on)", "parent": 235, "children": [238], "start_point": {"row": 162, "column": 26}, "end_point": {"row": 162, "column": 35}}, {"id": 238, "type": "parameter_declaration", "text": "BOOL on", "parent": 237, "children": [239, 240], "start_point": {"row": 162, "column": 27}, "end_point": {"row": 162, "column": 34}}, {"id": 239, "type": "type_identifier", "text": "BOOL", "parent": 238, "children": [], "start_point": {"row": 162, "column": 27}, "end_point": {"row": 162, "column": 31}}, {"id": 240, "type": "identifier", "text": "on", "parent": 238, "children": [], "start_point": {"row": 162, "column": 32}, "end_point": {"row": 162, "column": 34}}, {"id": 241, "type": "assignment_expression", "text": "m_on = on", "parent": 229, "children": [242, 243, 244], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 15}}, {"id": 242, "type": "identifier", "text": "m_on", "parent": 241, "children": [], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 10}}, {"id": 243, "type": "=", "text": "=", "parent": 241, "children": [], "start_point": {"row": 163, "column": 11}, "end_point": {"row": 163, "column": 12}}, {"id": 244, "type": "identifier", "text": "on", "parent": 241, "children": [], "start_point": {"row": 163, "column": 13}, "end_point": {"row": 163, "column": 15}}, {"id": 245, "type": "ERROR", "text": "inline BOOL TFXDataTip::IsOn( ) const", "parent": 0, "children": [246, 248, 249, 251], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 164, "column": 37}}, {"id": 246, "type": "storage_class_specifier", "text": "inline", "parent": 245, "children": [247], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 164, "column": 6}}, {"id": 247, "type": "inline", "text": "inline", "parent": 246, "children": [], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 164, "column": 6}}, {"id": 248, "type": "type_identifier", "text": "BOOL", "parent": 245, "children": [], "start_point": {"row": 164, "column": 7}, "end_point": {"row": 164, "column": 11}}, {"id": 249, "type": "ERROR", "text": "TFXDataTip::", "parent": 245, "children": [250], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 164, "column": 24}}, {"id": 250, "type": "identifier", "text": "TFXDataTip", "parent": 249, "children": [], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 164, "column": 22}}, {"id": 251, "type": "function_declarator", "text": "IsOn( )", "parent": 245, "children": [252, 253], "start_point": {"row": 164, "column": 24}, "end_point": {"row": 164, "column": 31}}, {"id": 252, "type": "identifier", "text": "IsOn", "parent": 251, "children": [], "start_point": {"row": 164, "column": 24}, "end_point": {"row": 164, "column": 28}}, {"id": 253, "type": "parameter_list", "text": "( )", "parent": 251, "children": [], "start_point": {"row": 164, "column": 28}, "end_point": {"row": 164, "column": 31}}, {"id": 254, "type": "return_statement", "text": "return m_on;", "parent": 0, "children": [255], "start_point": {"row": 165, "column": 6}, "end_point": {"row": 165, "column": 18}}, {"id": 255, "type": "identifier", "text": "m_on", "parent": 254, "children": [], "start_point": {"row": 165, "column": 13}, "end_point": {"row": 165, "column": 17}}, {"id": 256, "type": "function_definition", "text": "inline void TFXDataTip::SetOffset(long x, long y)\n { m_offset = CPoint(x, y); }", "parent": 0, "children": [257, 259, 260, 262], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 168, "column": 32}}, {"id": 257, "type": "storage_class_specifier", "text": "inline", "parent": 256, "children": [258], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 167, "column": 6}}, {"id": 258, "type": "inline", "text": "inline", "parent": 257, "children": [], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 167, "column": 6}}, {"id": 259, "type": "primitive_type", "text": "void", "parent": 256, "children": [], "start_point": {"row": 167, "column": 7}, "end_point": {"row": 167, "column": 11}}, {"id": 260, "type": "ERROR", "text": "TFXDataTip::", "parent": 256, "children": [261], "start_point": {"row": 167, "column": 12}, "end_point": {"row": 167, "column": 24}}, {"id": 261, "type": "identifier", "text": "TFXDataTip", "parent": 260, "children": [], "start_point": {"row": 167, "column": 12}, "end_point": {"row": 167, "column": 22}}, {"id": 262, "type": "function_declarator", "text": "SetOffset(long x, long y)", "parent": 256, "children": [263, 264], "start_point": {"row": 167, "column": 24}, "end_point": {"row": 167, "column": 49}}, {"id": 263, "type": "identifier", "text": "SetOffset", "parent": 262, "children": [], "start_point": {"row": 167, "column": 24}, "end_point": {"row": 167, "column": 33}}, {"id": 264, "type": "parameter_list", "text": "(long x, long y)", "parent": 262, "children": [265, 269], "start_point": {"row": 167, "column": 33}, "end_point": {"row": 167, "column": 49}}, {"id": 265, "type": "parameter_declaration", "text": "long x", "parent": 264, "children": [266, 268], "start_point": {"row": 167, "column": 34}, "end_point": {"row": 167, "column": 40}}, {"id": 266, "type": "sized_type_specifier", "text": "long", "parent": 265, "children": [267], "start_point": {"row": 167, "column": 34}, "end_point": {"row": 167, "column": 38}}, {"id": 267, "type": "long", "text": "long", "parent": 266, "children": [], "start_point": {"row": 167, "column": 34}, "end_point": {"row": 167, "column": 38}}, {"id": 268, "type": "identifier", "text": "x", "parent": 265, "children": [], "start_point": {"row": 167, "column": 39}, "end_point": {"row": 167, "column": 40}}, {"id": 269, "type": "parameter_declaration", "text": "long y", "parent": 264, "children": [270, 272], "start_point": {"row": 167, "column": 42}, "end_point": {"row": 167, "column": 48}}, {"id": 270, "type": "sized_type_specifier", "text": "long", "parent": 269, "children": [271], "start_point": {"row": 167, "column": 42}, "end_point": {"row": 167, "column": 46}}, {"id": 271, "type": "long", "text": "long", "parent": 270, "children": [], "start_point": {"row": 167, "column": 42}, "end_point": {"row": 167, "column": 46}}, {"id": 272, "type": "identifier", "text": "y", "parent": 269, "children": [], "start_point": {"row": 167, "column": 47}, "end_point": {"row": 167, "column": 48}}, {"id": 273, "type": "assignment_expression", "text": "m_offset = CPoint(x, y)", "parent": 256, "children": [274, 275, 276], "start_point": {"row": 168, "column": 6}, "end_point": {"row": 168, "column": 29}}, {"id": 274, "type": "identifier", "text": "m_offset", "parent": 273, "children": [], "start_point": {"row": 168, "column": 6}, "end_point": {"row": 168, "column": 14}}, {"id": 275, "type": "=", "text": "=", "parent": 273, "children": [], "start_point": {"row": 168, "column": 15}, "end_point": {"row": 168, "column": 16}}, {"id": 276, "type": "call_expression", "text": "CPoint(x, y)", "parent": 273, "children": [277, 278], "start_point": {"row": 168, "column": 17}, "end_point": {"row": 168, "column": 29}}, {"id": 277, "type": "identifier", "text": "CPoint", "parent": 276, "children": [], "start_point": {"row": 168, "column": 17}, "end_point": {"row": 168, "column": 23}}, {"id": 278, "type": "argument_list", "text": "(x, y)", "parent": 276, "children": [279, 280], "start_point": {"row": 168, "column": 23}, "end_point": {"row": 168, "column": 29}}, {"id": 279, "type": "identifier", "text": "x", "parent": 278, "children": [], "start_point": {"row": 168, "column": 24}, "end_point": {"row": 168, "column": 25}}, {"id": 280, "type": "identifier", "text": "y", "parent": 278, "children": [], "start_point": {"row": 168, "column": 27}, "end_point": {"row": 168, "column": 28}}, {"id": 281, "type": "function_definition", "text": "inline void TFXDataTip::SetOffset(CPoint offset)\n { m_offset = offset; }", "parent": 0, "children": [282, 284, 285, 287], "start_point": {"row": 169, "column": 0}, "end_point": {"row": 170, "column": 26}}, {"id": 282, "type": "storage_class_specifier", "text": "inline", "parent": 281, "children": [283], "start_point": {"row": 169, "column": 0}, "end_point": {"row": 169, "column": 6}}, {"id": 283, "type": "inline", "text": "inline", "parent": 282, "children": [], "start_point": {"row": 169, "column": 0}, "end_point": {"row": 169, "column": 6}}, {"id": 284, "type": "primitive_type", "text": "void", "parent": 281, "children": [], "start_point": {"row": 169, "column": 7}, "end_point": {"row": 169, "column": 11}}, {"id": 285, "type": "ERROR", "text": "TFXDataTip::", "parent": 281, "children": [286], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 24}}, {"id": 286, "type": "identifier", "text": "TFXDataTip", "parent": 285, "children": [], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 22}}, {"id": 287, "type": "function_declarator", "text": "SetOffset(CPoint offset)", "parent": 281, "children": [288, 289], "start_point": {"row": 169, "column": 24}, "end_point": {"row": 169, "column": 48}}, {"id": 288, "type": "identifier", "text": "SetOffset", "parent": 287, "children": [], "start_point": {"row": 169, "column": 24}, "end_point": {"row": 169, "column": 33}}, {"id": 289, "type": "parameter_list", "text": "(CPoint offset)", "parent": 287, "children": [290], "start_point": {"row": 169, "column": 33}, "end_point": {"row": 169, "column": 48}}, {"id": 290, "type": "parameter_declaration", "text": "CPoint offset", "parent": 289, "children": [291, 292], "start_point": {"row": 169, "column": 34}, "end_point": {"row": 169, "column": 47}}, {"id": 291, "type": "type_identifier", "text": "CPoint", "parent": 290, "children": [], "start_point": {"row": 169, "column": 34}, "end_point": {"row": 169, "column": 40}}, {"id": 292, "type": "identifier", "text": "offset", "parent": 290, "children": [], "start_point": {"row": 169, "column": 41}, "end_point": {"row": 169, "column": 47}}, {"id": 293, "type": "assignment_expression", "text": "m_offset = offset", "parent": 281, "children": [294, 295, 296], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 23}}, {"id": 294, "type": "identifier", "text": "m_offset", "parent": 293, "children": [], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 14}}, {"id": 295, "type": "=", "text": "=", "parent": 293, "children": [], "start_point": {"row": 170, "column": 15}, "end_point": {"row": 170, "column": 16}}, {"id": 296, "type": "identifier", "text": "offset", "parent": 293, "children": [], "start_point": {"row": 170, "column": 17}, "end_point": {"row": 170, "column": 23}}, {"id": 297, "type": "function_definition", "text": "inline void TFXDataTip::SetDelay(short delay)\n { _delay = delay; }", "parent": 0, "children": [298, 300, 301, 303], "start_point": {"row": 173, "column": 0}, "end_point": {"row": 174, "column": 23}}, {"id": 298, "type": "storage_class_specifier", "text": "inline", "parent": 297, "children": [299], "start_point": {"row": 173, "column": 0}, "end_point": {"row": 173, "column": 6}}, {"id": 299, "type": "inline", "text": "inline", "parent": 298, "children": [], "start_point": {"row": 173, "column": 0}, "end_point": {"row": 173, "column": 6}}, {"id": 300, "type": "primitive_type", "text": "void", "parent": 297, "children": [], "start_point": {"row": 173, "column": 7}, "end_point": {"row": 173, "column": 11}}, {"id": 301, "type": "ERROR", "text": "TFXDataTip::", "parent": 297, "children": [302], "start_point": {"row": 173, "column": 12}, "end_point": {"row": 173, "column": 24}}, {"id": 302, "type": "identifier", "text": "TFXDataTip", "parent": 301, "children": [], "start_point": {"row": 173, "column": 12}, "end_point": {"row": 173, "column": 22}}, {"id": 303, "type": "function_declarator", "text": "SetDelay(short delay)", "parent": 297, "children": [304, 305], "start_point": {"row": 173, "column": 24}, "end_point": {"row": 173, "column": 45}}, {"id": 304, "type": "identifier", "text": "SetDelay", "parent": 303, "children": [], "start_point": {"row": 173, "column": 24}, "end_point": {"row": 173, "column": 32}}, {"id": 305, "type": "parameter_list", "text": "(short delay)", "parent": 303, "children": [306], "start_point": {"row": 173, "column": 32}, "end_point": {"row": 173, "column": 45}}, {"id": 306, "type": "parameter_declaration", "text": "short delay", "parent": 305, "children": [307, 309], "start_point": {"row": 173, "column": 33}, "end_point": {"row": 173, "column": 44}}, {"id": 307, "type": "sized_type_specifier", "text": "short", "parent": 306, "children": [308], "start_point": {"row": 173, "column": 33}, "end_point": {"row": 173, "column": 38}}, {"id": 308, "type": "short", "text": "short", "parent": 307, "children": [], "start_point": {"row": 173, "column": 33}, "end_point": {"row": 173, "column": 38}}, {"id": 309, "type": "identifier", "text": "delay", "parent": 306, "children": [], "start_point": {"row": 173, "column": 39}, "end_point": {"row": 173, "column": 44}}, {"id": 310, "type": "assignment_expression", "text": "_delay = delay", "parent": 297, "children": [311, 312, 313], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 20}}, {"id": 311, "type": "identifier", "text": "_delay", "parent": 310, "children": [], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 12}}, {"id": 312, "type": "=", "text": "=", "parent": 310, "children": [], "start_point": {"row": 174, "column": 13}, "end_point": {"row": 174, "column": 14}}, {"id": 313, "type": "identifier", "text": "delay", "parent": 310, "children": [], "start_point": {"row": 174, "column": 15}, "end_point": {"row": 174, "column": 20}}, {"id": 314, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 178, "column": 0}, "end_point": {"row": 178, "column": 6}}]}, "node_categories": {"declarations": {"functions": [6, 17, 30, 41, 51, 62, 67, 75, 81, 93, 100, 113, 121, 128, 141, 153, 186, 191, 209, 229, 235, 251, 256, 262, 281, 287, 297, 303], "variables": [15, 20, 24, 28, 33, 37, 44, 49, 54, 57, 60, 65, 70, 79, 84, 89, 96, 103, 109, 117, 124, 131, 134, 137, 144, 151, 157, 162, 165, 168, 171, 174, 177, 180, 184, 189, 194, 197, 201, 205, 212, 215, 218, 221, 224, 238, 265, 269, 290, 306], "classes": [230, 246, 257, 282, 298], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [11, 147, 276], "assignments": [241, 273, 293, 310], "loops": [], "conditionals": [0, 1, 2, 5, 7, 9, 12, 18, 21, 23, 25, 27, 31, 34, 35, 38, 40, 42, 45, 48, 52, 55, 56, 58, 59, 63, 68, 71, 72, 74, 76, 82, 85, 87, 90, 92, 94, 97, 99, 101, 104, 107, 110, 114, 118, 120, 122, 125, 127, 129, 132, 133, 135, 136, 138, 140, 142, 145, 146, 148, 154, 158, 161, 163, 164, 166, 167, 169, 170, 172, 173, 175, 176, 178, 179, 181, 182, 187, 192, 195, 196, 198, 200, 202, 204, 206, 208, 210, 214, 216, 217, 219, 220, 222, 223, 225, 228, 234, 236, 239, 240, 242, 244, 248, 250, 252, 255, 261, 263, 266, 268, 270, 272, 274, 277, 279, 280, 286, 288, 291, 292, 294, 296, 302, 304, 307, 309, 311, 313, 314], "returns": [254], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "TFXDataTip", "text_snippet": "class TFXDataTip : public CWnd\n{\n// Construction\npublic:\n\tTFXDataTip();\n\n// Attributes\npublic:\n v"}, {"node_id": 17, "universal_type": "function", "name": "unknown", "text_snippet": "SetOffset(long x, long y)"}, {"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "SetOffset(CPoint offset)"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "Create(CWnd* pParentWnd)"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "Set(CPoint point, const CString& tip)"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "Hide( )"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "On(BOOL on)"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "IsOn( )"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "SetDelay(short delay)"}, {"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "DestroyWindow()"}, {"node_id": 100, "universal_type": "function", "name": "unknown", "text_snippet": "PreTranslateMessage(MSG* pMsg)"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "TFXDataTip()"}, {"node_id": 121, "universal_type": "function", "name": "unknown", "text_snippet": "OnPaint()"}, {"node_id": 128, "universal_type": "function", "name": "unknown", "text_snippet": "OnMouseMove(UINT nFlags, CPoint point)"}, {"node_id": 141, "universal_type": "function", "name": "unknown", "text_snippet": "OnTimer(UINT nIDEvent)"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "Display( )"}, {"node_id": 186, "universal_type": "function", "name": "unknown", "text_snippet": "RegisterWnd( )"}, {"node_id": 191, "universal_type": "function", "name": "unknown", "text_snippet": "Initialise( )"}, {"node_id": 209, "universal_type": "function", "name": "unknown", "text_snippet": "KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam)"}, {"node_id": 229, "universal_type": "function", "name": "TFXDataTip::On", "text_snippet": "inline void TFXDataTip::On(BOOL on)\n { m_on = on; }"}, {"node_id": 235, "universal_type": "function", "name": "unknown", "text_snippet": "On(BOOL on)"}, {"node_id": 251, "universal_type": "function", "name": "unknown", "text_snippet": "IsOn( )"}, {"node_id": 256, "universal_type": "function", "name": "TFXDataTip::SetOffset", "text_snippet": "inline void TFXDataTip::SetOffset(long x, long y)\n { m_offset = CPoint(x, y); }"}, {"node_id": 262, "universal_type": "function", "name": "unknown", "text_snippet": "SetOffset(long x, long y)"}, {"node_id": 281, "universal_type": "function", "name": "TFXDataTip::SetOffset", "text_snippet": "inline void TFXDataTip::SetOffset(CPoint offset)\n { m_offset = offset; }"}, {"node_id": 287, "universal_type": "function", "name": "unknown", "text_snippet": "SetOffset(CPoint offset)"}, {"node_id": 297, "universal_type": "function", "name": "TFXDataTip::SetDelay", "text_snippet": "inline void TFXDataTip::SetDelay(short delay)\n { _delay = delay; }"}, {"node_id": 303, "universal_type": "function", "name": "unknown", "text_snippet": "SetDelay(short delay)"}], "class_declarations": [{"node_id": 230, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 246, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 257, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 282, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 298, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": []}, "original_source_code": "/*\n* Configuration control preamble *********************************************\n*\n* PROJECT: C++ Library\n*\n* TITLE: Data Tip window (aka. enhanced Tooltips)\n* FILENAME: tfxdatatip.h\n*\n* CREATED: 10 April 1997\n* ORIGINATOR: <NAME>\n*\n* (c) Copyright 1997\n* Technisoft Ltd.\n*\n******************************************************************************\n* ISSUE HISTORY \n*\n* 10-APR-1997 SAJW\n* Issue 0.1 Created \n*\n* 18-APR-1997 SAJW\n* Issue 1.0 First release\n*\n******************************************************************************\n\f*/\n\n\n/*\n* Module preamble ************************************************************\n*\n* NAME: Data tips\n*\n* DESCRIPTION: This module provides the data tips used for displaying\n* data information to the user in a ToolTip format.\n*\n* HIERARCHY: CWnd\n* |\n* +---- TFXDataTip\n*\n* LIMITATIONS: None\n*\n* REFERENCES: None\n*\n******************************************************************************\n*/\n#ifndef _tfxdatatip_h__\n #define _tfxdatatip_h__\n\n/*\n\f\n* Class preamble *************************************************************\n*\n* NAME: TFXDataTip\n* BASE CLASS(es): CWnd\n*\n* DESCRIPTION: This class provides a DataTip conotrol. This is used to \n* display pop-up information on a view to the user. When\n* a data tip control is enabled, then after the information\n* has been set the window will be displayed provided that \n* the mouse does not move within a specified time delay.\n*\n* Once the tip is visible, then it remains visible until\n* the user moves the tip outside of a catch area \n* immediately around its display position.\n*\n* PUBLIC INTERFACE:\n* Methods: constructor constructs a DataTip window\n* SetOffset sets the offset from the cursor position\n* Create creates the DataTip window\n* Set sets the DataTip information (starts time)\n* Hide hides the DataTip window\n*\n* On turns the DataTip window on/off\n* IsOn returns the status of the DataTip\n*\n* SetDelay sets the delay for all DataTips\n*\n* Operators: none\n*\n* Data members: none\n*\n******************************************************************************\n* REVISION HISTORY \n*\n* 18-APR-1997 SAJW First release\n*\n******************************************************************************\n*/\nclass TFXDataTip : public CWnd\n{\n// Construction\npublic:\n\tTFXDataTip();\n\n// Attributes\npublic:\n void SetOffset(long x, long y);\n void SetOffset(CPoint offset);\n\n// Operations\npublic:\n\tvirtual BOOL Create(CWnd* pParentWnd);\n void Set(CPoint point, const CString& tip);\n void Hide( );\n\n void On(BOOL on);\n BOOL IsOn( ) const;\n\n// class operations\npublic:\n static void SetDelay(short delay);\n\n// Overrides\n\t// ClassWizard generated virtual function overrides\n\t//{{AFX_VIRTUAL(TFXDataTip)\n\tpublic:\n\tvirtual BOOL DestroyWindow();\n\tvirtual BOOL PreTranslateMessage(MSG* pMsg);\n\t//}}AFX_VIRTUAL\n\n// Implementation\npublic:\n\tvirtual ~TFXDataTip();\n\n\t// Generated message map functions\nprotected:\n\t//{{AFX_MSG(TFXDataTip)\n\tafx_msg void OnPaint();\n\tafx_msg void OnMouseMove(UINT nFlags, CPoint point);\n\tafx_msg void OnTimer(UINT nIDEvent);\n\t//}}AFX_MSG\n\tDECLARE_MESSAGE_MAP()\n\nprotected:\n void Display( );\n\nprotected:\n CWnd* m_parent;\n CString m_tip;\n CPoint m_offset;\n CRect m_captureRect;\n CPoint m_origin;\n BOOL m_ready;\n BOOL m_on;\n UINT m_timer;\n\nprotected:\n static void RegisterWnd( );\n static void Initialise( );\n\n static BOOL _registered;\n static short _delay;\n static short _count;\n\n // keyboard hook\n static LRESULT CALLBACK KeyboardHookCallback(int code, WPARAM wParam, LPARAM lParam);\t\n static HHOOK _hookProc;\n static TFXDataTip* _current;\n};\n\n\n// inline object methods\ninline void TFXDataTip::On(BOOL on)\n { m_on = on; }\ninline BOOL TFXDataTip::IsOn( ) const\n { return m_on; }\n\ninline void TFXDataTip::SetOffset(long x, long y)\n { m_offset = CPoint(x, y); }\ninline void TFXDataTip::SetOffset(CPoint offset)\n { m_offset = offset; }\n\n// inline methods for class\ninline void TFXDataTip::SetDelay(short delay)\n { _delay = delay; }\n\n\n\n#endif\n\n"}
80,945
c
// // AFBlipVideoPlayer.h // Blips // // Created by <NAME> on 2014-07-05. // Copyright (c) 2014 AF-Apps. All rights reserved. // #import "AFBlipVideoViewControllerMediatorStatics.h" #include <AVFoundation/AVFoundation.h> @class AFBlipVideoPlayer; @protocol AFBlipVideoPlayerDelegate <NSObject> @required - (NSURL *)videoPlayerOutputFilePath:(AFBlipVideoPlayer *)videoPlayer; @optional - (NSURL *)videoPlayerOutputThumbnailFilePath:(AFBlipVideoPlayer *)videoPlayer; - (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer; - (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer; - (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer; @end @interface AFBlipVideoPlayer : UIView - (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state; @property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer; @property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate; @property (nonatomic, assign, readonly) AFBlipVideoPlayerState state; /** Switch camera input. */ - (void)switchCameraDevicePosition:(AVCaptureDevicePosition)devicePosition; /** Starts recording. */ - (void)start:(AFBlipVideoPlayerState)state; /** Stop recording. */ - (void)stop; /** Stop and reset recording. */ - (void)reset; /** Toggle activity indicator. */ - (void)showActivityIndicator:(BOOL)show; @end
39.22
36
(translation_unit) "//\n// AFBlipVideoPlayer.h\n// Blips\n//\n// Created by <NAME> on 2014-07-05.\n// Copyright (c) 2014 AF-Apps. All rights reserved.\n//\n\n#import "AFBlipVideoViewControllerMediatorStatics.h"\n#include <AVFoundation/AVFoundation.h>\n\n@class AFBlipVideoPlayer;\n\n@protocol AFBlipVideoPlayerDelegate <NSObject>\n\n@required\n- (NSURL *)videoPlayerOutputFilePath:(AFBlipVideoPlayer *)videoPlayer;\n\n@optional\n- (NSURL *)videoPlayerOutputThumbnailFilePath:(AFBlipVideoPlayer *)videoPlayer;\n- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition:(AVCaptureDevicePosition)devicePosition;\n\n/** Starts recording. */\n- (void)start:(AFBlipVideoPlayerState)state;\n\n/** Stop recording. */\n- (void)stop;\n\n/** Stop and reset recording. */\n- (void)reset;\n\n/** Toggle activity indicator. */\n- (void)showActivityIndicator:(BOOL)show;\n\n@end" (comment) "//" (comment) "// AFBlipVideoPlayer.h" (comment) "// Blips" (comment) "//" (comment) "// Created by <NAME> on 2014-07-05." (comment) "// Copyright (c) 2014 AF-Apps. All rights reserved." (comment) "//" (preproc_call) "#import "AFBlipVideoViewControllerMediatorStatics.h"\n" (preproc_directive) "#import" (preproc_arg) ""AFBlipVideoViewControllerMediatorStatics.h"" (preproc_include) "#include <AVFoundation/AVFoundation.h>\n" (#include) "#include" (system_lib_string) "<AVFoundation/AVFoundation.h>" (ERROR) "@" (ERROR) "@" (declaration) "class AFBlipVideoPlayer;" (type_identifier) "class" (identifier) "AFBlipVideoPlayer" (;) ";" (ERROR) "@protocol AFBlipVideoPlayerDelegate <NSObject>\n\n@required\n- (NSURL *)videoPlayerOutputFilePath:(AFBlipVideoPlayer *)videoPlayer" (ERROR) "@" (type_identifier) "protocol" (identifier) "AFBlipVideoPlayerDelegate" (<) "<" (identifier) "NSObject" (>) ">" (ERROR) "@" (identifier) "required" (unary_expression) "- (NSURL *)videoPlayerOutputFilePath" (-) "-" (cast_expression) "(NSURL *)videoPlayerOutputFilePath" (() "(" (type_descriptor) "NSURL *" (type_identifier) "NSURL" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "videoPlayerOutputFilePath" (:) ":" (() "(" (binary_expression) "AFBlipVideoPlayer *)videoPlayer" (identifier) "AFBlipVideoPlayer" (*) "*" (ERROR) ")" ()) ")" (identifier) "videoPlayer" (expression_statement) ";" (;) ";" (ERROR) "@optional\n- (NSURL *)videoPlayerOutputThumbnailFilePath:(AFBlipVideoPlayer *)videoPlayer" (ERROR) "@" (binary_expression) "optional\n- (NSURL *)videoPlayerOutputThumbnailFilePath" (identifier) "optional" (-) "-" (cast_expression) "(NSURL *)videoPlayerOutputThumbnailFilePath" (() "(" (type_descriptor) "NSURL *" (type_identifier) "NSURL" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "videoPlayerOutputThumbnailFilePath" (:) ":" (() "(" (binary_expression) "AFBlipVideoPlayer *)videoPlayer" (identifier) "AFBlipVideoPlayer" (*) "*" (ERROR) ")" ()) ")" (identifier) "videoPlayer" (expression_statement) ";" (;) ";" (expression_statement) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition:(AVCaptureDevicePosition)devicePosition;\n\n/** Starts recording. */\n- (void)start:(AFBlipVideoPlayerState)state;\n\n/** Stop recording. */\n- (void)stop;" (update_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition:(AVCaptureDevicePosition)devicePosition;\n\n/** Starts recording. */\n- (void)start:(AFBlipVideoPlayerState)state;\n\n/** Stop recording. */\n- (void)stop" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition:(AVCaptureDevicePosition)devicePosition;\n\n/** Starts recording. */\n- (void)start:(AFBlipVideoPlayerState)state;\n\n/** Stop recording. */\n- (void)stop" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition:(AVCaptureDevicePosition)devicePosition;\n\n/** Starts recording. */\n- (void)start" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo" (binary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer" (unary_expression) "- (CMTime)videoPlayerMaximumRecordingDuration" (-) "-" (cast_expression) "(CMTime)videoPlayerMaximumRecordingDuration" (() "(" (type_descriptor) "CMTime" (type_identifier) "CMTime" ()) ")" (identifier) "videoPlayerMaximumRecordingDuration" (ERROR) ":(AFBlipVideoPlayer" (:) ":" (() "(" (identifier) "AFBlipVideoPlayer" (*) "*" (ERROR) ")" ()) ")" (identifier) "videoPlayer" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(void)videoPlayerDidFinishCapturingVideo" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "videoPlayerDidFinishCapturingVideo" (ERROR) ":(AFBlipVideoPlayer" (:) ":" (() "(" (identifier) "AFBlipVideoPlayer" (*) "*" (ERROR) ")" ()) ")" (identifier) "videoPlayer" (ERROR) ";" (;) ";" (-) "-" (cast_expression) "(void)videoPlayerVideoSize" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "videoPlayerVideoSize" (ERROR) ":(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer" (:) ":" (() "(" (identifier) "CGSize" ()) ")" (identifier) "videoSize" (identifier) "videoPlayer" (:) ":" (() "(" (identifier) "AFBlipVideoPlayer" (*) "*" (ERROR) ")" ()) ")" (identifier) "videoPlayer" (ERROR) ";\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView" (;) ";" (ERROR) "@" (identifier) "end" (ERROR) "@" (identifier) "interface" (identifier) "AFBlipVideoPlayer" (:) ":" (identifier) "UIView" (-) "-" (cast_expression) "(instancetype)initWithFrame" (() "(" (type_descriptor) "instancetype" (type_identifier) "instancetype" ()) ")" (identifier) "initWithFrame" (ERROR) ":(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer" (:) ":" (() "(" (identifier) "CGRect" ()) ")" (identifier) "frame" (identifier) "quality" (:) ":" (() "(" (identifier) "AFBlipVideoCaptureQuality" ()) ")" (identifier) "quality" (identifier) "state" (:) ":" (() "(" (identifier) "AFBlipVideoPlayerState" ()) ")" (identifier) "state" (;) ";" (ERROR) "@" (identifier) "property" (() "(" (identifier) "nonatomic" (,) "," (identifier) "strong" ()) ")" (identifier) "AVCaptureVideoPreviewLayer" (*) "*" (identifier) "captureVideoPreviewLayer" (ERROR) ";\n\n@property (nonatomic, weak) id" (;) ";" (ERROR) "@" (identifier) "property" (() "(" (identifier) "nonatomic" (,) "," (identifier) "weak" ()) ")" (identifier) "id" (<) "<" (identifier) "AFBlipVideoPlayerDelegate" (>) ">" (identifier) "delegate" (ERROR) ";\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;" (;) ";" (ERROR) "@" (identifier) "property" (() "(" (identifier) "nonatomic" (,) "," (identifier) "assign" (,) "," (identifier) "readonly" ()) ")" (identifier) "AFBlipVideoPlayerState" (identifier) "state" (;) ";" (comment) "/** Switch camera input. */" (-) "-" (cast_expression) "(void)switchCameraDevicePosition" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "switchCameraDevicePosition" (ERROR) ":(AVCaptureDevicePosition)devicePosition;" (:) ":" (() "(" (identifier) "AVCaptureDevicePosition" ()) ")" (identifier) "devicePosition" (;) ";" (comment) "/** Starts recording. */" (-) "-" (cast_expression) "(void)start" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "start" (ERROR) ":(AFBlipVideoPlayerState)state;" (:) ":" (() "(" (identifier) "AFBlipVideoPlayerState" ()) ")" (identifier) "state" (;) ";" (comment) "/** Stop recording. */" (-) "-" (cast_expression) "(void)stop" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "stop" (--) "" (;) ";" (comment) "/** Stop and reset recording. */" (expression_statement) "- (void)reset;" (unary_expression) "- (void)reset" (-) "-" (cast_expression) "(void)reset" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "reset" (;) ";" (comment) "/** Toggle activity indicator. */" (expression_statement) "- (void)showActivityIndicator:(BOOL)show;" (unary_expression) "- (void)showActivityIndicator" (-) "-" (cast_expression) "(void)showActivityIndicator" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "showActivityIndicator" (ERROR) ":(BOOL)show" (:) ":" (() "(" (identifier) "BOOL" ()) ")" (identifier) "show" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
288
31
{"language": "c", "success": true, "metadata": {"lines": 36, "avg_line_length": 39.22, "nodes": 174, "errors": 0, "source_hash": "13f01d310f40eb23bc498fdb94e6a483cde0e33efbf7980cf216f3b23898035b", "categorized_nodes": 104}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import \"AFBlipVideoViewControllerMediatorStatics.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": "\"AFBlipVideoViewControllerMediatorStatics.h\"", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 52}}, {"id": 3, "type": "preproc_include", "text": "#include <AVFoundation/AVFoundation.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": "<AVFoundation/AVFoundation.h>", "parent": 3, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 38}}, {"id": 6, "type": "ERROR", "text": "@", "parent": null, "children": [7], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 7, "type": "ERROR", "text": "@", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 8, "type": "declaration", "text": "class AFBlipVideoPlayer;", "parent": null, "children": [9], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 25}}, {"id": 9, "type": "identifier", "text": "AFBlipVideoPlayer", "parent": 8, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 24}}, {"id": 10, "type": "ERROR", "text": "@protocol AFBlipVideoPlayerDelegate <NSObject>\n\n@required\n- (NSURL *)videoPlayerOutputFilePath:(AFBlipVideoPlayer *)videoPlayer", "parent": null, "children": [11, 12, 13, 14, 15, 16, 17, 18, 19, 27], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 16, "column": 69}}, {"id": 11, "type": "ERROR", "text": "@", "parent": 10, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 12, "type": "type_identifier", "text": "protocol", "parent": 10, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 13, "type": "identifier", "text": "AFBlipVideoPlayerDelegate", "parent": 10, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 35}}, {"id": 14, "type": "<", "text": "<", "parent": 10, "children": [], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 37}}, {"id": 15, "type": "identifier", "text": "NSObject", "parent": 10, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 45}}, {"id": 16, "type": ">", "text": ">", "parent": 10, "children": [], "start_point": {"row": 13, "column": 45}, "end_point": {"row": 13, "column": 46}}, {"id": 17, "type": "ERROR", "text": "@", "parent": 10, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 18, "type": "identifier", "text": "required", "parent": 10, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 19, "type": "unary_expression", "text": "- (NSURL *)videoPlayerOutputFilePath", "parent": 10, "children": [20, 21], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 36}}, {"id": 20, "type": "-", "text": "-", "parent": 19, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 21, "type": "cast_expression", "text": "(NSURL *)videoPlayerOutputFilePath", "parent": 19, "children": [22, 26], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 36}}, {"id": 22, "type": "type_descriptor", "text": "NSURL *", "parent": 21, "children": [23, 24], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 10}}, {"id": 23, "type": "type_identifier", "text": "NSURL", "parent": 22, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 8}}, {"id": 24, "type": "abstract_pointer_declarator", "text": "*", "parent": 22, "children": [25], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 10}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 10}}, {"id": 26, "type": "identifier", "text": "videoPlayerOutputFilePath", "parent": 21, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 36}}, {"id": 27, "type": "binary_expression", "text": "AFBlipVideoPlayer *)videoPlayer", "parent": 10, "children": [28, 29, 30], "start_point": {"row": 16, "column": 38}, "end_point": {"row": 16, "column": 69}}, {"id": 28, "type": "identifier", "text": "AFBlipVideoPlayer", "parent": 27, "children": [], "start_point": {"row": 16, "column": 38}, "end_point": {"row": 16, "column": 55}}, {"id": 29, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 16, "column": 56}, "end_point": {"row": 16, "column": 57}}, {"id": 30, "type": "identifier", "text": "videoPlayer", "parent": 27, "children": [], "start_point": {"row": 16, "column": 58}, "end_point": {"row": 16, "column": 69}}, {"id": 31, "type": "ERROR", "text": "@optional\n- (NSURL *)videoPlayerOutputThumbnailFilePath:(AFBlipVideoPlayer *)videoPlayer", "parent": null, "children": [32, 33, 42], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 78}}, {"id": 32, "type": "ERROR", "text": "@", "parent": 31, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 33, "type": "binary_expression", "text": "optional\n- (NSURL *)videoPlayerOutputThumbnailFilePath", "parent": 31, "children": [34, 35, 36], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 19, "column": 45}}, {"id": 34, "type": "identifier", "text": "optional", "parent": 33, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 9}}, {"id": 35, "type": "-", "text": "-", "parent": 33, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 36, "type": "cast_expression", "text": "(NSURL *)videoPlayerOutputThumbnailFilePath", "parent": 33, "children": [37, 41], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 45}}, {"id": 37, "type": "type_descriptor", "text": "NSURL *", "parent": 36, "children": [38, 39], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 10}}, {"id": 38, "type": "type_identifier", "text": "NSURL", "parent": 37, "children": [], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 19, "column": 8}}, {"id": 39, "type": "abstract_pointer_declarator", "text": "*", "parent": 37, "children": [40], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 10}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 10}}, {"id": 41, "type": "identifier", "text": "videoPlayerOutputThumbnailFilePath", "parent": 36, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 45}}, {"id": 42, "type": "binary_expression", "text": "AFBlipVideoPlayer *)videoPlayer", "parent": 31, "children": [43, 44, 45], "start_point": {"row": 19, "column": 47}, "end_point": {"row": 19, "column": 78}}, {"id": 43, "type": "identifier", "text": "AFBlipVideoPlayer", "parent": 42, "children": [], "start_point": {"row": 19, "column": 47}, "end_point": {"row": 19, "column": 64}}, {"id": 44, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 19, "column": 65}, "end_point": {"row": 19, "column": 66}}, {"id": 45, "type": "identifier", "text": "videoPlayer", "parent": 42, "children": [], "start_point": {"row": 19, "column": 67}, "end_point": {"row": 19, "column": 78}}, {"id": 46, "type": "update_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition:(AVCaptureDevicePosition)devicePosition;\n\n/** Starts recording. */\n- (void)start:(AFBlipVideoPlayerState)state;\n\n/** Stop recording. */\n- (void)stop", "parent": null, "children": [47, 156], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 43, "column": 12}}, {"id": 47, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition:(AVCaptureDevicePosition)devicePosition;\n\n/** Starts recording. */\n- (void)start:(AFBlipVideoPlayerState)state;\n\n/** Stop recording. */\n- (void)stop", "parent": 46, "children": [48, 148, 151, 152], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 43, "column": 12}}, {"id": 48, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition:(AVCaptureDevicePosition)devicePosition;\n\n/** Starts recording. */\n- (void)start", "parent": 47, "children": [49, 140, 143, 144], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 40, "column": 13}}, {"id": 49, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition", "parent": 48, "children": [50, 127, 135, 136], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 37, "column": 34}}, {"id": 50, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate", "parent": 49, "children": [51, 125, 126], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 33, "column": 66}}, {"id": 51, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate", "parent": 50, "children": [52, 117, 123, 124], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 33, "column": 56}}, {"id": 52, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer", "parent": 51, "children": [53, 101, 115, 116], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 31, "column": 80}}, {"id": 53, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame", "parent": 52, "children": [54, 90, 96, 97], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 29, "column": 29}}, {"id": 54, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer", "parent": 53, "children": [55, 83, 88, 89], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 22, "column": 91}}, {"id": 55, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize", "parent": 54, "children": [56, 78, 79], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 22, "column": 28}}, {"id": 56, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer", "parent": 55, "children": [57, 74, 76, 77], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 75}}, {"id": 57, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo", "parent": 56, "children": [58, 69, 70], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 42}}, {"id": 58, "type": "binary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer", "parent": 57, "children": [59, 65, 67, 68], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 78}}, {"id": 59, "type": "unary_expression", "text": "- (CMTime)videoPlayerMaximumRecordingDuration", "parent": 58, "children": [60, 61], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 45}}, {"id": 60, "type": "-", "text": "-", "parent": 59, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 61, "type": "cast_expression", "text": "(CMTime)videoPlayerMaximumRecordingDuration", "parent": 59, "children": [62, 64], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 45}}, {"id": 62, "type": "type_descriptor", "text": "CMTime", "parent": 61, "children": [63], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 9}}, {"id": 63, "type": "type_identifier", "text": "CMTime", "parent": 62, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 9}}, {"id": 64, "type": "identifier", "text": "videoPlayerMaximumRecordingDuration", "parent": 61, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 45}}, {"id": 65, "type": "ERROR", "text": ":(AFBlipVideoPlayer", "parent": 58, "children": [66], "start_point": {"row": 20, "column": 45}, "end_point": {"row": 20, "column": 64}}, {"id": 66, "type": "identifier", "text": "AFBlipVideoPlayer", "parent": 65, "children": [], "start_point": {"row": 20, "column": 47}, "end_point": {"row": 20, "column": 64}}, {"id": 67, "type": "*", "text": "*", "parent": 58, "children": [], "start_point": {"row": 20, "column": 65}, "end_point": {"row": 20, "column": 66}}, {"id": 68, "type": "identifier", "text": "videoPlayer", "parent": 58, "children": [], "start_point": {"row": 20, "column": 67}, "end_point": {"row": 20, "column": 78}}, {"id": 69, "type": "-", "text": "-", "parent": 57, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 70, "type": "cast_expression", "text": "(void)videoPlayerDidFinishCapturingVideo", "parent": 57, "children": [71, 73], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 42}}, {"id": 71, "type": "type_descriptor", "text": "void", "parent": 70, "children": [72], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 72, "type": "primitive_type", "text": "void", "parent": 71, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 73, "type": "identifier", "text": "videoPlayerDidFinishCapturingVideo", "parent": 70, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 42}}, {"id": 74, "type": "ERROR", "text": ":(AFBlipVideoPlayer", "parent": 56, "children": [75], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 61}}, {"id": 75, "type": "identifier", "text": "AFBlipVideoPlayer", "parent": 74, "children": [], "start_point": {"row": 21, "column": 44}, "end_point": {"row": 21, "column": 61}}, {"id": 76, "type": "*", "text": "*", "parent": 56, "children": [], "start_point": {"row": 21, "column": 62}, "end_point": {"row": 21, "column": 63}}, {"id": 77, "type": "identifier", "text": "videoPlayer", "parent": 56, "children": [], "start_point": {"row": 21, "column": 64}, "end_point": {"row": 21, "column": 75}}, {"id": 78, "type": "-", "text": "-", "parent": 55, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 79, "type": "cast_expression", "text": "(void)videoPlayerVideoSize", "parent": 55, "children": [80, 82], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 28}}, {"id": 80, "type": "type_descriptor", "text": "void", "parent": 79, "children": [81], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 7}}, {"id": 81, "type": "primitive_type", "text": "void", "parent": 80, "children": [], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 7}}, {"id": 82, "type": "identifier", "text": "videoPlayerVideoSize", "parent": 79, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 28}}, {"id": 83, "type": "ERROR", "text": ":(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer", "parent": 54, "children": [84, 85, 86, 87], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 77}}, {"id": 84, "type": "identifier", "text": "CGSize", "parent": 83, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 36}}, {"id": 85, "type": "identifier", "text": "videoSize", "parent": 83, "children": [], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 46}}, {"id": 86, "type": "identifier", "text": "videoPlayer", "parent": 83, "children": [], "start_point": {"row": 22, "column": 47}, "end_point": {"row": 22, "column": 58}}, {"id": 87, "type": "identifier", "text": "AFBlipVideoPlayer", "parent": 83, "children": [], "start_point": {"row": 22, "column": 60}, "end_point": {"row": 22, "column": 77}}, {"id": 88, "type": "*", "text": "*", "parent": 54, "children": [], "start_point": {"row": 22, "column": 78}, "end_point": {"row": 22, "column": 79}}, {"id": 89, "type": "identifier", "text": "videoPlayer", "parent": 54, "children": [], "start_point": {"row": 22, "column": 80}, "end_point": {"row": 22, "column": 91}}, {"id": 90, "type": "ERROR", "text": ";\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView", "parent": 53, "children": [91, 92, 93, 94, 95], "start_point": {"row": 22, "column": 91}, "end_point": {"row": 27, "column": 37}}, {"id": 91, "type": "ERROR", "text": "@", "parent": 90, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 92, "type": "ERROR", "text": "@", "parent": 90, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 93, "type": "identifier", "text": "interface", "parent": 90, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 10}}, {"id": 94, "type": "identifier", "text": "AFBlipVideoPlayer", "parent": 90, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 28}}, {"id": 95, "type": "identifier", "text": "UIView", "parent": 90, "children": [], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 37}}, {"id": 96, "type": "-", "text": "-", "parent": 53, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 97, "type": "cast_expression", "text": "(instancetype)initWithFrame", "parent": 53, "children": [98, 100], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 29}}, {"id": 98, "type": "type_descriptor", "text": "instancetype", "parent": 97, "children": [99], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 15}}, {"id": 99, "type": "type_identifier", "text": "instancetype", "parent": 98, "children": [], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 15}}, {"id": 100, "type": "identifier", "text": "initWithFrame", "parent": 97, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 29}}, {"id": 101, "type": "ERROR", "text": ":(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer", "parent": 52, "children": [102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 31, "column": 54}}, {"id": 102, "type": "identifier", "text": "CGRect", "parent": 101, "children": [], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 37}}, {"id": 103, "type": "identifier", "text": "frame", "parent": 101, "children": [], "start_point": {"row": 29, "column": 38}, "end_point": {"row": 29, "column": 43}}, {"id": 104, "type": "identifier", "text": "quality", "parent": 101, "children": [], "start_point": {"row": 29, "column": 44}, "end_point": {"row": 29, "column": 51}}, {"id": 105, "type": "identifier", "text": "AFBlipVideoCaptureQuality", "parent": 101, "children": [], "start_point": {"row": 29, "column": 53}, "end_point": {"row": 29, "column": 78}}, {"id": 106, "type": "identifier", "text": "quality", "parent": 101, "children": [], "start_point": {"row": 29, "column": 79}, "end_point": {"row": 29, "column": 86}}, {"id": 107, "type": "identifier", "text": "state", "parent": 101, "children": [], "start_point": {"row": 29, "column": 88}, "end_point": {"row": 29, "column": 93}}, {"id": 108, "type": "identifier", "text": "AFBlipVideoPlayerState", "parent": 101, "children": [], "start_point": {"row": 29, "column": 95}, "end_point": {"row": 29, "column": 117}}, {"id": 109, "type": "identifier", "text": "state", "parent": 101, "children": [], "start_point": {"row": 29, "column": 118}, "end_point": {"row": 29, "column": 123}}, {"id": 110, "type": "ERROR", "text": "@", "parent": 101, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 111, "type": "identifier", "text": "property", "parent": 101, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 9}}, {"id": 112, "type": "identifier", "text": "nonatomic", "parent": 101, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 19}}, {"id": 113, "type": "identifier", "text": "strong", "parent": 101, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 27}}, {"id": 114, "type": "identifier", "text": "AVCaptureVideoPreviewLayer", "parent": 101, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 54}}, {"id": 115, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 31, "column": 55}, "end_point": {"row": 31, "column": 56}}, {"id": 116, "type": "identifier", "text": "captureVideoPreviewLayer", "parent": 52, "children": [], "start_point": {"row": 31, "column": 56}, "end_point": {"row": 31, "column": 80}}, {"id": 117, "type": "ERROR", "text": ";\n\n@property (nonatomic, weak) id", "parent": 51, "children": [118, 119, 120, 121, 122], "start_point": {"row": 31, "column": 80}, "end_point": {"row": 33, "column": 30}}, {"id": 118, "type": "ERROR", "text": "@", "parent": 117, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 119, "type": "identifier", "text": "property", "parent": 117, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 9}}, {"id": 120, "type": "identifier", "text": "nonatomic", "parent": 117, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 20}}, {"id": 121, "type": "identifier", "text": "weak", "parent": 117, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 26}}, {"id": 122, "type": "identifier", "text": "id", "parent": 117, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 30}}, {"id": 123, "type": "<", "text": "<", "parent": 51, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 31}}, {"id": 124, "type": "identifier", "text": "AFBlipVideoPlayerDelegate", "parent": 51, "children": [], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 56}}, {"id": 125, "type": ">", "text": ">", "parent": 50, "children": [], "start_point": {"row": 33, "column": 56}, "end_point": {"row": 33, "column": 57}}, {"id": 126, "type": "identifier", "text": "delegate", "parent": 50, "children": [], "start_point": {"row": 33, "column": 58}, "end_point": {"row": 33, "column": 66}}, {"id": 127, "type": "ERROR", "text": ";\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;", "parent": 49, "children": [128, 129, 130, 131, 132, 133, 134], "start_point": {"row": 33, "column": 66}, "end_point": {"row": 34, "column": 69}}, {"id": 128, "type": "ERROR", "text": "@", "parent": 127, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 129, "type": "identifier", "text": "property", "parent": 127, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 9}}, {"id": 130, "type": "identifier", "text": "nonatomic", "parent": 127, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 20}}, {"id": 131, "type": "identifier", "text": "assign", "parent": 127, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 28}}, {"id": 132, "type": "identifier", "text": "readonly", "parent": 127, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 38}}, {"id": 133, "type": "identifier", "text": "AFBlipVideoPlayerState", "parent": 127, "children": [], "start_point": {"row": 34, "column": 40}, "end_point": {"row": 34, "column": 62}}, {"id": 134, "type": "identifier", "text": "state", "parent": 127, "children": [], "start_point": {"row": 34, "column": 63}, "end_point": {"row": 34, "column": 68}}, {"id": 135, "type": "-", "text": "-", "parent": 49, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 136, "type": "cast_expression", "text": "(void)switchCameraDevicePosition", "parent": 49, "children": [137, 139], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 34}}, {"id": 137, "type": "type_descriptor", "text": "void", "parent": 136, "children": [138], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 7}}, {"id": 138, "type": "primitive_type", "text": "void", "parent": 137, "children": [], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 7}}, {"id": 139, "type": "identifier", "text": "switchCameraDevicePosition", "parent": 136, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 34}}, {"id": 140, "type": "ERROR", "text": ":(AVCaptureDevicePosition)devicePosition;", "parent": 48, "children": [141, 142], "start_point": {"row": 37, "column": 34}, "end_point": {"row": 37, "column": 75}}, {"id": 141, "type": "identifier", "text": "AVCaptureDevicePosition", "parent": 140, "children": [], "start_point": {"row": 37, "column": 36}, "end_point": {"row": 37, "column": 59}}, {"id": 142, "type": "identifier", "text": "devicePosition", "parent": 140, "children": [], "start_point": {"row": 37, "column": 60}, "end_point": {"row": 37, "column": 74}}, {"id": 143, "type": "-", "text": "-", "parent": 48, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 144, "type": "cast_expression", "text": "(void)start", "parent": 48, "children": [145, 147], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 13}}, {"id": 145, "type": "type_descriptor", "text": "void", "parent": 144, "children": [146], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 7}}, {"id": 146, "type": "primitive_type", "text": "void", "parent": 145, "children": [], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 7}}, {"id": 147, "type": "identifier", "text": "start", "parent": 144, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 13}}, {"id": 148, "type": "ERROR", "text": ":(AFBlipVideoPlayerState)state;", "parent": 47, "children": [149, 150], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 44}}, {"id": 149, "type": "identifier", "text": "AFBlipVideoPlayerState", "parent": 148, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 37}}, {"id": 150, "type": "identifier", "text": "state", "parent": 148, "children": [], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 40, "column": 43}}, {"id": 151, "type": "-", "text": "-", "parent": 47, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 152, "type": "cast_expression", "text": "(void)stop", "parent": 47, "children": [153, 155], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 12}}, {"id": 153, "type": "type_descriptor", "text": "void", "parent": 152, "children": [154], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 7}}, {"id": 154, "type": "primitive_type", "text": "void", "parent": 153, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 7}}, {"id": 155, "type": "identifier", "text": "stop", "parent": 152, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 12}}, {"id": 156, "type": "--", "text": "", "parent": 46, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 12}}, {"id": 157, "type": "unary_expression", "text": "- (void)reset", "parent": null, "children": [158, 159], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 13}}, {"id": 158, "type": "-", "text": "-", "parent": 157, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 1}}, {"id": 159, "type": "cast_expression", "text": "(void)reset", "parent": 157, "children": [160, 162], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 13}}, {"id": 160, "type": "type_descriptor", "text": "void", "parent": 159, "children": [161], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 7}}, {"id": 161, "type": "primitive_type", "text": "void", "parent": 160, "children": [], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 7}}, {"id": 162, "type": "identifier", "text": "reset", "parent": 159, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 13}}, {"id": 163, "type": "unary_expression", "text": "- (void)showActivityIndicator", "parent": null, "children": [164, 165], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 29}}, {"id": 164, "type": "-", "text": "-", "parent": 163, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 165, "type": "cast_expression", "text": "(void)showActivityIndicator", "parent": 163, "children": [166, 168], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 29}}, {"id": 166, "type": "type_descriptor", "text": "void", "parent": 165, "children": [167], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 7}}, {"id": 167, "type": "primitive_type", "text": "void", "parent": 166, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 7}}, {"id": 168, "type": "identifier", "text": "showActivityIndicator", "parent": 165, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 29}}, {"id": 169, "type": "ERROR", "text": ":(BOOL)show", "parent": null, "children": [170, 171], "start_point": {"row": 49, "column": 29}, "end_point": {"row": 49, "column": 40}}, {"id": 170, "type": "identifier", "text": "BOOL", "parent": 169, "children": [], "start_point": {"row": 49, "column": 31}, "end_point": {"row": 49, "column": 35}}, {"id": 171, "type": "identifier", "text": "show", "parent": 169, "children": [], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 40}}, {"id": 172, "type": "ERROR", "text": "@", "parent": null, "children": [173], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 173, "type": "ERROR", "text": "@", "parent": 172, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [8], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [19, 21, 27, 33, 36, 42, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 70, 79, 97, 136, 144, 152, 157, 159, 163, 165], "assignments": [], "loops": [], "conditionals": [9, 12, 13, 15, 18, 23, 26, 28, 30, 34, 38, 41, 43, 45, 63, 64, 66, 68, 73, 75, 77, 82, 84, 85, 86, 87, 89, 93, 94, 95, 99, 100, 102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114, 116, 119, 120, 121, 122, 124, 126, 129, 130, 131, 132, 133, 134, 139, 141, 142, 147, 149, 150, 155, 162, 168, 170, 171], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <AVFoundation/AVFoundation.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "//\n// AFBlipVideoPlayer.h\n// Blips\n//\n// Created by <NAME> on 2014-07-05.\n// Copyright (c) 2014 AF-Apps. All rights reserved.\n//\n\n#import \"AFBlipVideoViewControllerMediatorStatics.h\"\n#include <AVFoundation/AVFoundation.h>\n\n@class AFBlipVideoPlayer;\n\n@protocol AFBlipVideoPlayerDelegate <NSObject>\n\n@required\n- (NSURL *)videoPlayerOutputFilePath:(AFBlipVideoPlayer *)videoPlayer;\n\n@optional\n- (NSURL *)videoPlayerOutputThumbnailFilePath:(AFBlipVideoPlayer *)videoPlayer;\n- (CMTime)videoPlayerMaximumRecordingDuration:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerDidFinishCapturingVideo:(AFBlipVideoPlayer *)videoPlayer;\n- (void)videoPlayerVideoSize:(CGSize)videoSize videoPlayer:(AFBlipVideoPlayer *)videoPlayer;\n\n\n@end\n\n@interface AFBlipVideoPlayer : UIView\n\n- (instancetype)initWithFrame:(CGRect)frame quality:(AFBlipVideoCaptureQuality)quality state:(AFBlipVideoPlayerState)state;\n\n@property(nonatomic, strong)AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;\n\n@property (nonatomic, weak) id<AFBlipVideoPlayerDelegate> delegate;\n@property (nonatomic, assign, readonly) AFBlipVideoPlayerState state;\n\n/** Switch camera input. */\n- (void)switchCameraDevicePosition:(AVCaptureDevicePosition)devicePosition;\n\n/** Starts recording. */\n- (void)start:(AFBlipVideoPlayerState)state;\n\n/** Stop recording. */\n- (void)stop;\n\n/** Stop and reset recording. */\n- (void)reset;\n\n/** Toggle activity indicator. */\n- (void)showActivityIndicator:(BOOL)show;\n\n@end"}
80,946
c
#pragma once #include <cstddef> #include <cstdint> #include <stdexcept> #include "image.h" #include "geometry.h" namespace dpfb { class FontRendererError : public std::runtime_error { public: using runtime_error::runtime_error; }; enum class Hinting { normal, light }; struct FontRendererArgs { const std::uint8_t* data; std::size_t dataSize; int pxSize; Hinting hinting; }; using GlyphIndex = std::uint_least32_t; struct GlyphMetrics { /** * Size of the glyph's bitmap. */ Size size; /** * Offset from the origin. * * This is the offset of the bottom left corner of the bitmap * from the origin on the baseline. Like in FreeType, the y * coordinate increases up. */ Point offset; /** * X advance. */ int advance; }; struct FontMetrics { int ascender; int descender; int lineHeight; }; class FontRenderer { public: static bool exists(const char* name); static FontRenderer* create( const char* name, const FontRendererArgs& args); FontRenderer() = default; virtual ~FontRenderer() {}; FontRenderer(const FontRenderer& other) = delete; FontRenderer& operator=(const FontRenderer& other) = delete; FontRenderer(FontRenderer&& other) = delete; FontRenderer& operator=(FontRenderer&& other) = delete; virtual FontMetrics getFontMetrics() const = 0; virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0; virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0; virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0; }; class FontRendererCreator { public: static const FontRendererCreator* find(const char* name); static const FontRendererCreator* getFirst(); const FontRendererCreator* getNext() const; explicit FontRendererCreator(const char* name); virtual ~FontRendererCreator() {}; const char* getName() const; virtual const char* getDescription() const = 0; virtual FontRenderer* create(const FontRendererArgs& args) const = 0; private: static FontRendererCreator* list; const char* name; FontRendererCreator* next; }; }
24.01
87
(translation_unit) "#pragma once\n\n#include <cstddef>\n#include <cstdint>\n#include <stdexcept>\n\n#include "image.h"\n#include "geometry.h"\n\n\nnamespace dpfb {\n\n\nclass FontRendererError : public std::runtime_error {\npublic:\n using runtime_error::runtime_error;\n};\n\n\nenum class Hinting {\n normal,\n light\n};\n\n\nstruct FontRendererArgs {\n const std::uint8_t* data;\n std::size_t dataSize;\n int pxSize;\n Hinting hinting;\n};\n\n\nusing GlyphIndex = std::uint_least32_t;\n\n\nstruct GlyphMetrics {\n /**\n * Size of the glyph's bitmap.\n */\n Size size;\n\n /**\n * Offset from the origin.\n *\n * This is the offset of the bottom left corner of the bitmap\n * from the origin on the baseline. Like in FreeType, the y\n * coordinate increases up.\n */\n Point offset;\n\n /**\n * X advance.\n */\n int advance;\n};\n\n\nstruct FontMetrics {\n int ascender;\n int descender;\n int lineHeight;\n};\n\n\nclass FontRenderer {\npublic:\n static bool exists(const char* name);\n static FontRenderer* create(\n const char* name, const FontRendererArgs& args);\n\n FontRenderer() = default;\n virtual ~FontRenderer() {};\n\n FontRenderer(const FontRenderer& other) = delete;\n FontRenderer& operator=(const FontRenderer& other) = delete;\n\n FontRenderer(FontRenderer&& other) = delete;\n FontRenderer& operator=(FontRenderer&& other) = delete;\n\n virtual FontMetrics getFontMetrics() const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;\n virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;\n virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;\n};\n\n\nclass FontRendererCreator {\npublic:\n static const FontRendererCreator* find(const char* name);\n\n static const FontRendererCreator* getFirst();\n const FontRendererCreator* getNext() const;\n\n explicit FontRendererCreator(const char* name);\n virtual ~FontRendererCreator() {};\n\n const char* getName() const;\n virtual const char* getDescription() const = 0;\n\n virtual FontRenderer* create(const FontRendererArgs& args) const = 0;\nprivate:\n static FontRendererCreator* list;\n\n const char* name;\n FontRendererCreator* next;\n};\n\n\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <cstddef>\n" (#include) "#include" (system_lib_string) "<cstddef>" (preproc_include) "#include <cstdint>\n" (#include) "#include" (system_lib_string) "<cstdint>" (preproc_include) "#include <stdexcept>\n" (#include) "#include" (system_lib_string) "<stdexcept>" (preproc_include) "#include "image.h"\n" (#include) "#include" (string_literal) ""image.h"" (") """ (string_content) "image.h" (") """ (preproc_include) "#include "geometry.h"\n" (#include) "#include" (string_literal) ""geometry.h"" (") """ (string_content) "geometry.h" (") """ (ERROR) "namespace dpfb {\n\n\nclass FontRendererError : public std::runtime_error {\npublic:\n using runtime_error::runtime_error;\n};\n\n\nenum class Hinting {\n normal,\n light\n};\n\n\nstruct FontRendererArgs {\n const std::uint8_t* data;\n std::size_t dataSize;\n int pxSize;\n Hinting hinting;\n};\n\n\nusing GlyphIndex = std::uint_least32_t;\n\n\nstruct GlyphMetrics {\n /**\n * Size of the glyph's bitmap.\n */\n Size size;\n\n /**\n * Offset from the origin.\n *\n * This is the offset of the bottom left corner of the bitmap\n * from the origin on the baseline. Like in FreeType, the y\n * coordinate increases up.\n */\n Point offset;\n\n /**\n * X advance.\n */\n int advance;\n};\n\n\nstruct FontMetrics {\n int ascender;\n int descender;\n int lineHeight;\n};\n\n\nclass FontRenderer {\npublic:\n static bool exists(const char* name);\n static FontRenderer* create(\n const char* name, const FontRendererArgs& args);\n\n FontRenderer() = default;\n virtual ~FontRenderer() {};\n\n FontRenderer(const FontRenderer& other) = delete;\n FontRenderer& operator=(const FontRenderer& other) = delete;\n\n FontRenderer(FontRenderer&& other) = delete;\n FontRenderer& operator=(FontRenderer&& other) = delete;\n\n virtual FontMetrics getFontMetrics() const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;\n virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;\n virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;\n};\n\n\nclass FontRendererCreator {\npublic:\n static const FontRendererCreator* find(const char* name);\n\n static const FontRendererCreator* getFirst();\n const FontRendererCreator* getNext() const;\n\n explicit FontRendererCreator(const char* name);\n virtual ~FontRendererCreator() {};\n\n const char* getName() const;\n virtual const char* getDescription() const = 0;\n\n virtual FontRenderer* create(const FontRendererArgs& args) const = 0;\nprivate:\n static FontRendererCreator* list;\n\n const char* name;\n FontRendererCreator* next;\n};\n\n\n}" (type_identifier) "namespace" (identifier) "dpfb" ({) "{" (function_definition) "class FontRendererError : public std::runtime_error {\npublic:\n using runtime_error::runtime_error;\n}" (type_identifier) "class" (identifier) "FontRendererError" (ERROR) ": public std::runtime_error" (:) ":" (identifier) "public" (identifier) "std" (:) ":" (:) ":" (identifier) "runtime_error" (compound_statement) "{\npublic:\n using runtime_error::runtime_error;\n}" ({) "{" (labeled_statement) "public:\n using runtime_error::runtime_error;" (statement_identifier) "public" (:) ":" (declaration) "using runtime_error::runtime_error;" (type_identifier) "using" (identifier) "runtime_error" (ERROR) "::runtime_error" (:) ":" (:) ":" (identifier) "runtime_error" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (identifier) "Hinting" ({) "{" (expression_statement) "normal,\n light\n};" (comma_expression) "normal,\n light" (identifier) "normal" (,) "," (identifier) "light" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct FontRendererArgs {\n const std::uint8_t* data;\n std::size_t dataSize;\n int pxSize;\n Hinting hinting;\n}" (struct) "struct" (type_identifier) "FontRendererArgs" (field_declaration_list) "{\n const std::uint8_t* data;\n std::size_t dataSize;\n int pxSize;\n Hinting hinting;\n}" ({) "{" (field_declaration) "const std::uint8_t* data;" (type_qualifier) "const" (const) "const" (ERROR) "std::" (type_identifier) "std" (:) ":" (:) ":" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (field_identifier) "data" (;) ";" (ERROR) "std::" (type_identifier) "std" (:) ":" (:) ":" (field_declaration) "size_t dataSize;" (primitive_type) "size_t" (field_identifier) "dataSize" (;) ";" (field_declaration) "int pxSize;" (primitive_type) "int" (field_identifier) "pxSize" (;) ";" (field_declaration) "Hinting hinting;" (type_identifier) "Hinting" (field_identifier) "hinting" (;) ";" (}) "}" (;) ";" (declaration) "using GlyphIndex = std::uint_least32_t;" (type_identifier) "using" (init_declarator) "GlyphIndex = std::uint_least32_t" (identifier) "GlyphIndex" (=) "=" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (identifier) "uint_least32_t" (;) ";" (struct_specifier) "struct GlyphMetrics {\n /**\n * Size of the glyph's bitmap.\n */\n Size size;\n\n /**\n * Offset from the origin.\n *\n * This is the offset of the bottom left corner of the bitmap\n * from the origin on the baseline. Like in FreeType, the y\n * coordinate increases up.\n */\n Point offset;\n\n /**\n * X advance.\n */\n int advance;\n}" (struct) "struct" (type_identifier) "GlyphMetrics" (field_declaration_list) "{\n /**\n * Size of the glyph's bitmap.\n */\n Size size;\n\n /**\n * Offset from the origin.\n *\n * This is the offset of the bottom left corner of the bitmap\n * from the origin on the baseline. Like in FreeType, the y\n * coordinate increases up.\n */\n Point offset;\n\n /**\n * X advance.\n */\n int advance;\n}" ({) "{" (comment) "/**\n * Size of the glyph's bitmap.\n */" (field_declaration) "Size size;" (type_identifier) "Size" (field_identifier) "size" (;) ";" (comment) "/**\n * Offset from the origin.\n *\n * This is the offset of the bottom left corner of the bitmap\n * from the origin on the baseline. Like in FreeType, the y\n * coordinate increases up.\n */" (field_declaration) "Point offset;" (type_identifier) "Point" (field_identifier) "offset" (;) ";" (comment) "/**\n * X advance.\n */" (field_declaration) "int advance;" (primitive_type) "int" (field_identifier) "advance" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct FontMetrics {\n int ascender;\n int descender;\n int lineHeight;\n}" (struct) "struct" (type_identifier) "FontMetrics" (field_declaration_list) "{\n int ascender;\n int descender;\n int lineHeight;\n}" ({) "{" (field_declaration) "int ascender;" (primitive_type) "int" (field_identifier) "ascender" (;) ";" (field_declaration) "int descender;" (primitive_type) "int" (field_identifier) "descender" (;) ";" (field_declaration) "int lineHeight;" (primitive_type) "int" (field_identifier) "lineHeight" (;) ";" (}) "}" (;) ";" (function_definition) "class FontRenderer {\npublic:\n static bool exists(const char* name);\n static FontRenderer* create(\n const char* name, const FontRendererArgs& args);\n\n FontRenderer() = default;\n virtual ~FontRenderer() {};\n\n FontRenderer(const FontRenderer& other) = delete;\n FontRenderer& operator=(const FontRenderer& other) = delete;\n\n FontRenderer(FontRenderer&& other) = delete;\n FontRenderer& operator=(FontRenderer&& other) = delete;\n\n virtual FontMetrics getFontMetrics() const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;\n virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;\n virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;\n};\n\n\nclass FontRendererCreator {\npublic:\n static const FontRendererCreator* find(const char* name);\n\n static const FontRendererCreator* getFirst();\n const FontRendererCreator* getNext() const;\n\n explicit FontRendererCreator(const char* name);\n virtual ~FontRendererCreator() {};\n\n const char* getName() const;\n virtual const char* getDescription() const = 0;\n\n virtual FontRenderer* create(const FontRendererArgs& args) const = 0;\nprivate:\n static FontRendererCreator* list;\n\n const char* name;\n FontRendererCreator* next;\n};\n\n\n}" (type_identifier) "class" (identifier) "FontRenderer" (compound_statement) "{\npublic:\n static bool exists(const char* name);\n static FontRenderer* create(\n const char* name, const FontRendererArgs& args);\n\n FontRenderer() = default;\n virtual ~FontRenderer() {};\n\n FontRenderer(const FontRenderer& other) = delete;\n FontRenderer& operator=(const FontRenderer& other) = delete;\n\n FontRenderer(FontRenderer&& other) = delete;\n FontRenderer& operator=(FontRenderer&& other) = delete;\n\n virtual FontMetrics getFontMetrics() const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;\n virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;\n virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;\n};\n\n\nclass FontRendererCreator {\npublic:\n static const FontRendererCreator* find(const char* name);\n\n static const FontRendererCreator* getFirst();\n const FontRendererCreator* getNext() const;\n\n explicit FontRendererCreator(const char* name);\n virtual ~FontRendererCreator() {};\n\n const char* getName() const;\n virtual const char* getDescription() const = 0;\n\n virtual FontRenderer* create(const FontRendererArgs& args) const = 0;\nprivate:\n static FontRendererCreator* list;\n\n const char* name;\n FontRendererCreator* next;\n};\n\n\n}" ({) "{" (labeled_statement) "public:\n static bool exists(const char* name);" (statement_identifier) "public" (:) ":" (declaration) "static bool exists(const char* name);" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "exists(const char* name)" (identifier) "exists" (parameter_list) "(const char* name)" (() "(" (parameter_declaration) "const char* name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" ()) ")" (;) ";" (declaration) "static FontRenderer* create(\n const char* name, const FontRendererArgs& args);" (storage_class_specifier) "static" (static) "static" (type_identifier) "FontRenderer" (pointer_declarator) "* create(\n const char* name, const FontRendererArgs& args)" (*) "*" (function_declarator) "create(\n const char* name, const FontRendererArgs& args)" (identifier) "create" (parameter_list) "(\n const char* name, const FontRendererArgs& args)" (() "(" (parameter_declaration) "const char* name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" (,) "," (parameter_declaration) "const FontRendererArgs& args" (type_qualifier) "const" (const) "const" (type_identifier) "FontRendererArgs" (ERROR) "&" (&) "&" (identifier) "args" ()) ")" (;) ";" (expression_statement) "FontRenderer() = default;" (assignment_expression) "FontRenderer() = default" (call_expression) "FontRenderer()" (identifier) "FontRenderer" (argument_list) "()" (() "(" ()) ")" (=) "=" (identifier) "default" (;) ";" (function_definition) "virtual ~FontRenderer() {}" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "FontRenderer()" (identifier) "FontRenderer" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (declaration) "FontRenderer(const FontRenderer& other) = delete;" (macro_type_specifier) "FontRenderer(const FontRenderer& other)" (identifier) "FontRenderer" (() "(" (type_descriptor) "const FontRenderer" (type_qualifier) "const" (const) "const" (type_identifier) "FontRenderer" (ERROR) "& other" (&) "&" (identifier) "other" ()) ")" (ERROR) "=" (=) "=" (identifier) "delete" (;) ";" (expression_statement) "FontRenderer& operator=(const FontRenderer& other) = delete;" (binary_expression) "FontRenderer& operator=(const FontRenderer& other) = delete" (identifier) "FontRenderer" (&) "&" (assignment_expression) "operator=(const FontRenderer& other) = delete" (identifier) "operator" (=) "=" (assignment_expression) "(const FontRenderer& other) = delete" (parenthesized_expression) "(const FontRenderer& other)" (() "(" (ERROR) "const FontRenderer" (type_descriptor) "const FontRenderer" (type_qualifier) "const" (const) "const" (type_identifier) "FontRenderer" (pointer_expression) "& other" (&) "&" (identifier) "other" ()) ")" (=) "=" (identifier) "delete" (;) ";" (expression_statement) "FontRenderer(FontRenderer&& other) = delete;" (assignment_expression) "FontRenderer(FontRenderer&& other) = delete" (call_expression) "FontRenderer(FontRenderer&& other)" (identifier) "FontRenderer" (argument_list) "(FontRenderer&& other)" (() "(" (binary_expression) "FontRenderer&& other" (identifier) "FontRenderer" (&&) "&&" (identifier) "other" ()) ")" (=) "=" (identifier) "delete" (;) ";" (expression_statement) "FontRenderer& operator=(FontRenderer&& other) = delete;" (binary_expression) "FontRenderer& operator=(FontRenderer&& other) = delete" (identifier) "FontRenderer" (&) "&" (assignment_expression) "operator=(FontRenderer&& other) = delete" (identifier) "operator" (=) "=" (assignment_expression) "(FontRenderer&& other) = delete" (parenthesized_expression) "(FontRenderer&& other)" (() "(" (binary_expression) "FontRenderer&& other" (identifier) "FontRenderer" (&&) "&&" (identifier) "other" ()) ")" (=) "=" (identifier) "delete" (;) ";" (function_definition) "virtual FontMetrics getFontMetrics() const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;\n virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;\n virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;\n};\n\n\nclass FontRendererCreator {\npublic:\n static const FontRendererCreator* find(const char* name);\n\n static const FontRendererCreator* getFirst();\n const FontRendererCreator* getNext() const;\n\n explicit FontRendererCreator(const char* name);\n virtual ~FontRendererCreator() {};\n\n const char* getName() const;\n virtual const char* getDescription() const = 0;\n\n virtual FontRenderer* create(const FontRendererArgs& args) const = 0;\nprivate:\n static FontRendererCreator* list;\n\n const char* name;\n FontRendererCreator* next;\n}" (type_identifier) "virtual" (ERROR) "FontMetrics" (identifier) "FontMetrics" (function_declarator) "getFontMetrics()" (identifier) "getFontMetrics" (parameter_list) "()" (() "(" ()) ")" (declaration) "const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;" (type_qualifier) "const" (const) "const" (ERROR) "= 0;" (=) "=" (number_literal) "0" (;) ";" (type_identifier) "virtual" (ERROR) "GlyphIndex" (identifier) "GlyphIndex" (init_declarator) "getGlyphIndex(char32_t cp) const = 0" (function_declarator) "getGlyphIndex(char32_t cp) const" (identifier) "getGlyphIndex" (parameter_list) "(char32_t cp)" (() "(" (parameter_declaration) "char32_t cp" (primitive_type) "char32_t" (identifier) "cp" ()) ")" (identifier) "const" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;" (type_identifier) "virtual" (ERROR) "GlyphMetrics" (identifier) "GlyphMetrics" (init_declarator) "getGlyphMetrics(GlyphIndex glyphIdx) const = 0" (function_declarator) "getGlyphMetrics(GlyphIndex glyphIdx) const" (identifier) "getGlyphMetrics" (parameter_list) "(GlyphIndex glyphIdx)" (() "(" (parameter_declaration) "GlyphIndex glyphIdx" (type_identifier) "GlyphIndex" (identifier) "glyphIdx" ()) ")" (identifier) "const" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0" (function_declarator) "renderGlyph(GlyphIndex glyphIdx, Image& image) const" (identifier) "renderGlyph" (parameter_list) "(GlyphIndex glyphIdx, Image& image)" (() "(" (parameter_declaration) "GlyphIndex glyphIdx" (type_identifier) "GlyphIndex" (identifier) "glyphIdx" (,) "," (parameter_declaration) "Image& image" (type_identifier) "Image" (ERROR) "&" (&) "&" (identifier) "image" ()) ")" (identifier) "const" (=) "=" (number_literal) "0" (;) ";" (ERROR) "};\n\n\nclass FontRendererCreator" (}) "}" (;) ";" (type_identifier) "class" (identifier) "FontRendererCreator" (compound_statement) "{\npublic:\n static const FontRendererCreator* find(const char* name);\n\n static const FontRendererCreator* getFirst();\n const FontRendererCreator* getNext() const;\n\n explicit FontRendererCreator(const char* name);\n virtual ~FontRendererCreator() {};\n\n const char* getName() const;\n virtual const char* getDescription() const = 0;\n\n virtual FontRenderer* create(const FontRendererArgs& args) const = 0;\nprivate:\n static FontRendererCreator* list;\n\n const char* name;\n FontRendererCreator* next;\n}" ({) "{" (labeled_statement) "public:\n static const FontRendererCreator* find(const char* name);" (statement_identifier) "public" (:) ":" (declaration) "static const FontRendererCreator* find(const char* name);" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (type_identifier) "FontRendererCreator" (pointer_declarator) "* find(const char* name)" (*) "*" (function_declarator) "find(const char* name)" (identifier) "find" (parameter_list) "(const char* name)" (() "(" (parameter_declaration) "const char* name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" ()) ")" (;) ";" (declaration) "static const FontRendererCreator* getFirst();" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (type_identifier) "FontRendererCreator" (pointer_declarator) "* getFirst()" (*) "*" (function_declarator) "getFirst()" (identifier) "getFirst" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "const FontRendererCreator* getNext() const;" (type_qualifier) "const" (const) "const" (type_identifier) "FontRendererCreator" (pointer_declarator) "* getNext() const" (*) "*" (function_declarator) "getNext() const" (identifier) "getNext" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (declaration) "explicit FontRendererCreator(const char* name);" (type_identifier) "explicit" (function_declarator) "FontRendererCreator(const char* name)" (identifier) "FontRendererCreator" (parameter_list) "(const char* name)" (() "(" (parameter_declaration) "const char* name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" ()) ")" (;) ";" (function_definition) "virtual ~FontRendererCreator() {}" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "FontRendererCreator()" (identifier) "FontRendererCreator" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (declaration) "const char* getName() const;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* getName() const" (*) "*" (function_declarator) "getName() const" (identifier) "getName" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (declaration) "virtual const char* getDescription() const = 0;" (type_identifier) "virtual" (type_qualifier) "const" (const) "const" (ERROR) "char" (identifier) "char" (init_declarator) "* getDescription() const = 0" (pointer_declarator) "* getDescription() const" (*) "*" (function_declarator) "getDescription() const" (identifier) "getDescription" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual FontRenderer* create(const FontRendererArgs& args) const = 0;" (type_identifier) "virtual" (ERROR) "FontRenderer" (identifier) "FontRenderer" (init_declarator) "* create(const FontRendererArgs& args) const = 0" (pointer_declarator) "* create(const FontRendererArgs& args) const" (*) "*" (function_declarator) "create(const FontRendererArgs& args) const" (identifier) "create" (parameter_list) "(const FontRendererArgs& args)" (() "(" (parameter_declaration) "const FontRendererArgs& args" (type_qualifier) "const" (const) "const" (type_identifier) "FontRendererArgs" (ERROR) "&" (&) "&" (identifier) "args" ()) ")" (identifier) "const" (=) "=" (number_literal) "0" (;) ";" (labeled_statement) "private:\n static FontRendererCreator* list;" (statement_identifier) "private" (:) ":" (declaration) "static FontRendererCreator* list;" (storage_class_specifier) "static" (static) "static" (type_identifier) "FontRendererCreator" (pointer_declarator) "* list" (*) "*" (identifier) "list" (;) ";" (declaration) "const char* name;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" (;) ";" (declaration) "FontRendererCreator* next;" (type_identifier) "FontRendererCreator" (pointer_declarator) "* next" (*) "*" (identifier) "next" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}"
543
23
{"language": "c", "success": true, "metadata": {"lines": 87, "avg_line_length": 24.01, "nodes": 323, "errors": 0, "source_hash": "30845a6bb571fd06966655886243b55f07e7f77e47ab2155761cd97279d3ba03", "categorized_nodes": 210}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include <cstddef>\n", "parent": null, "children": [4, 5], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<cstddef>", "parent": 3, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <cstdint>\n", "parent": null, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<cstdint>", "parent": 6, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <stdexcept>\n", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<stdexcept>", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include \"image.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"image.h\"", "parent": 12, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include \"geometry.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"geometry.h\"", "parent": 15, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 21}}, {"id": 18, "type": "ERROR", "text": "namespace dpfb {\n\n\nclass FontRendererError : public std::runtime_error {\npublic:\n using runtime_error::runtime_error;\n};\n\n\nenum class Hinting {\n normal,\n light\n};\n\n\nstruct FontRendererArgs {\n const std::uint8_t* data;\n std::size_t dataSize;\n int pxSize;\n Hinting hinting;\n};\n\n\nusing GlyphIndex = std::uint_least32_t;\n\n\nstruct GlyphMetrics {\n /**\n * Size of the glyph's bitmap.\n */\n Size size;\n\n /**\n * Offset from the origin.\n *\n * This is the offset of the bottom left corner of the bitmap\n * from the origin on the baseline. Like in FreeType, the y\n * coordinate increases up.\n */\n Point offset;\n\n /**\n * X advance.\n */\n int advance;\n};\n\n\nstruct FontMetrics {\n int ascender;\n int descender;\n int lineHeight;\n};\n\n\nclass FontRenderer {\npublic:\n static bool exists(const char* name);\n static FontRenderer* create(\n const char* name, const FontRendererArgs& args);\n\n FontRenderer() = default;\n virtual ~FontRenderer() {};\n\n FontRenderer(const FontRenderer& other) = delete;\n FontRenderer& operator=(const FontRenderer& other) = delete;\n\n FontRenderer(FontRenderer&& other) = delete;\n FontRenderer& operator=(FontRenderer&& other) = delete;\n\n virtual FontMetrics getFontMetrics() const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;\n virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;\n virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;\n};\n\n\nclass FontRendererCreator {\npublic:\n static const FontRendererCreator* find(const char* name);\n\n static const FontRendererCreator* getFirst();\n const FontRendererCreator* getNext() const;\n\n explicit FontRendererCreator(const char* name);\n virtual ~FontRendererCreator() {};\n\n const char* getName() const;\n virtual const char* getDescription() const = 0;\n\n virtual FontRenderer* create(const FontRendererArgs& args) const = 0;\nprivate:\n static FontRendererCreator* list;\n\n const char* name;\n FontRendererCreator* next;\n};\n\n\n}", "parent": null, "children": [19, 20, 21, 32, 34, 38, 59, 67, 79, 91], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 111, "column": 1}}, {"id": 19, "type": "type_identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 9}}, {"id": 20, "type": "identifier", "text": "dpfb", "parent": 18, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 14}}, {"id": 21, "type": "function_definition", "text": "class FontRendererError : public std::runtime_error {\npublic:\n using runtime_error::runtime_error;\n}", "parent": 18, "children": [22, 23], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 22, "type": "identifier", "text": "FontRendererError", "parent": 21, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 23}}, {"id": 23, "type": "ERROR", "text": ": public std::runtime_error", "parent": 21, "children": [24, 25], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 51}}, {"id": 24, "type": "identifier", "text": "std", "parent": 23, "children": [], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 36}}, {"id": 25, "type": "identifier", "text": "runtime_error", "parent": 23, "children": [], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 51}}, {"id": 26, "type": "labeled_statement", "text": "public:\n using runtime_error::runtime_error;", "parent": 21, "children": [27], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 39}}, {"id": 27, "type": "declaration", "text": "using runtime_error::runtime_error;", "parent": 26, "children": [28, 29, 30], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 39}}, {"id": 28, "type": "type_identifier", "text": "using", "parent": 27, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 9}}, {"id": 29, "type": "identifier", "text": "runtime_error", "parent": 27, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 23}}, {"id": 30, "type": "ERROR", "text": "::runtime_error", "parent": 27, "children": [31], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 38}}, {"id": 31, "type": "identifier", "text": "runtime_error", "parent": 30, "children": [], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 38}}, {"id": 32, "type": "enum_specifier", "text": "enum class", "parent": 18, "children": [33], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 10}}, {"id": 33, "type": "enum", "text": "enum", "parent": 32, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 4}}, {"id": 34, "type": "identifier", "text": "Hinting", "parent": 18, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 18}}, {"id": 35, "type": "comma_expression", "text": "normal,\n light", "parent": 18, "children": [36, 37], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 22, "column": 9}}, {"id": 36, "type": "identifier", "text": "normal", "parent": 35, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 10}}, {"id": 37, "type": "identifier", "text": "light", "parent": 35, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 9}}, {"id": 38, "type": "struct_specifier", "text": "struct FontRendererArgs {\n const std::uint8_t* data;\n std::size_t dataSize;\n int pxSize;\n Hinting hinting;\n}", "parent": 18, "children": [39, 40], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 39, "type": "struct", "text": "struct", "parent": 38, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 40, "type": "type_identifier", "text": "FontRendererArgs", "parent": 38, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 23}}, {"id": 41, "type": "field_declaration", "text": "const std::uint8_t* data;", "parent": 38, "children": [42, 44, 45], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 29}}, {"id": 42, "type": "ERROR", "text": "std::", "parent": 41, "children": [43], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 15}}, {"id": 43, "type": "type_identifier", "text": "std", "parent": 42, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 13}}, {"id": 44, "type": "primitive_type", "text": "uint8_t", "parent": 41, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 22}}, {"id": 45, "type": "pointer_declarator", "text": "* data", "parent": 41, "children": [46, 47], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 28}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 23}}, {"id": 47, "type": "field_identifier", "text": "data", "parent": 45, "children": [], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 28}}, {"id": 48, "type": "ERROR", "text": "std::", "parent": 38, "children": [49], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 9}}, {"id": 49, "type": "type_identifier", "text": "std", "parent": 48, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 7}}, {"id": 50, "type": "field_declaration", "text": "size_t dataSize;", "parent": 38, "children": [51, 52], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 25}}, {"id": 51, "type": "primitive_type", "text": "size_t", "parent": 50, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 15}}, {"id": 52, "type": "field_identifier", "text": "dataSize", "parent": 50, "children": [], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 28, "column": 24}}, {"id": 53, "type": "field_declaration", "text": "int pxSize;", "parent": 38, "children": [54, 55], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 15}}, {"id": 54, "type": "primitive_type", "text": "int", "parent": 53, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 7}}, {"id": 55, "type": "field_identifier", "text": "pxSize", "parent": 53, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 14}}, {"id": 56, "type": "field_declaration", "text": "Hinting hinting;", "parent": 38, "children": [57, 58], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 20}}, {"id": 57, "type": "type_identifier", "text": "Hinting", "parent": 56, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 11}}, {"id": 58, "type": "field_identifier", "text": "hinting", "parent": 56, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 19}}, {"id": 59, "type": "declaration", "text": "using GlyphIndex = std::uint_least32_t;", "parent": 18, "children": [60, 61], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 39}}, {"id": 60, "type": "type_identifier", "text": "using", "parent": 59, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 5}}, {"id": 61, "type": "init_declarator", "text": "GlyphIndex = std::uint_least32_t", "parent": 59, "children": [62, 63, 64, 66], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 38}}, {"id": 62, "type": "identifier", "text": "GlyphIndex", "parent": 61, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 16}}, {"id": 63, "type": "=", "text": "=", "parent": 61, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 18}}, {"id": 64, "type": "ERROR", "text": "std::", "parent": 61, "children": [65], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 24}}, {"id": 65, "type": "identifier", "text": "std", "parent": 64, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 22}}, {"id": 66, "type": "identifier", "text": "uint_least32_t", "parent": 61, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 38}}, {"id": 67, "type": "struct_specifier", "text": "struct GlyphMetrics {\n /**\n * Size of the glyph's bitmap.\n */\n Size size;\n\n /**\n * Offset from the origin.\n *\n * This is the offset of the bottom left corner of the bitmap\n * from the origin on the baseline. Like in FreeType, the y\n * coordinate increases up.\n */\n Point offset;\n\n /**\n * X advance.\n */\n int advance;\n}", "parent": 18, "children": [68, 69], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 68, "type": "struct", "text": "struct", "parent": 67, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 6}}, {"id": 69, "type": "type_identifier", "text": "GlyphMetrics", "parent": 67, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 19}}, {"id": 70, "type": "field_declaration", "text": "Size size;", "parent": 67, "children": [71, 72], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 14}}, {"id": 71, "type": "type_identifier", "text": "Size", "parent": 70, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 8}}, {"id": 72, "type": "field_identifier", "text": "size", "parent": 70, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 13}}, {"id": 73, "type": "field_declaration", "text": "Point offset;", "parent": 67, "children": [74, 75], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 17}}, {"id": 74, "type": "type_identifier", "text": "Point", "parent": 73, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 9}}, {"id": 75, "type": "field_identifier", "text": "offset", "parent": 73, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 16}}, {"id": 76, "type": "field_declaration", "text": "int advance;", "parent": 67, "children": [77, 78], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 16}}, {"id": 77, "type": "primitive_type", "text": "int", "parent": 76, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 7}}, {"id": 78, "type": "field_identifier", "text": "advance", "parent": 76, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 15}}, {"id": 79, "type": "struct_specifier", "text": "struct FontMetrics {\n int ascender;\n int descender;\n int lineHeight;\n}", "parent": 18, "children": [80, 81], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 63, "column": 1}}, {"id": 80, "type": "struct", "text": "struct", "parent": 79, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 6}}, {"id": 81, "type": "type_identifier", "text": "FontMetrics", "parent": 79, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 18}}, {"id": 82, "type": "field_declaration", "text": "int ascender;", "parent": 79, "children": [83, 84], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 17}}, {"id": 83, "type": "primitive_type", "text": "int", "parent": 82, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 7}}, {"id": 84, "type": "field_identifier", "text": "ascender", "parent": 82, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 16}}, {"id": 85, "type": "field_declaration", "text": "int descender;", "parent": 79, "children": [86, 87], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 18}}, {"id": 86, "type": "primitive_type", "text": "int", "parent": 85, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 7}}, {"id": 87, "type": "field_identifier", "text": "descender", "parent": 85, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 17}}, {"id": 88, "type": "field_declaration", "text": "int lineHeight;", "parent": 79, "children": [89, 90], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 19}}, {"id": 89, "type": "primitive_type", "text": "int", "parent": 88, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 7}}, {"id": 90, "type": "field_identifier", "text": "lineHeight", "parent": 88, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 18}}, {"id": 91, "type": "function_definition", "text": "class FontRenderer {\npublic:\n static bool exists(const char* name);\n static FontRenderer* create(\n const char* name, const FontRendererArgs& args);\n\n FontRenderer() = default;\n virtual ~FontRenderer() {};\n\n FontRenderer(const FontRenderer& other) = delete;\n FontRenderer& operator=(const FontRenderer& other) = delete;\n\n FontRenderer(FontRenderer&& other) = delete;\n FontRenderer& operator=(FontRenderer&& other) = delete;\n\n virtual FontMetrics getFontMetrics() const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;\n virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;\n virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;\n};\n\n\nclass FontRendererCreator {\npublic:\n static const FontRendererCreator* find(const char* name);\n\n static const FontRendererCreator* getFirst();\n const FontRendererCreator* getNext() const;\n\n explicit FontRendererCreator(const char* name);\n virtual ~FontRendererCreator() {};\n\n const char* getName() const;\n virtual const char* getDescription() const = 0;\n\n virtual FontRenderer* create(const FontRendererArgs& args) const = 0;\nprivate:\n static FontRendererCreator* list;\n\n const char* name;\n FontRendererCreator* next;\n};\n\n\n}", "parent": 18, "children": [92], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 111, "column": 1}}, {"id": 92, "type": "identifier", "text": "FontRenderer", "parent": 91, "children": [], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 18}}, {"id": 93, "type": "labeled_statement", "text": "public:\n static bool exists(const char* name);", "parent": 91, "children": [94], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 68, "column": 41}}, {"id": 94, "type": "declaration", "text": "static bool exists(const char* name);", "parent": 93, "children": [95, 96], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 41}}, {"id": 95, "type": "primitive_type", "text": "bool", "parent": 94, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 15}}, {"id": 96, "type": "function_declarator", "text": "exists(const char* name)", "parent": 94, "children": [97, 98], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 40}}, {"id": 97, "type": "identifier", "text": "exists", "parent": 96, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 22}}, {"id": 98, "type": "parameter_list", "text": "(const char* name)", "parent": 96, "children": [99], "start_point": {"row": 68, "column": 22}, "end_point": {"row": 68, "column": 40}}, {"id": 99, "type": "parameter_declaration", "text": "const char* name", "parent": 98, "children": [100, 101], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 39}}, {"id": 100, "type": "primitive_type", "text": "char", "parent": 99, "children": [], "start_point": {"row": 68, "column": 29}, "end_point": {"row": 68, "column": 33}}, {"id": 101, "type": "pointer_declarator", "text": "* name", "parent": 99, "children": [102, 103], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 39}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 34}}, {"id": 103, "type": "identifier", "text": "name", "parent": 101, "children": [], "start_point": {"row": 68, "column": 35}, "end_point": {"row": 68, "column": 39}}, {"id": 104, "type": "declaration", "text": "static FontRenderer* create(\n const char* name, const FontRendererArgs& args);", "parent": 91, "children": [105, 106], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 70, "column": 56}}, {"id": 105, "type": "type_identifier", "text": "FontRenderer", "parent": 104, "children": [], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 23}}, {"id": 106, "type": "pointer_declarator", "text": "* create(\n const char* name, const FontRendererArgs& args)", "parent": 104, "children": [107, 108], "start_point": {"row": 69, "column": 23}, "end_point": {"row": 70, "column": 55}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 69, "column": 23}, "end_point": {"row": 69, "column": 24}}, {"id": 108, "type": "function_declarator", "text": "create(\n const char* name, const FontRendererArgs& args)", "parent": 106, "children": [109, 110], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 70, "column": 55}}, {"id": 109, "type": "identifier", "text": "create", "parent": 108, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 31}}, {"id": 110, "type": "parameter_list", "text": "(\n const char* name, const FontRendererArgs& args)", "parent": 108, "children": [111, 116], "start_point": {"row": 69, "column": 31}, "end_point": {"row": 70, "column": 55}}, {"id": 111, "type": "parameter_declaration", "text": "const char* name", "parent": 110, "children": [112, 113], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 24}}, {"id": 112, "type": "primitive_type", "text": "char", "parent": 111, "children": [], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 18}}, {"id": 113, "type": "pointer_declarator", "text": "* name", "parent": 111, "children": [114, 115], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 24}}, {"id": 114, "type": "*", "text": "*", "parent": 113, "children": [], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 19}}, {"id": 115, "type": "identifier", "text": "name", "parent": 113, "children": [], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 24}}, {"id": 116, "type": "parameter_declaration", "text": "const FontRendererArgs& args", "parent": 110, "children": [117, 118], "start_point": {"row": 70, "column": 26}, "end_point": {"row": 70, "column": 54}}, {"id": 117, "type": "type_identifier", "text": "FontRendererArgs", "parent": 116, "children": [], "start_point": {"row": 70, "column": 32}, "end_point": {"row": 70, "column": 48}}, {"id": 118, "type": "identifier", "text": "args", "parent": 116, "children": [], "start_point": {"row": 70, "column": 50}, "end_point": {"row": 70, "column": 54}}, {"id": 119, "type": "assignment_expression", "text": "FontRenderer() = default", "parent": 91, "children": [120, 123, 124], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 28}}, {"id": 120, "type": "call_expression", "text": "FontRenderer()", "parent": 119, "children": [121, 122], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 18}}, {"id": 121, "type": "identifier", "text": "FontRenderer", "parent": 120, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 16}}, {"id": 122, "type": "argument_list", "text": "()", "parent": 120, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 18}}, {"id": 123, "type": "=", "text": "=", "parent": 119, "children": [], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 20}}, {"id": 124, "type": "identifier", "text": "default", "parent": 119, "children": [], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 28}}, {"id": 125, "type": "function_definition", "text": "virtual ~FontRenderer() {}", "parent": 91, "children": [126, 127, 129], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 30}}, {"id": 126, "type": "type_identifier", "text": "virtual", "parent": 125, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 11}}, {"id": 127, "type": "ERROR", "text": "~", "parent": 125, "children": [128], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 13}}, {"id": 128, "type": "~", "text": "~", "parent": 127, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 13}}, {"id": 129, "type": "function_declarator", "text": "FontRenderer()", "parent": 125, "children": [130, 131], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 27}}, {"id": 130, "type": "identifier", "text": "FontRenderer", "parent": 129, "children": [], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 25}}, {"id": 131, "type": "parameter_list", "text": "()", "parent": 129, "children": [], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 27}}, {"id": 132, "type": "declaration", "text": "FontRenderer(const FontRenderer& other) = delete;", "parent": 91, "children": [133, 139], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 53}}, {"id": 133, "type": "macro_type_specifier", "text": "FontRenderer(const FontRenderer& other)", "parent": 132, "children": [134, 135, 137], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 43}}, {"id": 134, "type": "identifier", "text": "FontRenderer", "parent": 133, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 16}}, {"id": 135, "type": "type_descriptor", "text": "const FontRenderer", "parent": 133, "children": [136], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 35}}, {"id": 136, "type": "type_identifier", "text": "FontRenderer", "parent": 135, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 35}}, {"id": 137, "type": "ERROR", "text": "& other", "parent": 133, "children": [138], "start_point": {"row": 75, "column": 35}, "end_point": {"row": 75, "column": 42}}, {"id": 138, "type": "identifier", "text": "other", "parent": 137, "children": [], "start_point": {"row": 75, "column": 37}, "end_point": {"row": 75, "column": 42}}, {"id": 139, "type": "ERROR", "text": "=", "parent": 132, "children": [140], "start_point": {"row": 75, "column": 44}, "end_point": {"row": 75, "column": 45}}, {"id": 140, "type": "=", "text": "=", "parent": 139, "children": [], "start_point": {"row": 75, "column": 44}, "end_point": {"row": 75, "column": 45}}, {"id": 141, "type": "binary_expression", "text": "FontRenderer& operator=(const FontRenderer& other) = delete", "parent": 91, "children": [142, 143], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 63}}, {"id": 142, "type": "identifier", "text": "FontRenderer", "parent": 141, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 16}}, {"id": 143, "type": "assignment_expression", "text": "operator=(const FontRenderer& other) = delete", "parent": 141, "children": [144, 145, 146], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 63}}, {"id": 144, "type": "identifier", "text": "operator", "parent": 143, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 26}}, {"id": 145, "type": "=", "text": "=", "parent": 143, "children": [], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 27}}, {"id": 146, "type": "assignment_expression", "text": "(const FontRenderer& other) = delete", "parent": 143, "children": [147, 153], "start_point": {"row": 76, "column": 27}, "end_point": {"row": 76, "column": 63}}, {"id": 147, "type": "parenthesized_expression", "text": "(const FontRenderer& other)", "parent": 146, "children": [148, 151], "start_point": {"row": 76, "column": 27}, "end_point": {"row": 76, "column": 54}}, {"id": 148, "type": "ERROR", "text": "const FontRenderer", "parent": 147, "children": [149], "start_point": {"row": 76, "column": 28}, "end_point": {"row": 76, "column": 46}}, {"id": 149, "type": "type_descriptor", "text": "const FontRenderer", "parent": 148, "children": [150], "start_point": {"row": 76, "column": 28}, "end_point": {"row": 76, "column": 46}}, {"id": 150, "type": "type_identifier", "text": "FontRenderer", "parent": 149, "children": [], "start_point": {"row": 76, "column": 34}, "end_point": {"row": 76, "column": 46}}, {"id": 151, "type": "pointer_expression", "text": "& other", "parent": 147, "children": [152], "start_point": {"row": 76, "column": 46}, "end_point": {"row": 76, "column": 53}}, {"id": 152, "type": "identifier", "text": "other", "parent": 151, "children": [], "start_point": {"row": 76, "column": 48}, "end_point": {"row": 76, "column": 53}}, {"id": 153, "type": "=", "text": "=", "parent": 146, "children": [], "start_point": {"row": 76, "column": 55}, "end_point": {"row": 76, "column": 56}}, {"id": 154, "type": "assignment_expression", "text": "FontRenderer(FontRenderer&& other) = delete", "parent": 91, "children": [155, 162], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 47}}, {"id": 155, "type": "call_expression", "text": "FontRenderer(FontRenderer&& other)", "parent": 154, "children": [156, 157], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 38}}, {"id": 156, "type": "identifier", "text": "FontRenderer", "parent": 155, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 16}}, {"id": 157, "type": "argument_list", "text": "(FontRenderer&& other)", "parent": 155, "children": [158], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 38}}, {"id": 158, "type": "binary_expression", "text": "FontRenderer&& other", "parent": 157, "children": [159, 160, 161], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 37}}, {"id": 159, "type": "identifier", "text": "FontRenderer", "parent": 158, "children": [], "start_point": {"row": 78, "column": 17}, "end_point": {"row": 78, "column": 29}}, {"id": 160, "type": "&&", "text": "&&", "parent": 158, "children": [], "start_point": {"row": 78, "column": 29}, "end_point": {"row": 78, "column": 31}}, {"id": 161, "type": "identifier", "text": "other", "parent": 158, "children": [], "start_point": {"row": 78, "column": 32}, "end_point": {"row": 78, "column": 37}}, {"id": 162, "type": "=", "text": "=", "parent": 154, "children": [], "start_point": {"row": 78, "column": 39}, "end_point": {"row": 78, "column": 40}}, {"id": 163, "type": "binary_expression", "text": "FontRenderer& operator=(FontRenderer&& other) = delete", "parent": 91, "children": [164, 165], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 58}}, {"id": 164, "type": "identifier", "text": "FontRenderer", "parent": 163, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 16}}, {"id": 165, "type": "assignment_expression", "text": "operator=(FontRenderer&& other) = delete", "parent": 163, "children": [166, 167, 168], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 58}}, {"id": 166, "type": "identifier", "text": "operator", "parent": 165, "children": [], "start_point": {"row": 79, "column": 18}, "end_point": {"row": 79, "column": 26}}, {"id": 167, "type": "=", "text": "=", "parent": 165, "children": [], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 27}}, {"id": 168, "type": "assignment_expression", "text": "(FontRenderer&& other) = delete", "parent": 165, "children": [169, 174], "start_point": {"row": 79, "column": 27}, "end_point": {"row": 79, "column": 58}}, {"id": 169, "type": "parenthesized_expression", "text": "(FontRenderer&& other)", "parent": 168, "children": [170], "start_point": {"row": 79, "column": 27}, "end_point": {"row": 79, "column": 49}}, {"id": 170, "type": "binary_expression", "text": "FontRenderer&& other", "parent": 169, "children": [171, 172, 173], "start_point": {"row": 79, "column": 28}, "end_point": {"row": 79, "column": 48}}, {"id": 171, "type": "identifier", "text": "FontRenderer", "parent": 170, "children": [], "start_point": {"row": 79, "column": 28}, "end_point": {"row": 79, "column": 40}}, {"id": 172, "type": "&&", "text": "&&", "parent": 170, "children": [], "start_point": {"row": 79, "column": 40}, "end_point": {"row": 79, "column": 42}}, {"id": 173, "type": "identifier", "text": "other", "parent": 170, "children": [], "start_point": {"row": 79, "column": 43}, "end_point": {"row": 79, "column": 48}}, {"id": 174, "type": "=", "text": "=", "parent": 168, "children": [], "start_point": {"row": 79, "column": 50}, "end_point": {"row": 79, "column": 51}}, {"id": 175, "type": "function_definition", "text": "virtual FontMetrics getFontMetrics() const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;\n virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;\n virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;\n};\n\n\nclass FontRendererCreator {\npublic:\n static const FontRendererCreator* find(const char* name);\n\n static const FontRendererCreator* getFirst();\n const FontRendererCreator* getNext() const;\n\n explicit FontRendererCreator(const char* name);\n virtual ~FontRendererCreator() {};\n\n const char* getName() const;\n virtual const char* getDescription() const = 0;\n\n virtual FontRenderer* create(const FontRendererArgs& args) const = 0;\nprivate:\n static FontRendererCreator* list;\n\n const char* name;\n FontRendererCreator* next;\n}", "parent": 91, "children": [176, 177, 179, 182, 198, 211, 227], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 108, "column": 1}}, {"id": 176, "type": "type_identifier", "text": "virtual", "parent": 175, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 11}}, {"id": 177, "type": "ERROR", "text": "FontMetrics", "parent": 175, "children": [178], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 23}}, {"id": 178, "type": "identifier", "text": "FontMetrics", "parent": 177, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 23}}, {"id": 179, "type": "function_declarator", "text": "getFontMetrics()", "parent": 175, "children": [180, 181], "start_point": {"row": 81, "column": 24}, "end_point": {"row": 81, "column": 40}}, {"id": 180, "type": "identifier", "text": "getFontMetrics", "parent": 179, "children": [], "start_point": {"row": 81, "column": 24}, "end_point": {"row": 81, "column": 38}}, {"id": 181, "type": "parameter_list", "text": "()", "parent": 179, "children": [], "start_point": {"row": 81, "column": 38}, "end_point": {"row": 81, "column": 40}}, {"id": 182, "type": "declaration", "text": "const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;", "parent": 175, "children": [183, 186, 187, 189], "start_point": {"row": 81, "column": 41}, "end_point": {"row": 83, "column": 60}}, {"id": 183, "type": "ERROR", "text": "= 0;", "parent": 182, "children": [184, 185], "start_point": {"row": 81, "column": 47}, "end_point": {"row": 81, "column": 51}}, {"id": 184, "type": "=", "text": "=", "parent": 183, "children": [], "start_point": {"row": 81, "column": 47}, "end_point": {"row": 81, "column": 48}}, {"id": 185, "type": "number_literal", "text": "0", "parent": 183, "children": [], "start_point": {"row": 81, "column": 49}, "end_point": {"row": 81, "column": 50}}, {"id": 186, "type": "type_identifier", "text": "virtual", "parent": 182, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 11}}, {"id": 187, "type": "ERROR", "text": "GlyphIndex", "parent": 182, "children": [188], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 22}}, {"id": 188, "type": "identifier", "text": "GlyphIndex", "parent": 187, "children": [], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 22}}, {"id": 189, "type": "init_declarator", "text": "getGlyphIndex(char32_t cp) const = 0", "parent": 182, "children": [190, 196, 197], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 59}}, {"id": 190, "type": "function_declarator", "text": "getGlyphIndex(char32_t cp) const", "parent": 189, "children": [191, 192], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 55}}, {"id": 191, "type": "identifier", "text": "getGlyphIndex", "parent": 190, "children": [], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 36}}, {"id": 192, "type": "parameter_list", "text": "(char32_t cp)", "parent": 190, "children": [193], "start_point": {"row": 83, "column": 36}, "end_point": {"row": 83, "column": 49}}, {"id": 193, "type": "parameter_declaration", "text": "char32_t cp", "parent": 192, "children": [194, 195], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 48}}, {"id": 194, "type": "primitive_type", "text": "char32_t", "parent": 193, "children": [], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 45}}, {"id": 195, "type": "identifier", "text": "cp", "parent": 193, "children": [], "start_point": {"row": 83, "column": 46}, "end_point": {"row": 83, "column": 48}}, {"id": 196, "type": "=", "text": "=", "parent": 189, "children": [], "start_point": {"row": 83, "column": 56}, "end_point": {"row": 83, "column": 57}}, {"id": 197, "type": "number_literal", "text": "0", "parent": 189, "children": [], "start_point": {"row": 83, "column": 58}, "end_point": {"row": 83, "column": 59}}, {"id": 198, "type": "declaration", "text": "virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;", "parent": 175, "children": [199, 200, 202], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 72}}, {"id": 199, "type": "type_identifier", "text": "virtual", "parent": 198, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 11}}, {"id": 200, "type": "ERROR", "text": "GlyphMetrics", "parent": 198, "children": [201], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 24}}, {"id": 201, "type": "identifier", "text": "GlyphMetrics", "parent": 200, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 24}}, {"id": 202, "type": "init_declarator", "text": "getGlyphMetrics(GlyphIndex glyphIdx) const = 0", "parent": 198, "children": [203, 209, 210], "start_point": {"row": 84, "column": 25}, "end_point": {"row": 84, "column": 71}}, {"id": 203, "type": "function_declarator", "text": "getGlyphMetrics(GlyphIndex glyphIdx) const", "parent": 202, "children": [204, 205], "start_point": {"row": 84, "column": 25}, "end_point": {"row": 84, "column": 67}}, {"id": 204, "type": "identifier", "text": "getGlyphMetrics", "parent": 203, "children": [], "start_point": {"row": 84, "column": 25}, "end_point": {"row": 84, "column": 40}}, {"id": 205, "type": "parameter_list", "text": "(GlyphIndex glyphIdx)", "parent": 203, "children": [206], "start_point": {"row": 84, "column": 40}, "end_point": {"row": 84, "column": 61}}, {"id": 206, "type": "parameter_declaration", "text": "GlyphIndex glyphIdx", "parent": 205, "children": [207, 208], "start_point": {"row": 84, "column": 41}, "end_point": {"row": 84, "column": 60}}, {"id": 207, "type": "type_identifier", "text": "GlyphIndex", "parent": 206, "children": [], "start_point": {"row": 84, "column": 41}, "end_point": {"row": 84, "column": 51}}, {"id": 208, "type": "identifier", "text": "glyphIdx", "parent": 206, "children": [], "start_point": {"row": 84, "column": 52}, "end_point": {"row": 84, "column": 60}}, {"id": 209, "type": "=", "text": "=", "parent": 202, "children": [], "start_point": {"row": 84, "column": 68}, "end_point": {"row": 84, "column": 69}}, {"id": 210, "type": "number_literal", "text": "0", "parent": 202, "children": [], "start_point": {"row": 84, "column": 70}, "end_point": {"row": 84, "column": 71}}, {"id": 211, "type": "declaration", "text": "virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;", "parent": 175, "children": [212, 213, 215], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 74}}, {"id": 212, "type": "type_identifier", "text": "virtual", "parent": 211, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 11}}, {"id": 213, "type": "ERROR", "text": "void", "parent": 211, "children": [214], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 16}}, {"id": 214, "type": "identifier", "text": "void", "parent": 213, "children": [], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 16}}, {"id": 215, "type": "init_declarator", "text": "renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0", "parent": 211, "children": [216, 225, 226], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 85, "column": 73}}, {"id": 216, "type": "function_declarator", "text": "renderGlyph(GlyphIndex glyphIdx, Image& image) const", "parent": 215, "children": [217, 218], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 85, "column": 69}}, {"id": 217, "type": "identifier", "text": "renderGlyph", "parent": 216, "children": [], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 85, "column": 28}}, {"id": 218, "type": "parameter_list", "text": "(GlyphIndex glyphIdx, Image& image)", "parent": 216, "children": [219, 222], "start_point": {"row": 85, "column": 28}, "end_point": {"row": 85, "column": 63}}, {"id": 219, "type": "parameter_declaration", "text": "GlyphIndex glyphIdx", "parent": 218, "children": [220, 221], "start_point": {"row": 85, "column": 29}, "end_point": {"row": 85, "column": 48}}, {"id": 220, "type": "type_identifier", "text": "GlyphIndex", "parent": 219, "children": [], "start_point": {"row": 85, "column": 29}, "end_point": {"row": 85, "column": 39}}, {"id": 221, "type": "identifier", "text": "glyphIdx", "parent": 219, "children": [], "start_point": {"row": 85, "column": 40}, "end_point": {"row": 85, "column": 48}}, {"id": 222, "type": "parameter_declaration", "text": "Image& image", "parent": 218, "children": [223, 224], "start_point": {"row": 85, "column": 50}, "end_point": {"row": 85, "column": 62}}, {"id": 223, "type": "type_identifier", "text": "Image", "parent": 222, "children": [], "start_point": {"row": 85, "column": 50}, "end_point": {"row": 85, "column": 55}}, {"id": 224, "type": "identifier", "text": "image", "parent": 222, "children": [], "start_point": {"row": 85, "column": 57}, "end_point": {"row": 85, "column": 62}}, {"id": 225, "type": "=", "text": "=", "parent": 215, "children": [], "start_point": {"row": 85, "column": 70}, "end_point": {"row": 85, "column": 71}}, {"id": 226, "type": "number_literal", "text": "0", "parent": 215, "children": [], "start_point": {"row": 85, "column": 72}, "end_point": {"row": 85, "column": 73}}, {"id": 227, "type": "ERROR", "text": "};\n\n\nclass FontRendererCreator", "parent": 175, "children": [228], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 89, "column": 25}}, {"id": 228, "type": "identifier", "text": "FontRendererCreator", "parent": 227, "children": [], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 25}}, {"id": 229, "type": "labeled_statement", "text": "public:\n static const FontRendererCreator* find(const char* name);", "parent": 175, "children": [230], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 91, "column": 61}}, {"id": 230, "type": "declaration", "text": "static const FontRendererCreator* find(const char* name);", "parent": 229, "children": [231, 232], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 61}}, {"id": 231, "type": "type_identifier", "text": "FontRendererCreator", "parent": 230, "children": [], "start_point": {"row": 91, "column": 17}, "end_point": {"row": 91, "column": 36}}, {"id": 232, "type": "pointer_declarator", "text": "* find(const char* name)", "parent": 230, "children": [233, 234], "start_point": {"row": 91, "column": 36}, "end_point": {"row": 91, "column": 60}}, {"id": 233, "type": "*", "text": "*", "parent": 232, "children": [], "start_point": {"row": 91, "column": 36}, "end_point": {"row": 91, "column": 37}}, {"id": 234, "type": "function_declarator", "text": "find(const char* name)", "parent": 232, "children": [235, 236], "start_point": {"row": 91, "column": 38}, "end_point": {"row": 91, "column": 60}}, {"id": 235, "type": "identifier", "text": "find", "parent": 234, "children": [], "start_point": {"row": 91, "column": 38}, "end_point": {"row": 91, "column": 42}}, {"id": 236, "type": "parameter_list", "text": "(const char* name)", "parent": 234, "children": [237], "start_point": {"row": 91, "column": 42}, "end_point": {"row": 91, "column": 60}}, {"id": 237, "type": "parameter_declaration", "text": "const char* name", "parent": 236, "children": [238, 239], "start_point": {"row": 91, "column": 43}, "end_point": {"row": 91, "column": 59}}, {"id": 238, "type": "primitive_type", "text": "char", "parent": 237, "children": [], "start_point": {"row": 91, "column": 49}, "end_point": {"row": 91, "column": 53}}, {"id": 239, "type": "pointer_declarator", "text": "* name", "parent": 237, "children": [240, 241], "start_point": {"row": 91, "column": 53}, "end_point": {"row": 91, "column": 59}}, {"id": 240, "type": "*", "text": "*", "parent": 239, "children": [], "start_point": {"row": 91, "column": 53}, "end_point": {"row": 91, "column": 54}}, {"id": 241, "type": "identifier", "text": "name", "parent": 239, "children": [], "start_point": {"row": 91, "column": 55}, "end_point": {"row": 91, "column": 59}}, {"id": 242, "type": "declaration", "text": "static const FontRendererCreator* getFirst();", "parent": 175, "children": [243, 244], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 49}}, {"id": 243, "type": "type_identifier", "text": "FontRendererCreator", "parent": 242, "children": [], "start_point": {"row": 93, "column": 17}, "end_point": {"row": 93, "column": 36}}, {"id": 244, "type": "pointer_declarator", "text": "* getFirst()", "parent": 242, "children": [245, 246], "start_point": {"row": 93, "column": 36}, "end_point": {"row": 93, "column": 48}}, {"id": 245, "type": "*", "text": "*", "parent": 244, "children": [], "start_point": {"row": 93, "column": 36}, "end_point": {"row": 93, "column": 37}}, {"id": 246, "type": "function_declarator", "text": "getFirst()", "parent": 244, "children": [247, 248], "start_point": {"row": 93, "column": 38}, "end_point": {"row": 93, "column": 48}}, {"id": 247, "type": "identifier", "text": "getFirst", "parent": 246, "children": [], "start_point": {"row": 93, "column": 38}, "end_point": {"row": 93, "column": 46}}, {"id": 248, "type": "parameter_list", "text": "()", "parent": 246, "children": [], "start_point": {"row": 93, "column": 46}, "end_point": {"row": 93, "column": 48}}, {"id": 249, "type": "declaration", "text": "const FontRendererCreator* getNext() const;", "parent": 175, "children": [250, 251], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 47}}, {"id": 250, "type": "type_identifier", "text": "FontRendererCreator", "parent": 249, "children": [], "start_point": {"row": 94, "column": 10}, "end_point": {"row": 94, "column": 29}}, {"id": 251, "type": "pointer_declarator", "text": "* getNext() const", "parent": 249, "children": [252, 253], "start_point": {"row": 94, "column": 29}, "end_point": {"row": 94, "column": 46}}, {"id": 252, "type": "*", "text": "*", "parent": 251, "children": [], "start_point": {"row": 94, "column": 29}, "end_point": {"row": 94, "column": 30}}, {"id": 253, "type": "function_declarator", "text": "getNext() const", "parent": 251, "children": [254, 255], "start_point": {"row": 94, "column": 31}, "end_point": {"row": 94, "column": 46}}, {"id": 254, "type": "identifier", "text": "getNext", "parent": 253, "children": [], "start_point": {"row": 94, "column": 31}, "end_point": {"row": 94, "column": 38}}, {"id": 255, "type": "parameter_list", "text": "()", "parent": 253, "children": [], "start_point": {"row": 94, "column": 38}, "end_point": {"row": 94, "column": 40}}, {"id": 256, "type": "declaration", "text": "explicit FontRendererCreator(const char* name);", "parent": 175, "children": [257, 258], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 51}}, {"id": 257, "type": "type_identifier", "text": "explicit", "parent": 256, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 12}}, {"id": 258, "type": "function_declarator", "text": "FontRendererCreator(const char* name)", "parent": 256, "children": [259, 260], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 50}}, {"id": 259, "type": "identifier", "text": "FontRendererCreator", "parent": 258, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 32}}, {"id": 260, "type": "parameter_list", "text": "(const char* name)", "parent": 258, "children": [261], "start_point": {"row": 96, "column": 32}, "end_point": {"row": 96, "column": 50}}, {"id": 261, "type": "parameter_declaration", "text": "const char* name", "parent": 260, "children": [262, 263], "start_point": {"row": 96, "column": 33}, "end_point": {"row": 96, "column": 49}}, {"id": 262, "type": "primitive_type", "text": "char", "parent": 261, "children": [], "start_point": {"row": 96, "column": 39}, "end_point": {"row": 96, "column": 43}}, {"id": 263, "type": "pointer_declarator", "text": "* name", "parent": 261, "children": [264, 265], "start_point": {"row": 96, "column": 43}, "end_point": {"row": 96, "column": 49}}, {"id": 264, "type": "*", "text": "*", "parent": 263, "children": [], "start_point": {"row": 96, "column": 43}, "end_point": {"row": 96, "column": 44}}, {"id": 265, "type": "identifier", "text": "name", "parent": 263, "children": [], "start_point": {"row": 96, "column": 45}, "end_point": {"row": 96, "column": 49}}, {"id": 266, "type": "function_definition", "text": "virtual ~FontRendererCreator() {}", "parent": 175, "children": [267, 268, 270], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 37}}, {"id": 267, "type": "type_identifier", "text": "virtual", "parent": 266, "children": [], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 11}}, {"id": 268, "type": "ERROR", "text": "~", "parent": 266, "children": [269], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 13}}, {"id": 269, "type": "~", "text": "~", "parent": 268, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 13}}, {"id": 270, "type": "function_declarator", "text": "FontRendererCreator()", "parent": 266, "children": [271, 272], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 34}}, {"id": 271, "type": "identifier", "text": "FontRendererCreator", "parent": 270, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 32}}, {"id": 272, "type": "parameter_list", "text": "()", "parent": 270, "children": [], "start_point": {"row": 97, "column": 32}, "end_point": {"row": 97, "column": 34}}, {"id": 273, "type": "declaration", "text": "const char* getName() const;", "parent": 175, "children": [274, 275], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 32}}, {"id": 274, "type": "primitive_type", "text": "char", "parent": 273, "children": [], "start_point": {"row": 99, "column": 10}, "end_point": {"row": 99, "column": 14}}, {"id": 275, "type": "pointer_declarator", "text": "* getName() const", "parent": 273, "children": [276, 277], "start_point": {"row": 99, "column": 14}, "end_point": {"row": 99, "column": 31}}, {"id": 276, "type": "*", "text": "*", "parent": 275, "children": [], "start_point": {"row": 99, "column": 14}, "end_point": {"row": 99, "column": 15}}, {"id": 277, "type": "function_declarator", "text": "getName() const", "parent": 275, "children": [278, 279], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 31}}, {"id": 278, "type": "identifier", "text": "getName", "parent": 277, "children": [], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 23}}, {"id": 279, "type": "parameter_list", "text": "()", "parent": 277, "children": [], "start_point": {"row": 99, "column": 23}, "end_point": {"row": 99, "column": 25}}, {"id": 280, "type": "declaration", "text": "virtual const char* getDescription() const = 0;", "parent": 175, "children": [281, 282, 284], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 51}}, {"id": 281, "type": "type_identifier", "text": "virtual", "parent": 280, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 11}}, {"id": 282, "type": "ERROR", "text": "char", "parent": 280, "children": [283], "start_point": {"row": 100, "column": 18}, "end_point": {"row": 100, "column": 22}}, {"id": 283, "type": "identifier", "text": "char", "parent": 282, "children": [], "start_point": {"row": 100, "column": 18}, "end_point": {"row": 100, "column": 22}}, {"id": 284, "type": "init_declarator", "text": "* getDescription() const = 0", "parent": 280, "children": [285, 290, 291], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 50}}, {"id": 285, "type": "pointer_declarator", "text": "* getDescription() const", "parent": 284, "children": [286, 287], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 46}}, {"id": 286, "type": "*", "text": "*", "parent": 285, "children": [], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 23}}, {"id": 287, "type": "function_declarator", "text": "getDescription() const", "parent": 285, "children": [288, 289], "start_point": {"row": 100, "column": 24}, "end_point": {"row": 100, "column": 46}}, {"id": 288, "type": "identifier", "text": "getDescription", "parent": 287, "children": [], "start_point": {"row": 100, "column": 24}, "end_point": {"row": 100, "column": 38}}, {"id": 289, "type": "parameter_list", "text": "()", "parent": 287, "children": [], "start_point": {"row": 100, "column": 38}, "end_point": {"row": 100, "column": 40}}, {"id": 290, "type": "=", "text": "=", "parent": 284, "children": [], "start_point": {"row": 100, "column": 47}, "end_point": {"row": 100, "column": 48}}, {"id": 291, "type": "number_literal", "text": "0", "parent": 284, "children": [], "start_point": {"row": 100, "column": 49}, "end_point": {"row": 100, "column": 50}}, {"id": 292, "type": "declaration", "text": "virtual FontRenderer* create(const FontRendererArgs& args) const = 0;", "parent": 175, "children": [293, 294, 296], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 73}}, {"id": 293, "type": "type_identifier", "text": "virtual", "parent": 292, "children": [], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 11}}, {"id": 294, "type": "ERROR", "text": "FontRenderer", "parent": 292, "children": [295], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 24}}, {"id": 295, "type": "identifier", "text": "FontRenderer", "parent": 294, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 24}}, {"id": 296, "type": "init_declarator", "text": "* create(const FontRendererArgs& args) const = 0", "parent": 292, "children": [297, 305, 306], "start_point": {"row": 102, "column": 24}, "end_point": {"row": 102, "column": 72}}, {"id": 297, "type": "pointer_declarator", "text": "* create(const FontRendererArgs& args) const", "parent": 296, "children": [298, 299], "start_point": {"row": 102, "column": 24}, "end_point": {"row": 102, "column": 68}}, {"id": 298, "type": "*", "text": "*", "parent": 297, "children": [], "start_point": {"row": 102, "column": 24}, "end_point": {"row": 102, "column": 25}}, {"id": 299, "type": "function_declarator", "text": "create(const FontRendererArgs& args) const", "parent": 297, "children": [300, 301], "start_point": {"row": 102, "column": 26}, "end_point": {"row": 102, "column": 68}}, {"id": 300, "type": "identifier", "text": "create", "parent": 299, "children": [], "start_point": {"row": 102, "column": 26}, "end_point": {"row": 102, "column": 32}}, {"id": 301, "type": "parameter_list", "text": "(const FontRendererArgs& args)", "parent": 299, "children": [302], "start_point": {"row": 102, "column": 32}, "end_point": {"row": 102, "column": 62}}, {"id": 302, "type": "parameter_declaration", "text": "const FontRendererArgs& args", "parent": 301, "children": [303, 304], "start_point": {"row": 102, "column": 33}, "end_point": {"row": 102, "column": 61}}, {"id": 303, "type": "type_identifier", "text": "FontRendererArgs", "parent": 302, "children": [], "start_point": {"row": 102, "column": 39}, "end_point": {"row": 102, "column": 55}}, {"id": 304, "type": "identifier", "text": "args", "parent": 302, "children": [], "start_point": {"row": 102, "column": 57}, "end_point": {"row": 102, "column": 61}}, {"id": 305, "type": "=", "text": "=", "parent": 296, "children": [], "start_point": {"row": 102, "column": 69}, "end_point": {"row": 102, "column": 70}}, {"id": 306, "type": "number_literal", "text": "0", "parent": 296, "children": [], "start_point": {"row": 102, "column": 71}, "end_point": {"row": 102, "column": 72}}, {"id": 307, "type": "labeled_statement", "text": "private:\n static FontRendererCreator* list;", "parent": 175, "children": [308], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 104, "column": 37}}, {"id": 308, "type": "declaration", "text": "static FontRendererCreator* list;", "parent": 307, "children": [309, 310], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 37}}, {"id": 309, "type": "type_identifier", "text": "FontRendererCreator", "parent": 308, "children": [], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 30}}, {"id": 310, "type": "pointer_declarator", "text": "* list", "parent": 308, "children": [311, 312], "start_point": {"row": 104, "column": 30}, "end_point": {"row": 104, "column": 36}}, {"id": 311, "type": "*", "text": "*", "parent": 310, "children": [], "start_point": {"row": 104, "column": 30}, "end_point": {"row": 104, "column": 31}}, {"id": 312, "type": "identifier", "text": "list", "parent": 310, "children": [], "start_point": {"row": 104, "column": 32}, "end_point": {"row": 104, "column": 36}}, {"id": 313, "type": "declaration", "text": "const char* name;", "parent": 175, "children": [314, 315], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 21}}, {"id": 314, "type": "primitive_type", "text": "char", "parent": 313, "children": [], "start_point": {"row": 106, "column": 10}, "end_point": {"row": 106, "column": 14}}, {"id": 315, "type": "pointer_declarator", "text": "* name", "parent": 313, "children": [316, 317], "start_point": {"row": 106, "column": 14}, "end_point": {"row": 106, "column": 20}}, {"id": 316, "type": "*", "text": "*", "parent": 315, "children": [], "start_point": {"row": 106, "column": 14}, "end_point": {"row": 106, "column": 15}}, {"id": 317, "type": "identifier", "text": "name", "parent": 315, "children": [], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 106, "column": 20}}, {"id": 318, "type": "declaration", "text": "FontRendererCreator* next;", "parent": 175, "children": [319, 320], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 30}}, {"id": 319, "type": "type_identifier", "text": "FontRendererCreator", "parent": 318, "children": [], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 23}}, {"id": 320, "type": "pointer_declarator", "text": "* next", "parent": 318, "children": [321, 322], "start_point": {"row": 107, "column": 23}, "end_point": {"row": 107, "column": 29}}, {"id": 321, "type": "*", "text": "*", "parent": 320, "children": [], "start_point": {"row": 107, "column": 23}, "end_point": {"row": 107, "column": 24}}, {"id": 322, "type": "identifier", "text": "next", "parent": 320, "children": [], "start_point": {"row": 107, "column": 25}, "end_point": {"row": 107, "column": 29}}]}, "node_categories": {"declarations": {"functions": [21, 91, 96, 108, 125, 129, 175, 179, 190, 203, 216, 234, 246, 253, 258, 266, 270, 277, 287, 299], "variables": [27, 41, 50, 53, 56, 59, 70, 73, 76, 82, 85, 88, 94, 99, 104, 111, 116, 132, 182, 193, 198, 206, 211, 219, 222, 230, 237, 242, 249, 256, 261, 273, 280, 292, 302, 308, 313, 318], "classes": [38, 39, 67, 68, 79, 80], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": [32, 33]}, "statements": {"expressions": [35, 120, 141, 147, 151, 155, 158, 163, 169, 170], "assignments": [119, 143, 146, 154, 165, 168], "loops": [], "conditionals": [19, 20, 22, 24, 25, 28, 29, 31, 34, 36, 37, 40, 43, 47, 49, 52, 55, 57, 58, 60, 62, 65, 66, 69, 71, 72, 74, 75, 78, 81, 84, 87, 90, 92, 97, 103, 105, 109, 115, 117, 118, 121, 124, 126, 130, 133, 134, 136, 138, 142, 144, 150, 152, 156, 159, 161, 164, 166, 171, 173, 176, 178, 180, 186, 188, 191, 195, 199, 201, 204, 207, 208, 212, 214, 217, 220, 221, 223, 224, 228, 231, 235, 241, 243, 247, 250, 254, 257, 259, 265, 267, 271, 278, 281, 283, 288, 293, 295, 300, 303, 304, 309, 312, 317, 319, 322], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17, 185, 197, 210, 226, 291, 306], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "FontRendererError", "text_snippet": "class FontRendererError : public std::runtime_error {\npublic:\n using runtime_error::runtime_error"}, {"node_id": 91, "universal_type": "function", "name": "FontRenderer", "text_snippet": "class FontRenderer {\npublic:\n static bool exists(const char* name);\n static FontRenderer* crea"}, {"node_id": 96, "universal_type": "function", "name": "unknown", "text_snippet": "exists(const char* name)"}, {"node_id": 108, "universal_type": "function", "name": "unknown", "text_snippet": "create(\n const char* name, const FontRendererArgs& args)"}, {"node_id": 125, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~FontRenderer() {}"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "FontRenderer()"}, {"node_id": 175, "universal_type": "function", "name": "renderGlyph", "text_snippet": "virtual FontMetrics getFontMetrics() const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) c"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "getFontMetrics()"}, {"node_id": 190, "universal_type": "function", "name": "unknown", "text_snippet": "getGlyphIndex(char32_t cp) const"}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "getGlyphMetrics(GlyphIndex glyphIdx) const"}, {"node_id": 216, "universal_type": "function", "name": "unknown", "text_snippet": "renderGlyph(GlyphIndex glyphIdx, Image& image) const"}, {"node_id": 234, "universal_type": "function", "name": "unknown", "text_snippet": "find(const char* name)"}, {"node_id": 246, "universal_type": "function", "name": "unknown", "text_snippet": "getFirst()"}, {"node_id": 253, "universal_type": "function", "name": "unknown", "text_snippet": "getNext() const"}, {"node_id": 258, "universal_type": "function", "name": "unknown", "text_snippet": "FontRendererCreator(const char* name)"}, {"node_id": 266, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~FontRendererCreator() {}"}, {"node_id": 270, "universal_type": "function", "name": "unknown", "text_snippet": "FontRendererCreator()"}, {"node_id": 277, "universal_type": "function", "name": "unknown", "text_snippet": "getName() const"}, {"node_id": 287, "universal_type": "function", "name": "unknown", "text_snippet": "getDescription() const"}, {"node_id": 299, "universal_type": "function", "name": "unknown", "text_snippet": "create(const FontRendererArgs& args) const"}], "class_declarations": [{"node_id": 38, "universal_type": "class", "name": "FontRendererArgs", "text_snippet": "struct FontRendererArgs {\n const std::uint8_t* data;\n std::size_t dataSize;\n int pxSize;\n "}, {"node_id": 39, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 67, "universal_type": "class", "name": "GlyphMetrics", "text_snippet": "struct GlyphMetrics {\n /**\n * Size of the glyph's bitmap.\n */\n Size size;\n\n /**\n "}, {"node_id": 68, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 79, "universal_type": "class", "name": "FontMetrics", "text_snippet": "struct FontMetrics {\n int ascender;\n int descender;\n int lineHeight;\n}"}, {"node_id": 80, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include <cstddef>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <cstdint>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdexcept>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"image.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"geometry.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "\n#pragma once\n\n#include <cstddef>\n#include <cstdint>\n#include <stdexcept>\n\n#include \"image.h\"\n#include \"geometry.h\"\n\n\nnamespace dpfb {\n\n\nclass FontRendererError : public std::runtime_error {\npublic:\n using runtime_error::runtime_error;\n};\n\n\nenum class Hinting {\n normal,\n light\n};\n\n\nstruct FontRendererArgs {\n const std::uint8_t* data;\n std::size_t dataSize;\n int pxSize;\n Hinting hinting;\n};\n\n\nusing GlyphIndex = std::uint_least32_t;\n\n\nstruct GlyphMetrics {\n /**\n * Size of the glyph's bitmap.\n */\n Size size;\n\n /**\n * Offset from the origin.\n *\n * This is the offset of the bottom left corner of the bitmap\n * from the origin on the baseline. Like in FreeType, the y\n * coordinate increases up.\n */\n Point offset;\n\n /**\n * X advance.\n */\n int advance;\n};\n\n\nstruct FontMetrics {\n int ascender;\n int descender;\n int lineHeight;\n};\n\n\nclass FontRenderer {\npublic:\n static bool exists(const char* name);\n static FontRenderer* create(\n const char* name, const FontRendererArgs& args);\n\n FontRenderer() = default;\n virtual ~FontRenderer() {};\n\n FontRenderer(const FontRenderer& other) = delete;\n FontRenderer& operator=(const FontRenderer& other) = delete;\n\n FontRenderer(FontRenderer&& other) = delete;\n FontRenderer& operator=(FontRenderer&& other) = delete;\n\n virtual FontMetrics getFontMetrics() const = 0;\n\n virtual GlyphIndex getGlyphIndex(char32_t cp) const = 0;\n virtual GlyphMetrics getGlyphMetrics(GlyphIndex glyphIdx) const = 0;\n virtual void renderGlyph(GlyphIndex glyphIdx, Image& image) const = 0;\n};\n\n\nclass FontRendererCreator {\npublic:\n static const FontRendererCreator* find(const char* name);\n\n static const FontRendererCreator* getFirst();\n const FontRendererCreator* getNext() const;\n\n explicit FontRendererCreator(const char* name);\n virtual ~FontRendererCreator() {};\n\n const char* getName() const;\n virtual const char* getDescription() const = 0;\n\n virtual FontRenderer* create(const FontRendererArgs& args) const = 0;\nprivate:\n static FontRendererCreator* list;\n\n const char* name;\n FontRendererCreator* next;\n};\n\n\n}\n"}
80,947
c
/* BEGIN_TEST_DATA f: main ret: int args: int input: 12 output: 9 error: "" filename: "struct/basic_copy" END_TEST_DATA */ struct X { float d = 12.0f; int x = 9; double f = 16.0; }; X x; void change(X obj) { obj.x = 5; } int main(int input) { change(x); return x.x; }
9.27
30
(translation_unit) "/*\nBEGIN_TEST_DATA\n f: main\n ret: int\n args: int\n input: 12\n output: 9\n error: ""\n filename: "struct/basic_copy"\nEND_TEST_DATA\n*/\n\nstruct X\n{\n \n float d = 12.0f;\n int x = 9;\n double f = 16.0;\n};\n\nX x;\n\n\nvoid change(X obj)\n{\n obj.x = 5;\n}\n\nint main(int input)\n{\n change(x);\n \n return x.x;\n}\n\n" (comment) "/*\nBEGIN_TEST_DATA\n f: main\n ret: int\n args: int\n input: 12\n output: 9\n error: ""\n filename: "struct/basic_copy"\nEND_TEST_DATA\n*/" (struct_specifier) "struct X\n{\n \n float d = 12.0f;\n int x = 9;\n double f = 16.0;\n}" (struct) "struct" (type_identifier) "X" (field_declaration_list) "{\n \n float d = 12.0f;\n int x = 9;\n double f = 16.0;\n}" ({) "{" (field_declaration) "float d = 12.0f;" (primitive_type) "float" (field_identifier) "d" (ERROR) "= 12.0f" (=) "=" (number_literal) "12.0f" (;) ";" (field_declaration) "int x = 9;" (primitive_type) "int" (field_identifier) "x" (ERROR) "= 9" (=) "=" (number_literal) "9" (;) ";" (field_declaration) "double f = 16.0;" (primitive_type) "double" (field_identifier) "f" (ERROR) "= 16.0" (=) "=" (number_literal) "16.0" (;) ";" (}) "}" (;) ";" (declaration) "X x;" (type_identifier) "X" (identifier) "x" (;) ";" (function_definition) "void change(X obj)\n{\n obj.x = 5;\n}" (primitive_type) "void" (function_declarator) "change(X obj)" (identifier) "change" (parameter_list) "(X obj)" (() "(" (parameter_declaration) "X obj" (type_identifier) "X" (identifier) "obj" ()) ")" (compound_statement) "{\n obj.x = 5;\n}" ({) "{" (expression_statement) "obj.x = 5;" (assignment_expression) "obj.x = 5" (field_expression) "obj.x" (identifier) "obj" (.) "." (field_identifier) "x" (=) "=" (number_literal) "5" (;) ";" (}) "}" (function_definition) "int main(int input)\n{\n change(x);\n \n return x.x;\n}" (primitive_type) "int" (function_declarator) "main(int input)" (identifier) "main" (parameter_list) "(int input)" (() "(" (parameter_declaration) "int input" (primitive_type) "int" (identifier) "input" ()) ")" (compound_statement) "{\n change(x);\n \n return x.x;\n}" ({) "{" (expression_statement) "change(x);" (call_expression) "change(x)" (identifier) "change" (argument_list) "(x)" (() "(" (identifier) "x" ()) ")" (;) ";" (return_statement) "return x.x;" (return) "return" (field_expression) "x.x" (identifier) "x" (.) "." (field_identifier) "x" (;) ";" (}) "}"
84
3
{"language": "c", "success": true, "metadata": {"lines": 30, "avg_line_length": 9.27, "nodes": 54, "errors": 0, "source_hash": "b62eed196da65edbc66592f0f8e076b3475ef64c71cd07b8555630fd7385c0b0", "categorized_nodes": 38}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "struct_specifier", "text": "struct X\n{\n \n float d = 12.0f;\n int x = 9;\n double f = 16.0;\n}", "parent": null, "children": [1, 2], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 1, "type": "struct", "text": "struct", "parent": 0, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}, {"id": 2, "type": "type_identifier", "text": "X", "parent": 0, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 8}}, {"id": 3, "type": "field_declaration", "text": "float d = 12.0f;", "parent": 0, "children": [4, 5, 6], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 20}}, {"id": 4, "type": "primitive_type", "text": "float", "parent": 3, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 9}}, {"id": 5, "type": "field_identifier", "text": "d", "parent": 3, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 11}}, {"id": 6, "type": "ERROR", "text": "= 12.0f", "parent": 3, "children": [7, 8], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 19}}, {"id": 7, "type": "=", "text": "=", "parent": 6, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 13}}, {"id": 8, "type": "number_literal", "text": "12.0f", "parent": 6, "children": [], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 19}}, {"id": 9, "type": "field_declaration", "text": "int x = 9;", "parent": 0, "children": [10, 11, 12], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 14}}, {"id": 10, "type": "primitive_type", "text": "int", "parent": 9, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 7}}, {"id": 11, "type": "field_identifier", "text": "x", "parent": 9, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 9}}, {"id": 12, "type": "ERROR", "text": "= 9", "parent": 9, "children": [13, 14], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 13}}, {"id": 13, "type": "=", "text": "=", "parent": 12, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 11}}, {"id": 14, "type": "number_literal", "text": "9", "parent": 12, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 15, "type": "field_declaration", "text": "double f = 16.0;", "parent": 0, "children": [16, 17, 18], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 20}}, {"id": 16, "type": "primitive_type", "text": "double", "parent": 15, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 10}}, {"id": 17, "type": "field_identifier", "text": "f", "parent": 15, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 12}}, {"id": 18, "type": "ERROR", "text": "= 16.0", "parent": 15, "children": [19, 20], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 19}}, {"id": 19, "type": "=", "text": "=", "parent": 18, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 14}}, {"id": 20, "type": "number_literal", "text": "16.0", "parent": 18, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 19}}, {"id": 21, "type": "declaration", "text": "X x;", "parent": null, "children": [22, 23], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 4}}, {"id": 22, "type": "type_identifier", "text": "X", "parent": 21, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 23, "type": "identifier", "text": "x", "parent": 21, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 3}}, {"id": 24, "type": "function_definition", "text": "void change(X obj)\n{\n obj.x = 5;\n}", "parent": null, "children": [25, 26], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 25, "type": "primitive_type", "text": "void", "parent": 24, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 4}}, {"id": 26, "type": "function_declarator", "text": "change(X obj)", "parent": 24, "children": [27, 28], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 18}}, {"id": 27, "type": "identifier", "text": "change", "parent": 26, "children": [], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 11}}, {"id": 28, "type": "parameter_list", "text": "(X obj)", "parent": 26, "children": [29], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 18}}, {"id": 29, "type": "parameter_declaration", "text": "X obj", "parent": 28, "children": [30, 31], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 17}}, {"id": 30, "type": "type_identifier", "text": "X", "parent": 29, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 13}}, {"id": 31, "type": "identifier", "text": "obj", "parent": 29, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 17}}, {"id": 32, "type": "assignment_expression", "text": "obj.x = 5", "parent": 24, "children": [33, 36, 37], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 13}}, {"id": 33, "type": "field_expression", "text": "obj.x", "parent": 32, "children": [34, 35], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 9}}, {"id": 34, "type": "identifier", "text": "obj", "parent": 33, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 7}}, {"id": 35, "type": "field_identifier", "text": "x", "parent": 33, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 9}}, {"id": 36, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 11}}, {"id": 37, "type": "number_literal", "text": "5", "parent": 32, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 13}}, {"id": 38, "type": "function_definition", "text": "int main(int input)\n{\n\tchange(x);\n\t\n\treturn x.x;\n}", "parent": null, "children": [39, 40], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 39, "type": "primitive_type", "text": "int", "parent": 38, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 3}}, {"id": 40, "type": "function_declarator", "text": "main(int input)", "parent": 38, "children": [41, 42], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 19}}, {"id": 41, "type": "identifier", "text": "main", "parent": 40, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 8}}, {"id": 42, "type": "parameter_list", "text": "(int input)", "parent": 40, "children": [43], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 19}}, {"id": 43, "type": "parameter_declaration", "text": "int input", "parent": 42, "children": [44, 45], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 18}}, {"id": 44, "type": "primitive_type", "text": "int", "parent": 43, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 12}}, {"id": 45, "type": "identifier", "text": "input", "parent": 43, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 18}}, {"id": 46, "type": "call_expression", "text": "change(x)", "parent": 38, "children": [47, 48], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 10}}, {"id": 47, "type": "identifier", "text": "change", "parent": 46, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 7}}, {"id": 48, "type": "argument_list", "text": "(x)", "parent": 46, "children": [49], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 10}}, {"id": 49, "type": "identifier", "text": "x", "parent": 48, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 9}}, {"id": 50, "type": "return_statement", "text": "return x.x;", "parent": 38, "children": [51], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 12}}, {"id": 51, "type": "field_expression", "text": "x.x", "parent": 50, "children": [52, 53], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 11}}, {"id": 52, "type": "identifier", "text": "x", "parent": 51, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 9}}, {"id": 53, "type": "field_identifier", "text": "x", "parent": 51, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 11}}]}, "node_categories": {"declarations": {"functions": [24, 26, 38, 40], "variables": [3, 9, 15, 21, 29, 43], "classes": [0, 1], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [33, 46, 51], "assignments": [32], "loops": [], "conditionals": [2, 5, 11, 17, 22, 23, 27, 30, 31, 34, 35, 41, 45, 47, 49, 52, 53], "returns": [50], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 14, 20, 37], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 24, "universal_type": "function", "name": "change", "text_snippet": "void change(X obj)\n{\n obj.x = 5;\n}"}, {"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "change(X obj)"}, {"node_id": 38, "universal_type": "function", "name": "main", "text_snippet": "int main(int input)\n{\n\tchange(x);\n\t\n\treturn x.x;\n}"}, {"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "main(int input)"}], "class_declarations": [{"node_id": 0, "universal_type": "class", "name": "X", "text_snippet": "struct X\n{\n \n float d = 12.0f;\n int x = 9;\n double f = 16.0;\n}"}, {"node_id": 1, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "/*\nBEGIN_TEST_DATA\n f: main\n ret: int\n args: int\n input: 12\n output: 9\n error: \"\"\n filename: \"struct/basic_copy\"\nEND_TEST_DATA\n*/\n\nstruct X\n{\n \n float d = 12.0f;\n int x = 9;\n double f = 16.0;\n};\n\nX x;\n\n\nvoid change(X obj)\n{\n obj.x = 5;\n}\n\nint main(int input)\n{\n\tchange(x);\n\t\n\treturn x.x;\n}\n\n"}
80,948
c
/* $OpenBSD: exec_aout.c,v 1.2 2006/05/20 22:40:46 miod Exp $ */ /*- * Copyright (c) 1982, 1986, 1990, 1993 * The Regents of the University of California. 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 University 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 REGENTS 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 REGENTS 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. * * @(#)boot.c 8.1 (Berkeley) 6/10/93 */ #include <sys/param.h> #include <sys/reboot.h> #include <machine/prom.h> #include <a.out.h> #include "stand.h" #include "libsa.h" #define SYM_MAGIC 0x6274ef2e /*ARGSUSED*/ void exec_aout(char *file, const char *args, int bootdev, int bootunit, int bootpart) { char *loadaddr; int io; struct exec x; int cc, magic; void (*entry)(); char *cp; int *ip; io = open(file, 0); if (io < 0) return; /* * Read in the exec header, and validate it. */ if (read(io, (char *)&x, sizeof(x)) != sizeof(x)) goto shread; if (N_BADMAG(x)) { errno = EFTYPE; goto closeout; } /* * note: on the mvme ports, the kernel is linked in such a way that * its entry point is the first item in .text, and thus a_entry can * be used to determine both the load address and the entry point. * (also note that we make use of the fact that the kernel will live * in a VA == PA range of memory ... otherwise we would take * loadaddr as a parameter and let the kernel relocate itself!) * * note that ZMAGIC files included the a.out header in the text area * so we must mask that off (has no effect on the other formats) */ loadaddr = (void *)(x.a_entry & ~sizeof(x)); cp = loadaddr; magic = N_GETMAGIC(x); if (magic == ZMAGIC) cp += sizeof(x); entry = (void (*)())cp; /* * Read in the text segment. */ printf("%d", x.a_text); cc = x.a_text; if (magic == ZMAGIC) cc = cc - sizeof(x); /* a.out header part of text in zmagic */ if (read(io, cp, cc) != cc) goto shread; cp += cc; /* * NMAGIC may have a gap between text and data. */ if (magic == NMAGIC) { register int mask = N_PAGSIZ(x) - 1; while ((int)cp & mask) *cp++ = 0; } /* * Read in the data segment. */ printf("+%d", x.a_data); if (read(io, cp, x.a_data) != x.a_data) goto shread; cp += x.a_data; /* * Zero out the BSS section. */ printf("+%d", x.a_bss); cc = x.a_bss; while ((int)cp & 3) { *cp++ = 0; --cc; } ip = (int *)cp; cp += cc; while ((char *)ip < cp) *ip++ = 0; /* * Read in the symbol table and strings. * (Always set the symtab size word.) */ *ip++ = x.a_syms; cp = (char *) ip; if (x.a_syms > 0) { /* Symbol table and string table length word. */ cc = x.a_syms; printf("+[%d", cc); cc += sizeof(int); /* strtab length too */ if (read(io, cp, cc) != cc) goto shread; cp += x.a_syms; ip = (int *)cp; /* points to strtab length */ cp += sizeof(int); /* String table. Length word includes itself. */ cc = *ip; printf("+%d]", cc); cc -= sizeof(int); if (cc <= 0) goto shread; if (read(io, cp, cc) != cc) goto shread; cp += cc; } printf("=0x%lx\n", cp - loadaddr); close(io); (*entry)(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp); printf("exec: kernel returned!\n"); return; shread: printf("exec: short read\n"); errno = EIO; closeout: close(io); return; }
28.71
154
(translation_unit) "/* $OpenBSD: exec_aout.c,v 1.2 2006/05/20 22:40:46 miod Exp $ */\n\n/*-\n * Copyright (c) 1982, 1986, 1990, 1993\n * The Regents of the University of California. 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\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 * 3. Neither the name of the University nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * 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 REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * @(#)boot.c 8.1 (Berkeley) 6/10/93\n */\n\n#include <sys/param.h>\n#include <sys/reboot.h>\n#include <machine/prom.h>\n#include <a.out.h>\n\n#include "stand.h"\n#include "libsa.h"\n\n#define SYM_MAGIC 0x6274ef2e\n\n/*ARGSUSED*/\nvoid\nexec_aout(char *file, const char *args, int bootdev, int bootunit, int bootpart)\n{\n char *loadaddr;\n int io;\n struct exec x;\n int cc, magic;\n void (*entry)();\n char *cp;\n int *ip;\n\n io = open(file, 0);\n if (io < 0)\n return;\n\n /*\n * Read in the exec header, and validate it.\n */\n if (read(io, (char *)&x, sizeof(x)) != sizeof(x))\n goto shread;\n\n if (N_BADMAG(x)) {\n errno = EFTYPE;\n goto closeout;\n }\n\n /*\n * note: on the mvme ports, the kernel is linked in such a way that \n * its entry point is the first item in .text, and thus a_entry can \n * be used to determine both the load address and the entry point.\n * (also note that we make use of the fact that the kernel will live\n * in a VA == PA range of memory ... otherwise we would take \n * loadaddr as a parameter and let the kernel relocate itself!)\n *\n * note that ZMAGIC files included the a.out header in the text area\n * so we must mask that off (has no effect on the other formats)\n */\n loadaddr = (void *)(x.a_entry & ~sizeof(x));\n\n cp = loadaddr;\n magic = N_GETMAGIC(x);\n if (magic == ZMAGIC)\n cp += sizeof(x);\n entry = (void (*)())cp;\n\n /*\n * Read in the text segment.\n */\n printf("%d", x.a_text);\n cc = x.a_text;\n if (magic == ZMAGIC)\n cc = cc - sizeof(x); /* a.out header part of text in zmagic */\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += cc;\n\n /*\n * NMAGIC may have a gap between text and data.\n */\n if (magic == NMAGIC) {\n register int mask = N_PAGSIZ(x) - 1;\n while ((int)cp & mask)\n *cp++ = 0;\n }\n\n /*\n * Read in the data segment.\n */\n printf("+%d", x.a_data);\n if (read(io, cp, x.a_data) != x.a_data)\n goto shread;\n cp += x.a_data;\n\n /*\n * Zero out the BSS section.\n */\n printf("+%d", x.a_bss);\n cc = x.a_bss;\n while ((int)cp & 3) {\n *cp++ = 0;\n --cc;\n }\n ip = (int *)cp;\n cp += cc;\n while ((char *)ip < cp)\n *ip++ = 0;\n\n /*\n * Read in the symbol table and strings.\n * (Always set the symtab size word.)\n */\n *ip++ = x.a_syms;\n cp = (char *) ip;\n\n if (x.a_syms > 0) {\n /* Symbol table and string table length word. */\n cc = x.a_syms;\n printf("+[%d", cc);\n cc += sizeof(int); /* strtab length too */\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += x.a_syms;\n ip = (int *)cp; /* points to strtab length */\n cp += sizeof(int);\n\n /* String table. Length word includes itself. */\n cc = *ip;\n printf("+%d]", cc);\n cc -= sizeof(int);\n if (cc <= 0)\n goto shread;\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += cc;\n }\n printf("=0x%lx\n", cp - loadaddr);\n close(io);\n\n (*entry)(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp);\n\n printf("exec: kernel returned!\n");\n return;\n\nshread:\n printf("exec: short read\n");\n errno = EIO;\ncloseout:\n close(io);\n return;\n}\n" (comment) "/* $OpenBSD: exec_aout.c,v 1.2 2006/05/20 22:40:46 miod Exp $ */" (comment) "/*-\n * Copyright (c) 1982, 1986, 1990, 1993\n * The Regents of the University of California. 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\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 * 3. Neither the name of the University nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * 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 REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * @(#)boot.c 8.1 (Berkeley) 6/10/93\n */" (preproc_include) "#include <sys/param.h>\n" (#include) "#include" (system_lib_string) "<sys/param.h>" (preproc_include) "#include <sys/reboot.h>\n" (#include) "#include" (system_lib_string) "<sys/reboot.h>" (preproc_include) "#include <machine/prom.h>\n" (#include) "#include" (system_lib_string) "<machine/prom.h>" (preproc_include) "#include <a.out.h>\n" (#include) "#include" (system_lib_string) "<a.out.h>" (preproc_include) "#include "stand.h"\n" (#include) "#include" (string_literal) ""stand.h"" (") """ (string_content) "stand.h" (") """ (preproc_include) "#include "libsa.h"\n" (#include) "#include" (string_literal) ""libsa.h"" (") """ (string_content) "libsa.h" (") """ (preproc_def) "#define SYM_MAGIC 0x6274ef2e\n" (#define) "#define" (identifier) "SYM_MAGIC" (preproc_arg) "0x6274ef2e" (comment) "/*ARGSUSED*/" (function_definition) "void\nexec_aout(char *file, const char *args, int bootdev, int bootunit, int bootpart)\n{\n char *loadaddr;\n int io;\n struct exec x;\n int cc, magic;\n void (*entry)();\n char *cp;\n int *ip;\n\n io = open(file, 0);\n if (io < 0)\n return;\n\n /*\n * Read in the exec header, and validate it.\n */\n if (read(io, (char *)&x, sizeof(x)) != sizeof(x))\n goto shread;\n\n if (N_BADMAG(x)) {\n errno = EFTYPE;\n goto closeout;\n }\n\n /*\n * note: on the mvme ports, the kernel is linked in such a way that \n * its entry point is the first item in .text, and thus a_entry can \n * be used to determine both the load address and the entry point.\n * (also note that we make use of the fact that the kernel will live\n * in a VA == PA range of memory ... otherwise we would take \n * loadaddr as a parameter and let the kernel relocate itself!)\n *\n * note that ZMAGIC files included the a.out header in the text area\n * so we must mask that off (has no effect on the other formats)\n */\n loadaddr = (void *)(x.a_entry & ~sizeof(x));\n\n cp = loadaddr;\n magic = N_GETMAGIC(x);\n if (magic == ZMAGIC)\n cp += sizeof(x);\n entry = (void (*)())cp;\n\n /*\n * Read in the text segment.\n */\n printf("%d", x.a_text);\n cc = x.a_text;\n if (magic == ZMAGIC)\n cc = cc - sizeof(x); /* a.out header part of text in zmagic */\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += cc;\n\n /*\n * NMAGIC may have a gap between text and data.\n */\n if (magic == NMAGIC) {\n register int mask = N_PAGSIZ(x) - 1;\n while ((int)cp & mask)\n *cp++ = 0;\n }\n\n /*\n * Read in the data segment.\n */\n printf("+%d", x.a_data);\n if (read(io, cp, x.a_data) != x.a_data)\n goto shread;\n cp += x.a_data;\n\n /*\n * Zero out the BSS section.\n */\n printf("+%d", x.a_bss);\n cc = x.a_bss;\n while ((int)cp & 3) {\n *cp++ = 0;\n --cc;\n }\n ip = (int *)cp;\n cp += cc;\n while ((char *)ip < cp)\n *ip++ = 0;\n\n /*\n * Read in the symbol table and strings.\n * (Always set the symtab size word.)\n */\n *ip++ = x.a_syms;\n cp = (char *) ip;\n\n if (x.a_syms > 0) {\n /* Symbol table and string table length word. */\n cc = x.a_syms;\n printf("+[%d", cc);\n cc += sizeof(int); /* strtab length too */\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += x.a_syms;\n ip = (int *)cp; /* points to strtab length */\n cp += sizeof(int);\n\n /* String table. Length word includes itself. */\n cc = *ip;\n printf("+%d]", cc);\n cc -= sizeof(int);\n if (cc <= 0)\n goto shread;\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += cc;\n }\n printf("=0x%lx\n", cp - loadaddr);\n close(io);\n\n (*entry)(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp);\n\n printf("exec: kernel returned!\n");\n return;\n\nshread:\n printf("exec: short read\n");\n errno = EIO;\ncloseout:\n close(io);\n return;\n}" (primitive_type) "void" (function_declarator) "exec_aout(char *file, const char *args, int bootdev, int bootunit, int bootpart)" (identifier) "exec_aout" (parameter_list) "(char *file, const char *args, int bootdev, int bootunit, int bootpart)" (() "(" (parameter_declaration) "char *file" (primitive_type) "char" (pointer_declarator) "*file" (*) "*" (identifier) "file" (,) "," (parameter_declaration) "const char *args" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*args" (*) "*" (identifier) "args" (,) "," (parameter_declaration) "int bootdev" (primitive_type) "int" (identifier) "bootdev" (,) "," (parameter_declaration) "int bootunit" (primitive_type) "int" (identifier) "bootunit" (,) "," (parameter_declaration) "int bootpart" (primitive_type) "int" (identifier) "bootpart" ()) ")" (compound_statement) "{\n char *loadaddr;\n int io;\n struct exec x;\n int cc, magic;\n void (*entry)();\n char *cp;\n int *ip;\n\n io = open(file, 0);\n if (io < 0)\n return;\n\n /*\n * Read in the exec header, and validate it.\n */\n if (read(io, (char *)&x, sizeof(x)) != sizeof(x))\n goto shread;\n\n if (N_BADMAG(x)) {\n errno = EFTYPE;\n goto closeout;\n }\n\n /*\n * note: on the mvme ports, the kernel is linked in such a way that \n * its entry point is the first item in .text, and thus a_entry can \n * be used to determine both the load address and the entry point.\n * (also note that we make use of the fact that the kernel will live\n * in a VA == PA range of memory ... otherwise we would take \n * loadaddr as a parameter and let the kernel relocate itself!)\n *\n * note that ZMAGIC files included the a.out header in the text area\n * so we must mask that off (has no effect on the other formats)\n */\n loadaddr = (void *)(x.a_entry & ~sizeof(x));\n\n cp = loadaddr;\n magic = N_GETMAGIC(x);\n if (magic == ZMAGIC)\n cp += sizeof(x);\n entry = (void (*)())cp;\n\n /*\n * Read in the text segment.\n */\n printf("%d", x.a_text);\n cc = x.a_text;\n if (magic == ZMAGIC)\n cc = cc - sizeof(x); /* a.out header part of text in zmagic */\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += cc;\n\n /*\n * NMAGIC may have a gap between text and data.\n */\n if (magic == NMAGIC) {\n register int mask = N_PAGSIZ(x) - 1;\n while ((int)cp & mask)\n *cp++ = 0;\n }\n\n /*\n * Read in the data segment.\n */\n printf("+%d", x.a_data);\n if (read(io, cp, x.a_data) != x.a_data)\n goto shread;\n cp += x.a_data;\n\n /*\n * Zero out the BSS section.\n */\n printf("+%d", x.a_bss);\n cc = x.a_bss;\n while ((int)cp & 3) {\n *cp++ = 0;\n --cc;\n }\n ip = (int *)cp;\n cp += cc;\n while ((char *)ip < cp)\n *ip++ = 0;\n\n /*\n * Read in the symbol table and strings.\n * (Always set the symtab size word.)\n */\n *ip++ = x.a_syms;\n cp = (char *) ip;\n\n if (x.a_syms > 0) {\n /* Symbol table and string table length word. */\n cc = x.a_syms;\n printf("+[%d", cc);\n cc += sizeof(int); /* strtab length too */\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += x.a_syms;\n ip = (int *)cp; /* points to strtab length */\n cp += sizeof(int);\n\n /* String table. Length word includes itself. */\n cc = *ip;\n printf("+%d]", cc);\n cc -= sizeof(int);\n if (cc <= 0)\n goto shread;\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += cc;\n }\n printf("=0x%lx\n", cp - loadaddr);\n close(io);\n\n (*entry)(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp);\n\n printf("exec: kernel returned!\n");\n return;\n\nshread:\n printf("exec: short read\n");\n errno = EIO;\ncloseout:\n close(io);\n return;\n}" ({) "{" (declaration) "char *loadaddr;" (primitive_type) "char" (pointer_declarator) "*loadaddr" (*) "*" (identifier) "loadaddr" (;) ";" (declaration) "int io;" (primitive_type) "int" (identifier) "io" (;) ";" (declaration) "struct exec x;" (struct_specifier) "struct exec" (struct) "struct" (type_identifier) "exec" (identifier) "x" (;) ";" (declaration) "int cc, magic;" (primitive_type) "int" (identifier) "cc" (,) "," (identifier) "magic" (;) ";" (declaration) "void (*entry)();" (primitive_type) "void" (function_declarator) "(*entry)()" (parenthesized_declarator) "(*entry)" (() "(" (pointer_declarator) "*entry" (*) "*" (identifier) "entry" ()) ")" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "char *cp;" (primitive_type) "char" (pointer_declarator) "*cp" (*) "*" (identifier) "cp" (;) ";" (declaration) "int *ip;" (primitive_type) "int" (pointer_declarator) "*ip" (*) "*" (identifier) "ip" (;) ";" (expression_statement) "io = open(file, 0);" (assignment_expression) "io = open(file, 0)" (identifier) "io" (=) "=" (call_expression) "open(file, 0)" (identifier) "open" (argument_list) "(file, 0)" (() "(" (identifier) "file" (,) "," (number_literal) "0" ()) ")" (;) ";" (if_statement) "if (io < 0)\n return;" (if) "if" (parenthesized_expression) "(io < 0)" (() "(" (binary_expression) "io < 0" (identifier) "io" (<) "<" (number_literal) "0" ()) ")" (return_statement) "return;" (return) "return" (;) ";" (comment) "/*\n * Read in the exec header, and validate it.\n */" (if_statement) "if (read(io, (char *)&x, sizeof(x)) != sizeof(x))\n goto shread;" (if) "if" (parenthesized_expression) "(read(io, (char *)&x, sizeof(x)) != sizeof(x))" (() "(" (binary_expression) "read(io, (char *)&x, sizeof(x)) != sizeof(x)" (call_expression) "read(io, (char *)&x, sizeof(x))" (identifier) "read" (argument_list) "(io, (char *)&x, sizeof(x))" (() "(" (identifier) "io" (,) "," (cast_expression) "(char *)&x" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (pointer_expression) "&x" (&) "&" (identifier) "x" (,) "," (sizeof_expression) "sizeof(x)" (sizeof) "sizeof" (parenthesized_expression) "(x)" (() "(" (identifier) "x" ()) ")" ()) ")" (!=) "!=" (sizeof_expression) "sizeof(x)" (sizeof) "sizeof" (parenthesized_expression) "(x)" (() "(" (identifier) "x" ()) ")" ()) ")" (goto_statement) "goto shread;" (goto) "goto" (statement_identifier) "shread" (;) ";" (if_statement) "if (N_BADMAG(x)) {\n errno = EFTYPE;\n goto closeout;\n }" (if) "if" (parenthesized_expression) "(N_BADMAG(x))" (() "(" (call_expression) "N_BADMAG(x)" (identifier) "N_BADMAG" (argument_list) "(x)" (() "(" (identifier) "x" ()) ")" ()) ")" (compound_statement) "{\n errno = EFTYPE;\n goto closeout;\n }" ({) "{" (expression_statement) "errno = EFTYPE;" (assignment_expression) "errno = EFTYPE" (identifier) "errno" (=) "=" (identifier) "EFTYPE" (;) ";" (goto_statement) "goto closeout;" (goto) "goto" (statement_identifier) "closeout" (;) ";" (}) "}" (comment) "/*\n * note: on the mvme ports, the kernel is linked in such a way that \n * its entry point is the first item in .text, and thus a_entry can \n * be used to determine both the load address and the entry point.\n * (also note that we make use of the fact that the kernel will live\n * in a VA == PA range of memory ... otherwise we would take \n * loadaddr as a parameter and let the kernel relocate itself!)\n *\n * note that ZMAGIC files included the a.out header in the text area\n * so we must mask that off (has no effect on the other formats)\n */" (expression_statement) "loadaddr = (void *)(x.a_entry & ~sizeof(x));" (assignment_expression) "loadaddr = (void *)(x.a_entry & ~sizeof(x))" (identifier) "loadaddr" (=) "=" (cast_expression) "(void *)(x.a_entry & ~sizeof(x))" (() "(" (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parenthesized_expression) "(x.a_entry & ~sizeof(x))" (() "(" (binary_expression) "x.a_entry & ~sizeof(x)" (field_expression) "x.a_entry" (identifier) "x" (.) "." (field_identifier) "a_entry" (&) "&" (unary_expression) "~sizeof(x)" (~) "~" (sizeof_expression) "sizeof(x)" (sizeof) "sizeof" (parenthesized_expression) "(x)" (() "(" (identifier) "x" ()) ")" ()) ")" (;) ";" (expression_statement) "cp = loadaddr;" (assignment_expression) "cp = loadaddr" (identifier) "cp" (=) "=" (identifier) "loadaddr" (;) ";" (expression_statement) "magic = N_GETMAGIC(x);" (assignment_expression) "magic = N_GETMAGIC(x)" (identifier) "magic" (=) "=" (call_expression) "N_GETMAGIC(x)" (identifier) "N_GETMAGIC" (argument_list) "(x)" (() "(" (identifier) "x" ()) ")" (;) ";" (if_statement) "if (magic == ZMAGIC)\n cp += sizeof(x);" (if) "if" (parenthesized_expression) "(magic == ZMAGIC)" (() "(" (binary_expression) "magic == ZMAGIC" (identifier) "magic" (==) "==" (identifier) "ZMAGIC" ()) ")" (expression_statement) "cp += sizeof(x);" (assignment_expression) "cp += sizeof(x)" (identifier) "cp" (+=) "+=" (sizeof_expression) "sizeof(x)" (sizeof) "sizeof" (parenthesized_expression) "(x)" (() "(" (identifier) "x" ()) ")" (;) ";" (expression_statement) "entry = (void (*)())cp;" (assignment_expression) "entry = (void (*)())cp" (identifier) "entry" (=) "=" (cast_expression) "(void (*)())cp" (() "(" (type_descriptor) "void (*)()" (primitive_type) "void" (abstract_function_declarator) "(*)()" (abstract_parenthesized_declarator) "(*)" (() "(" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parameter_list) "()" (() "(" ()) ")" ()) ")" (identifier) "cp" (;) ";" (comment) "/*\n * Read in the text segment.\n */" (expression_statement) "printf("%d", x.a_text);" (call_expression) "printf("%d", x.a_text)" (identifier) "printf" (argument_list) "("%d", x.a_text)" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (field_expression) "x.a_text" (identifier) "x" (.) "." (field_identifier) "a_text" ()) ")" (;) ";" (expression_statement) "cc = x.a_text;" (assignment_expression) "cc = x.a_text" (identifier) "cc" (=) "=" (field_expression) "x.a_text" (identifier) "x" (.) "." (field_identifier) "a_text" (;) ";" (if_statement) "if (magic == ZMAGIC)\n cc = cc - sizeof(x);" (if) "if" (parenthesized_expression) "(magic == ZMAGIC)" (() "(" (binary_expression) "magic == ZMAGIC" (identifier) "magic" (==) "==" (identifier) "ZMAGIC" ()) ")" (expression_statement) "cc = cc - sizeof(x);" (assignment_expression) "cc = cc - sizeof(x)" (identifier) "cc" (=) "=" (binary_expression) "cc - sizeof(x)" (identifier) "cc" (-) "-" (sizeof_expression) "sizeof(x)" (sizeof) "sizeof" (parenthesized_expression) "(x)" (() "(" (identifier) "x" ()) ")" (;) ";" (comment) "/* a.out header part of text in zmagic */" (if_statement) "if (read(io, cp, cc) != cc)\n goto shread;" (if) "if" (parenthesized_expression) "(read(io, cp, cc) != cc)" (() "(" (binary_expression) "read(io, cp, cc) != cc" (call_expression) "read(io, cp, cc)" (identifier) "read" (argument_list) "(io, cp, cc)" (() "(" (identifier) "io" (,) "," (identifier) "cp" (,) "," (identifier) "cc" ()) ")" (!=) "!=" (identifier) "cc" ()) ")" (goto_statement) "goto shread;" (goto) "goto" (statement_identifier) "shread" (;) ";" (expression_statement) "cp += cc;" (assignment_expression) "cp += cc" (identifier) "cp" (+=) "+=" (identifier) "cc" (;) ";" (comment) "/*\n * NMAGIC may have a gap between text and data.\n */" (if_statement) "if (magic == NMAGIC) {\n register int mask = N_PAGSIZ(x) - 1;\n while ((int)cp & mask)\n *cp++ = 0;\n }" (if) "if" (parenthesized_expression) "(magic == NMAGIC)" (() "(" (binary_expression) "magic == NMAGIC" (identifier) "magic" (==) "==" (identifier) "NMAGIC" ()) ")" (compound_statement) "{\n register int mask = N_PAGSIZ(x) - 1;\n while ((int)cp & mask)\n *cp++ = 0;\n }" ({) "{" (declaration) "register int mask = N_PAGSIZ(x) - 1;" (storage_class_specifier) "register" (register) "register" (primitive_type) "int" (init_declarator) "mask = N_PAGSIZ(x) - 1" (identifier) "mask" (=) "=" (binary_expression) "N_PAGSIZ(x) - 1" (call_expression) "N_PAGSIZ(x)" (identifier) "N_PAGSIZ" (argument_list) "(x)" (() "(" (identifier) "x" ()) ")" (-) "-" (number_literal) "1" (;) ";" (while_statement) "while ((int)cp & mask)\n *cp++ = 0;" (while) "while" (parenthesized_expression) "((int)cp & mask)" (() "(" (binary_expression) "(int)cp & mask" (cast_expression) "(int)cp" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (identifier) "cp" (&) "&" (identifier) "mask" ()) ")" (expression_statement) "*cp++ = 0;" (assignment_expression) "*cp++ = 0" (pointer_expression) "*cp++" (*) "*" (update_expression) "cp++" (identifier) "cp" (++) "++" (=) "=" (number_literal) "0" (;) ";" (}) "}" (comment) "/*\n * Read in the data segment.\n */" (expression_statement) "printf("+%d", x.a_data);" (call_expression) "printf("+%d", x.a_data)" (identifier) "printf" (argument_list) "("+%d", x.a_data)" (() "(" (string_literal) ""+%d"" (") """ (string_content) "+%d" (") """ (,) "," (field_expression) "x.a_data" (identifier) "x" (.) "." (field_identifier) "a_data" ()) ")" (;) ";" (if_statement) "if (read(io, cp, x.a_data) != x.a_data)\n goto shread;" (if) "if" (parenthesized_expression) "(read(io, cp, x.a_data) != x.a_data)" (() "(" (binary_expression) "read(io, cp, x.a_data) != x.a_data" (call_expression) "read(io, cp, x.a_data)" (identifier) "read" (argument_list) "(io, cp, x.a_data)" (() "(" (identifier) "io" (,) "," (identifier) "cp" (,) "," (field_expression) "x.a_data" (identifier) "x" (.) "." (field_identifier) "a_data" ()) ")" (!=) "!=" (field_expression) "x.a_data" (identifier) "x" (.) "." (field_identifier) "a_data" ()) ")" (goto_statement) "goto shread;" (goto) "goto" (statement_identifier) "shread" (;) ";" (expression_statement) "cp += x.a_data;" (assignment_expression) "cp += x.a_data" (identifier) "cp" (+=) "+=" (field_expression) "x.a_data" (identifier) "x" (.) "." (field_identifier) "a_data" (;) ";" (comment) "/*\n * Zero out the BSS section.\n */" (expression_statement) "printf("+%d", x.a_bss);" (call_expression) "printf("+%d", x.a_bss)" (identifier) "printf" (argument_list) "("+%d", x.a_bss)" (() "(" (string_literal) ""+%d"" (") """ (string_content) "+%d" (") """ (,) "," (field_expression) "x.a_bss" (identifier) "x" (.) "." (field_identifier) "a_bss" ()) ")" (;) ";" (expression_statement) "cc = x.a_bss;" (assignment_expression) "cc = x.a_bss" (identifier) "cc" (=) "=" (field_expression) "x.a_bss" (identifier) "x" (.) "." (field_identifier) "a_bss" (;) ";" (while_statement) "while ((int)cp & 3) {\n *cp++ = 0;\n --cc;\n }" (while) "while" (parenthesized_expression) "((int)cp & 3)" (() "(" (binary_expression) "(int)cp & 3" (cast_expression) "(int)cp" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (identifier) "cp" (&) "&" (number_literal) "3" ()) ")" (compound_statement) "{\n *cp++ = 0;\n --cc;\n }" ({) "{" (expression_statement) "*cp++ = 0;" (assignment_expression) "*cp++ = 0" (pointer_expression) "*cp++" (*) "*" (update_expression) "cp++" (identifier) "cp" (++) "++" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "--cc;" (update_expression) "--cc" (--) "--" (identifier) "cc" (;) ";" (}) "}" (expression_statement) "ip = (int *)cp;" (assignment_expression) "ip = (int *)cp" (identifier) "ip" (=) "=" (cast_expression) "(int *)cp" (() "(" (type_descriptor) "int *" (primitive_type) "int" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "cp" (;) ";" (expression_statement) "cp += cc;" (assignment_expression) "cp += cc" (identifier) "cp" (+=) "+=" (identifier) "cc" (;) ";" (while_statement) "while ((char *)ip < cp)\n *ip++ = 0;" (while) "while" (parenthesized_expression) "((char *)ip < cp)" (() "(" (binary_expression) "(char *)ip < cp" (cast_expression) "(char *)ip" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "ip" (<) "<" (identifier) "cp" ()) ")" (expression_statement) "*ip++ = 0;" (assignment_expression) "*ip++ = 0" (pointer_expression) "*ip++" (*) "*" (update_expression) "ip++" (identifier) "ip" (++) "++" (=) "=" (number_literal) "0" (;) ";" (comment) "/*\n * Read in the symbol table and strings.\n * (Always set the symtab size word.)\n */" (expression_statement) "*ip++ = x.a_syms;" (assignment_expression) "*ip++ = x.a_syms" (pointer_expression) "*ip++" (*) "*" (update_expression) "ip++" (identifier) "ip" (++) "++" (=) "=" (field_expression) "x.a_syms" (identifier) "x" (.) "." (field_identifier) "a_syms" (;) ";" (expression_statement) "cp = (char *) ip;" (assignment_expression) "cp = (char *) ip" (identifier) "cp" (=) "=" (cast_expression) "(char *) ip" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "ip" (;) ";" (if_statement) "if (x.a_syms > 0) {\n /* Symbol table and string table length word. */\n cc = x.a_syms;\n printf("+[%d", cc);\n cc += sizeof(int); /* strtab length too */\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += x.a_syms;\n ip = (int *)cp; /* points to strtab length */\n cp += sizeof(int);\n\n /* String table. Length word includes itself. */\n cc = *ip;\n printf("+%d]", cc);\n cc -= sizeof(int);\n if (cc <= 0)\n goto shread;\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += cc;\n }" (if) "if" (parenthesized_expression) "(x.a_syms > 0)" (() "(" (binary_expression) "x.a_syms > 0" (field_expression) "x.a_syms" (identifier) "x" (.) "." (field_identifier) "a_syms" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n /* Symbol table and string table length word. */\n cc = x.a_syms;\n printf("+[%d", cc);\n cc += sizeof(int); /* strtab length too */\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += x.a_syms;\n ip = (int *)cp; /* points to strtab length */\n cp += sizeof(int);\n\n /* String table. Length word includes itself. */\n cc = *ip;\n printf("+%d]", cc);\n cc -= sizeof(int);\n if (cc <= 0)\n goto shread;\n if (read(io, cp, cc) != cc)\n goto shread;\n cp += cc;\n }" ({) "{" (comment) "/* Symbol table and string table length word. */" (expression_statement) "cc = x.a_syms;" (assignment_expression) "cc = x.a_syms" (identifier) "cc" (=) "=" (field_expression) "x.a_syms" (identifier) "x" (.) "." (field_identifier) "a_syms" (;) ";" (expression_statement) "printf("+[%d", cc);" (call_expression) "printf("+[%d", cc)" (identifier) "printf" (argument_list) "("+[%d", cc)" (() "(" (string_literal) ""+[%d"" (") """ (string_content) "+[%d" (") """ (,) "," (identifier) "cc" ()) ")" (;) ";" (expression_statement) "cc += sizeof(int);" (assignment_expression) "cc += sizeof(int)" (identifier) "cc" (+=) "+=" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (;) ";" (comment) "/* strtab length too */" (if_statement) "if (read(io, cp, cc) != cc)\n goto shread;" (if) "if" (parenthesized_expression) "(read(io, cp, cc) != cc)" (() "(" (binary_expression) "read(io, cp, cc) != cc" (call_expression) "read(io, cp, cc)" (identifier) "read" (argument_list) "(io, cp, cc)" (() "(" (identifier) "io" (,) "," (identifier) "cp" (,) "," (identifier) "cc" ()) ")" (!=) "!=" (identifier) "cc" ()) ")" (goto_statement) "goto shread;" (goto) "goto" (statement_identifier) "shread" (;) ";" (expression_statement) "cp += x.a_syms;" (assignment_expression) "cp += x.a_syms" (identifier) "cp" (+=) "+=" (field_expression) "x.a_syms" (identifier) "x" (.) "." (field_identifier) "a_syms" (;) ";" (expression_statement) "ip = (int *)cp;" (assignment_expression) "ip = (int *)cp" (identifier) "ip" (=) "=" (cast_expression) "(int *)cp" (() "(" (type_descriptor) "int *" (primitive_type) "int" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "cp" (;) ";" (comment) "/* points to strtab length */" (expression_statement) "cp += sizeof(int);" (assignment_expression) "cp += sizeof(int)" (identifier) "cp" (+=) "+=" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (;) ";" (comment) "/* String table. Length word includes itself. */" (expression_statement) "cc = *ip;" (assignment_expression) "cc = *ip" (identifier) "cc" (=) "=" (pointer_expression) "*ip" (*) "*" (identifier) "ip" (;) ";" (expression_statement) "printf("+%d]", cc);" (call_expression) "printf("+%d]", cc)" (identifier) "printf" (argument_list) "("+%d]", cc)" (() "(" (string_literal) ""+%d]"" (") """ (string_content) "+%d]" (") """ (,) "," (identifier) "cc" ()) ")" (;) ";" (expression_statement) "cc -= sizeof(int);" (assignment_expression) "cc -= sizeof(int)" (identifier) "cc" (-=) "-=" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (;) ";" (if_statement) "if (cc <= 0)\n goto shread;" (if) "if" (parenthesized_expression) "(cc <= 0)" (() "(" (binary_expression) "cc <= 0" (identifier) "cc" (<=) "<=" (number_literal) "0" ()) ")" (goto_statement) "goto shread;" (goto) "goto" (statement_identifier) "shread" (;) ";" (if_statement) "if (read(io, cp, cc) != cc)\n goto shread;" (if) "if" (parenthesized_expression) "(read(io, cp, cc) != cc)" (() "(" (binary_expression) "read(io, cp, cc) != cc" (call_expression) "read(io, cp, cc)" (identifier) "read" (argument_list) "(io, cp, cc)" (() "(" (identifier) "io" (,) "," (identifier) "cp" (,) "," (identifier) "cc" ()) ")" (!=) "!=" (identifier) "cc" ()) ")" (goto_statement) "goto shread;" (goto) "goto" (statement_identifier) "shread" (;) ";" (expression_statement) "cp += cc;" (assignment_expression) "cp += cc" (identifier) "cp" (+=) "+=" (identifier) "cc" (;) ";" (}) "}" (expression_statement) "printf("=0x%lx\n", cp - loadaddr);" (call_expression) "printf("=0x%lx\n", cp - loadaddr)" (identifier) "printf" (argument_list) "("=0x%lx\n", cp - loadaddr)" (() "(" (string_literal) ""=0x%lx\n"" (") """ (string_content) "=0x%lx" (escape_sequence) "\n" (") """ (,) "," (binary_expression) "cp - loadaddr" (identifier) "cp" (-) "-" (identifier) "loadaddr" ()) ")" (;) ";" (expression_statement) "close(io);" (call_expression) "close(io)" (identifier) "close" (argument_list) "(io)" (() "(" (identifier) "io" ()) ")" (;) ";" (expression_statement) "(*entry)(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp);" (call_expression) "(*entry)(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp)" (parenthesized_expression) "(*entry)" (() "(" (pointer_expression) "*entry" (*) "*" (identifier) "entry" ()) ")" (argument_list) "(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp)" (() "(" (identifier) "args" (,) "," (identifier) "bootdev" (,) "," (identifier) "bootunit" (,) "," (identifier) "bootpart" (,) "," (identifier) "SYM_MAGIC" (,) "," (identifier) "cp" ()) ")" (;) ";" (expression_statement) "printf("exec: kernel returned!\n");" (call_expression) "printf("exec: kernel returned!\n")" (identifier) "printf" (argument_list) "("exec: kernel returned!\n")" (() "(" (string_literal) ""exec: kernel returned!\n"" (") """ (string_content) "exec: kernel returned!" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (labeled_statement) "shread:\n printf("exec: short read\n");" (statement_identifier) "shread" (:) ":" (expression_statement) "printf("exec: short read\n");" (call_expression) "printf("exec: short read\n")" (identifier) "printf" (argument_list) "("exec: short read\n")" (() "(" (string_literal) ""exec: short read\n"" (") """ (string_content) "exec: short read" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "errno = EIO;" (assignment_expression) "errno = EIO" (identifier) "errno" (=) "=" (identifier) "EIO" (;) ";" (labeled_statement) "closeout:\n close(io);" (statement_identifier) "closeout" (:) ":" (expression_statement) "close(io);" (call_expression) "close(io)" (identifier) "close" (argument_list) "(io)" (() "(" (identifier) "io" ()) ")" (;) ";" (return_statement) "return;" (return) "return" (;) ";" (}) "}"
886
0
{"language": "c", "success": true, "metadata": {"lines": 154, "avg_line_length": 28.71, "nodes": 535, "errors": 0, "source_hash": "fac7d7d8b6098afd55e0beaec4db2ce66c913671125d6e78ba5bf28e5ab8c72b", "categorized_nodes": 367}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <sys/param.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<sys/param.h>", "parent": 0, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 22}}, {"id": 3, "type": "preproc_include", "text": "#include <sys/reboot.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<sys/reboot.h>", "parent": 3, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include <machine/prom.h>\n", "parent": null, "children": [7, 8], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<machine/prom.h>", "parent": 6, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include <a.out.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<a.out.h>", "parent": 9, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include \"stand.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"stand.h\"", "parent": 12, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include \"libsa.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"libsa.h\"", "parent": 15, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 18}}, {"id": 18, "type": "preproc_def", "text": "#define\tSYM_MAGIC\t0x6274ef2e\n", "parent": null, "children": [19, 20, 21], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 0}}, {"id": 19, "type": "#define", "text": "#define", "parent": 18, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 7}}, {"id": 20, "type": "identifier", "text": "SYM_MAGIC", "parent": 18, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 17}}, {"id": 21, "type": "preproc_arg", "text": "0x6274ef2e", "parent": 18, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 28}}, {"id": 22, "type": "function_definition", "text": "void\nexec_aout(char *file, const char *args, int bootdev, int bootunit, int bootpart)\n{\n\tchar *loadaddr;\n\tint io;\n\tstruct exec x;\n\tint cc, magic;\n\tvoid (*entry)();\n\tchar *cp;\n\tint *ip;\n\n\tio = open(file, 0);\n\tif (io < 0)\n\t\treturn;\n\n\t/*\n\t * Read in the exec header, and validate it.\n\t */\n\tif (read(io, (char *)&x, sizeof(x)) != sizeof(x))\n\t\tgoto shread;\n\n\tif (N_BADMAG(x)) {\n\t\terrno = EFTYPE;\n\t\tgoto closeout;\n\t}\n\n\t/*\n\t * note: on the mvme ports, the kernel is linked in such a way that \n\t * its entry point is the first item in .text, and thus a_entry can \n\t * be used to determine both the load address and the entry point.\n\t * (also note that we make use of the fact that the kernel will live\n\t * in a VA == PA range of memory ... otherwise we would take \n\t * loadaddr as a parameter and let the kernel relocate itself!)\n\t *\n\t * note that ZMAGIC files included the a.out header in the text area\n\t * so we must mask that off (has no effect on the other formats)\n\t */\n\tloadaddr = (void *)(x.a_entry & ~sizeof(x));\n\n\tcp = loadaddr;\n\tmagic = N_GETMAGIC(x);\n\tif (magic == ZMAGIC)\n\t\tcp += sizeof(x);\n\tentry = (void (*)())cp;\n\n\t/*\n\t * Read in the text segment.\n\t */\n\tprintf(\"%d\", x.a_text);\n\tcc = x.a_text;\n\tif (magic == ZMAGIC)\n\t\tcc = cc - sizeof(x); /* a.out header part of text in zmagic */\n\tif (read(io, cp, cc) != cc)\n\t\tgoto shread;\n\tcp += cc;\n\n\t/*\n\t * NMAGIC may have a gap between text and data.\n\t */\n\tif (magic == NMAGIC) {\n\t\tregister int mask = N_PAGSIZ(x) - 1;\n\t\twhile ((int)cp & mask)\n\t\t\t*cp++ = 0;\n\t}\n\n\t/*\n\t * Read in the data segment.\n\t */\n\tprintf(\"+%d\", x.a_data);\n\tif (read(io, cp, x.a_data) != x.a_data)\n\t\tgoto shread;\n\tcp += x.a_data;\n\n\t/*\n\t * Zero out the BSS section.\n\t */\n\tprintf(\"+%d\", x.a_bss);\n\tcc = x.a_bss;\n\twhile ((int)cp & 3) {\n\t\t*cp++ = 0;\n\t\t--cc;\n\t}\n\tip = (int *)cp;\n\tcp += cc;\n\twhile ((char *)ip < cp)\n\t\t*ip++ = 0;\n\n\t/*\n\t * Read in the symbol table and strings.\n\t * (Always set the symtab size word.)\n\t */\n\t*ip++ = x.a_syms;\n\tcp = (char *) ip;\n\n\tif (x.a_syms > 0) {\n\t\t/* Symbol table and string table length word. */\n\t\tcc = x.a_syms;\n\t\tprintf(\"+[%d\", cc);\n\t\tcc += sizeof(int);\t/* strtab length too */\n\t\tif (read(io, cp, cc) != cc)\n\t\t\tgoto shread;\n\t\tcp += x.a_syms;\n\t\tip = (int *)cp;\t\t/* points to strtab length */\n\t\tcp += sizeof(int);\n\n\t\t/* String table. Length word includes itself. */\n\t\tcc = *ip;\n\t\tprintf(\"+%d]\", cc);\n\t\tcc -= sizeof(int);\n\t\tif (cc <= 0)\n\t\t\tgoto shread;\n\t\tif (read(io, cp, cc) != cc)\n\t\t\tgoto shread;\n\t\tcp += cc;\n\t}\n\tprintf(\"=0x%lx\\n\", cp - loadaddr);\n\tclose(io);\n\n\t(*entry)(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp);\n\n\tprintf(\"exec: kernel returned!\\n\");\n\treturn;\n\nshread:\n\tprintf(\"exec: short read\\n\");\n\terrno = EIO;\ncloseout:\n\tclose(io);\n\treturn;\n}", "parent": null, "children": [23, 24], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 173, "column": 1}}, {"id": 23, "type": "primitive_type", "text": "void", "parent": 22, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 4}}, {"id": 24, "type": "function_declarator", "text": "exec_aout(char *file, const char *args, int bootdev, int bootunit, int bootpart)", "parent": 22, "children": [25, 26], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 80}}, {"id": 25, "type": "identifier", "text": "exec_aout", "parent": 24, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 9}}, {"id": 26, "type": "parameter_list", "text": "(char *file, const char *args, int bootdev, int bootunit, int bootpart)", "parent": 24, "children": [27, 32, 37, 40, 43], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 80}}, {"id": 27, "type": "parameter_declaration", "text": "char *file", "parent": 26, "children": [28, 29], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 20}}, {"id": 28, "type": "primitive_type", "text": "char", "parent": 27, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 14}}, {"id": 29, "type": "pointer_declarator", "text": "*file", "parent": 27, "children": [30, 31], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 20}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 16}}, {"id": 31, "type": "identifier", "text": "file", "parent": 29, "children": [], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 20}}, {"id": 32, "type": "parameter_declaration", "text": "const char *args", "parent": 26, "children": [33, 34], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 38}}, {"id": 33, "type": "primitive_type", "text": "char", "parent": 32, "children": [], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 32}}, {"id": 34, "type": "pointer_declarator", "text": "*args", "parent": 32, "children": [35, 36], "start_point": {"row": 45, "column": 33}, "end_point": {"row": 45, "column": 38}}, {"id": 35, "type": "*", "text": "*", "parent": 34, "children": [], "start_point": {"row": 45, "column": 33}, "end_point": {"row": 45, "column": 34}}, {"id": 36, "type": "identifier", "text": "args", "parent": 34, "children": [], "start_point": {"row": 45, "column": 34}, "end_point": {"row": 45, "column": 38}}, {"id": 37, "type": "parameter_declaration", "text": "int bootdev", "parent": 26, "children": [38, 39], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 51}}, {"id": 38, "type": "primitive_type", "text": "int", "parent": 37, "children": [], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 43}}, {"id": 39, "type": "identifier", "text": "bootdev", "parent": 37, "children": [], "start_point": {"row": 45, "column": 44}, "end_point": {"row": 45, "column": 51}}, {"id": 40, "type": "parameter_declaration", "text": "int bootunit", "parent": 26, "children": [41, 42], "start_point": {"row": 45, "column": 53}, "end_point": {"row": 45, "column": 65}}, {"id": 41, "type": "primitive_type", "text": "int", "parent": 40, "children": [], "start_point": {"row": 45, "column": 53}, "end_point": {"row": 45, "column": 56}}, {"id": 42, "type": "identifier", "text": "bootunit", "parent": 40, "children": [], "start_point": {"row": 45, "column": 57}, "end_point": {"row": 45, "column": 65}}, {"id": 43, "type": "parameter_declaration", "text": "int bootpart", "parent": 26, "children": [44, 45], "start_point": {"row": 45, "column": 67}, "end_point": {"row": 45, "column": 79}}, {"id": 44, "type": "primitive_type", "text": "int", "parent": 43, "children": [], "start_point": {"row": 45, "column": 67}, "end_point": {"row": 45, "column": 70}}, {"id": 45, "type": "identifier", "text": "bootpart", "parent": 43, "children": [], "start_point": {"row": 45, "column": 71}, "end_point": {"row": 45, "column": 79}}, {"id": 46, "type": "declaration", "text": "char *loadaddr;", "parent": 22, "children": [47, 48], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 16}}, {"id": 47, "type": "primitive_type", "text": "char", "parent": 46, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 5}}, {"id": 48, "type": "pointer_declarator", "text": "*loadaddr", "parent": 46, "children": [49, 50], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 15}}, {"id": 49, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 7}}, {"id": 50, "type": "identifier", "text": "loadaddr", "parent": 48, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 15}}, {"id": 51, "type": "declaration", "text": "int io;", "parent": 22, "children": [52, 53], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 8}}, {"id": 52, "type": "primitive_type", "text": "int", "parent": 51, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 4}}, {"id": 53, "type": "identifier", "text": "io", "parent": 51, "children": [], "start_point": {"row": 48, "column": 5}, "end_point": {"row": 48, "column": 7}}, {"id": 54, "type": "declaration", "text": "struct exec x;", "parent": 22, "children": [55, 58], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 15}}, {"id": 55, "type": "struct_specifier", "text": "struct exec", "parent": 54, "children": [56, 57], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 12}}, {"id": 56, "type": "struct", "text": "struct", "parent": 55, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 7}}, {"id": 57, "type": "type_identifier", "text": "exec", "parent": 55, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 12}}, {"id": 58, "type": "identifier", "text": "x", "parent": 54, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 14}}, {"id": 59, "type": "declaration", "text": "int cc, magic;", "parent": 22, "children": [60, 61, 62], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 15}}, {"id": 60, "type": "primitive_type", "text": "int", "parent": 59, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 4}}, {"id": 61, "type": "identifier", "text": "cc", "parent": 59, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 7}}, {"id": 62, "type": "identifier", "text": "magic", "parent": 59, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 14}}, {"id": 63, "type": "declaration", "text": "void (*entry)();", "parent": 22, "children": [64, 65], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 17}}, {"id": 64, "type": "primitive_type", "text": "void", "parent": 63, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 5}}, {"id": 65, "type": "function_declarator", "text": "(*entry)()", "parent": 63, "children": [66, 70], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 16}}, {"id": 66, "type": "parenthesized_declarator", "text": "(*entry)", "parent": 65, "children": [67], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 14}}, {"id": 67, "type": "pointer_declarator", "text": "*entry", "parent": 66, "children": [68, 69], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 13}}, {"id": 68, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 8}}, {"id": 69, "type": "identifier", "text": "entry", "parent": 67, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 13}}, {"id": 70, "type": "parameter_list", "text": "()", "parent": 65, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 16}}, {"id": 71, "type": "declaration", "text": "char *cp;", "parent": 22, "children": [72, 73], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 10}}, {"id": 72, "type": "primitive_type", "text": "char", "parent": 71, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 5}}, {"id": 73, "type": "pointer_declarator", "text": "*cp", "parent": 71, "children": [74, 75], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 9}}, {"id": 74, "type": "*", "text": "*", "parent": 73, "children": [], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 7}}, {"id": 75, "type": "identifier", "text": "cp", "parent": 73, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 9}}, {"id": 76, "type": "declaration", "text": "int *ip;", "parent": 22, "children": [77, 78], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 9}}, {"id": 77, "type": "primitive_type", "text": "int", "parent": 76, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 4}}, {"id": 78, "type": "pointer_declarator", "text": "*ip", "parent": 76, "children": [79, 80], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 8}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 6}}, {"id": 80, "type": "identifier", "text": "ip", "parent": 78, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 8}}, {"id": 81, "type": "assignment_expression", "text": "io = open(file, 0)", "parent": 22, "children": [82, 83, 84], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 19}}, {"id": 82, "type": "identifier", "text": "io", "parent": 81, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 3}}, {"id": 83, "type": "=", "text": "=", "parent": 81, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 5}}, {"id": 84, "type": "call_expression", "text": "open(file, 0)", "parent": 81, "children": [85, 86], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 19}}, {"id": 85, "type": "identifier", "text": "open", "parent": 84, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 10}}, {"id": 86, "type": "argument_list", "text": "(file, 0)", "parent": 84, "children": [87, 88], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 19}}, {"id": 87, "type": "identifier", "text": "file", "parent": 86, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 15}}, {"id": 88, "type": "number_literal", "text": "0", "parent": 86, "children": [], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 18}}, {"id": 89, "type": "if_statement", "text": "if (io < 0)\n\t\treturn;", "parent": 22, "children": [90, 95], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 57, "column": 9}}, {"id": 90, "type": "parenthesized_expression", "text": "(io < 0)", "parent": 89, "children": [91], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 12}}, {"id": 91, "type": "binary_expression", "text": "io < 0", "parent": 90, "children": [92, 93, 94], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 11}}, {"id": 92, "type": "identifier", "text": "io", "parent": 91, "children": [], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 7}}, {"id": 93, "type": "<", "text": "<", "parent": 91, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 9}}, {"id": 94, "type": "number_literal", "text": "0", "parent": 91, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 11}}, {"id": 95, "type": "return_statement", "text": "return;", "parent": 89, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 9}}, {"id": 96, "type": "if_statement", "text": "if (read(io, (char *)&x, sizeof(x)) != sizeof(x))\n\t\tgoto shread;", "parent": 22, "children": [97, 117], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 63, "column": 14}}, {"id": 97, "type": "parenthesized_expression", "text": "(read(io, (char *)&x, sizeof(x)) != sizeof(x))", "parent": 96, "children": [98], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 50}}, {"id": 98, "type": "binary_expression", "text": "read(io, (char *)&x, sizeof(x)) != sizeof(x)", "parent": 97, "children": [99, 113, 114], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 49}}, {"id": 99, "type": "call_expression", "text": "read(io, (char *)&x, sizeof(x))", "parent": 98, "children": [100, 101], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 36}}, {"id": 100, "type": "identifier", "text": "read", "parent": 99, "children": [], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 9}}, {"id": 101, "type": "argument_list", "text": "(io, (char *)&x, sizeof(x))", "parent": 99, "children": [102, 103, 110], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 36}}, {"id": 102, "type": "identifier", "text": "io", "parent": 101, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 12}}, {"id": 103, "type": "cast_expression", "text": "(char *)&x", "parent": 101, "children": [104, 108], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 24}}, {"id": 104, "type": "type_descriptor", "text": "char *", "parent": 103, "children": [105, 106], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 21}}, {"id": 105, "type": "primitive_type", "text": "char", "parent": 104, "children": [], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 19}}, {"id": 106, "type": "abstract_pointer_declarator", "text": "*", "parent": 104, "children": [107], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 21}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 21}}, {"id": 108, "type": "pointer_expression", "text": "&x", "parent": 103, "children": [109], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 24}}, {"id": 109, "type": "identifier", "text": "x", "parent": 108, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 24}}, {"id": 110, "type": "sizeof_expression", "text": "sizeof(x)", "parent": 101, "children": [111], "start_point": {"row": 62, "column": 26}, "end_point": {"row": 62, "column": 35}}, {"id": 111, "type": "parenthesized_expression", "text": "(x)", "parent": 110, "children": [112], "start_point": {"row": 62, "column": 32}, "end_point": {"row": 62, "column": 35}}, {"id": 112, "type": "identifier", "text": "x", "parent": 111, "children": [], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 62, "column": 34}}, {"id": 113, "type": "!=", "text": "!=", "parent": 98, "children": [], "start_point": {"row": 62, "column": 37}, "end_point": {"row": 62, "column": 39}}, {"id": 114, "type": "sizeof_expression", "text": "sizeof(x)", "parent": 98, "children": [115], "start_point": {"row": 62, "column": 40}, "end_point": {"row": 62, "column": 49}}, {"id": 115, "type": "parenthesized_expression", "text": "(x)", "parent": 114, "children": [116], "start_point": {"row": 62, "column": 46}, "end_point": {"row": 62, "column": 49}}, {"id": 116, "type": "identifier", "text": "x", "parent": 115, "children": [], "start_point": {"row": 62, "column": 47}, "end_point": {"row": 62, "column": 48}}, {"id": 117, "type": "goto_statement", "text": "goto shread;", "parent": 96, "children": [118, 119], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 14}}, {"id": 118, "type": "goto", "text": "goto", "parent": 117, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 6}}, {"id": 119, "type": "statement_identifier", "text": "shread", "parent": 117, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 13}}, {"id": 120, "type": "if_statement", "text": "if (N_BADMAG(x)) {\n\t\terrno = EFTYPE;\n\t\tgoto closeout;\n\t}", "parent": 22, "children": [121], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 68, "column": 2}}, {"id": 121, "type": "parenthesized_expression", "text": "(N_BADMAG(x))", "parent": 120, "children": [122], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 17}}, {"id": 122, "type": "call_expression", "text": "N_BADMAG(x)", "parent": 121, "children": [123, 124], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 16}}, {"id": 123, "type": "identifier", "text": "N_BADMAG", "parent": 122, "children": [], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 13}}, {"id": 124, "type": "argument_list", "text": "(x)", "parent": 122, "children": [125], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 16}}, {"id": 125, "type": "identifier", "text": "x", "parent": 124, "children": [], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 15}}, {"id": 126, "type": "assignment_expression", "text": "errno = EFTYPE", "parent": 120, "children": [127, 128, 129], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 16}}, {"id": 127, "type": "identifier", "text": "errno", "parent": 126, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 7}}, {"id": 128, "type": "=", "text": "=", "parent": 126, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 9}}, {"id": 129, "type": "identifier", "text": "EFTYPE", "parent": 126, "children": [], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 16}}, {"id": 130, "type": "goto_statement", "text": "goto closeout;", "parent": 120, "children": [131, 132], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 16}}, {"id": 131, "type": "goto", "text": "goto", "parent": 130, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 6}}, {"id": 132, "type": "statement_identifier", "text": "closeout", "parent": 130, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 15}}, {"id": 133, "type": "assignment_expression", "text": "loadaddr = (void *)(x.a_entry & ~sizeof(x))", "parent": 22, "children": [134, 135, 136], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 44}}, {"id": 134, "type": "identifier", "text": "loadaddr", "parent": 133, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 9}}, {"id": 135, "type": "=", "text": "=", "parent": 133, "children": [], "start_point": {"row": 81, "column": 10}, "end_point": {"row": 81, "column": 11}}, {"id": 136, "type": "cast_expression", "text": "(void *)(x.a_entry & ~sizeof(x))", "parent": 133, "children": [137, 141], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 44}}, {"id": 137, "type": "type_descriptor", "text": "void *", "parent": 136, "children": [138, 139], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 19}}, {"id": 138, "type": "primitive_type", "text": "void", "parent": 137, "children": [], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 17}}, {"id": 139, "type": "abstract_pointer_declarator", "text": "*", "parent": 137, "children": [140], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 19}}, {"id": 140, "type": "*", "text": "*", "parent": 139, "children": [], "start_point": {"row": 81, "column": 18}, "end_point": {"row": 81, "column": 19}}, {"id": 141, "type": "parenthesized_expression", "text": "(x.a_entry & ~sizeof(x))", "parent": 136, "children": [142], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 44}}, {"id": 142, "type": "binary_expression", "text": "x.a_entry & ~sizeof(x)", "parent": 141, "children": [143, 146], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 43}}, {"id": 143, "type": "field_expression", "text": "x.a_entry", "parent": 142, "children": [144, 145], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 30}}, {"id": 144, "type": "identifier", "text": "x", "parent": 143, "children": [], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 22}}, {"id": 145, "type": "field_identifier", "text": "a_entry", "parent": 143, "children": [], "start_point": {"row": 81, "column": 23}, "end_point": {"row": 81, "column": 30}}, {"id": 146, "type": "unary_expression", "text": "~sizeof(x)", "parent": 142, "children": [147, 148], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 43}}, {"id": 147, "type": "~", "text": "~", "parent": 146, "children": [], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 34}}, {"id": 148, "type": "sizeof_expression", "text": "sizeof(x)", "parent": 146, "children": [149], "start_point": {"row": 81, "column": 34}, "end_point": {"row": 81, "column": 43}}, {"id": 149, "type": "parenthesized_expression", "text": "(x)", "parent": 148, "children": [150], "start_point": {"row": 81, "column": 40}, "end_point": {"row": 81, "column": 43}}, {"id": 150, "type": "identifier", "text": "x", "parent": 149, "children": [], "start_point": {"row": 81, "column": 41}, "end_point": {"row": 81, "column": 42}}, {"id": 151, "type": "assignment_expression", "text": "cp = loadaddr", "parent": 22, "children": [152, 153, 154], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 14}}, {"id": 152, "type": "identifier", "text": "cp", "parent": 151, "children": [], "start_point": {"row": 83, "column": 1}, "end_point": {"row": 83, "column": 3}}, {"id": 153, "type": "=", "text": "=", "parent": 151, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 5}}, {"id": 154, "type": "identifier", "text": "loadaddr", "parent": 151, "children": [], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 14}}, {"id": 155, "type": "assignment_expression", "text": "magic = N_GETMAGIC(x)", "parent": 22, "children": [156, 157, 158], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 22}}, {"id": 156, "type": "identifier", "text": "magic", "parent": 155, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 6}}, {"id": 157, "type": "=", "text": "=", "parent": 155, "children": [], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 8}}, {"id": 158, "type": "call_expression", "text": "N_GETMAGIC(x)", "parent": 155, "children": [159, 160], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 22}}, {"id": 159, "type": "identifier", "text": "N_GETMAGIC", "parent": 158, "children": [], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 19}}, {"id": 160, "type": "argument_list", "text": "(x)", "parent": 158, "children": [161], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 22}}, {"id": 161, "type": "identifier", "text": "x", "parent": 160, "children": [], "start_point": {"row": 84, "column": 20}, "end_point": {"row": 84, "column": 21}}, {"id": 162, "type": "if_statement", "text": "if (magic == ZMAGIC)\n\t\tcp += sizeof(x);", "parent": 22, "children": [163], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 86, "column": 18}}, {"id": 163, "type": "parenthesized_expression", "text": "(magic == ZMAGIC)", "parent": 162, "children": [164], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 21}}, {"id": 164, "type": "binary_expression", "text": "magic == ZMAGIC", "parent": 163, "children": [165, 166, 167], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 20}}, {"id": 165, "type": "identifier", "text": "magic", "parent": 164, "children": [], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 10}}, {"id": 166, "type": "==", "text": "==", "parent": 164, "children": [], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 13}}, {"id": 167, "type": "identifier", "text": "ZMAGIC", "parent": 164, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 20}}, {"id": 168, "type": "assignment_expression", "text": "cp += sizeof(x)", "parent": 162, "children": [169, 170, 171], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 17}}, {"id": 169, "type": "identifier", "text": "cp", "parent": 168, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 4}}, {"id": 170, "type": "+=", "text": "+=", "parent": 168, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 7}}, {"id": 171, "type": "sizeof_expression", "text": "sizeof(x)", "parent": 168, "children": [172], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 17}}, {"id": 172, "type": "parenthesized_expression", "text": "(x)", "parent": 171, "children": [173], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 17}}, {"id": 173, "type": "identifier", "text": "x", "parent": 172, "children": [], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 16}}, {"id": 174, "type": "assignment_expression", "text": "entry = (void (*)())cp", "parent": 22, "children": [175, 176, 177], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 23}}, {"id": 175, "type": "identifier", "text": "entry", "parent": 174, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 6}}, {"id": 176, "type": "=", "text": "=", "parent": 174, "children": [], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 8}}, {"id": 177, "type": "cast_expression", "text": "(void (*)())cp", "parent": 174, "children": [178, 185], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 23}}, {"id": 178, "type": "type_descriptor", "text": "void (*)()", "parent": 177, "children": [179, 180], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 20}}, {"id": 179, "type": "primitive_type", "text": "void", "parent": 178, "children": [], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 14}}, {"id": 180, "type": "abstract_function_declarator", "text": "(*)()", "parent": 178, "children": [181, 184], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 20}}, {"id": 181, "type": "abstract_parenthesized_declarator", "text": "(*)", "parent": 180, "children": [182], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 18}}, {"id": 182, "type": "abstract_pointer_declarator", "text": "*", "parent": 181, "children": [183], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 17}}, {"id": 183, "type": "*", "text": "*", "parent": 182, "children": [], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 17}}, {"id": 184, "type": "parameter_list", "text": "()", "parent": 180, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 20}}, {"id": 185, "type": "identifier", "text": "cp", "parent": 177, "children": [], "start_point": {"row": 87, "column": 21}, "end_point": {"row": 87, "column": 23}}, {"id": 186, "type": "call_expression", "text": "printf(\"%d\", x.a_text)", "parent": 22, "children": [187, 188], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 23}}, {"id": 187, "type": "identifier", "text": "printf", "parent": 186, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 7}}, {"id": 188, "type": "argument_list", "text": "(\"%d\", x.a_text)", "parent": 186, "children": [189, 190], "start_point": {"row": 92, "column": 7}, "end_point": {"row": 92, "column": 23}}, {"id": 189, "type": "string_literal", "text": "\"%d\"", "parent": 188, "children": [], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 92, "column": 12}}, {"id": 190, "type": "field_expression", "text": "x.a_text", "parent": 188, "children": [191, 192], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 22}}, {"id": 191, "type": "identifier", "text": "x", "parent": 190, "children": [], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 15}}, {"id": 192, "type": "field_identifier", "text": "a_text", "parent": 190, "children": [], "start_point": {"row": 92, "column": 16}, "end_point": {"row": 92, "column": 22}}, {"id": 193, "type": "assignment_expression", "text": "cc = x.a_text", "parent": 22, "children": [194, 195, 196], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 14}}, {"id": 194, "type": "identifier", "text": "cc", "parent": 193, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 3}}, {"id": 195, "type": "=", "text": "=", "parent": 193, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 5}}, {"id": 196, "type": "field_expression", "text": "x.a_text", "parent": 193, "children": [197, 198], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 14}}, {"id": 197, "type": "identifier", "text": "x", "parent": 196, "children": [], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 7}}, {"id": 198, "type": "field_identifier", "text": "a_text", "parent": 196, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 14}}, {"id": 199, "type": "if_statement", "text": "if (magic == ZMAGIC)\n\t\tcc = cc - sizeof(x);", "parent": 22, "children": [200], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 95, "column": 22}}, {"id": 200, "type": "parenthesized_expression", "text": "(magic == ZMAGIC)", "parent": 199, "children": [201], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 21}}, {"id": 201, "type": "binary_expression", "text": "magic == ZMAGIC", "parent": 200, "children": [202, 203, 204], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 20}}, {"id": 202, "type": "identifier", "text": "magic", "parent": 201, "children": [], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 10}}, {"id": 203, "type": "==", "text": "==", "parent": 201, "children": [], "start_point": {"row": 94, "column": 11}, "end_point": {"row": 94, "column": 13}}, {"id": 204, "type": "identifier", "text": "ZMAGIC", "parent": 201, "children": [], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 20}}, {"id": 205, "type": "assignment_expression", "text": "cc = cc - sizeof(x)", "parent": 199, "children": [206, 207, 208], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 21}}, {"id": 206, "type": "identifier", "text": "cc", "parent": 205, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 4}}, {"id": 207, "type": "=", "text": "=", "parent": 205, "children": [], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 6}}, {"id": 208, "type": "binary_expression", "text": "cc - sizeof(x)", "parent": 205, "children": [209, 210, 211], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 21}}, {"id": 209, "type": "identifier", "text": "cc", "parent": 208, "children": [], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 9}}, {"id": 210, "type": "-", "text": "-", "parent": 208, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 11}}, {"id": 211, "type": "sizeof_expression", "text": "sizeof(x)", "parent": 208, "children": [212], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 21}}, {"id": 212, "type": "parenthesized_expression", "text": "(x)", "parent": 211, "children": [213], "start_point": {"row": 95, "column": 18}, "end_point": {"row": 95, "column": 21}}, {"id": 213, "type": "identifier", "text": "x", "parent": 212, "children": [], "start_point": {"row": 95, "column": 19}, "end_point": {"row": 95, "column": 20}}, {"id": 214, "type": "if_statement", "text": "if (read(io, cp, cc) != cc)\n\t\tgoto shread;", "parent": 22, "children": [215, 225], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 97, "column": 14}}, {"id": 215, "type": "parenthesized_expression", "text": "(read(io, cp, cc) != cc)", "parent": 214, "children": [216], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 28}}, {"id": 216, "type": "binary_expression", "text": "read(io, cp, cc) != cc", "parent": 215, "children": [217, 223, 224], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 27}}, {"id": 217, "type": "call_expression", "text": "read(io, cp, cc)", "parent": 216, "children": [218, 219], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 21}}, {"id": 218, "type": "identifier", "text": "read", "parent": 217, "children": [], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 9}}, {"id": 219, "type": "argument_list", "text": "(io, cp, cc)", "parent": 217, "children": [220, 221, 222], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 21}}, {"id": 220, "type": "identifier", "text": "io", "parent": 219, "children": [], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 12}}, {"id": 221, "type": "identifier", "text": "cp", "parent": 219, "children": [], "start_point": {"row": 96, "column": 14}, "end_point": {"row": 96, "column": 16}}, {"id": 222, "type": "identifier", "text": "cc", "parent": 219, "children": [], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 20}}, {"id": 223, "type": "!=", "text": "!=", "parent": 216, "children": [], "start_point": {"row": 96, "column": 22}, "end_point": {"row": 96, "column": 24}}, {"id": 224, "type": "identifier", "text": "cc", "parent": 216, "children": [], "start_point": {"row": 96, "column": 25}, "end_point": {"row": 96, "column": 27}}, {"id": 225, "type": "goto_statement", "text": "goto shread;", "parent": 214, "children": [226, 227], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 14}}, {"id": 226, "type": "goto", "text": "goto", "parent": 225, "children": [], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 6}}, {"id": 227, "type": "statement_identifier", "text": "shread", "parent": 225, "children": [], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 13}}, {"id": 228, "type": "assignment_expression", "text": "cp += cc", "parent": 22, "children": [229, 230, 231], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 9}}, {"id": 229, "type": "identifier", "text": "cp", "parent": 228, "children": [], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 3}}, {"id": 230, "type": "+=", "text": "+=", "parent": 228, "children": [], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 6}}, {"id": 231, "type": "identifier", "text": "cc", "parent": 228, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 9}}, {"id": 232, "type": "if_statement", "text": "if (magic == NMAGIC) {\n\t\tregister int mask = N_PAGSIZ(x) - 1;\n\t\twhile ((int)cp & mask)\n\t\t\t*cp++ = 0;\n\t}", "parent": 22, "children": [233], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 107, "column": 2}}, {"id": 233, "type": "parenthesized_expression", "text": "(magic == NMAGIC)", "parent": 232, "children": [234], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 21}}, {"id": 234, "type": "binary_expression", "text": "magic == NMAGIC", "parent": 233, "children": [235, 236, 237], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 20}}, {"id": 235, "type": "identifier", "text": "magic", "parent": 234, "children": [], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 10}}, {"id": 236, "type": "==", "text": "==", "parent": 234, "children": [], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 13}}, {"id": 237, "type": "identifier", "text": "NMAGIC", "parent": 234, "children": [], "start_point": {"row": 103, "column": 14}, "end_point": {"row": 103, "column": 20}}, {"id": 238, "type": "declaration", "text": "register int mask = N_PAGSIZ(x) - 1;", "parent": 232, "children": [239, 241, 242], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 38}}, {"id": 239, "type": "storage_class_specifier", "text": "register", "parent": 238, "children": [240], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 10}}, {"id": 240, "type": "register", "text": "register", "parent": 239, "children": [], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 10}}, {"id": 241, "type": "primitive_type", "text": "int", "parent": 238, "children": [], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 14}}, {"id": 242, "type": "init_declarator", "text": "mask = N_PAGSIZ(x) - 1", "parent": 238, "children": [243, 244, 245], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 37}}, {"id": 243, "type": "identifier", "text": "mask", "parent": 242, "children": [], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 19}}, {"id": 244, "type": "=", "text": "=", "parent": 242, "children": [], "start_point": {"row": 104, "column": 20}, "end_point": {"row": 104, "column": 21}}, {"id": 245, "type": "binary_expression", "text": "N_PAGSIZ(x) - 1", "parent": 242, "children": [246, 250, 251], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 37}}, {"id": 246, "type": "call_expression", "text": "N_PAGSIZ(x)", "parent": 245, "children": [247, 248], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 33}}, {"id": 247, "type": "identifier", "text": "N_PAGSIZ", "parent": 246, "children": [], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 30}}, {"id": 248, "type": "argument_list", "text": "(x)", "parent": 246, "children": [249], "start_point": {"row": 104, "column": 30}, "end_point": {"row": 104, "column": 33}}, {"id": 249, "type": "identifier", "text": "x", "parent": 248, "children": [], "start_point": {"row": 104, "column": 31}, "end_point": {"row": 104, "column": 32}}, {"id": 250, "type": "-", "text": "-", "parent": 245, "children": [], "start_point": {"row": 104, "column": 34}, "end_point": {"row": 104, "column": 35}}, {"id": 251, "type": "number_literal", "text": "1", "parent": 245, "children": [], "start_point": {"row": 104, "column": 36}, "end_point": {"row": 104, "column": 37}}, {"id": 252, "type": "while_statement", "text": "while ((int)cp & mask)\n\t\t\t*cp++ = 0;", "parent": 232, "children": [253], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 106, "column": 13}}, {"id": 253, "type": "parenthesized_expression", "text": "((int)cp & mask)", "parent": 252, "children": [254], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 24}}, {"id": 254, "type": "binary_expression", "text": "(int)cp & mask", "parent": 253, "children": [255, 259], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 23}}, {"id": 255, "type": "cast_expression", "text": "(int)cp", "parent": 254, "children": [256, 258], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 16}}, {"id": 256, "type": "type_descriptor", "text": "int", "parent": 255, "children": [257], "start_point": {"row": 105, "column": 10}, "end_point": {"row": 105, "column": 13}}, {"id": 257, "type": "primitive_type", "text": "int", "parent": 256, "children": [], "start_point": {"row": 105, "column": 10}, "end_point": {"row": 105, "column": 13}}, {"id": 258, "type": "identifier", "text": "cp", "parent": 255, "children": [], "start_point": {"row": 105, "column": 14}, "end_point": {"row": 105, "column": 16}}, {"id": 259, "type": "identifier", "text": "mask", "parent": 254, "children": [], "start_point": {"row": 105, "column": 19}, "end_point": {"row": 105, "column": 23}}, {"id": 260, "type": "assignment_expression", "text": "*cp++ = 0", "parent": 252, "children": [261, 266, 267], "start_point": {"row": 106, "column": 3}, "end_point": {"row": 106, "column": 12}}, {"id": 261, "type": "pointer_expression", "text": "*cp++", "parent": 260, "children": [262, 263], "start_point": {"row": 106, "column": 3}, "end_point": {"row": 106, "column": 8}}, {"id": 262, "type": "*", "text": "*", "parent": 261, "children": [], "start_point": {"row": 106, "column": 3}, "end_point": {"row": 106, "column": 4}}, {"id": 263, "type": "update_expression", "text": "cp++", "parent": 261, "children": [264, 265], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 8}}, {"id": 264, "type": "identifier", "text": "cp", "parent": 263, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 6}}, {"id": 265, "type": "++", "text": "++", "parent": 263, "children": [], "start_point": {"row": 106, "column": 6}, "end_point": {"row": 106, "column": 8}}, {"id": 266, "type": "=", "text": "=", "parent": 260, "children": [], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 10}}, {"id": 267, "type": "number_literal", "text": "0", "parent": 260, "children": [], "start_point": {"row": 106, "column": 11}, "end_point": {"row": 106, "column": 12}}, {"id": 268, "type": "call_expression", "text": "printf(\"+%d\", x.a_data)", "parent": 22, "children": [269, 270], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 24}}, {"id": 269, "type": "identifier", "text": "printf", "parent": 268, "children": [], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 7}}, {"id": 270, "type": "argument_list", "text": "(\"+%d\", x.a_data)", "parent": 268, "children": [271, 272], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 24}}, {"id": 271, "type": "string_literal", "text": "\"+%d\"", "parent": 270, "children": [], "start_point": {"row": 112, "column": 8}, "end_point": {"row": 112, "column": 13}}, {"id": 272, "type": "field_expression", "text": "x.a_data", "parent": 270, "children": [273, 274], "start_point": {"row": 112, "column": 15}, "end_point": {"row": 112, "column": 23}}, {"id": 273, "type": "identifier", "text": "x", "parent": 272, "children": [], "start_point": {"row": 112, "column": 15}, "end_point": {"row": 112, "column": 16}}, {"id": 274, "type": "field_identifier", "text": "a_data", "parent": 272, "children": [], "start_point": {"row": 112, "column": 17}, "end_point": {"row": 112, "column": 23}}, {"id": 275, "type": "if_statement", "text": "if (read(io, cp, x.a_data) != x.a_data)\n\t\tgoto shread;", "parent": 22, "children": [276, 290], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 114, "column": 14}}, {"id": 276, "type": "parenthesized_expression", "text": "(read(io, cp, x.a_data) != x.a_data)", "parent": 275, "children": [277], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 40}}, {"id": 277, "type": "binary_expression", "text": "read(io, cp, x.a_data) != x.a_data", "parent": 276, "children": [278, 286, 287], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 39}}, {"id": 278, "type": "call_expression", "text": "read(io, cp, x.a_data)", "parent": 277, "children": [279, 280], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 27}}, {"id": 279, "type": "identifier", "text": "read", "parent": 278, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 9}}, {"id": 280, "type": "argument_list", "text": "(io, cp, x.a_data)", "parent": 278, "children": [281, 282, 283], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 27}}, {"id": 281, "type": "identifier", "text": "io", "parent": 280, "children": [], "start_point": {"row": 113, "column": 10}, "end_point": {"row": 113, "column": 12}}, {"id": 282, "type": "identifier", "text": "cp", "parent": 280, "children": [], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 16}}, {"id": 283, "type": "field_expression", "text": "x.a_data", "parent": 280, "children": [284, 285], "start_point": {"row": 113, "column": 18}, "end_point": {"row": 113, "column": 26}}, {"id": 284, "type": "identifier", "text": "x", "parent": 283, "children": [], "start_point": {"row": 113, "column": 18}, "end_point": {"row": 113, "column": 19}}, {"id": 285, "type": "field_identifier", "text": "a_data", "parent": 283, "children": [], "start_point": {"row": 113, "column": 20}, "end_point": {"row": 113, "column": 26}}, {"id": 286, "type": "!=", "text": "!=", "parent": 277, "children": [], "start_point": {"row": 113, "column": 28}, "end_point": {"row": 113, "column": 30}}, {"id": 287, "type": "field_expression", "text": "x.a_data", "parent": 277, "children": [288, 289], "start_point": {"row": 113, "column": 31}, "end_point": {"row": 113, "column": 39}}, {"id": 288, "type": "identifier", "text": "x", "parent": 287, "children": [], "start_point": {"row": 113, "column": 31}, "end_point": {"row": 113, "column": 32}}, {"id": 289, "type": "field_identifier", "text": "a_data", "parent": 287, "children": [], "start_point": {"row": 113, "column": 33}, "end_point": {"row": 113, "column": 39}}, {"id": 290, "type": "goto_statement", "text": "goto shread;", "parent": 275, "children": [291, 292], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 14}}, {"id": 291, "type": "goto", "text": "goto", "parent": 290, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 6}}, {"id": 292, "type": "statement_identifier", "text": "shread", "parent": 290, "children": [], "start_point": {"row": 114, "column": 7}, "end_point": {"row": 114, "column": 13}}, {"id": 293, "type": "assignment_expression", "text": "cp += x.a_data", "parent": 22, "children": [294, 295, 296], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 115, "column": 15}}, {"id": 294, "type": "identifier", "text": "cp", "parent": 293, "children": [], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 115, "column": 3}}, {"id": 295, "type": "+=", "text": "+=", "parent": 293, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 6}}, {"id": 296, "type": "field_expression", "text": "x.a_data", "parent": 293, "children": [297, 298], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 15}}, {"id": 297, "type": "identifier", "text": "x", "parent": 296, "children": [], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 8}}, {"id": 298, "type": "field_identifier", "text": "a_data", "parent": 296, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 15}}, {"id": 299, "type": "call_expression", "text": "printf(\"+%d\", x.a_bss)", "parent": 22, "children": [300, 301], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 23}}, {"id": 300, "type": "identifier", "text": "printf", "parent": 299, "children": [], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 7}}, {"id": 301, "type": "argument_list", "text": "(\"+%d\", x.a_bss)", "parent": 299, "children": [302, 303], "start_point": {"row": 120, "column": 7}, "end_point": {"row": 120, "column": 23}}, {"id": 302, "type": "string_literal", "text": "\"+%d\"", "parent": 301, "children": [], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 120, "column": 13}}, {"id": 303, "type": "field_expression", "text": "x.a_bss", "parent": 301, "children": [304, 305], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 22}}, {"id": 304, "type": "identifier", "text": "x", "parent": 303, "children": [], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 16}}, {"id": 305, "type": "field_identifier", "text": "a_bss", "parent": 303, "children": [], "start_point": {"row": 120, "column": 17}, "end_point": {"row": 120, "column": 22}}, {"id": 306, "type": "assignment_expression", "text": "cc = x.a_bss", "parent": 22, "children": [307, 308, 309], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 121, "column": 13}}, {"id": 307, "type": "identifier", "text": "cc", "parent": 306, "children": [], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 121, "column": 3}}, {"id": 308, "type": "=", "text": "=", "parent": 306, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 5}}, {"id": 309, "type": "field_expression", "text": "x.a_bss", "parent": 306, "children": [310, 311], "start_point": {"row": 121, "column": 6}, "end_point": {"row": 121, "column": 13}}, {"id": 310, "type": "identifier", "text": "x", "parent": 309, "children": [], "start_point": {"row": 121, "column": 6}, "end_point": {"row": 121, "column": 7}}, {"id": 311, "type": "field_identifier", "text": "a_bss", "parent": 309, "children": [], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 13}}, {"id": 312, "type": "while_statement", "text": "while ((int)cp & 3) {\n\t\t*cp++ = 0;\n\t\t--cc;\n\t}", "parent": 22, "children": [313], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 125, "column": 2}}, {"id": 313, "type": "parenthesized_expression", "text": "((int)cp & 3)", "parent": 312, "children": [314], "start_point": {"row": 122, "column": 7}, "end_point": {"row": 122, "column": 20}}, {"id": 314, "type": "binary_expression", "text": "(int)cp & 3", "parent": 313, "children": [315, 319], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 19}}, {"id": 315, "type": "cast_expression", "text": "(int)cp", "parent": 314, "children": [316, 318], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 15}}, {"id": 316, "type": "type_descriptor", "text": "int", "parent": 315, "children": [317], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 12}}, {"id": 317, "type": "primitive_type", "text": "int", "parent": 316, "children": [], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 12}}, {"id": 318, "type": "identifier", "text": "cp", "parent": 315, "children": [], "start_point": {"row": 122, "column": 13}, "end_point": {"row": 122, "column": 15}}, {"id": 319, "type": "number_literal", "text": "3", "parent": 314, "children": [], "start_point": {"row": 122, "column": 18}, "end_point": {"row": 122, "column": 19}}, {"id": 320, "type": "assignment_expression", "text": "*cp++ = 0", "parent": 312, "children": [321, 326, 327], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 11}}, {"id": 321, "type": "pointer_expression", "text": "*cp++", "parent": 320, "children": [322, 323], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 7}}, {"id": 322, "type": "*", "text": "*", "parent": 321, "children": [], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 3}}, {"id": 323, "type": "update_expression", "text": "cp++", "parent": 321, "children": [324, 325], "start_point": {"row": 123, "column": 3}, "end_point": {"row": 123, "column": 7}}, {"id": 324, "type": "identifier", "text": "cp", "parent": 323, "children": [], "start_point": {"row": 123, "column": 3}, "end_point": {"row": 123, "column": 5}}, {"id": 325, "type": "++", "text": "++", "parent": 323, "children": [], "start_point": {"row": 123, "column": 5}, "end_point": {"row": 123, "column": 7}}, {"id": 326, "type": "=", "text": "=", "parent": 320, "children": [], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 9}}, {"id": 327, "type": "number_literal", "text": "0", "parent": 320, "children": [], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 11}}, {"id": 328, "type": "update_expression", "text": "--cc", "parent": 312, "children": [329, 330], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 6}}, {"id": 329, "type": "--", "text": "--", "parent": 328, "children": [], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 4}}, {"id": 330, "type": "identifier", "text": "cc", "parent": 328, "children": [], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 6}}, {"id": 331, "type": "assignment_expression", "text": "ip = (int *)cp", "parent": 22, "children": [332, 333, 334], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 15}}, {"id": 332, "type": "identifier", "text": "ip", "parent": 331, "children": [], "start_point": {"row": 126, "column": 1}, "end_point": {"row": 126, "column": 3}}, {"id": 333, "type": "=", "text": "=", "parent": 331, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 5}}, {"id": 334, "type": "cast_expression", "text": "(int *)cp", "parent": 331, "children": [335, 339], "start_point": {"row": 126, "column": 6}, "end_point": {"row": 126, "column": 15}}, {"id": 335, "type": "type_descriptor", "text": "int *", "parent": 334, "children": [336, 337], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 12}}, {"id": 336, "type": "primitive_type", "text": "int", "parent": 335, "children": [], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 10}}, {"id": 337, "type": "abstract_pointer_declarator", "text": "*", "parent": 335, "children": [338], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 12}}, {"id": 338, "type": "*", "text": "*", "parent": 337, "children": [], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 12}}, {"id": 339, "type": "identifier", "text": "cp", "parent": 334, "children": [], "start_point": {"row": 126, "column": 13}, "end_point": {"row": 126, "column": 15}}, {"id": 340, "type": "assignment_expression", "text": "cp += cc", "parent": 22, "children": [341, 342, 343], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 9}}, {"id": 341, "type": "identifier", "text": "cp", "parent": 340, "children": [], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 3}}, {"id": 342, "type": "+=", "text": "+=", "parent": 340, "children": [], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 6}}, {"id": 343, "type": "identifier", "text": "cc", "parent": 340, "children": [], "start_point": {"row": 127, "column": 7}, "end_point": {"row": 127, "column": 9}}, {"id": 344, "type": "while_statement", "text": "while ((char *)ip < cp)\n\t\t*ip++ = 0;", "parent": 22, "children": [345], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 129, "column": 12}}, {"id": 345, "type": "parenthesized_expression", "text": "((char *)ip < cp)", "parent": 344, "children": [346], "start_point": {"row": 128, "column": 7}, "end_point": {"row": 128, "column": 24}}, {"id": 346, "type": "binary_expression", "text": "(char *)ip < cp", "parent": 345, "children": [347, 353, 354], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 23}}, {"id": 347, "type": "cast_expression", "text": "(char *)ip", "parent": 346, "children": [348, 352], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 18}}, {"id": 348, "type": "type_descriptor", "text": "char *", "parent": 347, "children": [349, 350], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 15}}, {"id": 349, "type": "primitive_type", "text": "char", "parent": 348, "children": [], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 13}}, {"id": 350, "type": "abstract_pointer_declarator", "text": "*", "parent": 348, "children": [351], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 15}}, {"id": 351, "type": "*", "text": "*", "parent": 350, "children": [], "start_point": {"row": 128, "column": 14}, "end_point": {"row": 128, "column": 15}}, {"id": 352, "type": "identifier", "text": "ip", "parent": 347, "children": [], "start_point": {"row": 128, "column": 16}, "end_point": {"row": 128, "column": 18}}, {"id": 353, "type": "<", "text": "<", "parent": 346, "children": [], "start_point": {"row": 128, "column": 19}, "end_point": {"row": 128, "column": 20}}, {"id": 354, "type": "identifier", "text": "cp", "parent": 346, "children": [], "start_point": {"row": 128, "column": 21}, "end_point": {"row": 128, "column": 23}}, {"id": 355, "type": "assignment_expression", "text": "*ip++ = 0", "parent": 344, "children": [356, 361, 362], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 11}}, {"id": 356, "type": "pointer_expression", "text": "*ip++", "parent": 355, "children": [357, 358], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 7}}, {"id": 357, "type": "*", "text": "*", "parent": 356, "children": [], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 3}}, {"id": 358, "type": "update_expression", "text": "ip++", "parent": 356, "children": [359, 360], "start_point": {"row": 129, "column": 3}, "end_point": {"row": 129, "column": 7}}, {"id": 359, "type": "identifier", "text": "ip", "parent": 358, "children": [], "start_point": {"row": 129, "column": 3}, "end_point": {"row": 129, "column": 5}}, {"id": 360, "type": "++", "text": "++", "parent": 358, "children": [], "start_point": {"row": 129, "column": 5}, "end_point": {"row": 129, "column": 7}}, {"id": 361, "type": "=", "text": "=", "parent": 355, "children": [], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 9}}, {"id": 362, "type": "number_literal", "text": "0", "parent": 355, "children": [], "start_point": {"row": 129, "column": 10}, "end_point": {"row": 129, "column": 11}}, {"id": 363, "type": "assignment_expression", "text": "*ip++ = x.a_syms", "parent": 22, "children": [364, 369, 370], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 17}}, {"id": 364, "type": "pointer_expression", "text": "*ip++", "parent": 363, "children": [365, 366], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 6}}, {"id": 365, "type": "*", "text": "*", "parent": 364, "children": [], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 2}}, {"id": 366, "type": "update_expression", "text": "ip++", "parent": 364, "children": [367, 368], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 6}}, {"id": 367, "type": "identifier", "text": "ip", "parent": 366, "children": [], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 4}}, {"id": 368, "type": "++", "text": "++", "parent": 366, "children": [], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 6}}, {"id": 369, "type": "=", "text": "=", "parent": 363, "children": [], "start_point": {"row": 135, "column": 7}, "end_point": {"row": 135, "column": 8}}, {"id": 370, "type": "field_expression", "text": "x.a_syms", "parent": 363, "children": [371, 372], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 17}}, {"id": 371, "type": "identifier", "text": "x", "parent": 370, "children": [], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 10}}, {"id": 372, "type": "field_identifier", "text": "a_syms", "parent": 370, "children": [], "start_point": {"row": 135, "column": 11}, "end_point": {"row": 135, "column": 17}}, {"id": 373, "type": "assignment_expression", "text": "cp = (char *) ip", "parent": 22, "children": [374, 375, 376], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 17}}, {"id": 374, "type": "identifier", "text": "cp", "parent": 373, "children": [], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 3}}, {"id": 375, "type": "=", "text": "=", "parent": 373, "children": [], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 5}}, {"id": 376, "type": "cast_expression", "text": "(char *) ip", "parent": 373, "children": [377, 381], "start_point": {"row": 136, "column": 6}, "end_point": {"row": 136, "column": 17}}, {"id": 377, "type": "type_descriptor", "text": "char *", "parent": 376, "children": [378, 379], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 13}}, {"id": 378, "type": "primitive_type", "text": "char", "parent": 377, "children": [], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 11}}, {"id": 379, "type": "abstract_pointer_declarator", "text": "*", "parent": 377, "children": [380], "start_point": {"row": 136, "column": 12}, "end_point": {"row": 136, "column": 13}}, {"id": 380, "type": "*", "text": "*", "parent": 379, "children": [], "start_point": {"row": 136, "column": 12}, "end_point": {"row": 136, "column": 13}}, {"id": 381, "type": "identifier", "text": "ip", "parent": 376, "children": [], "start_point": {"row": 136, "column": 15}, "end_point": {"row": 136, "column": 17}}, {"id": 382, "type": "if_statement", "text": "if (x.a_syms > 0) {\n\t\t/* Symbol table and string table length word. */\n\t\tcc = x.a_syms;\n\t\tprintf(\"+[%d\", cc);\n\t\tcc += sizeof(int);\t/* strtab length too */\n\t\tif (read(io, cp, cc) != cc)\n\t\t\tgoto shread;\n\t\tcp += x.a_syms;\n\t\tip = (int *)cp;\t\t/* points to strtab length */\n\t\tcp += sizeof(int);\n\n\t\t/* String table. Length word includes itself. */\n\t\tcc = *ip;\n\t\tprintf(\"+%d]\", cc);\n\t\tcc -= sizeof(int);\n\t\tif (cc <= 0)\n\t\t\tgoto shread;\n\t\tif (read(io, cp, cc) != cc)\n\t\t\tgoto shread;\n\t\tcp += cc;\n\t}", "parent": 22, "children": [383], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 158, "column": 2}}, {"id": 383, "type": "parenthesized_expression", "text": "(x.a_syms > 0)", "parent": 382, "children": [384], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 18}}, {"id": 384, "type": "binary_expression", "text": "x.a_syms > 0", "parent": 383, "children": [385, 388, 389], "start_point": {"row": 138, "column": 5}, "end_point": {"row": 138, "column": 17}}, {"id": 385, "type": "field_expression", "text": "x.a_syms", "parent": 384, "children": [386, 387], "start_point": {"row": 138, "column": 5}, "end_point": {"row": 138, "column": 13}}, {"id": 386, "type": "identifier", "text": "x", "parent": 385, "children": [], "start_point": {"row": 138, "column": 5}, "end_point": {"row": 138, "column": 6}}, {"id": 387, "type": "field_identifier", "text": "a_syms", "parent": 385, "children": [], "start_point": {"row": 138, "column": 7}, "end_point": {"row": 138, "column": 13}}, {"id": 388, "type": ">", "text": ">", "parent": 384, "children": [], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 15}}, {"id": 389, "type": "number_literal", "text": "0", "parent": 384, "children": [], "start_point": {"row": 138, "column": 16}, "end_point": {"row": 138, "column": 17}}, {"id": 390, "type": "assignment_expression", "text": "cc = x.a_syms", "parent": 382, "children": [391, 392, 393], "start_point": {"row": 140, "column": 2}, "end_point": {"row": 140, "column": 15}}, {"id": 391, "type": "identifier", "text": "cc", "parent": 390, "children": [], "start_point": {"row": 140, "column": 2}, "end_point": {"row": 140, "column": 4}}, {"id": 392, "type": "=", "text": "=", "parent": 390, "children": [], "start_point": {"row": 140, "column": 5}, "end_point": {"row": 140, "column": 6}}, {"id": 393, "type": "field_expression", "text": "x.a_syms", "parent": 390, "children": [394, 395], "start_point": {"row": 140, "column": 7}, "end_point": {"row": 140, "column": 15}}, {"id": 394, "type": "identifier", "text": "x", "parent": 393, "children": [], "start_point": {"row": 140, "column": 7}, "end_point": {"row": 140, "column": 8}}, {"id": 395, "type": "field_identifier", "text": "a_syms", "parent": 393, "children": [], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 15}}, {"id": 396, "type": "call_expression", "text": "printf(\"+[%d\", cc)", "parent": 382, "children": [397, 398], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 20}}, {"id": 397, "type": "identifier", "text": "printf", "parent": 396, "children": [], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 8}}, {"id": 398, "type": "argument_list", "text": "(\"+[%d\", cc)", "parent": 396, "children": [399, 400], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 20}}, {"id": 399, "type": "string_literal", "text": "\"+[%d\"", "parent": 398, "children": [], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 15}}, {"id": 400, "type": "identifier", "text": "cc", "parent": 398, "children": [], "start_point": {"row": 141, "column": 17}, "end_point": {"row": 141, "column": 19}}, {"id": 401, "type": "assignment_expression", "text": "cc += sizeof(int)", "parent": 382, "children": [402, 403, 404], "start_point": {"row": 142, "column": 2}, "end_point": {"row": 142, "column": 19}}, {"id": 402, "type": "identifier", "text": "cc", "parent": 401, "children": [], "start_point": {"row": 142, "column": 2}, "end_point": {"row": 142, "column": 4}}, {"id": 403, "type": "+=", "text": "+=", "parent": 401, "children": [], "start_point": {"row": 142, "column": 5}, "end_point": {"row": 142, "column": 7}}, {"id": 404, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 401, "children": [405], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 19}}, {"id": 405, "type": "type_descriptor", "text": "int", "parent": 404, "children": [406], "start_point": {"row": 142, "column": 15}, "end_point": {"row": 142, "column": 18}}, {"id": 406, "type": "primitive_type", "text": "int", "parent": 405, "children": [], "start_point": {"row": 142, "column": 15}, "end_point": {"row": 142, "column": 18}}, {"id": 407, "type": "if_statement", "text": "if (read(io, cp, cc) != cc)\n\t\t\tgoto shread;", "parent": 382, "children": [408, 418], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 144, "column": 15}}, {"id": 408, "type": "parenthesized_expression", "text": "(read(io, cp, cc) != cc)", "parent": 407, "children": [409], "start_point": {"row": 143, "column": 5}, "end_point": {"row": 143, "column": 29}}, {"id": 409, "type": "binary_expression", "text": "read(io, cp, cc) != cc", "parent": 408, "children": [410, 416, 417], "start_point": {"row": 143, "column": 6}, "end_point": {"row": 143, "column": 28}}, {"id": 410, "type": "call_expression", "text": "read(io, cp, cc)", "parent": 409, "children": [411, 412], "start_point": {"row": 143, "column": 6}, "end_point": {"row": 143, "column": 22}}, {"id": 411, "type": "identifier", "text": "read", "parent": 410, "children": [], "start_point": {"row": 143, "column": 6}, "end_point": {"row": 143, "column": 10}}, {"id": 412, "type": "argument_list", "text": "(io, cp, cc)", "parent": 410, "children": [413, 414, 415], "start_point": {"row": 143, "column": 10}, "end_point": {"row": 143, "column": 22}}, {"id": 413, "type": "identifier", "text": "io", "parent": 412, "children": [], "start_point": {"row": 143, "column": 11}, "end_point": {"row": 143, "column": 13}}, {"id": 414, "type": "identifier", "text": "cp", "parent": 412, "children": [], "start_point": {"row": 143, "column": 15}, "end_point": {"row": 143, "column": 17}}, {"id": 415, "type": "identifier", "text": "cc", "parent": 412, "children": [], "start_point": {"row": 143, "column": 19}, "end_point": {"row": 143, "column": 21}}, {"id": 416, "type": "!=", "text": "!=", "parent": 409, "children": [], "start_point": {"row": 143, "column": 23}, "end_point": {"row": 143, "column": 25}}, {"id": 417, "type": "identifier", "text": "cc", "parent": 409, "children": [], "start_point": {"row": 143, "column": 26}, "end_point": {"row": 143, "column": 28}}, {"id": 418, "type": "goto_statement", "text": "goto shread;", "parent": 407, "children": [419, 420], "start_point": {"row": 144, "column": 3}, "end_point": {"row": 144, "column": 15}}, {"id": 419, "type": "goto", "text": "goto", "parent": 418, "children": [], "start_point": {"row": 144, "column": 3}, "end_point": {"row": 144, "column": 7}}, {"id": 420, "type": "statement_identifier", "text": "shread", "parent": 418, "children": [], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 14}}, {"id": 421, "type": "assignment_expression", "text": "cp += x.a_syms", "parent": 382, "children": [422, 423, 424], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 16}}, {"id": 422, "type": "identifier", "text": "cp", "parent": 421, "children": [], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 4}}, {"id": 423, "type": "+=", "text": "+=", "parent": 421, "children": [], "start_point": {"row": 145, "column": 5}, "end_point": {"row": 145, "column": 7}}, {"id": 424, "type": "field_expression", "text": "x.a_syms", "parent": 421, "children": [425, 426], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 16}}, {"id": 425, "type": "identifier", "text": "x", "parent": 424, "children": [], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 9}}, {"id": 426, "type": "field_identifier", "text": "a_syms", "parent": 424, "children": [], "start_point": {"row": 145, "column": 10}, "end_point": {"row": 145, "column": 16}}, {"id": 427, "type": "assignment_expression", "text": "ip = (int *)cp", "parent": 382, "children": [428, 429, 430], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 146, "column": 16}}, {"id": 428, "type": "identifier", "text": "ip", "parent": 427, "children": [], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 146, "column": 4}}, {"id": 429, "type": "=", "text": "=", "parent": 427, "children": [], "start_point": {"row": 146, "column": 5}, "end_point": {"row": 146, "column": 6}}, {"id": 430, "type": "cast_expression", "text": "(int *)cp", "parent": 427, "children": [431, 435], "start_point": {"row": 146, "column": 7}, "end_point": {"row": 146, "column": 16}}, {"id": 431, "type": "type_descriptor", "text": "int *", "parent": 430, "children": [432, 433], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 13}}, {"id": 432, "type": "primitive_type", "text": "int", "parent": 431, "children": [], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 11}}, {"id": 433, "type": "abstract_pointer_declarator", "text": "*", "parent": 431, "children": [434], "start_point": {"row": 146, "column": 12}, "end_point": {"row": 146, "column": 13}}, {"id": 434, "type": "*", "text": "*", "parent": 433, "children": [], "start_point": {"row": 146, "column": 12}, "end_point": {"row": 146, "column": 13}}, {"id": 435, "type": "identifier", "text": "cp", "parent": 430, "children": [], "start_point": {"row": 146, "column": 14}, "end_point": {"row": 146, "column": 16}}, {"id": 436, "type": "assignment_expression", "text": "cp += sizeof(int)", "parent": 382, "children": [437, 438, 439], "start_point": {"row": 147, "column": 2}, "end_point": {"row": 147, "column": 19}}, {"id": 437, "type": "identifier", "text": "cp", "parent": 436, "children": [], "start_point": {"row": 147, "column": 2}, "end_point": {"row": 147, "column": 4}}, {"id": 438, "type": "+=", "text": "+=", "parent": 436, "children": [], "start_point": {"row": 147, "column": 5}, "end_point": {"row": 147, "column": 7}}, {"id": 439, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 436, "children": [440], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 19}}, {"id": 440, "type": "type_descriptor", "text": "int", "parent": 439, "children": [441], "start_point": {"row": 147, "column": 15}, "end_point": {"row": 147, "column": 18}}, {"id": 441, "type": "primitive_type", "text": "int", "parent": 440, "children": [], "start_point": {"row": 147, "column": 15}, "end_point": {"row": 147, "column": 18}}, {"id": 442, "type": "assignment_expression", "text": "cc = *ip", "parent": 382, "children": [443, 444, 445], "start_point": {"row": 150, "column": 2}, "end_point": {"row": 150, "column": 10}}, {"id": 443, "type": "identifier", "text": "cc", "parent": 442, "children": [], "start_point": {"row": 150, "column": 2}, "end_point": {"row": 150, "column": 4}}, {"id": 444, "type": "=", "text": "=", "parent": 442, "children": [], "start_point": {"row": 150, "column": 5}, "end_point": {"row": 150, "column": 6}}, {"id": 445, "type": "pointer_expression", "text": "*ip", "parent": 442, "children": [446, 447], "start_point": {"row": 150, "column": 7}, "end_point": {"row": 150, "column": 10}}, {"id": 446, "type": "*", "text": "*", "parent": 445, "children": [], "start_point": {"row": 150, "column": 7}, "end_point": {"row": 150, "column": 8}}, {"id": 447, "type": "identifier", "text": "ip", "parent": 445, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 10}}, {"id": 448, "type": "call_expression", "text": "printf(\"+%d]\", cc)", "parent": 382, "children": [449, 450], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 20}}, {"id": 449, "type": "identifier", "text": "printf", "parent": 448, "children": [], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 8}}, {"id": 450, "type": "argument_list", "text": "(\"+%d]\", cc)", "parent": 448, "children": [451, 452], "start_point": {"row": 151, "column": 8}, "end_point": {"row": 151, "column": 20}}, {"id": 451, "type": "string_literal", "text": "\"+%d]\"", "parent": 450, "children": [], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 15}}, {"id": 452, "type": "identifier", "text": "cc", "parent": 450, "children": [], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 19}}, {"id": 453, "type": "assignment_expression", "text": "cc -= sizeof(int)", "parent": 382, "children": [454, 455, 456], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 19}}, {"id": 454, "type": "identifier", "text": "cc", "parent": 453, "children": [], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 4}}, {"id": 455, "type": "-=", "text": "-=", "parent": 453, "children": [], "start_point": {"row": 152, "column": 5}, "end_point": {"row": 152, "column": 7}}, {"id": 456, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 453, "children": [457], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 19}}, {"id": 457, "type": "type_descriptor", "text": "int", "parent": 456, "children": [458], "start_point": {"row": 152, "column": 15}, "end_point": {"row": 152, "column": 18}}, {"id": 458, "type": "primitive_type", "text": "int", "parent": 457, "children": [], "start_point": {"row": 152, "column": 15}, "end_point": {"row": 152, "column": 18}}, {"id": 459, "type": "if_statement", "text": "if (cc <= 0)\n\t\t\tgoto shread;", "parent": 382, "children": [460, 465], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 154, "column": 15}}, {"id": 460, "type": "parenthesized_expression", "text": "(cc <= 0)", "parent": 459, "children": [461], "start_point": {"row": 153, "column": 5}, "end_point": {"row": 153, "column": 14}}, {"id": 461, "type": "binary_expression", "text": "cc <= 0", "parent": 460, "children": [462, 463, 464], "start_point": {"row": 153, "column": 6}, "end_point": {"row": 153, "column": 13}}, {"id": 462, "type": "identifier", "text": "cc", "parent": 461, "children": [], "start_point": {"row": 153, "column": 6}, "end_point": {"row": 153, "column": 8}}, {"id": 463, "type": "<=", "text": "<=", "parent": 461, "children": [], "start_point": {"row": 153, "column": 9}, "end_point": {"row": 153, "column": 11}}, {"id": 464, "type": "number_literal", "text": "0", "parent": 461, "children": [], "start_point": {"row": 153, "column": 12}, "end_point": {"row": 153, "column": 13}}, {"id": 465, "type": "goto_statement", "text": "goto shread;", "parent": 459, "children": [466, 467], "start_point": {"row": 154, "column": 3}, "end_point": {"row": 154, "column": 15}}, {"id": 466, "type": "goto", "text": "goto", "parent": 465, "children": [], "start_point": {"row": 154, "column": 3}, "end_point": {"row": 154, "column": 7}}, {"id": 467, "type": "statement_identifier", "text": "shread", "parent": 465, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 14}}, {"id": 468, "type": "if_statement", "text": "if (read(io, cp, cc) != cc)\n\t\t\tgoto shread;", "parent": 382, "children": [469, 479], "start_point": {"row": 155, "column": 2}, "end_point": {"row": 156, "column": 15}}, {"id": 469, "type": "parenthesized_expression", "text": "(read(io, cp, cc) != cc)", "parent": 468, "children": [470], "start_point": {"row": 155, "column": 5}, "end_point": {"row": 155, "column": 29}}, {"id": 470, "type": "binary_expression", "text": "read(io, cp, cc) != cc", "parent": 469, "children": [471, 477, 478], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 28}}, {"id": 471, "type": "call_expression", "text": "read(io, cp, cc)", "parent": 470, "children": [472, 473], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 22}}, {"id": 472, "type": "identifier", "text": "read", "parent": 471, "children": [], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 10}}, {"id": 473, "type": "argument_list", "text": "(io, cp, cc)", "parent": 471, "children": [474, 475, 476], "start_point": {"row": 155, "column": 10}, "end_point": {"row": 155, "column": 22}}, {"id": 474, "type": "identifier", "text": "io", "parent": 473, "children": [], "start_point": {"row": 155, "column": 11}, "end_point": {"row": 155, "column": 13}}, {"id": 475, "type": "identifier", "text": "cp", "parent": 473, "children": [], "start_point": {"row": 155, "column": 15}, "end_point": {"row": 155, "column": 17}}, {"id": 476, "type": "identifier", "text": "cc", "parent": 473, "children": [], "start_point": {"row": 155, "column": 19}, "end_point": {"row": 155, "column": 21}}, {"id": 477, "type": "!=", "text": "!=", "parent": 470, "children": [], "start_point": {"row": 155, "column": 23}, "end_point": {"row": 155, "column": 25}}, {"id": 478, "type": "identifier", "text": "cc", "parent": 470, "children": [], "start_point": {"row": 155, "column": 26}, "end_point": {"row": 155, "column": 28}}, {"id": 479, "type": "goto_statement", "text": "goto shread;", "parent": 468, "children": [480, 481], "start_point": {"row": 156, "column": 3}, "end_point": {"row": 156, "column": 15}}, {"id": 480, "type": "goto", "text": "goto", "parent": 479, "children": [], "start_point": {"row": 156, "column": 3}, "end_point": {"row": 156, "column": 7}}, {"id": 481, "type": "statement_identifier", "text": "shread", "parent": 479, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 14}}, {"id": 482, "type": "assignment_expression", "text": "cp += cc", "parent": 382, "children": [483, 484, 485], "start_point": {"row": 157, "column": 2}, "end_point": {"row": 157, "column": 10}}, {"id": 483, "type": "identifier", "text": "cp", "parent": 482, "children": [], "start_point": {"row": 157, "column": 2}, "end_point": {"row": 157, "column": 4}}, {"id": 484, "type": "+=", "text": "+=", "parent": 482, "children": [], "start_point": {"row": 157, "column": 5}, "end_point": {"row": 157, "column": 7}}, {"id": 485, "type": "identifier", "text": "cc", "parent": 482, "children": [], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 10}}, {"id": 486, "type": "call_expression", "text": "printf(\"=0x%lx\\n\", cp - loadaddr)", "parent": 22, "children": [487, 488], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 34}}, {"id": 487, "type": "identifier", "text": "printf", "parent": 486, "children": [], "start_point": {"row": 159, "column": 1}, "end_point": {"row": 159, "column": 7}}, {"id": 488, "type": "argument_list", "text": "(\"=0x%lx\\n\", cp - loadaddr)", "parent": 486, "children": [489, 491], "start_point": {"row": 159, "column": 7}, "end_point": {"row": 159, "column": 34}}, {"id": 489, "type": "string_literal", "text": "\"=0x%lx\\n\"", "parent": 488, "children": [490], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 18}}, {"id": 490, "type": "escape_sequence", "text": "\\n", "parent": 489, "children": [], "start_point": {"row": 159, "column": 15}, "end_point": {"row": 159, "column": 17}}, {"id": 491, "type": "binary_expression", "text": "cp - loadaddr", "parent": 488, "children": [492, 493, 494], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 159, "column": 33}}, {"id": 492, "type": "identifier", "text": "cp", "parent": 491, "children": [], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 159, "column": 22}}, {"id": 493, "type": "-", "text": "-", "parent": 491, "children": [], "start_point": {"row": 159, "column": 23}, "end_point": {"row": 159, "column": 24}}, {"id": 494, "type": "identifier", "text": "loadaddr", "parent": 491, "children": [], "start_point": {"row": 159, "column": 25}, "end_point": {"row": 159, "column": 33}}, {"id": 495, "type": "call_expression", "text": "close(io)", "parent": 22, "children": [496, 497], "start_point": {"row": 160, "column": 1}, "end_point": {"row": 160, "column": 10}}, {"id": 496, "type": "identifier", "text": "close", "parent": 495, "children": [], "start_point": {"row": 160, "column": 1}, "end_point": {"row": 160, "column": 6}}, {"id": 497, "type": "argument_list", "text": "(io)", "parent": 495, "children": [498], "start_point": {"row": 160, "column": 6}, "end_point": {"row": 160, "column": 10}}, {"id": 498, "type": "identifier", "text": "io", "parent": 497, "children": [], "start_point": {"row": 160, "column": 7}, "end_point": {"row": 160, "column": 9}}, {"id": 499, "type": "call_expression", "text": "(*entry)(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp)", "parent": 22, "children": [500, 504], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 59}}, {"id": 500, "type": "parenthesized_expression", "text": "(*entry)", "parent": 499, "children": [501], "start_point": {"row": 162, "column": 1}, "end_point": {"row": 162, "column": 9}}, {"id": 501, "type": "pointer_expression", "text": "*entry", "parent": 500, "children": [502, 503], "start_point": {"row": 162, "column": 2}, "end_point": {"row": 162, "column": 8}}, {"id": 502, "type": "*", "text": "*", "parent": 501, "children": [], "start_point": {"row": 162, "column": 2}, "end_point": {"row": 162, "column": 3}}, {"id": 503, "type": "identifier", "text": "entry", "parent": 501, "children": [], "start_point": {"row": 162, "column": 3}, "end_point": {"row": 162, "column": 8}}, {"id": 504, "type": "argument_list", "text": "(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp)", "parent": 499, "children": [505, 506, 507, 508, 509, 510], "start_point": {"row": 162, "column": 9}, "end_point": {"row": 162, "column": 59}}, {"id": 505, "type": "identifier", "text": "args", "parent": 504, "children": [], "start_point": {"row": 162, "column": 10}, "end_point": {"row": 162, "column": 14}}, {"id": 506, "type": "identifier", "text": "bootdev", "parent": 504, "children": [], "start_point": {"row": 162, "column": 16}, "end_point": {"row": 162, "column": 23}}, {"id": 507, "type": "identifier", "text": "bootunit", "parent": 504, "children": [], "start_point": {"row": 162, "column": 25}, "end_point": {"row": 162, "column": 33}}, {"id": 508, "type": "identifier", "text": "bootpart", "parent": 504, "children": [], "start_point": {"row": 162, "column": 35}, "end_point": {"row": 162, "column": 43}}, {"id": 509, "type": "identifier", "text": "SYM_MAGIC", "parent": 504, "children": [], "start_point": {"row": 162, "column": 45}, "end_point": {"row": 162, "column": 54}}, {"id": 510, "type": "identifier", "text": "cp", "parent": 504, "children": [], "start_point": {"row": 162, "column": 56}, "end_point": {"row": 162, "column": 58}}, {"id": 511, "type": "call_expression", "text": "printf(\"exec: kernel returned!\\n\")", "parent": 22, "children": [512, 513], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 35}}, {"id": 512, "type": "identifier", "text": "printf", "parent": 511, "children": [], "start_point": {"row": 164, "column": 1}, "end_point": {"row": 164, "column": 7}}, {"id": 513, "type": "argument_list", "text": "(\"exec: kernel returned!\\n\")", "parent": 511, "children": [514], "start_point": {"row": 164, "column": 7}, "end_point": {"row": 164, "column": 35}}, {"id": 514, "type": "string_literal", "text": "\"exec: kernel returned!\\n\"", "parent": 513, "children": [515], "start_point": {"row": 164, "column": 8}, "end_point": {"row": 164, "column": 34}}, {"id": 515, "type": "escape_sequence", "text": "\\n", "parent": 514, "children": [], "start_point": {"row": 164, "column": 31}, "end_point": {"row": 164, "column": 33}}, {"id": 516, "type": "return_statement", "text": "return;", "parent": 22, "children": [], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 8}}, {"id": 517, "type": "labeled_statement", "text": "shread:\n\tprintf(\"exec: short read\\n\");", "parent": 22, "children": [518], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 168, "column": 30}}, {"id": 518, "type": "statement_identifier", "text": "shread", "parent": 517, "children": [], "start_point": {"row": 167, "column": 0}, "end_point": {"row": 167, "column": 6}}, {"id": 519, "type": "call_expression", "text": "printf(\"exec: short read\\n\")", "parent": 517, "children": [520, 521], "start_point": {"row": 168, "column": 1}, "end_point": {"row": 168, "column": 29}}, {"id": 520, "type": "identifier", "text": "printf", "parent": 519, "children": [], "start_point": {"row": 168, "column": 1}, "end_point": {"row": 168, "column": 7}}, {"id": 521, "type": "argument_list", "text": "(\"exec: short read\\n\")", "parent": 519, "children": [522], "start_point": {"row": 168, "column": 7}, "end_point": {"row": 168, "column": 29}}, {"id": 522, "type": "string_literal", "text": "\"exec: short read\\n\"", "parent": 521, "children": [523], "start_point": {"row": 168, "column": 8}, "end_point": {"row": 168, "column": 28}}, {"id": 523, "type": "escape_sequence", "text": "\\n", "parent": 522, "children": [], "start_point": {"row": 168, "column": 25}, "end_point": {"row": 168, "column": 27}}, {"id": 524, "type": "assignment_expression", "text": "errno = EIO", "parent": 22, "children": [525, 526, 527], "start_point": {"row": 169, "column": 1}, "end_point": {"row": 169, "column": 12}}, {"id": 525, "type": "identifier", "text": "errno", "parent": 524, "children": [], "start_point": {"row": 169, "column": 1}, "end_point": {"row": 169, "column": 6}}, {"id": 526, "type": "=", "text": "=", "parent": 524, "children": [], "start_point": {"row": 169, "column": 7}, "end_point": {"row": 169, "column": 8}}, {"id": 527, "type": "identifier", "text": "EIO", "parent": 524, "children": [], "start_point": {"row": 169, "column": 9}, "end_point": {"row": 169, "column": 12}}, {"id": 528, "type": "labeled_statement", "text": "closeout:\n\tclose(io);", "parent": 22, "children": [529], "start_point": {"row": 170, "column": 0}, "end_point": {"row": 171, "column": 11}}, {"id": 529, "type": "statement_identifier", "text": "closeout", "parent": 528, "children": [], "start_point": {"row": 170, "column": 0}, "end_point": {"row": 170, "column": 8}}, {"id": 530, "type": "call_expression", "text": "close(io)", "parent": 528, "children": [531, 532], "start_point": {"row": 171, "column": 1}, "end_point": {"row": 171, "column": 10}}, {"id": 531, "type": "identifier", "text": "close", "parent": 530, "children": [], "start_point": {"row": 171, "column": 1}, "end_point": {"row": 171, "column": 6}}, {"id": 532, "type": "argument_list", "text": "(io)", "parent": 530, "children": [533], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 10}}, {"id": 533, "type": "identifier", "text": "io", "parent": 532, "children": [], "start_point": {"row": 171, "column": 7}, "end_point": {"row": 171, "column": 9}}, {"id": 534, "type": "return_statement", "text": "return;", "parent": 22, "children": [], "start_point": {"row": 172, "column": 1}, "end_point": {"row": 172, "column": 8}}]}, "node_categories": {"declarations": {"functions": [22, 24, 65, 180], "variables": [27, 32, 37, 40, 43, 46, 51, 54, 59, 63, 71, 76, 238], "classes": [55, 56, 239], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [84, 90, 91, 97, 98, 99, 103, 108, 110, 111, 114, 115, 121, 122, 136, 141, 142, 143, 146, 148, 149, 158, 163, 164, 171, 172, 177, 186, 190, 196, 200, 201, 208, 211, 212, 215, 216, 217, 233, 234, 245, 246, 253, 254, 255, 261, 263, 268, 272, 276, 277, 278, 283, 287, 296, 299, 303, 309, 313, 314, 315, 321, 323, 328, 334, 345, 346, 347, 356, 358, 364, 366, 370, 376, 383, 384, 385, 393, 396, 404, 408, 409, 410, 424, 430, 439, 445, 448, 456, 460, 461, 469, 470, 471, 486, 491, 495, 499, 500, 501, 511, 519, 530], "assignments": [81, 126, 133, 151, 155, 168, 174, 193, 205, 228, 260, 293, 306, 320, 331, 340, 355, 363, 373, 390, 401, 421, 427, 436, 442, 453, 482, 524], "loops": [252, 312, 344], "conditionals": [20, 25, 31, 36, 39, 42, 45, 50, 53, 57, 58, 61, 62, 69, 75, 80, 82, 85, 87, 89, 92, 96, 100, 102, 109, 112, 116, 119, 120, 123, 125, 127, 129, 132, 134, 144, 145, 150, 152, 154, 156, 159, 161, 162, 165, 167, 169, 173, 175, 185, 187, 191, 192, 194, 197, 198, 199, 202, 204, 206, 209, 213, 214, 218, 220, 221, 222, 224, 227, 229, 231, 232, 235, 237, 243, 247, 249, 258, 259, 264, 269, 273, 274, 275, 279, 281, 282, 284, 285, 288, 289, 292, 294, 297, 298, 300, 304, 305, 307, 310, 311, 318, 324, 330, 332, 339, 341, 343, 352, 354, 359, 367, 371, 372, 374, 381, 382, 386, 387, 391, 394, 395, 397, 400, 402, 407, 411, 413, 414, 415, 417, 420, 422, 425, 426, 428, 435, 437, 443, 447, 449, 452, 454, 459, 462, 467, 468, 472, 474, 475, 476, 478, 481, 483, 485, 487, 492, 494, 496, 498, 503, 505, 506, 507, 508, 509, 510, 512, 518, 520, 525, 527, 529, 531, 533], "returns": [95, 516, 534], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 88, 94, 189, 251, 267, 271, 302, 319, 327, 362, 389, 399, 451, 464, 489, 514, 522], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 22, "universal_type": "function", "name": "exec_aout", "text_snippet": "void\nexec_aout(char *file, const char *args, int bootdev, int bootunit, int bootpart)\n{\n\tchar *loada"}, {"node_id": 24, "universal_type": "function", "name": "bootdev,", "text_snippet": "exec_aout(char *file, const char *args, int bootdev, int bootunit, int bootpart)"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "(*entry)()"}, {"node_id": 180, "universal_type": "function", "name": "unknown", "text_snippet": "(*)()"}], "class_declarations": [{"node_id": 55, "universal_type": "class", "name": "exec", "text_snippet": "struct exec"}, {"node_id": 56, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 239, "universal_type": "class", "name": "unknown", "text_snippet": "register"}], "import_statements": [{"node_id": 0, "text": "#include <sys/param.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <sys/reboot.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <machine/prom.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <a.out.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"stand.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"libsa.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "/*\t$OpenBSD: exec_aout.c,v 1.2 2006/05/20 22:40:46 miod Exp $\t*/\n\n/*-\n * Copyright (c) 1982, 1986, 1990, 1993\n *\tThe Regents of the University of California. 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\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 * 3. Neither the name of the University nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * 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 REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * \t@(#)boot.c\t8.1 (Berkeley) 6/10/93\n */\n\n#include <sys/param.h>\n#include <sys/reboot.h>\n#include <machine/prom.h>\n#include <a.out.h>\n\n#include \"stand.h\"\n#include \"libsa.h\"\n\n#define\tSYM_MAGIC\t0x6274ef2e\n\n/*ARGSUSED*/\nvoid\nexec_aout(char *file, const char *args, int bootdev, int bootunit, int bootpart)\n{\n\tchar *loadaddr;\n\tint io;\n\tstruct exec x;\n\tint cc, magic;\n\tvoid (*entry)();\n\tchar *cp;\n\tint *ip;\n\n\tio = open(file, 0);\n\tif (io < 0)\n\t\treturn;\n\n\t/*\n\t * Read in the exec header, and validate it.\n\t */\n\tif (read(io, (char *)&x, sizeof(x)) != sizeof(x))\n\t\tgoto shread;\n\n\tif (N_BADMAG(x)) {\n\t\terrno = EFTYPE;\n\t\tgoto closeout;\n\t}\n\n\t/*\n\t * note: on the mvme ports, the kernel is linked in such a way that \n\t * its entry point is the first item in .text, and thus a_entry can \n\t * be used to determine both the load address and the entry point.\n\t * (also note that we make use of the fact that the kernel will live\n\t * in a VA == PA range of memory ... otherwise we would take \n\t * loadaddr as a parameter and let the kernel relocate itself!)\n\t *\n\t * note that ZMAGIC files included the a.out header in the text area\n\t * so we must mask that off (has no effect on the other formats)\n\t */\n\tloadaddr = (void *)(x.a_entry & ~sizeof(x));\n\n\tcp = loadaddr;\n\tmagic = N_GETMAGIC(x);\n\tif (magic == ZMAGIC)\n\t\tcp += sizeof(x);\n\tentry = (void (*)())cp;\n\n\t/*\n\t * Read in the text segment.\n\t */\n\tprintf(\"%d\", x.a_text);\n\tcc = x.a_text;\n\tif (magic == ZMAGIC)\n\t\tcc = cc - sizeof(x); /* a.out header part of text in zmagic */\n\tif (read(io, cp, cc) != cc)\n\t\tgoto shread;\n\tcp += cc;\n\n\t/*\n\t * NMAGIC may have a gap between text and data.\n\t */\n\tif (magic == NMAGIC) {\n\t\tregister int mask = N_PAGSIZ(x) - 1;\n\t\twhile ((int)cp & mask)\n\t\t\t*cp++ = 0;\n\t}\n\n\t/*\n\t * Read in the data segment.\n\t */\n\tprintf(\"+%d\", x.a_data);\n\tif (read(io, cp, x.a_data) != x.a_data)\n\t\tgoto shread;\n\tcp += x.a_data;\n\n\t/*\n\t * Zero out the BSS section.\n\t */\n\tprintf(\"+%d\", x.a_bss);\n\tcc = x.a_bss;\n\twhile ((int)cp & 3) {\n\t\t*cp++ = 0;\n\t\t--cc;\n\t}\n\tip = (int *)cp;\n\tcp += cc;\n\twhile ((char *)ip < cp)\n\t\t*ip++ = 0;\n\n\t/*\n\t * Read in the symbol table and strings.\n\t * (Always set the symtab size word.)\n\t */\n\t*ip++ = x.a_syms;\n\tcp = (char *) ip;\n\n\tif (x.a_syms > 0) {\n\t\t/* Symbol table and string table length word. */\n\t\tcc = x.a_syms;\n\t\tprintf(\"+[%d\", cc);\n\t\tcc += sizeof(int);\t/* strtab length too */\n\t\tif (read(io, cp, cc) != cc)\n\t\t\tgoto shread;\n\t\tcp += x.a_syms;\n\t\tip = (int *)cp;\t\t/* points to strtab length */\n\t\tcp += sizeof(int);\n\n\t\t/* String table. Length word includes itself. */\n\t\tcc = *ip;\n\t\tprintf(\"+%d]\", cc);\n\t\tcc -= sizeof(int);\n\t\tif (cc <= 0)\n\t\t\tgoto shread;\n\t\tif (read(io, cp, cc) != cc)\n\t\t\tgoto shread;\n\t\tcp += cc;\n\t}\n\tprintf(\"=0x%lx\\n\", cp - loadaddr);\n\tclose(io);\n\n\t(*entry)(args, bootdev, bootunit, bootpart, SYM_MAGIC, cp);\n\n\tprintf(\"exec: kernel returned!\\n\");\n\treturn;\n\nshread:\n\tprintf(\"exec: short read\\n\");\n\terrno = EIO;\ncloseout:\n\tclose(io);\n\treturn;\n}\n"}
80,949
c
// SPDX-License-Identifier: BSD-2-Clause // This code is part of the sfizz library and is licensed under a BSD 2-clause // license. You should have receive a LICENSE.md file along with the code. // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #pragma once #include "SfizzVstController.h" #include "editor/EditorController.h" #include "public.sdk/source/vst/vstguieditor.h" #include "public.sdk/source/common/threadchecker.h" #include <absl/types/span.h> #include <mutex> #include <set> class Editor; #if !defined(__APPLE__) && !defined(_WIN32) namespace VSTGUI { class RunLoop; } #endif using namespace Steinberg; using namespace VSTGUI; class SfizzVstEditor : public Vst::VSTGUIEditor, public EditorController { public: using Self = SfizzVstEditor; SfizzVstEditor(SfizzVstController* controller, absl::Span<FObject*> updates); ~SfizzVstEditor(); bool PLUGIN_API open(void* parent, const VSTGUI::PlatformType& platformType) override; void PLUGIN_API close() override; SfizzVstController* getController() const { return static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController()); } void updateEditorIsOpenParameter(); // VSTGUIEditor CMessageResult notify(CBaseObject* sender, const char* message) override; // FObject void PLUGIN_API update(FUnknown* changedUnknown, int32 message) override; // private: bool processUpdate(FUnknown* changedUnknown, int32 message); void processParameterUpdates(); void updateParameter(Vst::Parameter* parameterToUpdate); protected: // EditorController void uiSendValue(EditId id, const EditValue& v) override; void uiBeginSend(EditId id) override; void uiEndSend(EditId id) override; void uiSendMIDI(const uint8_t* data, uint32_t len) override; void uiSendMessage(const char* path, const char* sig, const sfizz_arg_t* args) override; private: void loadSfzFile(const std::string& filePath); void loadScalaFile(const std::string& filePath); Vst::ParamID parameterOfEditId(EditId id); std::unique_ptr<Editor> editor_; #if !defined(__APPLE__) && !defined(_WIN32) SharedPointer<RunLoop> _runLoop; #endif // messaging std::unique_ptr<uint8[]> oscTemp_; // subscribed updates std::vector<IPtr<FObject>> updates_; // thread safety std::unique_ptr<Vst::ThreadChecker> threadChecker_; // parameters to process, whose values have received changes // Note(jpc) it's because hosts send us parameter updates in the wrong thread.. std::set<Vst::ParamID> parametersToUpdate_; std::mutex parametersToUpdateMutex_; };
39.24
66
(translation_unit) "// SPDX-License-Identifier: BSD-2-Clause\n\n// This code is part of the sfizz library and is licensed under a BSD 2-clause\n// license. You should have receive a LICENSE.md file along with the code.\n// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz\n\n#pragma once\n#include "SfizzVstController.h"\n#include "editor/EditorController.h"\n#include "public.sdk/source/vst/vstguieditor.h"\n#include "public.sdk/source/common/threadchecker.h"\n#include <absl/types/span.h>\n#include <mutex>\n#include <set>\nclass Editor;\n#if !defined(__APPLE__) && !defined(_WIN32)\nnamespace VSTGUI { class RunLoop; }\n#endif\n\nusing namespace Steinberg;\nusing namespace VSTGUI;\n\nclass SfizzVstEditor : public Vst::VSTGUIEditor,\n public EditorController {\npublic:\n using Self = SfizzVstEditor;\n\n SfizzVstEditor(SfizzVstController* controller, absl::Span<FObject*> updates);\n ~SfizzVstEditor();\n\n bool PLUGIN_API open(void* parent, const VSTGUI::PlatformType& platformType) override;\n void PLUGIN_API close() override;\n\n SfizzVstController* getController() const\n {\n return static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController());\n }\n\n void updateEditorIsOpenParameter();\n\n // VSTGUIEditor\n CMessageResult notify(CBaseObject* sender, const char* message) override;\n // FObject\n void PLUGIN_API update(FUnknown* changedUnknown, int32 message) override;\n\n //\nprivate:\n bool processUpdate(FUnknown* changedUnknown, int32 message);\n void processParameterUpdates();\n void updateParameter(Vst::Parameter* parameterToUpdate);\n\nprotected:\n // EditorController\n void uiSendValue(EditId id, const EditValue& v) override;\n void uiBeginSend(EditId id) override;\n void uiEndSend(EditId id) override;\n void uiSendMIDI(const uint8_t* data, uint32_t len) override;\n void uiSendMessage(const char* path, const char* sig, const sfizz_arg_t* args) override;\n\nprivate:\n void loadSfzFile(const std::string& filePath);\n void loadScalaFile(const std::string& filePath);\n\n Vst::ParamID parameterOfEditId(EditId id);\n\n std::unique_ptr<Editor> editor_;\n\n#if !defined(__APPLE__) && !defined(_WIN32)\n SharedPointer<RunLoop> _runLoop;\n#endif\n\n // messaging\n std::unique_ptr<uint8[]> oscTemp_;\n\n // subscribed updates\n std::vector<IPtr<FObject>> updates_;\n\n // thread safety\n std::unique_ptr<Vst::ThreadChecker> threadChecker_;\n\n // parameters to process, whose values have received changes\n // Note(jpc) it's because hosts send us parameter updates in the wrong thread..\n std::set<Vst::ParamID> parametersToUpdate_;\n std::mutex parametersToUpdateMutex_;\n};\n" (comment) "// SPDX-License-Identifier: BSD-2-Clause" (comment) "// This code is part of the sfizz library and is licensed under a BSD 2-clause" (comment) "// license. You should have receive a LICENSE.md file along with the code." (comment) "// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "SfizzVstController.h"\n" (#include) "#include" (string_literal) ""SfizzVstController.h"" (") """ (string_content) "SfizzVstController.h" (") """ (preproc_include) "#include "editor/EditorController.h"\n" (#include) "#include" (string_literal) ""editor/EditorController.h"" (") """ (string_content) "editor/EditorController.h" (") """ (preproc_include) "#include "public.sdk/source/vst/vstguieditor.h"\n" (#include) "#include" (string_literal) ""public.sdk/source/vst/vstguieditor.h"" (") """ (string_content) "public.sdk/source/vst/vstguieditor.h" (") """ (preproc_include) "#include "public.sdk/source/common/threadchecker.h"\n" (#include) "#include" (string_literal) ""public.sdk/source/common/threadchecker.h"" (") """ (string_content) "public.sdk/source/common/threadchecker.h" (") """ (preproc_include) "#include <absl/types/span.h>\n" (#include) "#include" (system_lib_string) "<absl/types/span.h>" (preproc_include) "#include <mutex>\n" (#include) "#include" (system_lib_string) "<mutex>" (preproc_include) "#include <set>\n" (#include) "#include" (system_lib_string) "<set>" (declaration) "class Editor;" (type_identifier) "class" (identifier) "Editor" (;) ";" (preproc_if) "#if !defined(__APPLE__) && !defined(_WIN32)\nnamespace VSTGUI { class RunLoop; }\n#endif" (#if) "#if" (binary_expression) "!defined(__APPLE__) && !defined(_WIN32)" (unary_expression) "!defined(__APPLE__)" (!) "!" (preproc_defined) "defined(__APPLE__)" (defined) "defined" (() "(" (identifier) "__APPLE__" ()) ")" (&&) "&&" (unary_expression) "!defined(_WIN32)" (!) "!" (preproc_defined) "defined(_WIN32)" (defined) "defined" (() "(" (identifier) "_WIN32" ()) ")" ( ) "\n" (function_definition) "namespace VSTGUI { class RunLoop; }" (type_identifier) "namespace" (identifier) "VSTGUI" (compound_statement) "{ class RunLoop; }" ({) "{" (declaration) "class RunLoop;" (type_identifier) "class" (identifier) "RunLoop" (;) ";" (}) "}" (#endif) "#endif" (declaration) "using namespace Steinberg;" (type_identifier) "using" (ERROR) "namespace" (identifier) "namespace" (identifier) "Steinberg" (;) ";" (declaration) "using namespace VSTGUI;" (type_identifier) "using" (identifier) "namespace" (ERROR) "VSTGUI" (identifier) "VSTGUI" (;) ";" (ERROR) "class SfizzVstEditor : public Vst::VSTGUIEditor,\n public EditorController" (type_identifier) "class" (identifier) "SfizzVstEditor" (ERROR) ": public Vst::VSTGUIEditor" (:) ":" (identifier) "public" (identifier) "Vst" (:) ":" (:) ":" (identifier) "VSTGUIEditor" (,) "," (identifier) "public" (identifier) "EditorController" (compound_statement) "{\npublic:\n using Self = SfizzVstEditor;\n\n SfizzVstEditor(SfizzVstController* controller, absl::Span<FObject*> updates);\n ~SfizzVstEditor();\n\n bool PLUGIN_API open(void* parent, const VSTGUI::PlatformType& platformType) override;\n void PLUGIN_API close() override;\n\n SfizzVstController* getController() const\n {\n return static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController());\n }\n\n void updateEditorIsOpenParameter();\n\n // VSTGUIEditor\n CMessageResult notify(CBaseObject* sender, const char* message) override;\n // FObject\n void PLUGIN_API update(FUnknown* changedUnknown, int32 message) override;\n\n //\nprivate:\n bool processUpdate(FUnknown* changedUnknown, int32 message);\n void processParameterUpdates();\n void updateParameter(Vst::Parameter* parameterToUpdate);\n\nprotected:\n // EditorController\n void uiSendValue(EditId id, const EditValue& v) override;\n void uiBeginSend(EditId id) override;\n void uiEndSend(EditId id) override;\n void uiSendMIDI(const uint8_t* data, uint32_t len) override;\n void uiSendMessage(const char* path, const char* sig, const sfizz_arg_t* args) override;\n\nprivate:\n void loadSfzFile(const std::string& filePath);\n void loadScalaFile(const std::string& filePath);\n\n Vst::ParamID parameterOfEditId(EditId id);\n\n std::unique_ptr<Editor> editor_;\n\n#if !defined(__APPLE__) && !defined(_WIN32)\n SharedPointer<RunLoop> _runLoop;\n#endif\n\n // messaging\n std::unique_ptr<uint8[]> oscTemp_;\n\n // subscribed updates\n std::vector<IPtr<FObject>> updates_;\n\n // thread safety\n std::unique_ptr<Vst::ThreadChecker> threadChecker_;\n\n // parameters to process, whose values have received changes\n // Note(jpc) it's because hosts send us parameter updates in the wrong thread..\n std::set<Vst::ParamID> parametersToUpdate_;\n std::mutex parametersToUpdateMutex_;\n}" ({) "{" (labeled_statement) "public:\n using Self = SfizzVstEditor;" (statement_identifier) "public" (:) ":" (declaration) "using Self = SfizzVstEditor;" (type_identifier) "using" (init_declarator) "Self = SfizzVstEditor" (identifier) "Self" (=) "=" (identifier) "SfizzVstEditor" (;) ";" (expression_statement) "SfizzVstEditor(SfizzVstController* controller, absl::Span<FObject*> updates);" (call_expression) "SfizzVstEditor(SfizzVstController* controller, absl::Span<FObject*> updates)" (identifier) "SfizzVstEditor" (argument_list) "(SfizzVstController* controller, absl::Span<FObject*> updates)" (() "(" (binary_expression) "SfizzVstController* controller" (identifier) "SfizzVstController" (*) "*" (identifier) "controller" (,) "," (ERROR) "absl::" (identifier) "absl" (:) ":" (:) ":" (binary_expression) "Span<FObject*> updates" (binary_expression) "Span<FObject" (identifier) "Span" (<) "<" (identifier) "FObject" (ERROR) "*" (*) "*" (>) ">" (identifier) "updates" ()) ")" (;) ";" (expression_statement) "~SfizzVstEditor();" (unary_expression) "~SfizzVstEditor()" (~) "~" (call_expression) "SfizzVstEditor()" (identifier) "SfizzVstEditor" (argument_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "bool PLUGIN_API open(void* parent, const VSTGUI::PlatformType& platformType) override;\n void PLUGIN_API close() override;\n\n SfizzVstController* getController() const\n {\n return static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController());\n }" (primitive_type) "bool" (ERROR) "PLUGIN_API open(void* parent, const VSTGUI::PlatformType& platformType) override;\n void PLUGIN_API" (identifier) "PLUGIN_API" (function_declarator) "open(void* parent, const VSTGUI::PlatformType& platformType) override" (identifier) "open" (parameter_list) "(void* parent, const VSTGUI::PlatformType& platformType)" (() "(" (parameter_declaration) "void* parent" (primitive_type) "void" (pointer_declarator) "* parent" (*) "*" (identifier) "parent" (,) "," (parameter_declaration) "const VSTGUI::PlatformType& platformType" (type_qualifier) "const" (const) "const" (type_identifier) "VSTGUI" (ERROR) "::PlatformType&" (:) ":" (:) ":" (identifier) "PlatformType" (&) "&" (identifier) "platformType" ()) ")" (identifier) "override" (;) ";" (primitive_type) "void" (identifier) "PLUGIN_API" (function_declarator) "close()" (identifier) "close" (parameter_list) "()" (() "(" ()) ")" (declaration) "override;" (type_identifier) "override" (identifier) "" (;) ";" (ERROR) "SfizzVstController* getController() const" (type_identifier) "SfizzVstController" (pointer_declarator) "* getController() const" (*) "*" (function_declarator) "getController() const" (identifier) "getController" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{\n return static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController());\n }" ({) "{" (return_statement) "return static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController());" (return) "return" (binary_expression) "static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController())" (binary_expression) "static_cast<SfizzVstController" (identifier) "static_cast" (<) "<" (identifier) "SfizzVstController" (ERROR) "*" (*) "*" (>) ">" (parenthesized_expression) "(Vst::VSTGUIEditor::getController())" (() "(" (ERROR) "Vst::VSTGUIEditor::" (identifier) "Vst" (:) ":" (:) ":" (identifier) "VSTGUIEditor" (:) ":" (:) ":" (call_expression) "getController()" (identifier) "getController" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (declaration) "void updateEditorIsOpenParameter();" (primitive_type) "void" (function_declarator) "updateEditorIsOpenParameter()" (identifier) "updateEditorIsOpenParameter" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// VSTGUIEditor" (ERROR) "CMessageResult notify(CBaseObject* sender, const char* message) override" (type_identifier) "CMessageResult" (function_declarator) "notify(CBaseObject* sender, const char* message) override" (identifier) "notify" (parameter_list) "(CBaseObject* sender, const char* message)" (() "(" (parameter_declaration) "CBaseObject* sender" (type_identifier) "CBaseObject" (pointer_declarator) "* sender" (*) "*" (identifier) "sender" (,) "," (parameter_declaration) "const char* message" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* message" (*) "*" (identifier) "message" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (comment) "// FObject" (declaration) "void PLUGIN_API update(FUnknown* changedUnknown, int32 message) override;\n\n //\nprivate:\n bool processUpdate(FUnknown* changedUnknown, int32 message);" (primitive_type) "void" (ERROR) "PLUGIN_API update(FUnknown* changedUnknown, int32 message) override;" (identifier) "PLUGIN_API" (function_declarator) "update(FUnknown* changedUnknown, int32 message) override" (identifier) "update" (parameter_list) "(FUnknown* changedUnknown, int32 message)" (() "(" (parameter_declaration) "FUnknown* changedUnknown" (type_identifier) "FUnknown" (pointer_declarator) "* changedUnknown" (*) "*" (identifier) "changedUnknown" (,) "," (parameter_declaration) "int32 message" (type_identifier) "int32" (identifier) "message" ()) ")" (identifier) "override" (;) ";" (comment) "//" (ERROR) "private:\n bool" (identifier) "private" (:) ":" (primitive_type) "bool" (function_declarator) "processUpdate(FUnknown* changedUnknown, int32 message)" (identifier) "processUpdate" (parameter_list) "(FUnknown* changedUnknown, int32 message)" (() "(" (parameter_declaration) "FUnknown* changedUnknown" (type_identifier) "FUnknown" (pointer_declarator) "* changedUnknown" (*) "*" (identifier) "changedUnknown" (,) "," (parameter_declaration) "int32 message" (type_identifier) "int32" (identifier) "message" ()) ")" (;) ";" (declaration) "void processParameterUpdates();" (primitive_type) "void" (function_declarator) "processParameterUpdates()" (identifier) "processParameterUpdates" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void updateParameter(Vst::Parameter* parameterToUpdate);" (primitive_type) "void" (function_declarator) "updateParameter(Vst::Parameter* parameterToUpdate)" (identifier) "updateParameter" (parameter_list) "(Vst::Parameter* parameterToUpdate)" (() "(" (parameter_declaration) "Vst::Parameter* parameterToUpdate" (type_identifier) "Vst" (ERROR) "::Parameter" (:) ":" (:) ":" (identifier) "Parameter" (pointer_declarator) "* parameterToUpdate" (*) "*" (identifier) "parameterToUpdate" ()) ")" (;) ";" (labeled_statement) "protected:\n // EditorController\n void uiSendValue(EditId id, const EditValue& v) override;" (statement_identifier) "protected" (:) ":" (comment) "// EditorController" (ERROR) "void uiSendValue(EditId id, const EditValue& v) override" (primitive_type) "void" (function_declarator) "uiSendValue(EditId id, const EditValue& v) override" (identifier) "uiSendValue" (parameter_list) "(EditId id, const EditValue& v)" (() "(" (parameter_declaration) "EditId id" (type_identifier) "EditId" (identifier) "id" (,) "," (parameter_declaration) "const EditValue& v" (type_qualifier) "const" (const) "const" (type_identifier) "EditValue" (ERROR) "&" (&) "&" (identifier) "v" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (ERROR) "void uiBeginSend(EditId id) override" (primitive_type) "void" (function_declarator) "uiBeginSend(EditId id) override" (identifier) "uiBeginSend" (parameter_list) "(EditId id)" (() "(" (parameter_declaration) "EditId id" (type_identifier) "EditId" (identifier) "id" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (ERROR) "void uiEndSend(EditId id) override" (primitive_type) "void" (function_declarator) "uiEndSend(EditId id) override" (identifier) "uiEndSend" (parameter_list) "(EditId id)" (() "(" (parameter_declaration) "EditId id" (type_identifier) "EditId" (identifier) "id" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (ERROR) "void uiSendMIDI(const uint8_t* data, uint32_t len) override" (primitive_type) "void" (function_declarator) "uiSendMIDI(const uint8_t* data, uint32_t len) override" (identifier) "uiSendMIDI" (parameter_list) "(const uint8_t* data, uint32_t len)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t len" (primitive_type) "uint32_t" (identifier) "len" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (ERROR) "void uiSendMessage(const char* path, const char* sig, const sfizz_arg_t* args) override" (primitive_type) "void" (function_declarator) "uiSendMessage(const char* path, const char* sig, const sfizz_arg_t* args) override" (identifier) "uiSendMessage" (parameter_list) "(const char* path, const char* sig, const sfizz_arg_t* args)" (() "(" (parameter_declaration) "const char* path" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* path" (*) "*" (identifier) "path" (,) "," (parameter_declaration) "const char* sig" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* sig" (*) "*" (identifier) "sig" (,) "," (parameter_declaration) "const sfizz_arg_t* args" (type_qualifier) "const" (const) "const" (type_identifier) "sfizz_arg_t" (pointer_declarator) "* args" (*) "*" (identifier) "args" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (labeled_statement) "private:\n void loadSfzFile(const std::string& filePath);" (statement_identifier) "private" (:) ":" (declaration) "void loadSfzFile(const std::string& filePath);" (primitive_type) "void" (function_declarator) "loadSfzFile(const std::string& filePath)" (identifier) "loadSfzFile" (parameter_list) "(const std::string& filePath)" (() "(" (parameter_declaration) "const std::string& filePath" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "filePath" ()) ")" (;) ";" (declaration) "void loadScalaFile(const std::string& filePath);" (primitive_type) "void" (function_declarator) "loadScalaFile(const std::string& filePath)" (identifier) "loadScalaFile" (parameter_list) "(const std::string& filePath)" (() "(" (parameter_declaration) "const std::string& filePath" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "filePath" ()) ")" (;) ";" (labeled_statement) "Vst::ParamID parameterOfEditId(EditId id);" (statement_identifier) "Vst" (:) ":" (ERROR) ":" (:) ":" (declaration) "ParamID parameterOfEditId(EditId id);" (type_identifier) "ParamID" (function_declarator) "parameterOfEditId(EditId id)" (identifier) "parameterOfEditId" (parameter_list) "(EditId id)" (() "(" (parameter_declaration) "EditId id" (type_identifier) "EditId" (identifier) "id" ()) ")" (;) ";" (labeled_statement) "std::unique_ptr<Editor> editor_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "unique_ptr<Editor> editor_;" (binary_expression) "unique_ptr<Editor> editor_" (binary_expression) "unique_ptr<Editor" (identifier) "unique_ptr" (<) "<" (identifier) "Editor" (>) ">" (identifier) "editor_" (;) ";" (preproc_if) "#if !defined(__APPLE__) && !defined(_WIN32)\n SharedPointer<RunLoop> _runLoop;\n#endif" (#if) "#if" (binary_expression) "!defined(__APPLE__) && !defined(_WIN32)" (unary_expression) "!defined(__APPLE__)" (!) "!" (preproc_defined) "defined(__APPLE__)" (defined) "defined" (() "(" (identifier) "__APPLE__" ()) ")" (&&) "&&" (unary_expression) "!defined(_WIN32)" (!) "!" (preproc_defined) "defined(_WIN32)" (defined) "defined" (() "(" (identifier) "_WIN32" ()) ")" ( ) "\n" (expression_statement) "SharedPointer<RunLoop> _runLoop;" (binary_expression) "SharedPointer<RunLoop> _runLoop" (binary_expression) "SharedPointer<RunLoop" (identifier) "SharedPointer" (<) "<" (identifier) "RunLoop" (>) ">" (identifier) "_runLoop" (;) ";" (#endif) "#endif" (comment) "// messaging" (labeled_statement) "std::unique_ptr<uint8[]> oscTemp_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "unique_ptr<uint8[]> oscTemp_;" (binary_expression) "unique_ptr<uint8[]> oscTemp_" (binary_expression) "unique_ptr<uint8[]" (identifier) "unique_ptr" (<) "<" (subscript_expression) "uint8[]" (identifier) "uint8" ([) "[" (identifier) "" (]) "]" (>) ">" (identifier) "oscTemp_" (;) ";" (comment) "// subscribed updates" (labeled_statement) "std::vector<IPtr<FObject>> updates_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "vector<IPtr<FObject>> updates_;" (binary_expression) "vector<IPtr<FObject>> updates_" (binary_expression) "vector<IPtr" (identifier) "vector" (<) "<" (identifier) "IPtr" (<) "<" (binary_expression) "FObject>> updates_" (identifier) "FObject" (>>) ">>" (identifier) "updates_" (;) ";" (comment) "// thread safety" (labeled_statement) "std::unique_ptr<Vst::ThreadChecker> threadChecker_;" (statement_identifier) "std" (ERROR) "::unique_ptr<Vst:" (:) ":" (:) ":" (binary_expression) "unique_ptr<Vst" (identifier) "unique_ptr" (<) "<" (identifier) "Vst" (:) ":" (:) ":" (expression_statement) "ThreadChecker> threadChecker_;" (binary_expression) "ThreadChecker> threadChecker_" (identifier) "ThreadChecker" (>) ">" (identifier) "threadChecker_" (;) ";" (comment) "// parameters to process, whose values have received changes" (comment) "// Note(jpc) it's because hosts send us parameter updates in the wrong thread.." (labeled_statement) "std::set<Vst::ParamID> parametersToUpdate_;" (statement_identifier) "std" (ERROR) "::set<Vst:" (:) ":" (:) ":" (binary_expression) "set<Vst" (identifier) "set" (<) "<" (identifier) "Vst" (:) ":" (:) ":" (expression_statement) "ParamID> parametersToUpdate_;" (binary_expression) "ParamID> parametersToUpdate_" (identifier) "ParamID" (>) ">" (identifier) "parametersToUpdate_" (;) ";" (labeled_statement) "std::mutex parametersToUpdateMutex_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "mutex parametersToUpdateMutex_;" (type_identifier) "mutex" (identifier) "parametersToUpdateMutex_" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
610
30
{"language": "c", "success": true, "metadata": {"lines": 66, "avg_line_length": 39.24, "nodes": 388, "errors": 0, "source_hash": "44c331b17b05bd382bcdfdb5aaa0ac49632dc82a5d4976c1480da2dc5cec2548", "categorized_nodes": 251}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"SfizzVstController.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": "\"SfizzVstController.h\"", "parent": 3, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 31}}, {"id": 6, "type": "preproc_include", "text": "#include \"editor/EditorController.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": "\"editor/EditorController.h\"", "parent": 6, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 36}}, {"id": 9, "type": "preproc_include", "text": "#include \"public.sdk/source/vst/vstguieditor.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": "\"public.sdk/source/vst/vstguieditor.h\"", "parent": 9, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 47}}, {"id": 12, "type": "preproc_include", "text": "#include \"public.sdk/source/common/threadchecker.h\"\n", "parent": null, "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": "\"public.sdk/source/common/threadchecker.h\"", "parent": 12, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 51}}, {"id": 15, "type": "preproc_include", "text": "#include <absl/types/span.h>\n", "parent": null, "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": "system_lib_string", "text": "<absl/types/span.h>", "parent": 15, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 28}}, {"id": 18, "type": "preproc_include", "text": "#include <mutex>\n", "parent": null, "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": "system_lib_string", "text": "<mutex>", "parent": 18, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 16}}, {"id": 21, "type": "preproc_include", "text": "#include <set>\n", "parent": null, "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": "system_lib_string", "text": "<set>", "parent": 21, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 14}}, {"id": 24, "type": "declaration", "text": "class Editor;", "parent": null, "children": [25], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 13}}, {"id": 25, "type": "identifier", "text": "Editor", "parent": 24, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 12}}, {"id": 26, "type": "preproc_if", "text": "#if !defined(__APPLE__) && !defined(_WIN32)\nnamespace VSTGUI { class RunLoop; }\n#endif", "parent": null, "children": [27, 28, 40, 41, 46], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 27, "type": "#if", "text": "#if", "parent": 26, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 3}}, {"id": 28, "type": "binary_expression", "text": "!defined(__APPLE__) && !defined(_WIN32)", "parent": 26, "children": [29, 34, 35], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 43}}, {"id": 29, "type": "unary_expression", "text": "!defined(__APPLE__)", "parent": 28, "children": [30, 31], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 23}}, {"id": 30, "type": "!", "text": "!", "parent": 29, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 5}}, {"id": 31, "type": "preproc_defined", "text": "defined(__APPLE__)", "parent": 29, "children": [32, 33], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 23}}, {"id": 32, "type": "defined", "text": "defined", "parent": 31, "children": [], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 12}}, {"id": 33, "type": "identifier", "text": "__APPLE__", "parent": 31, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 22}}, {"id": 34, "type": "&&", "text": "&&", "parent": 28, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 26}}, {"id": 35, "type": "unary_expression", "text": "!defined(_WIN32)", "parent": 28, "children": [36, 37], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 43}}, {"id": 36, "type": "!", "text": "!", "parent": 35, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 28}}, {"id": 37, "type": "preproc_defined", "text": "defined(_WIN32)", "parent": 35, "children": [38, 39], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 43}}, {"id": 38, "type": "defined", "text": "defined", "parent": 37, "children": [], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 35}}, {"id": 39, "type": "identifier", "text": "_WIN32", "parent": 37, "children": [], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 42}}, {"id": 40, "type": "\n", "text": "\n", "parent": 26, "children": [], "start_point": {"row": 15, "column": 43}, "end_point": {"row": 16, "column": 0}}, {"id": 41, "type": "function_definition", "text": "namespace VSTGUI { class RunLoop; }", "parent": 26, "children": [42, 43], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 35}}, {"id": 42, "type": "type_identifier", "text": "namespace", "parent": 41, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 9}}, {"id": 43, "type": "identifier", "text": "VSTGUI", "parent": 41, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 16}}, {"id": 44, "type": "declaration", "text": "class RunLoop;", "parent": 41, "children": [45], "start_point": {"row": 16, "column": 19}, "end_point": {"row": 16, "column": 33}}, {"id": 45, "type": "identifier", "text": "RunLoop", "parent": 44, "children": [], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 32}}, {"id": 46, "type": "#endif", "text": "#endif", "parent": 26, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 47, "type": "declaration", "text": "using namespace Steinberg;", "parent": null, "children": [48, 49, 51], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 26}}, {"id": 48, "type": "type_identifier", "text": "using", "parent": 47, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 5}}, {"id": 49, "type": "ERROR", "text": "namespace", "parent": 47, "children": [50], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 15}}, {"id": 50, "type": "identifier", "text": "namespace", "parent": 49, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 15}}, {"id": 51, "type": "identifier", "text": "Steinberg", "parent": 47, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 25}}, {"id": 52, "type": "declaration", "text": "using namespace VSTGUI;", "parent": null, "children": [53, 54, 55], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 23}}, {"id": 53, "type": "type_identifier", "text": "using", "parent": 52, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 5}}, {"id": 54, "type": "identifier", "text": "namespace", "parent": 52, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 15}}, {"id": 55, "type": "ERROR", "text": "VSTGUI", "parent": 52, "children": [56], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 22}}, {"id": 56, "type": "identifier", "text": "VSTGUI", "parent": 55, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 22}}, {"id": 57, "type": "ERROR", "text": "class SfizzVstEditor : public Vst::VSTGUIEditor,\n public EditorController", "parent": null, "children": [58, 59, 62], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 46}}, {"id": 58, "type": "identifier", "text": "SfizzVstEditor", "parent": 57, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 20}}, {"id": 59, "type": "ERROR", "text": ": public Vst::VSTGUIEditor", "parent": 57, "children": [60, 61], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 47}}, {"id": 60, "type": "identifier", "text": "Vst", "parent": 59, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 33}}, {"id": 61, "type": "identifier", "text": "VSTGUIEditor", "parent": 59, "children": [], "start_point": {"row": 22, "column": 35}, "end_point": {"row": 22, "column": 47}}, {"id": 62, "type": "identifier", "text": "EditorController", "parent": 57, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 46}}, {"id": 63, "type": "labeled_statement", "text": "public:\n using Self = SfizzVstEditor;", "parent": null, "children": [64], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 32}}, {"id": 64, "type": "declaration", "text": "using Self = SfizzVstEditor;", "parent": 63, "children": [65, 66], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 32}}, {"id": 65, "type": "type_identifier", "text": "using", "parent": 64, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 9}}, {"id": 66, "type": "init_declarator", "text": "Self = SfizzVstEditor", "parent": 64, "children": [67, 68, 69], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 31}}, {"id": 67, "type": "identifier", "text": "Self", "parent": 66, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 14}}, {"id": 68, "type": "=", "text": "=", "parent": 66, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 16}}, {"id": 69, "type": "identifier", "text": "SfizzVstEditor", "parent": 66, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 31}}, {"id": 70, "type": "call_expression", "text": "SfizzVstEditor(SfizzVstController* controller, absl::Span<FObject*> updates)", "parent": null, "children": [71, 72], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 80}}, {"id": 71, "type": "identifier", "text": "SfizzVstEditor", "parent": 70, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 18}}, {"id": 72, "type": "argument_list", "text": "(SfizzVstController* controller, absl::Span<FObject*> updates)", "parent": 70, "children": [73, 77, 79], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 80}}, {"id": 73, "type": "binary_expression", "text": "SfizzVstController* controller", "parent": 72, "children": [74, 75, 76], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 49}}, {"id": 74, "type": "identifier", "text": "SfizzVstController", "parent": 73, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 37}}, {"id": 75, "type": "*", "text": "*", "parent": 73, "children": [], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 27, "column": 38}}, {"id": 76, "type": "identifier", "text": "controller", "parent": 73, "children": [], "start_point": {"row": 27, "column": 39}, "end_point": {"row": 27, "column": 49}}, {"id": 77, "type": "ERROR", "text": "absl::", "parent": 72, "children": [78], "start_point": {"row": 27, "column": 51}, "end_point": {"row": 27, "column": 57}}, {"id": 78, "type": "identifier", "text": "absl", "parent": 77, "children": [], "start_point": {"row": 27, "column": 51}, "end_point": {"row": 27, "column": 55}}, {"id": 79, "type": "binary_expression", "text": "Span<FObject*> updates", "parent": 72, "children": [80, 84, 86, 87], "start_point": {"row": 27, "column": 57}, "end_point": {"row": 27, "column": 79}}, {"id": 80, "type": "binary_expression", "text": "Span<FObject", "parent": 79, "children": [81, 82, 83], "start_point": {"row": 27, "column": 57}, "end_point": {"row": 27, "column": 69}}, {"id": 81, "type": "identifier", "text": "Span", "parent": 80, "children": [], "start_point": {"row": 27, "column": 57}, "end_point": {"row": 27, "column": 61}}, {"id": 82, "type": "<", "text": "<", "parent": 80, "children": [], "start_point": {"row": 27, "column": 61}, "end_point": {"row": 27, "column": 62}}, {"id": 83, "type": "identifier", "text": "FObject", "parent": 80, "children": [], "start_point": {"row": 27, "column": 62}, "end_point": {"row": 27, "column": 69}}, {"id": 84, "type": "ERROR", "text": "*", "parent": 79, "children": [85], "start_point": {"row": 27, "column": 69}, "end_point": {"row": 27, "column": 70}}, {"id": 85, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 27, "column": 69}, "end_point": {"row": 27, "column": 70}}, {"id": 86, "type": ">", "text": ">", "parent": 79, "children": [], "start_point": {"row": 27, "column": 70}, "end_point": {"row": 27, "column": 71}}, {"id": 87, "type": "identifier", "text": "updates", "parent": 79, "children": [], "start_point": {"row": 27, "column": 72}, "end_point": {"row": 27, "column": 79}}, {"id": 88, "type": "unary_expression", "text": "~SfizzVstEditor()", "parent": null, "children": [89, 90], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 21}}, {"id": 89, "type": "~", "text": "~", "parent": 88, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 5}}, {"id": 90, "type": "call_expression", "text": "SfizzVstEditor()", "parent": 88, "children": [91, 92], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 21}}, {"id": 91, "type": "identifier", "text": "SfizzVstEditor", "parent": 90, "children": [], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 19}}, {"id": 92, "type": "argument_list", "text": "()", "parent": 90, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 21}}, {"id": 93, "type": "function_definition", "text": "bool PLUGIN_API open(void* parent, const VSTGUI::PlatformType& platformType) override;\n void PLUGIN_API close() override;\n\n SfizzVstController* getController() const\n {\n return static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController());\n }", "parent": null, "children": [94, 95, 113, 116, 119], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 36, "column": 5}}, {"id": 94, "type": "primitive_type", "text": "bool", "parent": 93, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 8}}, {"id": 95, "type": "ERROR", "text": "PLUGIN_API open(void* parent, const VSTGUI::PlatformType& platformType) override;\n void PLUGIN_API", "parent": 93, "children": [96, 97, 111, 112], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 31, "column": 19}}, {"id": 96, "type": "identifier", "text": "PLUGIN_API", "parent": 95, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 19}}, {"id": 97, "type": "function_declarator", "text": "open(void* parent, const VSTGUI::PlatformType& platformType) override", "parent": 95, "children": [98, 99, 110], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 89}}, {"id": 98, "type": "identifier", "text": "open", "parent": 97, "children": [], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 24}}, {"id": 99, "type": "parameter_list", "text": "(void* parent, const VSTGUI::PlatformType& platformType)", "parent": 97, "children": [100, 105], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 80}}, {"id": 100, "type": "parameter_declaration", "text": "void* parent", "parent": 99, "children": [101, 102], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 37}}, {"id": 101, "type": "primitive_type", "text": "void", "parent": 100, "children": [], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 29}}, {"id": 102, "type": "pointer_declarator", "text": "* parent", "parent": 100, "children": [103, 104], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 37}}, {"id": 103, "type": "*", "text": "*", "parent": 102, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 30}}, {"id": 104, "type": "identifier", "text": "parent", "parent": 102, "children": [], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 37}}, {"id": 105, "type": "parameter_declaration", "text": "const VSTGUI::PlatformType& platformType", "parent": 99, "children": [106, 107, 109], "start_point": {"row": 30, "column": 39}, "end_point": {"row": 30, "column": 79}}, {"id": 106, "type": "type_identifier", "text": "VSTGUI", "parent": 105, "children": [], "start_point": {"row": 30, "column": 45}, "end_point": {"row": 30, "column": 51}}, {"id": 107, "type": "ERROR", "text": "::PlatformType&", "parent": 105, "children": [108], "start_point": {"row": 30, "column": 51}, "end_point": {"row": 30, "column": 66}}, {"id": 108, "type": "identifier", "text": "PlatformType", "parent": 107, "children": [], "start_point": {"row": 30, "column": 53}, "end_point": {"row": 30, "column": 65}}, {"id": 109, "type": "identifier", "text": "platformType", "parent": 105, "children": [], "start_point": {"row": 30, "column": 67}, "end_point": {"row": 30, "column": 79}}, {"id": 110, "type": "identifier", "text": "override", "parent": 97, "children": [], "start_point": {"row": 30, "column": 81}, "end_point": {"row": 30, "column": 89}}, {"id": 111, "type": "primitive_type", "text": "void", "parent": 95, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 8}}, {"id": 112, "type": "identifier", "text": "PLUGIN_API", "parent": 95, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 19}}, {"id": 113, "type": "function_declarator", "text": "close()", "parent": 93, "children": [114, 115], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 27}}, {"id": 114, "type": "identifier", "text": "close", "parent": 113, "children": [], "start_point": {"row": 31, "column": 20}, "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": "override;", "parent": 93, "children": [117, 118], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 37}}, {"id": 117, "type": "type_identifier", "text": "override", "parent": 116, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 36}}, {"id": 118, "type": "identifier", "text": "", "parent": 116, "children": [], "start_point": {"row": 31, "column": 36}, "end_point": {"row": 31, "column": 36}}, {"id": 119, "type": "ERROR", "text": "SfizzVstController* getController() const", "parent": 93, "children": [120, 121], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 45}}, {"id": 120, "type": "type_identifier", "text": "SfizzVstController", "parent": 119, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 22}}, {"id": 121, "type": "pointer_declarator", "text": "* getController() const", "parent": 119, "children": [122, 123], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 45}}, {"id": 122, "type": "*", "text": "*", "parent": 121, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 23}}, {"id": 123, "type": "function_declarator", "text": "getController() const", "parent": 121, "children": [124, 125], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 45}}, {"id": 124, "type": "identifier", "text": "getController", "parent": 123, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 37}}, {"id": 125, "type": "parameter_list", "text": "()", "parent": 123, "children": [], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 39}}, {"id": 126, "type": "return_statement", "text": "return static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController());", "parent": 93, "children": [127], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 84}}, {"id": 127, "type": "binary_expression", "text": "static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController())", "parent": 126, "children": [128, 132, 134, 135], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 83}}, {"id": 128, "type": "binary_expression", "text": "static_cast<SfizzVstController", "parent": 127, "children": [129, 130, 131], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 45}}, {"id": 129, "type": "identifier", "text": "static_cast", "parent": 128, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 26}}, {"id": 130, "type": "<", "text": "<", "parent": 128, "children": [], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 27}}, {"id": 131, "type": "identifier", "text": "SfizzVstController", "parent": 128, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 45}}, {"id": 132, "type": "ERROR", "text": "*", "parent": 127, "children": [133], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 46}}, {"id": 133, "type": "*", "text": "*", "parent": 132, "children": [], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 46}}, {"id": 134, "type": ">", "text": ">", "parent": 127, "children": [], "start_point": {"row": 35, "column": 46}, "end_point": {"row": 35, "column": 47}}, {"id": 135, "type": "parenthesized_expression", "text": "(Vst::VSTGUIEditor::getController())", "parent": 127, "children": [136, 139], "start_point": {"row": 35, "column": 47}, "end_point": {"row": 35, "column": 83}}, {"id": 136, "type": "ERROR", "text": "Vst::VSTGUIEditor::", "parent": 135, "children": [137, 138], "start_point": {"row": 35, "column": 48}, "end_point": {"row": 35, "column": 67}}, {"id": 137, "type": "identifier", "text": "Vst", "parent": 136, "children": [], "start_point": {"row": 35, "column": 48}, "end_point": {"row": 35, "column": 51}}, {"id": 138, "type": "identifier", "text": "VSTGUIEditor", "parent": 136, "children": [], "start_point": {"row": 35, "column": 53}, "end_point": {"row": 35, "column": 65}}, {"id": 139, "type": "call_expression", "text": "getController()", "parent": 135, "children": [140, 141], "start_point": {"row": 35, "column": 67}, "end_point": {"row": 35, "column": 82}}, {"id": 140, "type": "identifier", "text": "getController", "parent": 139, "children": [], "start_point": {"row": 35, "column": 67}, "end_point": {"row": 35, "column": 80}}, {"id": 141, "type": "argument_list", "text": "()", "parent": 139, "children": [], "start_point": {"row": 35, "column": 80}, "end_point": {"row": 35, "column": 82}}, {"id": 142, "type": "declaration", "text": "void updateEditorIsOpenParameter();", "parent": null, "children": [143, 144], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 39}}, {"id": 143, "type": "primitive_type", "text": "void", "parent": 142, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 8}}, {"id": 144, "type": "function_declarator", "text": "updateEditorIsOpenParameter()", "parent": 142, "children": [145, 146], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 38}}, {"id": 145, "type": "identifier", "text": "updateEditorIsOpenParameter", "parent": 144, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 36}}, {"id": 146, "type": "parameter_list", "text": "()", "parent": 144, "children": [], "start_point": {"row": 38, "column": 36}, "end_point": {"row": 38, "column": 38}}, {"id": 147, "type": "ERROR", "text": "CMessageResult notify(CBaseObject* sender, const char* message) override", "parent": null, "children": [148, 149], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 76}}, {"id": 148, "type": "type_identifier", "text": "CMessageResult", "parent": 147, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 18}}, {"id": 149, "type": "function_declarator", "text": "notify(CBaseObject* sender, const char* message) override", "parent": 147, "children": [150, 151, 162], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 76}}, {"id": 150, "type": "identifier", "text": "notify", "parent": 149, "children": [], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 25}}, {"id": 151, "type": "parameter_list", "text": "(CBaseObject* sender, const char* message)", "parent": 149, "children": [152, 157], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 67}}, {"id": 152, "type": "parameter_declaration", "text": "CBaseObject* sender", "parent": 151, "children": [153, 154], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 45}}, {"id": 153, "type": "type_identifier", "text": "CBaseObject", "parent": 152, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 37}}, {"id": 154, "type": "pointer_declarator", "text": "* sender", "parent": 152, "children": [155, 156], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 45}}, {"id": 155, "type": "*", "text": "*", "parent": 154, "children": [], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 38}}, {"id": 156, "type": "identifier", "text": "sender", "parent": 154, "children": [], "start_point": {"row": 41, "column": 39}, "end_point": {"row": 41, "column": 45}}, {"id": 157, "type": "parameter_declaration", "text": "const char* message", "parent": 151, "children": [158, 159], "start_point": {"row": 41, "column": 47}, "end_point": {"row": 41, "column": 66}}, {"id": 158, "type": "primitive_type", "text": "char", "parent": 157, "children": [], "start_point": {"row": 41, "column": 53}, "end_point": {"row": 41, "column": 57}}, {"id": 159, "type": "pointer_declarator", "text": "* message", "parent": 157, "children": [160, 161], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 66}}, {"id": 160, "type": "*", "text": "*", "parent": 159, "children": [], "start_point": {"row": 41, "column": 57}, "end_point": {"row": 41, "column": 58}}, {"id": 161, "type": "identifier", "text": "message", "parent": 159, "children": [], "start_point": {"row": 41, "column": 59}, "end_point": {"row": 41, "column": 66}}, {"id": 162, "type": "identifier", "text": "override", "parent": 149, "children": [], "start_point": {"row": 41, "column": 68}, "end_point": {"row": 41, "column": 76}}, {"id": 163, "type": "declaration", "text": "void PLUGIN_API update(FUnknown* changedUnknown, int32 message) override;\n\n //\nprivate:\n bool processUpdate(FUnknown* changedUnknown, int32 message);", "parent": null, "children": [164, 165, 179, 181], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 47, "column": 64}}, {"id": 164, "type": "primitive_type", "text": "void", "parent": 163, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 8}}, {"id": 165, "type": "ERROR", "text": "PLUGIN_API update(FUnknown* changedUnknown, int32 message) override;", "parent": 163, "children": [166, 167], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 77}}, {"id": 166, "type": "identifier", "text": "PLUGIN_API", "parent": 165, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 19}}, {"id": 167, "type": "function_declarator", "text": "update(FUnknown* changedUnknown, int32 message) override", "parent": 165, "children": [168, 169, 178], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 76}}, {"id": 168, "type": "identifier", "text": "update", "parent": 167, "children": [], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 26}}, {"id": 169, "type": "parameter_list", "text": "(FUnknown* changedUnknown, int32 message)", "parent": 167, "children": [170, 175], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 67}}, {"id": 170, "type": "parameter_declaration", "text": "FUnknown* changedUnknown", "parent": 169, "children": [171, 172], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 51}}, {"id": 171, "type": "type_identifier", "text": "FUnknown", "parent": 170, "children": [], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 35}}, {"id": 172, "type": "pointer_declarator", "text": "* changedUnknown", "parent": 170, "children": [173, 174], "start_point": {"row": 43, "column": 35}, "end_point": {"row": 43, "column": 51}}, {"id": 173, "type": "*", "text": "*", "parent": 172, "children": [], "start_point": {"row": 43, "column": 35}, "end_point": {"row": 43, "column": 36}}, {"id": 174, "type": "identifier", "text": "changedUnknown", "parent": 172, "children": [], "start_point": {"row": 43, "column": 37}, "end_point": {"row": 43, "column": 51}}, {"id": 175, "type": "parameter_declaration", "text": "int32 message", "parent": 169, "children": [176, 177], "start_point": {"row": 43, "column": 53}, "end_point": {"row": 43, "column": 66}}, {"id": 176, "type": "type_identifier", "text": "int32", "parent": 175, "children": [], "start_point": {"row": 43, "column": 53}, "end_point": {"row": 43, "column": 58}}, {"id": 177, "type": "identifier", "text": "message", "parent": 175, "children": [], "start_point": {"row": 43, "column": 59}, "end_point": {"row": 43, "column": 66}}, {"id": 178, "type": "identifier", "text": "override", "parent": 167, "children": [], "start_point": {"row": 43, "column": 68}, "end_point": {"row": 43, "column": 76}}, {"id": 179, "type": "ERROR", "text": "private:\n bool", "parent": 163, "children": [180], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 8}}, {"id": 180, "type": "primitive_type", "text": "bool", "parent": 179, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 8}}, {"id": 181, "type": "function_declarator", "text": "processUpdate(FUnknown* changedUnknown, int32 message)", "parent": 163, "children": [182, 183], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 63}}, {"id": 182, "type": "identifier", "text": "processUpdate", "parent": 181, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 22}}, {"id": 183, "type": "parameter_list", "text": "(FUnknown* changedUnknown, int32 message)", "parent": 181, "children": [184, 189], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 63}}, {"id": 184, "type": "parameter_declaration", "text": "FUnknown* changedUnknown", "parent": 183, "children": [185, 186], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 47}}, {"id": 185, "type": "type_identifier", "text": "FUnknown", "parent": 184, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 31}}, {"id": 186, "type": "pointer_declarator", "text": "* changedUnknown", "parent": 184, "children": [187, 188], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 47}}, {"id": 187, "type": "*", "text": "*", "parent": 186, "children": [], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 32}}, {"id": 188, "type": "identifier", "text": "changedUnknown", "parent": 186, "children": [], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 47}}, {"id": 189, "type": "parameter_declaration", "text": "int32 message", "parent": 183, "children": [190, 191], "start_point": {"row": 47, "column": 49}, "end_point": {"row": 47, "column": 62}}, {"id": 190, "type": "type_identifier", "text": "int32", "parent": 189, "children": [], "start_point": {"row": 47, "column": 49}, "end_point": {"row": 47, "column": 54}}, {"id": 191, "type": "identifier", "text": "message", "parent": 189, "children": [], "start_point": {"row": 47, "column": 55}, "end_point": {"row": 47, "column": 62}}, {"id": 192, "type": "declaration", "text": "void processParameterUpdates();", "parent": null, "children": [193, 194], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 35}}, {"id": 193, "type": "primitive_type", "text": "void", "parent": 192, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 8}}, {"id": 194, "type": "function_declarator", "text": "processParameterUpdates()", "parent": 192, "children": [195, 196], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 34}}, {"id": 195, "type": "identifier", "text": "processParameterUpdates", "parent": 194, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 32}}, {"id": 196, "type": "parameter_list", "text": "()", "parent": 194, "children": [], "start_point": {"row": 48, "column": 32}, "end_point": {"row": 48, "column": 34}}, {"id": 197, "type": "declaration", "text": "void updateParameter(Vst::Parameter* parameterToUpdate);", "parent": null, "children": [198, 199], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 60}}, {"id": 198, "type": "primitive_type", "text": "void", "parent": 197, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 8}}, {"id": 199, "type": "function_declarator", "text": "updateParameter(Vst::Parameter* parameterToUpdate)", "parent": 197, "children": [200, 201], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 59}}, {"id": 200, "type": "identifier", "text": "updateParameter", "parent": 199, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 24}}, {"id": 201, "type": "parameter_list", "text": "(Vst::Parameter* parameterToUpdate)", "parent": 199, "children": [202], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 59}}, {"id": 202, "type": "parameter_declaration", "text": "Vst::Parameter* parameterToUpdate", "parent": 201, "children": [203, 204, 206], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 58}}, {"id": 203, "type": "type_identifier", "text": "Vst", "parent": 202, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 28}}, {"id": 204, "type": "ERROR", "text": "::Parameter", "parent": 202, "children": [205], "start_point": {"row": 49, "column": 28}, "end_point": {"row": 49, "column": 39}}, {"id": 205, "type": "identifier", "text": "Parameter", "parent": 204, "children": [], "start_point": {"row": 49, "column": 30}, "end_point": {"row": 49, "column": 39}}, {"id": 206, "type": "pointer_declarator", "text": "* parameterToUpdate", "parent": 202, "children": [207, 208], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 58}}, {"id": 207, "type": "*", "text": "*", "parent": 206, "children": [], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 40}}, {"id": 208, "type": "identifier", "text": "parameterToUpdate", "parent": 206, "children": [], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 58}}, {"id": 209, "type": "labeled_statement", "text": "protected:\n // EditorController\n void uiSendValue(EditId id, const EditValue& v) override;", "parent": null, "children": [210], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 53, "column": 61}}, {"id": 210, "type": "ERROR", "text": "void uiSendValue(EditId id, const EditValue& v) override", "parent": 209, "children": [211, 212], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 60}}, {"id": 211, "type": "primitive_type", "text": "void", "parent": 210, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 8}}, {"id": 212, "type": "function_declarator", "text": "uiSendValue(EditId id, const EditValue& v) override", "parent": 210, "children": [213, 214, 221], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 60}}, {"id": 213, "type": "identifier", "text": "uiSendValue", "parent": 212, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 20}}, {"id": 214, "type": "parameter_list", "text": "(EditId id, const EditValue& v)", "parent": 212, "children": [215, 218], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 51}}, {"id": 215, "type": "parameter_declaration", "text": "EditId id", "parent": 214, "children": [216, 217], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 30}}, {"id": 216, "type": "type_identifier", "text": "EditId", "parent": 215, "children": [], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 27}}, {"id": 217, "type": "identifier", "text": "id", "parent": 215, "children": [], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 30}}, {"id": 218, "type": "parameter_declaration", "text": "const EditValue& v", "parent": 214, "children": [219, 220], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 50}}, {"id": 219, "type": "type_identifier", "text": "EditValue", "parent": 218, "children": [], "start_point": {"row": 53, "column": 38}, "end_point": {"row": 53, "column": 47}}, {"id": 220, "type": "identifier", "text": "v", "parent": 218, "children": [], "start_point": {"row": 53, "column": 49}, "end_point": {"row": 53, "column": 50}}, {"id": 221, "type": "identifier", "text": "override", "parent": 212, "children": [], "start_point": {"row": 53, "column": 52}, "end_point": {"row": 53, "column": 60}}, {"id": 222, "type": "ERROR", "text": "void uiBeginSend(EditId id) override", "parent": null, "children": [223, 224], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 40}}, {"id": 223, "type": "primitive_type", "text": "void", "parent": 222, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 8}}, {"id": 224, "type": "function_declarator", "text": "uiBeginSend(EditId id) override", "parent": 222, "children": [225, 226, 230], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 40}}, {"id": 225, "type": "identifier", "text": "uiBeginSend", "parent": 224, "children": [], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 20}}, {"id": 226, "type": "parameter_list", "text": "(EditId id)", "parent": 224, "children": [227], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 31}}, {"id": 227, "type": "parameter_declaration", "text": "EditId id", "parent": 226, "children": [228, 229], "start_point": {"row": 54, "column": 21}, "end_point": {"row": 54, "column": 30}}, {"id": 228, "type": "type_identifier", "text": "EditId", "parent": 227, "children": [], "start_point": {"row": 54, "column": 21}, "end_point": {"row": 54, "column": 27}}, {"id": 229, "type": "identifier", "text": "id", "parent": 227, "children": [], "start_point": {"row": 54, "column": 28}, "end_point": {"row": 54, "column": 30}}, {"id": 230, "type": "identifier", "text": "override", "parent": 224, "children": [], "start_point": {"row": 54, "column": 32}, "end_point": {"row": 54, "column": 40}}, {"id": 231, "type": "ERROR", "text": "void uiEndSend(EditId id) override", "parent": null, "children": [232, 233], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 38}}, {"id": 232, "type": "primitive_type", "text": "void", "parent": 231, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 8}}, {"id": 233, "type": "function_declarator", "text": "uiEndSend(EditId id) override", "parent": 231, "children": [234, 235, 239], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 38}}, {"id": 234, "type": "identifier", "text": "uiEndSend", "parent": 233, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 18}}, {"id": 235, "type": "parameter_list", "text": "(EditId id)", "parent": 233, "children": [236], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 29}}, {"id": 236, "type": "parameter_declaration", "text": "EditId id", "parent": 235, "children": [237, 238], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 28}}, {"id": 237, "type": "type_identifier", "text": "EditId", "parent": 236, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 25}}, {"id": 238, "type": "identifier", "text": "id", "parent": 236, "children": [], "start_point": {"row": 55, "column": 26}, "end_point": {"row": 55, "column": 28}}, {"id": 239, "type": "identifier", "text": "override", "parent": 233, "children": [], "start_point": {"row": 55, "column": 30}, "end_point": {"row": 55, "column": 38}}, {"id": 240, "type": "ERROR", "text": "void uiSendMIDI(const uint8_t* data, uint32_t len) override", "parent": null, "children": [241, 242], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 63}}, {"id": 241, "type": "primitive_type", "text": "void", "parent": 240, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 8}}, {"id": 242, "type": "function_declarator", "text": "uiSendMIDI(const uint8_t* data, uint32_t len) override", "parent": 240, "children": [243, 244, 253], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 63}}, {"id": 243, "type": "identifier", "text": "uiSendMIDI", "parent": 242, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 19}}, {"id": 244, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t len)", "parent": 242, "children": [245, 250], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 54}}, {"id": 245, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 244, "children": [246, 247], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 39}}, {"id": 246, "type": "primitive_type", "text": "uint8_t", "parent": 245, "children": [], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 33}}, {"id": 247, "type": "pointer_declarator", "text": "* data", "parent": 245, "children": [248, 249], "start_point": {"row": 56, "column": 33}, "end_point": {"row": 56, "column": 39}}, {"id": 248, "type": "*", "text": "*", "parent": 247, "children": [], "start_point": {"row": 56, "column": 33}, "end_point": {"row": 56, "column": 34}}, {"id": 249, "type": "identifier", "text": "data", "parent": 247, "children": [], "start_point": {"row": 56, "column": 35}, "end_point": {"row": 56, "column": 39}}, {"id": 250, "type": "parameter_declaration", "text": "uint32_t len", "parent": 244, "children": [251, 252], "start_point": {"row": 56, "column": 41}, "end_point": {"row": 56, "column": 53}}, {"id": 251, "type": "primitive_type", "text": "uint32_t", "parent": 250, "children": [], "start_point": {"row": 56, "column": 41}, "end_point": {"row": 56, "column": 49}}, {"id": 252, "type": "identifier", "text": "len", "parent": 250, "children": [], "start_point": {"row": 56, "column": 50}, "end_point": {"row": 56, "column": 53}}, {"id": 253, "type": "identifier", "text": "override", "parent": 242, "children": [], "start_point": {"row": 56, "column": 55}, "end_point": {"row": 56, "column": 63}}, {"id": 254, "type": "ERROR", "text": "void uiSendMessage(const char* path, const char* sig, const sfizz_arg_t* args) override", "parent": null, "children": [255, 256], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 91}}, {"id": 255, "type": "primitive_type", "text": "void", "parent": 254, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 8}}, {"id": 256, "type": "function_declarator", "text": "uiSendMessage(const char* path, const char* sig, const sfizz_arg_t* args) override", "parent": 254, "children": [257, 258, 274], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 91}}, {"id": 257, "type": "identifier", "text": "uiSendMessage", "parent": 256, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 22}}, {"id": 258, "type": "parameter_list", "text": "(const char* path, const char* sig, const sfizz_arg_t* args)", "parent": 256, "children": [259, 264, 269], "start_point": {"row": 57, "column": 22}, "end_point": {"row": 57, "column": 82}}, {"id": 259, "type": "parameter_declaration", "text": "const char* path", "parent": 258, "children": [260, 261], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 39}}, {"id": 260, "type": "primitive_type", "text": "char", "parent": 259, "children": [], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 33}}, {"id": 261, "type": "pointer_declarator", "text": "* path", "parent": 259, "children": [262, 263], "start_point": {"row": 57, "column": 33}, "end_point": {"row": 57, "column": 39}}, {"id": 262, "type": "*", "text": "*", "parent": 261, "children": [], "start_point": {"row": 57, "column": 33}, "end_point": {"row": 57, "column": 34}}, {"id": 263, "type": "identifier", "text": "path", "parent": 261, "children": [], "start_point": {"row": 57, "column": 35}, "end_point": {"row": 57, "column": 39}}, {"id": 264, "type": "parameter_declaration", "text": "const char* sig", "parent": 258, "children": [265, 266], "start_point": {"row": 57, "column": 41}, "end_point": {"row": 57, "column": 56}}, {"id": 265, "type": "primitive_type", "text": "char", "parent": 264, "children": [], "start_point": {"row": 57, "column": 47}, "end_point": {"row": 57, "column": 51}}, {"id": 266, "type": "pointer_declarator", "text": "* sig", "parent": 264, "children": [267, 268], "start_point": {"row": 57, "column": 51}, "end_point": {"row": 57, "column": 56}}, {"id": 267, "type": "*", "text": "*", "parent": 266, "children": [], "start_point": {"row": 57, "column": 51}, "end_point": {"row": 57, "column": 52}}, {"id": 268, "type": "identifier", "text": "sig", "parent": 266, "children": [], "start_point": {"row": 57, "column": 53}, "end_point": {"row": 57, "column": 56}}, {"id": 269, "type": "parameter_declaration", "text": "const sfizz_arg_t* args", "parent": 258, "children": [270, 271], "start_point": {"row": 57, "column": 58}, "end_point": {"row": 57, "column": 81}}, {"id": 270, "type": "type_identifier", "text": "sfizz_arg_t", "parent": 269, "children": [], "start_point": {"row": 57, "column": 64}, "end_point": {"row": 57, "column": 75}}, {"id": 271, "type": "pointer_declarator", "text": "* args", "parent": 269, "children": [272, 273], "start_point": {"row": 57, "column": 75}, "end_point": {"row": 57, "column": 81}}, {"id": 272, "type": "*", "text": "*", "parent": 271, "children": [], "start_point": {"row": 57, "column": 75}, "end_point": {"row": 57, "column": 76}}, {"id": 273, "type": "identifier", "text": "args", "parent": 271, "children": [], "start_point": {"row": 57, "column": 77}, "end_point": {"row": 57, "column": 81}}, {"id": 274, "type": "identifier", "text": "override", "parent": 256, "children": [], "start_point": {"row": 57, "column": 83}, "end_point": {"row": 57, "column": 91}}, {"id": 275, "type": "labeled_statement", "text": "private:\n void loadSfzFile(const std::string& filePath);", "parent": null, "children": [276], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 60, "column": 50}}, {"id": 276, "type": "declaration", "text": "void loadSfzFile(const std::string& filePath);", "parent": 275, "children": [277, 278], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 50}}, {"id": 277, "type": "primitive_type", "text": "void", "parent": 276, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 8}}, {"id": 278, "type": "function_declarator", "text": "loadSfzFile(const std::string& filePath)", "parent": 276, "children": [279, 280], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 49}}, {"id": 279, "type": "identifier", "text": "loadSfzFile", "parent": 278, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 20}}, {"id": 280, "type": "parameter_list", "text": "(const std::string& filePath)", "parent": 278, "children": [281], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 49}}, {"id": 281, "type": "parameter_declaration", "text": "const std::string& filePath", "parent": 280, "children": [282, 283, 285], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 48}}, {"id": 282, "type": "type_identifier", "text": "std", "parent": 281, "children": [], "start_point": {"row": 60, "column": 27}, "end_point": {"row": 60, "column": 30}}, {"id": 283, "type": "ERROR", "text": "::string&", "parent": 281, "children": [284], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 39}}, {"id": 284, "type": "identifier", "text": "string", "parent": 283, "children": [], "start_point": {"row": 60, "column": 32}, "end_point": {"row": 60, "column": 38}}, {"id": 285, "type": "identifier", "text": "filePath", "parent": 281, "children": [], "start_point": {"row": 60, "column": 40}, "end_point": {"row": 60, "column": 48}}, {"id": 286, "type": "declaration", "text": "void loadScalaFile(const std::string& filePath);", "parent": null, "children": [287, 288], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 52}}, {"id": 287, "type": "primitive_type", "text": "void", "parent": 286, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 8}}, {"id": 288, "type": "function_declarator", "text": "loadScalaFile(const std::string& filePath)", "parent": 286, "children": [289, 290], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 51}}, {"id": 289, "type": "identifier", "text": "loadScalaFile", "parent": 288, "children": [], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 22}}, {"id": 290, "type": "parameter_list", "text": "(const std::string& filePath)", "parent": 288, "children": [291], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 51}}, {"id": 291, "type": "parameter_declaration", "text": "const std::string& filePath", "parent": 290, "children": [292, 293, 295], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 50}}, {"id": 292, "type": "type_identifier", "text": "std", "parent": 291, "children": [], "start_point": {"row": 61, "column": 29}, "end_point": {"row": 61, "column": 32}}, {"id": 293, "type": "ERROR", "text": "::string&", "parent": 291, "children": [294], "start_point": {"row": 61, "column": 32}, "end_point": {"row": 61, "column": 41}}, {"id": 294, "type": "identifier", "text": "string", "parent": 293, "children": [], "start_point": {"row": 61, "column": 34}, "end_point": {"row": 61, "column": 40}}, {"id": 295, "type": "identifier", "text": "filePath", "parent": 291, "children": [], "start_point": {"row": 61, "column": 42}, "end_point": {"row": 61, "column": 50}}, {"id": 296, "type": "labeled_statement", "text": "Vst::ParamID parameterOfEditId(EditId id);", "parent": null, "children": [297, 298], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 46}}, {"id": 297, "type": "statement_identifier", "text": "Vst", "parent": 296, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 7}}, {"id": 298, "type": "declaration", "text": "ParamID parameterOfEditId(EditId id);", "parent": 296, "children": [299, 300], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 46}}, {"id": 299, "type": "type_identifier", "text": "ParamID", "parent": 298, "children": [], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 16}}, {"id": 300, "type": "function_declarator", "text": "parameterOfEditId(EditId id)", "parent": 298, "children": [301, 302], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 45}}, {"id": 301, "type": "identifier", "text": "parameterOfEditId", "parent": 300, "children": [], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 34}}, {"id": 302, "type": "parameter_list", "text": "(EditId id)", "parent": 300, "children": [303], "start_point": {"row": 63, "column": 34}, "end_point": {"row": 63, "column": 45}}, {"id": 303, "type": "parameter_declaration", "text": "EditId id", "parent": 302, "children": [304, 305], "start_point": {"row": 63, "column": 35}, "end_point": {"row": 63, "column": 44}}, {"id": 304, "type": "type_identifier", "text": "EditId", "parent": 303, "children": [], "start_point": {"row": 63, "column": 35}, "end_point": {"row": 63, "column": 41}}, {"id": 305, "type": "identifier", "text": "id", "parent": 303, "children": [], "start_point": {"row": 63, "column": 42}, "end_point": {"row": 63, "column": 44}}, {"id": 306, "type": "labeled_statement", "text": "std::unique_ptr<Editor> editor_;", "parent": null, "children": [307], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 36}}, {"id": 307, "type": "statement_identifier", "text": "std", "parent": 306, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 7}}, {"id": 308, "type": "binary_expression", "text": "unique_ptr<Editor> editor_", "parent": 306, "children": [309, 313, 314], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 35}}, {"id": 309, "type": "binary_expression", "text": "unique_ptr<Editor", "parent": 308, "children": [310, 311, 312], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 26}}, {"id": 310, "type": "identifier", "text": "unique_ptr", "parent": 309, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 19}}, {"id": 311, "type": "<", "text": "<", "parent": 309, "children": [], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 20}}, {"id": 312, "type": "identifier", "text": "Editor", "parent": 309, "children": [], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 26}}, {"id": 313, "type": ">", "text": ">", "parent": 308, "children": [], "start_point": {"row": 65, "column": 26}, "end_point": {"row": 65, "column": 27}}, {"id": 314, "type": "identifier", "text": "editor_", "parent": 308, "children": [], "start_point": {"row": 65, "column": 28}, "end_point": {"row": 65, "column": 35}}, {"id": 315, "type": "preproc_if", "text": "#if !defined(__APPLE__) && !defined(_WIN32)\n SharedPointer<RunLoop> _runLoop;\n#endif", "parent": null, "children": [316, 317, 329, 337], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 316, "type": "#if", "text": "#if", "parent": 315, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 3}}, {"id": 317, "type": "binary_expression", "text": "!defined(__APPLE__) && !defined(_WIN32)", "parent": 315, "children": [318, 323, 324], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 43}}, {"id": 318, "type": "unary_expression", "text": "!defined(__APPLE__)", "parent": 317, "children": [319, 320], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 23}}, {"id": 319, "type": "!", "text": "!", "parent": 318, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 5}}, {"id": 320, "type": "preproc_defined", "text": "defined(__APPLE__)", "parent": 318, "children": [321, 322], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 23}}, {"id": 321, "type": "defined", "text": "defined", "parent": 320, "children": [], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 12}}, {"id": 322, "type": "identifier", "text": "__APPLE__", "parent": 320, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 22}}, {"id": 323, "type": "&&", "text": "&&", "parent": 317, "children": [], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 67, "column": 26}}, {"id": 324, "type": "unary_expression", "text": "!defined(_WIN32)", "parent": 317, "children": [325, 326], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 43}}, {"id": 325, "type": "!", "text": "!", "parent": 324, "children": [], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 28}}, {"id": 326, "type": "preproc_defined", "text": "defined(_WIN32)", "parent": 324, "children": [327, 328], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 43}}, {"id": 327, "type": "defined", "text": "defined", "parent": 326, "children": [], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 35}}, {"id": 328, "type": "identifier", "text": "_WIN32", "parent": 326, "children": [], "start_point": {"row": 67, "column": 36}, "end_point": {"row": 67, "column": 42}}, {"id": 329, "type": "\n", "text": "\n", "parent": 315, "children": [], "start_point": {"row": 67, "column": 43}, "end_point": {"row": 68, "column": 0}}, {"id": 330, "type": "binary_expression", "text": "SharedPointer<RunLoop> _runLoop", "parent": 315, "children": [331, 335, 336], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 35}}, {"id": 331, "type": "binary_expression", "text": "SharedPointer<RunLoop", "parent": 330, "children": [332, 333, 334], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 25}}, {"id": 332, "type": "identifier", "text": "SharedPointer", "parent": 331, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 17}}, {"id": 333, "type": "<", "text": "<", "parent": 331, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 18}}, {"id": 334, "type": "identifier", "text": "RunLoop", "parent": 331, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 25}}, {"id": 335, "type": ">", "text": ">", "parent": 330, "children": [], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 26}}, {"id": 336, "type": "identifier", "text": "_runLoop", "parent": 330, "children": [], "start_point": {"row": 68, "column": 27}, "end_point": {"row": 68, "column": 35}}, {"id": 337, "type": "#endif", "text": "#endif", "parent": 315, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 338, "type": "labeled_statement", "text": "std::unique_ptr<uint8[]> oscTemp_;", "parent": null, "children": [339], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 38}}, {"id": 339, "type": "statement_identifier", "text": "std", "parent": 338, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 7}}, {"id": 340, "type": "binary_expression", "text": "unique_ptr<uint8[]> oscTemp_", "parent": 338, "children": [341, 347, 348], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 37}}, {"id": 341, "type": "binary_expression", "text": "unique_ptr<uint8[]", "parent": 340, "children": [342, 343, 344], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 27}}, {"id": 342, "type": "identifier", "text": "unique_ptr", "parent": 341, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 19}}, {"id": 343, "type": "<", "text": "<", "parent": 341, "children": [], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 20}}, {"id": 344, "type": "subscript_expression", "text": "uint8[]", "parent": 341, "children": [345, 346], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 27}}, {"id": 345, "type": "identifier", "text": "uint8", "parent": 344, "children": [], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 25}}, {"id": 346, "type": "identifier", "text": "", "parent": 344, "children": [], "start_point": {"row": 72, "column": 26}, "end_point": {"row": 72, "column": 26}}, {"id": 347, "type": ">", "text": ">", "parent": 340, "children": [], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 28}}, {"id": 348, "type": "identifier", "text": "oscTemp_", "parent": 340, "children": [], "start_point": {"row": 72, "column": 29}, "end_point": {"row": 72, "column": 37}}, {"id": 349, "type": "labeled_statement", "text": "std::vector<IPtr<FObject>> updates_;", "parent": null, "children": [350], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 40}}, {"id": 350, "type": "statement_identifier", "text": "std", "parent": 349, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 7}}, {"id": 351, "type": "binary_expression", "text": "vector<IPtr<FObject>> updates_", "parent": 349, "children": [352, 356, 357], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 39}}, {"id": 352, "type": "binary_expression", "text": "vector<IPtr", "parent": 351, "children": [353, 354, 355], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 20}}, {"id": 353, "type": "identifier", "text": "vector", "parent": 352, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 15}}, {"id": 354, "type": "<", "text": "<", "parent": 352, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 16}}, {"id": 355, "type": "identifier", "text": "IPtr", "parent": 352, "children": [], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 20}}, {"id": 356, "type": "<", "text": "<", "parent": 351, "children": [], "start_point": {"row": 75, "column": 20}, "end_point": {"row": 75, "column": 21}}, {"id": 357, "type": "binary_expression", "text": "FObject>> updates_", "parent": 351, "children": [358, 359, 360], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 39}}, {"id": 358, "type": "identifier", "text": "FObject", "parent": 357, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 28}}, {"id": 359, "type": ">>", "text": ">>", "parent": 357, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 30}}, {"id": 360, "type": "identifier", "text": "updates_", "parent": 357, "children": [], "start_point": {"row": 75, "column": 31}, "end_point": {"row": 75, "column": 39}}, {"id": 361, "type": "labeled_statement", "text": "std::unique_ptr<Vst::ThreadChecker> threadChecker_;", "parent": null, "children": [362, 363], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 55}}, {"id": 362, "type": "statement_identifier", "text": "std", "parent": 361, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 7}}, {"id": 363, "type": "ERROR", "text": "::unique_ptr<Vst:", "parent": 361, "children": [364], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 24}}, {"id": 364, "type": "binary_expression", "text": "unique_ptr<Vst", "parent": 363, "children": [365, 366, 367], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 23}}, {"id": 365, "type": "identifier", "text": "unique_ptr", "parent": 364, "children": [], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 19}}, {"id": 366, "type": "<", "text": "<", "parent": 364, "children": [], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 20}}, {"id": 367, "type": "identifier", "text": "Vst", "parent": 364, "children": [], "start_point": {"row": 78, "column": 20}, "end_point": {"row": 78, "column": 23}}, {"id": 368, "type": "binary_expression", "text": "ThreadChecker> threadChecker_", "parent": 361, "children": [369, 370, 371], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 54}}, {"id": 369, "type": "identifier", "text": "ThreadChecker", "parent": 368, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 38}}, {"id": 370, "type": ">", "text": ">", "parent": 368, "children": [], "start_point": {"row": 78, "column": 38}, "end_point": {"row": 78, "column": 39}}, {"id": 371, "type": "identifier", "text": "threadChecker_", "parent": 368, "children": [], "start_point": {"row": 78, "column": 40}, "end_point": {"row": 78, "column": 54}}, {"id": 372, "type": "labeled_statement", "text": "std::set<Vst::ParamID> parametersToUpdate_;", "parent": null, "children": [373, 374], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 47}}, {"id": 373, "type": "statement_identifier", "text": "std", "parent": 372, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 7}}, {"id": 374, "type": "ERROR", "text": "::set<Vst:", "parent": 372, "children": [375], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 82, "column": 17}}, {"id": 375, "type": "binary_expression", "text": "set<Vst", "parent": 374, "children": [376, 377, 378], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 16}}, {"id": 376, "type": "identifier", "text": "set", "parent": 375, "children": [], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 12}}, {"id": 377, "type": "<", "text": "<", "parent": 375, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 13}}, {"id": 378, "type": "identifier", "text": "Vst", "parent": 375, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 16}}, {"id": 379, "type": "binary_expression", "text": "ParamID> parametersToUpdate_", "parent": 372, "children": [380, 381, 382], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 46}}, {"id": 380, "type": "identifier", "text": "ParamID", "parent": 379, "children": [], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 25}}, {"id": 381, "type": ">", "text": ">", "parent": 379, "children": [], "start_point": {"row": 82, "column": 25}, "end_point": {"row": 82, "column": 26}}, {"id": 382, "type": "identifier", "text": "parametersToUpdate_", "parent": 379, "children": [], "start_point": {"row": 82, "column": 27}, "end_point": {"row": 82, "column": 46}}, {"id": 383, "type": "labeled_statement", "text": "std::mutex parametersToUpdateMutex_;", "parent": null, "children": [384, 385], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 40}}, {"id": 384, "type": "statement_identifier", "text": "std", "parent": 383, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 7}}, {"id": 385, "type": "declaration", "text": "mutex parametersToUpdateMutex_;", "parent": 383, "children": [386, 387], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 40}}, {"id": 386, "type": "type_identifier", "text": "mutex", "parent": 385, "children": [], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 14}}, {"id": 387, "type": "identifier", "text": "parametersToUpdateMutex_", "parent": 385, "children": [], "start_point": {"row": 83, "column": 15}, "end_point": {"row": 83, "column": 39}}]}, "node_categories": {"declarations": {"functions": [41, 93, 97, 113, 123, 144, 149, 167, 181, 194, 199, 212, 224, 233, 242, 256, 278, 288, 300], "variables": [24, 44, 47, 52, 64, 100, 105, 116, 142, 152, 157, 163, 170, 175, 184, 189, 192, 197, 202, 215, 218, 227, 236, 245, 250, 259, 264, 269, 276, 281, 286, 291, 298, 303, 385], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22], "modules": [], "enums": []}, "statements": {"expressions": [28, 29, 35, 70, 73, 79, 80, 88, 90, 127, 128, 135, 139, 308, 309, 317, 318, 324, 330, 331, 340, 341, 344, 351, 352, 357, 364, 368, 375, 379], "assignments": [], "loops": [], "conditionals": [25, 26, 27, 33, 39, 42, 43, 45, 46, 48, 50, 51, 53, 54, 56, 58, 60, 61, 62, 65, 67, 69, 71, 74, 76, 78, 81, 83, 87, 91, 96, 98, 104, 106, 108, 109, 110, 112, 114, 117, 118, 120, 124, 129, 131, 137, 138, 140, 145, 148, 150, 153, 156, 161, 162, 166, 168, 171, 174, 176, 177, 178, 182, 185, 188, 190, 191, 195, 200, 203, 205, 208, 213, 216, 217, 219, 220, 221, 225, 228, 229, 230, 234, 237, 238, 239, 243, 249, 252, 253, 257, 263, 268, 270, 273, 274, 279, 282, 284, 285, 289, 292, 294, 295, 297, 299, 301, 304, 305, 307, 310, 312, 314, 315, 316, 322, 328, 332, 334, 336, 337, 339, 342, 345, 346, 348, 350, 353, 355, 358, 360, 362, 365, 367, 369, 371, 373, 376, 378, 380, 382, 384, 386, 387], "returns": [126], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17, 20, 23], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 41, "universal_type": "function", "name": "RunLoop;", "text_snippet": "namespace VSTGUI { class RunLoop; }"}, {"node_id": 93, "universal_type": "function", "name": "PLUGIN_API", "text_snippet": "bool PLUGIN_API open(void* parent, const VSTGUI::PlatformType& platformType) override;\n void PLUG"}, {"node_id": 97, "universal_type": "function", "name": "unknown", "text_snippet": "open(void* parent, const VSTGUI::PlatformType& platformType) override"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "close()"}, {"node_id": 123, "universal_type": "function", "name": "unknown", "text_snippet": "getController() const"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "updateEditorIsOpenParameter()"}, {"node_id": 149, "universal_type": "function", "name": "unknown", "text_snippet": "notify(CBaseObject* sender, const char* message) override"}, {"node_id": 167, "universal_type": "function", "name": "unknown", "text_snippet": "update(FUnknown* changedUnknown, int32 message) override"}, {"node_id": 181, "universal_type": "function", "name": "unknown", "text_snippet": "processUpdate(FUnknown* changedUnknown, int32 message)"}, {"node_id": 194, "universal_type": "function", "name": "unknown", "text_snippet": "processParameterUpdates()"}, {"node_id": 199, "universal_type": "function", "name": "unknown", "text_snippet": "updateParameter(Vst::Parameter* parameterToUpdate)"}, {"node_id": 212, "universal_type": "function", "name": "unknown", "text_snippet": "uiSendValue(EditId id, const EditValue& v) override"}, {"node_id": 224, "universal_type": "function", "name": "unknown", "text_snippet": "uiBeginSend(EditId id) override"}, {"node_id": 233, "universal_type": "function", "name": "unknown", "text_snippet": "uiEndSend(EditId id) override"}, {"node_id": 242, "universal_type": "function", "name": "unknown", "text_snippet": "uiSendMIDI(const uint8_t* data, uint32_t len) override"}, {"node_id": 256, "universal_type": "function", "name": "unknown", "text_snippet": "uiSendMessage(const char* path, const char* sig, const sfizz_arg_t* args) override"}, {"node_id": 278, "universal_type": "function", "name": "unknown", "text_snippet": "loadSfzFile(const std::string& filePath)"}, {"node_id": 288, "universal_type": "function", "name": "unknown", "text_snippet": "loadScalaFile(const std::string& filePath)"}, {"node_id": 300, "universal_type": "function", "name": "unknown", "text_snippet": "parameterOfEditId(EditId id)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"SfizzVstController.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"editor/EditorController.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"public.sdk/source/vst/vstguieditor.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"public.sdk/source/common/threadchecker.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <absl/types/span.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <mutex>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <set>\n"}, {"node_id": 22, "text": "#include"}]}, "original_source_code": "// SPDX-License-Identifier: BSD-2-Clause\n\n// This code is part of the sfizz library and is licensed under a BSD 2-clause\n// license. You should have receive a LICENSE.md file along with the code.\n// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz\n\n#pragma once\n#include \"SfizzVstController.h\"\n#include \"editor/EditorController.h\"\n#include \"public.sdk/source/vst/vstguieditor.h\"\n#include \"public.sdk/source/common/threadchecker.h\"\n#include <absl/types/span.h>\n#include <mutex>\n#include <set>\nclass Editor;\n#if !defined(__APPLE__) && !defined(_WIN32)\nnamespace VSTGUI { class RunLoop; }\n#endif\n\nusing namespace Steinberg;\nusing namespace VSTGUI;\n\nclass SfizzVstEditor : public Vst::VSTGUIEditor,\n public EditorController {\npublic:\n using Self = SfizzVstEditor;\n\n SfizzVstEditor(SfizzVstController* controller, absl::Span<FObject*> updates);\n ~SfizzVstEditor();\n\n bool PLUGIN_API open(void* parent, const VSTGUI::PlatformType& platformType) override;\n void PLUGIN_API close() override;\n\n SfizzVstController* getController() const\n {\n return static_cast<SfizzVstController*>(Vst::VSTGUIEditor::getController());\n }\n\n void updateEditorIsOpenParameter();\n\n // VSTGUIEditor\n CMessageResult notify(CBaseObject* sender, const char* message) override;\n // FObject\n void PLUGIN_API update(FUnknown* changedUnknown, int32 message) override;\n\n //\nprivate:\n bool processUpdate(FUnknown* changedUnknown, int32 message);\n void processParameterUpdates();\n void updateParameter(Vst::Parameter* parameterToUpdate);\n\nprotected:\n // EditorController\n void uiSendValue(EditId id, const EditValue& v) override;\n void uiBeginSend(EditId id) override;\n void uiEndSend(EditId id) override;\n void uiSendMIDI(const uint8_t* data, uint32_t len) override;\n void uiSendMessage(const char* path, const char* sig, const sfizz_arg_t* args) override;\n\nprivate:\n void loadSfzFile(const std::string& filePath);\n void loadScalaFile(const std::string& filePath);\n\n Vst::ParamID parameterOfEditId(EditId id);\n\n std::unique_ptr<Editor> editor_;\n\n#if !defined(__APPLE__) && !defined(_WIN32)\n SharedPointer<RunLoop> _runLoop;\n#endif\n\n // messaging\n std::unique_ptr<uint8[]> oscTemp_;\n\n // subscribed updates\n std::vector<IPtr<FObject>> updates_;\n\n // thread safety\n std::unique_ptr<Vst::ThreadChecker> threadChecker_;\n\n // parameters to process, whose values have received changes\n // Note(jpc) it's because hosts send us parameter updates in the wrong thread..\n std::set<Vst::ParamID> parametersToUpdate_;\n std::mutex parametersToUpdateMutex_;\n};\n"}
80,950
c
/* * File Tree Walking EntropySource * (C) 1999-2008 <NAME> * * Distributed under the terms of the Botan license */ #ifndef BOTAN_ENTROPY_SRC_FTW_H__ #define BOTAN_ENTROPY_SRC_FTW_H__ #include <botan/entropy_src.h> namespace Botan { /** * File Tree Walking Entropy Source */ class FTW_EntropySource : public EntropySource { public: std::string name() const { return "Proc Walker"; } void poll(Entropy_Accumulator& accum); FTW_EntropySource(const std::string& root_dir); ~FTW_EntropySource(); private: std::string path; class File_Descriptor_Source* dir; }; } #endif
22.62
26
(translation_unit) "/*\n* File Tree Walking EntropySource\n* (C) 1999-2008 <NAME>\n*\n* Distributed under the terms of the Botan license\n*/\n\n#ifndef BOTAN_ENTROPY_SRC_FTW_H__\n#define BOTAN_ENTROPY_SRC_FTW_H__\n\n#include <botan/entropy_src.h>\n\nnamespace Botan {\n\n/**\n* File Tree Walking Entropy Source\n*/\nclass FTW_EntropySource : public EntropySource\n {\n public:\n std::string name() const { return "Proc Walker"; }\n\n void poll(Entropy_Accumulator& accum);\n\n FTW_EntropySource(const std::string& root_dir);\n ~FTW_EntropySource();\n private:\n std::string path;\n class File_Descriptor_Source* dir;\n };\n\n}\n\n#endif\n" (comment) "/*\n* File Tree Walking EntropySource\n* (C) 1999-2008 <NAME>\n*\n* Distributed under the terms of the Botan license\n*/" (preproc_ifdef) "#ifndef BOTAN_ENTROPY_SRC_FTW_H__\n#define BOTAN_ENTROPY_SRC_FTW_H__\n\n#include <botan/entropy_src.h>\n\nnamespace Botan {\n\n/**\n* File Tree Walking Entropy Source\n*/\nclass FTW_EntropySource : public EntropySource\n {\n public:\n std::string name() const { return "Proc Walker"; }\n\n void poll(Entropy_Accumulator& accum);\n\n FTW_EntropySource(const std::string& root_dir);\n ~FTW_EntropySource();\n private:\n std::string path;\n class File_Descriptor_Source* dir;\n };\n\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "BOTAN_ENTROPY_SRC_FTW_H__" (preproc_def) "#define BOTAN_ENTROPY_SRC_FTW_H__\n" (#define) "#define" (identifier) "BOTAN_ENTROPY_SRC_FTW_H__" (preproc_include) "#include <botan/entropy_src.h>\n" (#include) "#include" (system_lib_string) "<botan/entropy_src.h>" (function_definition) "namespace Botan {\n\n/**\n* File Tree Walking Entropy Source\n*/\nclass FTW_EntropySource : public EntropySource\n {\n public:\n std::string name() const { return "Proc Walker"; }\n\n void poll(Entropy_Accumulator& accum);\n\n FTW_EntropySource(const std::string& root_dir);\n ~FTW_EntropySource();\n private:\n std::string path;\n class File_Descriptor_Source* dir;\n };\n\n}" (type_identifier) "namespace" (identifier) "Botan" (compound_statement) "{\n\n/**\n* File Tree Walking Entropy Source\n*/\nclass FTW_EntropySource : public EntropySource\n {\n public:\n std::string name() const { return "Proc Walker"; }\n\n void poll(Entropy_Accumulator& accum);\n\n FTW_EntropySource(const std::string& root_dir);\n ~FTW_EntropySource();\n private:\n std::string path;\n class File_Descriptor_Source* dir;\n };\n\n}" ({) "{" (comment) "/**\n* File Tree Walking Entropy Source\n*/" (function_definition) "class FTW_EntropySource : public EntropySource\n {\n public:\n std::string name() const { return "Proc Walker"; }\n\n void poll(Entropy_Accumulator& accum);\n\n FTW_EntropySource(const std::string& root_dir);\n ~FTW_EntropySource();\n private:\n std::string path;\n class File_Descriptor_Source* dir;\n }" (type_identifier) "class" (identifier) "FTW_EntropySource" (ERROR) ": public EntropySource" (:) ":" (identifier) "public" (identifier) "EntropySource" (compound_statement) "{\n public:\n std::string name() const { return "Proc Walker"; }\n\n void poll(Entropy_Accumulator& accum);\n\n FTW_EntropySource(const std::string& root_dir);\n ~FTW_EntropySource();\n private:\n std::string path;\n class File_Descriptor_Source* dir;\n }" ({) "{" (labeled_statement) "public:\n std::string name() const { return "Proc Walker"; }" (statement_identifier) "public" (:) ":" (labeled_statement) "std::string name() const { return "Proc Walker"; }" (statement_identifier) "std" (:) ":" (ERROR) ":string name() const" (:) ":" (type_identifier) "string" (function_declarator) "name() const" (identifier) "name" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return "Proc Walker"; }" ({) "{" (return_statement) "return "Proc Walker";" (return) "return" (string_literal) ""Proc Walker"" (") """ (string_content) "Proc Walker" (") """ (;) ";" (}) "}" (declaration) "void poll(Entropy_Accumulator& accum);" (primitive_type) "void" (function_declarator) "poll(Entropy_Accumulator& accum)" (identifier) "poll" (parameter_list) "(Entropy_Accumulator& accum)" (() "(" (parameter_declaration) "Entropy_Accumulator& accum" (type_identifier) "Entropy_Accumulator" (ERROR) "&" (&) "&" (identifier) "accum" ()) ")" (;) ";" (labeled_statement) "FTW_EntropySource(const std::string& root_dir);" (statement_identifier) "FTW_EntropySource" (ERROR) "(const std:" (() "(" (type_descriptor) "const std" (type_qualifier) "const" (const) "const" (type_identifier) "std" (:) ":" (:) ":" (expression_statement) "string& root_dir);" (binary_expression) "string& root_dir" (identifier) "string" (&) "&" (identifier) "root_dir" (ERROR) ")" ()) ")" (;) ";" (expression_statement) "~FTW_EntropySource();" (unary_expression) "~FTW_EntropySource()" (~) "~" (call_expression) "FTW_EntropySource()" (identifier) "FTW_EntropySource" (argument_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n std::string path;" (statement_identifier) "private" (:) ":" (labeled_statement) "std::string path;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string path;" (type_identifier) "string" (identifier) "path" (;) ";" (declaration) "class File_Descriptor_Source" (type_identifier) "class" (identifier) "File_Descriptor_Source" (;) "" (expression_statement) "* dir;" (pointer_expression) "* dir" (*) "*" (identifier) "dir" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (#endif) "#endif"
117
6
{"language": "c", "success": true, "metadata": {"lines": 26, "avg_line_length": 22.62, "nodes": 59, "errors": 0, "source_hash": "d9a585cfca3931cfc5e26149cf28eeb5dca648de74408eba88ae28667b8961b3", "categorized_nodes": 42}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef BOTAN_ENTROPY_SRC_FTW_H__\n#define BOTAN_ENTROPY_SRC_FTW_H__\n\n#include <botan/entropy_src.h>\n\nnamespace Botan {\n\n/**\n* File Tree Walking Entropy Source\n*/\nclass FTW_EntropySource : public EntropySource\n {\n public:\n std::string name() const { return \"Proc Walker\"; }\n\n void poll(Entropy_Accumulator& accum);\n\n FTW_EntropySource(const std::string& root_dir);\n ~FTW_EntropySource();\n private:\n std::string path;\n class File_Descriptor_Source* dir;\n };\n\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 58], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 33, "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": "BOTAN_ENTROPY_SRC_FTW_H__", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 33}}, {"id": 3, "type": "preproc_def", "text": "#define BOTAN_ENTROPY_SRC_FTW_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": "BOTAN_ENTROPY_SRC_FTW_H__", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 6, "type": "preproc_include", "text": "#include <botan/entropy_src.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": "<botan/entropy_src.h>", "parent": 6, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 30}}, {"id": 9, "type": "function_definition", "text": "namespace Botan {\n\n/**\n* File Tree Walking Entropy Source\n*/\nclass FTW_EntropySource : public EntropySource\n {\n public:\n std::string name() const { return \"Proc Walker\"; }\n\n void poll(Entropy_Accumulator& accum);\n\n FTW_EntropySource(const std::string& root_dir);\n ~FTW_EntropySource();\n private:\n std::string path;\n class File_Descriptor_Source* dir;\n };\n\n}", "parent": 0, "children": [10, 11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 9}}, {"id": 11, "type": "identifier", "text": "Botan", "parent": 9, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 15}}, {"id": 12, "type": "function_definition", "text": "class FTW_EntropySource : public EntropySource\n {\n public:\n std::string name() const { return \"Proc Walker\"; }\n\n void poll(Entropy_Accumulator& accum);\n\n FTW_EntropySource(const std::string& root_dir);\n ~FTW_EntropySource();\n private:\n std::string path;\n class File_Descriptor_Source* dir;\n }", "parent": 9, "children": [13, 14], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 29, "column": 4}}, {"id": 13, "type": "identifier", "text": "FTW_EntropySource", "parent": 12, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 23}}, {"id": 14, "type": "ERROR", "text": ": public EntropySource", "parent": 12, "children": [15], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 46}}, {"id": 15, "type": "identifier", "text": "EntropySource", "parent": 14, "children": [], "start_point": {"row": 17, "column": 33}, "end_point": {"row": 17, "column": 46}}, {"id": 16, "type": "labeled_statement", "text": "public:\n std::string name() const { return \"Proc Walker\"; }", "parent": 12, "children": [17], "start_point": {"row": 19, "column": 3}, "end_point": {"row": 20, "column": 56}}, {"id": 17, "type": "labeled_statement", "text": "std::string name() const { return \"Proc Walker\"; }", "parent": 16, "children": [18, 19], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 56}}, {"id": 18, "type": "statement_identifier", "text": "std", "parent": 17, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 9}}, {"id": 19, "type": "ERROR", "text": ":string name() const", "parent": 17, "children": [20, 21], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 30}}, {"id": 20, "type": "type_identifier", "text": "string", "parent": 19, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 17}}, {"id": 21, "type": "function_declarator", "text": "name() const", "parent": 19, "children": [22, 23], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 30}}, {"id": 22, "type": "identifier", "text": "name", "parent": 21, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 22}}, {"id": 23, "type": "parameter_list", "text": "()", "parent": 21, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 24}}, {"id": 24, "type": "return_statement", "text": "return \"Proc Walker\";", "parent": 17, "children": [25], "start_point": {"row": 20, "column": 33}, "end_point": {"row": 20, "column": 54}}, {"id": 25, "type": "string_literal", "text": "\"Proc Walker\"", "parent": 24, "children": [], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 20, "column": 53}}, {"id": 26, "type": "declaration", "text": "void poll(Entropy_Accumulator& accum);", "parent": 12, "children": [27, 28], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 44}}, {"id": 27, "type": "primitive_type", "text": "void", "parent": 26, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 10}}, {"id": 28, "type": "function_declarator", "text": "poll(Entropy_Accumulator& accum)", "parent": 26, "children": [29, 30], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 43}}, {"id": 29, "type": "identifier", "text": "poll", "parent": 28, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 15}}, {"id": 30, "type": "parameter_list", "text": "(Entropy_Accumulator& accum)", "parent": 28, "children": [31], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 43}}, {"id": 31, "type": "parameter_declaration", "text": "Entropy_Accumulator& accum", "parent": 30, "children": [32, 33], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 42}}, {"id": 32, "type": "type_identifier", "text": "Entropy_Accumulator", "parent": 31, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 35}}, {"id": 33, "type": "identifier", "text": "accum", "parent": 31, "children": [], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 42}}, {"id": 34, "type": "labeled_statement", "text": "FTW_EntropySource(const std::string& root_dir);", "parent": 12, "children": [35, 36], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 53}}, {"id": 35, "type": "statement_identifier", "text": "FTW_EntropySource", "parent": 34, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 23}}, {"id": 36, "type": "ERROR", "text": "(const std:", "parent": 34, "children": [37], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 34}}, {"id": 37, "type": "type_descriptor", "text": "const std", "parent": 36, "children": [38], "start_point": {"row": 24, "column": 24}, "end_point": {"row": 24, "column": 33}}, {"id": 38, "type": "type_identifier", "text": "std", "parent": 37, "children": [], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 33}}, {"id": 39, "type": "binary_expression", "text": "string& root_dir", "parent": 34, "children": [40, 41], "start_point": {"row": 24, "column": 35}, "end_point": {"row": 24, "column": 51}}, {"id": 40, "type": "identifier", "text": "string", "parent": 39, "children": [], "start_point": {"row": 24, "column": 35}, "end_point": {"row": 24, "column": 41}}, {"id": 41, "type": "identifier", "text": "root_dir", "parent": 39, "children": [], "start_point": {"row": 24, "column": 43}, "end_point": {"row": 24, "column": 51}}, {"id": 42, "type": "unary_expression", "text": "~FTW_EntropySource()", "parent": 12, "children": [43, 44], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 26}}, {"id": 43, "type": "~", "text": "~", "parent": 42, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 7}}, {"id": 44, "type": "call_expression", "text": "FTW_EntropySource()", "parent": 42, "children": [45, 46], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 26}}, {"id": 45, "type": "identifier", "text": "FTW_EntropySource", "parent": 44, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 24}}, {"id": 46, "type": "argument_list", "text": "()", "parent": 44, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 26}}, {"id": 47, "type": "labeled_statement", "text": "private:\n std::string path;", "parent": 12, "children": [48], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 27, "column": 23}}, {"id": 48, "type": "labeled_statement", "text": "std::string path;", "parent": 47, "children": [49, 50], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 23}}, {"id": 49, "type": "statement_identifier", "text": "std", "parent": 48, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 9}}, {"id": 50, "type": "declaration", "text": "string path;", "parent": 48, "children": [51, 52], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 23}}, {"id": 51, "type": "type_identifier", "text": "string", "parent": 50, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 17}}, {"id": 52, "type": "identifier", "text": "path", "parent": 50, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 22}}, {"id": 53, "type": "declaration", "text": "class File_Descriptor_Source", "parent": 12, "children": [54], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 34}}, {"id": 54, "type": "identifier", "text": "File_Descriptor_Source", "parent": 53, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 34}}, {"id": 55, "type": "pointer_expression", "text": "* dir", "parent": 12, "children": [56, 57], "start_point": {"row": 28, "column": 34}, "end_point": {"row": 28, "column": 39}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 28, "column": 34}, "end_point": {"row": 28, "column": 35}}, {"id": 57, "type": "identifier", "text": "dir", "parent": 55, "children": [], "start_point": {"row": 28, "column": 36}, "end_point": {"row": 28, "column": 39}}, {"id": 58, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 12, 21, 28], "variables": [26, 31, 50, 53], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [39, 42, 44, 55], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 11, 13, 15, 18, 20, 22, 29, 32, 33, 35, 38, 40, 41, 45, 49, 51, 52, 54, 57, 58], "returns": [24], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 25], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "FTW_EntropySource", "text_snippet": "namespace Botan {\n\n/**\n* File Tree Walking Entropy Source\n*/\nclass FTW_EntropySource : public Entrop"}, {"node_id": 12, "universal_type": "function", "name": "FTW_EntropySource", "text_snippet": "class FTW_EntropySource : public EntropySource\n {\n public:\n std::string name() const { retu"}, {"node_id": 21, "universal_type": "function", "name": "unknown", "text_snippet": "name() const"}, {"node_id": 28, "universal_type": "function", "name": "unknown", "text_snippet": "poll(Entropy_Accumulator& accum)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <botan/entropy_src.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n* File Tree Walking EntropySource\n* (C) 1999-2008 <NAME>\n*\n* Distributed under the terms of the Botan license\n*/\n\n#ifndef BOTAN_ENTROPY_SRC_FTW_H__\n#define BOTAN_ENTROPY_SRC_FTW_H__\n\n#include <botan/entropy_src.h>\n\nnamespace Botan {\n\n/**\n* File Tree Walking Entropy Source\n*/\nclass FTW_EntropySource : public EntropySource\n {\n public:\n std::string name() const { return \"Proc Walker\"; }\n\n void poll(Entropy_Accumulator& accum);\n\n FTW_EntropySource(const std::string& root_dir);\n ~FTW_EntropySource();\n private:\n std::string path;\n class File_Descriptor_Source* dir;\n };\n\n}\n\n#endif\n"}
80,951
c
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #pragma once #include <string> #include <iostream> enum class DeviceStatus { // The device is in an inactive or passively listening (keyword-only) mode Idle, // The device is currently working to become ready to accept input Initializing, // The device is now ready to accept input Ready, // The device is in the process of detecting a keyword Detecting, // The device is actively capturing and transmitting all captured audio Listening, // The device has finished active capture and is now waiting for an action Thinking, // The device is speaking Speaking }; namespace DeviceStatusNames { const std::string name_map[]{ "Idle", "Initializing", "Ready", "Detecting", "Listening", "Thinking", "Speaking" }; static const std::string to_string(DeviceStatus status) { return name_map[(int)status]; } } // Individual devices will have differing capabilities and interfaces for sharing // interaction state in a headless environment. This one implementation under a // general abstraction. class DeviceStatusIndicators { public: static void SetStatus(const DeviceStatus status); };
28.81
43
(translation_unit) "// Copyright (c) Microsoft Corporation. \n// Licensed under the MIT License. \n \n#pragma once \n#include <string> \n#include <iostream> \n \nenum class DeviceStatus \n{ \n // The device is in an inactive or passively listening (keyword-only) mode \n Idle, \n // The device is currently working to become ready to accept input \n Initializing, \n // The device is now ready to accept input \n Ready, \n // The device is in the process of detecting a keyword \n Detecting, \n // The device is actively capturing and transmitting all captured audio \n Listening, \n // The device has finished active capture and is now waiting for an action \n Thinking, \n // The device is speaking \n Speaking \n}; \n \nnamespace DeviceStatusNames \n{ \n const std::string name_map[]{ "Idle", "Initializing", "Ready", "Detecting", "Listening", "Thinking", "Speaking" }; \n \n static const std::string to_string(DeviceStatus status) \n { \n return name_map[(int)status]; \n } \n} \n \n// Individual devices will have differing capabilities and interfaces for sharing \n// interaction state in a headless environment. This one implementation under a \n// general abstraction. \nclass DeviceStatusIndicators \n{ \npublic: \n static void SetStatus(const DeviceStatus status); \n};" (comment) "// Copyright (c) Microsoft Corporation. " (comment) "// Licensed under the MIT License. " (preproc_call) "#pragma once \n" (preproc_directive) "#pragma" (preproc_arg) "once " (preproc_include) "#include <string> \n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include <iostream> \n" (#include) "#include" (system_lib_string) "<iostream>" (ERROR) "enum class DeviceStatus \n{ \n // The device is in an inactive or passively listening (keyword-only) mode \n Idle, \n // The device is currently working to become ready to accept input \n Initializing, \n // The device is now ready to accept input \n Ready, \n // The device is in the process of detecting a keyword \n Detecting, \n // The device is actively capturing and transmitting all captured audio \n Listening, \n // The device has finished active capture and is now waiting for an action \n Thinking, \n // The device is speaking \n Speaking \n}; \n \nnamespace DeviceStatusNames \n{ \n const std::string name_map[]{ "Idle", "Initializing", "Ready", "Detecting", "Listening", "Thinking", "Speaking" }; \n \n static const std::string to_string(DeviceStatus status) \n { \n return name_map[(int)status]; \n } \n} \n \n// Individual devices will have differing capabilities and interfaces for sharing \n// interaction state in a headless environment. This one implementation under a \n// general abstraction. \nclass DeviceStatusIndicators \n{ \npublic: \n static void SetStatus(const DeviceStatus status); \n};" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (identifier) "DeviceStatus" ({) "{" (comment) "// The device is in an inactive or passively listening (keyword-only) mode " (expression_statement) "Idle, \n // The device is currently working to become ready to accept input \n Initializing, \n // The device is now ready to accept input \n Ready, \n // The device is in the process of detecting a keyword \n Detecting, \n // The device is actively capturing and transmitting all captured audio \n Listening, \n // The device has finished active capture and is now waiting for an action \n Thinking, \n // The device is speaking \n Speaking \n};" (comma_expression) "Idle, \n // The device is currently working to become ready to accept input \n Initializing, \n // The device is now ready to accept input \n Ready, \n // The device is in the process of detecting a keyword \n Detecting, \n // The device is actively capturing and transmitting all captured audio \n Listening, \n // The device has finished active capture and is now waiting for an action \n Thinking, \n // The device is speaking \n Speaking" (identifier) "Idle" (,) "," (comment) "// The device is currently working to become ready to accept input " (comma_expression) "Initializing, \n // The device is now ready to accept input \n Ready, \n // The device is in the process of detecting a keyword \n Detecting, \n // The device is actively capturing and transmitting all captured audio \n Listening, \n // The device has finished active capture and is now waiting for an action \n Thinking, \n // The device is speaking \n Speaking" (identifier) "Initializing" (,) "," (comment) "// The device is now ready to accept input " (comma_expression) "Ready, \n // The device is in the process of detecting a keyword \n Detecting, \n // The device is actively capturing and transmitting all captured audio \n Listening, \n // The device has finished active capture and is now waiting for an action \n Thinking, \n // The device is speaking \n Speaking" (identifier) "Ready" (,) "," (comment) "// The device is in the process of detecting a keyword " (comma_expression) "Detecting, \n // The device is actively capturing and transmitting all captured audio \n Listening, \n // The device has finished active capture and is now waiting for an action \n Thinking, \n // The device is speaking \n Speaking" (identifier) "Detecting" (,) "," (comment) "// The device is actively capturing and transmitting all captured audio " (comma_expression) "Listening, \n // The device has finished active capture and is now waiting for an action \n Thinking, \n // The device is speaking \n Speaking" (identifier) "Listening" (,) "," (comment) "// The device has finished active capture and is now waiting for an action " (comma_expression) "Thinking, \n // The device is speaking \n Speaking" (identifier) "Thinking" (,) "," (comment) "// The device is speaking " (identifier) "Speaking" (ERROR) "}" (}) "}" (;) ";" (type_identifier) "namespace" (identifier) "DeviceStatusNames" ({) "{" (function_definition) "const std::string name_map[]{ "Idle", "Initializing", "Ready", "Detecting", "Listening", "Thinking", "Speaking" }; \n \n static const std::string to_string(DeviceStatus status) \n { \n return name_map[(int)status]; \n } \n}" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (array_declarator) "name_map[]" (identifier) "name_map" ([) "[" (]) "]" (compound_statement) "{ "Idle", "Initializing", "Ready", "Detecting", "Listening", "Thinking", "Speaking" }; \n \n static const std::string to_string(DeviceStatus status) \n { \n return name_map[(int)status]; \n } \n}" ({) "{" (expression_statement) ""Idle", "Initializing", "Ready", "Detecting", "Listening", "Thinking", "Speaking" };" (comma_expression) ""Idle", "Initializing", "Ready", "Detecting", "Listening", "Thinking", "Speaking"" (string_literal) ""Idle"" (") """ (string_content) "Idle" (") """ (,) "," (comma_expression) ""Initializing", "Ready", "Detecting", "Listening", "Thinking", "Speaking"" (string_literal) ""Initializing"" (") """ (string_content) "Initializing" (") """ (,) "," (comma_expression) ""Ready", "Detecting", "Listening", "Thinking", "Speaking"" (string_literal) ""Ready"" (") """ (string_content) "Ready" (") """ (,) "," (comma_expression) ""Detecting", "Listening", "Thinking", "Speaking"" (string_literal) ""Detecting"" (") """ (string_content) "Detecting" (") """ (,) "," (comma_expression) ""Listening", "Thinking", "Speaking"" (string_literal) ""Listening"" (") """ (string_content) "Listening" (") """ (,) "," (comma_expression) ""Thinking", "Speaking"" (string_literal) ""Thinking"" (") """ (string_content) "Thinking" (") """ (,) "," (string_literal) ""Speaking"" (") """ (string_content) "Speaking" (") """ (ERROR) "}" (}) "}" (;) ";" (function_definition) "static const std::string to_string(DeviceStatus status) \n { \n return name_map[(int)status]; \n }" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (function_declarator) "to_string(DeviceStatus status)" (identifier) "to_string" (parameter_list) "(DeviceStatus status)" (() "(" (parameter_declaration) "DeviceStatus status" (type_identifier) "DeviceStatus" (identifier) "status" ()) ")" (compound_statement) "{ \n return name_map[(int)status]; \n }" ({) "{" (return_statement) "return name_map[(int)status];" (return) "return" (subscript_expression) "name_map[(int)status]" (identifier) "name_map" ([) "[" (cast_expression) "(int)status" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (identifier) "status" (]) "]" (;) ";" (}) "}" (}) "}" (comment) "// Individual devices will have differing capabilities and interfaces for sharing " (comment) "// interaction state in a headless environment. This one implementation under a " (comment) "// general abstraction. " (function_definition) "class DeviceStatusIndicators \n{ \npublic: \n static void SetStatus(const DeviceStatus status); \n}" (type_identifier) "class" (identifier) "DeviceStatusIndicators" (compound_statement) "{ \npublic: \n static void SetStatus(const DeviceStatus status); \n}" ({) "{" (labeled_statement) "public: \n static void SetStatus(const DeviceStatus status);" (statement_identifier) "public" (:) ":" (declaration) "static void SetStatus(const DeviceStatus status);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "SetStatus(const DeviceStatus status)" (identifier) "SetStatus" (parameter_list) "(const DeviceStatus status)" (() "(" (parameter_declaration) "const DeviceStatus status" (type_qualifier) "const" (const) "const" (type_identifier) "DeviceStatus" (identifier) "status" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
173
5
{"language": "c", "success": true, "metadata": {"lines": 43, "avg_line_length": 28.81, "nodes": 75, "errors": 0, "source_hash": "fcd86a10c249647d90b77732231f10c81316e63082f31dda051f3018a367756c", "categorized_nodes": 63}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\r\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\r", "parent": 0, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 13}}, {"id": 3, "type": "preproc_include", "text": "#include <string>\r\n", "parent": null, "children": [4, 5], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<string>", "parent": 3, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 17}}, {"id": 6, "type": "preproc_include", "text": "#include <iostream>\r\n", "parent": null, "children": [7, 8], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<iostream>", "parent": 6, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 19}}, {"id": 9, "type": "ERROR", "text": "enum class DeviceStatus\r\n{\r\n // The device is in an inactive or passively listening (keyword-only) mode\r\n Idle,\r\n // The device is currently working to become ready to accept input\r\n Initializing,\r\n // The device is now ready to accept input\r\n Ready,\r\n // The device is in the process of detecting a keyword\r\n Detecting,\r\n // The device is actively capturing and transmitting all captured audio\r\n Listening,\r\n // The device has finished active capture and is now waiting for an action\r\n Thinking,\r\n // The device is speaking\r\n Speaking\r\n};\r\n\r\nnamespace DeviceStatusNames\r\n{\r\n const std::string name_map[]{ \"Idle\", \"Initializing\", \"Ready\", \"Detecting\", \"Listening\", \"Thinking\", \"Speaking\" };\r\n\r\n static const std::string to_string(DeviceStatus status)\r\n {\r\n return name_map[(int)status];\r\n }\r\n}\r\n\r\n// Individual devices will have differing capabilities and interfaces for sharing\r\n// interaction state in a headless environment. This one implementation under a\r\n// general abstraction.\r\nclass DeviceStatusIndicators\r\n{\r\npublic:\r\n static void SetStatus(const DeviceStatus status);\r\n};", "parent": null, "children": [10, 12, 26, 27, 28, 64], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 42, "column": 2}}, {"id": 10, "type": "enum_specifier", "text": "enum class", "parent": 9, "children": [11], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 10}}, {"id": 11, "type": "enum", "text": "enum", "parent": 10, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 4}}, {"id": 12, "type": "identifier", "text": "DeviceStatus", "parent": 9, "children": [], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 23}}, {"id": 13, "type": "comma_expression", "text": "Idle,\r\n // The device is currently working to become ready to accept input\r\n Initializing,\r\n // The device is now ready to accept input\r\n Ready,\r\n // The device is in the process of detecting a keyword\r\n Detecting,\r\n // The device is actively capturing and transmitting all captured audio\r\n Listening,\r\n // The device has finished active capture and is now waiting for an action\r\n Thinking,\r\n // The device is speaking\r\n Speaking", "parent": 9, "children": [14, 15], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 22, "column": 12}}, {"id": 14, "type": "identifier", "text": "Idle", "parent": 13, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 8}}, {"id": 15, "type": "comma_expression", "text": "Initializing,\r\n // The device is now ready to accept input\r\n Ready,\r\n // The device is in the process of detecting a keyword\r\n Detecting,\r\n // The device is actively capturing and transmitting all captured audio\r\n Listening,\r\n // The device has finished active capture and is now waiting for an action\r\n Thinking,\r\n // The device is speaking\r\n Speaking", "parent": 13, "children": [16, 17], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 22, "column": 12}}, {"id": 16, "type": "identifier", "text": "Initializing", "parent": 15, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 16}}, {"id": 17, "type": "comma_expression", "text": "Ready,\r\n // The device is in the process of detecting a keyword\r\n Detecting,\r\n // The device is actively capturing and transmitting all captured audio\r\n Listening,\r\n // The device has finished active capture and is now waiting for an action\r\n Thinking,\r\n // The device is speaking\r\n Speaking", "parent": 15, "children": [18, 19], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 22, "column": 12}}, {"id": 18, "type": "identifier", "text": "Ready", "parent": 17, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 9}}, {"id": 19, "type": "comma_expression", "text": "Detecting,\r\n // The device is actively capturing and transmitting all captured audio\r\n Listening,\r\n // The device has finished active capture and is now waiting for an action\r\n Thinking,\r\n // The device is speaking\r\n Speaking", "parent": 17, "children": [20, 21], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 22, "column": 12}}, {"id": 20, "type": "identifier", "text": "Detecting", "parent": 19, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 13}}, {"id": 21, "type": "comma_expression", "text": "Listening,\r\n // The device has finished active capture and is now waiting for an action\r\n Thinking,\r\n // The device is speaking\r\n Speaking", "parent": 19, "children": [22, 23], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 22, "column": 12}}, {"id": 22, "type": "identifier", "text": "Listening", "parent": 21, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 13}}, {"id": 23, "type": "comma_expression", "text": "Thinking,\r\n // The device is speaking\r\n Speaking", "parent": 21, "children": [24, 25], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 22, "column": 12}}, {"id": 24, "type": "identifier", "text": "Thinking", "parent": 23, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 12}}, {"id": 25, "type": "identifier", "text": "Speaking", "parent": 23, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 12}}, {"id": 26, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 9}}, {"id": 27, "type": "identifier", "text": "DeviceStatusNames", "parent": 9, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 27}}, {"id": 28, "type": "function_definition", "text": "const std::string name_map[]{ \"Idle\", \"Initializing\", \"Ready\", \"Detecting\", \"Listening\", \"Thinking\", \"Speaking\" };\r\n\r\n static const std::string to_string(DeviceStatus status)\r\n {\r\n return name_map[(int)status];\r\n }\r\n}", "parent": 9, "children": [29, 30, 32], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 33, "column": 1}}, {"id": 29, "type": "type_identifier", "text": "std", "parent": 28, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 13}}, {"id": 30, "type": "ERROR", "text": "::string", "parent": 28, "children": [31], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 21}}, {"id": 31, "type": "identifier", "text": "string", "parent": 30, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 21}}, {"id": 32, "type": "array_declarator", "text": "name_map[]", "parent": 28, "children": [33], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 32}}, {"id": 33, "type": "identifier", "text": "name_map", "parent": 32, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 30}}, {"id": 34, "type": "comma_expression", "text": "\"Idle\", \"Initializing\", \"Ready\", \"Detecting\", \"Listening\", \"Thinking\", \"Speaking\"", "parent": 28, "children": [35, 36], "start_point": {"row": 27, "column": 34}, "end_point": {"row": 27, "column": 115}}, {"id": 35, "type": "string_literal", "text": "\"Idle\"", "parent": 34, "children": [], "start_point": {"row": 27, "column": 34}, "end_point": {"row": 27, "column": 40}}, {"id": 36, "type": "comma_expression", "text": "\"Initializing\", \"Ready\", \"Detecting\", \"Listening\", \"Thinking\", \"Speaking\"", "parent": 34, "children": [37, 38], "start_point": {"row": 27, "column": 42}, "end_point": {"row": 27, "column": 115}}, {"id": 37, "type": "string_literal", "text": "\"Initializing\"", "parent": 36, "children": [], "start_point": {"row": 27, "column": 42}, "end_point": {"row": 27, "column": 56}}, {"id": 38, "type": "comma_expression", "text": "\"Ready\", \"Detecting\", \"Listening\", \"Thinking\", \"Speaking\"", "parent": 36, "children": [39, 40], "start_point": {"row": 27, "column": 58}, "end_point": {"row": 27, "column": 115}}, {"id": 39, "type": "string_literal", "text": "\"Ready\"", "parent": 38, "children": [], "start_point": {"row": 27, "column": 58}, "end_point": {"row": 27, "column": 65}}, {"id": 40, "type": "comma_expression", "text": "\"Detecting\", \"Listening\", \"Thinking\", \"Speaking\"", "parent": 38, "children": [41, 42], "start_point": {"row": 27, "column": 67}, "end_point": {"row": 27, "column": 115}}, {"id": 41, "type": "string_literal", "text": "\"Detecting\"", "parent": 40, "children": [], "start_point": {"row": 27, "column": 67}, "end_point": {"row": 27, "column": 78}}, {"id": 42, "type": "comma_expression", "text": "\"Listening\", \"Thinking\", \"Speaking\"", "parent": 40, "children": [43, 44], "start_point": {"row": 27, "column": 80}, "end_point": {"row": 27, "column": 115}}, {"id": 43, "type": "string_literal", "text": "\"Listening\"", "parent": 42, "children": [], "start_point": {"row": 27, "column": 80}, "end_point": {"row": 27, "column": 91}}, {"id": 44, "type": "comma_expression", "text": "\"Thinking\", \"Speaking\"", "parent": 42, "children": [45, 46], "start_point": {"row": 27, "column": 93}, "end_point": {"row": 27, "column": 115}}, {"id": 45, "type": "string_literal", "text": "\"Thinking\"", "parent": 44, "children": [], "start_point": {"row": 27, "column": 93}, "end_point": {"row": 27, "column": 103}}, {"id": 46, "type": "string_literal", "text": "\"Speaking\"", "parent": 44, "children": [], "start_point": {"row": 27, "column": 105}, "end_point": {"row": 27, "column": 115}}, {"id": 47, "type": "function_definition", "text": "static const std::string to_string(DeviceStatus status)\r\n {\r\n return name_map[(int)status];\r\n }", "parent": 28, "children": [48, 49, 51], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 32, "column": 5}}, {"id": 48, "type": "type_identifier", "text": "std", "parent": 47, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 20}}, {"id": 49, "type": "ERROR", "text": "::string", "parent": 47, "children": [50], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 28}}, {"id": 50, "type": "identifier", "text": "string", "parent": 49, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 28}}, {"id": 51, "type": "function_declarator", "text": "to_string(DeviceStatus status)", "parent": 47, "children": [52, 53], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 59}}, {"id": 52, "type": "identifier", "text": "to_string", "parent": 51, "children": [], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 38}}, {"id": 53, "type": "parameter_list", "text": "(DeviceStatus status)", "parent": 51, "children": [54], "start_point": {"row": 29, "column": 38}, "end_point": {"row": 29, "column": 59}}, {"id": 54, "type": "parameter_declaration", "text": "DeviceStatus status", "parent": 53, "children": [55, 56], "start_point": {"row": 29, "column": 39}, "end_point": {"row": 29, "column": 58}}, {"id": 55, "type": "type_identifier", "text": "DeviceStatus", "parent": 54, "children": [], "start_point": {"row": 29, "column": 39}, "end_point": {"row": 29, "column": 51}}, {"id": 56, "type": "identifier", "text": "status", "parent": 54, "children": [], "start_point": {"row": 29, "column": 52}, "end_point": {"row": 29, "column": 58}}, {"id": 57, "type": "return_statement", "text": "return name_map[(int)status];", "parent": 47, "children": [58], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 37}}, {"id": 58, "type": "subscript_expression", "text": "name_map[(int)status]", "parent": 57, "children": [59, 60], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 36}}, {"id": 59, "type": "identifier", "text": "name_map", "parent": 58, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 23}}, {"id": 60, "type": "cast_expression", "text": "(int)status", "parent": 58, "children": [61, 63], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 35}}, {"id": 61, "type": "type_descriptor", "text": "int", "parent": 60, "children": [62], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 28}}, {"id": 62, "type": "primitive_type", "text": "int", "parent": 61, "children": [], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 28}}, {"id": 63, "type": "identifier", "text": "status", "parent": 60, "children": [], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 35}}, {"id": 64, "type": "function_definition", "text": "class DeviceStatusIndicators\r\n{\r\npublic:\r\n static void SetStatus(const DeviceStatus status);\r\n}", "parent": 9, "children": [65], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 42, "column": 1}}, {"id": 65, "type": "identifier", "text": "DeviceStatusIndicators", "parent": 64, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 28}}, {"id": 66, "type": "labeled_statement", "text": "public:\r\n static void SetStatus(const DeviceStatus status);", "parent": 64, "children": [67], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 53}}, {"id": 67, "type": "declaration", "text": "static void SetStatus(const DeviceStatus status);", "parent": 66, "children": [68, 69], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 53}}, {"id": 68, "type": "primitive_type", "text": "void", "parent": 67, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 15}}, {"id": 69, "type": "function_declarator", "text": "SetStatus(const DeviceStatus status)", "parent": 67, "children": [70, 71], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 52}}, {"id": 70, "type": "identifier", "text": "SetStatus", "parent": 69, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 25}}, {"id": 71, "type": "parameter_list", "text": "(const DeviceStatus status)", "parent": 69, "children": [72], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 52}}, {"id": 72, "type": "parameter_declaration", "text": "const DeviceStatus status", "parent": 71, "children": [73, 74], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 51}}, {"id": 73, "type": "type_identifier", "text": "DeviceStatus", "parent": 72, "children": [], "start_point": {"row": 41, "column": 32}, "end_point": {"row": 41, "column": 44}}, {"id": 74, "type": "identifier", "text": "status", "parent": 72, "children": [], "start_point": {"row": 41, "column": 45}, "end_point": {"row": 41, "column": 51}}]}, "node_categories": {"declarations": {"functions": [28, 47, 51, 64, 69], "variables": [54, 67, 72], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": [10, 11]}, "statements": {"expressions": [13, 15, 17, 19, 21, 23, 34, 36, 38, 40, 42, 44, 58, 60], "assignments": [], "loops": [], "conditionals": [12, 14, 16, 18, 20, 22, 24, 25, 26, 27, 29, 31, 33, 48, 50, 52, 55, 56, 59, 63, 65, 70, 73, 74], "returns": [57], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 35, 37, 39, 41, 43, 45, 46], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 28, "universal_type": "function", "name": "unknown", "text_snippet": "const std::string name_map[]{ \"Idle\", \"Initializing\", \"Ready\", \"Detecting\", \"Listening\", \"Thinking\","}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "static const std::string to_string(DeviceStatus status)\r\n {\r\n return name_map[(int)status]"}, {"node_id": 51, "universal_type": "function", "name": "unknown", "text_snippet": "to_string(DeviceStatus status)"}, {"node_id": 64, "universal_type": "function", "name": "DeviceStatusIndicators", "text_snippet": "class DeviceStatusIndicators\r\n{\r\npublic:\r\n static void SetStatus(const DeviceStatus status);\r\n}"}, {"node_id": 69, "universal_type": "function", "name": "unknown", "text_snippet": "SetStatus(const DeviceStatus status)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <string>\r\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <iostream>\r\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "// Copyright (c) Microsoft Corporation.\r\n// Licensed under the MIT License.\r\n\r\n#pragma once\r\n#include <string>\r\n#include <iostream>\r\n\r\nenum class DeviceStatus\r\n{\r\n // The device is in an inactive or passively listening (keyword-only) mode\r\n Idle,\r\n // The device is currently working to become ready to accept input\r\n Initializing,\r\n // The device is now ready to accept input\r\n Ready,\r\n // The device is in the process of detecting a keyword\r\n Detecting,\r\n // The device is actively capturing and transmitting all captured audio\r\n Listening,\r\n // The device has finished active capture and is now waiting for an action\r\n Thinking,\r\n // The device is speaking\r\n Speaking\r\n};\r\n\r\nnamespace DeviceStatusNames\r\n{\r\n const std::string name_map[]{ \"Idle\", \"Initializing\", \"Ready\", \"Detecting\", \"Listening\", \"Thinking\", \"Speaking\" };\r\n\r\n static const std::string to_string(DeviceStatus status)\r\n {\r\n return name_map[(int)status];\r\n }\r\n}\r\n\r\n// Individual devices will have differing capabilities and interfaces for sharing\r\n// interaction state in a headless environment. This one implementation under a\r\n// general abstraction.\r\nclass DeviceStatusIndicators\r\n{\r\npublic:\r\n static void SetStatus(const DeviceStatus status);\r\n};"}
80,952
c
#pragma once #include <FMOD/fmod.hpp> #include <SDL2/SDL.h> #include <SDL2/SDL_ttf.h> #include "../EventHandler/eventHandler.h" #include "../AssetManager.h" #include "../Common/Types/Vector2D.h" #include "../CharactereCreator.h" class ProjectileCreator; class Globalbilboulga { public: static Globalbilboulga *getInstance(void); static void kill(void); void clean(); Manager* getManager() { return manager; } bool getIsRunning(); FMOD_SYSTEM* getAudioSystem(); SDL_Window* getWindow(void); SDL_Renderer* getRenderer(void); EventHandler* getEventHandler(void); AssetManager* getAssetManager(void) { return assetManager; } ProjectileCreator* getProjectileCreator(); CharactereCreator* getCharactereCreator() { return charactereCreator; } int getFPS(); Vector2D getCurrentRoomSize(); SDL_Rect getCamera(); static const int GRAVITY_STRENGTH = 2; void setManager(Manager* newManager) { manager = newManager; } void setIsRunning(bool mIsRunning); void setAudioSystem(FMOD_SYSTEM *mAudioSystem); void setWindow(SDL_Window *mWindow); void setRenderer(SDL_Renderer *mRenderer); void setEventHandler(EventHandler *mEventHandler); void setAssetManager(AssetManager* newAssetManager) { assetManager = newAssetManager; } void setProjectileCreator(ProjectileCreator* newPC); void setCharactereCreator(CharactereCreator* newCC) { charactereCreator = newCC; } void setFPS(int mFPS); // void setGravityStrength(int mgravityStrength); void setCurrentRoomSize(Vector2D mCurrentMapSize); void setCamera(SDL_Rect mCamera); void setCameraX(int mCameraX); void setCameraY(int mCameraY); void setCameraW(int mCameraW); void setCameraH(int mCameraH); private: Globalbilboulga(); ~Globalbilboulga(); static Globalbilboulga* instance; SDL_Window *window; SDL_Renderer *renderer; EventHandler *eventHandler; FMOD_SYSTEM *audioSystem; AssetManager* assetManager; ProjectileCreator* projectileCreator; CharactereCreator* charactereCreator; bool isRunning; int FPS; Vector2D currentRoomSize; SDL_Rect camera; Manager* manager; };
31.62
76
(translation_unit) "#pragma once \n \n#include <FMOD/fmod.hpp> \n#include <SDL2/SDL.h> \n#include <SDL2/SDL_ttf.h> \n \n#include "../EventHandler/eventHandler.h" \n#include "../AssetManager.h" \n#include "../Common/Types/Vector2D.h" \n#include "../CharactereCreator.h" \n \nclass ProjectileCreator; \n \nclass Globalbilboulga \n{ \n public: \n static Globalbilboulga *getInstance(void); \n static void kill(void); \n \n void clean(); \n \n Manager* getManager() { return manager; } \n bool getIsRunning(); \n FMOD_SYSTEM* getAudioSystem(); \n SDL_Window* getWindow(void); \n SDL_Renderer* getRenderer(void); \n EventHandler* getEventHandler(void); \n AssetManager* getAssetManager(void) { return assetManager; } \n ProjectileCreator* getProjectileCreator(); \n CharactereCreator* getCharactereCreator() { return charactereCreator; } \n int getFPS(); \n Vector2D getCurrentRoomSize(); \n SDL_Rect getCamera(); \n static const int GRAVITY_STRENGTH = 2; \n \n void setManager(Manager* newManager) { manager = newManager; } \n void setIsRunning(bool mIsRunning); \n void setAudioSystem(FMOD_SYSTEM *mAudioSystem); \n void setWindow(SDL_Window *mWindow); \n void setRenderer(SDL_Renderer *mRenderer); \n void setEventHandler(EventHandler *mEventHandler); \n void setAssetManager(AssetManager* newAssetManager) { assetManager = newAssetManager; } \n void setProjectileCreator(ProjectileCreator* newPC); \n void setCharactereCreator(CharactereCreator* newCC) { charactereCreator = newCC; } \n void setFPS(int mFPS); \n // void setGravityStrength(int mgravityStrength); \n void setCurrentRoomSize(Vector2D mCurrentMapSize); \n void setCamera(SDL_Rect mCamera); \n void setCameraX(int mCameraX); \n void setCameraY(int mCameraY); \n void setCameraW(int mCameraW); \n void setCameraH(int mCameraH); \n \n private: \n Globalbilboulga(); \n ~Globalbilboulga(); \n \n static Globalbilboulga* instance; \n \n SDL_Window *window; \n SDL_Renderer *renderer; \n EventHandler *eventHandler; \n \n FMOD_SYSTEM *audioSystem; \n \n AssetManager* assetManager; \n ProjectileCreator* projectileCreator; \n CharactereCreator* charactereCreator; \n \n bool isRunning; \n int FPS; \n Vector2D currentRoomSize; \n SDL_Rect camera; \n \n Manager* manager; \n}; \n" (preproc_call) "#pragma once \n" (preproc_directive) "#pragma" (preproc_arg) "once " (preproc_include) "#include <FMOD/fmod.hpp> \n" (#include) "#include" (system_lib_string) "<FMOD/fmod.hpp>" (preproc_include) "#include <SDL2/SDL.h> \n" (#include) "#include" (system_lib_string) "<SDL2/SDL.h>" (preproc_include) "#include <SDL2/SDL_ttf.h> \n" (#include) "#include" (system_lib_string) "<SDL2/SDL_ttf.h>" (preproc_include) "#include "../EventHandler/eventHandler.h" \n" (#include) "#include" (string_literal) ""../EventHandler/eventHandler.h"" (") """ (string_content) "../EventHandler/eventHandler.h" (") """ (preproc_include) "#include "../AssetManager.h" \n" (#include) "#include" (string_literal) ""../AssetManager.h"" (") """ (string_content) "../AssetManager.h" (") """ (preproc_include) "#include "../Common/Types/Vector2D.h" \n" (#include) "#include" (string_literal) ""../Common/Types/Vector2D.h"" (") """ (string_content) "../Common/Types/Vector2D.h" (") """ (preproc_include) "#include "../CharactereCreator.h" \n" (#include) "#include" (string_literal) ""../CharactereCreator.h"" (") """ (string_content) "../CharactereCreator.h" (") """ (declaration) "class ProjectileCreator;" (type_identifier) "class" (identifier) "ProjectileCreator" (;) ";" (function_definition) "class Globalbilboulga \n{ \n public: \n static Globalbilboulga *getInstance(void); \n static void kill(void); \n \n void clean(); \n \n Manager* getManager() { return manager; } \n bool getIsRunning(); \n FMOD_SYSTEM* getAudioSystem(); \n SDL_Window* getWindow(void); \n SDL_Renderer* getRenderer(void); \n EventHandler* getEventHandler(void); \n AssetManager* getAssetManager(void) { return assetManager; } \n ProjectileCreator* getProjectileCreator(); \n CharactereCreator* getCharactereCreator() { return charactereCreator; } \n int getFPS(); \n Vector2D getCurrentRoomSize(); \n SDL_Rect getCamera(); \n static const int GRAVITY_STRENGTH = 2; \n \n void setManager(Manager* newManager) { manager = newManager; } \n void setIsRunning(bool mIsRunning); \n void setAudioSystem(FMOD_SYSTEM *mAudioSystem); \n void setWindow(SDL_Window *mWindow); \n void setRenderer(SDL_Renderer *mRenderer); \n void setEventHandler(EventHandler *mEventHandler); \n void setAssetManager(AssetManager* newAssetManager) { assetManager = newAssetManager; } \n void setProjectileCreator(ProjectileCreator* newPC); \n void setCharactereCreator(CharactereCreator* newCC) { charactereCreator = newCC; } \n void setFPS(int mFPS); \n // void setGravityStrength(int mgravityStrength); \n void setCurrentRoomSize(Vector2D mCurrentMapSize); \n void setCamera(SDL_Rect mCamera); \n void setCameraX(int mCameraX); \n void setCameraY(int mCameraY); \n void setCameraW(int mCameraW); \n void setCameraH(int mCameraH); \n \n private: \n Globalbilboulga(); \n ~Globalbilboulga(); \n \n static Globalbilboulga* instance; \n \n SDL_Window *window; \n SDL_Renderer *renderer; \n EventHandler *eventHandler; \n \n FMOD_SYSTEM *audioSystem; \n \n AssetManager* assetManager; \n ProjectileCreator* projectileCreator; \n CharactereCreator* charactereCreator; \n \n bool isRunning; \n int FPS; \n Vector2D currentRoomSize; \n SDL_Rect camera; \n \n Manager* manager; \n}" (type_identifier) "class" (identifier) "Globalbilboulga" (compound_statement) "{ \n public: \n static Globalbilboulga *getInstance(void); \n static void kill(void); \n \n void clean(); \n \n Manager* getManager() { return manager; } \n bool getIsRunning(); \n FMOD_SYSTEM* getAudioSystem(); \n SDL_Window* getWindow(void); \n SDL_Renderer* getRenderer(void); \n EventHandler* getEventHandler(void); \n AssetManager* getAssetManager(void) { return assetManager; } \n ProjectileCreator* getProjectileCreator(); \n CharactereCreator* getCharactereCreator() { return charactereCreator; } \n int getFPS(); \n Vector2D getCurrentRoomSize(); \n SDL_Rect getCamera(); \n static const int GRAVITY_STRENGTH = 2; \n \n void setManager(Manager* newManager) { manager = newManager; } \n void setIsRunning(bool mIsRunning); \n void setAudioSystem(FMOD_SYSTEM *mAudioSystem); \n void setWindow(SDL_Window *mWindow); \n void setRenderer(SDL_Renderer *mRenderer); \n void setEventHandler(EventHandler *mEventHandler); \n void setAssetManager(AssetManager* newAssetManager) { assetManager = newAssetManager; } \n void setProjectileCreator(ProjectileCreator* newPC); \n void setCharactereCreator(CharactereCreator* newCC) { charactereCreator = newCC; } \n void setFPS(int mFPS); \n // void setGravityStrength(int mgravityStrength); \n void setCurrentRoomSize(Vector2D mCurrentMapSize); \n void setCamera(SDL_Rect mCamera); \n void setCameraX(int mCameraX); \n void setCameraY(int mCameraY); \n void setCameraW(int mCameraW); \n void setCameraH(int mCameraH); \n \n private: \n Globalbilboulga(); \n ~Globalbilboulga(); \n \n static Globalbilboulga* instance; \n \n SDL_Window *window; \n SDL_Renderer *renderer; \n EventHandler *eventHandler; \n \n FMOD_SYSTEM *audioSystem; \n \n AssetManager* assetManager; \n ProjectileCreator* projectileCreator; \n CharactereCreator* charactereCreator; \n \n bool isRunning; \n int FPS; \n Vector2D currentRoomSize; \n SDL_Rect camera; \n \n Manager* manager; \n}" ({) "{" (labeled_statement) "public: \n static Globalbilboulga *getInstance(void);" (statement_identifier) "public" (:) ":" (declaration) "static Globalbilboulga *getInstance(void);" (storage_class_specifier) "static" (static) "static" (type_identifier) "Globalbilboulga" (pointer_declarator) "*getInstance(void)" (*) "*" (function_declarator) "getInstance(void)" (identifier) "getInstance" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "static void kill(void);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "kill(void)" (identifier) "kill" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void clean();" (primitive_type) "void" (function_declarator) "clean()" (identifier) "clean" (parameter_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "Manager* getManager() { return manager; }" (type_identifier) "Manager" (pointer_declarator) "* getManager()" (*) "*" (function_declarator) "getManager()" (identifier) "getManager" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return manager; }" ({) "{" (return_statement) "return manager;" (return) "return" (identifier) "manager" (;) ";" (}) "}" (declaration) "bool getIsRunning();" (primitive_type) "bool" (function_declarator) "getIsRunning()" (identifier) "getIsRunning" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "FMOD_SYSTEM* getAudioSystem();" (type_identifier) "FMOD_SYSTEM" (pointer_declarator) "* getAudioSystem()" (*) "*" (function_declarator) "getAudioSystem()" (identifier) "getAudioSystem" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "SDL_Window* getWindow(void);" (type_identifier) "SDL_Window" (pointer_declarator) "* getWindow(void)" (*) "*" (function_declarator) "getWindow(void)" (identifier) "getWindow" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "SDL_Renderer* getRenderer(void);" (type_identifier) "SDL_Renderer" (pointer_declarator) "* getRenderer(void)" (*) "*" (function_declarator) "getRenderer(void)" (identifier) "getRenderer" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "EventHandler* getEventHandler(void);" (type_identifier) "EventHandler" (pointer_declarator) "* getEventHandler(void)" (*) "*" (function_declarator) "getEventHandler(void)" (identifier) "getEventHandler" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (function_definition) "AssetManager* getAssetManager(void) { return assetManager; }" (type_identifier) "AssetManager" (pointer_declarator) "* getAssetManager(void)" (*) "*" (function_declarator) "getAssetManager(void)" (identifier) "getAssetManager" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{ return assetManager; }" ({) "{" (return_statement) "return assetManager;" (return) "return" (identifier) "assetManager" (;) ";" (}) "}" (declaration) "ProjectileCreator* getProjectileCreator();" (type_identifier) "ProjectileCreator" (pointer_declarator) "* getProjectileCreator()" (*) "*" (function_declarator) "getProjectileCreator()" (identifier) "getProjectileCreator" (parameter_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "CharactereCreator* getCharactereCreator() { return charactereCreator; }" (type_identifier) "CharactereCreator" (pointer_declarator) "* getCharactereCreator()" (*) "*" (function_declarator) "getCharactereCreator()" (identifier) "getCharactereCreator" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return charactereCreator; }" ({) "{" (return_statement) "return charactereCreator;" (return) "return" (identifier) "charactereCreator" (;) ";" (}) "}" (declaration) "int getFPS();" (primitive_type) "int" (function_declarator) "getFPS()" (identifier) "getFPS" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "Vector2D getCurrentRoomSize();" (type_identifier) "Vector2D" (function_declarator) "getCurrentRoomSize()" (identifier) "getCurrentRoomSize" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "SDL_Rect getCamera();" (type_identifier) "SDL_Rect" (function_declarator) "getCamera()" (identifier) "getCamera" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static const int GRAVITY_STRENGTH = 2;" (storage_class_specifier) "static" (static) "static" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "GRAVITY_STRENGTH = 2" (identifier) "GRAVITY_STRENGTH" (=) "=" (number_literal) "2" (;) ";" (function_definition) "void setManager(Manager* newManager) { manager = newManager; }" (primitive_type) "void" (function_declarator) "setManager(Manager* newManager)" (identifier) "setManager" (parameter_list) "(Manager* newManager)" (() "(" (parameter_declaration) "Manager* newManager" (type_identifier) "Manager" (pointer_declarator) "* newManager" (*) "*" (identifier) "newManager" ()) ")" (compound_statement) "{ manager = newManager; }" ({) "{" (expression_statement) "manager = newManager;" (assignment_expression) "manager = newManager" (identifier) "manager" (=) "=" (identifier) "newManager" (;) ";" (}) "}" (declaration) "void setIsRunning(bool mIsRunning);" (primitive_type) "void" (function_declarator) "setIsRunning(bool mIsRunning)" (identifier) "setIsRunning" (parameter_list) "(bool mIsRunning)" (() "(" (parameter_declaration) "bool mIsRunning" (primitive_type) "bool" (identifier) "mIsRunning" ()) ")" (;) ";" (declaration) "void setAudioSystem(FMOD_SYSTEM *mAudioSystem);" (primitive_type) "void" (function_declarator) "setAudioSystem(FMOD_SYSTEM *mAudioSystem)" (identifier) "setAudioSystem" (parameter_list) "(FMOD_SYSTEM *mAudioSystem)" (() "(" (parameter_declaration) "FMOD_SYSTEM *mAudioSystem" (type_identifier) "FMOD_SYSTEM" (pointer_declarator) "*mAudioSystem" (*) "*" (identifier) "mAudioSystem" ()) ")" (;) ";" (declaration) "void setWindow(SDL_Window *mWindow);" (primitive_type) "void" (function_declarator) "setWindow(SDL_Window *mWindow)" (identifier) "setWindow" (parameter_list) "(SDL_Window *mWindow)" (() "(" (parameter_declaration) "SDL_Window *mWindow" (type_identifier) "SDL_Window" (pointer_declarator) "*mWindow" (*) "*" (identifier) "mWindow" ()) ")" (;) ";" (declaration) "void setRenderer(SDL_Renderer *mRenderer);" (primitive_type) "void" (function_declarator) "setRenderer(SDL_Renderer *mRenderer)" (identifier) "setRenderer" (parameter_list) "(SDL_Renderer *mRenderer)" (() "(" (parameter_declaration) "SDL_Renderer *mRenderer" (type_identifier) "SDL_Renderer" (pointer_declarator) "*mRenderer" (*) "*" (identifier) "mRenderer" ()) ")" (;) ";" (declaration) "void setEventHandler(EventHandler *mEventHandler);" (primitive_type) "void" (function_declarator) "setEventHandler(EventHandler *mEventHandler)" (identifier) "setEventHandler" (parameter_list) "(EventHandler *mEventHandler)" (() "(" (parameter_declaration) "EventHandler *mEventHandler" (type_identifier) "EventHandler" (pointer_declarator) "*mEventHandler" (*) "*" (identifier) "mEventHandler" ()) ")" (;) ";" (function_definition) "void setAssetManager(AssetManager* newAssetManager) { assetManager = newAssetManager; }" (primitive_type) "void" (function_declarator) "setAssetManager(AssetManager* newAssetManager)" (identifier) "setAssetManager" (parameter_list) "(AssetManager* newAssetManager)" (() "(" (parameter_declaration) "AssetManager* newAssetManager" (type_identifier) "AssetManager" (pointer_declarator) "* newAssetManager" (*) "*" (identifier) "newAssetManager" ()) ")" (compound_statement) "{ assetManager = newAssetManager; }" ({) "{" (expression_statement) "assetManager = newAssetManager;" (assignment_expression) "assetManager = newAssetManager" (identifier) "assetManager" (=) "=" (identifier) "newAssetManager" (;) ";" (}) "}" (declaration) "void setProjectileCreator(ProjectileCreator* newPC);" (primitive_type) "void" (function_declarator) "setProjectileCreator(ProjectileCreator* newPC)" (identifier) "setProjectileCreator" (parameter_list) "(ProjectileCreator* newPC)" (() "(" (parameter_declaration) "ProjectileCreator* newPC" (type_identifier) "ProjectileCreator" (pointer_declarator) "* newPC" (*) "*" (identifier) "newPC" ()) ")" (;) ";" (function_definition) "void setCharactereCreator(CharactereCreator* newCC) { charactereCreator = newCC; }" (primitive_type) "void" (function_declarator) "setCharactereCreator(CharactereCreator* newCC)" (identifier) "setCharactereCreator" (parameter_list) "(CharactereCreator* newCC)" (() "(" (parameter_declaration) "CharactereCreator* newCC" (type_identifier) "CharactereCreator" (pointer_declarator) "* newCC" (*) "*" (identifier) "newCC" ()) ")" (compound_statement) "{ charactereCreator = newCC; }" ({) "{" (expression_statement) "charactereCreator = newCC;" (assignment_expression) "charactereCreator = newCC" (identifier) "charactereCreator" (=) "=" (identifier) "newCC" (;) ";" (}) "}" (declaration) "void setFPS(int mFPS);" (primitive_type) "void" (function_declarator) "setFPS(int mFPS)" (identifier) "setFPS" (parameter_list) "(int mFPS)" (() "(" (parameter_declaration) "int mFPS" (primitive_type) "int" (identifier) "mFPS" ()) ")" (;) ";" (comment) "// void setGravityStrength(int mgravityStrength); " (declaration) "void setCurrentRoomSize(Vector2D mCurrentMapSize);" (primitive_type) "void" (function_declarator) "setCurrentRoomSize(Vector2D mCurrentMapSize)" (identifier) "setCurrentRoomSize" (parameter_list) "(Vector2D mCurrentMapSize)" (() "(" (parameter_declaration) "Vector2D mCurrentMapSize" (type_identifier) "Vector2D" (identifier) "mCurrentMapSize" ()) ")" (;) ";" (declaration) "void setCamera(SDL_Rect mCamera);" (primitive_type) "void" (function_declarator) "setCamera(SDL_Rect mCamera)" (identifier) "setCamera" (parameter_list) "(SDL_Rect mCamera)" (() "(" (parameter_declaration) "SDL_Rect mCamera" (type_identifier) "SDL_Rect" (identifier) "mCamera" ()) ")" (;) ";" (declaration) "void setCameraX(int mCameraX);" (primitive_type) "void" (function_declarator) "setCameraX(int mCameraX)" (identifier) "setCameraX" (parameter_list) "(int mCameraX)" (() "(" (parameter_declaration) "int mCameraX" (primitive_type) "int" (identifier) "mCameraX" ()) ")" (;) ";" (declaration) "void setCameraY(int mCameraY);" (primitive_type) "void" (function_declarator) "setCameraY(int mCameraY)" (identifier) "setCameraY" (parameter_list) "(int mCameraY)" (() "(" (parameter_declaration) "int mCameraY" (primitive_type) "int" (identifier) "mCameraY" ()) ")" (;) ";" (declaration) "void setCameraW(int mCameraW);" (primitive_type) "void" (function_declarator) "setCameraW(int mCameraW)" (identifier) "setCameraW" (parameter_list) "(int mCameraW)" (() "(" (parameter_declaration) "int mCameraW" (primitive_type) "int" (identifier) "mCameraW" ()) ")" (;) ";" (declaration) "void setCameraH(int mCameraH);" (primitive_type) "void" (function_declarator) "setCameraH(int mCameraH)" (identifier) "setCameraH" (parameter_list) "(int mCameraH)" (() "(" (parameter_declaration) "int mCameraH" (primitive_type) "int" (identifier) "mCameraH" ()) ")" (;) ";" (labeled_statement) "private: \n Globalbilboulga();" (statement_identifier) "private" (:) ":" (expression_statement) "Globalbilboulga();" (call_expression) "Globalbilboulga()" (identifier) "Globalbilboulga" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "~Globalbilboulga();" (unary_expression) "~Globalbilboulga()" (~) "~" (call_expression) "Globalbilboulga()" (identifier) "Globalbilboulga" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static Globalbilboulga* instance;" (storage_class_specifier) "static" (static) "static" (type_identifier) "Globalbilboulga" (pointer_declarator) "* instance" (*) "*" (identifier) "instance" (;) ";" (declaration) "SDL_Window *window;" (type_identifier) "SDL_Window" (pointer_declarator) "*window" (*) "*" (identifier) "window" (;) ";" (declaration) "SDL_Renderer *renderer;" (type_identifier) "SDL_Renderer" (pointer_declarator) "*renderer" (*) "*" (identifier) "renderer" (;) ";" (declaration) "EventHandler *eventHandler;" (type_identifier) "EventHandler" (pointer_declarator) "*eventHandler" (*) "*" (identifier) "eventHandler" (;) ";" (declaration) "FMOD_SYSTEM *audioSystem;" (type_identifier) "FMOD_SYSTEM" (pointer_declarator) "*audioSystem" (*) "*" (identifier) "audioSystem" (;) ";" (declaration) "AssetManager* assetManager;" (type_identifier) "AssetManager" (pointer_declarator) "* assetManager" (*) "*" (identifier) "assetManager" (;) ";" (declaration) "ProjectileCreator* projectileCreator;" (type_identifier) "ProjectileCreator" (pointer_declarator) "* projectileCreator" (*) "*" (identifier) "projectileCreator" (;) ";" (declaration) "CharactereCreator* charactereCreator;" (type_identifier) "CharactereCreator" (pointer_declarator) "* charactereCreator" (*) "*" (identifier) "charactereCreator" (;) ";" (declaration) "bool isRunning;" (primitive_type) "bool" (identifier) "isRunning" (;) ";" (declaration) "int FPS;" (primitive_type) "int" (identifier) "FPS" (;) ";" (declaration) "Vector2D currentRoomSize;" (type_identifier) "Vector2D" (identifier) "currentRoomSize" (;) ";" (declaration) "SDL_Rect camera;" (type_identifier) "SDL_Rect" (identifier) "camera" (;) ";" (declaration) "Manager* manager;" (type_identifier) "Manager" (pointer_declarator) "* manager" (*) "*" (identifier) "manager" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
543
0
{"language": "c", "success": true, "metadata": {"lines": 76, "avg_line_length": 31.62, "nodes": 368, "errors": 0, "source_hash": "30aeb0805a489a6efee37ba8a36a5b5eb981bf50db7154e7f06cdc9207c4826b", "categorized_nodes": 238}, "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 <FMOD/fmod.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": "<FMOD/fmod.hpp>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include <SDL2/SDL.h>\r\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": "<SDL2/SDL.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 21}}, {"id": 9, "type": "preproc_include", "text": "#include <SDL2/SDL_ttf.h>\r\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": "<SDL2/SDL_ttf.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 25}}, {"id": 12, "type": "preproc_include", "text": "#include \"../EventHandler/eventHandler.h\"\r\n", "parent": null, "children": [13, 14], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"../EventHandler/eventHandler.h\"", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 41}}, {"id": 15, "type": "preproc_include", "text": "#include \"../AssetManager.h\"\r\n", "parent": null, "children": [16, 17], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"../AssetManager.h\"", "parent": 15, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 28}}, {"id": 18, "type": "preproc_include", "text": "#include \"../Common/Types/Vector2D.h\"\r\n", "parent": null, "children": [19, 20], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"../Common/Types/Vector2D.h\"", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 37}}, {"id": 21, "type": "preproc_include", "text": "#include \"../CharactereCreator.h\"\r\n", "parent": null, "children": [22, 23], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"../CharactereCreator.h\"", "parent": 21, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 33}}, {"id": 24, "type": "declaration", "text": "class ProjectileCreator;", "parent": null, "children": [25], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 24}}, {"id": 25, "type": "identifier", "text": "ProjectileCreator", "parent": 24, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 23}}, {"id": 26, "type": "function_definition", "text": "class Globalbilboulga\r\n{\r\n public:\r\n static Globalbilboulga *getInstance(void);\r\n static void kill(void);\r\n\r\n void clean();\r\n\r\n Manager* getManager() { return manager; }\r\n bool getIsRunning();\r\n FMOD_SYSTEM* getAudioSystem();\r\n SDL_Window* getWindow(void);\r\n SDL_Renderer* getRenderer(void);\r\n EventHandler* getEventHandler(void);\r\n AssetManager* getAssetManager(void) { return assetManager; }\r\n ProjectileCreator* getProjectileCreator();\r\n CharactereCreator* getCharactereCreator() { return charactereCreator; }\r\n int getFPS();\r\n Vector2D getCurrentRoomSize();\r\n SDL_Rect getCamera();\r\n static const int GRAVITY_STRENGTH = 2;\r\n\r\n void setManager(Manager* newManager) { manager = newManager; }\r\n void setIsRunning(bool mIsRunning);\r\n void setAudioSystem(FMOD_SYSTEM *mAudioSystem);\r\n void setWindow(SDL_Window *mWindow);\r\n void setRenderer(SDL_Renderer *mRenderer);\r\n void setEventHandler(EventHandler *mEventHandler);\r\n void setAssetManager(AssetManager* newAssetManager) { assetManager = newAssetManager; }\r\n void setProjectileCreator(ProjectileCreator* newPC);\r\n void setCharactereCreator(CharactereCreator* newCC) { charactereCreator = newCC; }\r\n void setFPS(int mFPS);\r\n // void setGravityStrength(int mgravityStrength);\r\n void setCurrentRoomSize(Vector2D mCurrentMapSize);\r\n void setCamera(SDL_Rect mCamera);\r\n void setCameraX(int mCameraX);\r\n void setCameraY(int mCameraY);\r\n void setCameraW(int mCameraW);\r\n void setCameraH(int mCameraH);\r\n\r\n private:\r\n Globalbilboulga();\r\n ~Globalbilboulga();\r\n\r\n static Globalbilboulga* instance;\r\n\r\n SDL_Window *window;\r\n SDL_Renderer *renderer;\r\n EventHandler *eventHandler;\r\n\r\n FMOD_SYSTEM *audioSystem;\r\n\r\n AssetManager* assetManager;\r\n ProjectileCreator* projectileCreator;\r\n CharactereCreator* charactereCreator;\r\n\r\n bool isRunning;\r\n int FPS;\r\n Vector2D currentRoomSize;\r\n SDL_Rect camera;\r\n\r\n Manager* manager;\r\n}", "parent": null, "children": [27], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 75, "column": 1}}, {"id": 27, "type": "identifier", "text": "Globalbilboulga", "parent": 26, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 21}}, {"id": 28, "type": "labeled_statement", "text": "public:\r\n static Globalbilboulga *getInstance(void);", "parent": 26, "children": [29], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 16, "column": 50}}, {"id": 29, "type": "declaration", "text": "static Globalbilboulga *getInstance(void);", "parent": 28, "children": [30, 31], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 50}}, {"id": 30, "type": "type_identifier", "text": "Globalbilboulga", "parent": 29, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 30}}, {"id": 31, "type": "pointer_declarator", "text": "*getInstance(void)", "parent": 29, "children": [32, 33], "start_point": {"row": 16, "column": 31}, "end_point": {"row": 16, "column": 49}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 16, "column": 31}, "end_point": {"row": 16, "column": 32}}, {"id": 33, "type": "function_declarator", "text": "getInstance(void)", "parent": 31, "children": [34, 35], "start_point": {"row": 16, "column": 32}, "end_point": {"row": 16, "column": 49}}, {"id": 34, "type": "identifier", "text": "getInstance", "parent": 33, "children": [], "start_point": {"row": 16, "column": 32}, "end_point": {"row": 16, "column": 43}}, {"id": 35, "type": "parameter_list", "text": "(void)", "parent": 33, "children": [36], "start_point": {"row": 16, "column": 43}, "end_point": {"row": 16, "column": 49}}, {"id": 36, "type": "parameter_declaration", "text": "void", "parent": 35, "children": [37], "start_point": {"row": 16, "column": 44}, "end_point": {"row": 16, "column": 48}}, {"id": 37, "type": "primitive_type", "text": "void", "parent": 36, "children": [], "start_point": {"row": 16, "column": 44}, "end_point": {"row": 16, "column": 48}}, {"id": 38, "type": "declaration", "text": "static void kill(void);", "parent": 26, "children": [39, 40], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 31}}, {"id": 39, "type": "primitive_type", "text": "void", "parent": 38, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 19}}, {"id": 40, "type": "function_declarator", "text": "kill(void)", "parent": 38, "children": [41, 42], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 30}}, {"id": 41, "type": "identifier", "text": "kill", "parent": 40, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 24}}, {"id": 42, "type": "parameter_list", "text": "(void)", "parent": 40, "children": [43], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 30}}, {"id": 43, "type": "parameter_declaration", "text": "void", "parent": 42, "children": [44], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 29}}, {"id": 44, "type": "primitive_type", "text": "void", "parent": 43, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 29}}, {"id": 45, "type": "declaration", "text": "void clean();", "parent": 26, "children": [46, 47], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 21}}, {"id": 46, "type": "primitive_type", "text": "void", "parent": 45, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 12}}, {"id": 47, "type": "function_declarator", "text": "clean()", "parent": 45, "children": [48, 49], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 20}}, {"id": 48, "type": "identifier", "text": "clean", "parent": 47, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 18}}, {"id": 49, "type": "parameter_list", "text": "()", "parent": 47, "children": [], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 20}}, {"id": 50, "type": "function_definition", "text": "Manager* getManager() { return manager; }", "parent": 26, "children": [51, 52], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 49}}, {"id": 51, "type": "type_identifier", "text": "Manager", "parent": 50, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 15}}, {"id": 52, "type": "pointer_declarator", "text": "* getManager()", "parent": 50, "children": [53, 54], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 29}}, {"id": 53, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 16}}, {"id": 54, "type": "function_declarator", "text": "getManager()", "parent": 52, "children": [55, 56], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 29}}, {"id": 55, "type": "identifier", "text": "getManager", "parent": 54, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 27}}, {"id": 56, "type": "parameter_list", "text": "()", "parent": 54, "children": [], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 29}}, {"id": 57, "type": "return_statement", "text": "return manager;", "parent": 50, "children": [58], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 47}}, {"id": 58, "type": "identifier", "text": "manager", "parent": 57, "children": [], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 46}}, {"id": 59, "type": "declaration", "text": "bool getIsRunning();", "parent": 26, "children": [60, 61], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 28}}, {"id": 60, "type": "primitive_type", "text": "bool", "parent": 59, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 12}}, {"id": 61, "type": "function_declarator", "text": "getIsRunning()", "parent": 59, "children": [62, 63], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 27}}, {"id": 62, "type": "identifier", "text": "getIsRunning", "parent": 61, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 25}}, {"id": 63, "type": "parameter_list", "text": "()", "parent": 61, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 27}}, {"id": 64, "type": "declaration", "text": "FMOD_SYSTEM* getAudioSystem();", "parent": 26, "children": [65, 66], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 38}}, {"id": 65, "type": "type_identifier", "text": "FMOD_SYSTEM", "parent": 64, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 19}}, {"id": 66, "type": "pointer_declarator", "text": "* getAudioSystem()", "parent": 64, "children": [67, 68], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 37}}, {"id": 67, "type": "*", "text": "*", "parent": 66, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 20}}, {"id": 68, "type": "function_declarator", "text": "getAudioSystem()", "parent": 66, "children": [69, 70], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 37}}, {"id": 69, "type": "identifier", "text": "getAudioSystem", "parent": 68, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 35}}, {"id": 70, "type": "parameter_list", "text": "()", "parent": 68, "children": [], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 37}}, {"id": 71, "type": "declaration", "text": "SDL_Window* getWindow(void);", "parent": 26, "children": [72, 73], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 36}}, {"id": 72, "type": "type_identifier", "text": "SDL_Window", "parent": 71, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 18}}, {"id": 73, "type": "pointer_declarator", "text": "* getWindow(void)", "parent": 71, "children": [74, 75], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 35}}, {"id": 74, "type": "*", "text": "*", "parent": 73, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 19}}, {"id": 75, "type": "function_declarator", "text": "getWindow(void)", "parent": 73, "children": [76, 77], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 35}}, {"id": 76, "type": "identifier", "text": "getWindow", "parent": 75, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 29}}, {"id": 77, "type": "parameter_list", "text": "(void)", "parent": 75, "children": [78], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 35}}, {"id": 78, "type": "parameter_declaration", "text": "void", "parent": 77, "children": [79], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 34}}, {"id": 79, "type": "primitive_type", "text": "void", "parent": 78, "children": [], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 34}}, {"id": 80, "type": "declaration", "text": "SDL_Renderer* getRenderer(void);", "parent": 26, "children": [81, 82], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 40}}, {"id": 81, "type": "type_identifier", "text": "SDL_Renderer", "parent": 80, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 20}}, {"id": 82, "type": "pointer_declarator", "text": "* getRenderer(void)", "parent": 80, "children": [83, 84], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 39}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 21}}, {"id": 84, "type": "function_declarator", "text": "getRenderer(void)", "parent": 82, "children": [85, 86], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 39}}, {"id": 85, "type": "identifier", "text": "getRenderer", "parent": 84, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 33}}, {"id": 86, "type": "parameter_list", "text": "(void)", "parent": 84, "children": [87], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 39}}, {"id": 87, "type": "parameter_declaration", "text": "void", "parent": 86, "children": [88], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 38}}, {"id": 88, "type": "primitive_type", "text": "void", "parent": 87, "children": [], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 38}}, {"id": 89, "type": "declaration", "text": "EventHandler* getEventHandler(void);", "parent": 26, "children": [90, 91], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 44}}, {"id": 90, "type": "type_identifier", "text": "EventHandler", "parent": 89, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 20}}, {"id": 91, "type": "pointer_declarator", "text": "* getEventHandler(void)", "parent": 89, "children": [92, 93], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 43}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 21}}, {"id": 93, "type": "function_declarator", "text": "getEventHandler(void)", "parent": 91, "children": [94, 95], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 43}}, {"id": 94, "type": "identifier", "text": "getEventHandler", "parent": 93, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 37}}, {"id": 95, "type": "parameter_list", "text": "(void)", "parent": 93, "children": [96], "start_point": {"row": 26, "column": 37}, "end_point": {"row": 26, "column": 43}}, {"id": 96, "type": "parameter_declaration", "text": "void", "parent": 95, "children": [97], "start_point": {"row": 26, "column": 38}, "end_point": {"row": 26, "column": 42}}, {"id": 97, "type": "primitive_type", "text": "void", "parent": 96, "children": [], "start_point": {"row": 26, "column": 38}, "end_point": {"row": 26, "column": 42}}, {"id": 98, "type": "function_definition", "text": "AssetManager* getAssetManager(void) { return assetManager; }", "parent": 26, "children": [99, 100], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 68}}, {"id": 99, "type": "type_identifier", "text": "AssetManager", "parent": 98, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 20}}, {"id": 100, "type": "pointer_declarator", "text": "* getAssetManager(void)", "parent": 98, "children": [101, 102], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 43}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 21}}, {"id": 102, "type": "function_declarator", "text": "getAssetManager(void)", "parent": 100, "children": [103, 104], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 43}}, {"id": 103, "type": "identifier", "text": "getAssetManager", "parent": 102, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 37}}, {"id": 104, "type": "parameter_list", "text": "(void)", "parent": 102, "children": [105], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 27, "column": 43}}, {"id": 105, "type": "parameter_declaration", "text": "void", "parent": 104, "children": [106], "start_point": {"row": 27, "column": 38}, "end_point": {"row": 27, "column": 42}}, {"id": 106, "type": "primitive_type", "text": "void", "parent": 105, "children": [], "start_point": {"row": 27, "column": 38}, "end_point": {"row": 27, "column": 42}}, {"id": 107, "type": "return_statement", "text": "return assetManager;", "parent": 98, "children": [108], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 66}}, {"id": 108, "type": "identifier", "text": "assetManager", "parent": 107, "children": [], "start_point": {"row": 27, "column": 53}, "end_point": {"row": 27, "column": 65}}, {"id": 109, "type": "declaration", "text": "ProjectileCreator* getProjectileCreator();", "parent": 26, "children": [110, 111], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 50}}, {"id": 110, "type": "type_identifier", "text": "ProjectileCreator", "parent": 109, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 25}}, {"id": 111, "type": "pointer_declarator", "text": "* getProjectileCreator()", "parent": 109, "children": [112, 113], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 49}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 26}}, {"id": 113, "type": "function_declarator", "text": "getProjectileCreator()", "parent": 111, "children": [114, 115], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 49}}, {"id": 114, "type": "identifier", "text": "getProjectileCreator", "parent": 113, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 47}}, {"id": 115, "type": "parameter_list", "text": "()", "parent": 113, "children": [], "start_point": {"row": 28, "column": 47}, "end_point": {"row": 28, "column": 49}}, {"id": 116, "type": "function_definition", "text": "CharactereCreator* getCharactereCreator() { return charactereCreator; }", "parent": 26, "children": [117, 118], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 79}}, {"id": 117, "type": "type_identifier", "text": "CharactereCreator", "parent": 116, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 25}}, {"id": 118, "type": "pointer_declarator", "text": "* getCharactereCreator()", "parent": 116, "children": [119, 120], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 49}}, {"id": 119, "type": "*", "text": "*", "parent": 118, "children": [], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 26}}, {"id": 120, "type": "function_declarator", "text": "getCharactereCreator()", "parent": 118, "children": [121, 122], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 49}}, {"id": 121, "type": "identifier", "text": "getCharactereCreator", "parent": 120, "children": [], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 47}}, {"id": 122, "type": "parameter_list", "text": "()", "parent": 120, "children": [], "start_point": {"row": 29, "column": 47}, "end_point": {"row": 29, "column": 49}}, {"id": 123, "type": "return_statement", "text": "return charactereCreator;", "parent": 116, "children": [124], "start_point": {"row": 29, "column": 52}, "end_point": {"row": 29, "column": 77}}, {"id": 124, "type": "identifier", "text": "charactereCreator", "parent": 123, "children": [], "start_point": {"row": 29, "column": 59}, "end_point": {"row": 29, "column": 76}}, {"id": 125, "type": "declaration", "text": "int getFPS();", "parent": 26, "children": [126, 127], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 21}}, {"id": 126, "type": "primitive_type", "text": "int", "parent": 125, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 11}}, {"id": 127, "type": "function_declarator", "text": "getFPS()", "parent": 125, "children": [128, 129], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 20}}, {"id": 128, "type": "identifier", "text": "getFPS", "parent": 127, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 18}}, {"id": 129, "type": "parameter_list", "text": "()", "parent": 127, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 20}}, {"id": 130, "type": "declaration", "text": "Vector2D getCurrentRoomSize();", "parent": 26, "children": [131, 132], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 38}}, {"id": 131, "type": "type_identifier", "text": "Vector2D", "parent": 130, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 16}}, {"id": 132, "type": "function_declarator", "text": "getCurrentRoomSize()", "parent": 130, "children": [133, 134], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 37}}, {"id": 133, "type": "identifier", "text": "getCurrentRoomSize", "parent": 132, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 35}}, {"id": 134, "type": "parameter_list", "text": "()", "parent": 132, "children": [], "start_point": {"row": 31, "column": 35}, "end_point": {"row": 31, "column": 37}}, {"id": 135, "type": "declaration", "text": "SDL_Rect getCamera();", "parent": 26, "children": [136, 137], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 29}}, {"id": 136, "type": "type_identifier", "text": "SDL_Rect", "parent": 135, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 16}}, {"id": 137, "type": "function_declarator", "text": "getCamera()", "parent": 135, "children": [138, 139], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 28}}, {"id": 138, "type": "identifier", "text": "getCamera", "parent": 137, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 26}}, {"id": 139, "type": "parameter_list", "text": "()", "parent": 137, "children": [], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 28}}, {"id": 140, "type": "declaration", "text": "static const int GRAVITY_STRENGTH = 2;", "parent": 26, "children": [141, 142], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 46}}, {"id": 141, "type": "primitive_type", "text": "int", "parent": 140, "children": [], "start_point": {"row": 33, "column": 21}, "end_point": {"row": 33, "column": 24}}, {"id": 142, "type": "init_declarator", "text": "GRAVITY_STRENGTH = 2", "parent": 140, "children": [143, 144, 145], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 45}}, {"id": 143, "type": "identifier", "text": "GRAVITY_STRENGTH", "parent": 142, "children": [], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 41}}, {"id": 144, "type": "=", "text": "=", "parent": 142, "children": [], "start_point": {"row": 33, "column": 42}, "end_point": {"row": 33, "column": 43}}, {"id": 145, "type": "number_literal", "text": "2", "parent": 142, "children": [], "start_point": {"row": 33, "column": 44}, "end_point": {"row": 33, "column": 45}}, {"id": 146, "type": "function_definition", "text": "void setManager(Manager* newManager) { manager = newManager; }", "parent": 26, "children": [147, 148], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 70}}, {"id": 147, "type": "primitive_type", "text": "void", "parent": 146, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 12}}, {"id": 148, "type": "function_declarator", "text": "setManager(Manager* newManager)", "parent": 146, "children": [149, 150], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 44}}, {"id": 149, "type": "identifier", "text": "setManager", "parent": 148, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 23}}, {"id": 150, "type": "parameter_list", "text": "(Manager* newManager)", "parent": 148, "children": [151], "start_point": {"row": 35, "column": 23}, "end_point": {"row": 35, "column": 44}}, {"id": 151, "type": "parameter_declaration", "text": "Manager* newManager", "parent": 150, "children": [152, 153], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 43}}, {"id": 152, "type": "type_identifier", "text": "Manager", "parent": 151, "children": [], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 31}}, {"id": 153, "type": "pointer_declarator", "text": "* newManager", "parent": 151, "children": [154, 155], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 43}}, {"id": 154, "type": "*", "text": "*", "parent": 153, "children": [], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 32}}, {"id": 155, "type": "identifier", "text": "newManager", "parent": 153, "children": [], "start_point": {"row": 35, "column": 33}, "end_point": {"row": 35, "column": 43}}, {"id": 156, "type": "assignment_expression", "text": "manager = newManager", "parent": 146, "children": [157, 158, 159], "start_point": {"row": 35, "column": 47}, "end_point": {"row": 35, "column": 67}}, {"id": 157, "type": "identifier", "text": "manager", "parent": 156, "children": [], "start_point": {"row": 35, "column": 47}, "end_point": {"row": 35, "column": 54}}, {"id": 158, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 35, "column": 55}, "end_point": {"row": 35, "column": 56}}, {"id": 159, "type": "identifier", "text": "newManager", "parent": 156, "children": [], "start_point": {"row": 35, "column": 57}, "end_point": {"row": 35, "column": 67}}, {"id": 160, "type": "declaration", "text": "void setIsRunning(bool mIsRunning);", "parent": 26, "children": [161, 162], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 43}}, {"id": 161, "type": "primitive_type", "text": "void", "parent": 160, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 12}}, {"id": 162, "type": "function_declarator", "text": "setIsRunning(bool mIsRunning)", "parent": 160, "children": [163, 164], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 42}}, {"id": 163, "type": "identifier", "text": "setIsRunning", "parent": 162, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 25}}, {"id": 164, "type": "parameter_list", "text": "(bool mIsRunning)", "parent": 162, "children": [165], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 42}}, {"id": 165, "type": "parameter_declaration", "text": "bool mIsRunning", "parent": 164, "children": [166, 167], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 41}}, {"id": 166, "type": "primitive_type", "text": "bool", "parent": 165, "children": [], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 30}}, {"id": 167, "type": "identifier", "text": "mIsRunning", "parent": 165, "children": [], "start_point": {"row": 36, "column": 31}, "end_point": {"row": 36, "column": 41}}, {"id": 168, "type": "declaration", "text": "void setAudioSystem(FMOD_SYSTEM *mAudioSystem);", "parent": 26, "children": [169, 170], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 55}}, {"id": 169, "type": "primitive_type", "text": "void", "parent": 168, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 12}}, {"id": 170, "type": "function_declarator", "text": "setAudioSystem(FMOD_SYSTEM *mAudioSystem)", "parent": 168, "children": [171, 172], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 54}}, {"id": 171, "type": "identifier", "text": "setAudioSystem", "parent": 170, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 27}}, {"id": 172, "type": "parameter_list", "text": "(FMOD_SYSTEM *mAudioSystem)", "parent": 170, "children": [173], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 54}}, {"id": 173, "type": "parameter_declaration", "text": "FMOD_SYSTEM *mAudioSystem", "parent": 172, "children": [174, 175], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 53}}, {"id": 174, "type": "type_identifier", "text": "FMOD_SYSTEM", "parent": 173, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 39}}, {"id": 175, "type": "pointer_declarator", "text": "*mAudioSystem", "parent": 173, "children": [176, 177], "start_point": {"row": 37, "column": 40}, "end_point": {"row": 37, "column": 53}}, {"id": 176, "type": "*", "text": "*", "parent": 175, "children": [], "start_point": {"row": 37, "column": 40}, "end_point": {"row": 37, "column": 41}}, {"id": 177, "type": "identifier", "text": "mAudioSystem", "parent": 175, "children": [], "start_point": {"row": 37, "column": 41}, "end_point": {"row": 37, "column": 53}}, {"id": 178, "type": "declaration", "text": "void setWindow(SDL_Window *mWindow);", "parent": 26, "children": [179, 180], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 44}}, {"id": 179, "type": "primitive_type", "text": "void", "parent": 178, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 12}}, {"id": 180, "type": "function_declarator", "text": "setWindow(SDL_Window *mWindow)", "parent": 178, "children": [181, 182], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 43}}, {"id": 181, "type": "identifier", "text": "setWindow", "parent": 180, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 22}}, {"id": 182, "type": "parameter_list", "text": "(SDL_Window *mWindow)", "parent": 180, "children": [183], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 43}}, {"id": 183, "type": "parameter_declaration", "text": "SDL_Window *mWindow", "parent": 182, "children": [184, 185], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 42}}, {"id": 184, "type": "type_identifier", "text": "SDL_Window", "parent": 183, "children": [], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 33}}, {"id": 185, "type": "pointer_declarator", "text": "*mWindow", "parent": 183, "children": [186, 187], "start_point": {"row": 38, "column": 34}, "end_point": {"row": 38, "column": 42}}, {"id": 186, "type": "*", "text": "*", "parent": 185, "children": [], "start_point": {"row": 38, "column": 34}, "end_point": {"row": 38, "column": 35}}, {"id": 187, "type": "identifier", "text": "mWindow", "parent": 185, "children": [], "start_point": {"row": 38, "column": 35}, "end_point": {"row": 38, "column": 42}}, {"id": 188, "type": "declaration", "text": "void setRenderer(SDL_Renderer *mRenderer);", "parent": 26, "children": [189, 190], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 50}}, {"id": 189, "type": "primitive_type", "text": "void", "parent": 188, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 12}}, {"id": 190, "type": "function_declarator", "text": "setRenderer(SDL_Renderer *mRenderer)", "parent": 188, "children": [191, 192], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 49}}, {"id": 191, "type": "identifier", "text": "setRenderer", "parent": 190, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 24}}, {"id": 192, "type": "parameter_list", "text": "(SDL_Renderer *mRenderer)", "parent": 190, "children": [193], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 49}}, {"id": 193, "type": "parameter_declaration", "text": "SDL_Renderer *mRenderer", "parent": 192, "children": [194, 195], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 48}}, {"id": 194, "type": "type_identifier", "text": "SDL_Renderer", "parent": 193, "children": [], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 37}}, {"id": 195, "type": "pointer_declarator", "text": "*mRenderer", "parent": 193, "children": [196, 197], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 48}}, {"id": 196, "type": "*", "text": "*", "parent": 195, "children": [], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 39}}, {"id": 197, "type": "identifier", "text": "mRenderer", "parent": 195, "children": [], "start_point": {"row": 39, "column": 39}, "end_point": {"row": 39, "column": 48}}, {"id": 198, "type": "declaration", "text": "void setEventHandler(EventHandler *mEventHandler);", "parent": 26, "children": [199, 200], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 58}}, {"id": 199, "type": "primitive_type", "text": "void", "parent": 198, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 12}}, {"id": 200, "type": "function_declarator", "text": "setEventHandler(EventHandler *mEventHandler)", "parent": 198, "children": [201, 202], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 57}}, {"id": 201, "type": "identifier", "text": "setEventHandler", "parent": 200, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 28}}, {"id": 202, "type": "parameter_list", "text": "(EventHandler *mEventHandler)", "parent": 200, "children": [203], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 57}}, {"id": 203, "type": "parameter_declaration", "text": "EventHandler *mEventHandler", "parent": 202, "children": [204, 205], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 56}}, {"id": 204, "type": "type_identifier", "text": "EventHandler", "parent": 203, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 41}}, {"id": 205, "type": "pointer_declarator", "text": "*mEventHandler", "parent": 203, "children": [206, 207], "start_point": {"row": 40, "column": 42}, "end_point": {"row": 40, "column": 56}}, {"id": 206, "type": "*", "text": "*", "parent": 205, "children": [], "start_point": {"row": 40, "column": 42}, "end_point": {"row": 40, "column": 43}}, {"id": 207, "type": "identifier", "text": "mEventHandler", "parent": 205, "children": [], "start_point": {"row": 40, "column": 43}, "end_point": {"row": 40, "column": 56}}, {"id": 208, "type": "function_definition", "text": "void setAssetManager(AssetManager* newAssetManager) { assetManager = newAssetManager; }", "parent": 26, "children": [209, 210], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 95}}, {"id": 209, "type": "primitive_type", "text": "void", "parent": 208, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 12}}, {"id": 210, "type": "function_declarator", "text": "setAssetManager(AssetManager* newAssetManager)", "parent": 208, "children": [211, 212], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 59}}, {"id": 211, "type": "identifier", "text": "setAssetManager", "parent": 210, "children": [], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 28}}, {"id": 212, "type": "parameter_list", "text": "(AssetManager* newAssetManager)", "parent": 210, "children": [213], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 59}}, {"id": 213, "type": "parameter_declaration", "text": "AssetManager* newAssetManager", "parent": 212, "children": [214, 215], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 58}}, {"id": 214, "type": "type_identifier", "text": "AssetManager", "parent": 213, "children": [], "start_point": {"row": 41, "column": 29}, "end_point": {"row": 41, "column": 41}}, {"id": 215, "type": "pointer_declarator", "text": "* newAssetManager", "parent": 213, "children": [216, 217], "start_point": {"row": 41, "column": 41}, "end_point": {"row": 41, "column": 58}}, {"id": 216, "type": "*", "text": "*", "parent": 215, "children": [], "start_point": {"row": 41, "column": 41}, "end_point": {"row": 41, "column": 42}}, {"id": 217, "type": "identifier", "text": "newAssetManager", "parent": 215, "children": [], "start_point": {"row": 41, "column": 43}, "end_point": {"row": 41, "column": 58}}, {"id": 218, "type": "assignment_expression", "text": "assetManager = newAssetManager", "parent": 208, "children": [219, 220, 221], "start_point": {"row": 41, "column": 62}, "end_point": {"row": 41, "column": 92}}, {"id": 219, "type": "identifier", "text": "assetManager", "parent": 218, "children": [], "start_point": {"row": 41, "column": 62}, "end_point": {"row": 41, "column": 74}}, {"id": 220, "type": "=", "text": "=", "parent": 218, "children": [], "start_point": {"row": 41, "column": 75}, "end_point": {"row": 41, "column": 76}}, {"id": 221, "type": "identifier", "text": "newAssetManager", "parent": 218, "children": [], "start_point": {"row": 41, "column": 77}, "end_point": {"row": 41, "column": 92}}, {"id": 222, "type": "declaration", "text": "void setProjectileCreator(ProjectileCreator* newPC);", "parent": 26, "children": [223, 224], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 60}}, {"id": 223, "type": "primitive_type", "text": "void", "parent": 222, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 12}}, {"id": 224, "type": "function_declarator", "text": "setProjectileCreator(ProjectileCreator* newPC)", "parent": 222, "children": [225, 226], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 59}}, {"id": 225, "type": "identifier", "text": "setProjectileCreator", "parent": 224, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 33}}, {"id": 226, "type": "parameter_list", "text": "(ProjectileCreator* newPC)", "parent": 224, "children": [227], "start_point": {"row": 42, "column": 33}, "end_point": {"row": 42, "column": 59}}, {"id": 227, "type": "parameter_declaration", "text": "ProjectileCreator* newPC", "parent": 226, "children": [228, 229], "start_point": {"row": 42, "column": 34}, "end_point": {"row": 42, "column": 58}}, {"id": 228, "type": "type_identifier", "text": "ProjectileCreator", "parent": 227, "children": [], "start_point": {"row": 42, "column": 34}, "end_point": {"row": 42, "column": 51}}, {"id": 229, "type": "pointer_declarator", "text": "* newPC", "parent": 227, "children": [230, 231], "start_point": {"row": 42, "column": 51}, "end_point": {"row": 42, "column": 58}}, {"id": 230, "type": "*", "text": "*", "parent": 229, "children": [], "start_point": {"row": 42, "column": 51}, "end_point": {"row": 42, "column": 52}}, {"id": 231, "type": "identifier", "text": "newPC", "parent": 229, "children": [], "start_point": {"row": 42, "column": 53}, "end_point": {"row": 42, "column": 58}}, {"id": 232, "type": "function_definition", "text": "void setCharactereCreator(CharactereCreator* newCC) { charactereCreator = newCC; }", "parent": 26, "children": [233, 234], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 90}}, {"id": 233, "type": "primitive_type", "text": "void", "parent": 232, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 12}}, {"id": 234, "type": "function_declarator", "text": "setCharactereCreator(CharactereCreator* newCC)", "parent": 232, "children": [235, 236], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 59}}, {"id": 235, "type": "identifier", "text": "setCharactereCreator", "parent": 234, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 33}}, {"id": 236, "type": "parameter_list", "text": "(CharactereCreator* newCC)", "parent": 234, "children": [237], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 59}}, {"id": 237, "type": "parameter_declaration", "text": "CharactereCreator* newCC", "parent": 236, "children": [238, 239], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 58}}, {"id": 238, "type": "type_identifier", "text": "CharactereCreator", "parent": 237, "children": [], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 51}}, {"id": 239, "type": "pointer_declarator", "text": "* newCC", "parent": 237, "children": [240, 241], "start_point": {"row": 43, "column": 51}, "end_point": {"row": 43, "column": 58}}, {"id": 240, "type": "*", "text": "*", "parent": 239, "children": [], "start_point": {"row": 43, "column": 51}, "end_point": {"row": 43, "column": 52}}, {"id": 241, "type": "identifier", "text": "newCC", "parent": 239, "children": [], "start_point": {"row": 43, "column": 53}, "end_point": {"row": 43, "column": 58}}, {"id": 242, "type": "assignment_expression", "text": "charactereCreator = newCC", "parent": 232, "children": [243, 244, 245], "start_point": {"row": 43, "column": 62}, "end_point": {"row": 43, "column": 87}}, {"id": 243, "type": "identifier", "text": "charactereCreator", "parent": 242, "children": [], "start_point": {"row": 43, "column": 62}, "end_point": {"row": 43, "column": 79}}, {"id": 244, "type": "=", "text": "=", "parent": 242, "children": [], "start_point": {"row": 43, "column": 80}, "end_point": {"row": 43, "column": 81}}, {"id": 245, "type": "identifier", "text": "newCC", "parent": 242, "children": [], "start_point": {"row": 43, "column": 82}, "end_point": {"row": 43, "column": 87}}, {"id": 246, "type": "declaration", "text": "void setFPS(int mFPS);", "parent": 26, "children": [247, 248], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 30}}, {"id": 247, "type": "primitive_type", "text": "void", "parent": 246, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 12}}, {"id": 248, "type": "function_declarator", "text": "setFPS(int mFPS)", "parent": 246, "children": [249, 250], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 29}}, {"id": 249, "type": "identifier", "text": "setFPS", "parent": 248, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 19}}, {"id": 250, "type": "parameter_list", "text": "(int mFPS)", "parent": 248, "children": [251], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 29}}, {"id": 251, "type": "parameter_declaration", "text": "int mFPS", "parent": 250, "children": [252, 253], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 28}}, {"id": 252, "type": "primitive_type", "text": "int", "parent": 251, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 23}}, {"id": 253, "type": "identifier", "text": "mFPS", "parent": 251, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 28}}, {"id": 254, "type": "declaration", "text": "void setCurrentRoomSize(Vector2D mCurrentMapSize);", "parent": 26, "children": [255, 256], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 58}}, {"id": 255, "type": "primitive_type", "text": "void", "parent": 254, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 12}}, {"id": 256, "type": "function_declarator", "text": "setCurrentRoomSize(Vector2D mCurrentMapSize)", "parent": 254, "children": [257, 258], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 57}}, {"id": 257, "type": "identifier", "text": "setCurrentRoomSize", "parent": 256, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 31}}, {"id": 258, "type": "parameter_list", "text": "(Vector2D mCurrentMapSize)", "parent": 256, "children": [259], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 57}}, {"id": 259, "type": "parameter_declaration", "text": "Vector2D mCurrentMapSize", "parent": 258, "children": [260, 261], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 56}}, {"id": 260, "type": "type_identifier", "text": "Vector2D", "parent": 259, "children": [], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 40}}, {"id": 261, "type": "identifier", "text": "mCurrentMapSize", "parent": 259, "children": [], "start_point": {"row": 46, "column": 41}, "end_point": {"row": 46, "column": 56}}, {"id": 262, "type": "declaration", "text": "void setCamera(SDL_Rect mCamera);", "parent": 26, "children": [263, 264], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 41}}, {"id": 263, "type": "primitive_type", "text": "void", "parent": 262, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 12}}, {"id": 264, "type": "function_declarator", "text": "setCamera(SDL_Rect mCamera)", "parent": 262, "children": [265, 266], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 40}}, {"id": 265, "type": "identifier", "text": "setCamera", "parent": 264, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 22}}, {"id": 266, "type": "parameter_list", "text": "(SDL_Rect mCamera)", "parent": 264, "children": [267], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 40}}, {"id": 267, "type": "parameter_declaration", "text": "SDL_Rect mCamera", "parent": 266, "children": [268, 269], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 39}}, {"id": 268, "type": "type_identifier", "text": "SDL_Rect", "parent": 267, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 31}}, {"id": 269, "type": "identifier", "text": "mCamera", "parent": 267, "children": [], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 39}}, {"id": 270, "type": "declaration", "text": "void setCameraX(int mCameraX);", "parent": 26, "children": [271, 272], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 38}}, {"id": 271, "type": "primitive_type", "text": "void", "parent": 270, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 12}}, {"id": 272, "type": "function_declarator", "text": "setCameraX(int mCameraX)", "parent": 270, "children": [273, 274], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 37}}, {"id": 273, "type": "identifier", "text": "setCameraX", "parent": 272, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 23}}, {"id": 274, "type": "parameter_list", "text": "(int mCameraX)", "parent": 272, "children": [275], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 37}}, {"id": 275, "type": "parameter_declaration", "text": "int mCameraX", "parent": 274, "children": [276, 277], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 36}}, {"id": 276, "type": "primitive_type", "text": "int", "parent": 275, "children": [], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 27}}, {"id": 277, "type": "identifier", "text": "mCameraX", "parent": 275, "children": [], "start_point": {"row": 48, "column": 28}, "end_point": {"row": 48, "column": 36}}, {"id": 278, "type": "declaration", "text": "void setCameraY(int mCameraY);", "parent": 26, "children": [279, 280], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 38}}, {"id": 279, "type": "primitive_type", "text": "void", "parent": 278, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 12}}, {"id": 280, "type": "function_declarator", "text": "setCameraY(int mCameraY)", "parent": 278, "children": [281, 282], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 37}}, {"id": 281, "type": "identifier", "text": "setCameraY", "parent": 280, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 23}}, {"id": 282, "type": "parameter_list", "text": "(int mCameraY)", "parent": 280, "children": [283], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 37}}, {"id": 283, "type": "parameter_declaration", "text": "int mCameraY", "parent": 282, "children": [284, 285], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 36}}, {"id": 284, "type": "primitive_type", "text": "int", "parent": 283, "children": [], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 27}}, {"id": 285, "type": "identifier", "text": "mCameraY", "parent": 283, "children": [], "start_point": {"row": 49, "column": 28}, "end_point": {"row": 49, "column": 36}}, {"id": 286, "type": "declaration", "text": "void setCameraW(int mCameraW);", "parent": 26, "children": [287, 288], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 38}}, {"id": 287, "type": "primitive_type", "text": "void", "parent": 286, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 12}}, {"id": 288, "type": "function_declarator", "text": "setCameraW(int mCameraW)", "parent": 286, "children": [289, 290], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 37}}, {"id": 289, "type": "identifier", "text": "setCameraW", "parent": 288, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 23}}, {"id": 290, "type": "parameter_list", "text": "(int mCameraW)", "parent": 288, "children": [291], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 37}}, {"id": 291, "type": "parameter_declaration", "text": "int mCameraW", "parent": 290, "children": [292, 293], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 36}}, {"id": 292, "type": "primitive_type", "text": "int", "parent": 291, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 27}}, {"id": 293, "type": "identifier", "text": "mCameraW", "parent": 291, "children": [], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 36}}, {"id": 294, "type": "declaration", "text": "void setCameraH(int mCameraH);", "parent": 26, "children": [295, 296], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 38}}, {"id": 295, "type": "primitive_type", "text": "void", "parent": 294, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 12}}, {"id": 296, "type": "function_declarator", "text": "setCameraH(int mCameraH)", "parent": 294, "children": [297, 298], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 37}}, {"id": 297, "type": "identifier", "text": "setCameraH", "parent": 296, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 23}}, {"id": 298, "type": "parameter_list", "text": "(int mCameraH)", "parent": 296, "children": [299], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 37}}, {"id": 299, "type": "parameter_declaration", "text": "int mCameraH", "parent": 298, "children": [300, 301], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 36}}, {"id": 300, "type": "primitive_type", "text": "int", "parent": 299, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 27}}, {"id": 301, "type": "identifier", "text": "mCameraH", "parent": 299, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 36}}, {"id": 302, "type": "labeled_statement", "text": "private:\r\n Globalbilboulga();", "parent": 26, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 54, "column": 26}}, {"id": 303, "type": "call_expression", "text": "Globalbilboulga()", "parent": 302, "children": [304, 305], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 25}}, {"id": 304, "type": "identifier", "text": "Globalbilboulga", "parent": 303, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 23}}, {"id": 305, "type": "argument_list", "text": "()", "parent": 303, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 25}}, {"id": 306, "type": "unary_expression", "text": "~Globalbilboulga()", "parent": 26, "children": [307, 308], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 26}}, {"id": 307, "type": "~", "text": "~", "parent": 306, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 9}}, {"id": 308, "type": "call_expression", "text": "Globalbilboulga()", "parent": 306, "children": [309, 310], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 26}}, {"id": 309, "type": "identifier", "text": "Globalbilboulga", "parent": 308, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 24}}, {"id": 310, "type": "argument_list", "text": "()", "parent": 308, "children": [], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 26}}, {"id": 311, "type": "declaration", "text": "static Globalbilboulga* instance;", "parent": 26, "children": [312, 313], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 41}}, {"id": 312, "type": "type_identifier", "text": "Globalbilboulga", "parent": 311, "children": [], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 30}}, {"id": 313, "type": "pointer_declarator", "text": "* instance", "parent": 311, "children": [314, 315], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 40}}, {"id": 314, "type": "*", "text": "*", "parent": 313, "children": [], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 31}}, {"id": 315, "type": "identifier", "text": "instance", "parent": 313, "children": [], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 40}}, {"id": 316, "type": "declaration", "text": "SDL_Window *window;", "parent": 26, "children": [317, 318], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 27}}, {"id": 317, "type": "type_identifier", "text": "SDL_Window", "parent": 316, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 18}}, {"id": 318, "type": "pointer_declarator", "text": "*window", "parent": 316, "children": [319, 320], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 26}}, {"id": 319, "type": "*", "text": "*", "parent": 318, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 20}}, {"id": 320, "type": "identifier", "text": "window", "parent": 318, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 26}}, {"id": 321, "type": "declaration", "text": "SDL_Renderer *renderer;", "parent": 26, "children": [322, 323], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 31}}, {"id": 322, "type": "type_identifier", "text": "SDL_Renderer", "parent": 321, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 20}}, {"id": 323, "type": "pointer_declarator", "text": "*renderer", "parent": 321, "children": [324, 325], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 30}}, {"id": 324, "type": "*", "text": "*", "parent": 323, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 22}}, {"id": 325, "type": "identifier", "text": "renderer", "parent": 323, "children": [], "start_point": {"row": 60, "column": 22}, "end_point": {"row": 60, "column": 30}}, {"id": 326, "type": "declaration", "text": "EventHandler *eventHandler;", "parent": 26, "children": [327, 328], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 35}}, {"id": 327, "type": "type_identifier", "text": "EventHandler", "parent": 326, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 20}}, {"id": 328, "type": "pointer_declarator", "text": "*eventHandler", "parent": 326, "children": [329, 330], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 34}}, {"id": 329, "type": "*", "text": "*", "parent": 328, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 22}}, {"id": 330, "type": "identifier", "text": "eventHandler", "parent": 328, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 34}}, {"id": 331, "type": "declaration", "text": "FMOD_SYSTEM *audioSystem;", "parent": 26, "children": [332, 333], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 33}}, {"id": 332, "type": "type_identifier", "text": "FMOD_SYSTEM", "parent": 331, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 19}}, {"id": 333, "type": "pointer_declarator", "text": "*audioSystem", "parent": 331, "children": [334, 335], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 32}}, {"id": 334, "type": "*", "text": "*", "parent": 333, "children": [], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 21}}, {"id": 335, "type": "identifier", "text": "audioSystem", "parent": 333, "children": [], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 32}}, {"id": 336, "type": "declaration", "text": "AssetManager* assetManager;", "parent": 26, "children": [337, 338], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 35}}, {"id": 337, "type": "type_identifier", "text": "AssetManager", "parent": 336, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 20}}, {"id": 338, "type": "pointer_declarator", "text": "* assetManager", "parent": 336, "children": [339, 340], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 34}}, {"id": 339, "type": "*", "text": "*", "parent": 338, "children": [], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 21}}, {"id": 340, "type": "identifier", "text": "assetManager", "parent": 338, "children": [], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 34}}, {"id": 341, "type": "declaration", "text": "ProjectileCreator* projectileCreator;", "parent": 26, "children": [342, 343], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 45}}, {"id": 342, "type": "type_identifier", "text": "ProjectileCreator", "parent": 341, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 25}}, {"id": 343, "type": "pointer_declarator", "text": "* projectileCreator", "parent": 341, "children": [344, 345], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 44}}, {"id": 344, "type": "*", "text": "*", "parent": 343, "children": [], "start_point": {"row": 66, "column": 25}, "end_point": {"row": 66, "column": 26}}, {"id": 345, "type": "identifier", "text": "projectileCreator", "parent": 343, "children": [], "start_point": {"row": 66, "column": 27}, "end_point": {"row": 66, "column": 44}}, {"id": 346, "type": "declaration", "text": "CharactereCreator* charactereCreator;", "parent": 26, "children": [347, 348], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 45}}, {"id": 347, "type": "type_identifier", "text": "CharactereCreator", "parent": 346, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 25}}, {"id": 348, "type": "pointer_declarator", "text": "* charactereCreator", "parent": 346, "children": [349, 350], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 44}}, {"id": 349, "type": "*", "text": "*", "parent": 348, "children": [], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 26}}, {"id": 350, "type": "identifier", "text": "charactereCreator", "parent": 348, "children": [], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 44}}, {"id": 351, "type": "declaration", "text": "bool isRunning;", "parent": 26, "children": [352, 353], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 23}}, {"id": 352, "type": "primitive_type", "text": "bool", "parent": 351, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 12}}, {"id": 353, "type": "identifier", "text": "isRunning", "parent": 351, "children": [], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 22}}, {"id": 354, "type": "declaration", "text": "int FPS;", "parent": 26, "children": [355, 356], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 16}}, {"id": 355, "type": "primitive_type", "text": "int", "parent": 354, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 11}}, {"id": 356, "type": "identifier", "text": "FPS", "parent": 354, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 15}}, {"id": 357, "type": "declaration", "text": "Vector2D currentRoomSize;", "parent": 26, "children": [358, 359], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 33}}, {"id": 358, "type": "type_identifier", "text": "Vector2D", "parent": 357, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 16}}, {"id": 359, "type": "identifier", "text": "currentRoomSize", "parent": 357, "children": [], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 32}}, {"id": 360, "type": "declaration", "text": "SDL_Rect camera;", "parent": 26, "children": [361, 362], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 24}}, {"id": 361, "type": "type_identifier", "text": "SDL_Rect", "parent": 360, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 16}}, {"id": 362, "type": "identifier", "text": "camera", "parent": 360, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 23}}, {"id": 363, "type": "declaration", "text": "Manager* manager;", "parent": 26, "children": [364, 365], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 25}}, {"id": 364, "type": "type_identifier", "text": "Manager", "parent": 363, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 15}}, {"id": 365, "type": "pointer_declarator", "text": "* manager", "parent": 363, "children": [366, 367], "start_point": {"row": 74, "column": 15}, "end_point": {"row": 74, "column": 24}}, {"id": 366, "type": "*", "text": "*", "parent": 365, "children": [], "start_point": {"row": 74, "column": 15}, "end_point": {"row": 74, "column": 16}}, {"id": 367, "type": "identifier", "text": "manager", "parent": 365, "children": [], "start_point": {"row": 74, "column": 17}, "end_point": {"row": 74, "column": 24}}]}, "node_categories": {"declarations": {"functions": [26, 33, 40, 47, 50, 54, 61, 68, 75, 84, 93, 98, 102, 113, 116, 120, 127, 132, 137, 146, 148, 162, 170, 180, 190, 200, 208, 210, 224, 232, 234, 248, 256, 264, 272, 280, 288, 296], "variables": [24, 29, 36, 38, 43, 45, 59, 64, 71, 78, 80, 87, 89, 96, 105, 109, 125, 130, 135, 140, 151, 160, 165, 168, 173, 178, 183, 188, 193, 198, 203, 213, 222, 227, 237, 246, 251, 254, 259, 262, 267, 270, 275, 278, 283, 286, 291, 294, 299, 311, 316, 321, 326, 331, 336, 341, 346, 351, 354, 357, 360, 363], "classes": [], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22], "modules": [], "enums": []}, "statements": {"expressions": [303, 306, 308], "assignments": [156, 218, 242], "loops": [], "conditionals": [25, 27, 30, 34, 41, 48, 51, 55, 58, 62, 65, 69, 72, 76, 81, 85, 90, 94, 99, 103, 108, 110, 114, 117, 121, 124, 128, 131, 133, 136, 138, 143, 149, 152, 155, 157, 159, 163, 167, 171, 174, 177, 181, 184, 187, 191, 194, 197, 201, 204, 207, 211, 214, 217, 219, 221, 225, 228, 231, 235, 238, 241, 243, 245, 249, 253, 257, 260, 261, 265, 268, 269, 273, 277, 281, 285, 289, 293, 297, 301, 304, 309, 312, 315, 317, 320, 322, 325, 327, 330, 332, 335, 337, 340, 342, 345, 347, 350, 353, 356, 358, 359, 361, 362, 364, 367], "returns": [57, 107, 123], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17, 20, 23, 145], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 26, "universal_type": "function", "name": "Globalbilboulga", "text_snippet": "class Globalbilboulga\r\n{\r\n public:\r\n static Globalbilboulga *getInstance(void);\r\n s"}, {"node_id": 33, "universal_type": "function", "name": "unknown", "text_snippet": "getInstance(void)"}, {"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "kill(void)"}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "clean()"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "Manager* getManager() { return manager; }"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "getManager()"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "getIsRunning()"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "getAudioSystem()"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "getWindow(void)"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "getRenderer(void)"}, {"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "getEventHandler(void)"}, {"node_id": 98, "universal_type": "function", "name": "unknown", "text_snippet": "AssetManager* getAssetManager(void) { return assetManager; }"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "getAssetManager(void)"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "getProjectileCreator()"}, {"node_id": 116, "universal_type": "function", "name": "unknown", "text_snippet": "CharactereCreator* getCharactereCreator() { return charactereCreator; }"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "getCharactereCreator()"}, {"node_id": 127, "universal_type": "function", "name": "unknown", "text_snippet": "getFPS()"}, {"node_id": 132, "universal_type": "function", "name": "unknown", "text_snippet": "getCurrentRoomSize()"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "getCamera()"}, {"node_id": 146, "universal_type": "function", "name": "setManager", "text_snippet": "void setManager(Manager* newManager) { manager = newManager; }"}, {"node_id": 148, "universal_type": "function", "name": "unknown", "text_snippet": "setManager(Manager* newManager)"}, {"node_id": 162, "universal_type": "function", "name": "unknown", "text_snippet": "setIsRunning(bool mIsRunning)"}, {"node_id": 170, "universal_type": "function", "name": "unknown", "text_snippet": "setAudioSystem(FMOD_SYSTEM *mAudioSystem)"}, {"node_id": 180, "universal_type": "function", "name": "unknown", "text_snippet": "setWindow(SDL_Window *mWindow)"}, {"node_id": 190, "universal_type": "function", "name": "unknown", "text_snippet": "setRenderer(SDL_Renderer *mRenderer)"}, {"node_id": 200, "universal_type": "function", "name": "unknown", "text_snippet": "setEventHandler(EventHandler *mEventHandler)"}, {"node_id": 208, "universal_type": "function", "name": "setAssetManager", "text_snippet": "void setAssetManager(AssetManager* newAssetManager) { assetManager = newAssetManager; }"}, {"node_id": 210, "universal_type": "function", "name": "unknown", "text_snippet": "setAssetManager(AssetManager* newAssetManager)"}, {"node_id": 224, "universal_type": "function", "name": "unknown", "text_snippet": "setProjectileCreator(ProjectileCreator* newPC)"}, {"node_id": 232, "universal_type": "function", "name": "setCharactereCreator", "text_snippet": "void setCharactereCreator(CharactereCreator* newCC) { charactereCreator = newCC; }"}, {"node_id": 234, "universal_type": "function", "name": "unknown", "text_snippet": "setCharactereCreator(CharactereCreator* newCC)"}, {"node_id": 248, "universal_type": "function", "name": "unknown", "text_snippet": "setFPS(int mFPS)"}, {"node_id": 256, "universal_type": "function", "name": "unknown", "text_snippet": "setCurrentRoomSize(Vector2D mCurrentMapSize)"}, {"node_id": 264, "universal_type": "function", "name": "unknown", "text_snippet": "setCamera(SDL_Rect mCamera)"}, {"node_id": 272, "universal_type": "function", "name": "unknown", "text_snippet": "setCameraX(int mCameraX)"}, {"node_id": 280, "universal_type": "function", "name": "unknown", "text_snippet": "setCameraY(int mCameraY)"}, {"node_id": 288, "universal_type": "function", "name": "unknown", "text_snippet": "setCameraW(int mCameraW)"}, {"node_id": 296, "universal_type": "function", "name": "unknown", "text_snippet": "setCameraH(int mCameraH)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <FMOD/fmod.hpp>\r\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <SDL2/SDL.h>\r\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <SDL2/SDL_ttf.h>\r\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"../EventHandler/eventHandler.h\"\r\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"../AssetManager.h\"\r\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"../Common/Types/Vector2D.h\"\r\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"../CharactereCreator.h\"\r\n"}, {"node_id": 22, "text": "#include"}]}, "original_source_code": "#pragma once\r\n\r\n#include <FMOD/fmod.hpp>\r\n#include <SDL2/SDL.h>\r\n#include <SDL2/SDL_ttf.h>\r\n\r\n#include \"../EventHandler/eventHandler.h\"\r\n#include \"../AssetManager.h\"\r\n#include \"../Common/Types/Vector2D.h\"\r\n#include \"../CharactereCreator.h\"\r\n\r\nclass ProjectileCreator;\r\n\r\nclass Globalbilboulga\r\n{\r\n public:\r\n static Globalbilboulga *getInstance(void);\r\n static void kill(void);\r\n\r\n void clean();\r\n\r\n Manager* getManager() { return manager; }\r\n bool getIsRunning();\r\n FMOD_SYSTEM* getAudioSystem();\r\n SDL_Window* getWindow(void);\r\n SDL_Renderer* getRenderer(void);\r\n EventHandler* getEventHandler(void);\r\n AssetManager* getAssetManager(void) { return assetManager; }\r\n ProjectileCreator* getProjectileCreator();\r\n CharactereCreator* getCharactereCreator() { return charactereCreator; }\r\n int getFPS();\r\n Vector2D getCurrentRoomSize();\r\n SDL_Rect getCamera();\r\n static const int GRAVITY_STRENGTH = 2;\r\n\r\n void setManager(Manager* newManager) { manager = newManager; }\r\n void setIsRunning(bool mIsRunning);\r\n void setAudioSystem(FMOD_SYSTEM *mAudioSystem);\r\n void setWindow(SDL_Window *mWindow);\r\n void setRenderer(SDL_Renderer *mRenderer);\r\n void setEventHandler(EventHandler *mEventHandler);\r\n void setAssetManager(AssetManager* newAssetManager) { assetManager = newAssetManager; }\r\n void setProjectileCreator(ProjectileCreator* newPC);\r\n void setCharactereCreator(CharactereCreator* newCC) { charactereCreator = newCC; }\r\n void setFPS(int mFPS);\r\n // void setGravityStrength(int mgravityStrength);\r\n void setCurrentRoomSize(Vector2D mCurrentMapSize);\r\n void setCamera(SDL_Rect mCamera);\r\n void setCameraX(int mCameraX);\r\n void setCameraY(int mCameraY);\r\n void setCameraW(int mCameraW);\r\n void setCameraH(int mCameraH);\r\n\r\n private:\r\n Globalbilboulga();\r\n ~Globalbilboulga();\r\n\r\n static Globalbilboulga* instance;\r\n\r\n SDL_Window *window;\r\n SDL_Renderer *renderer;\r\n EventHandler *eventHandler;\r\n\r\n FMOD_SYSTEM *audioSystem;\r\n\r\n AssetManager* assetManager;\r\n ProjectileCreator* projectileCreator;\r\n CharactereCreator* charactereCreator;\r\n\r\n bool isRunning;\r\n int FPS;\r\n Vector2D currentRoomSize;\r\n SDL_Rect camera;\r\n\r\n Manager* manager;\r\n};\r\n"}
80,953
c
#ifndef __SCHEDULE_TASK_H #define __SCHEDULE_TASK_H #include "queue/queue.h" #include <stdbool.h> #include <stdint.h> #define MAX_TASK_NUM 64 typedef struct __KernelContext { uint64_t x19; uint64_t x20; uint64_t x21; uint64_t x22; uint64_t x23; uint64_t x24; uint64_t x25; uint64_t x26; uint64_t x27; uint64_t x28; uint64_t fp; uint64_t lr; uint64_t sp; } KernelContext; typedef struct __UserContext { uint64_t fp; uint64_t lr; uint64_t sp; uint64_t elr_el1; uint64_t spsr_el1; } UserContext; typedef struct __UserTaskStruct { UserContext user_context; uint32_t id; uint32_t regain_resource_flag; } UserTaskStruct; enum Status { kUnUse, kInUse, kZombie }; typedef struct __TaskStruct { KernelContext kernel_context; UserTaskStruct *user_task; uint32_t id; uint32_t counter; enum Status status; uint32_t reschedule_flag; } TaskStruct; extern TaskStruct ktask_pool[MAX_TASK_NUM] __attribute__((aligned(16u))); extern uint8_t kstack_pool[MAX_TASK_NUM][4096] __attribute__((aligned(16u))); extern UserTaskStruct utask_pool[MAX_TASK_NUM] __attribute__((aligned(16u))); extern uint8_t ustack_pool[MAX_TASK_NUM][4096] __attribute__((aligned(16u))); extern Queue running_queue; void idle(void); void initIdleTaskState(void); int64_t createPrivilegeTask(void (*func)()); void doExec(void (*func)()); void checkRescheduleFlag(void); void doFork(uint64_t *trapframe); void doExit(int status); // for testing scheduler void fooTask(void); #endif
24.48
61
(translation_unit) "#ifndef __SCHEDULE_TASK_H\n#define __SCHEDULE_TASK_H\n\n#include "queue/queue.h"\n\n#include <stdbool.h>\n#include <stdint.h>\n\n#define MAX_TASK_NUM 64\n\ntypedef struct __KernelContext {\n uint64_t x19;\n uint64_t x20;\n uint64_t x21;\n uint64_t x22;\n uint64_t x23;\n uint64_t x24;\n uint64_t x25;\n uint64_t x26;\n uint64_t x27;\n uint64_t x28;\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n} KernelContext;\n\ntypedef struct __UserContext {\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n uint64_t elr_el1;\n uint64_t spsr_el1;\n} UserContext;\n\ntypedef struct __UserTaskStruct {\n UserContext user_context;\n uint32_t id;\n uint32_t regain_resource_flag;\n} UserTaskStruct;\n\nenum Status {\n kUnUse,\n kInUse,\n kZombie\n};\n\ntypedef struct __TaskStruct {\n KernelContext kernel_context;\n UserTaskStruct *user_task;\n uint32_t id;\n uint32_t counter;\n enum Status status;\n uint32_t reschedule_flag;\n} TaskStruct;\n\nextern TaskStruct ktask_pool[MAX_TASK_NUM] __attribute__((aligned(16u)));\nextern uint8_t kstack_pool[MAX_TASK_NUM][4096] __attribute__((aligned(16u)));\n\nextern UserTaskStruct utask_pool[MAX_TASK_NUM] __attribute__((aligned(16u)));\nextern uint8_t ustack_pool[MAX_TASK_NUM][4096] __attribute__((aligned(16u)));\n\nextern Queue running_queue;\n\nvoid idle(void);\nvoid initIdleTaskState(void);\nint64_t createPrivilegeTask(void (*func)());\nvoid doExec(void (*func)());\nvoid checkRescheduleFlag(void);\n\nvoid doFork(uint64_t *trapframe);\nvoid doExit(int status);\n\n// for testing scheduler\nvoid fooTask(void);\n\n#endif\n" (preproc_ifdef) "#ifndef __SCHEDULE_TASK_H\n#define __SCHEDULE_TASK_H\n\n#include "queue/queue.h"\n\n#include <stdbool.h>\n#include <stdint.h>\n\n#define MAX_TASK_NUM 64\n\ntypedef struct __KernelContext {\n uint64_t x19;\n uint64_t x20;\n uint64_t x21;\n uint64_t x22;\n uint64_t x23;\n uint64_t x24;\n uint64_t x25;\n uint64_t x26;\n uint64_t x27;\n uint64_t x28;\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n} KernelContext;\n\ntypedef struct __UserContext {\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n uint64_t elr_el1;\n uint64_t spsr_el1;\n} UserContext;\n\ntypedef struct __UserTaskStruct {\n UserContext user_context;\n uint32_t id;\n uint32_t regain_resource_flag;\n} UserTaskStruct;\n\nenum Status {\n kUnUse,\n kInUse,\n kZombie\n};\n\ntypedef struct __TaskStruct {\n KernelContext kernel_context;\n UserTaskStruct *user_task;\n uint32_t id;\n uint32_t counter;\n enum Status status;\n uint32_t reschedule_flag;\n} TaskStruct;\n\nextern TaskStruct ktask_pool[MAX_TASK_NUM] __attribute__((aligned(16u)));\nextern uint8_t kstack_pool[MAX_TASK_NUM][4096] __attribute__((aligned(16u)));\n\nextern UserTaskStruct utask_pool[MAX_TASK_NUM] __attribute__((aligned(16u)));\nextern uint8_t ustack_pool[MAX_TASK_NUM][4096] __attribute__((aligned(16u)));\n\nextern Queue running_queue;\n\nvoid idle(void);\nvoid initIdleTaskState(void);\nint64_t createPrivilegeTask(void (*func)());\nvoid doExec(void (*func)());\nvoid checkRescheduleFlag(void);\n\nvoid doFork(uint64_t *trapframe);\nvoid doExit(int status);\n\n// for testing scheduler\nvoid fooTask(void);\n\n#endif" (#ifndef) "#ifndef" (identifier) "__SCHEDULE_TASK_H" (preproc_def) "#define __SCHEDULE_TASK_H\n" (#define) "#define" (identifier) "__SCHEDULE_TASK_H" (preproc_include) "#include "queue/queue.h"\n" (#include) "#include" (string_literal) ""queue/queue.h"" (") """ (string_content) "queue/queue.h" (") """ (preproc_include) "#include <stdbool.h>\n" (#include) "#include" (system_lib_string) "<stdbool.h>" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_def) "#define MAX_TASK_NUM 64\n" (#define) "#define" (identifier) "MAX_TASK_NUM" (preproc_arg) "64" (type_definition) "typedef struct __KernelContext {\n uint64_t x19;\n uint64_t x20;\n uint64_t x21;\n uint64_t x22;\n uint64_t x23;\n uint64_t x24;\n uint64_t x25;\n uint64_t x26;\n uint64_t x27;\n uint64_t x28;\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n} KernelContext;" (typedef) "typedef" (struct_specifier) "struct __KernelContext {\n uint64_t x19;\n uint64_t x20;\n uint64_t x21;\n uint64_t x22;\n uint64_t x23;\n uint64_t x24;\n uint64_t x25;\n uint64_t x26;\n uint64_t x27;\n uint64_t x28;\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n}" (struct) "struct" (type_identifier) "__KernelContext" (field_declaration_list) "{\n uint64_t x19;\n uint64_t x20;\n uint64_t x21;\n uint64_t x22;\n uint64_t x23;\n uint64_t x24;\n uint64_t x25;\n uint64_t x26;\n uint64_t x27;\n uint64_t x28;\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n}" ({) "{" (field_declaration) "uint64_t x19;" (primitive_type) "uint64_t" (field_identifier) "x19" (;) ";" (field_declaration) "uint64_t x20;" (primitive_type) "uint64_t" (field_identifier) "x20" (;) ";" (field_declaration) "uint64_t x21;" (primitive_type) "uint64_t" (field_identifier) "x21" (;) ";" (field_declaration) "uint64_t x22;" (primitive_type) "uint64_t" (field_identifier) "x22" (;) ";" (field_declaration) "uint64_t x23;" (primitive_type) "uint64_t" (field_identifier) "x23" (;) ";" (field_declaration) "uint64_t x24;" (primitive_type) "uint64_t" (field_identifier) "x24" (;) ";" (field_declaration) "uint64_t x25;" (primitive_type) "uint64_t" (field_identifier) "x25" (;) ";" (field_declaration) "uint64_t x26;" (primitive_type) "uint64_t" (field_identifier) "x26" (;) ";" (field_declaration) "uint64_t x27;" (primitive_type) "uint64_t" (field_identifier) "x27" (;) ";" (field_declaration) "uint64_t x28;" (primitive_type) "uint64_t" (field_identifier) "x28" (;) ";" (field_declaration) "uint64_t fp;" (primitive_type) "uint64_t" (field_identifier) "fp" (;) ";" (field_declaration) "uint64_t lr;" (primitive_type) "uint64_t" (field_identifier) "lr" (;) ";" (field_declaration) "uint64_t sp;" (primitive_type) "uint64_t" (field_identifier) "sp" (;) ";" (}) "}" (type_identifier) "KernelContext" (;) ";" (type_definition) "typedef struct __UserContext {\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n uint64_t elr_el1;\n uint64_t spsr_el1;\n} UserContext;" (typedef) "typedef" (struct_specifier) "struct __UserContext {\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n uint64_t elr_el1;\n uint64_t spsr_el1;\n}" (struct) "struct" (type_identifier) "__UserContext" (field_declaration_list) "{\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n uint64_t elr_el1;\n uint64_t spsr_el1;\n}" ({) "{" (field_declaration) "uint64_t fp;" (primitive_type) "uint64_t" (field_identifier) "fp" (;) ";" (field_declaration) "uint64_t lr;" (primitive_type) "uint64_t" (field_identifier) "lr" (;) ";" (field_declaration) "uint64_t sp;" (primitive_type) "uint64_t" (field_identifier) "sp" (;) ";" (field_declaration) "uint64_t elr_el1;" (primitive_type) "uint64_t" (field_identifier) "elr_el1" (;) ";" (field_declaration) "uint64_t spsr_el1;" (primitive_type) "uint64_t" (field_identifier) "spsr_el1" (;) ";" (}) "}" (type_identifier) "UserContext" (;) ";" (type_definition) "typedef struct __UserTaskStruct {\n UserContext user_context;\n uint32_t id;\n uint32_t regain_resource_flag;\n} UserTaskStruct;" (typedef) "typedef" (struct_specifier) "struct __UserTaskStruct {\n UserContext user_context;\n uint32_t id;\n uint32_t regain_resource_flag;\n}" (struct) "struct" (type_identifier) "__UserTaskStruct" (field_declaration_list) "{\n UserContext user_context;\n uint32_t id;\n uint32_t regain_resource_flag;\n}" ({) "{" (field_declaration) "UserContext user_context;" (type_identifier) "UserContext" (field_identifier) "user_context" (;) ";" (field_declaration) "uint32_t id;" (primitive_type) "uint32_t" (field_identifier) "id" (;) ";" (field_declaration) "uint32_t regain_resource_flag;" (primitive_type) "uint32_t" (field_identifier) "regain_resource_flag" (;) ";" (}) "}" (type_identifier) "UserTaskStruct" (;) ";" (enum_specifier) "enum Status {\n kUnUse,\n kInUse,\n kZombie\n}" (enum) "enum" (type_identifier) "Status" (enumerator_list) "{\n kUnUse,\n kInUse,\n kZombie\n}" ({) "{" (enumerator) "kUnUse" (identifier) "kUnUse" (,) "," (enumerator) "kInUse" (identifier) "kInUse" (,) "," (enumerator) "kZombie" (identifier) "kZombie" (}) "}" (;) ";" (type_definition) "typedef struct __TaskStruct {\n KernelContext kernel_context;\n UserTaskStruct *user_task;\n uint32_t id;\n uint32_t counter;\n enum Status status;\n uint32_t reschedule_flag;\n} TaskStruct;" (typedef) "typedef" (struct_specifier) "struct __TaskStruct {\n KernelContext kernel_context;\n UserTaskStruct *user_task;\n uint32_t id;\n uint32_t counter;\n enum Status status;\n uint32_t reschedule_flag;\n}" (struct) "struct" (type_identifier) "__TaskStruct" (field_declaration_list) "{\n KernelContext kernel_context;\n UserTaskStruct *user_task;\n uint32_t id;\n uint32_t counter;\n enum Status status;\n uint32_t reschedule_flag;\n}" ({) "{" (field_declaration) "KernelContext kernel_context;" (type_identifier) "KernelContext" (field_identifier) "kernel_context" (;) ";" (field_declaration) "UserTaskStruct *user_task;" (type_identifier) "UserTaskStruct" (pointer_declarator) "*user_task" (*) "*" (field_identifier) "user_task" (;) ";" (field_declaration) "uint32_t id;" (primitive_type) "uint32_t" (field_identifier) "id" (;) ";" (field_declaration) "uint32_t counter;" (primitive_type) "uint32_t" (field_identifier) "counter" (;) ";" (field_declaration) "enum Status status;" (enum_specifier) "enum Status" (enum) "enum" (type_identifier) "Status" (field_identifier) "status" (;) ";" (field_declaration) "uint32_t reschedule_flag;" (primitive_type) "uint32_t" (field_identifier) "reschedule_flag" (;) ";" (}) "}" (type_identifier) "TaskStruct" (;) ";" (declaration) "extern TaskStruct ktask_pool[MAX_TASK_NUM]" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "TaskStruct" (array_declarator) "ktask_pool[MAX_TASK_NUM]" (identifier) "ktask_pool" ([) "[" (identifier) "MAX_TASK_NUM" (]) "]" (;) "" (declaration) "__attribute__((aligned(16u)));\nextern uint8_t kstack_pool[MAX_TASK_NUM][4096]" (attribute_specifier) "__attribute__((aligned(16u)))" (__attribute__) "__attribute__" (() "(" (argument_list) "(aligned(16u))" (() "(" (call_expression) "aligned(16u)" (identifier) "aligned" (argument_list) "(16u)" (() "(" (number_literal) "16u" ()) ")" ()) ")" ()) ")" (ERROR) ";" (;) ";" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "uint8_t" (array_declarator) "kstack_pool[MAX_TASK_NUM][4096]" (array_declarator) "kstack_pool[MAX_TASK_NUM]" (identifier) "kstack_pool" ([) "[" (identifier) "MAX_TASK_NUM" (]) "]" ([) "[" (number_literal) "4096" (]) "]" (;) "" (declaration) "__attribute__((aligned(16u)));\n\nextern UserTaskStruct utask_pool[MAX_TASK_NUM]" (attribute_specifier) "__attribute__((aligned(16u)))" (__attribute__) "__attribute__" (() "(" (argument_list) "(aligned(16u))" (() "(" (call_expression) "aligned(16u)" (identifier) "aligned" (argument_list) "(16u)" (() "(" (number_literal) "16u" ()) ")" ()) ")" ()) ")" (ERROR) ";" (;) ";" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "UserTaskStruct" (array_declarator) "utask_pool[MAX_TASK_NUM]" (identifier) "utask_pool" ([) "[" (identifier) "MAX_TASK_NUM" (]) "]" (;) "" (declaration) "__attribute__((aligned(16u)));\nextern uint8_t ustack_pool[MAX_TASK_NUM][4096]" (attribute_specifier) "__attribute__((aligned(16u)))" (__attribute__) "__attribute__" (() "(" (argument_list) "(aligned(16u))" (() "(" (call_expression) "aligned(16u)" (identifier) "aligned" (argument_list) "(16u)" (() "(" (number_literal) "16u" ()) ")" ()) ")" ()) ")" (ERROR) ";" (;) ";" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "uint8_t" (array_declarator) "ustack_pool[MAX_TASK_NUM][4096]" (array_declarator) "ustack_pool[MAX_TASK_NUM]" (identifier) "ustack_pool" ([) "[" (identifier) "MAX_TASK_NUM" (]) "]" ([) "[" (number_literal) "4096" (]) "]" (;) "" (declaration) "__attribute__((aligned(16u)));\n\nextern Queue running_queue;" (attribute_specifier) "__attribute__((aligned(16u)))" (__attribute__) "__attribute__" (() "(" (argument_list) "(aligned(16u))" (() "(" (call_expression) "aligned(16u)" (identifier) "aligned" (argument_list) "(16u)" (() "(" (number_literal) "16u" ()) ")" ()) ")" ()) ")" (ERROR) ";" (;) ";" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "Queue" (identifier) "running_queue" (;) ";" (declaration) "void idle(void);" (primitive_type) "void" (function_declarator) "idle(void)" (identifier) "idle" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void initIdleTaskState(void);" (primitive_type) "void" (function_declarator) "initIdleTaskState(void)" (identifier) "initIdleTaskState" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "int64_t createPrivilegeTask(void (*func)());" (primitive_type) "int64_t" (function_declarator) "createPrivilegeTask(void (*func)())" (identifier) "createPrivilegeTask" (parameter_list) "(void (*func)())" (() "(" (parameter_declaration) "void (*func)()" (primitive_type) "void" (function_declarator) "(*func)()" (parenthesized_declarator) "(*func)" (() "(" (pointer_declarator) "*func" (*) "*" (identifier) "func" ()) ")" (parameter_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (declaration) "void doExec(void (*func)());" (primitive_type) "void" (function_declarator) "doExec(void (*func)())" (identifier) "doExec" (parameter_list) "(void (*func)())" (() "(" (parameter_declaration) "void (*func)()" (primitive_type) "void" (function_declarator) "(*func)()" (parenthesized_declarator) "(*func)" (() "(" (pointer_declarator) "*func" (*) "*" (identifier) "func" ()) ")" (parameter_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (declaration) "void checkRescheduleFlag(void);" (primitive_type) "void" (function_declarator) "checkRescheduleFlag(void)" (identifier) "checkRescheduleFlag" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void doFork(uint64_t *trapframe);" (primitive_type) "void" (function_declarator) "doFork(uint64_t *trapframe)" (identifier) "doFork" (parameter_list) "(uint64_t *trapframe)" (() "(" (parameter_declaration) "uint64_t *trapframe" (primitive_type) "uint64_t" (pointer_declarator) "*trapframe" (*) "*" (identifier) "trapframe" ()) ")" (;) ";" (declaration) "void doExit(int status);" (primitive_type) "void" (function_declarator) "doExit(int status)" (identifier) "doExit" (parameter_list) "(int status)" (() "(" (parameter_declaration) "int status" (primitive_type) "int" (identifier) "status" ()) ")" (;) ";" (comment) "// for testing scheduler" (declaration) "void fooTask(void);" (primitive_type) "void" (function_declarator) "fooTask(void)" (identifier) "fooTask" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (#endif) "#endif"
410
4
{"language": "c", "success": true, "metadata": {"lines": 61, "avg_line_length": 24.48, "nodes": 276, "errors": 0, "source_hash": "ada533e215d2fa6ecdc42536cff8c30d4020529f16cbf7a507ba407ef8ff7838", "categorized_nodes": 183}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __SCHEDULE_TASK_H\n#define __SCHEDULE_TASK_H\n\n#include \"queue/queue.h\"\n\n#include <stdbool.h>\n#include <stdint.h>\n\n#define MAX_TASK_NUM 64\n\ntypedef struct __KernelContext {\n uint64_t x19;\n uint64_t x20;\n uint64_t x21;\n uint64_t x22;\n uint64_t x23;\n uint64_t x24;\n uint64_t x25;\n uint64_t x26;\n uint64_t x27;\n uint64_t x28;\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n} KernelContext;\n\ntypedef struct __UserContext {\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n uint64_t elr_el1;\n uint64_t spsr_el1;\n} UserContext;\n\ntypedef struct __UserTaskStruct {\n UserContext user_context;\n uint32_t id;\n uint32_t regain_resource_flag;\n} UserTaskStruct;\n\nenum Status {\n kUnUse,\n kInUse,\n kZombie\n};\n\ntypedef struct __TaskStruct {\n KernelContext kernel_context;\n UserTaskStruct *user_task;\n uint32_t id;\n uint32_t counter;\n enum Status status;\n uint32_t reschedule_flag;\n} TaskStruct;\n\nextern TaskStruct ktask_pool[MAX_TASK_NUM] __attribute__((aligned(16u)));\nextern uint8_t kstack_pool[MAX_TASK_NUM][4096] __attribute__((aligned(16u)));\n\nextern UserTaskStruct utask_pool[MAX_TASK_NUM] __attribute__((aligned(16u)));\nextern uint8_t ustack_pool[MAX_TASK_NUM][4096] __attribute__((aligned(16u)));\n\nextern Queue running_queue;\n\nvoid idle(void);\nvoid initIdleTaskState(void);\nint64_t createPrivilegeTask(void (*func)());\nvoid doExec(void (*func)());\nvoid checkRescheduleFlag(void);\n\nvoid doFork(uint64_t *trapframe);\nvoid doExit(int status);\n\n// for testing scheduler\nvoid fooTask(void);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 19, 64, 85, 100, 110, 138, 145, 161, 175, 191, 203, 210, 217, 230, 243, 250, 260, 268, 275], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 77, "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": "__SCHEDULE_TASK_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define __SCHEDULE_TASK_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": "__SCHEDULE_TASK_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include \"queue/queue.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": "\"queue/queue.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "#include <stdbool.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<stdbool.h>", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<stdint.h>", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 15, "type": "preproc_def", "text": "#define MAX_TASK_NUM 64\n", "parent": 0, "children": [16, 17, 18], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 16, "type": "#define", "text": "#define", "parent": 15, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 17, "type": "identifier", "text": "MAX_TASK_NUM", "parent": 15, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 20}}, {"id": 18, "type": "preproc_arg", "text": "64", "parent": 15, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 23}}, {"id": 19, "type": "type_definition", "text": "typedef struct __KernelContext {\n uint64_t x19;\n uint64_t x20;\n uint64_t x21;\n uint64_t x22;\n uint64_t x23;\n uint64_t x24;\n uint64_t x25;\n uint64_t x26;\n uint64_t x27;\n uint64_t x28;\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n} KernelContext;", "parent": 0, "children": [20, 21, 63], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 25, "column": 16}}, {"id": 20, "type": "typedef", "text": "typedef", "parent": 19, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 21, "type": "struct_specifier", "text": "struct __KernelContext {\n uint64_t x19;\n uint64_t x20;\n uint64_t x21;\n uint64_t x22;\n uint64_t x23;\n uint64_t x24;\n uint64_t x25;\n uint64_t x26;\n uint64_t x27;\n uint64_t x28;\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n}", "parent": 19, "children": [22, 23], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 25, "column": 1}}, {"id": 22, "type": "struct", "text": "struct", "parent": 21, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 14}}, {"id": 23, "type": "type_identifier", "text": "__KernelContext", "parent": 21, "children": [], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 30}}, {"id": 24, "type": "field_declaration", "text": "uint64_t x19;", "parent": 21, "children": [25, 26], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 17}}, {"id": 25, "type": "primitive_type", "text": "uint64_t", "parent": 24, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 12}}, {"id": 26, "type": "field_identifier", "text": "x19", "parent": 24, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 16}}, {"id": 27, "type": "field_declaration", "text": "uint64_t x20;", "parent": 21, "children": [28, 29], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 17}}, {"id": 28, "type": "primitive_type", "text": "uint64_t", "parent": 27, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 12}}, {"id": 29, "type": "field_identifier", "text": "x20", "parent": 27, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 16}}, {"id": 30, "type": "field_declaration", "text": "uint64_t x21;", "parent": 21, "children": [31, 32], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 17}}, {"id": 31, "type": "primitive_type", "text": "uint64_t", "parent": 30, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 12}}, {"id": 32, "type": "field_identifier", "text": "x21", "parent": 30, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 16}}, {"id": 33, "type": "field_declaration", "text": "uint64_t x22;", "parent": 21, "children": [34, 35], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 17}}, {"id": 34, "type": "primitive_type", "text": "uint64_t", "parent": 33, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 12}}, {"id": 35, "type": "field_identifier", "text": "x22", "parent": 33, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 16}}, {"id": 36, "type": "field_declaration", "text": "uint64_t x23;", "parent": 21, "children": [37, 38], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 17}}, {"id": 37, "type": "primitive_type", "text": "uint64_t", "parent": 36, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 12}}, {"id": 38, "type": "field_identifier", "text": "x23", "parent": 36, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 16}}, {"id": 39, "type": "field_declaration", "text": "uint64_t x24;", "parent": 21, "children": [40, 41], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 17}}, {"id": 40, "type": "primitive_type", "text": "uint64_t", "parent": 39, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 12}}, {"id": 41, "type": "field_identifier", "text": "x24", "parent": 39, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 16}}, {"id": 42, "type": "field_declaration", "text": "uint64_t x25;", "parent": 21, "children": [43, 44], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 17}}, {"id": 43, "type": "primitive_type", "text": "uint64_t", "parent": 42, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 12}}, {"id": 44, "type": "field_identifier", "text": "x25", "parent": 42, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 16}}, {"id": 45, "type": "field_declaration", "text": "uint64_t x26;", "parent": 21, "children": [46, 47], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 17}}, {"id": 46, "type": "primitive_type", "text": "uint64_t", "parent": 45, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 12}}, {"id": 47, "type": "field_identifier", "text": "x26", "parent": 45, "children": [], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 16}}, {"id": 48, "type": "field_declaration", "text": "uint64_t x27;", "parent": 21, "children": [49, 50], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 17}}, {"id": 49, "type": "primitive_type", "text": "uint64_t", "parent": 48, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 12}}, {"id": 50, "type": "field_identifier", "text": "x27", "parent": 48, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 16}}, {"id": 51, "type": "field_declaration", "text": "uint64_t x28;", "parent": 21, "children": [52, 53], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 17}}, {"id": 52, "type": "primitive_type", "text": "uint64_t", "parent": 51, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 12}}, {"id": 53, "type": "field_identifier", "text": "x28", "parent": 51, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 16}}, {"id": 54, "type": "field_declaration", "text": "uint64_t fp;", "parent": 21, "children": [55, 56], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 16}}, {"id": 55, "type": "primitive_type", "text": "uint64_t", "parent": 54, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 12}}, {"id": 56, "type": "field_identifier", "text": "fp", "parent": 54, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 15}}, {"id": 57, "type": "field_declaration", "text": "uint64_t lr;", "parent": 21, "children": [58, 59], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 16}}, {"id": 58, "type": "primitive_type", "text": "uint64_t", "parent": 57, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 12}}, {"id": 59, "type": "field_identifier", "text": "lr", "parent": 57, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 15}}, {"id": 60, "type": "field_declaration", "text": "uint64_t sp;", "parent": 21, "children": [61, 62], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 16}}, {"id": 61, "type": "primitive_type", "text": "uint64_t", "parent": 60, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 12}}, {"id": 62, "type": "field_identifier", "text": "sp", "parent": 60, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 15}}, {"id": 63, "type": "type_identifier", "text": "KernelContext", "parent": 19, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 15}}, {"id": 64, "type": "type_definition", "text": "typedef struct __UserContext {\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n uint64_t elr_el1;\n uint64_t spsr_el1;\n} UserContext;", "parent": 0, "children": [65, 66, 84], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 34, "column": 14}}, {"id": 65, "type": "typedef", "text": "typedef", "parent": 64, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 66, "type": "struct_specifier", "text": "struct __UserContext {\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n uint64_t elr_el1;\n uint64_t spsr_el1;\n}", "parent": 64, "children": [67, 68], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 34, "column": 1}}, {"id": 67, "type": "struct", "text": "struct", "parent": 66, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 14}}, {"id": 68, "type": "type_identifier", "text": "__UserContext", "parent": 66, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 28}}, {"id": 69, "type": "field_declaration", "text": "uint64_t fp;", "parent": 66, "children": [70, 71], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 16}}, {"id": 70, "type": "primitive_type", "text": "uint64_t", "parent": 69, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 12}}, {"id": 71, "type": "field_identifier", "text": "fp", "parent": 69, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 15}}, {"id": 72, "type": "field_declaration", "text": "uint64_t lr;", "parent": 66, "children": [73, 74], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 16}}, {"id": 73, "type": "primitive_type", "text": "uint64_t", "parent": 72, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 12}}, {"id": 74, "type": "field_identifier", "text": "lr", "parent": 72, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 15}}, {"id": 75, "type": "field_declaration", "text": "uint64_t sp;", "parent": 66, "children": [76, 77], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 16}}, {"id": 76, "type": "primitive_type", "text": "uint64_t", "parent": 75, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 12}}, {"id": 77, "type": "field_identifier", "text": "sp", "parent": 75, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 15}}, {"id": 78, "type": "field_declaration", "text": "uint64_t elr_el1;", "parent": 66, "children": [79, 80], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 21}}, {"id": 79, "type": "primitive_type", "text": "uint64_t", "parent": 78, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 12}}, {"id": 80, "type": "field_identifier", "text": "elr_el1", "parent": 78, "children": [], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 20}}, {"id": 81, "type": "field_declaration", "text": "uint64_t spsr_el1;", "parent": 66, "children": [82, 83], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 22}}, {"id": 82, "type": "primitive_type", "text": "uint64_t", "parent": 81, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 12}}, {"id": 83, "type": "field_identifier", "text": "spsr_el1", "parent": 81, "children": [], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 21}}, {"id": 84, "type": "type_identifier", "text": "UserContext", "parent": 64, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 13}}, {"id": 85, "type": "type_definition", "text": "typedef struct __UserTaskStruct {\n UserContext user_context;\n uint32_t id;\n uint32_t regain_resource_flag;\n} UserTaskStruct;", "parent": 0, "children": [86, 87, 99], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 40, "column": 17}}, {"id": 86, "type": "typedef", "text": "typedef", "parent": 85, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 87, "type": "struct_specifier", "text": "struct __UserTaskStruct {\n UserContext user_context;\n uint32_t id;\n uint32_t regain_resource_flag;\n}", "parent": 85, "children": [88, 89], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 40, "column": 1}}, {"id": 88, "type": "struct", "text": "struct", "parent": 87, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 14}}, {"id": 89, "type": "type_identifier", "text": "__UserTaskStruct", "parent": 87, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 31}}, {"id": 90, "type": "field_declaration", "text": "UserContext user_context;", "parent": 87, "children": [91, 92], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 29}}, {"id": 91, "type": "type_identifier", "text": "UserContext", "parent": 90, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 15}}, {"id": 92, "type": "field_identifier", "text": "user_context", "parent": 90, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 28}}, {"id": 93, "type": "field_declaration", "text": "uint32_t id;", "parent": 87, "children": [94, 95], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 16}}, {"id": 94, "type": "primitive_type", "text": "uint32_t", "parent": 93, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 12}}, {"id": 95, "type": "field_identifier", "text": "id", "parent": 93, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 15}}, {"id": 96, "type": "field_declaration", "text": "uint32_t regain_resource_flag;", "parent": 87, "children": [97, 98], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 34}}, {"id": 97, "type": "primitive_type", "text": "uint32_t", "parent": 96, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 12}}, {"id": 98, "type": "field_identifier", "text": "regain_resource_flag", "parent": 96, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 33}}, {"id": 99, "type": "type_identifier", "text": "UserTaskStruct", "parent": 85, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 16}}, {"id": 100, "type": "enum_specifier", "text": "enum Status {\n kUnUse,\n kInUse,\n kZombie\n}", "parent": 0, "children": [101, 102, 103], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 46, "column": 1}}, {"id": 101, "type": "enum", "text": "enum", "parent": 100, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 4}}, {"id": 102, "type": "type_identifier", "text": "Status", "parent": 100, "children": [], "start_point": {"row": 42, "column": 5}, "end_point": {"row": 42, "column": 11}}, {"id": 103, "type": "enumerator_list", "text": "{\n kUnUse,\n kInUse,\n kZombie\n}", "parent": 100, "children": [104, 106, 108], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 46, "column": 1}}, {"id": 104, "type": "enumerator", "text": "kUnUse", "parent": 103, "children": [105], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 10}}, {"id": 105, "type": "identifier", "text": "kUnUse", "parent": 104, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 10}}, {"id": 106, "type": "enumerator", "text": "kInUse", "parent": 103, "children": [107], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 10}}, {"id": 107, "type": "identifier", "text": "kInUse", "parent": 106, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 10}}, {"id": 108, "type": "enumerator", "text": "kZombie", "parent": 103, "children": [109], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 11}}, {"id": 109, "type": "identifier", "text": "kZombie", "parent": 108, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 11}}, {"id": 110, "type": "type_definition", "text": "typedef struct __TaskStruct {\n KernelContext kernel_context;\n UserTaskStruct *user_task;\n uint32_t id;\n uint32_t counter;\n enum Status status;\n uint32_t reschedule_flag;\n} TaskStruct;", "parent": 0, "children": [111, 112, 137], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 55, "column": 13}}, {"id": 111, "type": "typedef", "text": "typedef", "parent": 110, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 112, "type": "struct_specifier", "text": "struct __TaskStruct {\n KernelContext kernel_context;\n UserTaskStruct *user_task;\n uint32_t id;\n uint32_t counter;\n enum Status status;\n uint32_t reschedule_flag;\n}", "parent": 110, "children": [113, 114], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 55, "column": 1}}, {"id": 113, "type": "struct", "text": "struct", "parent": 112, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 14}}, {"id": 114, "type": "type_identifier", "text": "__TaskStruct", "parent": 112, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 27}}, {"id": 115, "type": "field_declaration", "text": "KernelContext kernel_context;", "parent": 112, "children": [116, 117], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 33}}, {"id": 116, "type": "type_identifier", "text": "KernelContext", "parent": 115, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 17}}, {"id": 117, "type": "field_identifier", "text": "kernel_context", "parent": 115, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 32}}, {"id": 118, "type": "field_declaration", "text": "UserTaskStruct *user_task;", "parent": 112, "children": [119, 120], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 30}}, {"id": 119, "type": "type_identifier", "text": "UserTaskStruct", "parent": 118, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 18}}, {"id": 120, "type": "pointer_declarator", "text": "*user_task", "parent": 118, "children": [121, 122], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 29}}, {"id": 121, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 20}}, {"id": 122, "type": "field_identifier", "text": "user_task", "parent": 120, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 29}}, {"id": 123, "type": "field_declaration", "text": "uint32_t id;", "parent": 112, "children": [124, 125], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 16}}, {"id": 124, "type": "primitive_type", "text": "uint32_t", "parent": 123, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 12}}, {"id": 125, "type": "field_identifier", "text": "id", "parent": 123, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 15}}, {"id": 126, "type": "field_declaration", "text": "uint32_t counter;", "parent": 112, "children": [127, 128], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 21}}, {"id": 127, "type": "primitive_type", "text": "uint32_t", "parent": 126, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 12}}, {"id": 128, "type": "field_identifier", "text": "counter", "parent": 126, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 20}}, {"id": 129, "type": "field_declaration", "text": "enum Status status;", "parent": 112, "children": [130, 133], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 23}}, {"id": 130, "type": "enum_specifier", "text": "enum Status", "parent": 129, "children": [131, 132], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 15}}, {"id": 131, "type": "enum", "text": "enum", "parent": 130, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 8}}, {"id": 132, "type": "type_identifier", "text": "Status", "parent": 130, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 15}}, {"id": 133, "type": "field_identifier", "text": "status", "parent": 129, "children": [], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 22}}, {"id": 134, "type": "field_declaration", "text": "uint32_t reschedule_flag;", "parent": 112, "children": [135, 136], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 29}}, {"id": 135, "type": "primitive_type", "text": "uint32_t", "parent": 134, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 12}}, {"id": 136, "type": "field_identifier", "text": "reschedule_flag", "parent": 134, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 28}}, {"id": 137, "type": "type_identifier", "text": "TaskStruct", "parent": 110, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 12}}, {"id": 138, "type": "declaration", "text": "extern TaskStruct ktask_pool[MAX_TASK_NUM]", "parent": 0, "children": [139, 141, 142], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 42}}, {"id": 139, "type": "storage_class_specifier", "text": "extern", "parent": 138, "children": [140], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 6}}, {"id": 140, "type": "extern", "text": "extern", "parent": 139, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 6}}, {"id": 141, "type": "type_identifier", "text": "TaskStruct", "parent": 138, "children": [], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 17}}, {"id": 142, "type": "array_declarator", "text": "ktask_pool[MAX_TASK_NUM]", "parent": 138, "children": [143, 144], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 42}}, {"id": 143, "type": "identifier", "text": "ktask_pool", "parent": 142, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 28}}, {"id": 144, "type": "identifier", "text": "MAX_TASK_NUM", "parent": 142, "children": [], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 41}}, {"id": 145, "type": "declaration", "text": "__attribute__((aligned(16u)));\nextern uint8_t kstack_pool[MAX_TASK_NUM][4096]", "parent": 0, "children": [146, 153, 155, 156], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 58, "column": 46}}, {"id": 146, "type": "attribute_specifier", "text": "__attribute__((aligned(16u)))", "parent": 145, "children": [147, 148], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 72}}, {"id": 147, "type": "__attribute__", "text": "__attribute__", "parent": 146, "children": [], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 56}}, {"id": 148, "type": "argument_list", "text": "(aligned(16u))", "parent": 146, "children": [149], "start_point": {"row": 57, "column": 57}, "end_point": {"row": 57, "column": 71}}, {"id": 149, "type": "call_expression", "text": "aligned(16u)", "parent": 148, "children": [150, 151], "start_point": {"row": 57, "column": 58}, "end_point": {"row": 57, "column": 70}}, {"id": 150, "type": "identifier", "text": "aligned", "parent": 149, "children": [], "start_point": {"row": 57, "column": 58}, "end_point": {"row": 57, "column": 65}}, {"id": 151, "type": "argument_list", "text": "(16u)", "parent": 149, "children": [152], "start_point": {"row": 57, "column": 65}, "end_point": {"row": 57, "column": 70}}, {"id": 152, "type": "number_literal", "text": "16u", "parent": 151, "children": [], "start_point": {"row": 57, "column": 66}, "end_point": {"row": 57, "column": 69}}, {"id": 153, "type": "storage_class_specifier", "text": "extern", "parent": 145, "children": [154], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 6}}, {"id": 154, "type": "extern", "text": "extern", "parent": 153, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 6}}, {"id": 155, "type": "primitive_type", "text": "uint8_t", "parent": 145, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 14}}, {"id": 156, "type": "array_declarator", "text": "kstack_pool[MAX_TASK_NUM][4096]", "parent": 145, "children": [157, 160], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 46}}, {"id": 157, "type": "array_declarator", "text": "kstack_pool[MAX_TASK_NUM]", "parent": 156, "children": [158, 159], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 40}}, {"id": 158, "type": "identifier", "text": "kstack_pool", "parent": 157, "children": [], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 26}}, {"id": 159, "type": "identifier", "text": "MAX_TASK_NUM", "parent": 157, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 39}}, {"id": 160, "type": "number_literal", "text": "4096", "parent": 156, "children": [], "start_point": {"row": 58, "column": 41}, "end_point": {"row": 58, "column": 45}}, {"id": 161, "type": "declaration", "text": "__attribute__((aligned(16u)));\n\nextern UserTaskStruct utask_pool[MAX_TASK_NUM]", "parent": 0, "children": [162, 169, 171, 172], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 60, "column": 46}}, {"id": 162, "type": "attribute_specifier", "text": "__attribute__((aligned(16u)))", "parent": 161, "children": [163, 164], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 58, "column": 76}}, {"id": 163, "type": "__attribute__", "text": "__attribute__", "parent": 162, "children": [], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 58, "column": 60}}, {"id": 164, "type": "argument_list", "text": "(aligned(16u))", "parent": 162, "children": [165], "start_point": {"row": 58, "column": 61}, "end_point": {"row": 58, "column": 75}}, {"id": 165, "type": "call_expression", "text": "aligned(16u)", "parent": 164, "children": [166, 167], "start_point": {"row": 58, "column": 62}, "end_point": {"row": 58, "column": 74}}, {"id": 166, "type": "identifier", "text": "aligned", "parent": 165, "children": [], "start_point": {"row": 58, "column": 62}, "end_point": {"row": 58, "column": 69}}, {"id": 167, "type": "argument_list", "text": "(16u)", "parent": 165, "children": [168], "start_point": {"row": 58, "column": 69}, "end_point": {"row": 58, "column": 74}}, {"id": 168, "type": "number_literal", "text": "16u", "parent": 167, "children": [], "start_point": {"row": 58, "column": 70}, "end_point": {"row": 58, "column": 73}}, {"id": 169, "type": "storage_class_specifier", "text": "extern", "parent": 161, "children": [170], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 170, "type": "extern", "text": "extern", "parent": 169, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 171, "type": "type_identifier", "text": "UserTaskStruct", "parent": 161, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 21}}, {"id": 172, "type": "array_declarator", "text": "utask_pool[MAX_TASK_NUM]", "parent": 161, "children": [173, 174], "start_point": {"row": 60, "column": 22}, "end_point": {"row": 60, "column": 46}}, {"id": 173, "type": "identifier", "text": "utask_pool", "parent": 172, "children": [], "start_point": {"row": 60, "column": 22}, "end_point": {"row": 60, "column": 32}}, {"id": 174, "type": "identifier", "text": "MAX_TASK_NUM", "parent": 172, "children": [], "start_point": {"row": 60, "column": 33}, "end_point": {"row": 60, "column": 45}}, {"id": 175, "type": "declaration", "text": "__attribute__((aligned(16u)));\nextern uint8_t ustack_pool[MAX_TASK_NUM][4096]", "parent": 0, "children": [176, 183, 185, 186], "start_point": {"row": 60, "column": 47}, "end_point": {"row": 61, "column": 46}}, {"id": 176, "type": "attribute_specifier", "text": "__attribute__((aligned(16u)))", "parent": 175, "children": [177, 178], "start_point": {"row": 60, "column": 47}, "end_point": {"row": 60, "column": 76}}, {"id": 177, "type": "__attribute__", "text": "__attribute__", "parent": 176, "children": [], "start_point": {"row": 60, "column": 47}, "end_point": {"row": 60, "column": 60}}, {"id": 178, "type": "argument_list", "text": "(aligned(16u))", "parent": 176, "children": [179], "start_point": {"row": 60, "column": 61}, "end_point": {"row": 60, "column": 75}}, {"id": 179, "type": "call_expression", "text": "aligned(16u)", "parent": 178, "children": [180, 181], "start_point": {"row": 60, "column": 62}, "end_point": {"row": 60, "column": 74}}, {"id": 180, "type": "identifier", "text": "aligned", "parent": 179, "children": [], "start_point": {"row": 60, "column": 62}, "end_point": {"row": 60, "column": 69}}, {"id": 181, "type": "argument_list", "text": "(16u)", "parent": 179, "children": [182], "start_point": {"row": 60, "column": 69}, "end_point": {"row": 60, "column": 74}}, {"id": 182, "type": "number_literal", "text": "16u", "parent": 181, "children": [], "start_point": {"row": 60, "column": 70}, "end_point": {"row": 60, "column": 73}}, {"id": 183, "type": "storage_class_specifier", "text": "extern", "parent": 175, "children": [184], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 6}}, {"id": 184, "type": "extern", "text": "extern", "parent": 183, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 6}}, {"id": 185, "type": "primitive_type", "text": "uint8_t", "parent": 175, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 14}}, {"id": 186, "type": "array_declarator", "text": "ustack_pool[MAX_TASK_NUM][4096]", "parent": 175, "children": [187, 190], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 46}}, {"id": 187, "type": "array_declarator", "text": "ustack_pool[MAX_TASK_NUM]", "parent": 186, "children": [188, 189], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 40}}, {"id": 188, "type": "identifier", "text": "ustack_pool", "parent": 187, "children": [], "start_point": {"row": 61, "column": 15}, "end_point": {"row": 61, "column": 26}}, {"id": 189, "type": "identifier", "text": "MAX_TASK_NUM", "parent": 187, "children": [], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 39}}, {"id": 190, "type": "number_literal", "text": "4096", "parent": 186, "children": [], "start_point": {"row": 61, "column": 41}, "end_point": {"row": 61, "column": 45}}, {"id": 191, "type": "declaration", "text": "__attribute__((aligned(16u)));\n\nextern Queue running_queue;", "parent": 0, "children": [192, 199, 201, 202], "start_point": {"row": 61, "column": 47}, "end_point": {"row": 63, "column": 27}}, {"id": 192, "type": "attribute_specifier", "text": "__attribute__((aligned(16u)))", "parent": 191, "children": [193, 194], "start_point": {"row": 61, "column": 47}, "end_point": {"row": 61, "column": 76}}, {"id": 193, "type": "__attribute__", "text": "__attribute__", "parent": 192, "children": [], "start_point": {"row": 61, "column": 47}, "end_point": {"row": 61, "column": 60}}, {"id": 194, "type": "argument_list", "text": "(aligned(16u))", "parent": 192, "children": [195], "start_point": {"row": 61, "column": 61}, "end_point": {"row": 61, "column": 75}}, {"id": 195, "type": "call_expression", "text": "aligned(16u)", "parent": 194, "children": [196, 197], "start_point": {"row": 61, "column": 62}, "end_point": {"row": 61, "column": 74}}, {"id": 196, "type": "identifier", "text": "aligned", "parent": 195, "children": [], "start_point": {"row": 61, "column": 62}, "end_point": {"row": 61, "column": 69}}, {"id": 197, "type": "argument_list", "text": "(16u)", "parent": 195, "children": [198], "start_point": {"row": 61, "column": 69}, "end_point": {"row": 61, "column": 74}}, {"id": 198, "type": "number_literal", "text": "16u", "parent": 197, "children": [], "start_point": {"row": 61, "column": 70}, "end_point": {"row": 61, "column": 73}}, {"id": 199, "type": "storage_class_specifier", "text": "extern", "parent": 191, "children": [200], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 6}}, {"id": 200, "type": "extern", "text": "extern", "parent": 199, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 6}}, {"id": 201, "type": "type_identifier", "text": "Queue", "parent": 191, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 12}}, {"id": 202, "type": "identifier", "text": "running_queue", "parent": 191, "children": [], "start_point": {"row": 63, "column": 13}, "end_point": {"row": 63, "column": 26}}, {"id": 203, "type": "declaration", "text": "void idle(void);", "parent": 0, "children": [204, 205], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 16}}, {"id": 204, "type": "primitive_type", "text": "void", "parent": 203, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 4}}, {"id": 205, "type": "function_declarator", "text": "idle(void)", "parent": 203, "children": [206, 207], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 15}}, {"id": 206, "type": "identifier", "text": "idle", "parent": 205, "children": [], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 9}}, {"id": 207, "type": "parameter_list", "text": "(void)", "parent": 205, "children": [208], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 15}}, {"id": 208, "type": "parameter_declaration", "text": "void", "parent": 207, "children": [209], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 14}}, {"id": 209, "type": "primitive_type", "text": "void", "parent": 208, "children": [], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 14}}, {"id": 210, "type": "declaration", "text": "void initIdleTaskState(void);", "parent": 0, "children": [211, 212], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 29}}, {"id": 211, "type": "primitive_type", "text": "void", "parent": 210, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 4}}, {"id": 212, "type": "function_declarator", "text": "initIdleTaskState(void)", "parent": 210, "children": [213, 214], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 28}}, {"id": 213, "type": "identifier", "text": "initIdleTaskState", "parent": 212, "children": [], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 22}}, {"id": 214, "type": "parameter_list", "text": "(void)", "parent": 212, "children": [215], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 28}}, {"id": 215, "type": "parameter_declaration", "text": "void", "parent": 214, "children": [216], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 27}}, {"id": 216, "type": "primitive_type", "text": "void", "parent": 215, "children": [], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 27}}, {"id": 217, "type": "declaration", "text": "int64_t createPrivilegeTask(void (*func)());", "parent": 0, "children": [218, 219], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 44}}, {"id": 218, "type": "primitive_type", "text": "int64_t", "parent": 217, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 7}}, {"id": 219, "type": "function_declarator", "text": "createPrivilegeTask(void (*func)())", "parent": 217, "children": [220, 221], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 43}}, {"id": 220, "type": "identifier", "text": "createPrivilegeTask", "parent": 219, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 27}}, {"id": 221, "type": "parameter_list", "text": "(void (*func)())", "parent": 219, "children": [222], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 43}}, {"id": 222, "type": "parameter_declaration", "text": "void (*func)()", "parent": 221, "children": [223, 224], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 42}}, {"id": 223, "type": "primitive_type", "text": "void", "parent": 222, "children": [], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 32}}, {"id": 224, "type": "function_declarator", "text": "(*func)()", "parent": 222, "children": [225, 229], "start_point": {"row": 67, "column": 33}, "end_point": {"row": 67, "column": 42}}, {"id": 225, "type": "parenthesized_declarator", "text": "(*func)", "parent": 224, "children": [226], "start_point": {"row": 67, "column": 33}, "end_point": {"row": 67, "column": 40}}, {"id": 226, "type": "pointer_declarator", "text": "*func", "parent": 225, "children": [227, 228], "start_point": {"row": 67, "column": 34}, "end_point": {"row": 67, "column": 39}}, {"id": 227, "type": "*", "text": "*", "parent": 226, "children": [], "start_point": {"row": 67, "column": 34}, "end_point": {"row": 67, "column": 35}}, {"id": 228, "type": "identifier", "text": "func", "parent": 226, "children": [], "start_point": {"row": 67, "column": 35}, "end_point": {"row": 67, "column": 39}}, {"id": 229, "type": "parameter_list", "text": "()", "parent": 224, "children": [], "start_point": {"row": 67, "column": 40}, "end_point": {"row": 67, "column": 42}}, {"id": 230, "type": "declaration", "text": "void doExec(void (*func)());", "parent": 0, "children": [231, 232], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 28}}, {"id": 231, "type": "primitive_type", "text": "void", "parent": 230, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 4}}, {"id": 232, "type": "function_declarator", "text": "doExec(void (*func)())", "parent": 230, "children": [233, 234], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 27}}, {"id": 233, "type": "identifier", "text": "doExec", "parent": 232, "children": [], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 11}}, {"id": 234, "type": "parameter_list", "text": "(void (*func)())", "parent": 232, "children": [235], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 27}}, {"id": 235, "type": "parameter_declaration", "text": "void (*func)()", "parent": 234, "children": [236, 237], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 26}}, {"id": 236, "type": "primitive_type", "text": "void", "parent": 235, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 16}}, {"id": 237, "type": "function_declarator", "text": "(*func)()", "parent": 235, "children": [238, 242], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 26}}, {"id": 238, "type": "parenthesized_declarator", "text": "(*func)", "parent": 237, "children": [239], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 24}}, {"id": 239, "type": "pointer_declarator", "text": "*func", "parent": 238, "children": [240, 241], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 23}}, {"id": 240, "type": "*", "text": "*", "parent": 239, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 19}}, {"id": 241, "type": "identifier", "text": "func", "parent": 239, "children": [], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 23}}, {"id": 242, "type": "parameter_list", "text": "()", "parent": 237, "children": [], "start_point": {"row": 68, "column": 24}, "end_point": {"row": 68, "column": 26}}, {"id": 243, "type": "declaration", "text": "void checkRescheduleFlag(void);", "parent": 0, "children": [244, 245], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 31}}, {"id": 244, "type": "primitive_type", "text": "void", "parent": 243, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 4}}, {"id": 245, "type": "function_declarator", "text": "checkRescheduleFlag(void)", "parent": 243, "children": [246, 247], "start_point": {"row": 69, "column": 5}, "end_point": {"row": 69, "column": 30}}, {"id": 246, "type": "identifier", "text": "checkRescheduleFlag", "parent": 245, "children": [], "start_point": {"row": 69, "column": 5}, "end_point": {"row": 69, "column": 24}}, {"id": 247, "type": "parameter_list", "text": "(void)", "parent": 245, "children": [248], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 30}}, {"id": 248, "type": "parameter_declaration", "text": "void", "parent": 247, "children": [249], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 29}}, {"id": 249, "type": "primitive_type", "text": "void", "parent": 248, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 29}}, {"id": 250, "type": "declaration", "text": "void doFork(uint64_t *trapframe);", "parent": 0, "children": [251, 252], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 33}}, {"id": 251, "type": "primitive_type", "text": "void", "parent": 250, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 4}}, {"id": 252, "type": "function_declarator", "text": "doFork(uint64_t *trapframe)", "parent": 250, "children": [253, 254], "start_point": {"row": 71, "column": 5}, "end_point": {"row": 71, "column": 32}}, {"id": 253, "type": "identifier", "text": "doFork", "parent": 252, "children": [], "start_point": {"row": 71, "column": 5}, "end_point": {"row": 71, "column": 11}}, {"id": 254, "type": "parameter_list", "text": "(uint64_t *trapframe)", "parent": 252, "children": [255], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 32}}, {"id": 255, "type": "parameter_declaration", "text": "uint64_t *trapframe", "parent": 254, "children": [256, 257], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 31}}, {"id": 256, "type": "primitive_type", "text": "uint64_t", "parent": 255, "children": [], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 20}}, {"id": 257, "type": "pointer_declarator", "text": "*trapframe", "parent": 255, "children": [258, 259], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 31}}, {"id": 258, "type": "*", "text": "*", "parent": 257, "children": [], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 22}}, {"id": 259, "type": "identifier", "text": "trapframe", "parent": 257, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 31}}, {"id": 260, "type": "declaration", "text": "void doExit(int status);", "parent": 0, "children": [261, 262], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 24}}, {"id": 261, "type": "primitive_type", "text": "void", "parent": 260, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 4}}, {"id": 262, "type": "function_declarator", "text": "doExit(int status)", "parent": 260, "children": [263, 264], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 23}}, {"id": 263, "type": "identifier", "text": "doExit", "parent": 262, "children": [], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 11}}, {"id": 264, "type": "parameter_list", "text": "(int status)", "parent": 262, "children": [265], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 23}}, {"id": 265, "type": "parameter_declaration", "text": "int status", "parent": 264, "children": [266, 267], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 22}}, {"id": 266, "type": "primitive_type", "text": "int", "parent": 265, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 15}}, {"id": 267, "type": "identifier", "text": "status", "parent": 265, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 22}}, {"id": 268, "type": "declaration", "text": "void fooTask(void);", "parent": 0, "children": [269, 270], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 19}}, {"id": 269, "type": "primitive_type", "text": "void", "parent": 268, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 4}}, {"id": 270, "type": "function_declarator", "text": "fooTask(void)", "parent": 268, "children": [271, 272], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 18}}, {"id": 271, "type": "identifier", "text": "fooTask", "parent": 270, "children": [], "start_point": {"row": 75, "column": 5}, "end_point": {"row": 75, "column": 12}}, {"id": 272, "type": "parameter_list", "text": "(void)", "parent": 270, "children": [273], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 18}}, {"id": 273, "type": "parameter_declaration", "text": "void", "parent": 272, "children": [274], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 17}}, {"id": 274, "type": "primitive_type", "text": "void", "parent": 273, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 17}}, {"id": 275, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 6}}]}, "node_categories": {"declarations": {"functions": [205, 212, 219, 224, 232, 237, 245, 252, 262, 270], "variables": [19, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 64, 69, 72, 75, 78, 81, 85, 90, 93, 96, 110, 115, 118, 123, 126, 129, 134, 138, 145, 161, 175, 191, 203, 208, 210, 215, 217, 222, 230, 235, 243, 248, 250, 255, 260, 265, 268, 273], "classes": [21, 22, 66, 67, 87, 88, 112, 113, 139, 153, 169, 183, 199], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": [100, 101, 103, 104, 106, 108, 130, 131]}, "statements": {"expressions": [149, 165, 179, 195], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 17, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 63, 68, 71, 74, 77, 80, 83, 84, 89, 91, 92, 95, 98, 99, 102, 105, 107, 109, 114, 116, 117, 119, 122, 125, 128, 132, 133, 136, 137, 141, 143, 144, 146, 150, 158, 159, 162, 166, 171, 173, 174, 176, 180, 188, 189, 192, 196, 201, 202, 206, 213, 220, 228, 233, 241, 246, 253, 259, 263, 267, 271, 275], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 152, 160, 168, 182, 190, 198], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 205, "universal_type": "function", "name": "unknown", "text_snippet": "idle(void)"}, {"node_id": 212, "universal_type": "function", "name": "unknown", "text_snippet": "initIdleTaskState(void)"}, {"node_id": 219, "universal_type": "function", "name": "unknown", "text_snippet": "createPrivilegeTask(void (*func)())"}, {"node_id": 224, "universal_type": "function", "name": "unknown", "text_snippet": "(*func)()"}, {"node_id": 232, "universal_type": "function", "name": "unknown", "text_snippet": "doExec(void (*func)())"}, {"node_id": 237, "universal_type": "function", "name": "unknown", "text_snippet": "(*func)()"}, {"node_id": 245, "universal_type": "function", "name": "unknown", "text_snippet": "checkRescheduleFlag(void)"}, {"node_id": 252, "universal_type": "function", "name": "unknown", "text_snippet": "doFork(uint64_t *trapframe)"}, {"node_id": 262, "universal_type": "function", "name": "unknown", "text_snippet": "doExit(int status)"}, {"node_id": 270, "universal_type": "function", "name": "unknown", "text_snippet": "fooTask(void)"}], "class_declarations": [{"node_id": 21, "universal_type": "class", "name": "__KernelContext", "text_snippet": "struct __KernelContext {\n uint64_t x19;\n uint64_t x20;\n uint64_t x21;\n uint64_t x22;\n "}, {"node_id": 22, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 66, "universal_type": "class", "name": "__UserContext", "text_snippet": "struct __UserContext {\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n uint64_t elr_el1;\n "}, {"node_id": 67, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 87, "universal_type": "class", "name": "__UserTaskStruct", "text_snippet": "struct __UserTaskStruct {\n UserContext user_context;\n uint32_t id;\n uint32_t regain_resourc"}, {"node_id": 88, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 112, "universal_type": "class", "name": "__TaskStruct", "text_snippet": "struct __TaskStruct {\n KernelContext kernel_context;\n UserTaskStruct *user_task;\n uint32_t "}, {"node_id": 113, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 139, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 153, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 169, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 183, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 199, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 6, "text": "#include \"queue/queue.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdbool.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <stdint.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#ifndef __SCHEDULE_TASK_H\n#define __SCHEDULE_TASK_H\n\n#include \"queue/queue.h\"\n\n#include <stdbool.h>\n#include <stdint.h>\n\n#define MAX_TASK_NUM 64\n\ntypedef struct __KernelContext {\n uint64_t x19;\n uint64_t x20;\n uint64_t x21;\n uint64_t x22;\n uint64_t x23;\n uint64_t x24;\n uint64_t x25;\n uint64_t x26;\n uint64_t x27;\n uint64_t x28;\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n} KernelContext;\n\ntypedef struct __UserContext {\n uint64_t fp;\n uint64_t lr;\n\n uint64_t sp;\n uint64_t elr_el1;\n uint64_t spsr_el1;\n} UserContext;\n\ntypedef struct __UserTaskStruct {\n UserContext user_context;\n uint32_t id;\n uint32_t regain_resource_flag;\n} UserTaskStruct;\n\nenum Status {\n kUnUse,\n kInUse,\n kZombie\n};\n\ntypedef struct __TaskStruct {\n KernelContext kernel_context;\n UserTaskStruct *user_task;\n uint32_t id;\n uint32_t counter;\n enum Status status;\n uint32_t reschedule_flag;\n} TaskStruct;\n\nextern TaskStruct ktask_pool[MAX_TASK_NUM] __attribute__((aligned(16u)));\nextern uint8_t kstack_pool[MAX_TASK_NUM][4096] __attribute__((aligned(16u)));\n\nextern UserTaskStruct utask_pool[MAX_TASK_NUM] __attribute__((aligned(16u)));\nextern uint8_t ustack_pool[MAX_TASK_NUM][4096] __attribute__((aligned(16u)));\n\nextern Queue running_queue;\n\nvoid idle(void);\nvoid initIdleTaskState(void);\nint64_t createPrivilegeTask(void (*func)());\nvoid doExec(void (*func)());\nvoid checkRescheduleFlag(void);\n\nvoid doFork(uint64_t *trapframe);\nvoid doExit(int status);\n\n// for testing scheduler\nvoid fooTask(void);\n\n#endif\n"}
80,954
c
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QWidget> #include <memory> #include "hexgrid/gridsearchevent.h" #include "utils/channel.h" class QTimer; class GraphicsWidget; class GridPainter; class HexGrid; class GridSearcher; namespace Ui { class MainWindow; } class MainWindow : public QWidget { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); private: void on_searchTimer_timeout(void); void mousePressEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); void mouseDoubleClickEvent(QMouseEvent *event); void keyPressEvent(QKeyEvent *event); void keyReleaseEvent(QKeyEvent *event); void wheelEvent(QWheelEvent *event); void startSearch(void); void togglePauseSearch(void); void cancelSearch(void); std::unique_ptr<Ui::MainWindow> ui; GraphicsWidget *graphicsWidget; HexGrid *grid; QTimer *searchTimer; std::unique_ptr<GridPainter> painter; std::unique_ptr<GridSearcher> searcher; std::shared_ptr<Channel<GridSearchEvent>> searchChannel; bool leftMouseButton; }; #endif // MAINWINDOW_H
24.63
43
(translation_unit) "#ifndef MAINWINDOW_H\n#define MAINWINDOW_H\n\n#include <QWidget>\n\n#include <memory>\n\n#include "hexgrid/gridsearchevent.h"\n#include "utils/channel.h"\n\nclass QTimer;\n\nclass GraphicsWidget;\nclass GridPainter;\nclass HexGrid;\nclass GridSearcher;\n\nnamespace Ui {\n class MainWindow;\n}\n\nclass MainWindow : public QWidget\n{\n Q_OBJECT\n\npublic:\n explicit MainWindow(QWidget *parent = 0);\n ~MainWindow();\n\nprivate:\n void on_searchTimer_timeout(void);\n\n void mousePressEvent(QMouseEvent *event);\n void mouseReleaseEvent(QMouseEvent *event);\n void mouseMoveEvent(QMouseEvent *event);\n void mouseDoubleClickEvent(QMouseEvent *event);\n\n void keyPressEvent(QKeyEvent *event);\n void keyReleaseEvent(QKeyEvent *event);\n\n void wheelEvent(QWheelEvent *event);\n\n void startSearch(void);\n void togglePauseSearch(void);\n void cancelSearch(void);\n\n\n std::unique_ptr<Ui::MainWindow> ui;\n\n GraphicsWidget *graphicsWidget;\n HexGrid *grid;\n\n QTimer *searchTimer;\n\n std::unique_ptr<GridPainter> painter;\n std::unique_ptr<GridSearcher> searcher;\n std::shared_ptr<Channel<GridSearchEvent>> searchChannel;\n\n bool leftMouseButton;\n};\n\n#endif // MAINWINDOW_H\n" (preproc_ifdef) "#ifndef MAINWINDOW_H\n#define MAINWINDOW_H\n\n#include <QWidget>\n\n#include <memory>\n\n#include "hexgrid/gridsearchevent.h"\n#include "utils/channel.h"\n\nclass QTimer;\n\nclass GraphicsWidget;\nclass GridPainter;\nclass HexGrid;\nclass GridSearcher;\n\nnamespace Ui {\n class MainWindow;\n}\n\nclass MainWindow : public QWidget\n{\n Q_OBJECT\n\npublic:\n explicit MainWindow(QWidget *parent = 0);\n ~MainWindow();\n\nprivate:\n void on_searchTimer_timeout(void);\n\n void mousePressEvent(QMouseEvent *event);\n void mouseReleaseEvent(QMouseEvent *event);\n void mouseMoveEvent(QMouseEvent *event);\n void mouseDoubleClickEvent(QMouseEvent *event);\n\n void keyPressEvent(QKeyEvent *event);\n void keyReleaseEvent(QKeyEvent *event);\n\n void wheelEvent(QWheelEvent *event);\n\n void startSearch(void);\n void togglePauseSearch(void);\n void cancelSearch(void);\n\n\n std::unique_ptr<Ui::MainWindow> ui;\n\n GraphicsWidget *graphicsWidget;\n HexGrid *grid;\n\n QTimer *searchTimer;\n\n std::unique_ptr<GridPainter> painter;\n std::unique_ptr<GridSearcher> searcher;\n std::shared_ptr<Channel<GridSearchEvent>> searchChannel;\n\n bool leftMouseButton;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "MAINWINDOW_H" (preproc_def) "#define MAINWINDOW_H\n" (#define) "#define" (identifier) "MAINWINDOW_H" (preproc_include) "#include <QWidget>\n" (#include) "#include" (system_lib_string) "<QWidget>" (preproc_include) "#include <memory>\n" (#include) "#include" (system_lib_string) "<memory>" (preproc_include) "#include "hexgrid/gridsearchevent.h"\n" (#include) "#include" (string_literal) ""hexgrid/gridsearchevent.h"" (") """ (string_content) "hexgrid/gridsearchevent.h" (") """ (preproc_include) "#include "utils/channel.h"\n" (#include) "#include" (string_literal) ""utils/channel.h"" (") """ (string_content) "utils/channel.h" (") """ (declaration) "class QTimer;" (type_identifier) "class" (identifier) "QTimer" (;) ";" (declaration) "class GraphicsWidget;" (type_identifier) "class" (identifier) "GraphicsWidget" (;) ";" (declaration) "class GridPainter;" (type_identifier) "class" (identifier) "GridPainter" (;) ";" (declaration) "class HexGrid;" (type_identifier) "class" (identifier) "HexGrid" (;) ";" (declaration) "class GridSearcher;" (type_identifier) "class" (identifier) "GridSearcher" (;) ";" (function_definition) "namespace Ui {\n class MainWindow;\n}" (type_identifier) "namespace" (identifier) "Ui" (compound_statement) "{\n class MainWindow;\n}" ({) "{" (declaration) "class MainWindow;" (type_identifier) "class" (identifier) "MainWindow" (;) ";" (}) "}" (function_definition) "class MainWindow : public QWidget\n{\n Q_OBJECT\n\npublic:\n explicit MainWindow(QWidget *parent = 0);\n ~MainWindow();\n\nprivate:\n void on_searchTimer_timeout(void);\n\n void mousePressEvent(QMouseEvent *event);\n void mouseReleaseEvent(QMouseEvent *event);\n void mouseMoveEvent(QMouseEvent *event);\n void mouseDoubleClickEvent(QMouseEvent *event);\n\n void keyPressEvent(QKeyEvent *event);\n void keyReleaseEvent(QKeyEvent *event);\n\n void wheelEvent(QWheelEvent *event);\n\n void startSearch(void);\n void togglePauseSearch(void);\n void cancelSearch(void);\n\n\n std::unique_ptr<Ui::MainWindow> ui;\n\n GraphicsWidget *graphicsWidget;\n HexGrid *grid;\n\n QTimer *searchTimer;\n\n std::unique_ptr<GridPainter> painter;\n std::unique_ptr<GridSearcher> searcher;\n std::shared_ptr<Channel<GridSearchEvent>> searchChannel;\n\n bool leftMouseButton;\n}" (type_identifier) "class" (identifier) "MainWindow" (ERROR) ": public QWidget" (:) ":" (identifier) "public" (identifier) "QWidget" (compound_statement) "{\n Q_OBJECT\n\npublic:\n explicit MainWindow(QWidget *parent = 0);\n ~MainWindow();\n\nprivate:\n void on_searchTimer_timeout(void);\n\n void mousePressEvent(QMouseEvent *event);\n void mouseReleaseEvent(QMouseEvent *event);\n void mouseMoveEvent(QMouseEvent *event);\n void mouseDoubleClickEvent(QMouseEvent *event);\n\n void keyPressEvent(QKeyEvent *event);\n void keyReleaseEvent(QKeyEvent *event);\n\n void wheelEvent(QWheelEvent *event);\n\n void startSearch(void);\n void togglePauseSearch(void);\n void cancelSearch(void);\n\n\n std::unique_ptr<Ui::MainWindow> ui;\n\n GraphicsWidget *graphicsWidget;\n HexGrid *grid;\n\n QTimer *searchTimer;\n\n std::unique_ptr<GridPainter> painter;\n std::unique_ptr<GridSearcher> searcher;\n std::shared_ptr<Channel<GridSearchEvent>> searchChannel;\n\n bool leftMouseButton;\n}" ({) "{" (declaration) "Q_OBJECT\n\npublic:\n explicit MainWindow(QWidget *parent = 0);" (type_identifier) "Q_OBJECT" (ERROR) "public:\n explicit" (identifier) "public" (:) ":" (identifier) "explicit" (init_declarator) "MainWindow(QWidget *parent = 0" (function_declarator) "MainWindow(QWidget *parent" (identifier) "MainWindow" (parameter_list) "(QWidget *parent" (() "(" (parameter_declaration) "QWidget *parent" (type_identifier) "QWidget" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" ()) "" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (expression_statement) "~MainWindow();" (unary_expression) "~MainWindow()" (~) "~" (call_expression) "MainWindow()" (identifier) "MainWindow" (argument_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n void on_searchTimer_timeout(void);" (statement_identifier) "private" (:) ":" (declaration) "void on_searchTimer_timeout(void);" (primitive_type) "void" (function_declarator) "on_searchTimer_timeout(void)" (identifier) "on_searchTimer_timeout" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void mousePressEvent(QMouseEvent *event);" (primitive_type) "void" (function_declarator) "mousePressEvent(QMouseEvent *event)" (identifier) "mousePressEvent" (parameter_list) "(QMouseEvent *event)" (() "(" (parameter_declaration) "QMouseEvent *event" (type_identifier) "QMouseEvent" (pointer_declarator) "*event" (*) "*" (identifier) "event" ()) ")" (;) ";" (declaration) "void mouseReleaseEvent(QMouseEvent *event);" (primitive_type) "void" (function_declarator) "mouseReleaseEvent(QMouseEvent *event)" (identifier) "mouseReleaseEvent" (parameter_list) "(QMouseEvent *event)" (() "(" (parameter_declaration) "QMouseEvent *event" (type_identifier) "QMouseEvent" (pointer_declarator) "*event" (*) "*" (identifier) "event" ()) ")" (;) ";" (declaration) "void mouseMoveEvent(QMouseEvent *event);" (primitive_type) "void" (function_declarator) "mouseMoveEvent(QMouseEvent *event)" (identifier) "mouseMoveEvent" (parameter_list) "(QMouseEvent *event)" (() "(" (parameter_declaration) "QMouseEvent *event" (type_identifier) "QMouseEvent" (pointer_declarator) "*event" (*) "*" (identifier) "event" ()) ")" (;) ";" (declaration) "void mouseDoubleClickEvent(QMouseEvent *event);" (primitive_type) "void" (function_declarator) "mouseDoubleClickEvent(QMouseEvent *event)" (identifier) "mouseDoubleClickEvent" (parameter_list) "(QMouseEvent *event)" (() "(" (parameter_declaration) "QMouseEvent *event" (type_identifier) "QMouseEvent" (pointer_declarator) "*event" (*) "*" (identifier) "event" ()) ")" (;) ";" (declaration) "void keyPressEvent(QKeyEvent *event);" (primitive_type) "void" (function_declarator) "keyPressEvent(QKeyEvent *event)" (identifier) "keyPressEvent" (parameter_list) "(QKeyEvent *event)" (() "(" (parameter_declaration) "QKeyEvent *event" (type_identifier) "QKeyEvent" (pointer_declarator) "*event" (*) "*" (identifier) "event" ()) ")" (;) ";" (declaration) "void keyReleaseEvent(QKeyEvent *event);" (primitive_type) "void" (function_declarator) "keyReleaseEvent(QKeyEvent *event)" (identifier) "keyReleaseEvent" (parameter_list) "(QKeyEvent *event)" (() "(" (parameter_declaration) "QKeyEvent *event" (type_identifier) "QKeyEvent" (pointer_declarator) "*event" (*) "*" (identifier) "event" ()) ")" (;) ";" (declaration) "void wheelEvent(QWheelEvent *event);" (primitive_type) "void" (function_declarator) "wheelEvent(QWheelEvent *event)" (identifier) "wheelEvent" (parameter_list) "(QWheelEvent *event)" (() "(" (parameter_declaration) "QWheelEvent *event" (type_identifier) "QWheelEvent" (pointer_declarator) "*event" (*) "*" (identifier) "event" ()) ")" (;) ";" (declaration) "void startSearch(void);" (primitive_type) "void" (function_declarator) "startSearch(void)" (identifier) "startSearch" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void togglePauseSearch(void);" (primitive_type) "void" (function_declarator) "togglePauseSearch(void)" (identifier) "togglePauseSearch" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void cancelSearch(void);" (primitive_type) "void" (function_declarator) "cancelSearch(void)" (identifier) "cancelSearch" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (labeled_statement) "std::unique_ptr<Ui::MainWindow> ui;" (statement_identifier) "std" (ERROR) "::unique_ptr<Ui:" (:) ":" (:) ":" (binary_expression) "unique_ptr<Ui" (identifier) "unique_ptr" (<) "<" (identifier) "Ui" (:) ":" (:) ":" (expression_statement) "MainWindow> ui;" (binary_expression) "MainWindow> ui" (identifier) "MainWindow" (>) ">" (identifier) "ui" (;) ";" (declaration) "GraphicsWidget *graphicsWidget;" (type_identifier) "GraphicsWidget" (pointer_declarator) "*graphicsWidget" (*) "*" (identifier) "graphicsWidget" (;) ";" (declaration) "HexGrid *grid;" (type_identifier) "HexGrid" (pointer_declarator) "*grid" (*) "*" (identifier) "grid" (;) ";" (declaration) "QTimer *searchTimer;" (type_identifier) "QTimer" (pointer_declarator) "*searchTimer" (*) "*" (identifier) "searchTimer" (;) ";" (labeled_statement) "std::unique_ptr<GridPainter> painter;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "unique_ptr<GridPainter> painter;" (binary_expression) "unique_ptr<GridPainter> painter" (binary_expression) "unique_ptr<GridPainter" (identifier) "unique_ptr" (<) "<" (identifier) "GridPainter" (>) ">" (identifier) "painter" (;) ";" (labeled_statement) "std::unique_ptr<GridSearcher> searcher;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "unique_ptr<GridSearcher> searcher;" (binary_expression) "unique_ptr<GridSearcher> searcher" (binary_expression) "unique_ptr<GridSearcher" (identifier) "unique_ptr" (<) "<" (identifier) "GridSearcher" (>) ">" (identifier) "searcher" (;) ";" (labeled_statement) "std::shared_ptr<Channel<GridSearchEvent>> searchChannel;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "shared_ptr<Channel<GridSearchEvent>> searchChannel;" (binary_expression) "shared_ptr<Channel<GridSearchEvent>> searchChannel" (binary_expression) "shared_ptr<Channel" (identifier) "shared_ptr" (<) "<" (identifier) "Channel" (<) "<" (binary_expression) "GridSearchEvent>> searchChannel" (identifier) "GridSearchEvent" (>>) ">>" (identifier) "searchChannel" (;) ";" (declaration) "bool leftMouseButton;" (primitive_type) "bool" (identifier) "leftMouseButton" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// MAINWINDOW_H"
318
7
{"language": "c", "success": true, "metadata": {"lines": 43, "avg_line_length": 24.63, "nodes": 216, "errors": 0, "source_hash": "308cf30e61a66456b715f83d128140f4ca849024506e811dbdfcbb7d07058978", "categorized_nodes": 143}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef MAINWINDOW_H\n#define MAINWINDOW_H\n\n#include <QWidget>\n\n#include <memory>\n\n#include \"hexgrid/gridsearchevent.h\"\n#include \"utils/channel.h\"\n\nclass QTimer;\n\nclass GraphicsWidget;\nclass GridPainter;\nclass HexGrid;\nclass GridSearcher;\n\nnamespace Ui {\n\tclass MainWindow;\n}\n\nclass MainWindow : public QWidget\n{\n\tQ_OBJECT\n\npublic:\n\texplicit MainWindow(QWidget *parent = 0);\n\t~MainWindow();\n\nprivate:\n\tvoid on_searchTimer_timeout(void);\n\n\tvoid mousePressEvent(QMouseEvent *event);\n\tvoid mouseReleaseEvent(QMouseEvent *event);\n\tvoid mouseMoveEvent(QMouseEvent *event);\n\tvoid mouseDoubleClickEvent(QMouseEvent *event);\n\n\tvoid keyPressEvent(QKeyEvent *event);\n\tvoid keyReleaseEvent(QKeyEvent *event);\n\n\tvoid wheelEvent(QWheelEvent *event);\n\n\tvoid startSearch(void);\n\tvoid togglePauseSearch(void);\n\tvoid cancelSearch(void);\n\n\n\tstd::unique_ptr<Ui::MainWindow> ui;\n\n\tGraphicsWidget *graphicsWidget;\n\tHexGrid *grid;\n\n\tQTimer *searchTimer;\n\n\tstd::unique_ptr<GridPainter> painter;\n\tstd::unique_ptr<GridSearcher> searcher;\n\tstd::shared_ptr<Channel<GridSearchEvent>> searchChannel;\n\n\tbool leftMouseButton;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 20, 22, 24, 26, 28, 33, 215], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 61, "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": "MAINWINDOW_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "preproc_def", "text": "#define MAINWINDOW_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": "MAINWINDOW_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include <QWidget>\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": "<QWidget>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <memory>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<memory>", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include \"hexgrid/gridsearchevent.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"hexgrid/gridsearchevent.h\"", "parent": 12, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 36}}, {"id": 15, "type": "preproc_include", "text": "#include \"utils/channel.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"utils/channel.h\"", "parent": 15, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 26}}, {"id": 18, "type": "declaration", "text": "class QTimer;", "parent": 0, "children": [19], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 13}}, {"id": 19, "type": "identifier", "text": "QTimer", "parent": 18, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 12}}, {"id": 20, "type": "declaration", "text": "class GraphicsWidget;", "parent": 0, "children": [21], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 21}}, {"id": 21, "type": "identifier", "text": "GraphicsWidget", "parent": 20, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 20}}, {"id": 22, "type": "declaration", "text": "class GridPainter;", "parent": 0, "children": [23], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 18}}, {"id": 23, "type": "identifier", "text": "GridPainter", "parent": 22, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 17}}, {"id": 24, "type": "declaration", "text": "class HexGrid;", "parent": 0, "children": [25], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 14}}, {"id": 25, "type": "identifier", "text": "HexGrid", "parent": 24, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 13}}, {"id": 26, "type": "declaration", "text": "class GridSearcher;", "parent": 0, "children": [27], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 19}}, {"id": 27, "type": "identifier", "text": "GridSearcher", "parent": 26, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 18}}, {"id": 28, "type": "function_definition", "text": "namespace Ui {\n\tclass MainWindow;\n}", "parent": 0, "children": [29, 30], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 29, "type": "type_identifier", "text": "namespace", "parent": 28, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 9}}, {"id": 30, "type": "identifier", "text": "Ui", "parent": 28, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 12}}, {"id": 31, "type": "declaration", "text": "class MainWindow;", "parent": 28, "children": [32], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 18}}, {"id": 32, "type": "identifier", "text": "MainWindow", "parent": 31, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 17}}, {"id": 33, "type": "function_definition", "text": "class MainWindow : public QWidget\n{\n\tQ_OBJECT\n\npublic:\n\texplicit MainWindow(QWidget *parent = 0);\n\t~MainWindow();\n\nprivate:\n\tvoid on_searchTimer_timeout(void);\n\n\tvoid mousePressEvent(QMouseEvent *event);\n\tvoid mouseReleaseEvent(QMouseEvent *event);\n\tvoid mouseMoveEvent(QMouseEvent *event);\n\tvoid mouseDoubleClickEvent(QMouseEvent *event);\n\n\tvoid keyPressEvent(QKeyEvent *event);\n\tvoid keyReleaseEvent(QKeyEvent *event);\n\n\tvoid wheelEvent(QWheelEvent *event);\n\n\tvoid startSearch(void);\n\tvoid togglePauseSearch(void);\n\tvoid cancelSearch(void);\n\n\n\tstd::unique_ptr<Ui::MainWindow> ui;\n\n\tGraphicsWidget *graphicsWidget;\n\tHexGrid *grid;\n\n\tQTimer *searchTimer;\n\n\tstd::unique_ptr<GridPainter> painter;\n\tstd::unique_ptr<GridSearcher> searcher;\n\tstd::shared_ptr<Channel<GridSearchEvent>> searchChannel;\n\n\tbool leftMouseButton;\n}", "parent": 0, "children": [34, 35], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 34, "type": "identifier", "text": "MainWindow", "parent": 33, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 16}}, {"id": 35, "type": "ERROR", "text": ": public QWidget", "parent": 33, "children": [36], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 33}}, {"id": 36, "type": "identifier", "text": "QWidget", "parent": 35, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 33}}, {"id": 37, "type": "declaration", "text": "Q_OBJECT\n\npublic:\n\texplicit MainWindow(QWidget *parent = 0);", "parent": 33, "children": [38, 39, 41], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 26, "column": 42}}, {"id": 38, "type": "type_identifier", "text": "Q_OBJECT", "parent": 37, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 39, "type": "ERROR", "text": "public:\n\texplicit", "parent": 37, "children": [40], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 9}}, {"id": 40, "type": "identifier", "text": "explicit", "parent": 39, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 9}}, {"id": 41, "type": "init_declarator", "text": "MainWindow(QWidget *parent = 0", "parent": 37, "children": [42, 50, 51], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 40}}, {"id": 42, "type": "function_declarator", "text": "MainWindow(QWidget *parent", "parent": 41, "children": [43, 44], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 36}}, {"id": 43, "type": "identifier", "text": "MainWindow", "parent": 42, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 20}}, {"id": 44, "type": "parameter_list", "text": "(QWidget *parent", "parent": 42, "children": [45], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 36}}, {"id": 45, "type": "parameter_declaration", "text": "QWidget *parent", "parent": 44, "children": [46, 47], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 36}}, {"id": 46, "type": "type_identifier", "text": "QWidget", "parent": 45, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 28}}, {"id": 47, "type": "pointer_declarator", "text": "*parent", "parent": 45, "children": [48, 49], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 36}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 30}}, {"id": 49, "type": "identifier", "text": "parent", "parent": 47, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 36}}, {"id": 50, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 26, "column": 37}, "end_point": {"row": 26, "column": 38}}, {"id": 51, "type": "number_literal", "text": "0", "parent": 41, "children": [], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 40}}, {"id": 52, "type": "unary_expression", "text": "~MainWindow()", "parent": 33, "children": [53, 54], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 14}}, {"id": 53, "type": "~", "text": "~", "parent": 52, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 2}}, {"id": 54, "type": "call_expression", "text": "MainWindow()", "parent": 52, "children": [55, 56], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 14}}, {"id": 55, "type": "identifier", "text": "MainWindow", "parent": 54, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 12}}, {"id": 56, "type": "argument_list", "text": "()", "parent": 54, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 14}}, {"id": 57, "type": "labeled_statement", "text": "private:\n\tvoid on_searchTimer_timeout(void);", "parent": 33, "children": [58], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 35}}, {"id": 58, "type": "declaration", "text": "void on_searchTimer_timeout(void);", "parent": 57, "children": [59, 60], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 35}}, {"id": 59, "type": "primitive_type", "text": "void", "parent": 58, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 5}}, {"id": 60, "type": "function_declarator", "text": "on_searchTimer_timeout(void)", "parent": 58, "children": [61, 62], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 34}}, {"id": 61, "type": "identifier", "text": "on_searchTimer_timeout", "parent": 60, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 28}}, {"id": 62, "type": "parameter_list", "text": "(void)", "parent": 60, "children": [63], "start_point": {"row": 30, "column": 28}, "end_point": {"row": 30, "column": 34}}, {"id": 63, "type": "parameter_declaration", "text": "void", "parent": 62, "children": [64], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 33}}, {"id": 64, "type": "primitive_type", "text": "void", "parent": 63, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 33}}, {"id": 65, "type": "declaration", "text": "void mousePressEvent(QMouseEvent *event);", "parent": 33, "children": [66, 67], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 42}}, {"id": 66, "type": "primitive_type", "text": "void", "parent": 65, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 5}}, {"id": 67, "type": "function_declarator", "text": "mousePressEvent(QMouseEvent *event)", "parent": 65, "children": [68, 69], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 41}}, {"id": 68, "type": "identifier", "text": "mousePressEvent", "parent": 67, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 21}}, {"id": 69, "type": "parameter_list", "text": "(QMouseEvent *event)", "parent": 67, "children": [70], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 41}}, {"id": 70, "type": "parameter_declaration", "text": "QMouseEvent *event", "parent": 69, "children": [71, 72], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 40}}, {"id": 71, "type": "type_identifier", "text": "QMouseEvent", "parent": 70, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 33}}, {"id": 72, "type": "pointer_declarator", "text": "*event", "parent": 70, "children": [73, 74], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 40}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 35}}, {"id": 74, "type": "identifier", "text": "event", "parent": 72, "children": [], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 40}}, {"id": 75, "type": "declaration", "text": "void mouseReleaseEvent(QMouseEvent *event);", "parent": 33, "children": [76, 77], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 44}}, {"id": 76, "type": "primitive_type", "text": "void", "parent": 75, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 5}}, {"id": 77, "type": "function_declarator", "text": "mouseReleaseEvent(QMouseEvent *event)", "parent": 75, "children": [78, 79], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 43}}, {"id": 78, "type": "identifier", "text": "mouseReleaseEvent", "parent": 77, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 23}}, {"id": 79, "type": "parameter_list", "text": "(QMouseEvent *event)", "parent": 77, "children": [80], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 43}}, {"id": 80, "type": "parameter_declaration", "text": "QMouseEvent *event", "parent": 79, "children": [81, 82], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 42}}, {"id": 81, "type": "type_identifier", "text": "QMouseEvent", "parent": 80, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 35}}, {"id": 82, "type": "pointer_declarator", "text": "*event", "parent": 80, "children": [83, 84], "start_point": {"row": 33, "column": 36}, "end_point": {"row": 33, "column": 42}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 33, "column": 36}, "end_point": {"row": 33, "column": 37}}, {"id": 84, "type": "identifier", "text": "event", "parent": 82, "children": [], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 42}}, {"id": 85, "type": "declaration", "text": "void mouseMoveEvent(QMouseEvent *event);", "parent": 33, "children": [86, 87], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 41}}, {"id": 86, "type": "primitive_type", "text": "void", "parent": 85, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 5}}, {"id": 87, "type": "function_declarator", "text": "mouseMoveEvent(QMouseEvent *event)", "parent": 85, "children": [88, 89], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 40}}, {"id": 88, "type": "identifier", "text": "mouseMoveEvent", "parent": 87, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 20}}, {"id": 89, "type": "parameter_list", "text": "(QMouseEvent *event)", "parent": 87, "children": [90], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 40}}, {"id": 90, "type": "parameter_declaration", "text": "QMouseEvent *event", "parent": 89, "children": [91, 92], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 39}}, {"id": 91, "type": "type_identifier", "text": "QMouseEvent", "parent": 90, "children": [], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 32}}, {"id": 92, "type": "pointer_declarator", "text": "*event", "parent": 90, "children": [93, 94], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 39}}, {"id": 93, "type": "*", "text": "*", "parent": 92, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 34}}, {"id": 94, "type": "identifier", "text": "event", "parent": 92, "children": [], "start_point": {"row": 34, "column": 34}, "end_point": {"row": 34, "column": 39}}, {"id": 95, "type": "declaration", "text": "void mouseDoubleClickEvent(QMouseEvent *event);", "parent": 33, "children": [96, 97], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 48}}, {"id": 96, "type": "primitive_type", "text": "void", "parent": 95, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 5}}, {"id": 97, "type": "function_declarator", "text": "mouseDoubleClickEvent(QMouseEvent *event)", "parent": 95, "children": [98, 99], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 47}}, {"id": 98, "type": "identifier", "text": "mouseDoubleClickEvent", "parent": 97, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 27}}, {"id": 99, "type": "parameter_list", "text": "(QMouseEvent *event)", "parent": 97, "children": [100], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 47}}, {"id": 100, "type": "parameter_declaration", "text": "QMouseEvent *event", "parent": 99, "children": [101, 102], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 46}}, {"id": 101, "type": "type_identifier", "text": "QMouseEvent", "parent": 100, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 39}}, {"id": 102, "type": "pointer_declarator", "text": "*event", "parent": 100, "children": [103, 104], "start_point": {"row": 35, "column": 40}, "end_point": {"row": 35, "column": 46}}, {"id": 103, "type": "*", "text": "*", "parent": 102, "children": [], "start_point": {"row": 35, "column": 40}, "end_point": {"row": 35, "column": 41}}, {"id": 104, "type": "identifier", "text": "event", "parent": 102, "children": [], "start_point": {"row": 35, "column": 41}, "end_point": {"row": 35, "column": 46}}, {"id": 105, "type": "declaration", "text": "void keyPressEvent(QKeyEvent *event);", "parent": 33, "children": [106, 107], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 38}}, {"id": 106, "type": "primitive_type", "text": "void", "parent": 105, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 5}}, {"id": 107, "type": "function_declarator", "text": "keyPressEvent(QKeyEvent *event)", "parent": 105, "children": [108, 109], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 37}}, {"id": 108, "type": "identifier", "text": "keyPressEvent", "parent": 107, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 19}}, {"id": 109, "type": "parameter_list", "text": "(QKeyEvent *event)", "parent": 107, "children": [110], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 37}}, {"id": 110, "type": "parameter_declaration", "text": "QKeyEvent *event", "parent": 109, "children": [111, 112], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 36}}, {"id": 111, "type": "type_identifier", "text": "QKeyEvent", "parent": 110, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 29}}, {"id": 112, "type": "pointer_declarator", "text": "*event", "parent": 110, "children": [113, 114], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 36}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 31}}, {"id": 114, "type": "identifier", "text": "event", "parent": 112, "children": [], "start_point": {"row": 37, "column": 31}, "end_point": {"row": 37, "column": 36}}, {"id": 115, "type": "declaration", "text": "void keyReleaseEvent(QKeyEvent *event);", "parent": 33, "children": [116, 117], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 40}}, {"id": 116, "type": "primitive_type", "text": "void", "parent": 115, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 5}}, {"id": 117, "type": "function_declarator", "text": "keyReleaseEvent(QKeyEvent *event)", "parent": 115, "children": [118, 119], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 39}}, {"id": 118, "type": "identifier", "text": "keyReleaseEvent", "parent": 117, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 21}}, {"id": 119, "type": "parameter_list", "text": "(QKeyEvent *event)", "parent": 117, "children": [120], "start_point": {"row": 38, "column": 21}, "end_point": {"row": 38, "column": 39}}, {"id": 120, "type": "parameter_declaration", "text": "QKeyEvent *event", "parent": 119, "children": [121, 122], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 38}}, {"id": 121, "type": "type_identifier", "text": "QKeyEvent", "parent": 120, "children": [], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 31}}, {"id": 122, "type": "pointer_declarator", "text": "*event", "parent": 120, "children": [123, 124], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 38}}, {"id": 123, "type": "*", "text": "*", "parent": 122, "children": [], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 33}}, {"id": 124, "type": "identifier", "text": "event", "parent": 122, "children": [], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 38}}, {"id": 125, "type": "declaration", "text": "void wheelEvent(QWheelEvent *event);", "parent": 33, "children": [126, 127], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 37}}, {"id": 126, "type": "primitive_type", "text": "void", "parent": 125, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 5}}, {"id": 127, "type": "function_declarator", "text": "wheelEvent(QWheelEvent *event)", "parent": 125, "children": [128, 129], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 36}}, {"id": 128, "type": "identifier", "text": "wheelEvent", "parent": 127, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 16}}, {"id": 129, "type": "parameter_list", "text": "(QWheelEvent *event)", "parent": 127, "children": [130], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 36}}, {"id": 130, "type": "parameter_declaration", "text": "QWheelEvent *event", "parent": 129, "children": [131, 132], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 35}}, {"id": 131, "type": "type_identifier", "text": "QWheelEvent", "parent": 130, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 28}}, {"id": 132, "type": "pointer_declarator", "text": "*event", "parent": 130, "children": [133, 134], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 35}}, {"id": 133, "type": "*", "text": "*", "parent": 132, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 30}}, {"id": 134, "type": "identifier", "text": "event", "parent": 132, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 35}}, {"id": 135, "type": "declaration", "text": "void startSearch(void);", "parent": 33, "children": [136, 137], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 24}}, {"id": 136, "type": "primitive_type", "text": "void", "parent": 135, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 5}}, {"id": 137, "type": "function_declarator", "text": "startSearch(void)", "parent": 135, "children": [138, 139], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 23}}, {"id": 138, "type": "identifier", "text": "startSearch", "parent": 137, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 17}}, {"id": 139, "type": "parameter_list", "text": "(void)", "parent": 137, "children": [140], "start_point": {"row": 42, "column": 17}, "end_point": {"row": 42, "column": 23}}, {"id": 140, "type": "parameter_declaration", "text": "void", "parent": 139, "children": [141], "start_point": {"row": 42, "column": 18}, "end_point": {"row": 42, "column": 22}}, {"id": 141, "type": "primitive_type", "text": "void", "parent": 140, "children": [], "start_point": {"row": 42, "column": 18}, "end_point": {"row": 42, "column": 22}}, {"id": 142, "type": "declaration", "text": "void togglePauseSearch(void);", "parent": 33, "children": [143, 144], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 30}}, {"id": 143, "type": "primitive_type", "text": "void", "parent": 142, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 5}}, {"id": 144, "type": "function_declarator", "text": "togglePauseSearch(void)", "parent": 142, "children": [145, 146], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 29}}, {"id": 145, "type": "identifier", "text": "togglePauseSearch", "parent": 144, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 23}}, {"id": 146, "type": "parameter_list", "text": "(void)", "parent": 144, "children": [147], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 29}}, {"id": 147, "type": "parameter_declaration", "text": "void", "parent": 146, "children": [148], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 28}}, {"id": 148, "type": "primitive_type", "text": "void", "parent": 147, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 28}}, {"id": 149, "type": "declaration", "text": "void cancelSearch(void);", "parent": 33, "children": [150, 151], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 25}}, {"id": 150, "type": "primitive_type", "text": "void", "parent": 149, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 5}}, {"id": 151, "type": "function_declarator", "text": "cancelSearch(void)", "parent": 149, "children": [152, 153], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 24}}, {"id": 152, "type": "identifier", "text": "cancelSearch", "parent": 151, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 18}}, {"id": 153, "type": "parameter_list", "text": "(void)", "parent": 151, "children": [154], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 24}}, {"id": 154, "type": "parameter_declaration", "text": "void", "parent": 153, "children": [155], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 23}}, {"id": 155, "type": "primitive_type", "text": "void", "parent": 154, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 23}}, {"id": 156, "type": "labeled_statement", "text": "std::unique_ptr<Ui::MainWindow> ui;", "parent": 33, "children": [157, 158], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 36}}, {"id": 157, "type": "statement_identifier", "text": "std", "parent": 156, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 4}}, {"id": 158, "type": "ERROR", "text": "::unique_ptr<Ui:", "parent": 156, "children": [159], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 20}}, {"id": 159, "type": "binary_expression", "text": "unique_ptr<Ui", "parent": 158, "children": [160, 161, 162], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 19}}, {"id": 160, "type": "identifier", "text": "unique_ptr", "parent": 159, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 16}}, {"id": 161, "type": "<", "text": "<", "parent": 159, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 17}}, {"id": 162, "type": "identifier", "text": "Ui", "parent": 159, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 19}}, {"id": 163, "type": "binary_expression", "text": "MainWindow> ui", "parent": 156, "children": [164, 165, 166], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 35}}, {"id": 164, "type": "identifier", "text": "MainWindow", "parent": 163, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 31}}, {"id": 165, "type": ">", "text": ">", "parent": 163, "children": [], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 32}}, {"id": 166, "type": "identifier", "text": "ui", "parent": 163, "children": [], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 35}}, {"id": 167, "type": "declaration", "text": "GraphicsWidget *graphicsWidget;", "parent": 33, "children": [168, 169], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 32}}, {"id": 168, "type": "type_identifier", "text": "GraphicsWidget", "parent": 167, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 15}}, {"id": 169, "type": "pointer_declarator", "text": "*graphicsWidget", "parent": 167, "children": [170, 171], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 31}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 17}}, {"id": 171, "type": "identifier", "text": "graphicsWidget", "parent": 169, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 31}}, {"id": 172, "type": "declaration", "text": "HexGrid *grid;", "parent": 33, "children": [173, 174], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 15}}, {"id": 173, "type": "type_identifier", "text": "HexGrid", "parent": 172, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 8}}, {"id": 174, "type": "pointer_declarator", "text": "*grid", "parent": 172, "children": [175, 176], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 14}}, {"id": 175, "type": "*", "text": "*", "parent": 174, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 10}}, {"id": 176, "type": "identifier", "text": "grid", "parent": 174, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 14}}, {"id": 177, "type": "declaration", "text": "QTimer *searchTimer;", "parent": 33, "children": [178, 179], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 21}}, {"id": 178, "type": "type_identifier", "text": "QTimer", "parent": 177, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 7}}, {"id": 179, "type": "pointer_declarator", "text": "*searchTimer", "parent": 177, "children": [180, 181], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 20}}, {"id": 180, "type": "*", "text": "*", "parent": 179, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 9}}, {"id": 181, "type": "identifier", "text": "searchTimer", "parent": 179, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 20}}, {"id": 182, "type": "labeled_statement", "text": "std::unique_ptr<GridPainter> painter;", "parent": 33, "children": [183], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 38}}, {"id": 183, "type": "statement_identifier", "text": "std", "parent": 182, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 4}}, {"id": 184, "type": "binary_expression", "text": "unique_ptr<GridPainter> painter", "parent": 182, "children": [185, 189, 190], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 37}}, {"id": 185, "type": "binary_expression", "text": "unique_ptr<GridPainter", "parent": 184, "children": [186, 187, 188], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 28}}, {"id": 186, "type": "identifier", "text": "unique_ptr", "parent": 185, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 16}}, {"id": 187, "type": "<", "text": "<", "parent": 185, "children": [], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 17}}, {"id": 188, "type": "identifier", "text": "GridPainter", "parent": 185, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 28}}, {"id": 189, "type": ">", "text": ">", "parent": 184, "children": [], "start_point": {"row": 54, "column": 28}, "end_point": {"row": 54, "column": 29}}, {"id": 190, "type": "identifier", "text": "painter", "parent": 184, "children": [], "start_point": {"row": 54, "column": 30}, "end_point": {"row": 54, "column": 37}}, {"id": 191, "type": "labeled_statement", "text": "std::unique_ptr<GridSearcher> searcher;", "parent": 33, "children": [192], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 40}}, {"id": 192, "type": "statement_identifier", "text": "std", "parent": 191, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 4}}, {"id": 193, "type": "binary_expression", "text": "unique_ptr<GridSearcher> searcher", "parent": 191, "children": [194, 198, 199], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 39}}, {"id": 194, "type": "binary_expression", "text": "unique_ptr<GridSearcher", "parent": 193, "children": [195, 196, 197], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 29}}, {"id": 195, "type": "identifier", "text": "unique_ptr", "parent": 194, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 16}}, {"id": 196, "type": "<", "text": "<", "parent": 194, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 17}}, {"id": 197, "type": "identifier", "text": "GridSearcher", "parent": 194, "children": [], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 29}}, {"id": 198, "type": ">", "text": ">", "parent": 193, "children": [], "start_point": {"row": 55, "column": 29}, "end_point": {"row": 55, "column": 30}}, {"id": 199, "type": "identifier", "text": "searcher", "parent": 193, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 39}}, {"id": 200, "type": "labeled_statement", "text": "std::shared_ptr<Channel<GridSearchEvent>> searchChannel;", "parent": 33, "children": [201], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 57}}, {"id": 201, "type": "statement_identifier", "text": "std", "parent": 200, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 4}}, {"id": 202, "type": "binary_expression", "text": "shared_ptr<Channel<GridSearchEvent>> searchChannel", "parent": 200, "children": [203, 207, 208], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 56}}, {"id": 203, "type": "binary_expression", "text": "shared_ptr<Channel", "parent": 202, "children": [204, 205, 206], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 24}}, {"id": 204, "type": "identifier", "text": "shared_ptr", "parent": 203, "children": [], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 16}}, {"id": 205, "type": "<", "text": "<", "parent": 203, "children": [], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 17}}, {"id": 206, "type": "identifier", "text": "Channel", "parent": 203, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 24}}, {"id": 207, "type": "<", "text": "<", "parent": 202, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 25}}, {"id": 208, "type": "binary_expression", "text": "GridSearchEvent>> searchChannel", "parent": 202, "children": [209, 210, 211], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 56}}, {"id": 209, "type": "identifier", "text": "GridSearchEvent", "parent": 208, "children": [], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 40}}, {"id": 210, "type": ">>", "text": ">>", "parent": 208, "children": [], "start_point": {"row": 56, "column": 40}, "end_point": {"row": 56, "column": 42}}, {"id": 211, "type": "identifier", "text": "searchChannel", "parent": 208, "children": [], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 56}}, {"id": 212, "type": "declaration", "text": "bool leftMouseButton;", "parent": 33, "children": [213, 214], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 22}}, {"id": 213, "type": "primitive_type", "text": "bool", "parent": 212, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 5}}, {"id": 214, "type": "identifier", "text": "leftMouseButton", "parent": 212, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 21}}, {"id": 215, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 6}}]}, "node_categories": {"declarations": {"functions": [28, 33, 42, 60, 67, 77, 87, 97, 107, 117, 127, 137, 144, 151], "variables": [18, 20, 22, 24, 26, 31, 37, 45, 58, 63, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 142, 147, 149, 154, 167, 172, 177, 212], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [52, 54, 159, 163, 184, 185, 193, 194, 202, 203, 208], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 19, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 40, 43, 46, 49, 55, 61, 68, 71, 74, 78, 81, 84, 88, 91, 94, 98, 101, 104, 108, 111, 114, 118, 121, 124, 128, 131, 134, 138, 145, 152, 157, 160, 162, 164, 166, 168, 171, 173, 176, 178, 181, 183, 186, 188, 190, 192, 195, 197, 199, 201, 204, 206, 209, 211, 214, 215], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 51], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 28, "universal_type": "function", "name": "MainWindow;", "text_snippet": "namespace Ui {\n\tclass MainWindow;\n}"}, {"node_id": 33, "universal_type": "function", "name": "MainWindow", "text_snippet": "class MainWindow : public QWidget\n{\n\tQ_OBJECT\n\npublic:\n\texplicit MainWindow(QWidget *parent = 0);\n\t~"}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "MainWindow(QWidget *parent"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "on_searchTimer_timeout(void)"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "mousePressEvent(QMouseEvent *event)"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "mouseReleaseEvent(QMouseEvent *event)"}, {"node_id": 87, "universal_type": "function", "name": "unknown", "text_snippet": "mouseMoveEvent(QMouseEvent *event)"}, {"node_id": 97, "universal_type": "function", "name": "unknown", "text_snippet": "mouseDoubleClickEvent(QMouseEvent *event)"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "keyPressEvent(QKeyEvent *event)"}, {"node_id": 117, "universal_type": "function", "name": "unknown", "text_snippet": "keyReleaseEvent(QKeyEvent *event)"}, {"node_id": 127, "universal_type": "function", "name": "unknown", "text_snippet": "wheelEvent(QWheelEvent *event)"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "startSearch(void)"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "togglePauseSearch(void)"}, {"node_id": 151, "universal_type": "function", "name": "unknown", "text_snippet": "cancelSearch(void)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <QWidget>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <memory>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"hexgrid/gridsearchevent.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"utils/channel.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "#ifndef MAINWINDOW_H\n#define MAINWINDOW_H\n\n#include <QWidget>\n\n#include <memory>\n\n#include \"hexgrid/gridsearchevent.h\"\n#include \"utils/channel.h\"\n\nclass QTimer;\n\nclass GraphicsWidget;\nclass GridPainter;\nclass HexGrid;\nclass GridSearcher;\n\nnamespace Ui {\n\tclass MainWindow;\n}\n\nclass MainWindow : public QWidget\n{\n\tQ_OBJECT\n\npublic:\n\texplicit MainWindow(QWidget *parent = 0);\n\t~MainWindow();\n\nprivate:\n\tvoid on_searchTimer_timeout(void);\n\n\tvoid mousePressEvent(QMouseEvent *event);\n\tvoid mouseReleaseEvent(QMouseEvent *event);\n\tvoid mouseMoveEvent(QMouseEvent *event);\n\tvoid mouseDoubleClickEvent(QMouseEvent *event);\n\n\tvoid keyPressEvent(QKeyEvent *event);\n\tvoid keyReleaseEvent(QKeyEvent *event);\n\n\tvoid wheelEvent(QWheelEvent *event);\n\n\tvoid startSearch(void);\n\tvoid togglePauseSearch(void);\n\tvoid cancelSearch(void);\n\n\n\tstd::unique_ptr<Ui::MainWindow> ui;\n\n\tGraphicsWidget *graphicsWidget;\n\tHexGrid *grid;\n\n\tQTimer *searchTimer;\n\n\tstd::unique_ptr<GridPainter> painter;\n\tstd::unique_ptr<GridSearcher> searcher;\n\tstd::shared_ptr<Channel<GridSearchEvent>> searchChannel;\n\n\tbool leftMouseButton;\n};\n\n#endif // MAINWINDOW_H\n"}
80,955
c
// // NSObject+NetworkDescription.h // ZZB // // Created by HuiYang on 15/3/19. // Copyright (c) 2015年 ZhangZheBang. All rights reserved. // #import <Foundation/Foundation.h> typedef BOOL (^ZZBCompleteBlock)(void); @interface NSObject (NetworkDescription) -(BOOL)descriptionForServer; -(BOOL)isSucessForServer; -(BOOL)isErrorForServer; -(BOOL)isSucessForServerCatchErrorCode:(NSString*)code andCompleteBlock:(ZZBCompleteBlock)cancelBlock; @end
28.87
15
(translation_unit) "//\n// NSObject+NetworkDescription.h\n// ZZB\n//\n// Created by HuiYang on 15/3/19.\n// Copyright (c) 2015年 ZhangZheBang. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\ntypedef BOOL (^ZZBCompleteBlock)(void);\n\n@interface NSObject (NetworkDescription)\n\n-(BOOL)descriptionForServer;\n-(BOOL)isSucessForServer;\n\n-(BOOL)isErrorForServer;\n\n-(BOOL)isSucessForServerCatchErrorCode:(NSString*)code andCompleteBlock:(ZZBCompleteBlock)cancelBlock;\n\n@end\n" (comment) "//" (comment) "// NSObject+NetworkDescription.h" (comment) "// ZZB" (comment) "//" (comment) "// Created by HuiYang on 15/3/19." (comment) "// Copyright (c) 2015年 ZhangZheBang. All rights reserved.\n/" (comment) "\n\n" (preproc_call) "mport <Foundation/Foundation.h>\n\nt" (preproc_directive) "mport <" (preproc_arg) "oundation/Foundation.h>\n\n" (type_definition) "pedef BOOL (^ZZBCompleteBlock)(void);\n\n" (typedef) "pedef B" (macro_type_specifier) "OL (^ZZBCompleteBlock)(v" (identifier) "OL (" (() "Z" (ERROR) "Z" (^) "Z" (type_descriptor) "BCompleteBlock)(" (type_identifier) "BCompleteBlock)(" ()) "v" (parenthesized_declarator) "oid);\n" (() "o" (primitive_type) "id);" ()) "\n" (;) "\n" (ERROR) "nterface NSObject (NetworkDescription)\n\n" (ERROR) "n" (type_identifier) "terface N" (function_declarator) "Object (NetworkDescription)\n\n" (identifier) "Object (" (parameter_list) "etworkDescription)\n\n" (() "e" (identifier) "tworkDescription)\n" ()) "\n" (expression_statement) "BOOL)descriptionForServer;\n-" (unary_expression) "BOOL)descriptionForServer;\n" (-) "B" (cast_expression) "OOL)descriptionForServer;\n" (() "O" (type_descriptor) "OL)d" (type_identifier) "OL)d" ()) "e" (identifier) "scriptionForServer;\n" (;) "-" (expression_statement) "BOOL)isSucessForServer;\n\n" (unary_expression) "BOOL)isSucessForServer;\n" (-) "B" (cast_expression) "OOL)isSucessForServer;\n" (() "O" (type_descriptor) "OL)i" (type_identifier) "OL)i" ()) "s" (identifier) "SucessForServer;\n" (;) "\n" (expression_statement) "BOOL)isErrorForServer;\n\n" (unary_expression) "BOOL)isErrorForServer;\n" (-) "B" (cast_expression) "OOL)isErrorForServer;\n" (() "O" (type_descriptor) "OL)i" (type_identifier) "OL)i" ()) "s" (identifier) "ErrorForServer;\n" (;) "\n" (ERROR) "BOOL)isSucessForServerCatchErrorCode:(NSString*)code andCompleteBlock:(ZZBCompleteBlock)ca" (binary_expression) "BOOL)isSucessForServerCatchErrorCode:(NSString*)code andCompleteBlock:(" (unary_expression) "BOOL)isSucessForServerCatchErrorCode:(" (-) "B" (cast_expression) "OOL)isSucessForServerCatchErrorCode:(" (() "O" (type_descriptor) "OL)i" (type_identifier) "OL)i" ()) "s" (identifier) "SucessForServerCatchErrorCode:(" (ERROR) "NSString*)" (:) "N" (() "S" (identifier) "String*)" (*) "c" (ERROR) "ode a" ()) "o" (identifier) "de a" (identifier) "dCompleteBlock:(" (:) "Z" (() "Z" (identifier) "BCompleteBlock)c" ()) "a" (expression_statement) "ncelBlock;\n\n" (identifier) "ncelBlock;\n" (;) "\n" (ERROR) "n" (ERROR) "n" (expression_statement) "d\n" (identifier) "d\n" (;) ""
96
8
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 28.87, "nodes": 57, "errors": 0, "source_hash": "03a3ce16bf9b59c9bdaacb1c039da58c1f1a6e04e9137d2e4cd36b7896653ef6", "categorized_nodes": 32}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "mport <Foundation/Foundation.h>\n\nt", "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": "type_definition", "text": "pedef BOOL (^ZZBCompleteBlock)(void);\n\n", "parent": null, "children": [4, 5, 11], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 39}}, {"id": 4, "type": "typedef", "text": "pedef B", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 5, "type": "macro_type_specifier", "text": "OL (^ZZBCompleteBlock)(v", "parent": 3, "children": [6, 7, 9], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 32}}, {"id": 6, "type": "identifier", "text": "OL (", "parent": 5, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 12}}, {"id": 7, "type": "ERROR", "text": "Z", "parent": 5, "children": [8], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 15}}, {"id": 8, "type": "^", "text": "Z", "parent": 7, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 15}}, {"id": 9, "type": "type_descriptor", "text": "BCompleteBlock)(", "parent": 5, "children": [10], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 31}}, {"id": 10, "type": "type_identifier", "text": "BCompleteBlock)(", "parent": 9, "children": [], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 31}}, {"id": 11, "type": "parenthesized_declarator", "text": "oid);\n", "parent": 3, "children": [12], "start_point": {"row": 10, "column": 32}, "end_point": {"row": 10, "column": 38}}, {"id": 12, "type": "primitive_type", "text": "id);", "parent": 11, "children": [], "start_point": {"row": 10, "column": 33}, "end_point": {"row": 10, "column": 37}}, {"id": 13, "type": "ERROR", "text": "nterface NSObject (NetworkDescription)\n\n", "parent": null, "children": [14, 15, 16], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 40}}, {"id": 14, "type": "ERROR", "text": "n", "parent": 13, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 15, "type": "type_identifier", "text": "terface N", "parent": 13, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 10}}, {"id": 16, "type": "function_declarator", "text": "Object (NetworkDescription)\n\n", "parent": 13, "children": [17, 18], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 40}}, {"id": 17, "type": "identifier", "text": "Object (", "parent": 16, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 19}}, {"id": 18, "type": "parameter_list", "text": "etworkDescription)\n\n", "parent": 16, "children": [19], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 40}}, {"id": 19, "type": "identifier", "text": "tworkDescription)\n", "parent": 18, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 39}}, {"id": 20, "type": "unary_expression", "text": "BOOL)descriptionForServer;\n", "parent": null, "children": [21, 22], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 27}}, {"id": 21, "type": "-", "text": "B", "parent": 20, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 22, "type": "cast_expression", "text": "OOL)descriptionForServer;\n", "parent": 20, "children": [23, 25], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 27}}, {"id": 23, "type": "type_descriptor", "text": "OL)d", "parent": 22, "children": [24], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 6}}, {"id": 24, "type": "type_identifier", "text": "OL)d", "parent": 23, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 6}}, {"id": 25, "type": "identifier", "text": "scriptionForServer;\n", "parent": 22, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 27}}, {"id": 26, "type": "unary_expression", "text": "BOOL)isSucessForServer;\n", "parent": null, "children": [27, 28], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 24}}, {"id": 27, "type": "-", "text": "B", "parent": 26, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 28, "type": "cast_expression", "text": "OOL)isSucessForServer;\n", "parent": 26, "children": [29, 31], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 24}}, {"id": 29, "type": "type_descriptor", "text": "OL)i", "parent": 28, "children": [30], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 6}}, {"id": 30, "type": "type_identifier", "text": "OL)i", "parent": 29, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 6}}, {"id": 31, "type": "identifier", "text": "SucessForServer;\n", "parent": 28, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 24}}, {"id": 32, "type": "unary_expression", "text": "BOOL)isErrorForServer;\n", "parent": null, "children": [33, 34], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 23}}, {"id": 33, "type": "-", "text": "B", "parent": 32, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 34, "type": "cast_expression", "text": "OOL)isErrorForServer;\n", "parent": 32, "children": [35, 37], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 23}}, {"id": 35, "type": "type_descriptor", "text": "OL)i", "parent": 34, "children": [36], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 6}}, {"id": 36, "type": "type_identifier", "text": "OL)i", "parent": 35, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 6}}, {"id": 37, "type": "identifier", "text": "ErrorForServer;\n", "parent": 34, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 23}}, {"id": 38, "type": "ERROR", "text": "BOOL)isSucessForServerCatchErrorCode:(NSString*)code andCompleteBlock:(ZZBCompleteBlock)ca", "parent": null, "children": [39, 52], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 90}}, {"id": 39, "type": "binary_expression", "text": "BOOL)isSucessForServerCatchErrorCode:(NSString*)code andCompleteBlock:(", "parent": 38, "children": [40, 46, 48, 49, 51], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 71}}, {"id": 40, "type": "unary_expression", "text": "BOOL)isSucessForServerCatchErrorCode:(", "parent": 39, "children": [41, 42], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 38}}, {"id": 41, "type": "-", "text": "B", "parent": 40, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 42, "type": "cast_expression", "text": "OOL)isSucessForServerCatchErrorCode:(", "parent": 40, "children": [43, 45], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 38}}, {"id": 43, "type": "type_descriptor", "text": "OL)i", "parent": 42, "children": [44], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 6}}, {"id": 44, "type": "type_identifier", "text": "OL)i", "parent": 43, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 6}}, {"id": 45, "type": "identifier", "text": "SucessForServerCatchErrorCode:(", "parent": 42, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 38}}, {"id": 46, "type": "ERROR", "text": "NSString*)", "parent": 39, "children": [47], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 48}}, {"id": 47, "type": "identifier", "text": "String*)", "parent": 46, "children": [], "start_point": {"row": 19, "column": 40}, "end_point": {"row": 19, "column": 48}}, {"id": 48, "type": "*", "text": "c", "parent": 39, "children": [], "start_point": {"row": 19, "column": 48}, "end_point": {"row": 19, "column": 49}}, {"id": 49, "type": "ERROR", "text": "ode a", "parent": 39, "children": [50], "start_point": {"row": 19, "column": 49}, "end_point": {"row": 19, "column": 54}}, {"id": 50, "type": "identifier", "text": "de a", "parent": 49, "children": [], "start_point": {"row": 19, "column": 50}, "end_point": {"row": 19, "column": 54}}, {"id": 51, "type": "identifier", "text": "dCompleteBlock:(", "parent": 39, "children": [], "start_point": {"row": 19, "column": 55}, "end_point": {"row": 19, "column": 71}}, {"id": 52, "type": "identifier", "text": "BCompleteBlock)c", "parent": 38, "children": [], "start_point": {"row": 19, "column": 73}, "end_point": {"row": 19, "column": 89}}, {"id": 53, "type": "identifier", "text": "ncelBlock;\n", "parent": null, "children": [], "start_point": {"row": 19, "column": 90}, "end_point": {"row": 19, "column": 101}}, {"id": 54, "type": "ERROR", "text": "n", "parent": null, "children": [55], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 55, "type": "ERROR", "text": "n", "parent": 54, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 56, "type": "identifier", "text": "d\n", "parent": null, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 4}}]}, "node_categories": {"declarations": {"functions": [16], "variables": [3], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [20, 22, 26, 28, 32, 34, 39, 40, 42], "assignments": [], "loops": [], "conditionals": [5, 6, 10, 15, 17, 19, 24, 25, 30, 31, 36, 37, 44, 45, 47, 50, 51, 52, 53, 56], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 16, "universal_type": "function", "name": "unknown", "text_snippet": "Object (NetworkDescription)\n\n"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// NSObject+NetworkDescription.h\n// ZZB\n//\n// Created by HuiYang on 15/3/19.\n// Copyright (c) 2015\u5e74 ZhangZheBang. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\ntypedef BOOL (^ZZBCompleteBlock)(void);\n\n@interface NSObject (NetworkDescription)\n\n-(BOOL)descriptionForServer;\n-(BOOL)isSucessForServer;\n\n-(BOOL)isErrorForServer;\n\n-(BOOL)isSucessForServerCatchErrorCode:(NSString*)code andCompleteBlock:(ZZBCompleteBlock)cancelBlock;\n\n@end\n"}
80,956
c
/* * The Yices SMT Solver. Copyright 2014 SRI International. * * This program may only be used subject to the noncommercial end user * license agreement which is downloadable along with this program. */ /* * EXPERIMENTAL: TABLE OF BOOLEAN EQUALITIES */ #include <assert.h> #include "scratch/booleq_table.h" #include "utils/memalloc.h" /* * Initialize table: * - nothing allocated yet: dsize and esize are 0 */ void init_booleq_table(booleq_table_t *table) { table->def = NULL; table->eq = NULL; table->nvars = 0; table->dsize = 0; table->neqs =0; table->esize = 0; } /* * Increase the size of the eq array */ static void booleq_table_extend_eq(booleq_table_t *table) { uint32_t n; n = table->esize; if (n == 0) { // first allocation n = BOOLEQ_DEFAULT_ESIZE; assert(n > 0 && n <= BOOLEQ_MAX_ESIZE); table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t)); table->esize = n; } else { // make the table 50% larger n += (n >> 1) + 1; if (n > BOOLEQ_MAX_ESIZE) { out_of_memory(); } table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t)); table->esize = n; } } /* * Allocate a new eq descriptor: return its index */ static int32_t booleq_table_alloc_eq(booleq_table_t *table) { uint32_t i; i = table->neqs; if (i == table->esize) { booleq_table_extend_eq(table); } assert(i < table->esize); table->neqs = i+1; return i; } /* * Make the def array large enough to store def[x] * - initialize all new elements to -1 */ static void booleq_table_resize_def(booleq_table_t *table, uint32_t x) { uint32_t i, n; if (x >= table->nvars) { n = table->dsize; if (x >= n) { // allocate a larger array if (n == 0) { n = BOOLEQ_DEFAULT_DSIZE; } else { n += (n >> 1) + 1; } if (x >= n) { n = x + 1; } if (n > BOOLEQ_MAX_DSIZE) { out_of_memory(); } table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t)); table->dsize = n; } for (i=table->nvars; i<=x; i++) { table->def[i] = -1; } table->nvars = x + 1; } } /* * Empty the table */ void reset_booleq_table(booleq_table_t *table) { table->nvars = 0; table->neqs = 0; } /* * Free all memory used */ void delete_booleq_table(booleq_table_t *table) { safe_free(table->def); safe_free(table->eq); table->def = NULL; table->eq = NULL; } /* * Record the constraint l := (eq a b) * - there must not be any definition for var_of(l) */ void booleq_table_record_eq(booleq_table_t *table, literal_t l, literal_t a, literal_t b) { bvar_t x; int32_t i; assert(l >= 0 && a >= 0 && b >= 0); // normalize; force l to be positive a ^= sign_of_lit(l); l ^= sign_of_lit(l); assert(is_pos(l)); x = var_of(l); booleq_table_resize_def(table, x); i = booleq_table_alloc_eq(table); assert(table->def[x] == -1); table->eq[i].lit[0] = a; table->eq[i].lit[1] = b; table->def[x] = i; } /* * Check whether x has a definition in the table * - x must be a valid variable index (non-negative) */ bool boolvar_is_eq(booleq_table_t *table, bvar_t x) { return x < table->nvars && table->def[x] >= 0; } /* * Get the equality equivalent to l * - return false if there's no such equality in table * - return true otherwise and set *a and *b * If the result is true then the equivalence l <=> (eq *a *b) holds */ bool get_booleq(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b) { bvar_t x; int32_t i; assert(l >= 0); x = var_of(l); if (x < table->nvars) { i = table->def[x]; if (i >= 0) { *a = table->eq[i].lit[0] ^ sign_of_lit(l); *b = table->eq[i].lit[1]; return true; } } return false; }
21.98
163
(translation_unit) "/*\n * The Yices SMT Solver. Copyright 2014 SRI International.\n *\n * This program may only be used subject to the noncommercial end user\n * license agreement which is downloadable along with this program.\n */\n\n/*\n * EXPERIMENTAL: TABLE OF BOOLEAN EQUALITIES\n */\n\n#include <assert.h>\n\n#include "scratch/booleq_table.h"\n#include "utils/memalloc.h"\n\n\n/*\n * Initialize table:\n * - nothing allocated yet: dsize and esize are 0\n */\nvoid init_booleq_table(booleq_table_t *table) {\n table->def = NULL;\n table->eq = NULL;\n table->nvars = 0;\n table->dsize = 0;\n table->neqs =0;\n table->esize = 0;\n}\n\n\n/*\n * Increase the size of the eq array\n */\nstatic void booleq_table_extend_eq(booleq_table_t *table) {\n uint32_t n;\n\n n = table->esize;\n if (n == 0) {\n // first allocation\n n = BOOLEQ_DEFAULT_ESIZE;\n assert(n > 0 && n <= BOOLEQ_MAX_ESIZE);\n table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t));\n table->esize = n;\n } else {\n // make the table 50% larger\n n += (n >> 1) + 1;\n if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }\n table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));\n table->esize = n;\n }\n}\n\n\n/*\n * Allocate a new eq descriptor: return its index\n */\nstatic int32_t booleq_table_alloc_eq(booleq_table_t *table) {\n uint32_t i;\n\n i = table->neqs;\n if (i == table->esize) {\n booleq_table_extend_eq(table);\n }\n assert(i < table->esize);\n table->neqs = i+1;\n\n return i;\n}\n\n\n/*\n * Make the def array large enough to store def[x]\n * - initialize all new elements to -1\n */\nstatic void booleq_table_resize_def(booleq_table_t *table, uint32_t x) {\n uint32_t i, n;\n\n if (x >= table->nvars) {\n n = table->dsize;\n if (x >= n) {\n // allocate a larger array\n if (n == 0) {\n n = BOOLEQ_DEFAULT_DSIZE;\n } else {\n n += (n >> 1) + 1;\n }\n if (x >= n) {\n n = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n out_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }\n\n for (i=table->nvars; i<=x; i++) {\n table->def[i] = -1;\n }\n table->nvars = x + 1;\n }\n}\n\n\n\n\n/*\n * Empty the table\n */\nvoid reset_booleq_table(booleq_table_t *table) {\n table->nvars = 0;\n table->neqs = 0;\n}\n\n\n/*\n * Free all memory used\n */\nvoid delete_booleq_table(booleq_table_t *table) {\n safe_free(table->def);\n safe_free(table->eq);\n table->def = NULL;\n table->eq = NULL;\n}\n\n\n/*\n * Record the constraint l := (eq a b)\n * - there must not be any definition for var_of(l)\n */\nvoid booleq_table_record_eq(booleq_table_t *table, literal_t l, literal_t a, literal_t b) {\n bvar_t x;\n int32_t i;\n\n assert(l >= 0 && a >= 0 && b >= 0);\n\n // normalize; force l to be positive\n a ^= sign_of_lit(l);\n l ^= sign_of_lit(l);\n\n assert(is_pos(l));\n x = var_of(l);\n booleq_table_resize_def(table, x);\n i = booleq_table_alloc_eq(table);\n\n assert(table->def[x] == -1);\n\n table->eq[i].lit[0] = a;\n table->eq[i].lit[1] = b;\n table->def[x] = i;\n}\n\n\n/*\n * Check whether x has a definition in the table\n * - x must be a valid variable index (non-negative)\n */\nbool boolvar_is_eq(booleq_table_t *table, bvar_t x) {\n return x < table->nvars && table->def[x] >= 0;\n}\n\n\n/*\n * Get the equality equivalent to l\n * - return false if there's no such equality in table\n * - return true otherwise and set *a and *b\n * If the result is true then the equivalence l <=> (eq *a *b) holds\n */\nbool get_booleq(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b) {\n bvar_t x;\n int32_t i;\n\n assert(l >= 0);\n\n x = var_of(l);\n if (x < table->nvars) {\n i = table->def[x];\n if (i >= 0) {\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }\n }\n\n return false;\n}\n\n\n\n" (comment) "/*\n * The Yices SMT Solver. Copyright 2014 SRI International.\n *\n * This program may only be used subject to the noncommercial end user\n * license agreement which is downloadable along with this program.\n */" (comment) "/*\n * EXPERIMENTAL: TABLE OF BOOLEAN EQUALITIES\n */" (preproc_include) "#include <assert.h>\n" (#include) "#include" (system_lib_string) "<assert.h>" (preproc_include) "#include "scratch/booleq_table.h"\n" (#include) "#include" (string_literal) ""scratch/booleq_table.h"" (") """ (string_content) "scratch/booleq_table.h" (") """ (preproc_include) "#include "utils/memalloc.h"\n" (#include) "#include" (string_literal) ""utils/memalloc.h"" (") """ (string_content) "utils/memalloc.h" (") """ (comment) "/*\n * Initialize table:\n * - nothing allocated yet: dsize and esize are 0\n */" (function_definition) "void init_booleq_table(booleq_table_t *table) {\n table->def = NULL;\n table->eq = NULL;\n table->nvars = 0;\n table->dsize = 0;\n table->neqs =0;\n table->esize = 0;\n}" (primitive_type) "void" (function_declarator) "init_booleq_table(booleq_table_t *table)" (identifier) "init_booleq_table" (parameter_list) "(booleq_table_t *table)" (() "(" (parameter_declaration) "booleq_table_t *table" (type_identifier) "booleq_table_t" (pointer_declarator) "*table" (*) "*" (identifier) "table" ()) ")" (compound_statement) "{\n table->def = NULL;\n table->eq = NULL;\n table->nvars = 0;\n table->dsize = 0;\n table->neqs =0;\n table->esize = 0;\n}" ({) "{" (expression_statement) "table->def = NULL;" (assignment_expression) "table->def = NULL" (field_expression) "table->def" (identifier) "table" (->) "->" (field_identifier) "def" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "table->eq = NULL;" (assignment_expression) "table->eq = NULL" (field_expression) "table->eq" (identifier) "table" (->) "->" (field_identifier) "eq" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "table->nvars = 0;" (assignment_expression) "table->nvars = 0" (field_expression) "table->nvars" (identifier) "table" (->) "->" (field_identifier) "nvars" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "table->dsize = 0;" (assignment_expression) "table->dsize = 0" (field_expression) "table->dsize" (identifier) "table" (->) "->" (field_identifier) "dsize" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "table->neqs =0;" (assignment_expression) "table->neqs =0" (field_expression) "table->neqs" (identifier) "table" (->) "->" (field_identifier) "neqs" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "table->esize = 0;" (assignment_expression) "table->esize = 0" (field_expression) "table->esize" (identifier) "table" (->) "->" (field_identifier) "esize" (=) "=" (number_literal) "0" (;) ";" (}) "}" (comment) "/*\n * Increase the size of the eq array\n */" (function_definition) "static void booleq_table_extend_eq(booleq_table_t *table) {\n uint32_t n;\n\n n = table->esize;\n if (n == 0) {\n // first allocation\n n = BOOLEQ_DEFAULT_ESIZE;\n assert(n > 0 && n <= BOOLEQ_MAX_ESIZE);\n table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t));\n table->esize = n;\n } else {\n // make the table 50% larger\n n += (n >> 1) + 1;\n if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }\n table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));\n table->esize = n;\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "booleq_table_extend_eq(booleq_table_t *table)" (identifier) "booleq_table_extend_eq" (parameter_list) "(booleq_table_t *table)" (() "(" (parameter_declaration) "booleq_table_t *table" (type_identifier) "booleq_table_t" (pointer_declarator) "*table" (*) "*" (identifier) "table" ()) ")" (compound_statement) "{\n uint32_t n;\n\n n = table->esize;\n if (n == 0) {\n // first allocation\n n = BOOLEQ_DEFAULT_ESIZE;\n assert(n > 0 && n <= BOOLEQ_MAX_ESIZE);\n table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t));\n table->esize = n;\n } else {\n // make the table 50% larger\n n += (n >> 1) + 1;\n if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }\n table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));\n table->esize = n;\n }\n}" ({) "{" (declaration) "uint32_t n;" (primitive_type) "uint32_t" (identifier) "n" (;) ";" (expression_statement) "n = table->esize;" (assignment_expression) "n = table->esize" (identifier) "n" (=) "=" (field_expression) "table->esize" (identifier) "table" (->) "->" (field_identifier) "esize" (;) ";" (if_statement) "if (n == 0) {\n // first allocation\n n = BOOLEQ_DEFAULT_ESIZE;\n assert(n > 0 && n <= BOOLEQ_MAX_ESIZE);\n table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t));\n table->esize = n;\n } else {\n // make the table 50% larger\n n += (n >> 1) + 1;\n if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }\n table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));\n table->esize = n;\n }" (if) "if" (parenthesized_expression) "(n == 0)" (() "(" (binary_expression) "n == 0" (identifier) "n" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n // first allocation\n n = BOOLEQ_DEFAULT_ESIZE;\n assert(n > 0 && n <= BOOLEQ_MAX_ESIZE);\n table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t));\n table->esize = n;\n }" ({) "{" (comment) "// first allocation" (expression_statement) "n = BOOLEQ_DEFAULT_ESIZE;" (assignment_expression) "n = BOOLEQ_DEFAULT_ESIZE" (identifier) "n" (=) "=" (identifier) "BOOLEQ_DEFAULT_ESIZE" (;) ";" (expression_statement) "assert(n > 0 && n <= BOOLEQ_MAX_ESIZE);" (call_expression) "assert(n > 0 && n <= BOOLEQ_MAX_ESIZE)" (identifier) "assert" (argument_list) "(n > 0 && n <= BOOLEQ_MAX_ESIZE)" (() "(" (binary_expression) "n > 0 && n <= BOOLEQ_MAX_ESIZE" (binary_expression) "n > 0" (identifier) "n" (>) ">" (number_literal) "0" (&&) "&&" (binary_expression) "n <= BOOLEQ_MAX_ESIZE" (identifier) "n" (<=) "<=" (identifier) "BOOLEQ_MAX_ESIZE" ()) ")" (;) ";" (expression_statement) "table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t));" (assignment_expression) "table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t))" (field_expression) "table->eq" (identifier) "table" (->) "->" (field_identifier) "eq" (=) "=" (cast_expression) "(booleq_t *) safe_malloc(n * sizeof(booleq_t))" (() "(" (type_descriptor) "booleq_t *" (type_identifier) "booleq_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "safe_malloc(n * sizeof(booleq_t))" (identifier) "safe_malloc" (argument_list) "(n * sizeof(booleq_t))" (() "(" (binary_expression) "n * sizeof(booleq_t)" (identifier) "n" (*) "*" (sizeof_expression) "sizeof(booleq_t)" (sizeof) "sizeof" (parenthesized_expression) "(booleq_t)" (() "(" (identifier) "booleq_t" ()) ")" ()) ")" (;) ";" (expression_statement) "table->esize = n;" (assignment_expression) "table->esize = n" (field_expression) "table->esize" (identifier) "table" (->) "->" (field_identifier) "esize" (=) "=" (identifier) "n" (;) ";" (}) "}" (else_clause) "else {\n // make the table 50% larger\n n += (n >> 1) + 1;\n if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }\n table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));\n table->esize = n;\n }" (else) "else" (compound_statement) "{\n // make the table 50% larger\n n += (n >> 1) + 1;\n if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }\n table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));\n table->esize = n;\n }" ({) "{" (comment) "// make the table 50% larger" (expression_statement) "n += (n >> 1) + 1;" (assignment_expression) "n += (n >> 1) + 1" (identifier) "n" (+=) "+=" (binary_expression) "(n >> 1) + 1" (parenthesized_expression) "(n >> 1)" (() "(" (binary_expression) "n >> 1" (identifier) "n" (>>) ">>" (number_literal) "1" ()) ")" (+) "+" (number_literal) "1" (;) ";" (if_statement) "if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }" (if) "if" (parenthesized_expression) "(n > BOOLEQ_MAX_ESIZE)" (() "(" (binary_expression) "n > BOOLEQ_MAX_ESIZE" (identifier) "n" (>) ">" (identifier) "BOOLEQ_MAX_ESIZE" ()) ")" (compound_statement) "{\n out_of_memory();\n }" ({) "{" (expression_statement) "out_of_memory();" (call_expression) "out_of_memory()" (identifier) "out_of_memory" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) "table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));" (assignment_expression) "table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t))" (field_expression) "table->eq" (identifier) "table" (->) "->" (field_identifier) "eq" (=) "=" (cast_expression) "(booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t))" (() "(" (type_descriptor) "booleq_t *" (type_identifier) "booleq_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "safe_realloc(table->eq, n * sizeof(booleq_t))" (identifier) "safe_realloc" (argument_list) "(table->eq, n * sizeof(booleq_t))" (() "(" (field_expression) "table->eq" (identifier) "table" (->) "->" (field_identifier) "eq" (,) "," (binary_expression) "n * sizeof(booleq_t)" (identifier) "n" (*) "*" (sizeof_expression) "sizeof(booleq_t)" (sizeof) "sizeof" (parenthesized_expression) "(booleq_t)" (() "(" (identifier) "booleq_t" ()) ")" ()) ")" (;) ";" (expression_statement) "table->esize = n;" (assignment_expression) "table->esize = n" (field_expression) "table->esize" (identifier) "table" (->) "->" (field_identifier) "esize" (=) "=" (identifier) "n" (;) ";" (}) "}" (}) "}" (comment) "/*\n * Allocate a new eq descriptor: return its index\n */" (function_definition) "static int32_t booleq_table_alloc_eq(booleq_table_t *table) {\n uint32_t i;\n\n i = table->neqs;\n if (i == table->esize) {\n booleq_table_extend_eq(table);\n }\n assert(i < table->esize);\n table->neqs = i+1;\n\n return i;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int32_t" (function_declarator) "booleq_table_alloc_eq(booleq_table_t *table)" (identifier) "booleq_table_alloc_eq" (parameter_list) "(booleq_table_t *table)" (() "(" (parameter_declaration) "booleq_table_t *table" (type_identifier) "booleq_table_t" (pointer_declarator) "*table" (*) "*" (identifier) "table" ()) ")" (compound_statement) "{\n uint32_t i;\n\n i = table->neqs;\n if (i == table->esize) {\n booleq_table_extend_eq(table);\n }\n assert(i < table->esize);\n table->neqs = i+1;\n\n return i;\n}" ({) "{" (declaration) "uint32_t i;" (primitive_type) "uint32_t" (identifier) "i" (;) ";" (expression_statement) "i = table->neqs;" (assignment_expression) "i = table->neqs" (identifier) "i" (=) "=" (field_expression) "table->neqs" (identifier) "table" (->) "->" (field_identifier) "neqs" (;) ";" (if_statement) "if (i == table->esize) {\n booleq_table_extend_eq(table);\n }" (if) "if" (parenthesized_expression) "(i == table->esize)" (() "(" (binary_expression) "i == table->esize" (identifier) "i" (==) "==" (field_expression) "table->esize" (identifier) "table" (->) "->" (field_identifier) "esize" ()) ")" (compound_statement) "{\n booleq_table_extend_eq(table);\n }" ({) "{" (expression_statement) "booleq_table_extend_eq(table);" (call_expression) "booleq_table_extend_eq(table)" (identifier) "booleq_table_extend_eq" (argument_list) "(table)" (() "(" (identifier) "table" ()) ")" (;) ";" (}) "}" (expression_statement) "assert(i < table->esize);" (call_expression) "assert(i < table->esize)" (identifier) "assert" (argument_list) "(i < table->esize)" (() "(" (binary_expression) "i < table->esize" (identifier) "i" (<) "<" (field_expression) "table->esize" (identifier) "table" (->) "->" (field_identifier) "esize" ()) ")" (;) ";" (expression_statement) "table->neqs = i+1;" (assignment_expression) "table->neqs = i+1" (field_expression) "table->neqs" (identifier) "table" (->) "->" (field_identifier) "neqs" (=) "=" (binary_expression) "i+1" (identifier) "i" (+) "+" (number_literal) "1" (;) ";" (return_statement) "return i;" (return) "return" (identifier) "i" (;) ";" (}) "}" (comment) "/*\n * Make the def array large enough to store def[x]\n * - initialize all new elements to -1\n */" (function_definition) "static void booleq_table_resize_def(booleq_table_t *table, uint32_t x) {\n uint32_t i, n;\n\n if (x >= table->nvars) {\n n = table->dsize;\n if (x >= n) {\n // allocate a larger array\n if (n == 0) {\n n = BOOLEQ_DEFAULT_DSIZE;\n } else {\n n += (n >> 1) + 1;\n }\n if (x >= n) {\n n = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n out_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }\n\n for (i=table->nvars; i<=x; i++) {\n table->def[i] = -1;\n }\n table->nvars = x + 1;\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "booleq_table_resize_def(booleq_table_t *table, uint32_t x)" (identifier) "booleq_table_resize_def" (parameter_list) "(booleq_table_t *table, uint32_t x)" (() "(" (parameter_declaration) "booleq_table_t *table" (type_identifier) "booleq_table_t" (pointer_declarator) "*table" (*) "*" (identifier) "table" (,) "," (parameter_declaration) "uint32_t x" (primitive_type) "uint32_t" (identifier) "x" ()) ")" (compound_statement) "{\n uint32_t i, n;\n\n if (x >= table->nvars) {\n n = table->dsize;\n if (x >= n) {\n // allocate a larger array\n if (n == 0) {\n n = BOOLEQ_DEFAULT_DSIZE;\n } else {\n n += (n >> 1) + 1;\n }\n if (x >= n) {\n n = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n out_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }\n\n for (i=table->nvars; i<=x; i++) {\n table->def[i] = -1;\n }\n table->nvars = x + 1;\n }\n}" ({) "{" (declaration) "uint32_t i, n;" (primitive_type) "uint32_t" (identifier) "i" (,) "," (identifier) "n" (;) ";" (if_statement) "if (x >= table->nvars) {\n n = table->dsize;\n if (x >= n) {\n // allocate a larger array\n if (n == 0) {\n n = BOOLEQ_DEFAULT_DSIZE;\n } else {\n n += (n >> 1) + 1;\n }\n if (x >= n) {\n n = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n out_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }\n\n for (i=table->nvars; i<=x; i++) {\n table->def[i] = -1;\n }\n table->nvars = x + 1;\n }" (if) "if" (parenthesized_expression) "(x >= table->nvars)" (() "(" (binary_expression) "x >= table->nvars" (identifier) "x" (>=) ">=" (field_expression) "table->nvars" (identifier) "table" (->) "->" (field_identifier) "nvars" ()) ")" (compound_statement) "{\n n = table->dsize;\n if (x >= n) {\n // allocate a larger array\n if (n == 0) {\n n = BOOLEQ_DEFAULT_DSIZE;\n } else {\n n += (n >> 1) + 1;\n }\n if (x >= n) {\n n = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n out_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }\n\n for (i=table->nvars; i<=x; i++) {\n table->def[i] = -1;\n }\n table->nvars = x + 1;\n }" ({) "{" (expression_statement) "n = table->dsize;" (assignment_expression) "n = table->dsize" (identifier) "n" (=) "=" (field_expression) "table->dsize" (identifier) "table" (->) "->" (field_identifier) "dsize" (;) ";" (if_statement) "if (x >= n) {\n // allocate a larger array\n if (n == 0) {\n n = BOOLEQ_DEFAULT_DSIZE;\n } else {\n n += (n >> 1) + 1;\n }\n if (x >= n) {\n n = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n out_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }" (if) "if" (parenthesized_expression) "(x >= n)" (() "(" (binary_expression) "x >= n" (identifier) "x" (>=) ">=" (identifier) "n" ()) ")" (compound_statement) "{\n // allocate a larger array\n if (n == 0) {\n n = BOOLEQ_DEFAULT_DSIZE;\n } else {\n n += (n >> 1) + 1;\n }\n if (x >= n) {\n n = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n out_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }" ({) "{" (comment) "// allocate a larger array" (if_statement) "if (n == 0) {\n n = BOOLEQ_DEFAULT_DSIZE;\n } else {\n n += (n >> 1) + 1;\n }" (if) "if" (parenthesized_expression) "(n == 0)" (() "(" (binary_expression) "n == 0" (identifier) "n" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n n = BOOLEQ_DEFAULT_DSIZE;\n }" ({) "{" (expression_statement) "n = BOOLEQ_DEFAULT_DSIZE;" (assignment_expression) "n = BOOLEQ_DEFAULT_DSIZE" (identifier) "n" (=) "=" (identifier) "BOOLEQ_DEFAULT_DSIZE" (;) ";" (}) "}" (else_clause) "else {\n n += (n >> 1) + 1;\n }" (else) "else" (compound_statement) "{\n n += (n >> 1) + 1;\n }" ({) "{" (expression_statement) "n += (n >> 1) + 1;" (assignment_expression) "n += (n >> 1) + 1" (identifier) "n" (+=) "+=" (binary_expression) "(n >> 1) + 1" (parenthesized_expression) "(n >> 1)" (() "(" (binary_expression) "n >> 1" (identifier) "n" (>>) ">>" (number_literal) "1" ()) ")" (+) "+" (number_literal) "1" (;) ";" (}) "}" (if_statement) "if (x >= n) {\n n = x + 1;\n }" (if) "if" (parenthesized_expression) "(x >= n)" (() "(" (binary_expression) "x >= n" (identifier) "x" (>=) ">=" (identifier) "n" ()) ")" (compound_statement) "{\n n = x + 1;\n }" ({) "{" (expression_statement) "n = x + 1;" (assignment_expression) "n = x + 1" (identifier) "n" (=) "=" (binary_expression) "x + 1" (identifier) "x" (+) "+" (number_literal) "1" (;) ";" (}) "}" (if_statement) "if (n > BOOLEQ_MAX_DSIZE) {\n out_of_memory();\n }" (if) "if" (parenthesized_expression) "(n > BOOLEQ_MAX_DSIZE)" (() "(" (binary_expression) "n > BOOLEQ_MAX_DSIZE" (identifier) "n" (>) ">" (identifier) "BOOLEQ_MAX_DSIZE" ()) ")" (compound_statement) "{\n out_of_memory();\n }" ({) "{" (expression_statement) "out_of_memory();" (call_expression) "out_of_memory()" (identifier) "out_of_memory" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) "table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));" (assignment_expression) "table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t))" (field_expression) "table->def" (identifier) "table" (->) "->" (field_identifier) "def" (=) "=" (cast_expression) "(int32_t *) safe_realloc(table->def, n * sizeof(int32_t))" (() "(" (type_descriptor) "int32_t *" (primitive_type) "int32_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "safe_realloc(table->def, n * sizeof(int32_t))" (identifier) "safe_realloc" (argument_list) "(table->def, n * sizeof(int32_t))" (() "(" (field_expression) "table->def" (identifier) "table" (->) "->" (field_identifier) "def" (,) "," (binary_expression) "n * sizeof(int32_t)" (identifier) "n" (*) "*" (sizeof_expression) "sizeof(int32_t)" (sizeof) "sizeof" (() "(" (type_descriptor) "int32_t" (primitive_type) "int32_t" ()) ")" ()) ")" (;) ";" (expression_statement) "table->dsize = n;" (assignment_expression) "table->dsize = n" (field_expression) "table->dsize" (identifier) "table" (->) "->" (field_identifier) "dsize" (=) "=" (identifier) "n" (;) ";" (}) "}" (for_statement) "for (i=table->nvars; i<=x; i++) {\n table->def[i] = -1;\n }" (for) "for" (() "(" (assignment_expression) "i=table->nvars" (identifier) "i" (=) "=" (field_expression) "table->nvars" (identifier) "table" (->) "->" (field_identifier) "nvars" (;) ";" (binary_expression) "i<=x" (identifier) "i" (<=) "<=" (identifier) "x" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n table->def[i] = -1;\n }" ({) "{" (expression_statement) "table->def[i] = -1;" (assignment_expression) "table->def[i] = -1" (subscript_expression) "table->def[i]" (field_expression) "table->def" (identifier) "table" (->) "->" (field_identifier) "def" ([) "[" (identifier) "i" (]) "]" (=) "=" (number_literal) "-1" (;) ";" (}) "}" (expression_statement) "table->nvars = x + 1;" (assignment_expression) "table->nvars = x + 1" (field_expression) "table->nvars" (identifier) "table" (->) "->" (field_identifier) "nvars" (=) "=" (binary_expression) "x + 1" (identifier) "x" (+) "+" (number_literal) "1" (;) ";" (}) "}" (}) "}" (comment) "/*\n * Empty the table\n */" (function_definition) "void reset_booleq_table(booleq_table_t *table) {\n table->nvars = 0;\n table->neqs = 0;\n}" (primitive_type) "void" (function_declarator) "reset_booleq_table(booleq_table_t *table)" (identifier) "reset_booleq_table" (parameter_list) "(booleq_table_t *table)" (() "(" (parameter_declaration) "booleq_table_t *table" (type_identifier) "booleq_table_t" (pointer_declarator) "*table" (*) "*" (identifier) "table" ()) ")" (compound_statement) "{\n table->nvars = 0;\n table->neqs = 0;\n}" ({) "{" (expression_statement) "table->nvars = 0;" (assignment_expression) "table->nvars = 0" (field_expression) "table->nvars" (identifier) "table" (->) "->" (field_identifier) "nvars" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "table->neqs = 0;" (assignment_expression) "table->neqs = 0" (field_expression) "table->neqs" (identifier) "table" (->) "->" (field_identifier) "neqs" (=) "=" (number_literal) "0" (;) ";" (}) "}" (comment) "/*\n * Free all memory used\n */" (function_definition) "void delete_booleq_table(booleq_table_t *table) {\n safe_free(table->def);\n safe_free(table->eq);\n table->def = NULL;\n table->eq = NULL;\n}" (primitive_type) "void" (function_declarator) "delete_booleq_table(booleq_table_t *table)" (identifier) "delete_booleq_table" (parameter_list) "(booleq_table_t *table)" (() "(" (parameter_declaration) "booleq_table_t *table" (type_identifier) "booleq_table_t" (pointer_declarator) "*table" (*) "*" (identifier) "table" ()) ")" (compound_statement) "{\n safe_free(table->def);\n safe_free(table->eq);\n table->def = NULL;\n table->eq = NULL;\n}" ({) "{" (expression_statement) "safe_free(table->def);" (call_expression) "safe_free(table->def)" (identifier) "safe_free" (argument_list) "(table->def)" (() "(" (field_expression) "table->def" (identifier) "table" (->) "->" (field_identifier) "def" ()) ")" (;) ";" (expression_statement) "safe_free(table->eq);" (call_expression) "safe_free(table->eq)" (identifier) "safe_free" (argument_list) "(table->eq)" (() "(" (field_expression) "table->eq" (identifier) "table" (->) "->" (field_identifier) "eq" ()) ")" (;) ";" (expression_statement) "table->def = NULL;" (assignment_expression) "table->def = NULL" (field_expression) "table->def" (identifier) "table" (->) "->" (field_identifier) "def" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "table->eq = NULL;" (assignment_expression) "table->eq = NULL" (field_expression) "table->eq" (identifier) "table" (->) "->" (field_identifier) "eq" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (comment) "/*\n * Record the constraint l := (eq a b)\n * - there must not be any definition for var_of(l)\n */" (function_definition) "void booleq_table_record_eq(booleq_table_t *table, literal_t l, literal_t a, literal_t b) {\n bvar_t x;\n int32_t i;\n\n assert(l >= 0 && a >= 0 && b >= 0);\n\n // normalize; force l to be positive\n a ^= sign_of_lit(l);\n l ^= sign_of_lit(l);\n\n assert(is_pos(l));\n x = var_of(l);\n booleq_table_resize_def(table, x);\n i = booleq_table_alloc_eq(table);\n\n assert(table->def[x] == -1);\n\n table->eq[i].lit[0] = a;\n table->eq[i].lit[1] = b;\n table->def[x] = i;\n}" (primitive_type) "void" (function_declarator) "booleq_table_record_eq(booleq_table_t *table, literal_t l, literal_t a, literal_t b)" (identifier) "booleq_table_record_eq" (parameter_list) "(booleq_table_t *table, literal_t l, literal_t a, literal_t b)" (() "(" (parameter_declaration) "booleq_table_t *table" (type_identifier) "booleq_table_t" (pointer_declarator) "*table" (*) "*" (identifier) "table" (,) "," (parameter_declaration) "literal_t l" (type_identifier) "literal_t" (identifier) "l" (,) "," (parameter_declaration) "literal_t a" (type_identifier) "literal_t" (identifier) "a" (,) "," (parameter_declaration) "literal_t b" (type_identifier) "literal_t" (identifier) "b" ()) ")" (compound_statement) "{\n bvar_t x;\n int32_t i;\n\n assert(l >= 0 && a >= 0 && b >= 0);\n\n // normalize; force l to be positive\n a ^= sign_of_lit(l);\n l ^= sign_of_lit(l);\n\n assert(is_pos(l));\n x = var_of(l);\n booleq_table_resize_def(table, x);\n i = booleq_table_alloc_eq(table);\n\n assert(table->def[x] == -1);\n\n table->eq[i].lit[0] = a;\n table->eq[i].lit[1] = b;\n table->def[x] = i;\n}" ({) "{" (declaration) "bvar_t x;" (type_identifier) "bvar_t" (identifier) "x" (;) ";" (declaration) "int32_t i;" (primitive_type) "int32_t" (identifier) "i" (;) ";" (expression_statement) "assert(l >= 0 && a >= 0 && b >= 0);" (call_expression) "assert(l >= 0 && a >= 0 && b >= 0)" (identifier) "assert" (argument_list) "(l >= 0 && a >= 0 && b >= 0)" (() "(" (binary_expression) "l >= 0 && a >= 0 && b >= 0" (binary_expression) "l >= 0 && a >= 0" (binary_expression) "l >= 0" (identifier) "l" (>=) ">=" (number_literal) "0" (&&) "&&" (binary_expression) "a >= 0" (identifier) "a" (>=) ">=" (number_literal) "0" (&&) "&&" (binary_expression) "b >= 0" (identifier) "b" (>=) ">=" (number_literal) "0" ()) ")" (;) ";" (comment) "// normalize; force l to be positive" (expression_statement) "a ^= sign_of_lit(l);" (assignment_expression) "a ^= sign_of_lit(l)" (identifier) "a" (^=) "^=" (call_expression) "sign_of_lit(l)" (identifier) "sign_of_lit" (argument_list) "(l)" (() "(" (identifier) "l" ()) ")" (;) ";" (expression_statement) "l ^= sign_of_lit(l);" (assignment_expression) "l ^= sign_of_lit(l)" (identifier) "l" (^=) "^=" (call_expression) "sign_of_lit(l)" (identifier) "sign_of_lit" (argument_list) "(l)" (() "(" (identifier) "l" ()) ")" (;) ";" (expression_statement) "assert(is_pos(l));" (call_expression) "assert(is_pos(l))" (identifier) "assert" (argument_list) "(is_pos(l))" (() "(" (call_expression) "is_pos(l)" (identifier) "is_pos" (argument_list) "(l)" (() "(" (identifier) "l" ()) ")" ()) ")" (;) ";" (expression_statement) "x = var_of(l);" (assignment_expression) "x = var_of(l)" (identifier) "x" (=) "=" (call_expression) "var_of(l)" (identifier) "var_of" (argument_list) "(l)" (() "(" (identifier) "l" ()) ")" (;) ";" (expression_statement) "booleq_table_resize_def(table, x);" (call_expression) "booleq_table_resize_def(table, x)" (identifier) "booleq_table_resize_def" (argument_list) "(table, x)" (() "(" (identifier) "table" (,) "," (identifier) "x" ()) ")" (;) ";" (expression_statement) "i = booleq_table_alloc_eq(table);" (assignment_expression) "i = booleq_table_alloc_eq(table)" (identifier) "i" (=) "=" (call_expression) "booleq_table_alloc_eq(table)" (identifier) "booleq_table_alloc_eq" (argument_list) "(table)" (() "(" (identifier) "table" ()) ")" (;) ";" (expression_statement) "assert(table->def[x] == -1);" (call_expression) "assert(table->def[x] == -1)" (identifier) "assert" (argument_list) "(table->def[x] == -1)" (() "(" (binary_expression) "table->def[x] == -1" (subscript_expression) "table->def[x]" (field_expression) "table->def" (identifier) "table" (->) "->" (field_identifier) "def" ([) "[" (identifier) "x" (]) "]" (==) "==" (number_literal) "-1" ()) ")" (;) ";" (expression_statement) "table->eq[i].lit[0] = a;" (assignment_expression) "table->eq[i].lit[0] = a" (subscript_expression) "table->eq[i].lit[0]" (field_expression) "table->eq[i].lit" (subscript_expression) "table->eq[i]" (field_expression) "table->eq" (identifier) "table" (->) "->" (field_identifier) "eq" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "lit" ([) "[" (number_literal) "0" (]) "]" (=) "=" (identifier) "a" (;) ";" (expression_statement) "table->eq[i].lit[1] = b;" (assignment_expression) "table->eq[i].lit[1] = b" (subscript_expression) "table->eq[i].lit[1]" (field_expression) "table->eq[i].lit" (subscript_expression) "table->eq[i]" (field_expression) "table->eq" (identifier) "table" (->) "->" (field_identifier) "eq" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "lit" ([) "[" (number_literal) "1" (]) "]" (=) "=" (identifier) "b" (;) ";" (expression_statement) "table->def[x] = i;" (assignment_expression) "table->def[x] = i" (subscript_expression) "table->def[x]" (field_expression) "table->def" (identifier) "table" (->) "->" (field_identifier) "def" ([) "[" (identifier) "x" (]) "]" (=) "=" (identifier) "i" (;) ";" (}) "}" (comment) "/*\n * Check whether x has a definition in the table\n * - x must be a valid variable index (non-negative)\n */" (function_definition) "bool boolvar_is_eq(booleq_table_t *table, bvar_t x) {\n return x < table->nvars && table->def[x] >= 0;\n}" (primitive_type) "bool" (function_declarator) "boolvar_is_eq(booleq_table_t *table, bvar_t x)" (identifier) "boolvar_is_eq" (parameter_list) "(booleq_table_t *table, bvar_t x)" (() "(" (parameter_declaration) "booleq_table_t *table" (type_identifier) "booleq_table_t" (pointer_declarator) "*table" (*) "*" (identifier) "table" (,) "," (parameter_declaration) "bvar_t x" (type_identifier) "bvar_t" (identifier) "x" ()) ")" (compound_statement) "{\n return x < table->nvars && table->def[x] >= 0;\n}" ({) "{" (return_statement) "return x < table->nvars && table->def[x] >= 0;" (return) "return" (binary_expression) "x < table->nvars && table->def[x] >= 0" (binary_expression) "x < table->nvars" (identifier) "x" (<) "<" (field_expression) "table->nvars" (identifier) "table" (->) "->" (field_identifier) "nvars" (&&) "&&" (binary_expression) "table->def[x] >= 0" (subscript_expression) "table->def[x]" (field_expression) "table->def" (identifier) "table" (->) "->" (field_identifier) "def" ([) "[" (identifier) "x" (]) "]" (>=) ">=" (number_literal) "0" (;) ";" (}) "}" (comment) "/*\n * Get the equality equivalent to l\n * - return false if there's no such equality in table\n * - return true otherwise and set *a and *b\n * If the result is true then the equivalence l <=> (eq *a *b) holds\n */" (function_definition) "bool get_booleq(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b) {\n bvar_t x;\n int32_t i;\n\n assert(l >= 0);\n\n x = var_of(l);\n if (x < table->nvars) {\n i = table->def[x];\n if (i >= 0) {\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }\n }\n\n return false;\n}" (primitive_type) "bool" (function_declarator) "get_booleq(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b)" (identifier) "get_booleq" (parameter_list) "(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b)" (() "(" (parameter_declaration) "booleq_table_t *table" (type_identifier) "booleq_table_t" (pointer_declarator) "*table" (*) "*" (identifier) "table" (,) "," (parameter_declaration) "literal_t l" (type_identifier) "literal_t" (identifier) "l" (,) "," (parameter_declaration) "literal_t *a" (type_identifier) "literal_t" (pointer_declarator) "*a" (*) "*" (identifier) "a" (,) "," (parameter_declaration) "literal_t *b" (type_identifier) "literal_t" (pointer_declarator) "*b" (*) "*" (identifier) "b" ()) ")" (compound_statement) "{\n bvar_t x;\n int32_t i;\n\n assert(l >= 0);\n\n x = var_of(l);\n if (x < table->nvars) {\n i = table->def[x];\n if (i >= 0) {\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }\n }\n\n return false;\n}" ({) "{" (declaration) "bvar_t x;" (type_identifier) "bvar_t" (identifier) "x" (;) ";" (declaration) "int32_t i;" (primitive_type) "int32_t" (identifier) "i" (;) ";" (expression_statement) "assert(l >= 0);" (call_expression) "assert(l >= 0)" (identifier) "assert" (argument_list) "(l >= 0)" (() "(" (binary_expression) "l >= 0" (identifier) "l" (>=) ">=" (number_literal) "0" ()) ")" (;) ";" (expression_statement) "x = var_of(l);" (assignment_expression) "x = var_of(l)" (identifier) "x" (=) "=" (call_expression) "var_of(l)" (identifier) "var_of" (argument_list) "(l)" (() "(" (identifier) "l" ()) ")" (;) ";" (if_statement) "if (x < table->nvars) {\n i = table->def[x];\n if (i >= 0) {\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }\n }" (if) "if" (parenthesized_expression) "(x < table->nvars)" (() "(" (binary_expression) "x < table->nvars" (identifier) "x" (<) "<" (field_expression) "table->nvars" (identifier) "table" (->) "->" (field_identifier) "nvars" ()) ")" (compound_statement) "{\n i = table->def[x];\n if (i >= 0) {\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }\n }" ({) "{" (expression_statement) "i = table->def[x];" (assignment_expression) "i = table->def[x]" (identifier) "i" (=) "=" (subscript_expression) "table->def[x]" (field_expression) "table->def" (identifier) "table" (->) "->" (field_identifier) "def" ([) "[" (identifier) "x" (]) "]" (;) ";" (if_statement) "if (i >= 0) {\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }" (if) "if" (parenthesized_expression) "(i >= 0)" (() "(" (binary_expression) "i >= 0" (identifier) "i" (>=) ">=" (number_literal) "0" ()) ")" (compound_statement) "{\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }" ({) "{" (expression_statement) "*a = table->eq[i].lit[0] ^ sign_of_lit(l);" (assignment_expression) "*a = table->eq[i].lit[0] ^ sign_of_lit(l)" (pointer_expression) "*a" (*) "*" (identifier) "a" (=) "=" (binary_expression) "table->eq[i].lit[0] ^ sign_of_lit(l)" (subscript_expression) "table->eq[i].lit[0]" (field_expression) "table->eq[i].lit" (subscript_expression) "table->eq[i]" (field_expression) "table->eq" (identifier) "table" (->) "->" (field_identifier) "eq" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "lit" ([) "[" (number_literal) "0" (]) "]" (^) "^" (call_expression) "sign_of_lit(l)" (identifier) "sign_of_lit" (argument_list) "(l)" (() "(" (identifier) "l" ()) ")" (;) ";" (expression_statement) "*b = table->eq[i].lit[1];" (assignment_expression) "*b = table->eq[i].lit[1]" (pointer_expression) "*b" (*) "*" (identifier) "b" (=) "=" (subscript_expression) "table->eq[i].lit[1]" (field_expression) "table->eq[i].lit" (subscript_expression) "table->eq[i]" (field_expression) "table->eq" (identifier) "table" (->) "->" (field_identifier) "eq" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "lit" ([) "[" (number_literal) "1" (]) "]" (;) ";" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (}) "}" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}"
1,091
0
{"language": "c", "success": true, "metadata": {"lines": 163, "avg_line_length": 21.98, "nodes": 672, "errors": 0, "source_hash": "1e329eb5ca3e6c1d92dada2f2707b34ccb644c5a3bb9dea8678184a38b982367", "categorized_nodes": 502}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <assert.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<assert.h>", "parent": 0, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include \"scratch/booleq_table.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"scratch/booleq_table.h\"", "parent": 3, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 33}}, {"id": 6, "type": "preproc_include", "text": "#include \"utils/memalloc.h\"\n", "parent": null, "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": "string_literal", "text": "\"utils/memalloc.h\"", "parent": 6, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 27}}, {"id": 9, "type": "function_definition", "text": "void init_booleq_table(booleq_table_t *table) {\n table->def = NULL;\n table->eq = NULL;\n table->nvars = 0;\n table->dsize = 0;\n table->neqs =0;\n table->esize = 0;\n}", "parent": null, "children": [10, 11], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 10, "type": "primitive_type", "text": "void", "parent": 9, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 4}}, {"id": 11, "type": "function_declarator", "text": "init_booleq_table(booleq_table_t *table)", "parent": 9, "children": [12, 13], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 45}}, {"id": 12, "type": "identifier", "text": "init_booleq_table", "parent": 11, "children": [], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 22}}, {"id": 13, "type": "parameter_list", "text": "(booleq_table_t *table)", "parent": 11, "children": [14], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 45}}, {"id": 14, "type": "parameter_declaration", "text": "booleq_table_t *table", "parent": 13, "children": [15, 16], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 44}}, {"id": 15, "type": "type_identifier", "text": "booleq_table_t", "parent": 14, "children": [], "start_point": {"row": 21, "column": 23}, "end_point": {"row": 21, "column": 37}}, {"id": 16, "type": "pointer_declarator", "text": "*table", "parent": 14, "children": [17, 18], "start_point": {"row": 21, "column": 38}, "end_point": {"row": 21, "column": 44}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 21, "column": 38}, "end_point": {"row": 21, "column": 39}}, {"id": 18, "type": "identifier", "text": "table", "parent": 16, "children": [], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 44}}, {"id": 19, "type": "assignment_expression", "text": "table->def = NULL", "parent": 9, "children": [20, 22, 23], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 19}}, {"id": 20, "type": "field_expression", "text": "table->def", "parent": 19, "children": [21], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 12}}, {"id": 21, "type": "identifier", "text": "table", "parent": 20, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 7}}, {"id": 22, "type": "=", "text": "=", "parent": 19, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 14}}, {"id": 23, "type": "null", "text": "NULL", "parent": 19, "children": [24], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 19}}, {"id": 24, "type": "NULL", "text": "NULL", "parent": 23, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 19}}, {"id": 25, "type": "assignment_expression", "text": "table->eq = NULL", "parent": 9, "children": [26, 29, 30], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 18}}, {"id": 26, "type": "field_expression", "text": "table->eq", "parent": 25, "children": [27, 28], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 11}}, {"id": 27, "type": "identifier", "text": "table", "parent": 26, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 7}}, {"id": 28, "type": "field_identifier", "text": "eq", "parent": 26, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 11}}, {"id": 29, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 13}}, {"id": 30, "type": "null", "text": "NULL", "parent": 25, "children": [31], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 18}}, {"id": 31, "type": "NULL", "text": "NULL", "parent": 30, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 18}}, {"id": 32, "type": "assignment_expression", "text": "table->nvars = 0", "parent": 9, "children": [33, 36, 37], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 18}}, {"id": 33, "type": "field_expression", "text": "table->nvars", "parent": 32, "children": [34, 35], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 14}}, {"id": 34, "type": "identifier", "text": "table", "parent": 33, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 7}}, {"id": 35, "type": "field_identifier", "text": "nvars", "parent": 33, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 14}}, {"id": 36, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 16}}, {"id": 37, "type": "number_literal", "text": "0", "parent": 32, "children": [], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 18}}, {"id": 38, "type": "assignment_expression", "text": "table->dsize = 0", "parent": 9, "children": [39, 42, 43], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 18}}, {"id": 39, "type": "field_expression", "text": "table->dsize", "parent": 38, "children": [40, 41], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 14}}, {"id": 40, "type": "identifier", "text": "table", "parent": 39, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 7}}, {"id": 41, "type": "field_identifier", "text": "dsize", "parent": 39, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 14}}, {"id": 42, "type": "=", "text": "=", "parent": 38, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 16}}, {"id": 43, "type": "number_literal", "text": "0", "parent": 38, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 18}}, {"id": 44, "type": "assignment_expression", "text": "table->neqs =0", "parent": 9, "children": [45, 48, 49], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 16}}, {"id": 45, "type": "field_expression", "text": "table->neqs", "parent": 44, "children": [46, 47], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 13}}, {"id": 46, "type": "identifier", "text": "table", "parent": 45, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 7}}, {"id": 47, "type": "field_identifier", "text": "neqs", "parent": 45, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 13}}, {"id": 48, "type": "=", "text": "=", "parent": 44, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 15}}, {"id": 49, "type": "number_literal", "text": "0", "parent": 44, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 16}}, {"id": 50, "type": "assignment_expression", "text": "table->esize = 0", "parent": 9, "children": [51, 54, 55], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 18}}, {"id": 51, "type": "field_expression", "text": "table->esize", "parent": 50, "children": [52, 53], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 14}}, {"id": 52, "type": "identifier", "text": "table", "parent": 51, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 7}}, {"id": 53, "type": "field_identifier", "text": "esize", "parent": 51, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 14}}, {"id": 54, "type": "=", "text": "=", "parent": 50, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 16}}, {"id": 55, "type": "number_literal", "text": "0", "parent": 50, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 18}}, {"id": 56, "type": "function_definition", "text": "static void booleq_table_extend_eq(booleq_table_t *table) {\n uint32_t n;\n\n n = table->esize;\n if (n == 0) {\n // first allocation\n n = BOOLEQ_DEFAULT_ESIZE;\n assert(n > 0 && n <= BOOLEQ_MAX_ESIZE);\n table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t));\n table->esize = n;\n } else {\n // make the table 50% larger\n n += (n >> 1) + 1;\n if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }\n table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));\n table->esize = n;\n }\n}", "parent": null, "children": [57, 58], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 53, "column": 1}}, {"id": 57, "type": "primitive_type", "text": "void", "parent": 56, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 11}}, {"id": 58, "type": "function_declarator", "text": "booleq_table_extend_eq(booleq_table_t *table)", "parent": 56, "children": [59, 60], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 57}}, {"id": 59, "type": "identifier", "text": "booleq_table_extend_eq", "parent": 58, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 34}}, {"id": 60, "type": "parameter_list", "text": "(booleq_table_t *table)", "parent": 58, "children": [61], "start_point": {"row": 34, "column": 34}, "end_point": {"row": 34, "column": 57}}, {"id": 61, "type": "parameter_declaration", "text": "booleq_table_t *table", "parent": 60, "children": [62, 63], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 56}}, {"id": 62, "type": "type_identifier", "text": "booleq_table_t", "parent": 61, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 49}}, {"id": 63, "type": "pointer_declarator", "text": "*table", "parent": 61, "children": [64, 65], "start_point": {"row": 34, "column": 50}, "end_point": {"row": 34, "column": 56}}, {"id": 64, "type": "*", "text": "*", "parent": 63, "children": [], "start_point": {"row": 34, "column": 50}, "end_point": {"row": 34, "column": 51}}, {"id": 65, "type": "identifier", "text": "table", "parent": 63, "children": [], "start_point": {"row": 34, "column": 51}, "end_point": {"row": 34, "column": 56}}, {"id": 66, "type": "declaration", "text": "uint32_t n;", "parent": 56, "children": [67, 68], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 13}}, {"id": 67, "type": "primitive_type", "text": "uint32_t", "parent": 66, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 10}}, {"id": 68, "type": "identifier", "text": "n", "parent": 66, "children": [], "start_point": {"row": 35, "column": 11}, "end_point": {"row": 35, "column": 12}}, {"id": 69, "type": "assignment_expression", "text": "n = table->esize", "parent": 56, "children": [70, 71, 72], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 18}}, {"id": 70, "type": "identifier", "text": "n", "parent": 69, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 3}}, {"id": 71, "type": "=", "text": "=", "parent": 69, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 5}}, {"id": 72, "type": "field_expression", "text": "table->esize", "parent": 69, "children": [73, 74], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 18}}, {"id": 73, "type": "identifier", "text": "table", "parent": 72, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 11}}, {"id": 74, "type": "field_identifier", "text": "esize", "parent": 72, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 18}}, {"id": 75, "type": "if_statement", "text": "if (n == 0) {\n // first allocation\n n = BOOLEQ_DEFAULT_ESIZE;\n assert(n > 0 && n <= BOOLEQ_MAX_ESIZE);\n table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t));\n table->esize = n;\n } else {\n // make the table 50% larger\n n += (n >> 1) + 1;\n if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }\n table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));\n table->esize = n;\n }", "parent": 56, "children": [76, 123], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 52, "column": 3}}, {"id": 76, "type": "parenthesized_expression", "text": "(n == 0)", "parent": 75, "children": [77], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 13}}, {"id": 77, "type": "binary_expression", "text": "n == 0", "parent": 76, "children": [78, 79, 80], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 12}}, {"id": 78, "type": "identifier", "text": "n", "parent": 77, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 7}}, {"id": 79, "type": "==", "text": "==", "parent": 77, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 10}}, {"id": 80, "type": "number_literal", "text": "0", "parent": 77, "children": [], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 12}}, {"id": 81, "type": "assignment_expression", "text": "n = BOOLEQ_DEFAULT_ESIZE", "parent": 75, "children": [82, 83, 84], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 28}}, {"id": 82, "type": "identifier", "text": "n", "parent": 81, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 5}}, {"id": 83, "type": "=", "text": "=", "parent": 81, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 7}}, {"id": 84, "type": "identifier", "text": "BOOLEQ_DEFAULT_ESIZE", "parent": 81, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 28}}, {"id": 85, "type": "call_expression", "text": "assert(n > 0 && n <= BOOLEQ_MAX_ESIZE)", "parent": 75, "children": [86, 87], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 42}}, {"id": 86, "type": "identifier", "text": "assert", "parent": 85, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 10}}, {"id": 87, "type": "argument_list", "text": "(n > 0 && n <= BOOLEQ_MAX_ESIZE)", "parent": 85, "children": [88], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 42}}, {"id": 88, "type": "binary_expression", "text": "n > 0 && n <= BOOLEQ_MAX_ESIZE", "parent": 87, "children": [89, 93, 94], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 41}}, {"id": 89, "type": "binary_expression", "text": "n > 0", "parent": 88, "children": [90, 91, 92], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 16}}, {"id": 90, "type": "identifier", "text": "n", "parent": 89, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 12}}, {"id": 91, "type": ">", "text": ">", "parent": 89, "children": [], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 14}}, {"id": 92, "type": "number_literal", "text": "0", "parent": 89, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 16}}, {"id": 93, "type": "&&", "text": "&&", "parent": 88, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 19}}, {"id": 94, "type": "binary_expression", "text": "n <= BOOLEQ_MAX_ESIZE", "parent": 88, "children": [95, 96, 97], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 41}}, {"id": 95, "type": "identifier", "text": "n", "parent": 94, "children": [], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 21}}, {"id": 96, "type": "<=", "text": "<=", "parent": 94, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 24}}, {"id": 97, "type": "identifier", "text": "BOOLEQ_MAX_ESIZE", "parent": 94, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 41}}, {"id": 98, "type": "assignment_expression", "text": "table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t))", "parent": 75, "children": [99, 102, 103], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 62}}, {"id": 99, "type": "field_expression", "text": "table->eq", "parent": 98, "children": [100, 101], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 13}}, {"id": 100, "type": "identifier", "text": "table", "parent": 99, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 9}}, {"id": 101, "type": "field_identifier", "text": "eq", "parent": 99, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 13}}, {"id": 102, "type": "=", "text": "=", "parent": 98, "children": [], "start_point": {"row": 42, "column": 14}, "end_point": {"row": 42, "column": 15}}, {"id": 103, "type": "cast_expression", "text": "(booleq_t *) safe_malloc(n * sizeof(booleq_t))", "parent": 98, "children": [104, 108], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 62}}, {"id": 104, "type": "type_descriptor", "text": "booleq_t *", "parent": 103, "children": [105, 106], "start_point": {"row": 42, "column": 17}, "end_point": {"row": 42, "column": 27}}, {"id": 105, "type": "type_identifier", "text": "booleq_t", "parent": 104, "children": [], "start_point": {"row": 42, "column": 17}, "end_point": {"row": 42, "column": 25}}, {"id": 106, "type": "abstract_pointer_declarator", "text": "*", "parent": 104, "children": [107], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 27}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 42, "column": 26}, "end_point": {"row": 42, "column": 27}}, {"id": 108, "type": "call_expression", "text": "safe_malloc(n * sizeof(booleq_t))", "parent": 103, "children": [109, 110], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 62}}, {"id": 109, "type": "identifier", "text": "safe_malloc", "parent": 108, "children": [], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 40}}, {"id": 110, "type": "argument_list", "text": "(n * sizeof(booleq_t))", "parent": 108, "children": [111], "start_point": {"row": 42, "column": 40}, "end_point": {"row": 42, "column": 62}}, {"id": 111, "type": "binary_expression", "text": "n * sizeof(booleq_t)", "parent": 110, "children": [112, 113, 114], "start_point": {"row": 42, "column": 41}, "end_point": {"row": 42, "column": 61}}, {"id": 112, "type": "identifier", "text": "n", "parent": 111, "children": [], "start_point": {"row": 42, "column": 41}, "end_point": {"row": 42, "column": 42}}, {"id": 113, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 42, "column": 43}, "end_point": {"row": 42, "column": 44}}, {"id": 114, "type": "sizeof_expression", "text": "sizeof(booleq_t)", "parent": 111, "children": [115], "start_point": {"row": 42, "column": 45}, "end_point": {"row": 42, "column": 61}}, {"id": 115, "type": "parenthesized_expression", "text": "(booleq_t)", "parent": 114, "children": [116], "start_point": {"row": 42, "column": 51}, "end_point": {"row": 42, "column": 61}}, {"id": 116, "type": "identifier", "text": "booleq_t", "parent": 115, "children": [], "start_point": {"row": 42, "column": 52}, "end_point": {"row": 42, "column": 60}}, {"id": 117, "type": "assignment_expression", "text": "table->esize = n", "parent": 75, "children": [118, 121, 122], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 20}}, {"id": 118, "type": "field_expression", "text": "table->esize", "parent": 117, "children": [119, 120], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 16}}, {"id": 119, "type": "identifier", "text": "table", "parent": 118, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 9}}, {"id": 120, "type": "field_identifier", "text": "esize", "parent": 118, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 16}}, {"id": 121, "type": "=", "text": "=", "parent": 117, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 18}}, {"id": 122, "type": "identifier", "text": "n", "parent": 117, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 20}}, {"id": 123, "type": "else_clause", "text": "else {\n // make the table 50% larger\n n += (n >> 1) + 1;\n if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }\n table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));\n table->esize = n;\n }", "parent": 75, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 52, "column": 3}}, {"id": 124, "type": "assignment_expression", "text": "n += (n >> 1) + 1", "parent": 123, "children": [125, 126, 127], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 21}}, {"id": 125, "type": "identifier", "text": "n", "parent": 124, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 5}}, {"id": 126, "type": "+=", "text": "+=", "parent": 124, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 8}}, {"id": 127, "type": "binary_expression", "text": "(n >> 1) + 1", "parent": 124, "children": [128, 133, 134], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 21}}, {"id": 128, "type": "parenthesized_expression", "text": "(n >> 1)", "parent": 127, "children": [129], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 17}}, {"id": 129, "type": "binary_expression", "text": "n >> 1", "parent": 128, "children": [130, 131, 132], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 16}}, {"id": 130, "type": "identifier", "text": "n", "parent": 129, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 11}}, {"id": 131, "type": ">>", "text": ">>", "parent": 129, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 14}}, {"id": 132, "type": "number_literal", "text": "1", "parent": 129, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 16}}, {"id": 133, "type": "+", "text": "+", "parent": 127, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 19}}, {"id": 134, "type": "number_literal", "text": "1", "parent": 127, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 21}}, {"id": 135, "type": "if_statement", "text": "if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }", "parent": 123, "children": [136], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 49, "column": 5}}, {"id": 136, "type": "parenthesized_expression", "text": "(n > BOOLEQ_MAX_ESIZE)", "parent": 135, "children": [137], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 29}}, {"id": 137, "type": "binary_expression", "text": "n > BOOLEQ_MAX_ESIZE", "parent": 136, "children": [138, 139, 140], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 28}}, {"id": 138, "type": "identifier", "text": "n", "parent": 137, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 9}}, {"id": 139, "type": ">", "text": ">", "parent": 137, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 11}}, {"id": 140, "type": "identifier", "text": "BOOLEQ_MAX_ESIZE", "parent": 137, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 28}}, {"id": 141, "type": "call_expression", "text": "out_of_memory()", "parent": 135, "children": [142, 143], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 21}}, {"id": 142, "type": "identifier", "text": "out_of_memory", "parent": 141, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 19}}, {"id": 143, "type": "argument_list", "text": "()", "parent": 141, "children": [], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 21}}, {"id": 144, "type": "assignment_expression", "text": "table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t))", "parent": 123, "children": [145, 148, 149], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 74}}, {"id": 145, "type": "field_expression", "text": "table->eq", "parent": 144, "children": [146, 147], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 13}}, {"id": 146, "type": "identifier", "text": "table", "parent": 145, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 9}}, {"id": 147, "type": "field_identifier", "text": "eq", "parent": 145, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 13}}, {"id": 148, "type": "=", "text": "=", "parent": 144, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 15}}, {"id": 149, "type": "cast_expression", "text": "(booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t))", "parent": 144, "children": [150, 154], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 74}}, {"id": 150, "type": "type_descriptor", "text": "booleq_t *", "parent": 149, "children": [151, 152], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 27}}, {"id": 151, "type": "type_identifier", "text": "booleq_t", "parent": 150, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 25}}, {"id": 152, "type": "abstract_pointer_declarator", "text": "*", "parent": 150, "children": [153], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 27}}, {"id": 153, "type": "*", "text": "*", "parent": 152, "children": [], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 27}}, {"id": 154, "type": "call_expression", "text": "safe_realloc(table->eq, n * sizeof(booleq_t))", "parent": 149, "children": [155, 156], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 74}}, {"id": 155, "type": "identifier", "text": "safe_realloc", "parent": 154, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 41}}, {"id": 156, "type": "argument_list", "text": "(table->eq, n * sizeof(booleq_t))", "parent": 154, "children": [157, 160], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 74}}, {"id": 157, "type": "field_expression", "text": "table->eq", "parent": 156, "children": [158, 159], "start_point": {"row": 50, "column": 42}, "end_point": {"row": 50, "column": 51}}, {"id": 158, "type": "identifier", "text": "table", "parent": 157, "children": [], "start_point": {"row": 50, "column": 42}, "end_point": {"row": 50, "column": 47}}, {"id": 159, "type": "field_identifier", "text": "eq", "parent": 157, "children": [], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 51}}, {"id": 160, "type": "binary_expression", "text": "n * sizeof(booleq_t)", "parent": 156, "children": [161, 162, 163], "start_point": {"row": 50, "column": 53}, "end_point": {"row": 50, "column": 73}}, {"id": 161, "type": "identifier", "text": "n", "parent": 160, "children": [], "start_point": {"row": 50, "column": 53}, "end_point": {"row": 50, "column": 54}}, {"id": 162, "type": "*", "text": "*", "parent": 160, "children": [], "start_point": {"row": 50, "column": 55}, "end_point": {"row": 50, "column": 56}}, {"id": 163, "type": "sizeof_expression", "text": "sizeof(booleq_t)", "parent": 160, "children": [164], "start_point": {"row": 50, "column": 57}, "end_point": {"row": 50, "column": 73}}, {"id": 164, "type": "parenthesized_expression", "text": "(booleq_t)", "parent": 163, "children": [165], "start_point": {"row": 50, "column": 63}, "end_point": {"row": 50, "column": 73}}, {"id": 165, "type": "identifier", "text": "booleq_t", "parent": 164, "children": [], "start_point": {"row": 50, "column": 64}, "end_point": {"row": 50, "column": 72}}, {"id": 166, "type": "assignment_expression", "text": "table->esize = n", "parent": 123, "children": [167, 170, 171], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 20}}, {"id": 167, "type": "field_expression", "text": "table->esize", "parent": 166, "children": [168, 169], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 16}}, {"id": 168, "type": "identifier", "text": "table", "parent": 167, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 9}}, {"id": 169, "type": "field_identifier", "text": "esize", "parent": 167, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 16}}, {"id": 170, "type": "=", "text": "=", "parent": 166, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 18}}, {"id": 171, "type": "identifier", "text": "n", "parent": 166, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 20}}, {"id": 172, "type": "function_definition", "text": "static int32_t booleq_table_alloc_eq(booleq_table_t *table) {\n uint32_t i;\n\n i = table->neqs;\n if (i == table->esize) {\n booleq_table_extend_eq(table);\n }\n assert(i < table->esize);\n table->neqs = i+1;\n\n return i;\n}", "parent": null, "children": [173, 174], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 70, "column": 1}}, {"id": 173, "type": "primitive_type", "text": "int32_t", "parent": 172, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 14}}, {"id": 174, "type": "function_declarator", "text": "booleq_table_alloc_eq(booleq_table_t *table)", "parent": 172, "children": [175, 176], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 59}}, {"id": 175, "type": "identifier", "text": "booleq_table_alloc_eq", "parent": 174, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 36}}, {"id": 176, "type": "parameter_list", "text": "(booleq_table_t *table)", "parent": 174, "children": [177], "start_point": {"row": 59, "column": 36}, "end_point": {"row": 59, "column": 59}}, {"id": 177, "type": "parameter_declaration", "text": "booleq_table_t *table", "parent": 176, "children": [178, 179], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 58}}, {"id": 178, "type": "type_identifier", "text": "booleq_table_t", "parent": 177, "children": [], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 51}}, {"id": 179, "type": "pointer_declarator", "text": "*table", "parent": 177, "children": [180, 181], "start_point": {"row": 59, "column": 52}, "end_point": {"row": 59, "column": 58}}, {"id": 180, "type": "*", "text": "*", "parent": 179, "children": [], "start_point": {"row": 59, "column": 52}, "end_point": {"row": 59, "column": 53}}, {"id": 181, "type": "identifier", "text": "table", "parent": 179, "children": [], "start_point": {"row": 59, "column": 53}, "end_point": {"row": 59, "column": 58}}, {"id": 182, "type": "declaration", "text": "uint32_t i;", "parent": 172, "children": [183, 184], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 13}}, {"id": 183, "type": "primitive_type", "text": "uint32_t", "parent": 182, "children": [], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 10}}, {"id": 184, "type": "identifier", "text": "i", "parent": 182, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 12}}, {"id": 185, "type": "assignment_expression", "text": "i = table->neqs", "parent": 172, "children": [186, 187, 188], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 17}}, {"id": 186, "type": "identifier", "text": "i", "parent": 185, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 3}}, {"id": 187, "type": "=", "text": "=", "parent": 185, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 5}}, {"id": 188, "type": "field_expression", "text": "table->neqs", "parent": 185, "children": [189, 190], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 17}}, {"id": 189, "type": "identifier", "text": "table", "parent": 188, "children": [], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 62, "column": 11}}, {"id": 190, "type": "field_identifier", "text": "neqs", "parent": 188, "children": [], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 17}}, {"id": 191, "type": "if_statement", "text": "if (i == table->esize) {\n booleq_table_extend_eq(table);\n }", "parent": 172, "children": [192], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 65, "column": 3}}, {"id": 192, "type": "parenthesized_expression", "text": "(i == table->esize)", "parent": 191, "children": [193], "start_point": {"row": 63, "column": 5}, "end_point": {"row": 63, "column": 24}}, {"id": 193, "type": "binary_expression", "text": "i == table->esize", "parent": 192, "children": [194, 195, 196], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 23}}, {"id": 194, "type": "identifier", "text": "i", "parent": 193, "children": [], "start_point": {"row": 63, "column": 6}, "end_point": {"row": 63, "column": 7}}, {"id": 195, "type": "==", "text": "==", "parent": 193, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 10}}, {"id": 196, "type": "field_expression", "text": "table->esize", "parent": 193, "children": [197, 198], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 23}}, {"id": 197, "type": "identifier", "text": "table", "parent": 196, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 16}}, {"id": 198, "type": "field_identifier", "text": "esize", "parent": 196, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 23}}, {"id": 199, "type": "call_expression", "text": "booleq_table_extend_eq(table)", "parent": 191, "children": [200, 201], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 33}}, {"id": 200, "type": "identifier", "text": "booleq_table_extend_eq", "parent": 199, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 26}}, {"id": 201, "type": "argument_list", "text": "(table)", "parent": 199, "children": [202], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 33}}, {"id": 202, "type": "identifier", "text": "table", "parent": 201, "children": [], "start_point": {"row": 64, "column": 27}, "end_point": {"row": 64, "column": 32}}, {"id": 203, "type": "call_expression", "text": "assert(i < table->esize)", "parent": 172, "children": [204, 205], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 26}}, {"id": 204, "type": "identifier", "text": "assert", "parent": 203, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 8}}, {"id": 205, "type": "argument_list", "text": "(i < table->esize)", "parent": 203, "children": [206], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 26}}, {"id": 206, "type": "binary_expression", "text": "i < table->esize", "parent": 205, "children": [207, 208, 209], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 25}}, {"id": 207, "type": "identifier", "text": "i", "parent": 206, "children": [], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 10}}, {"id": 208, "type": "<", "text": "<", "parent": 206, "children": [], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 12}}, {"id": 209, "type": "field_expression", "text": "table->esize", "parent": 206, "children": [210, 211], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 25}}, {"id": 210, "type": "identifier", "text": "table", "parent": 209, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 18}}, {"id": 211, "type": "field_identifier", "text": "esize", "parent": 209, "children": [], "start_point": {"row": 66, "column": 20}, "end_point": {"row": 66, "column": 25}}, {"id": 212, "type": "assignment_expression", "text": "table->neqs = i+1", "parent": 172, "children": [213, 216, 217], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 19}}, {"id": 213, "type": "field_expression", "text": "table->neqs", "parent": 212, "children": [214, 215], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 13}}, {"id": 214, "type": "identifier", "text": "table", "parent": 213, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 7}}, {"id": 215, "type": "field_identifier", "text": "neqs", "parent": 213, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 13}}, {"id": 216, "type": "=", "text": "=", "parent": 212, "children": [], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 15}}, {"id": 217, "type": "binary_expression", "text": "i+1", "parent": 212, "children": [218, 219, 220], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 19}}, {"id": 218, "type": "identifier", "text": "i", "parent": 217, "children": [], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 17}}, {"id": 219, "type": "+", "text": "+", "parent": 217, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 18}}, {"id": 220, "type": "number_literal", "text": "1", "parent": 217, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 19}}, {"id": 221, "type": "return_statement", "text": "return i;", "parent": 172, "children": [222], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 11}}, {"id": 222, "type": "identifier", "text": "i", "parent": 221, "children": [], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 10}}, {"id": 223, "type": "function_definition", "text": "static void booleq_table_resize_def(booleq_table_t *table, uint32_t x) {\n uint32_t i, n;\n\n if (x >= table->nvars) {\n n = table->dsize;\n if (x >= n) {\n // allocate a larger array\n if (n == 0) {\n\tn = BOOLEQ_DEFAULT_DSIZE;\n } else {\n\tn += (n >> 1) + 1;\n }\n if (x >= n) {\n\tn = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n\tout_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }\n\n for (i=table->nvars; i<=x; i++) {\n table->def[i] = -1;\n }\n table->nvars = x + 1;\n }\n}", "parent": null, "children": [224, 225], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 105, "column": 1}}, {"id": 224, "type": "primitive_type", "text": "void", "parent": 223, "children": [], "start_point": {"row": 77, "column": 7}, "end_point": {"row": 77, "column": 11}}, {"id": 225, "type": "function_declarator", "text": "booleq_table_resize_def(booleq_table_t *table, uint32_t x)", "parent": 223, "children": [226, 227], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 70}}, {"id": 226, "type": "identifier", "text": "booleq_table_resize_def", "parent": 225, "children": [], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 35}}, {"id": 227, "type": "parameter_list", "text": "(booleq_table_t *table, uint32_t x)", "parent": 225, "children": [228, 233], "start_point": {"row": 77, "column": 35}, "end_point": {"row": 77, "column": 70}}, {"id": 228, "type": "parameter_declaration", "text": "booleq_table_t *table", "parent": 227, "children": [229, 230], "start_point": {"row": 77, "column": 36}, "end_point": {"row": 77, "column": 57}}, {"id": 229, "type": "type_identifier", "text": "booleq_table_t", "parent": 228, "children": [], "start_point": {"row": 77, "column": 36}, "end_point": {"row": 77, "column": 50}}, {"id": 230, "type": "pointer_declarator", "text": "*table", "parent": 228, "children": [231, 232], "start_point": {"row": 77, "column": 51}, "end_point": {"row": 77, "column": 57}}, {"id": 231, "type": "*", "text": "*", "parent": 230, "children": [], "start_point": {"row": 77, "column": 51}, "end_point": {"row": 77, "column": 52}}, {"id": 232, "type": "identifier", "text": "table", "parent": 230, "children": [], "start_point": {"row": 77, "column": 52}, "end_point": {"row": 77, "column": 57}}, {"id": 233, "type": "parameter_declaration", "text": "uint32_t x", "parent": 227, "children": [234, 235], "start_point": {"row": 77, "column": 59}, "end_point": {"row": 77, "column": 69}}, {"id": 234, "type": "primitive_type", "text": "uint32_t", "parent": 233, "children": [], "start_point": {"row": 77, "column": 59}, "end_point": {"row": 77, "column": 67}}, {"id": 235, "type": "identifier", "text": "x", "parent": 233, "children": [], "start_point": {"row": 77, "column": 68}, "end_point": {"row": 77, "column": 69}}, {"id": 236, "type": "declaration", "text": "uint32_t i, n;", "parent": 223, "children": [237, 238, 239], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 16}}, {"id": 237, "type": "primitive_type", "text": "uint32_t", "parent": 236, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 10}}, {"id": 238, "type": "identifier", "text": "i", "parent": 236, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 12}}, {"id": 239, "type": "identifier", "text": "n", "parent": 236, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 15}}, {"id": 240, "type": "if_statement", "text": "if (x >= table->nvars) {\n n = table->dsize;\n if (x >= n) {\n // allocate a larger array\n if (n == 0) {\n\tn = BOOLEQ_DEFAULT_DSIZE;\n } else {\n\tn += (n >> 1) + 1;\n }\n if (x >= n) {\n\tn = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n\tout_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }\n\n for (i=table->nvars; i<=x; i++) {\n table->def[i] = -1;\n }\n table->nvars = x + 1;\n }", "parent": 223, "children": [241], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 104, "column": 3}}, {"id": 241, "type": "parenthesized_expression", "text": "(x >= table->nvars)", "parent": 240, "children": [242], "start_point": {"row": 80, "column": 5}, "end_point": {"row": 80, "column": 24}}, {"id": 242, "type": "binary_expression", "text": "x >= table->nvars", "parent": 241, "children": [243, 244, 245], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 23}}, {"id": 243, "type": "identifier", "text": "x", "parent": 242, "children": [], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 7}}, {"id": 244, "type": ">=", "text": ">=", "parent": 242, "children": [], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 10}}, {"id": 245, "type": "field_expression", "text": "table->nvars", "parent": 242, "children": [246, 247], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 23}}, {"id": 246, "type": "identifier", "text": "table", "parent": 245, "children": [], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 16}}, {"id": 247, "type": "field_identifier", "text": "nvars", "parent": 245, "children": [], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 23}}, {"id": 248, "type": "assignment_expression", "text": "n = table->dsize", "parent": 240, "children": [249, 250, 251], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 20}}, {"id": 249, "type": "identifier", "text": "n", "parent": 248, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 5}}, {"id": 250, "type": "=", "text": "=", "parent": 248, "children": [], "start_point": {"row": 81, "column": 6}, "end_point": {"row": 81, "column": 7}}, {"id": 251, "type": "field_expression", "text": "table->dsize", "parent": 248, "children": [252, 253], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 20}}, {"id": 252, "type": "identifier", "text": "table", "parent": 251, "children": [], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 13}}, {"id": 253, "type": "field_identifier", "text": "dsize", "parent": 251, "children": [], "start_point": {"row": 81, "column": 15}, "end_point": {"row": 81, "column": 20}}, {"id": 254, "type": "if_statement", "text": "if (x >= n) {\n // allocate a larger array\n if (n == 0) {\n\tn = BOOLEQ_DEFAULT_DSIZE;\n } else {\n\tn += (n >> 1) + 1;\n }\n if (x >= n) {\n\tn = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n\tout_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }", "parent": 240, "children": [255], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 98, "column": 5}}, {"id": 255, "type": "parenthesized_expression", "text": "(x >= n)", "parent": 254, "children": [256], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 82, "column": 15}}, {"id": 256, "type": "binary_expression", "text": "x >= n", "parent": 255, "children": [257, 258, 259], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 14}}, {"id": 257, "type": "identifier", "text": "x", "parent": 256, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 9}}, {"id": 258, "type": ">=", "text": ">=", "parent": 256, "children": [], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 12}}, {"id": 259, "type": "identifier", "text": "n", "parent": 256, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 14}}, {"id": 260, "type": "if_statement", "text": "if (n == 0) {\n\tn = BOOLEQ_DEFAULT_DSIZE;\n } else {\n\tn += (n >> 1) + 1;\n }", "parent": 254, "children": [261, 270], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 88, "column": 7}}, {"id": 261, "type": "parenthesized_expression", "text": "(n == 0)", "parent": 260, "children": [262], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 17}}, {"id": 262, "type": "binary_expression", "text": "n == 0", "parent": 261, "children": [263, 264, 265], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 16}}, {"id": 263, "type": "identifier", "text": "n", "parent": 262, "children": [], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 11}}, {"id": 264, "type": "==", "text": "==", "parent": 262, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 14}}, {"id": 265, "type": "number_literal", "text": "0", "parent": 262, "children": [], "start_point": {"row": 84, "column": 15}, "end_point": {"row": 84, "column": 16}}, {"id": 266, "type": "assignment_expression", "text": "n = BOOLEQ_DEFAULT_DSIZE", "parent": 260, "children": [267, 268, 269], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 25}}, {"id": 267, "type": "identifier", "text": "n", "parent": 266, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 2}}, {"id": 268, "type": "=", "text": "=", "parent": 266, "children": [], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 4}}, {"id": 269, "type": "identifier", "text": "BOOLEQ_DEFAULT_DSIZE", "parent": 266, "children": [], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 25}}, {"id": 270, "type": "else_clause", "text": "else {\n\tn += (n >> 1) + 1;\n }", "parent": 260, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 88, "column": 7}}, {"id": 271, "type": "assignment_expression", "text": "n += (n >> 1) + 1", "parent": 270, "children": [272, 273, 274], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 18}}, {"id": 272, "type": "identifier", "text": "n", "parent": 271, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 2}}, {"id": 273, "type": "+=", "text": "+=", "parent": 271, "children": [], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 5}}, {"id": 274, "type": "binary_expression", "text": "(n >> 1) + 1", "parent": 271, "children": [275, 280, 281], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 18}}, {"id": 275, "type": "parenthesized_expression", "text": "(n >> 1)", "parent": 274, "children": [276], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 14}}, {"id": 276, "type": "binary_expression", "text": "n >> 1", "parent": 275, "children": [277, 278, 279], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 13}}, {"id": 277, "type": "identifier", "text": "n", "parent": 276, "children": [], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 8}}, {"id": 278, "type": ">>", "text": ">>", "parent": 276, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 11}}, {"id": 279, "type": "number_literal", "text": "1", "parent": 276, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 13}}, {"id": 280, "type": "+", "text": "+", "parent": 274, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 16}}, {"id": 281, "type": "number_literal", "text": "1", "parent": 274, "children": [], "start_point": {"row": 87, "column": 17}, "end_point": {"row": 87, "column": 18}}, {"id": 282, "type": "if_statement", "text": "if (x >= n) {\n\tn = x + 1;\n }", "parent": 254, "children": [283], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 91, "column": 7}}, {"id": 283, "type": "parenthesized_expression", "text": "(x >= n)", "parent": 282, "children": [284], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 17}}, {"id": 284, "type": "binary_expression", "text": "x >= n", "parent": 283, "children": [285, 286, 287], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 16}}, {"id": 285, "type": "identifier", "text": "x", "parent": 284, "children": [], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 11}}, {"id": 286, "type": ">=", "text": ">=", "parent": 284, "children": [], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 14}}, {"id": 287, "type": "identifier", "text": "n", "parent": 284, "children": [], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 16}}, {"id": 288, "type": "assignment_expression", "text": "n = x + 1", "parent": 282, "children": [289, 290, 291], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 10}}, {"id": 289, "type": "identifier", "text": "n", "parent": 288, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 2}}, {"id": 290, "type": "=", "text": "=", "parent": 288, "children": [], "start_point": {"row": 90, "column": 3}, "end_point": {"row": 90, "column": 4}}, {"id": 291, "type": "binary_expression", "text": "x + 1", "parent": 288, "children": [292, 293, 294], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 10}}, {"id": 292, "type": "identifier", "text": "x", "parent": 291, "children": [], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 6}}, {"id": 293, "type": "+", "text": "+", "parent": 291, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 8}}, {"id": 294, "type": "number_literal", "text": "1", "parent": 291, "children": [], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 10}}, {"id": 295, "type": "if_statement", "text": "if (n > BOOLEQ_MAX_DSIZE) {\n\tout_of_memory();\n }", "parent": 254, "children": [296], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 94, "column": 7}}, {"id": 296, "type": "parenthesized_expression", "text": "(n > BOOLEQ_MAX_DSIZE)", "parent": 295, "children": [297], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 31}}, {"id": 297, "type": "binary_expression", "text": "n > BOOLEQ_MAX_DSIZE", "parent": 296, "children": [298, 299, 300], "start_point": {"row": 92, "column": 10}, "end_point": {"row": 92, "column": 30}}, {"id": 298, "type": "identifier", "text": "n", "parent": 297, "children": [], "start_point": {"row": 92, "column": 10}, "end_point": {"row": 92, "column": 11}}, {"id": 299, "type": ">", "text": ">", "parent": 297, "children": [], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 13}}, {"id": 300, "type": "identifier", "text": "BOOLEQ_MAX_DSIZE", "parent": 297, "children": [], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 30}}, {"id": 301, "type": "call_expression", "text": "out_of_memory()", "parent": 295, "children": [302, 303], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 16}}, {"id": 302, "type": "identifier", "text": "out_of_memory", "parent": 301, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 14}}, {"id": 303, "type": "argument_list", "text": "()", "parent": 301, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 16}}, {"id": 304, "type": "assignment_expression", "text": "table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t))", "parent": 254, "children": [305, 307, 308], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 76}}, {"id": 305, "type": "field_expression", "text": "table->def", "parent": 304, "children": [306], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 16}}, {"id": 306, "type": "identifier", "text": "table", "parent": 305, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 11}}, {"id": 307, "type": "=", "text": "=", "parent": 304, "children": [], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 18}}, {"id": 308, "type": "cast_expression", "text": "(int32_t *) safe_realloc(table->def, n * sizeof(int32_t))", "parent": 304, "children": [309, 313], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 76}}, {"id": 309, "type": "type_descriptor", "text": "int32_t *", "parent": 308, "children": [310, 311], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 29}}, {"id": 310, "type": "primitive_type", "text": "int32_t", "parent": 309, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 27}}, {"id": 311, "type": "abstract_pointer_declarator", "text": "*", "parent": 309, "children": [312], "start_point": {"row": 96, "column": 28}, "end_point": {"row": 96, "column": 29}}, {"id": 312, "type": "*", "text": "*", "parent": 311, "children": [], "start_point": {"row": 96, "column": 28}, "end_point": {"row": 96, "column": 29}}, {"id": 313, "type": "call_expression", "text": "safe_realloc(table->def, n * sizeof(int32_t))", "parent": 308, "children": [314, 315], "start_point": {"row": 96, "column": 31}, "end_point": {"row": 96, "column": 76}}, {"id": 314, "type": "identifier", "text": "safe_realloc", "parent": 313, "children": [], "start_point": {"row": 96, "column": 31}, "end_point": {"row": 96, "column": 43}}, {"id": 315, "type": "argument_list", "text": "(table->def, n * sizeof(int32_t))", "parent": 313, "children": [316, 318], "start_point": {"row": 96, "column": 43}, "end_point": {"row": 96, "column": 76}}, {"id": 316, "type": "field_expression", "text": "table->def", "parent": 315, "children": [317], "start_point": {"row": 96, "column": 44}, "end_point": {"row": 96, "column": 54}}, {"id": 317, "type": "identifier", "text": "table", "parent": 316, "children": [], "start_point": {"row": 96, "column": 44}, "end_point": {"row": 96, "column": 49}}, {"id": 318, "type": "binary_expression", "text": "n * sizeof(int32_t)", "parent": 315, "children": [319, 320, 321], "start_point": {"row": 96, "column": 56}, "end_point": {"row": 96, "column": 75}}, {"id": 319, "type": "identifier", "text": "n", "parent": 318, "children": [], "start_point": {"row": 96, "column": 56}, "end_point": {"row": 96, "column": 57}}, {"id": 320, "type": "*", "text": "*", "parent": 318, "children": [], "start_point": {"row": 96, "column": 58}, "end_point": {"row": 96, "column": 59}}, {"id": 321, "type": "sizeof_expression", "text": "sizeof(int32_t)", "parent": 318, "children": [322], "start_point": {"row": 96, "column": 60}, "end_point": {"row": 96, "column": 75}}, {"id": 322, "type": "type_descriptor", "text": "int32_t", "parent": 321, "children": [323], "start_point": {"row": 96, "column": 67}, "end_point": {"row": 96, "column": 74}}, {"id": 323, "type": "primitive_type", "text": "int32_t", "parent": 322, "children": [], "start_point": {"row": 96, "column": 67}, "end_point": {"row": 96, "column": 74}}, {"id": 324, "type": "assignment_expression", "text": "table->dsize = n", "parent": 254, "children": [325, 328, 329], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 22}}, {"id": 325, "type": "field_expression", "text": "table->dsize", "parent": 324, "children": [326, 327], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 18}}, {"id": 326, "type": "identifier", "text": "table", "parent": 325, "children": [], "start_point": {"row": 97, "column": 6}, "end_point": {"row": 97, "column": 11}}, {"id": 327, "type": "field_identifier", "text": "dsize", "parent": 325, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 18}}, {"id": 328, "type": "=", "text": "=", "parent": 324, "children": [], "start_point": {"row": 97, "column": 19}, "end_point": {"row": 97, "column": 20}}, {"id": 329, "type": "identifier", "text": "n", "parent": 324, "children": [], "start_point": {"row": 97, "column": 21}, "end_point": {"row": 97, "column": 22}}, {"id": 330, "type": "for_statement", "text": "for (i=table->nvars; i<=x; i++) {\n table->def[i] = -1;\n }", "parent": 240, "children": [331, 337, 341], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 102, "column": 5}}, {"id": 331, "type": "assignment_expression", "text": "i=table->nvars", "parent": 330, "children": [332, 333, 334], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 23}}, {"id": 332, "type": "identifier", "text": "i", "parent": 331, "children": [], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 10}}, {"id": 333, "type": "=", "text": "=", "parent": 331, "children": [], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 11}}, {"id": 334, "type": "field_expression", "text": "table->nvars", "parent": 331, "children": [335, 336], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 23}}, {"id": 335, "type": "identifier", "text": "table", "parent": 334, "children": [], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 16}}, {"id": 336, "type": "field_identifier", "text": "nvars", "parent": 334, "children": [], "start_point": {"row": 100, "column": 18}, "end_point": {"row": 100, "column": 23}}, {"id": 337, "type": "binary_expression", "text": "i<=x", "parent": 330, "children": [338, 339, 340], "start_point": {"row": 100, "column": 25}, "end_point": {"row": 100, "column": 29}}, {"id": 338, "type": "identifier", "text": "i", "parent": 337, "children": [], "start_point": {"row": 100, "column": 25}, "end_point": {"row": 100, "column": 26}}, {"id": 339, "type": "<=", "text": "<=", "parent": 337, "children": [], "start_point": {"row": 100, "column": 26}, "end_point": {"row": 100, "column": 28}}, {"id": 340, "type": "identifier", "text": "x", "parent": 337, "children": [], "start_point": {"row": 100, "column": 28}, "end_point": {"row": 100, "column": 29}}, {"id": 341, "type": "update_expression", "text": "i++", "parent": 330, "children": [342, 343], "start_point": {"row": 100, "column": 31}, "end_point": {"row": 100, "column": 34}}, {"id": 342, "type": "identifier", "text": "i", "parent": 341, "children": [], "start_point": {"row": 100, "column": 31}, "end_point": {"row": 100, "column": 32}}, {"id": 343, "type": "++", "text": "++", "parent": 341, "children": [], "start_point": {"row": 100, "column": 32}, "end_point": {"row": 100, "column": 34}}, {"id": 344, "type": "assignment_expression", "text": "table->def[i] = -1", "parent": 330, "children": [345, 349, 350], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 24}}, {"id": 345, "type": "subscript_expression", "text": "table->def[i]", "parent": 344, "children": [346, 348], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 19}}, {"id": 346, "type": "field_expression", "text": "table->def", "parent": 345, "children": [347], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 16}}, {"id": 347, "type": "identifier", "text": "table", "parent": 346, "children": [], "start_point": {"row": 101, "column": 6}, "end_point": {"row": 101, "column": 11}}, {"id": 348, "type": "identifier", "text": "i", "parent": 345, "children": [], "start_point": {"row": 101, "column": 17}, "end_point": {"row": 101, "column": 18}}, {"id": 349, "type": "=", "text": "=", "parent": 344, "children": [], "start_point": {"row": 101, "column": 20}, "end_point": {"row": 101, "column": 21}}, {"id": 350, "type": "number_literal", "text": "-1", "parent": 344, "children": [], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 24}}, {"id": 351, "type": "assignment_expression", "text": "table->nvars = x + 1", "parent": 240, "children": [352, 355, 356], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 24}}, {"id": 352, "type": "field_expression", "text": "table->nvars", "parent": 351, "children": [353, 354], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 16}}, {"id": 353, "type": "identifier", "text": "table", "parent": 352, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 9}}, {"id": 354, "type": "field_identifier", "text": "nvars", "parent": 352, "children": [], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 16}}, {"id": 355, "type": "=", "text": "=", "parent": 351, "children": [], "start_point": {"row": 103, "column": 17}, "end_point": {"row": 103, "column": 18}}, {"id": 356, "type": "binary_expression", "text": "x + 1", "parent": 351, "children": [357, 358, 359], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 24}}, {"id": 357, "type": "identifier", "text": "x", "parent": 356, "children": [], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 20}}, {"id": 358, "type": "+", "text": "+", "parent": 356, "children": [], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 22}}, {"id": 359, "type": "number_literal", "text": "1", "parent": 356, "children": [], "start_point": {"row": 103, "column": 23}, "end_point": {"row": 103, "column": 24}}, {"id": 360, "type": "function_definition", "text": "void reset_booleq_table(booleq_table_t *table) {\n table->nvars = 0;\n table->neqs = 0;\n}", "parent": null, "children": [361, 362], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 116, "column": 1}}, {"id": 361, "type": "primitive_type", "text": "void", "parent": 360, "children": [], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 4}}, {"id": 362, "type": "function_declarator", "text": "reset_booleq_table(booleq_table_t *table)", "parent": 360, "children": [363, 364], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 46}}, {"id": 363, "type": "identifier", "text": "reset_booleq_table", "parent": 362, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 23}}, {"id": 364, "type": "parameter_list", "text": "(booleq_table_t *table)", "parent": 362, "children": [365], "start_point": {"row": 113, "column": 23}, "end_point": {"row": 113, "column": 46}}, {"id": 365, "type": "parameter_declaration", "text": "booleq_table_t *table", "parent": 364, "children": [366, 367], "start_point": {"row": 113, "column": 24}, "end_point": {"row": 113, "column": 45}}, {"id": 366, "type": "type_identifier", "text": "booleq_table_t", "parent": 365, "children": [], "start_point": {"row": 113, "column": 24}, "end_point": {"row": 113, "column": 38}}, {"id": 367, "type": "pointer_declarator", "text": "*table", "parent": 365, "children": [368, 369], "start_point": {"row": 113, "column": 39}, "end_point": {"row": 113, "column": 45}}, {"id": 368, "type": "*", "text": "*", "parent": 367, "children": [], "start_point": {"row": 113, "column": 39}, "end_point": {"row": 113, "column": 40}}, {"id": 369, "type": "identifier", "text": "table", "parent": 367, "children": [], "start_point": {"row": 113, "column": 40}, "end_point": {"row": 113, "column": 45}}, {"id": 370, "type": "assignment_expression", "text": "table->nvars = 0", "parent": 360, "children": [371, 374, 375], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 18}}, {"id": 371, "type": "field_expression", "text": "table->nvars", "parent": 370, "children": [372, 373], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 14}}, {"id": 372, "type": "identifier", "text": "table", "parent": 371, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 7}}, {"id": 373, "type": "field_identifier", "text": "nvars", "parent": 371, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 14}}, {"id": 374, "type": "=", "text": "=", "parent": 370, "children": [], "start_point": {"row": 114, "column": 15}, "end_point": {"row": 114, "column": 16}}, {"id": 375, "type": "number_literal", "text": "0", "parent": 370, "children": [], "start_point": {"row": 114, "column": 17}, "end_point": {"row": 114, "column": 18}}, {"id": 376, "type": "assignment_expression", "text": "table->neqs = 0", "parent": 360, "children": [377, 380, 381], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 17}}, {"id": 377, "type": "field_expression", "text": "table->neqs", "parent": 376, "children": [378, 379], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 13}}, {"id": 378, "type": "identifier", "text": "table", "parent": 377, "children": [], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 7}}, {"id": 379, "type": "field_identifier", "text": "neqs", "parent": 377, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 13}}, {"id": 380, "type": "=", "text": "=", "parent": 376, "children": [], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 15}}, {"id": 381, "type": "number_literal", "text": "0", "parent": 376, "children": [], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 17}}, {"id": 382, "type": "function_definition", "text": "void delete_booleq_table(booleq_table_t *table) {\n safe_free(table->def);\n safe_free(table->eq);\n table->def = NULL;\n table->eq = NULL;\n}", "parent": null, "children": [383, 384], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 127, "column": 1}}, {"id": 383, "type": "primitive_type", "text": "void", "parent": 382, "children": [], "start_point": {"row": 122, "column": 0}, "end_point": {"row": 122, "column": 4}}, {"id": 384, "type": "function_declarator", "text": "delete_booleq_table(booleq_table_t *table)", "parent": 382, "children": [385, 386], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 47}}, {"id": 385, "type": "identifier", "text": "delete_booleq_table", "parent": 384, "children": [], "start_point": {"row": 122, "column": 5}, "end_point": {"row": 122, "column": 24}}, {"id": 386, "type": "parameter_list", "text": "(booleq_table_t *table)", "parent": 384, "children": [387], "start_point": {"row": 122, "column": 24}, "end_point": {"row": 122, "column": 47}}, {"id": 387, "type": "parameter_declaration", "text": "booleq_table_t *table", "parent": 386, "children": [388, 389], "start_point": {"row": 122, "column": 25}, "end_point": {"row": 122, "column": 46}}, {"id": 388, "type": "type_identifier", "text": "booleq_table_t", "parent": 387, "children": [], "start_point": {"row": 122, "column": 25}, "end_point": {"row": 122, "column": 39}}, {"id": 389, "type": "pointer_declarator", "text": "*table", "parent": 387, "children": [390, 391], "start_point": {"row": 122, "column": 40}, "end_point": {"row": 122, "column": 46}}, {"id": 390, "type": "*", "text": "*", "parent": 389, "children": [], "start_point": {"row": 122, "column": 40}, "end_point": {"row": 122, "column": 41}}, {"id": 391, "type": "identifier", "text": "table", "parent": 389, "children": [], "start_point": {"row": 122, "column": 41}, "end_point": {"row": 122, "column": 46}}, {"id": 392, "type": "call_expression", "text": "safe_free(table->def)", "parent": 382, "children": [393, 394], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 23}}, {"id": 393, "type": "identifier", "text": "safe_free", "parent": 392, "children": [], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 11}}, {"id": 394, "type": "argument_list", "text": "(table->def)", "parent": 392, "children": [395], "start_point": {"row": 123, "column": 11}, "end_point": {"row": 123, "column": 23}}, {"id": 395, "type": "field_expression", "text": "table->def", "parent": 394, "children": [396], "start_point": {"row": 123, "column": 12}, "end_point": {"row": 123, "column": 22}}, {"id": 396, "type": "identifier", "text": "table", "parent": 395, "children": [], "start_point": {"row": 123, "column": 12}, "end_point": {"row": 123, "column": 17}}, {"id": 397, "type": "call_expression", "text": "safe_free(table->eq)", "parent": 382, "children": [398, 399], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 22}}, {"id": 398, "type": "identifier", "text": "safe_free", "parent": 397, "children": [], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 11}}, {"id": 399, "type": "argument_list", "text": "(table->eq)", "parent": 397, "children": [400], "start_point": {"row": 124, "column": 11}, "end_point": {"row": 124, "column": 22}}, {"id": 400, "type": "field_expression", "text": "table->eq", "parent": 399, "children": [401, 402], "start_point": {"row": 124, "column": 12}, "end_point": {"row": 124, "column": 21}}, {"id": 401, "type": "identifier", "text": "table", "parent": 400, "children": [], "start_point": {"row": 124, "column": 12}, "end_point": {"row": 124, "column": 17}}, {"id": 402, "type": "field_identifier", "text": "eq", "parent": 400, "children": [], "start_point": {"row": 124, "column": 19}, "end_point": {"row": 124, "column": 21}}, {"id": 403, "type": "assignment_expression", "text": "table->def = NULL", "parent": 382, "children": [404, 406, 407], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 125, "column": 19}}, {"id": 404, "type": "field_expression", "text": "table->def", "parent": 403, "children": [405], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 125, "column": 12}}, {"id": 405, "type": "identifier", "text": "table", "parent": 404, "children": [], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 125, "column": 7}}, {"id": 406, "type": "=", "text": "=", "parent": 403, "children": [], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 14}}, {"id": 407, "type": "null", "text": "NULL", "parent": 403, "children": [408], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 19}}, {"id": 408, "type": "NULL", "text": "NULL", "parent": 407, "children": [], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 19}}, {"id": 409, "type": "assignment_expression", "text": "table->eq = NULL", "parent": 382, "children": [410, 413, 414], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 126, "column": 18}}, {"id": 410, "type": "field_expression", "text": "table->eq", "parent": 409, "children": [411, 412], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 126, "column": 11}}, {"id": 411, "type": "identifier", "text": "table", "parent": 410, "children": [], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 126, "column": 7}}, {"id": 412, "type": "field_identifier", "text": "eq", "parent": 410, "children": [], "start_point": {"row": 126, "column": 9}, "end_point": {"row": 126, "column": 11}}, {"id": 413, "type": "=", "text": "=", "parent": 409, "children": [], "start_point": {"row": 126, "column": 12}, "end_point": {"row": 126, "column": 13}}, {"id": 414, "type": "null", "text": "NULL", "parent": 409, "children": [415], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 18}}, {"id": 415, "type": "NULL", "text": "NULL", "parent": 414, "children": [], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 18}}, {"id": 416, "type": "function_definition", "text": "void booleq_table_record_eq(booleq_table_t *table, literal_t l, literal_t a, literal_t b) {\n bvar_t x;\n int32_t i;\n\n assert(l >= 0 && a >= 0 && b >= 0);\n\n // normalize; force l to be positive\n a ^= sign_of_lit(l);\n l ^= sign_of_lit(l);\n\n assert(is_pos(l));\n x = var_of(l);\n booleq_table_resize_def(table, x);\n i = booleq_table_alloc_eq(table);\n\n assert(table->def[x] == -1);\n\n table->eq[i].lit[0] = a;\n table->eq[i].lit[1] = b;\n table->def[x] = i;\n}", "parent": null, "children": [417, 418], "start_point": {"row": 134, "column": 0}, "end_point": {"row": 154, "column": 1}}, {"id": 417, "type": "primitive_type", "text": "void", "parent": 416, "children": [], "start_point": {"row": 134, "column": 0}, "end_point": {"row": 134, "column": 4}}, {"id": 418, "type": "function_declarator", "text": "booleq_table_record_eq(booleq_table_t *table, literal_t l, literal_t a, literal_t b)", "parent": 416, "children": [419, 420], "start_point": {"row": 134, "column": 5}, "end_point": {"row": 134, "column": 89}}, {"id": 419, "type": "identifier", "text": "booleq_table_record_eq", "parent": 418, "children": [], "start_point": {"row": 134, "column": 5}, "end_point": {"row": 134, "column": 27}}, {"id": 420, "type": "parameter_list", "text": "(booleq_table_t *table, literal_t l, literal_t a, literal_t b)", "parent": 418, "children": [421, 426, 429, 432], "start_point": {"row": 134, "column": 27}, "end_point": {"row": 134, "column": 89}}, {"id": 421, "type": "parameter_declaration", "text": "booleq_table_t *table", "parent": 420, "children": [422, 423], "start_point": {"row": 134, "column": 28}, "end_point": {"row": 134, "column": 49}}, {"id": 422, "type": "type_identifier", "text": "booleq_table_t", "parent": 421, "children": [], "start_point": {"row": 134, "column": 28}, "end_point": {"row": 134, "column": 42}}, {"id": 423, "type": "pointer_declarator", "text": "*table", "parent": 421, "children": [424, 425], "start_point": {"row": 134, "column": 43}, "end_point": {"row": 134, "column": 49}}, {"id": 424, "type": "*", "text": "*", "parent": 423, "children": [], "start_point": {"row": 134, "column": 43}, "end_point": {"row": 134, "column": 44}}, {"id": 425, "type": "identifier", "text": "table", "parent": 423, "children": [], "start_point": {"row": 134, "column": 44}, "end_point": {"row": 134, "column": 49}}, {"id": 426, "type": "parameter_declaration", "text": "literal_t l", "parent": 420, "children": [427, 428], "start_point": {"row": 134, "column": 51}, "end_point": {"row": 134, "column": 62}}, {"id": 427, "type": "type_identifier", "text": "literal_t", "parent": 426, "children": [], "start_point": {"row": 134, "column": 51}, "end_point": {"row": 134, "column": 60}}, {"id": 428, "type": "identifier", "text": "l", "parent": 426, "children": [], "start_point": {"row": 134, "column": 61}, "end_point": {"row": 134, "column": 62}}, {"id": 429, "type": "parameter_declaration", "text": "literal_t a", "parent": 420, "children": [430, 431], "start_point": {"row": 134, "column": 64}, "end_point": {"row": 134, "column": 75}}, {"id": 430, "type": "type_identifier", "text": "literal_t", "parent": 429, "children": [], "start_point": {"row": 134, "column": 64}, "end_point": {"row": 134, "column": 73}}, {"id": 431, "type": "identifier", "text": "a", "parent": 429, "children": [], "start_point": {"row": 134, "column": 74}, "end_point": {"row": 134, "column": 75}}, {"id": 432, "type": "parameter_declaration", "text": "literal_t b", "parent": 420, "children": [433, 434], "start_point": {"row": 134, "column": 77}, "end_point": {"row": 134, "column": 88}}, {"id": 433, "type": "type_identifier", "text": "literal_t", "parent": 432, "children": [], "start_point": {"row": 134, "column": 77}, "end_point": {"row": 134, "column": 86}}, {"id": 434, "type": "identifier", "text": "b", "parent": 432, "children": [], "start_point": {"row": 134, "column": 87}, "end_point": {"row": 134, "column": 88}}, {"id": 435, "type": "declaration", "text": "bvar_t x;", "parent": 416, "children": [436, 437], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 11}}, {"id": 436, "type": "type_identifier", "text": "bvar_t", "parent": 435, "children": [], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 8}}, {"id": 437, "type": "identifier", "text": "x", "parent": 435, "children": [], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 10}}, {"id": 438, "type": "declaration", "text": "int32_t i;", "parent": 416, "children": [439, 440], "start_point": {"row": 136, "column": 2}, "end_point": {"row": 136, "column": 12}}, {"id": 439, "type": "primitive_type", "text": "int32_t", "parent": 438, "children": [], "start_point": {"row": 136, "column": 2}, "end_point": {"row": 136, "column": 9}}, {"id": 440, "type": "identifier", "text": "i", "parent": 438, "children": [], "start_point": {"row": 136, "column": 10}, "end_point": {"row": 136, "column": 11}}, {"id": 441, "type": "call_expression", "text": "assert(l >= 0 && a >= 0 && b >= 0)", "parent": 416, "children": [442, 443], "start_point": {"row": 138, "column": 2}, "end_point": {"row": 138, "column": 36}}, {"id": 442, "type": "identifier", "text": "assert", "parent": 441, "children": [], "start_point": {"row": 138, "column": 2}, "end_point": {"row": 138, "column": 8}}, {"id": 443, "type": "argument_list", "text": "(l >= 0 && a >= 0 && b >= 0)", "parent": 441, "children": [444], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 36}}, {"id": 444, "type": "binary_expression", "text": "l >= 0 && a >= 0 && b >= 0", "parent": 443, "children": [445, 455, 456], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 35}}, {"id": 445, "type": "binary_expression", "text": "l >= 0 && a >= 0", "parent": 444, "children": [446, 450, 451], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 25}}, {"id": 446, "type": "binary_expression", "text": "l >= 0", "parent": 445, "children": [447, 448, 449], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 15}}, {"id": 447, "type": "identifier", "text": "l", "parent": 446, "children": [], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 10}}, {"id": 448, "type": ">=", "text": ">=", "parent": 446, "children": [], "start_point": {"row": 138, "column": 11}, "end_point": {"row": 138, "column": 13}}, {"id": 449, "type": "number_literal", "text": "0", "parent": 446, "children": [], "start_point": {"row": 138, "column": 14}, "end_point": {"row": 138, "column": 15}}, {"id": 450, "type": "&&", "text": "&&", "parent": 445, "children": [], "start_point": {"row": 138, "column": 16}, "end_point": {"row": 138, "column": 18}}, {"id": 451, "type": "binary_expression", "text": "a >= 0", "parent": 445, "children": [452, 453, 454], "start_point": {"row": 138, "column": 19}, "end_point": {"row": 138, "column": 25}}, {"id": 452, "type": "identifier", "text": "a", "parent": 451, "children": [], "start_point": {"row": 138, "column": 19}, "end_point": {"row": 138, "column": 20}}, {"id": 453, "type": ">=", "text": ">=", "parent": 451, "children": [], "start_point": {"row": 138, "column": 21}, "end_point": {"row": 138, "column": 23}}, {"id": 454, "type": "number_literal", "text": "0", "parent": 451, "children": [], "start_point": {"row": 138, "column": 24}, "end_point": {"row": 138, "column": 25}}, {"id": 455, "type": "&&", "text": "&&", "parent": 444, "children": [], "start_point": {"row": 138, "column": 26}, "end_point": {"row": 138, "column": 28}}, {"id": 456, "type": "binary_expression", "text": "b >= 0", "parent": 444, "children": [457, 458, 459], "start_point": {"row": 138, "column": 29}, "end_point": {"row": 138, "column": 35}}, {"id": 457, "type": "identifier", "text": "b", "parent": 456, "children": [], "start_point": {"row": 138, "column": 29}, "end_point": {"row": 138, "column": 30}}, {"id": 458, "type": ">=", "text": ">=", "parent": 456, "children": [], "start_point": {"row": 138, "column": 31}, "end_point": {"row": 138, "column": 33}}, {"id": 459, "type": "number_literal", "text": "0", "parent": 456, "children": [], "start_point": {"row": 138, "column": 34}, "end_point": {"row": 138, "column": 35}}, {"id": 460, "type": "assignment_expression", "text": "a ^= sign_of_lit(l)", "parent": 416, "children": [461, 462, 463], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 21}}, {"id": 461, "type": "identifier", "text": "a", "parent": 460, "children": [], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 3}}, {"id": 462, "type": "^=", "text": "^=", "parent": 460, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 6}}, {"id": 463, "type": "call_expression", "text": "sign_of_lit(l)", "parent": 460, "children": [464, 465], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 21}}, {"id": 464, "type": "identifier", "text": "sign_of_lit", "parent": 463, "children": [], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 18}}, {"id": 465, "type": "argument_list", "text": "(l)", "parent": 463, "children": [466], "start_point": {"row": 141, "column": 18}, "end_point": {"row": 141, "column": 21}}, {"id": 466, "type": "identifier", "text": "l", "parent": 465, "children": [], "start_point": {"row": 141, "column": 19}, "end_point": {"row": 141, "column": 20}}, {"id": 467, "type": "assignment_expression", "text": "l ^= sign_of_lit(l)", "parent": 416, "children": [468, 469, 470], "start_point": {"row": 142, "column": 2}, "end_point": {"row": 142, "column": 21}}, {"id": 468, "type": "identifier", "text": "l", "parent": 467, "children": [], "start_point": {"row": 142, "column": 2}, "end_point": {"row": 142, "column": 3}}, {"id": 469, "type": "^=", "text": "^=", "parent": 467, "children": [], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 6}}, {"id": 470, "type": "call_expression", "text": "sign_of_lit(l)", "parent": 467, "children": [471, 472], "start_point": {"row": 142, "column": 7}, "end_point": {"row": 142, "column": 21}}, {"id": 471, "type": "identifier", "text": "sign_of_lit", "parent": 470, "children": [], "start_point": {"row": 142, "column": 7}, "end_point": {"row": 142, "column": 18}}, {"id": 472, "type": "argument_list", "text": "(l)", "parent": 470, "children": [473], "start_point": {"row": 142, "column": 18}, "end_point": {"row": 142, "column": 21}}, {"id": 473, "type": "identifier", "text": "l", "parent": 472, "children": [], "start_point": {"row": 142, "column": 19}, "end_point": {"row": 142, "column": 20}}, {"id": 474, "type": "call_expression", "text": "assert(is_pos(l))", "parent": 416, "children": [475, 476], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 19}}, {"id": 475, "type": "identifier", "text": "assert", "parent": 474, "children": [], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 8}}, {"id": 476, "type": "argument_list", "text": "(is_pos(l))", "parent": 474, "children": [477], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 19}}, {"id": 477, "type": "call_expression", "text": "is_pos(l)", "parent": 476, "children": [478, 479], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 18}}, {"id": 478, "type": "identifier", "text": "is_pos", "parent": 477, "children": [], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 15}}, {"id": 479, "type": "argument_list", "text": "(l)", "parent": 477, "children": [480], "start_point": {"row": 144, "column": 15}, "end_point": {"row": 144, "column": 18}}, {"id": 480, "type": "identifier", "text": "l", "parent": 479, "children": [], "start_point": {"row": 144, "column": 16}, "end_point": {"row": 144, "column": 17}}, {"id": 481, "type": "assignment_expression", "text": "x = var_of(l)", "parent": 416, "children": [482, 483, 484], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 15}}, {"id": 482, "type": "identifier", "text": "x", "parent": 481, "children": [], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 145, "column": 3}}, {"id": 483, "type": "=", "text": "=", "parent": 481, "children": [], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 5}}, {"id": 484, "type": "call_expression", "text": "var_of(l)", "parent": 481, "children": [485, 486], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 15}}, {"id": 485, "type": "identifier", "text": "var_of", "parent": 484, "children": [], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 12}}, {"id": 486, "type": "argument_list", "text": "(l)", "parent": 484, "children": [487], "start_point": {"row": 145, "column": 12}, "end_point": {"row": 145, "column": 15}}, {"id": 487, "type": "identifier", "text": "l", "parent": 486, "children": [], "start_point": {"row": 145, "column": 13}, "end_point": {"row": 145, "column": 14}}, {"id": 488, "type": "call_expression", "text": "booleq_table_resize_def(table, x)", "parent": 416, "children": [489, 490], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 146, "column": 35}}, {"id": 489, "type": "identifier", "text": "booleq_table_resize_def", "parent": 488, "children": [], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 146, "column": 25}}, {"id": 490, "type": "argument_list", "text": "(table, x)", "parent": 488, "children": [491, 492], "start_point": {"row": 146, "column": 25}, "end_point": {"row": 146, "column": 35}}, {"id": 491, "type": "identifier", "text": "table", "parent": 490, "children": [], "start_point": {"row": 146, "column": 26}, "end_point": {"row": 146, "column": 31}}, {"id": 492, "type": "identifier", "text": "x", "parent": 490, "children": [], "start_point": {"row": 146, "column": 33}, "end_point": {"row": 146, "column": 34}}, {"id": 493, "type": "assignment_expression", "text": "i = booleq_table_alloc_eq(table)", "parent": 416, "children": [494, 495, 496], "start_point": {"row": 147, "column": 2}, "end_point": {"row": 147, "column": 34}}, {"id": 494, "type": "identifier", "text": "i", "parent": 493, "children": [], "start_point": {"row": 147, "column": 2}, "end_point": {"row": 147, "column": 3}}, {"id": 495, "type": "=", "text": "=", "parent": 493, "children": [], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 5}}, {"id": 496, "type": "call_expression", "text": "booleq_table_alloc_eq(table)", "parent": 493, "children": [497, 498], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 34}}, {"id": 497, "type": "identifier", "text": "booleq_table_alloc_eq", "parent": 496, "children": [], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 27}}, {"id": 498, "type": "argument_list", "text": "(table)", "parent": 496, "children": [499], "start_point": {"row": 147, "column": 27}, "end_point": {"row": 147, "column": 34}}, {"id": 499, "type": "identifier", "text": "table", "parent": 498, "children": [], "start_point": {"row": 147, "column": 28}, "end_point": {"row": 147, "column": 33}}, {"id": 500, "type": "call_expression", "text": "assert(table->def[x] == -1)", "parent": 416, "children": [501, 502], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 29}}, {"id": 501, "type": "identifier", "text": "assert", "parent": 500, "children": [], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 8}}, {"id": 502, "type": "argument_list", "text": "(table->def[x] == -1)", "parent": 500, "children": [503], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 29}}, {"id": 503, "type": "binary_expression", "text": "table->def[x] == -1", "parent": 502, "children": [504, 508, 509], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 28}}, {"id": 504, "type": "subscript_expression", "text": "table->def[x]", "parent": 503, "children": [505, 507], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 22}}, {"id": 505, "type": "field_expression", "text": "table->def", "parent": 504, "children": [506], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 19}}, {"id": 506, "type": "identifier", "text": "table", "parent": 505, "children": [], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 14}}, {"id": 507, "type": "identifier", "text": "x", "parent": 504, "children": [], "start_point": {"row": 149, "column": 20}, "end_point": {"row": 149, "column": 21}}, {"id": 508, "type": "==", "text": "==", "parent": 503, "children": [], "start_point": {"row": 149, "column": 23}, "end_point": {"row": 149, "column": 25}}, {"id": 509, "type": "number_literal", "text": "-1", "parent": 503, "children": [], "start_point": {"row": 149, "column": 26}, "end_point": {"row": 149, "column": 28}}, {"id": 510, "type": "assignment_expression", "text": "table->eq[i].lit[0] = a", "parent": 416, "children": [511, 520, 521], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 25}}, {"id": 511, "type": "subscript_expression", "text": "table->eq[i].lit[0]", "parent": 510, "children": [512, 519], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 21}}, {"id": 512, "type": "field_expression", "text": "table->eq[i].lit", "parent": 511, "children": [513, 518], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 18}}, {"id": 513, "type": "subscript_expression", "text": "table->eq[i]", "parent": 512, "children": [514, 517], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 14}}, {"id": 514, "type": "field_expression", "text": "table->eq", "parent": 513, "children": [515, 516], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 11}}, {"id": 515, "type": "identifier", "text": "table", "parent": 514, "children": [], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 7}}, {"id": 516, "type": "field_identifier", "text": "eq", "parent": 514, "children": [], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 11}}, {"id": 517, "type": "identifier", "text": "i", "parent": 513, "children": [], "start_point": {"row": 151, "column": 12}, "end_point": {"row": 151, "column": 13}}, {"id": 518, "type": "field_identifier", "text": "lit", "parent": 512, "children": [], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 18}}, {"id": 519, "type": "number_literal", "text": "0", "parent": 511, "children": [], "start_point": {"row": 151, "column": 19}, "end_point": {"row": 151, "column": 20}}, {"id": 520, "type": "=", "text": "=", "parent": 510, "children": [], "start_point": {"row": 151, "column": 22}, "end_point": {"row": 151, "column": 23}}, {"id": 521, "type": "identifier", "text": "a", "parent": 510, "children": [], "start_point": {"row": 151, "column": 24}, "end_point": {"row": 151, "column": 25}}, {"id": 522, "type": "assignment_expression", "text": "table->eq[i].lit[1] = b", "parent": 416, "children": [523, 532, 533], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 25}}, {"id": 523, "type": "subscript_expression", "text": "table->eq[i].lit[1]", "parent": 522, "children": [524, 531], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 21}}, {"id": 524, "type": "field_expression", "text": "table->eq[i].lit", "parent": 523, "children": [525, 530], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 18}}, {"id": 525, "type": "subscript_expression", "text": "table->eq[i]", "parent": 524, "children": [526, 529], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 14}}, {"id": 526, "type": "field_expression", "text": "table->eq", "parent": 525, "children": [527, 528], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 11}}, {"id": 527, "type": "identifier", "text": "table", "parent": 526, "children": [], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 152, "column": 7}}, {"id": 528, "type": "field_identifier", "text": "eq", "parent": 526, "children": [], "start_point": {"row": 152, "column": 9}, "end_point": {"row": 152, "column": 11}}, {"id": 529, "type": "identifier", "text": "i", "parent": 525, "children": [], "start_point": {"row": 152, "column": 12}, "end_point": {"row": 152, "column": 13}}, {"id": 530, "type": "field_identifier", "text": "lit", "parent": 524, "children": [], "start_point": {"row": 152, "column": 15}, "end_point": {"row": 152, "column": 18}}, {"id": 531, "type": "number_literal", "text": "1", "parent": 523, "children": [], "start_point": {"row": 152, "column": 19}, "end_point": {"row": 152, "column": 20}}, {"id": 532, "type": "=", "text": "=", "parent": 522, "children": [], "start_point": {"row": 152, "column": 22}, "end_point": {"row": 152, "column": 23}}, {"id": 533, "type": "identifier", "text": "b", "parent": 522, "children": [], "start_point": {"row": 152, "column": 24}, "end_point": {"row": 152, "column": 25}}, {"id": 534, "type": "assignment_expression", "text": "table->def[x] = i", "parent": 416, "children": [535, 539, 540], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 153, "column": 19}}, {"id": 535, "type": "subscript_expression", "text": "table->def[x]", "parent": 534, "children": [536, 538], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 153, "column": 15}}, {"id": 536, "type": "field_expression", "text": "table->def", "parent": 535, "children": [537], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 153, "column": 12}}, {"id": 537, "type": "identifier", "text": "table", "parent": 536, "children": [], "start_point": {"row": 153, "column": 2}, "end_point": {"row": 153, "column": 7}}, {"id": 538, "type": "identifier", "text": "x", "parent": 535, "children": [], "start_point": {"row": 153, "column": 13}, "end_point": {"row": 153, "column": 14}}, {"id": 539, "type": "=", "text": "=", "parent": 534, "children": [], "start_point": {"row": 153, "column": 16}, "end_point": {"row": 153, "column": 17}}, {"id": 540, "type": "identifier", "text": "i", "parent": 534, "children": [], "start_point": {"row": 153, "column": 18}, "end_point": {"row": 153, "column": 19}}, {"id": 541, "type": "function_definition", "text": "bool boolvar_is_eq(booleq_table_t *table, bvar_t x) {\n return x < table->nvars && table->def[x] >= 0;\n}", "parent": null, "children": [542, 543], "start_point": {"row": 161, "column": 0}, "end_point": {"row": 163, "column": 1}}, {"id": 542, "type": "primitive_type", "text": "bool", "parent": 541, "children": [], "start_point": {"row": 161, "column": 0}, "end_point": {"row": 161, "column": 4}}, {"id": 543, "type": "function_declarator", "text": "boolvar_is_eq(booleq_table_t *table, bvar_t x)", "parent": 541, "children": [544, 545], "start_point": {"row": 161, "column": 5}, "end_point": {"row": 161, "column": 51}}, {"id": 544, "type": "identifier", "text": "boolvar_is_eq", "parent": 543, "children": [], "start_point": {"row": 161, "column": 5}, "end_point": {"row": 161, "column": 18}}, {"id": 545, "type": "parameter_list", "text": "(booleq_table_t *table, bvar_t x)", "parent": 543, "children": [546, 551], "start_point": {"row": 161, "column": 18}, "end_point": {"row": 161, "column": 51}}, {"id": 546, "type": "parameter_declaration", "text": "booleq_table_t *table", "parent": 545, "children": [547, 548], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 40}}, {"id": 547, "type": "type_identifier", "text": "booleq_table_t", "parent": 546, "children": [], "start_point": {"row": 161, "column": 19}, "end_point": {"row": 161, "column": 33}}, {"id": 548, "type": "pointer_declarator", "text": "*table", "parent": 546, "children": [549, 550], "start_point": {"row": 161, "column": 34}, "end_point": {"row": 161, "column": 40}}, {"id": 549, "type": "*", "text": "*", "parent": 548, "children": [], "start_point": {"row": 161, "column": 34}, "end_point": {"row": 161, "column": 35}}, {"id": 550, "type": "identifier", "text": "table", "parent": 548, "children": [], "start_point": {"row": 161, "column": 35}, "end_point": {"row": 161, "column": 40}}, {"id": 551, "type": "parameter_declaration", "text": "bvar_t x", "parent": 545, "children": [552, 553], "start_point": {"row": 161, "column": 42}, "end_point": {"row": 161, "column": 50}}, {"id": 552, "type": "type_identifier", "text": "bvar_t", "parent": 551, "children": [], "start_point": {"row": 161, "column": 42}, "end_point": {"row": 161, "column": 48}}, {"id": 553, "type": "identifier", "text": "x", "parent": 551, "children": [], "start_point": {"row": 161, "column": 49}, "end_point": {"row": 161, "column": 50}}, {"id": 554, "type": "return_statement", "text": "return x < table->nvars && table->def[x] >= 0;", "parent": 541, "children": [555], "start_point": {"row": 162, "column": 2}, "end_point": {"row": 162, "column": 48}}, {"id": 555, "type": "binary_expression", "text": "x < table->nvars && table->def[x] >= 0", "parent": 554, "children": [556, 562, 563], "start_point": {"row": 162, "column": 9}, "end_point": {"row": 162, "column": 47}}, {"id": 556, "type": "binary_expression", "text": "x < table->nvars", "parent": 555, "children": [557, 558, 559], "start_point": {"row": 162, "column": 9}, "end_point": {"row": 162, "column": 25}}, {"id": 557, "type": "identifier", "text": "x", "parent": 556, "children": [], "start_point": {"row": 162, "column": 9}, "end_point": {"row": 162, "column": 10}}, {"id": 558, "type": "<", "text": "<", "parent": 556, "children": [], "start_point": {"row": 162, "column": 11}, "end_point": {"row": 162, "column": 12}}, {"id": 559, "type": "field_expression", "text": "table->nvars", "parent": 556, "children": [560, 561], "start_point": {"row": 162, "column": 13}, "end_point": {"row": 162, "column": 25}}, {"id": 560, "type": "identifier", "text": "table", "parent": 559, "children": [], "start_point": {"row": 162, "column": 13}, "end_point": {"row": 162, "column": 18}}, {"id": 561, "type": "field_identifier", "text": "nvars", "parent": 559, "children": [], "start_point": {"row": 162, "column": 20}, "end_point": {"row": 162, "column": 25}}, {"id": 562, "type": "&&", "text": "&&", "parent": 555, "children": [], "start_point": {"row": 162, "column": 26}, "end_point": {"row": 162, "column": 28}}, {"id": 563, "type": "binary_expression", "text": "table->def[x] >= 0", "parent": 555, "children": [564, 568, 569], "start_point": {"row": 162, "column": 29}, "end_point": {"row": 162, "column": 47}}, {"id": 564, "type": "subscript_expression", "text": "table->def[x]", "parent": 563, "children": [565, 567], "start_point": {"row": 162, "column": 29}, "end_point": {"row": 162, "column": 42}}, {"id": 565, "type": "field_expression", "text": "table->def", "parent": 564, "children": [566], "start_point": {"row": 162, "column": 29}, "end_point": {"row": 162, "column": 39}}, {"id": 566, "type": "identifier", "text": "table", "parent": 565, "children": [], "start_point": {"row": 162, "column": 29}, "end_point": {"row": 162, "column": 34}}, {"id": 567, "type": "identifier", "text": "x", "parent": 564, "children": [], "start_point": {"row": 162, "column": 40}, "end_point": {"row": 162, "column": 41}}, {"id": 568, "type": ">=", "text": ">=", "parent": 563, "children": [], "start_point": {"row": 162, "column": 43}, "end_point": {"row": 162, "column": 45}}, {"id": 569, "type": "number_literal", "text": "0", "parent": 563, "children": [], "start_point": {"row": 162, "column": 46}, "end_point": {"row": 162, "column": 47}}, {"id": 570, "type": "function_definition", "text": "bool get_booleq(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b) {\n bvar_t x;\n int32_t i;\n\n assert(l >= 0);\n\n x = var_of(l);\n if (x < table->nvars) {\n i = table->def[x];\n if (i >= 0) {\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }\n }\n\n return false;\n}", "parent": null, "children": [571, 572], "start_point": {"row": 172, "column": 0}, "end_point": {"row": 189, "column": 1}}, {"id": 571, "type": "primitive_type", "text": "bool", "parent": 570, "children": [], "start_point": {"row": 172, "column": 0}, "end_point": {"row": 172, "column": 4}}, {"id": 572, "type": "function_declarator", "text": "get_booleq(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b)", "parent": 570, "children": [573, 574], "start_point": {"row": 172, "column": 5}, "end_point": {"row": 172, "column": 79}}, {"id": 573, "type": "identifier", "text": "get_booleq", "parent": 572, "children": [], "start_point": {"row": 172, "column": 5}, "end_point": {"row": 172, "column": 15}}, {"id": 574, "type": "parameter_list", "text": "(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b)", "parent": 572, "children": [575, 580, 583, 588], "start_point": {"row": 172, "column": 15}, "end_point": {"row": 172, "column": 79}}, {"id": 575, "type": "parameter_declaration", "text": "booleq_table_t *table", "parent": 574, "children": [576, 577], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 37}}, {"id": 576, "type": "type_identifier", "text": "booleq_table_t", "parent": 575, "children": [], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 30}}, {"id": 577, "type": "pointer_declarator", "text": "*table", "parent": 575, "children": [578, 579], "start_point": {"row": 172, "column": 31}, "end_point": {"row": 172, "column": 37}}, {"id": 578, "type": "*", "text": "*", "parent": 577, "children": [], "start_point": {"row": 172, "column": 31}, "end_point": {"row": 172, "column": 32}}, {"id": 579, "type": "identifier", "text": "table", "parent": 577, "children": [], "start_point": {"row": 172, "column": 32}, "end_point": {"row": 172, "column": 37}}, {"id": 580, "type": "parameter_declaration", "text": "literal_t l", "parent": 574, "children": [581, 582], "start_point": {"row": 172, "column": 39}, "end_point": {"row": 172, "column": 50}}, {"id": 581, "type": "type_identifier", "text": "literal_t", "parent": 580, "children": [], "start_point": {"row": 172, "column": 39}, "end_point": {"row": 172, "column": 48}}, {"id": 582, "type": "identifier", "text": "l", "parent": 580, "children": [], "start_point": {"row": 172, "column": 49}, "end_point": {"row": 172, "column": 50}}, {"id": 583, "type": "parameter_declaration", "text": "literal_t *a", "parent": 574, "children": [584, 585], "start_point": {"row": 172, "column": 52}, "end_point": {"row": 172, "column": 64}}, {"id": 584, "type": "type_identifier", "text": "literal_t", "parent": 583, "children": [], "start_point": {"row": 172, "column": 52}, "end_point": {"row": 172, "column": 61}}, {"id": 585, "type": "pointer_declarator", "text": "*a", "parent": 583, "children": [586, 587], "start_point": {"row": 172, "column": 62}, "end_point": {"row": 172, "column": 64}}, {"id": 586, "type": "*", "text": "*", "parent": 585, "children": [], "start_point": {"row": 172, "column": 62}, "end_point": {"row": 172, "column": 63}}, {"id": 587, "type": "identifier", "text": "a", "parent": 585, "children": [], "start_point": {"row": 172, "column": 63}, "end_point": {"row": 172, "column": 64}}, {"id": 588, "type": "parameter_declaration", "text": "literal_t *b", "parent": 574, "children": [589, 590], "start_point": {"row": 172, "column": 66}, "end_point": {"row": 172, "column": 78}}, {"id": 589, "type": "type_identifier", "text": "literal_t", "parent": 588, "children": [], "start_point": {"row": 172, "column": 66}, "end_point": {"row": 172, "column": 75}}, {"id": 590, "type": "pointer_declarator", "text": "*b", "parent": 588, "children": [591, 592], "start_point": {"row": 172, "column": 76}, "end_point": {"row": 172, "column": 78}}, {"id": 591, "type": "*", "text": "*", "parent": 590, "children": [], "start_point": {"row": 172, "column": 76}, "end_point": {"row": 172, "column": 77}}, {"id": 592, "type": "identifier", "text": "b", "parent": 590, "children": [], "start_point": {"row": 172, "column": 77}, "end_point": {"row": 172, "column": 78}}, {"id": 593, "type": "declaration", "text": "bvar_t x;", "parent": 570, "children": [594, 595], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 11}}, {"id": 594, "type": "type_identifier", "text": "bvar_t", "parent": 593, "children": [], "start_point": {"row": 173, "column": 2}, "end_point": {"row": 173, "column": 8}}, {"id": 595, "type": "identifier", "text": "x", "parent": 593, "children": [], "start_point": {"row": 173, "column": 9}, "end_point": {"row": 173, "column": 10}}, {"id": 596, "type": "declaration", "text": "int32_t i;", "parent": 570, "children": [597, 598], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 12}}, {"id": 597, "type": "primitive_type", "text": "int32_t", "parent": 596, "children": [], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 174, "column": 9}}, {"id": 598, "type": "identifier", "text": "i", "parent": 596, "children": [], "start_point": {"row": 174, "column": 10}, "end_point": {"row": 174, "column": 11}}, {"id": 599, "type": "call_expression", "text": "assert(l >= 0)", "parent": 570, "children": [600, 601], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 176, "column": 16}}, {"id": 600, "type": "identifier", "text": "assert", "parent": 599, "children": [], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 176, "column": 8}}, {"id": 601, "type": "argument_list", "text": "(l >= 0)", "parent": 599, "children": [602], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 16}}, {"id": 602, "type": "binary_expression", "text": "l >= 0", "parent": 601, "children": [603, 604, 605], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 15}}, {"id": 603, "type": "identifier", "text": "l", "parent": 602, "children": [], "start_point": {"row": 176, "column": 9}, "end_point": {"row": 176, "column": 10}}, {"id": 604, "type": ">=", "text": ">=", "parent": 602, "children": [], "start_point": {"row": 176, "column": 11}, "end_point": {"row": 176, "column": 13}}, {"id": 605, "type": "number_literal", "text": "0", "parent": 602, "children": [], "start_point": {"row": 176, "column": 14}, "end_point": {"row": 176, "column": 15}}, {"id": 606, "type": "assignment_expression", "text": "x = var_of(l)", "parent": 570, "children": [607, 608, 609], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 15}}, {"id": 607, "type": "identifier", "text": "x", "parent": 606, "children": [], "start_point": {"row": 178, "column": 2}, "end_point": {"row": 178, "column": 3}}, {"id": 608, "type": "=", "text": "=", "parent": 606, "children": [], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 178, "column": 5}}, {"id": 609, "type": "call_expression", "text": "var_of(l)", "parent": 606, "children": [610, 611], "start_point": {"row": 178, "column": 6}, "end_point": {"row": 178, "column": 15}}, {"id": 610, "type": "identifier", "text": "var_of", "parent": 609, "children": [], "start_point": {"row": 178, "column": 6}, "end_point": {"row": 178, "column": 12}}, {"id": 611, "type": "argument_list", "text": "(l)", "parent": 609, "children": [612], "start_point": {"row": 178, "column": 12}, "end_point": {"row": 178, "column": 15}}, {"id": 612, "type": "identifier", "text": "l", "parent": 611, "children": [], "start_point": {"row": 178, "column": 13}, "end_point": {"row": 178, "column": 14}}, {"id": 613, "type": "if_statement", "text": "if (x < table->nvars) {\n i = table->def[x];\n if (i >= 0) {\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }\n }", "parent": 570, "children": [614], "start_point": {"row": 179, "column": 2}, "end_point": {"row": 186, "column": 3}}, {"id": 614, "type": "parenthesized_expression", "text": "(x < table->nvars)", "parent": 613, "children": [615], "start_point": {"row": 179, "column": 5}, "end_point": {"row": 179, "column": 23}}, {"id": 615, "type": "binary_expression", "text": "x < table->nvars", "parent": 614, "children": [616, 617, 618], "start_point": {"row": 179, "column": 6}, "end_point": {"row": 179, "column": 22}}, {"id": 616, "type": "identifier", "text": "x", "parent": 615, "children": [], "start_point": {"row": 179, "column": 6}, "end_point": {"row": 179, "column": 7}}, {"id": 617, "type": "<", "text": "<", "parent": 615, "children": [], "start_point": {"row": 179, "column": 8}, "end_point": {"row": 179, "column": 9}}, {"id": 618, "type": "field_expression", "text": "table->nvars", "parent": 615, "children": [619, 620], "start_point": {"row": 179, "column": 10}, "end_point": {"row": 179, "column": 22}}, {"id": 619, "type": "identifier", "text": "table", "parent": 618, "children": [], "start_point": {"row": 179, "column": 10}, "end_point": {"row": 179, "column": 15}}, {"id": 620, "type": "field_identifier", "text": "nvars", "parent": 618, "children": [], "start_point": {"row": 179, "column": 17}, "end_point": {"row": 179, "column": 22}}, {"id": 621, "type": "assignment_expression", "text": "i = table->def[x]", "parent": 613, "children": [622, 623, 624], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 21}}, {"id": 622, "type": "identifier", "text": "i", "parent": 621, "children": [], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 5}}, {"id": 623, "type": "=", "text": "=", "parent": 621, "children": [], "start_point": {"row": 180, "column": 6}, "end_point": {"row": 180, "column": 7}}, {"id": 624, "type": "subscript_expression", "text": "table->def[x]", "parent": 621, "children": [625, 627], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 21}}, {"id": 625, "type": "field_expression", "text": "table->def", "parent": 624, "children": [626], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 18}}, {"id": 626, "type": "identifier", "text": "table", "parent": 625, "children": [], "start_point": {"row": 180, "column": 8}, "end_point": {"row": 180, "column": 13}}, {"id": 627, "type": "identifier", "text": "x", "parent": 624, "children": [], "start_point": {"row": 180, "column": 19}, "end_point": {"row": 180, "column": 20}}, {"id": 628, "type": "if_statement", "text": "if (i >= 0) {\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }", "parent": 613, "children": [629], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 185, "column": 5}}, {"id": 629, "type": "parenthesized_expression", "text": "(i >= 0)", "parent": 628, "children": [630], "start_point": {"row": 181, "column": 7}, "end_point": {"row": 181, "column": 15}}, {"id": 630, "type": "binary_expression", "text": "i >= 0", "parent": 629, "children": [631, 632, 633], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 181, "column": 14}}, {"id": 631, "type": "identifier", "text": "i", "parent": 630, "children": [], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 181, "column": 9}}, {"id": 632, "type": ">=", "text": ">=", "parent": 630, "children": [], "start_point": {"row": 181, "column": 10}, "end_point": {"row": 181, "column": 12}}, {"id": 633, "type": "number_literal", "text": "0", "parent": 630, "children": [], "start_point": {"row": 181, "column": 13}, "end_point": {"row": 181, "column": 14}}, {"id": 634, "type": "assignment_expression", "text": "*a = table->eq[i].lit[0] ^ sign_of_lit(l)", "parent": 628, "children": [635, 638, 639], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 47}}, {"id": 635, "type": "pointer_expression", "text": "*a", "parent": 634, "children": [636, 637], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 8}}, {"id": 636, "type": "*", "text": "*", "parent": 635, "children": [], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 7}}, {"id": 637, "type": "identifier", "text": "a", "parent": 635, "children": [], "start_point": {"row": 182, "column": 7}, "end_point": {"row": 182, "column": 8}}, {"id": 638, "type": "=", "text": "=", "parent": 634, "children": [], "start_point": {"row": 182, "column": 9}, "end_point": {"row": 182, "column": 10}}, {"id": 639, "type": "binary_expression", "text": "table->eq[i].lit[0] ^ sign_of_lit(l)", "parent": 634, "children": [640, 649, 650], "start_point": {"row": 182, "column": 11}, "end_point": {"row": 182, "column": 47}}, {"id": 640, "type": "subscript_expression", "text": "table->eq[i].lit[0]", "parent": 639, "children": [641, 648], "start_point": {"row": 182, "column": 11}, "end_point": {"row": 182, "column": 30}}, {"id": 641, "type": "field_expression", "text": "table->eq[i].lit", "parent": 640, "children": [642, 647], "start_point": {"row": 182, "column": 11}, "end_point": {"row": 182, "column": 27}}, {"id": 642, "type": "subscript_expression", "text": "table->eq[i]", "parent": 641, "children": [643, 646], "start_point": {"row": 182, "column": 11}, "end_point": {"row": 182, "column": 23}}, {"id": 643, "type": "field_expression", "text": "table->eq", "parent": 642, "children": [644, 645], "start_point": {"row": 182, "column": 11}, "end_point": {"row": 182, "column": 20}}, {"id": 644, "type": "identifier", "text": "table", "parent": 643, "children": [], "start_point": {"row": 182, "column": 11}, "end_point": {"row": 182, "column": 16}}, {"id": 645, "type": "field_identifier", "text": "eq", "parent": 643, "children": [], "start_point": {"row": 182, "column": 18}, "end_point": {"row": 182, "column": 20}}, {"id": 646, "type": "identifier", "text": "i", "parent": 642, "children": [], "start_point": {"row": 182, "column": 21}, "end_point": {"row": 182, "column": 22}}, {"id": 647, "type": "field_identifier", "text": "lit", "parent": 641, "children": [], "start_point": {"row": 182, "column": 24}, "end_point": {"row": 182, "column": 27}}, {"id": 648, "type": "number_literal", "text": "0", "parent": 640, "children": [], "start_point": {"row": 182, "column": 28}, "end_point": {"row": 182, "column": 29}}, {"id": 649, "type": "^", "text": "^", "parent": 639, "children": [], "start_point": {"row": 182, "column": 31}, "end_point": {"row": 182, "column": 32}}, {"id": 650, "type": "call_expression", "text": "sign_of_lit(l)", "parent": 639, "children": [651, 652], "start_point": {"row": 182, "column": 33}, "end_point": {"row": 182, "column": 47}}, {"id": 651, "type": "identifier", "text": "sign_of_lit", "parent": 650, "children": [], "start_point": {"row": 182, "column": 33}, "end_point": {"row": 182, "column": 44}}, {"id": 652, "type": "argument_list", "text": "(l)", "parent": 650, "children": [653], "start_point": {"row": 182, "column": 44}, "end_point": {"row": 182, "column": 47}}, {"id": 653, "type": "identifier", "text": "l", "parent": 652, "children": [], "start_point": {"row": 182, "column": 45}, "end_point": {"row": 182, "column": 46}}, {"id": 654, "type": "assignment_expression", "text": "*b = table->eq[i].lit[1]", "parent": 628, "children": [655, 658, 659], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 30}}, {"id": 655, "type": "pointer_expression", "text": "*b", "parent": 654, "children": [656, 657], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 8}}, {"id": 656, "type": "*", "text": "*", "parent": 655, "children": [], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 7}}, {"id": 657, "type": "identifier", "text": "b", "parent": 655, "children": [], "start_point": {"row": 183, "column": 7}, "end_point": {"row": 183, "column": 8}}, {"id": 658, "type": "=", "text": "=", "parent": 654, "children": [], "start_point": {"row": 183, "column": 9}, "end_point": {"row": 183, "column": 10}}, {"id": 659, "type": "subscript_expression", "text": "table->eq[i].lit[1]", "parent": 654, "children": [660, 667], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 30}}, {"id": 660, "type": "field_expression", "text": "table->eq[i].lit", "parent": 659, "children": [661, 666], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 27}}, {"id": 661, "type": "subscript_expression", "text": "table->eq[i]", "parent": 660, "children": [662, 665], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 23}}, {"id": 662, "type": "field_expression", "text": "table->eq", "parent": 661, "children": [663, 664], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 20}}, {"id": 663, "type": "identifier", "text": "table", "parent": 662, "children": [], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 16}}, {"id": 664, "type": "field_identifier", "text": "eq", "parent": 662, "children": [], "start_point": {"row": 183, "column": 18}, "end_point": {"row": 183, "column": 20}}, {"id": 665, "type": "identifier", "text": "i", "parent": 661, "children": [], "start_point": {"row": 183, "column": 21}, "end_point": {"row": 183, "column": 22}}, {"id": 666, "type": "field_identifier", "text": "lit", "parent": 660, "children": [], "start_point": {"row": 183, "column": 24}, "end_point": {"row": 183, "column": 27}}, {"id": 667, "type": "number_literal", "text": "1", "parent": 659, "children": [], "start_point": {"row": 183, "column": 28}, "end_point": {"row": 183, "column": 29}}, {"id": 668, "type": "return_statement", "text": "return true;", "parent": 628, "children": [669], "start_point": {"row": 184, "column": 6}, "end_point": {"row": 184, "column": 18}}, {"id": 669, "type": "true", "text": "true", "parent": 668, "children": [], "start_point": {"row": 184, "column": 13}, "end_point": {"row": 184, "column": 17}}, {"id": 670, "type": "return_statement", "text": "return false;", "parent": 570, "children": [671], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 188, "column": 15}}, {"id": 671, "type": "false", "text": "false", "parent": 670, "children": [], "start_point": {"row": 188, "column": 9}, "end_point": {"row": 188, "column": 14}}]}, "node_categories": {"declarations": {"functions": [9, 11, 56, 58, 172, 174, 223, 225, 360, 362, 382, 384, 416, 418, 541, 543, 570, 572], "variables": [14, 61, 66, 177, 182, 228, 233, 236, 365, 387, 421, 426, 429, 432, 435, 438, 546, 551, 575, 580, 583, 588, 593, 596], "classes": [], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [20, 26, 33, 39, 45, 51, 72, 76, 77, 85, 88, 89, 94, 99, 103, 108, 111, 114, 115, 118, 127, 128, 129, 136, 137, 141, 145, 149, 154, 157, 160, 163, 164, 167, 188, 192, 193, 196, 199, 203, 206, 209, 213, 217, 241, 242, 245, 251, 255, 256, 261, 262, 274, 275, 276, 283, 284, 291, 296, 297, 301, 305, 308, 313, 316, 318, 321, 325, 334, 337, 341, 345, 346, 352, 356, 371, 377, 392, 395, 397, 400, 404, 410, 441, 444, 445, 446, 451, 456, 463, 470, 474, 477, 484, 488, 496, 500, 503, 504, 505, 511, 512, 513, 514, 523, 524, 525, 526, 535, 536, 555, 556, 559, 563, 564, 565, 599, 602, 609, 614, 615, 618, 624, 625, 629, 630, 635, 639, 640, 641, 642, 643, 650, 655, 659, 660, 661, 662], "assignments": [19, 25, 32, 38, 44, 50, 69, 81, 98, 117, 124, 144, 166, 185, 212, 248, 266, 271, 288, 304, 324, 331, 344, 351, 370, 376, 403, 409, 460, 467, 481, 493, 510, 522, 534, 606, 621, 634, 654], "loops": [330], "conditionals": [12, 15, 18, 21, 27, 28, 34, 35, 40, 41, 46, 47, 52, 53, 59, 62, 65, 68, 70, 73, 74, 75, 78, 82, 84, 86, 90, 95, 97, 100, 101, 105, 109, 112, 116, 119, 120, 122, 125, 130, 135, 138, 140, 142, 146, 147, 151, 155, 158, 159, 161, 165, 168, 169, 171, 175, 178, 181, 184, 186, 189, 190, 191, 194, 197, 198, 200, 202, 204, 207, 210, 211, 214, 215, 218, 222, 226, 229, 232, 235, 238, 239, 240, 243, 246, 247, 249, 252, 253, 254, 257, 259, 260, 263, 267, 269, 272, 277, 282, 285, 287, 289, 292, 295, 298, 300, 302, 306, 314, 317, 319, 326, 327, 329, 332, 335, 336, 338, 340, 342, 347, 348, 353, 354, 357, 363, 366, 369, 372, 373, 378, 379, 385, 388, 391, 393, 396, 398, 401, 402, 405, 411, 412, 419, 422, 425, 427, 428, 430, 431, 433, 434, 436, 437, 440, 442, 447, 452, 457, 461, 464, 466, 468, 471, 473, 475, 478, 480, 482, 485, 487, 489, 491, 492, 494, 497, 499, 501, 506, 507, 515, 516, 517, 518, 521, 527, 528, 529, 530, 533, 537, 538, 540, 544, 547, 550, 552, 553, 557, 560, 561, 566, 567, 573, 576, 579, 581, 582, 584, 587, 589, 592, 594, 595, 598, 600, 603, 607, 610, 612, 613, 616, 619, 620, 622, 626, 627, 628, 631, 637, 644, 645, 646, 647, 651, 653, 657, 663, 664, 665, 666], "returns": [221, 554, 668, 670], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 37, 43, 49, 55, 80, 92, 132, 134, 220, 265, 279, 281, 294, 350, 359, 375, 381, 449, 454, 459, 509, 519, 531, 569, 605, 633, 648, 667], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "init_booleq_table", "text_snippet": "void init_booleq_table(booleq_table_t *table) {\n table->def = NULL;\n table->eq = NULL;\n table->nv"}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "init_booleq_table(booleq_table_t *table)"}, {"node_id": 56, "universal_type": "function", "name": "booleq_table_extend_eq", "text_snippet": "static void booleq_table_extend_eq(booleq_table_t *table) {\n uint32_t n;\n\n n = table->esize;\n if "}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "booleq_table_extend_eq(booleq_table_t *table)"}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "static int32_t booleq_table_alloc_eq(booleq_table_t *table) {\n uint32_t i;\n\n i = table->neqs;\n if"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "booleq_table_alloc_eq(booleq_table_t *table)"}, {"node_id": 223, "universal_type": "function", "name": "booleq_table_resize_def", "text_snippet": "static void booleq_table_resize_def(booleq_table_t *table, uint32_t x) {\n uint32_t i, n;\n\n if (x >"}, {"node_id": 225, "universal_type": "function", "name": "unknown", "text_snippet": "booleq_table_resize_def(booleq_table_t *table, uint32_t x)"}, {"node_id": 360, "universal_type": "function", "name": "reset_booleq_table", "text_snippet": "void reset_booleq_table(booleq_table_t *table) {\n table->nvars = 0;\n table->neqs = 0;\n}"}, {"node_id": 362, "universal_type": "function", "name": "unknown", "text_snippet": "reset_booleq_table(booleq_table_t *table)"}, {"node_id": 382, "universal_type": "function", "name": "delete_booleq_table", "text_snippet": "void delete_booleq_table(booleq_table_t *table) {\n safe_free(table->def);\n safe_free(table->eq);\n "}, {"node_id": 384, "universal_type": "function", "name": "unknown", "text_snippet": "delete_booleq_table(booleq_table_t *table)"}, {"node_id": 416, "universal_type": "function", "name": "booleq_table_record_eq", "text_snippet": "void booleq_table_record_eq(booleq_table_t *table, literal_t l, literal_t a, literal_t b) {\n bvar_t"}, {"node_id": 418, "universal_type": "function", "name": "unknown", "text_snippet": "booleq_table_record_eq(booleq_table_t *table, literal_t l, literal_t a, literal_t b)"}, {"node_id": 541, "universal_type": "function", "name": "boolvar_is_eq", "text_snippet": "bool boolvar_is_eq(booleq_table_t *table, bvar_t x) {\n return x < table->nvars && table->def[x] >= "}, {"node_id": 543, "universal_type": "function", "name": "unknown", "text_snippet": "boolvar_is_eq(booleq_table_t *table, bvar_t x)"}, {"node_id": 570, "universal_type": "function", "name": "get_booleq", "text_snippet": "bool get_booleq(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b) {\n bvar_t x;\n int3"}, {"node_id": 572, "universal_type": "function", "name": "unknown", "text_snippet": "get_booleq(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <assert.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"scratch/booleq_table.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"utils/memalloc.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n * The Yices SMT Solver. Copyright 2014 SRI International.\n *\n * This program may only be used subject to the noncommercial end user\n * license agreement which is downloadable along with this program.\n */\n\n/*\n * EXPERIMENTAL: TABLE OF BOOLEAN EQUALITIES\n */\n\n#include <assert.h>\n\n#include \"scratch/booleq_table.h\"\n#include \"utils/memalloc.h\"\n\n\n/*\n * Initialize table:\n * - nothing allocated yet: dsize and esize are 0\n */\nvoid init_booleq_table(booleq_table_t *table) {\n table->def = NULL;\n table->eq = NULL;\n table->nvars = 0;\n table->dsize = 0;\n table->neqs =0;\n table->esize = 0;\n}\n\n\n/*\n * Increase the size of the eq array\n */\nstatic void booleq_table_extend_eq(booleq_table_t *table) {\n uint32_t n;\n\n n = table->esize;\n if (n == 0) {\n // first allocation\n n = BOOLEQ_DEFAULT_ESIZE;\n assert(n > 0 && n <= BOOLEQ_MAX_ESIZE);\n table->eq = (booleq_t *) safe_malloc(n * sizeof(booleq_t));\n table->esize = n;\n } else {\n // make the table 50% larger\n n += (n >> 1) + 1;\n if (n > BOOLEQ_MAX_ESIZE) {\n out_of_memory();\n }\n table->eq = (booleq_t *) safe_realloc(table->eq, n * sizeof(booleq_t));\n table->esize = n;\n }\n}\n\n\n/*\n * Allocate a new eq descriptor: return its index\n */\nstatic int32_t booleq_table_alloc_eq(booleq_table_t *table) {\n uint32_t i;\n\n i = table->neqs;\n if (i == table->esize) {\n booleq_table_extend_eq(table);\n }\n assert(i < table->esize);\n table->neqs = i+1;\n\n return i;\n}\n\n\n/*\n * Make the def array large enough to store def[x]\n * - initialize all new elements to -1\n */\nstatic void booleq_table_resize_def(booleq_table_t *table, uint32_t x) {\n uint32_t i, n;\n\n if (x >= table->nvars) {\n n = table->dsize;\n if (x >= n) {\n // allocate a larger array\n if (n == 0) {\n\tn = BOOLEQ_DEFAULT_DSIZE;\n } else {\n\tn += (n >> 1) + 1;\n }\n if (x >= n) {\n\tn = x + 1;\n }\n if (n > BOOLEQ_MAX_DSIZE) {\n\tout_of_memory();\n }\n\n table->def = (int32_t *) safe_realloc(table->def, n * sizeof(int32_t));\n table->dsize = n;\n }\n\n for (i=table->nvars; i<=x; i++) {\n table->def[i] = -1;\n }\n table->nvars = x + 1;\n }\n}\n\n\n\n\n/*\n * Empty the table\n */\nvoid reset_booleq_table(booleq_table_t *table) {\n table->nvars = 0;\n table->neqs = 0;\n}\n\n\n/*\n * Free all memory used\n */\nvoid delete_booleq_table(booleq_table_t *table) {\n safe_free(table->def);\n safe_free(table->eq);\n table->def = NULL;\n table->eq = NULL;\n}\n\n\n/*\n * Record the constraint l := (eq a b)\n * - there must not be any definition for var_of(l)\n */\nvoid booleq_table_record_eq(booleq_table_t *table, literal_t l, literal_t a, literal_t b) {\n bvar_t x;\n int32_t i;\n\n assert(l >= 0 && a >= 0 && b >= 0);\n\n // normalize; force l to be positive\n a ^= sign_of_lit(l);\n l ^= sign_of_lit(l);\n\n assert(is_pos(l));\n x = var_of(l);\n booleq_table_resize_def(table, x);\n i = booleq_table_alloc_eq(table);\n\n assert(table->def[x] == -1);\n\n table->eq[i].lit[0] = a;\n table->eq[i].lit[1] = b;\n table->def[x] = i;\n}\n\n\n/*\n * Check whether x has a definition in the table\n * - x must be a valid variable index (non-negative)\n */\nbool boolvar_is_eq(booleq_table_t *table, bvar_t x) {\n return x < table->nvars && table->def[x] >= 0;\n}\n\n\n/*\n * Get the equality equivalent to l\n * - return false if there's no such equality in table\n * - return true otherwise and set *a and *b\n * If the result is true then the equivalence l <=> (eq *a *b) holds\n */\nbool get_booleq(booleq_table_t *table, literal_t l, literal_t *a, literal_t *b) {\n bvar_t x;\n int32_t i;\n\n assert(l >= 0);\n\n x = var_of(l);\n if (x < table->nvars) {\n i = table->def[x];\n if (i >= 0) {\n *a = table->eq[i].lit[0] ^ sign_of_lit(l);\n *b = table->eq[i].lit[1];\n return true;\n }\n }\n\n return false;\n}\n\n\n\n"}
80,957
c
/******************************************************************** Written by <NAME> Please see the file HEART_LICENSE.txt in the source's root directory. *********************************************************************/ #pragma once #include "base/hTypes.h" #include "base/hColour.h" #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #if HEART_USEOPENGL namespace Heart { namespace hRenderer { struct hUniformBuffer; struct hVertexBuffer; struct hTexture2D; struct hRenderCall; struct hRenderFence; struct hCmdList; enum class Op : hUint8 { NoOp = 0, Clear, Swap, Draw, Jump, Fence, UniBufferFlush, VtxBufferFlush, SetScissor, Call, Return, }; static hUint OpCodeSize = 8; // required for cmd alignment, 4 for opcode, 4 for next cmd offset struct hGLJump { void* next; }; struct hGLCall { hCmdList* jumpTo; }; struct hGLFence { hRenderFence* fence; }; struct hGLRCHeader { union { struct { hBool blend : 1; hBool seperateAlpha : 1; hBool depth : 1; hBool stencil : 1; hBool index : 1; hBool writeMask : 1; // if true assume ~0u hBool fill : 1; hBool cullCW : 1; hBool cullCCW : 1; hBool scissor : 1; hBool depthBais : 1; }; hUint32 flags; }; hUint8 samplerCount_; hUint8 uniBufferCount_; hUint8 textureCount_; hUint8 vtxAttCount_; hGLRCHeader() : flags(0) , samplerCount_(0) , uniBufferCount_(0) , textureCount_(0) , vtxAttCount_(0) { } }; struct hGLBlend { GLenum func; GLenum src; GLenum dest; }; struct hGLDepth { GLenum func; hUint32 mask; }; struct hGLStencil { hUint32 readMask_; hUint32 writeMask_; hUint32 ref_; GLenum failOp_; GLenum depthFailOp_; GLenum passOp_; GLenum func_; }; struct hGLDepthBais { hInt32 depthBias_; hFloat depthBiasClamp_; hFloat slopeScaledDepthBias_; hUint32 depthClipEnable_; }; struct hGLVtxAttrib { GLuint index_; GLint size_; GLenum type_; GLsizei stride_; hBool normalise; void* pointer_; }; struct hGLTexture2D { GLint index_; const hTexture2D* tex_; }; struct hGLUniformBuffer { GLint index_; const hUniformBuffer* ub_; }; struct hGLClear { hColour colour; hFloat depth; }; struct hGLScissor { hUint x, y, width, height; }; struct hGLDraw { hRenderCall* rc; GLenum primType; hUint count; hUint vtxOffset; }; struct hGLUniBufferFlush { hUniformBuffer* ub; hUint offset; hUint size; }; struct hGLVertexBufferFlush { hVertexBuffer* vb; hUint offset; hUint size; }; } } #endif//HEART_USEOPENGL
19.41
136
(ERROR) "/********************************************************************\n Written by <NAME>\n Please see the file HEART_LICENSE.txt in the source's root directory.\n*********************************************************************/\n#pragma once\n\n#include "base/hTypes.h"\n#include "base/hColour.h"\n#include <GLES2/gl2.h>\n#include <GLES2/gl2ext.h>\n\n#if HEART_USEOPENGL\n\nnamespace Heart {\nnamespace hRenderer {\n\nstruct hUniformBuffer;\nstruct hVertexBuffer;\nstruct hTexture2D;\nstruct hRenderCall;\nstruct hRenderFence;\nstruct hCmdList;\n\nenum class Op : hUint8 {\n NoOp = 0,\n Clear,\n Swap,\n Draw,\n Jump,\n Fence,\n UniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return,\n};\n\nstatic hUint OpCodeSize = 8; // required for cmd alignment, 4 for opcode, 4 for next cmd offset\n\nstruct hGLJump {\n void* next;\n};\n\nstruct hGLCall {\n hCmdList* jumpTo;\n};\n\nstruct hGLFence {\n hRenderFence* fence;\n};\n\nstruct hGLRCHeader {\n union {\n struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n };\n hUint32 flags;\n };\n hUint8 samplerCount_;\n hUint8 uniBufferCount_;\n hUint8 textureCount_;\n hUint8 vtxAttCount_;\n\n hGLRCHeader() \n : flags(0)\n , samplerCount_(0)\n , uniBufferCount_(0)\n , textureCount_(0)\n , vtxAttCount_(0) {\n\n }\n};\n\nstruct hGLBlend {\n GLenum func;\n GLenum src;\n GLenum dest;\n};\n\nstruct hGLDepth {\n GLenum func;\n hUint32 mask;\n};\n\nstruct hGLStencil {\n hUint32 readMask_;\n hUint32 writeMask_;\n hUint32 ref_;\n GLenum failOp_;\n GLenum depthFailOp_;\n GLenum passOp_;\n GLenum func_;\n};\n\nstruct hGLDepthBais {\n hInt32 depthBias_;\n hFloat depthBiasClamp_;\n hFloat slopeScaledDepthBias_;\n hUint32 depthClipEnable_;\n};\n\nstruct hGLVtxAttrib {\n GLuint index_;\n GLint size_;\n GLenum type_;\n GLsizei stride_;\n hBool normalise;\n void* pointer_;\n};\n\nstruct hGLTexture2D {\n GLint index_;\n const hTexture2D* tex_;\n};\n\nstruct hGLUniformBuffer {\n GLint index_;\n const hUniformBuffer* ub_;\n};\n\nstruct hGLClear {\n hColour colour;\n hFloat depth;\n};\n\nstruct hGLScissor {\n hUint x, y, width, height;\n};\n\nstruct hGLDraw {\n hRenderCall* rc;\n GLenum primType;\n hUint count;\n hUint vtxOffset;\n};\n\nstruct hGLUniBufferFlush {\n hUniformBuffer* ub;\n hUint offset;\n hUint size;\n};\n\nstruct hGLVertexBufferFlush {\n hVertexBuffer* vb;\n hUint offset;\n hUint size;\n};\n\n}\n}\n\n#endif//HEART_USEOPENGL\n" (comment) "/********************************************************************\n Written by <NAME>\n Please see the file HEART_LICENSE.txt in the source's root directory.\n*********************************************************************/" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "base/hTypes.h"\n" (#include) "#include" (string_literal) ""base/hTypes.h"" (") """ (string_content) "base/hTypes.h" (") """ (preproc_include) "#include "base/hColour.h"\n" (#include) "#include" (string_literal) ""base/hColour.h"" (") """ (string_content) "base/hColour.h" (") """ (preproc_include) "#include <GLES2/gl2.h>\n" (#include) "#include" (system_lib_string) "<GLES2/gl2.h>" (preproc_include) "#include <GLES2/gl2ext.h>\n" (#include) "#include" (system_lib_string) "<GLES2/gl2ext.h>" (#if) "#if" (identifier) "HEART_USEOPENGL" ( ) "\n\n" (type_identifier) "namespace" (identifier) "Heart" ({) "{" (type_identifier) "namespace" (identifier) "hRenderer" ({) "{" (struct_specifier) "struct hUniformBuffer" (struct) "struct" (type_identifier) "hUniformBuffer" (;) ";" (struct_specifier) "struct hVertexBuffer" (struct) "struct" (type_identifier) "hVertexBuffer" (;) ";" (struct_specifier) "struct hTexture2D" (struct) "struct" (type_identifier) "hTexture2D" (;) ";" (struct_specifier) "struct hRenderCall" (struct) "struct" (type_identifier) "hRenderCall" (;) ";" (struct_specifier) "struct hRenderFence" (struct) "struct" (type_identifier) "hRenderFence" (;) ";" (struct_specifier) "struct hCmdList" (struct) "struct" (type_identifier) "hCmdList" (;) ";" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (ERROR) "Op :" (identifier) "Op" (:) ":" (identifier) "hUint8" ({) "{" (expression_statement) "NoOp = 0,\n Clear,\n Swap,\n Draw,\n Jump,\n Fence,\n UniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return,\n};" (comma_expression) "NoOp = 0,\n Clear,\n Swap,\n Draw,\n Jump,\n Fence,\n UniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return" (assignment_expression) "NoOp = 0" (identifier) "NoOp" (=) "=" (number_literal) "0" (,) "," (comma_expression) "Clear,\n Swap,\n Draw,\n Jump,\n Fence,\n UniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return" (identifier) "Clear" (,) "," (comma_expression) "Swap,\n Draw,\n Jump,\n Fence,\n UniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return" (identifier) "Swap" (,) "," (comma_expression) "Draw,\n Jump,\n Fence,\n UniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return" (identifier) "Draw" (,) "," (comma_expression) "Jump,\n Fence,\n UniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return" (identifier) "Jump" (,) "," (comma_expression) "Fence,\n UniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return" (identifier) "Fence" (,) "," (comma_expression) "UniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return" (identifier) "UniBufferFlush" (,) "," (comma_expression) "VtxBufferFlush,\n SetScissor,\n Call,\n Return" (identifier) "VtxBufferFlush" (,) "," (comma_expression) "SetScissor,\n Call,\n Return" (identifier) "SetScissor" (,) "," (comma_expression) "Call,\n Return" (identifier) "Call" (,) "," (identifier) "Return" (ERROR) ",\n}" (,) "," (}) "}" (;) ";" (declaration) "static hUint OpCodeSize = 8;" (storage_class_specifier) "static" (static) "static" (type_identifier) "hUint" (init_declarator) "OpCodeSize = 8" (identifier) "OpCodeSize" (=) "=" (number_literal) "8" (;) ";" (comment) "// required for cmd alignment, 4 for opcode, 4 for next cmd offset" (struct_specifier) "struct hGLJump {\n void* next;\n}" (struct) "struct" (type_identifier) "hGLJump" (field_declaration_list) "{\n void* next;\n}" ({) "{" (field_declaration) "void* next;" (primitive_type) "void" (pointer_declarator) "* next" (*) "*" (field_identifier) "next" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLCall {\n hCmdList* jumpTo;\n}" (struct) "struct" (type_identifier) "hGLCall" (field_declaration_list) "{\n hCmdList* jumpTo;\n}" ({) "{" (field_declaration) "hCmdList* jumpTo;" (type_identifier) "hCmdList" (pointer_declarator) "* jumpTo" (*) "*" (field_identifier) "jumpTo" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLFence {\n hRenderFence* fence;\n}" (struct) "struct" (type_identifier) "hGLFence" (field_declaration_list) "{\n hRenderFence* fence;\n}" ({) "{" (field_declaration) "hRenderFence* fence;" (type_identifier) "hRenderFence" (pointer_declarator) "* fence" (*) "*" (field_identifier) "fence" (;) ";" (}) "}" (;) ";" (struct) "struct" (identifier) "hGLRCHeader" ({) "{" (field_declaration) "union {\n struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n };\n hUint32 flags;\n };" (union_specifier) "union {\n struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n };\n hUint32 flags;\n }" (union) "union" (field_declaration_list) "{\n struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n };\n hUint32 flags;\n }" ({) "{" (field_declaration) "struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n };" (struct_specifier) "struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n }" (struct) "struct" (field_declaration_list) "{\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n }" ({) "{" (field_declaration) "hBool blend : 1;" (type_identifier) "hBool" (field_identifier) "blend" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (field_declaration) "hBool seperateAlpha : 1;" (type_identifier) "hBool" (field_identifier) "seperateAlpha" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (field_declaration) "hBool depth : 1;" (type_identifier) "hBool" (field_identifier) "depth" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (field_declaration) "hBool stencil : 1;" (type_identifier) "hBool" (field_identifier) "stencil" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (field_declaration) "hBool index : 1;" (type_identifier) "hBool" (field_identifier) "index" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (field_declaration) "hBool writeMask : 1;" (type_identifier) "hBool" (field_identifier) "writeMask" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (comment) "// if true assume ~0u" (field_declaration) "hBool fill : 1;" (type_identifier) "hBool" (field_identifier) "fill" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (field_declaration) "hBool cullCW : 1;" (type_identifier) "hBool" (field_identifier) "cullCW" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (field_declaration) "hBool cullCCW : 1;" (type_identifier) "hBool" (field_identifier) "cullCCW" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (field_declaration) "hBool scissor : 1;" (type_identifier) "hBool" (field_identifier) "scissor" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (field_declaration) "hBool depthBais : 1;" (type_identifier) "hBool" (field_identifier) "depthBais" (bitfield_clause) ": 1" (:) ":" (number_literal) "1" (;) ";" (}) "}" (;) ";" (field_declaration) "hUint32 flags;" (type_identifier) "hUint32" (field_identifier) "flags" (;) ";" (}) "}" (;) ";" (field_declaration) "hUint8 samplerCount_;" (type_identifier) "hUint8" (field_identifier) "samplerCount_" (;) ";" (field_declaration) "hUint8 uniBufferCount_;" (type_identifier) "hUint8" (field_identifier) "uniBufferCount_" (;) ";" (field_declaration) "hUint8 textureCount_;" (type_identifier) "hUint8" (field_identifier) "textureCount_" (;) ";" (field_declaration) "hUint8 vtxAttCount_;" (type_identifier) "hUint8" (field_identifier) "vtxAttCount_" (;) ";" (identifier) "hGLRCHeader" (() "(" (ERROR) ") \n :" ()) ")" (:) ":" (identifier) "flags" (() "(" (ERROR) "0)\n ," (number_literal) "0" ()) ")" (,) "," (identifier) "samplerCount_" (() "(" (ERROR) "0)\n ," (number_literal) "0" ()) ")" (,) "," (identifier) "uniBufferCount_" (() "(" (ERROR) "0)\n ," (number_literal) "0" ()) ")" (,) "," (identifier) "textureCount_" (() "(" (ERROR) "0)\n ," (number_literal) "0" ()) ")" (,) "," (identifier) "vtxAttCount_" (() "(" (ERROR) "0) {\n\n }\n};\n\nstruct hGLBlend {\n GLenum func;\n GLenum src;\n GLenum dest;\n};\n\nstruct hGLDepth {\n GLenum func;\n hUint32 mask;\n};\n\nstruct hGLStencil {\n hUint32 readMask_;\n hUint32 writeMask_;\n hUint32 ref_;\n GLenum failOp_;\n GLenum depthFailOp_;\n GLenum passOp_;\n GLenum func_;\n};\n\nstruct hGLDepthBais {\n hInt32 depthBias_;\n hFloat depthBiasClamp_;\n hFloat slopeScaledDepthBias_;\n hUint32 depthClipEnable_;\n};\n\nstruct hGLVtxAttrib {\n GLuint index_;\n GLint size_;\n GLenum type_;\n GLsizei stride_;\n hBool normalise;\n void* pointer_;\n};\n\nstruct hGLTexture2D {\n GLint index_;\n const hTexture2D* tex_;\n};\n\nstruct hGLUniformBuffer {\n GLint index_;\n const hUniformBuffer* ub_;\n};\n\nstruct hGLClear {\n hColour colour;\n hFloat depth;\n};\n\nstruct hGLScissor {\n hUint x, y, width, height;\n};\n\nstruct hGLDraw {\n hRenderCall* rc;\n GLenum primType;\n hUint count;\n hUint vtxOffset;\n};\n\nstruct hGLUniBufferFlush {\n hUniformBuffer* ub;\n hUint offset;\n hUint size;\n};" (number_literal) "0" ()) ")" ({) "{" (}) "}" (}) "}" (;) ";" (struct_specifier) "struct hGLBlend {\n GLenum func;\n GLenum src;\n GLenum dest;\n}" (struct) "struct" (type_identifier) "hGLBlend" (field_declaration_list) "{\n GLenum func;\n GLenum src;\n GLenum dest;\n}" ({) "{" (field_declaration) "GLenum func;" (type_identifier) "GLenum" (field_identifier) "func" (;) ";" (field_declaration) "GLenum src;" (type_identifier) "GLenum" (field_identifier) "src" (;) ";" (field_declaration) "GLenum dest;" (type_identifier) "GLenum" (field_identifier) "dest" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLDepth {\n GLenum func;\n hUint32 mask;\n}" (struct) "struct" (type_identifier) "hGLDepth" (field_declaration_list) "{\n GLenum func;\n hUint32 mask;\n}" ({) "{" (field_declaration) "GLenum func;" (type_identifier) "GLenum" (field_identifier) "func" (;) ";" (field_declaration) "hUint32 mask;" (type_identifier) "hUint32" (field_identifier) "mask" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLStencil {\n hUint32 readMask_;\n hUint32 writeMask_;\n hUint32 ref_;\n GLenum failOp_;\n GLenum depthFailOp_;\n GLenum passOp_;\n GLenum func_;\n}" (struct) "struct" (type_identifier) "hGLStencil" (field_declaration_list) "{\n hUint32 readMask_;\n hUint32 writeMask_;\n hUint32 ref_;\n GLenum failOp_;\n GLenum depthFailOp_;\n GLenum passOp_;\n GLenum func_;\n}" ({) "{" (field_declaration) "hUint32 readMask_;" (type_identifier) "hUint32" (field_identifier) "readMask_" (;) ";" (field_declaration) "hUint32 writeMask_;" (type_identifier) "hUint32" (field_identifier) "writeMask_" (;) ";" (field_declaration) "hUint32 ref_;" (type_identifier) "hUint32" (field_identifier) "ref_" (;) ";" (field_declaration) "GLenum failOp_;" (type_identifier) "GLenum" (field_identifier) "failOp_" (;) ";" (field_declaration) "GLenum depthFailOp_;" (type_identifier) "GLenum" (field_identifier) "depthFailOp_" (;) ";" (field_declaration) "GLenum passOp_;" (type_identifier) "GLenum" (field_identifier) "passOp_" (;) ";" (field_declaration) "GLenum func_;" (type_identifier) "GLenum" (field_identifier) "func_" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLDepthBais {\n hInt32 depthBias_;\n hFloat depthBiasClamp_;\n hFloat slopeScaledDepthBias_;\n hUint32 depthClipEnable_;\n}" (struct) "struct" (type_identifier) "hGLDepthBais" (field_declaration_list) "{\n hInt32 depthBias_;\n hFloat depthBiasClamp_;\n hFloat slopeScaledDepthBias_;\n hUint32 depthClipEnable_;\n}" ({) "{" (field_declaration) "hInt32 depthBias_;" (type_identifier) "hInt32" (field_identifier) "depthBias_" (;) ";" (field_declaration) "hFloat depthBiasClamp_;" (type_identifier) "hFloat" (field_identifier) "depthBiasClamp_" (;) ";" (field_declaration) "hFloat slopeScaledDepthBias_;" (type_identifier) "hFloat" (field_identifier) "slopeScaledDepthBias_" (;) ";" (field_declaration) "hUint32 depthClipEnable_;" (type_identifier) "hUint32" (field_identifier) "depthClipEnable_" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLVtxAttrib {\n GLuint index_;\n GLint size_;\n GLenum type_;\n GLsizei stride_;\n hBool normalise;\n void* pointer_;\n}" (struct) "struct" (type_identifier) "hGLVtxAttrib" (field_declaration_list) "{\n GLuint index_;\n GLint size_;\n GLenum type_;\n GLsizei stride_;\n hBool normalise;\n void* pointer_;\n}" ({) "{" (field_declaration) "GLuint index_;" (type_identifier) "GLuint" (field_identifier) "index_" (;) ";" (field_declaration) "GLint size_;" (type_identifier) "GLint" (field_identifier) "size_" (;) ";" (field_declaration) "GLenum type_;" (type_identifier) "GLenum" (field_identifier) "type_" (;) ";" (field_declaration) "GLsizei stride_;" (type_identifier) "GLsizei" (field_identifier) "stride_" (;) ";" (field_declaration) "hBool normalise;" (type_identifier) "hBool" (field_identifier) "normalise" (;) ";" (field_declaration) "void* pointer_;" (primitive_type) "void" (pointer_declarator) "* pointer_" (*) "*" (field_identifier) "pointer_" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLTexture2D {\n GLint index_;\n const hTexture2D* tex_;\n}" (struct) "struct" (type_identifier) "hGLTexture2D" (field_declaration_list) "{\n GLint index_;\n const hTexture2D* tex_;\n}" ({) "{" (field_declaration) "GLint index_;" (type_identifier) "GLint" (field_identifier) "index_" (;) ";" (field_declaration) "const hTexture2D* tex_;" (type_qualifier) "const" (const) "const" (type_identifier) "hTexture2D" (pointer_declarator) "* tex_" (*) "*" (field_identifier) "tex_" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLUniformBuffer {\n GLint index_;\n const hUniformBuffer* ub_;\n}" (struct) "struct" (type_identifier) "hGLUniformBuffer" (field_declaration_list) "{\n GLint index_;\n const hUniformBuffer* ub_;\n}" ({) "{" (field_declaration) "GLint index_;" (type_identifier) "GLint" (field_identifier) "index_" (;) ";" (field_declaration) "const hUniformBuffer* ub_;" (type_qualifier) "const" (const) "const" (type_identifier) "hUniformBuffer" (pointer_declarator) "* ub_" (*) "*" (field_identifier) "ub_" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLClear {\n hColour colour;\n hFloat depth;\n}" (struct) "struct" (type_identifier) "hGLClear" (field_declaration_list) "{\n hColour colour;\n hFloat depth;\n}" ({) "{" (field_declaration) "hColour colour;" (type_identifier) "hColour" (field_identifier) "colour" (;) ";" (field_declaration) "hFloat depth;" (type_identifier) "hFloat" (field_identifier) "depth" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLScissor {\n hUint x, y, width, height;\n}" (struct) "struct" (type_identifier) "hGLScissor" (field_declaration_list) "{\n hUint x, y, width, height;\n}" ({) "{" (field_declaration) "hUint x, y, width, height;" (type_identifier) "hUint" (field_identifier) "x" (,) "," (field_identifier) "y" (,) "," (field_identifier) "width" (,) "," (field_identifier) "height" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLDraw {\n hRenderCall* rc;\n GLenum primType;\n hUint count;\n hUint vtxOffset;\n}" (struct) "struct" (type_identifier) "hGLDraw" (field_declaration_list) "{\n hRenderCall* rc;\n GLenum primType;\n hUint count;\n hUint vtxOffset;\n}" ({) "{" (field_declaration) "hRenderCall* rc;" (type_identifier) "hRenderCall" (pointer_declarator) "* rc" (*) "*" (field_identifier) "rc" (;) ";" (field_declaration) "GLenum primType;" (type_identifier) "GLenum" (field_identifier) "primType" (;) ";" (field_declaration) "hUint count;" (type_identifier) "hUint" (field_identifier) "count" (;) ";" (field_declaration) "hUint vtxOffset;" (type_identifier) "hUint" (field_identifier) "vtxOffset" (;) ";" (}) "}" (;) ";" (struct_specifier) "struct hGLUniBufferFlush {\n hUniformBuffer* ub;\n hUint offset;\n hUint size;\n}" (struct) "struct" (type_identifier) "hGLUniBufferFlush" (field_declaration_list) "{\n hUniformBuffer* ub;\n hUint offset;\n hUint size;\n}" ({) "{" (field_declaration) "hUniformBuffer* ub;" (type_identifier) "hUniformBuffer" (pointer_declarator) "* ub" (*) "*" (field_identifier) "ub" (;) ";" (field_declaration) "hUint offset;" (type_identifier) "hUint" (field_identifier) "offset" (;) ";" (field_declaration) "hUint size;" (type_identifier) "hUint" (field_identifier) "size" (;) ";" (}) "}" (;) ";" (type_descriptor) "struct hGLVertexBufferFlush {\n hVertexBuffer* vb;\n hUint offset;\n hUint size;\n}" (struct_specifier) "struct hGLVertexBufferFlush {\n hVertexBuffer* vb;\n hUint offset;\n hUint size;\n}" (struct) "struct" (type_identifier) "hGLVertexBufferFlush" (field_declaration_list) "{\n hVertexBuffer* vb;\n hUint offset;\n hUint size;\n}" ({) "{" (field_declaration) "hVertexBuffer* vb;" (type_identifier) "hVertexBuffer" (pointer_declarator) "* vb" (*) "*" (field_identifier) "vb" (;) ";" (field_declaration) "hUint offset;" (type_identifier) "hUint" (field_identifier) "offset" (;) ";" (field_declaration) "hUint size;" (type_identifier) "hUint" (field_identifier) "size" (;) ";" (}) "}" (;) ";" (}) "}" (}) "}" (#endif) "#endif" (comment) "//HEART_USEOPENGL"
572
9
{"language": "c", "success": true, "metadata": {"lines": 136, "avg_line_length": 19.41, "nodes": 366, "errors": 0, "source_hash": "fec9ef71120eb887bc5e5e731eec7f5a002ad290b3087178452f2172edcb8029", "categorized_nodes": 330}, "ast": {"root": "ERROR", "nodes": [{"id": 0, "type": "ERROR", "text": "/********************************************************************\n Written by <NAME>\n Please see the file HEART_LICENSE.txt in the source's root directory.\n*********************************************************************/\n#pragma once\n\n#include \"base/hTypes.h\"\n#include \"base/hColour.h\"\n#include <GLES2/gl2.h>\n#include <GLES2/gl2ext.h>\n\n#if HEART_USEOPENGL\n\nnamespace Heart {\nnamespace hRenderer {\n\nstruct hUniformBuffer;\nstruct hVertexBuffer;\nstruct hTexture2D;\nstruct hRenderCall;\nstruct hRenderFence;\nstruct hCmdList;\n\nenum class Op : hUint8 {\n NoOp = 0,\n Clear,\n Swap,\n\tDraw,\n Jump,\n\tFence,\n\tUniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return,\n};\n\nstatic hUint OpCodeSize = 8; // required for cmd alignment, 4 for opcode, 4 for next cmd offset\n\nstruct hGLJump {\n void* next;\n};\n\nstruct hGLCall {\n hCmdList* jumpTo;\n};\n\nstruct hGLFence {\n\thRenderFence* fence;\n};\n\nstruct hGLRCHeader {\n union {\n struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n };\n hUint32 flags;\n };\n hUint8 samplerCount_;\n hUint8 uniBufferCount_;\n hUint8 textureCount_;\n hUint8 vtxAttCount_;\n\n hGLRCHeader() \n : flags(0)\n , samplerCount_(0)\n , uniBufferCount_(0)\n , textureCount_(0)\n , vtxAttCount_(0) {\n\n }\n};\n\nstruct hGLBlend {\n GLenum func;\n GLenum src;\n GLenum dest;\n};\n\nstruct hGLDepth {\n GLenum func;\n hUint32 mask;\n};\n\nstruct hGLStencil {\n hUint32 readMask_;\n hUint32 writeMask_;\n hUint32 ref_;\n GLenum failOp_;\n GLenum depthFailOp_;\n GLenum passOp_;\n GLenum func_;\n};\n\nstruct hGLDepthBais {\n hInt32 depthBias_;\n hFloat depthBiasClamp_;\n hFloat slopeScaledDepthBias_;\n hUint32 depthClipEnable_;\n};\n\nstruct hGLVtxAttrib {\n GLuint index_;\n GLint size_;\n GLenum type_;\n GLsizei stride_;\n hBool normalise;\n void* pointer_;\n};\n\nstruct hGLTexture2D {\n GLint index_;\n const hTexture2D* tex_;\n};\n\nstruct hGLUniformBuffer {\n GLint index_;\n const hUniformBuffer* ub_;\n};\n\nstruct hGLClear {\n hColour colour;\n hFloat depth;\n};\n\nstruct hGLScissor {\n hUint x, y, width, height;\n};\n\nstruct hGLDraw {\n\thRenderCall* rc;\n\tGLenum\t\t primType;\n\thUint\t\t count;\n hUint vtxOffset;\n};\n\nstruct hGLUniBufferFlush {\n\thUniformBuffer* ub;\n\thUint\t\t\toffset;\n\thUint\t\t\tsize;\n};\n\nstruct hGLVertexBufferFlush {\n hVertexBuffer* vb;\n hUint offset;\n hUint size;\n};\n\n}\n}\n\n#endif//HEART_USEOPENGL\n", "parent": null, "children": [1, 4, 7, 10, 13, 16, 17, 18, 19, 20, 21, 22, 23, 26, 29, 32, 35, 38, 41, 43, 45, 71, 77, 85, 93, 101, 102, 103, 167, 170, 173, 176, 179, 180, 181, 182, 184, 185, 187, 188, 190, 191, 193, 194, 350, 365], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 162, "column": 0}}, {"id": 1, "type": "preproc_call", "text": "#pragma once\n", "parent": 0, "children": [2, 3], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 2, "type": "preproc_directive", "text": "#pragma", "parent": 1, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 3, "type": "preproc_arg", "text": "once", "parent": 1, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 12}}, {"id": 4, "type": "preproc_include", "text": "#include \"base/hTypes.h\"\n", "parent": 0, "children": [5, 6], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 5, "type": "#include", "text": "#include", "parent": 4, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 6, "type": "string_literal", "text": "\"base/hTypes.h\"", "parent": 4, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 24}}, {"id": 7, "type": "preproc_include", "text": "#include \"base/hColour.h\"\n", "parent": 0, "children": [8, 9], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 8, "type": "#include", "text": "#include", "parent": 7, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 9, "type": "string_literal", "text": "\"base/hColour.h\"", "parent": 7, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 25}}, {"id": 10, "type": "preproc_include", "text": "#include <GLES2/gl2.h>\n", "parent": 0, "children": [11, 12], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 11, "type": "#include", "text": "#include", "parent": 10, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 12, "type": "system_lib_string", "text": "<GLES2/gl2.h>", "parent": 10, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 22}}, {"id": 13, "type": "preproc_include", "text": "#include <GLES2/gl2ext.h>\n", "parent": 0, "children": [14, 15], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 14, "type": "#include", "text": "#include", "parent": 13, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 15, "type": "system_lib_string", "text": "<GLES2/gl2ext.h>", "parent": 13, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 25}}, {"id": 16, "type": "#if", "text": "#if", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 3}}, {"id": 17, "type": "identifier", "text": "HEART_USEOPENGL", "parent": 0, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 19}}, {"id": 18, "type": "\n", "text": "\n\n", "parent": 0, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 13, "column": 0}}, {"id": 19, "type": "type_identifier", "text": "namespace", "parent": 0, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 9}}, {"id": 20, "type": "identifier", "text": "Heart", "parent": 0, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 15}}, {"id": 21, "type": "type_identifier", "text": "namespace", "parent": 0, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 9}}, {"id": 22, "type": "identifier", "text": "hRenderer", "parent": 0, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 19}}, {"id": 23, "type": "struct_specifier", "text": "struct hUniformBuffer", "parent": 0, "children": [24, 25], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 21}}, {"id": 24, "type": "struct", "text": "struct", "parent": 23, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}, {"id": 25, "type": "type_identifier", "text": "hUniformBuffer", "parent": 23, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 21}}, {"id": 26, "type": "struct_specifier", "text": "struct hVertexBuffer", "parent": 0, "children": [27, 28], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 20}}, {"id": 27, "type": "struct", "text": "struct", "parent": 26, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 28, "type": "type_identifier", "text": "hVertexBuffer", "parent": 26, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 20}}, {"id": 29, "type": "struct_specifier", "text": "struct hTexture2D", "parent": 0, "children": [30, 31], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 17}}, {"id": 30, "type": "struct", "text": "struct", "parent": 29, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 31, "type": "type_identifier", "text": "hTexture2D", "parent": 29, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 17}}, {"id": 32, "type": "struct_specifier", "text": "struct hRenderCall", "parent": 0, "children": [33, 34], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 18}}, {"id": 33, "type": "struct", "text": "struct", "parent": 32, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 34, "type": "type_identifier", "text": "hRenderCall", "parent": 32, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 18}}, {"id": 35, "type": "struct_specifier", "text": "struct hRenderFence", "parent": 0, "children": [36, 37], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 19}}, {"id": 36, "type": "struct", "text": "struct", "parent": 35, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 37, "type": "type_identifier", "text": "hRenderFence", "parent": 35, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 19}}, {"id": 38, "type": "struct_specifier", "text": "struct hCmdList", "parent": 0, "children": [39, 40], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 15}}, {"id": 39, "type": "struct", "text": "struct", "parent": 38, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 40, "type": "type_identifier", "text": "hCmdList", "parent": 38, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 15}}, {"id": 41, "type": "enum_specifier", "text": "enum class", "parent": 0, "children": [42], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 10}}, {"id": 42, "type": "enum", "text": "enum", "parent": 41, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 4}}, {"id": 43, "type": "ERROR", "text": "Op :", "parent": 0, "children": [44], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 15}}, {"id": 44, "type": "identifier", "text": "Op", "parent": 43, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 13}}, {"id": 45, "type": "identifier", "text": "hUint8", "parent": 0, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 22}}, {"id": 46, "type": "comma_expression", "text": "NoOp = 0,\n Clear,\n Swap,\n\tDraw,\n Jump,\n\tFence,\n\tUniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return", "parent": 0, "children": [47, 51], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 47, "type": "assignment_expression", "text": "NoOp = 0", "parent": 46, "children": [48, 49, 50], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 12}}, {"id": 48, "type": "identifier", "text": "NoOp", "parent": 47, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 8}}, {"id": 49, "type": "=", "text": "=", "parent": 47, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 10}}, {"id": 50, "type": "number_literal", "text": "0", "parent": 47, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 12}}, {"id": 51, "type": "comma_expression", "text": "Clear,\n Swap,\n\tDraw,\n Jump,\n\tFence,\n\tUniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return", "parent": 46, "children": [52, 53], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 52, "type": "identifier", "text": "Clear", "parent": 51, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 9}}, {"id": 53, "type": "comma_expression", "text": "Swap,\n\tDraw,\n Jump,\n\tFence,\n\tUniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return", "parent": 51, "children": [54, 55], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 54, "type": "identifier", "text": "Swap", "parent": 53, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 8}}, {"id": 55, "type": "comma_expression", "text": "Draw,\n Jump,\n\tFence,\n\tUniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return", "parent": 53, "children": [56, 57], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 34, "column": 10}}, {"id": 56, "type": "identifier", "text": "Draw", "parent": 55, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 5}}, {"id": 57, "type": "comma_expression", "text": "Jump,\n\tFence,\n\tUniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return", "parent": 55, "children": [58, 59], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 58, "type": "identifier", "text": "Jump", "parent": 57, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 8}}, {"id": 59, "type": "comma_expression", "text": "Fence,\n\tUniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return", "parent": 57, "children": [60, 61], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 34, "column": 10}}, {"id": 60, "type": "identifier", "text": "Fence", "parent": 59, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 6}}, {"id": 61, "type": "comma_expression", "text": "UniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return", "parent": 59, "children": [62, 63], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 34, "column": 10}}, {"id": 62, "type": "identifier", "text": "UniBufferFlush", "parent": 61, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 15}}, {"id": 63, "type": "comma_expression", "text": "VtxBufferFlush,\n SetScissor,\n Call,\n Return", "parent": 61, "children": [64, 65], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 64, "type": "identifier", "text": "VtxBufferFlush", "parent": 63, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 18}}, {"id": 65, "type": "comma_expression", "text": "SetScissor,\n Call,\n Return", "parent": 63, "children": [66, 67], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 66, "type": "identifier", "text": "SetScissor", "parent": 65, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 14}}, {"id": 67, "type": "comma_expression", "text": "Call,\n Return", "parent": 65, "children": [68, 69], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 68, "type": "identifier", "text": "Call", "parent": 67, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 8}}, {"id": 69, "type": "identifier", "text": "Return", "parent": 67, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 10}}, {"id": 70, "type": "ERROR", "text": ",\n}", "parent": 0, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 35, "column": 1}}, {"id": 71, "type": "declaration", "text": "static hUint OpCodeSize = 8;", "parent": 0, "children": [72, 73], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 28}}, {"id": 72, "type": "type_identifier", "text": "hUint", "parent": 71, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 12}}, {"id": 73, "type": "init_declarator", "text": "OpCodeSize = 8", "parent": 71, "children": [74, 75, 76], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 27}}, {"id": 74, "type": "identifier", "text": "OpCodeSize", "parent": 73, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 23}}, {"id": 75, "type": "=", "text": "=", "parent": 73, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 25}}, {"id": 76, "type": "number_literal", "text": "8", "parent": 73, "children": [], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 27}}, {"id": 77, "type": "struct_specifier", "text": "struct hGLJump {\n void* next;\n}", "parent": 0, "children": [78, 79], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 78, "type": "struct", "text": "struct", "parent": 77, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 6}}, {"id": 79, "type": "type_identifier", "text": "hGLJump", "parent": 77, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 14}}, {"id": 80, "type": "field_declaration", "text": "void* next;", "parent": 77, "children": [81, 82], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 15}}, {"id": 81, "type": "primitive_type", "text": "void", "parent": 80, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 8}}, {"id": 82, "type": "pointer_declarator", "text": "* next", "parent": 80, "children": [83, 84], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 14}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 9}}, {"id": 84, "type": "field_identifier", "text": "next", "parent": 82, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 14}}, {"id": 85, "type": "struct_specifier", "text": "struct hGLCall {\n hCmdList* jumpTo;\n}", "parent": 0, "children": [86, 87], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 86, "type": "struct", "text": "struct", "parent": 85, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 6}}, {"id": 87, "type": "type_identifier", "text": "hGLCall", "parent": 85, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 14}}, {"id": 88, "type": "field_declaration", "text": "hCmdList* jumpTo;", "parent": 85, "children": [89, 90], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 21}}, {"id": 89, "type": "type_identifier", "text": "hCmdList", "parent": 88, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 12}}, {"id": 90, "type": "pointer_declarator", "text": "* jumpTo", "parent": 88, "children": [91, 92], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 20}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 13}}, {"id": 92, "type": "field_identifier", "text": "jumpTo", "parent": 90, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 20}}, {"id": 93, "type": "struct_specifier", "text": "struct hGLFence {\n\thRenderFence* fence;\n}", "parent": 0, "children": [94, 95], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 94, "type": "struct", "text": "struct", "parent": 93, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 6}}, {"id": 95, "type": "type_identifier", "text": "hGLFence", "parent": 93, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 15}}, {"id": 96, "type": "field_declaration", "text": "hRenderFence* fence;", "parent": 93, "children": [97, 98], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 21}}, {"id": 97, "type": "type_identifier", "text": "hRenderFence", "parent": 96, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 13}}, {"id": 98, "type": "pointer_declarator", "text": "* fence", "parent": 96, "children": [99, 100], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 20}}, {"id": 99, "type": "*", "text": "*", "parent": 98, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 14}}, {"id": 100, "type": "field_identifier", "text": "fence", "parent": 98, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 20}}, {"id": 101, "type": "struct", "text": "struct", "parent": 0, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 102, "type": "identifier", "text": "hGLRCHeader", "parent": 0, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 18}}, {"id": 103, "type": "field_declaration", "text": "union {\n struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n };\n hUint32 flags;\n };", "parent": 0, "children": [104], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 67, "column": 6}}, {"id": 104, "type": "union_specifier", "text": "union {\n struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n };\n hUint32 flags;\n }", "parent": 103, "children": [105], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 67, "column": 5}}, {"id": 105, "type": "union", "text": "union", "parent": 104, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 9}}, {"id": 106, "type": "field_declaration", "text": "struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n };", "parent": 104, "children": [107], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 65, "column": 6}}, {"id": 107, "type": "struct_specifier", "text": "struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n }", "parent": 106, "children": [108], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 65, "column": 5}}, {"id": 108, "type": "struct", "text": "struct", "parent": 107, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 10}}, {"id": 109, "type": "field_declaration", "text": "hBool blend : 1;", "parent": 107, "children": [110, 111, 112], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 26}}, {"id": 110, "type": "type_identifier", "text": "hBool", "parent": 109, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 13}}, {"id": 111, "type": "field_identifier", "text": "blend", "parent": 109, "children": [], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 21}}, {"id": 112, "type": "bitfield_clause", "text": ": 1", "parent": 109, "children": [113], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 25}}, {"id": 113, "type": "number_literal", "text": "1", "parent": 112, "children": [], "start_point": {"row": 54, "column": 24}, "end_point": {"row": 54, "column": 25}}, {"id": 114, "type": "field_declaration", "text": "hBool seperateAlpha : 1;", "parent": 107, "children": [115, 116, 117], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 34}}, {"id": 115, "type": "type_identifier", "text": "hBool", "parent": 114, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 13}}, {"id": 116, "type": "field_identifier", "text": "seperateAlpha", "parent": 114, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 29}}, {"id": 117, "type": "bitfield_clause", "text": ": 1", "parent": 114, "children": [118], "start_point": {"row": 55, "column": 30}, "end_point": {"row": 55, "column": 33}}, {"id": 118, "type": "number_literal", "text": "1", "parent": 117, "children": [], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 33}}, {"id": 119, "type": "field_declaration", "text": "hBool depth : 1;", "parent": 107, "children": [120, 121, 122], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 26}}, {"id": 120, "type": "type_identifier", "text": "hBool", "parent": 119, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 13}}, {"id": 121, "type": "field_identifier", "text": "depth", "parent": 119, "children": [], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 21}}, {"id": 122, "type": "bitfield_clause", "text": ": 1", "parent": 119, "children": [123], "start_point": {"row": 56, "column": 22}, "end_point": {"row": 56, "column": 25}}, {"id": 123, "type": "number_literal", "text": "1", "parent": 122, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 25}}, {"id": 124, "type": "field_declaration", "text": "hBool stencil : 1;", "parent": 107, "children": [125, 126, 127], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 28}}, {"id": 125, "type": "type_identifier", "text": "hBool", "parent": 124, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 13}}, {"id": 126, "type": "field_identifier", "text": "stencil", "parent": 124, "children": [], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 23}}, {"id": 127, "type": "bitfield_clause", "text": ": 1", "parent": 124, "children": [128], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 27}}, {"id": 128, "type": "number_literal", "text": "1", "parent": 127, "children": [], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 27}}, {"id": 129, "type": "field_declaration", "text": "hBool index : 1;", "parent": 107, "children": [130, 131, 132], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 26}}, {"id": 130, "type": "type_identifier", "text": "hBool", "parent": 129, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 13}}, {"id": 131, "type": "field_identifier", "text": "index", "parent": 129, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 21}}, {"id": 132, "type": "bitfield_clause", "text": ": 1", "parent": 129, "children": [133], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 25}}, {"id": 133, "type": "number_literal", "text": "1", "parent": 132, "children": [], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 25}}, {"id": 134, "type": "field_declaration", "text": "hBool writeMask : 1;", "parent": 107, "children": [135, 136, 137], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 30}}, {"id": 135, "type": "type_identifier", "text": "hBool", "parent": 134, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 13}}, {"id": 136, "type": "field_identifier", "text": "writeMask", "parent": 134, "children": [], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 59, "column": 25}}, {"id": 137, "type": "bitfield_clause", "text": ": 1", "parent": 134, "children": [138], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 29}}, {"id": 138, "type": "number_literal", "text": "1", "parent": 137, "children": [], "start_point": {"row": 59, "column": 28}, "end_point": {"row": 59, "column": 29}}, {"id": 139, "type": "field_declaration", "text": "hBool fill : 1;", "parent": 107, "children": [140, 141, 142], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 25}}, {"id": 140, "type": "type_identifier", "text": "hBool", "parent": 139, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 13}}, {"id": 141, "type": "field_identifier", "text": "fill", "parent": 139, "children": [], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 20}}, {"id": 142, "type": "bitfield_clause", "text": ": 1", "parent": 139, "children": [143], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 24}}, {"id": 143, "type": "number_literal", "text": "1", "parent": 142, "children": [], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 24}}, {"id": 144, "type": "field_declaration", "text": "hBool cullCW : 1;", "parent": 107, "children": [145, 146, 147], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 27}}, {"id": 145, "type": "type_identifier", "text": "hBool", "parent": 144, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 13}}, {"id": 146, "type": "field_identifier", "text": "cullCW", "parent": 144, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 22}}, {"id": 147, "type": "bitfield_clause", "text": ": 1", "parent": 144, "children": [148], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 26}}, {"id": 148, "type": "number_literal", "text": "1", "parent": 147, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 26}}, {"id": 149, "type": "field_declaration", "text": "hBool cullCCW : 1;", "parent": 107, "children": [150, 151, 152], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 28}}, {"id": 150, "type": "type_identifier", "text": "hBool", "parent": 149, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 13}}, {"id": 151, "type": "field_identifier", "text": "cullCCW", "parent": 149, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 23}}, {"id": 152, "type": "bitfield_clause", "text": ": 1", "parent": 149, "children": [153], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 27}}, {"id": 153, "type": "number_literal", "text": "1", "parent": 152, "children": [], "start_point": {"row": 62, "column": 26}, "end_point": {"row": 62, "column": 27}}, {"id": 154, "type": "field_declaration", "text": "hBool scissor : 1;", "parent": 107, "children": [155, 156, 157], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 28}}, {"id": 155, "type": "type_identifier", "text": "hBool", "parent": 154, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 13}}, {"id": 156, "type": "field_identifier", "text": "scissor", "parent": 154, "children": [], "start_point": {"row": 63, "column": 16}, "end_point": {"row": 63, "column": 23}}, {"id": 157, "type": "bitfield_clause", "text": ": 1", "parent": 154, "children": [158], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 27}}, {"id": 158, "type": "number_literal", "text": "1", "parent": 157, "children": [], "start_point": {"row": 63, "column": 26}, "end_point": {"row": 63, "column": 27}}, {"id": 159, "type": "field_declaration", "text": "hBool depthBais : 1;", "parent": 107, "children": [160, 161, 162], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 30}}, {"id": 160, "type": "type_identifier", "text": "hBool", "parent": 159, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 13}}, {"id": 161, "type": "field_identifier", "text": "depthBais", "parent": 159, "children": [], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 25}}, {"id": 162, "type": "bitfield_clause", "text": ": 1", "parent": 159, "children": [163], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 29}}, {"id": 163, "type": "number_literal", "text": "1", "parent": 162, "children": [], "start_point": {"row": 64, "column": 28}, "end_point": {"row": 64, "column": 29}}, {"id": 164, "type": "field_declaration", "text": "hUint32 flags;", "parent": 104, "children": [165, 166], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 22}}, {"id": 165, "type": "type_identifier", "text": "hUint32", "parent": 164, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 15}}, {"id": 166, "type": "field_identifier", "text": "flags", "parent": 164, "children": [], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 21}}, {"id": 167, "type": "field_declaration", "text": "hUint8 samplerCount_;", "parent": 0, "children": [168, 169], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 25}}, {"id": 168, "type": "type_identifier", "text": "hUint8", "parent": 167, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 10}}, {"id": 169, "type": "field_identifier", "text": "samplerCount_", "parent": 167, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 24}}, {"id": 170, "type": "field_declaration", "text": "hUint8 uniBufferCount_;", "parent": 0, "children": [171, 172], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 27}}, {"id": 171, "type": "type_identifier", "text": "hUint8", "parent": 170, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 10}}, {"id": 172, "type": "field_identifier", "text": "uniBufferCount_", "parent": 170, "children": [], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 26}}, {"id": 173, "type": "field_declaration", "text": "hUint8 textureCount_;", "parent": 0, "children": [174, 175], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 25}}, {"id": 174, "type": "type_identifier", "text": "hUint8", "parent": 173, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 10}}, {"id": 175, "type": "field_identifier", "text": "textureCount_", "parent": 173, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 24}}, {"id": 176, "type": "field_declaration", "text": "hUint8 vtxAttCount_;", "parent": 0, "children": [177, 178], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 24}}, {"id": 177, "type": "type_identifier", "text": "hUint8", "parent": 176, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 10}}, {"id": 178, "type": "field_identifier", "text": "vtxAttCount_", "parent": 176, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 23}}, {"id": 179, "type": "identifier", "text": "hGLRCHeader", "parent": 0, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 15}}, {"id": 180, "type": "ERROR", "text": ") \n :", "parent": 0, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 74, "column": 9}}, {"id": 181, "type": "identifier", "text": "flags", "parent": 0, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 15}}, {"id": 182, "type": "ERROR", "text": "0)\n ,", "parent": 0, "children": [183], "start_point": {"row": 74, "column": 16}, "end_point": {"row": 75, "column": 9}}, {"id": 183, "type": "number_literal", "text": "0", "parent": 182, "children": [], "start_point": {"row": 74, "column": 16}, "end_point": {"row": 74, "column": 17}}, {"id": 184, "type": "identifier", "text": "samplerCount_", "parent": 0, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 23}}, {"id": 185, "type": "ERROR", "text": "0)\n ,", "parent": 0, "children": [186], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 76, "column": 9}}, {"id": 186, "type": "number_literal", "text": "0", "parent": 185, "children": [], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 25}}, {"id": 187, "type": "identifier", "text": "uniBufferCount_", "parent": 0, "children": [], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 25}}, {"id": 188, "type": "ERROR", "text": "0)\n ,", "parent": 0, "children": [189], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 77, "column": 9}}, {"id": 189, "type": "number_literal", "text": "0", "parent": 188, "children": [], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 27}}, {"id": 190, "type": "identifier", "text": "textureCount_", "parent": 0, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 23}}, {"id": 191, "type": "ERROR", "text": "0)\n ,", "parent": 0, "children": [192], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 78, "column": 9}}, {"id": 192, "type": "number_literal", "text": "0", "parent": 191, "children": [], "start_point": {"row": 77, "column": 24}, "end_point": {"row": 77, "column": 25}}, {"id": 193, "type": "identifier", "text": "vtxAttCount_", "parent": 0, "children": [], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 22}}, {"id": 194, "type": "ERROR", "text": "0) {\n\n }\n};\n\nstruct hGLBlend {\n GLenum func;\n GLenum src;\n GLenum dest;\n};\n\nstruct hGLDepth {\n GLenum func;\n hUint32 mask;\n};\n\nstruct hGLStencil {\n hUint32 readMask_;\n hUint32 writeMask_;\n hUint32 ref_;\n GLenum failOp_;\n GLenum depthFailOp_;\n GLenum passOp_;\n GLenum func_;\n};\n\nstruct hGLDepthBais {\n hInt32 depthBias_;\n hFloat depthBiasClamp_;\n hFloat slopeScaledDepthBias_;\n hUint32 depthClipEnable_;\n};\n\nstruct hGLVtxAttrib {\n GLuint index_;\n GLint size_;\n GLenum type_;\n GLsizei stride_;\n hBool normalise;\n void* pointer_;\n};\n\nstruct hGLTexture2D {\n GLint index_;\n const hTexture2D* tex_;\n};\n\nstruct hGLUniformBuffer {\n GLint index_;\n const hUniformBuffer* ub_;\n};\n\nstruct hGLClear {\n hColour colour;\n hFloat depth;\n};\n\nstruct hGLScissor {\n hUint x, y, width, height;\n};\n\nstruct hGLDraw {\n\thRenderCall* rc;\n\tGLenum\t\t primType;\n\thUint\t\t count;\n hUint vtxOffset;\n};\n\nstruct hGLUniBufferFlush {\n\thUniformBuffer* ub;\n\thUint\t\t\toffset;\n\thUint\t\t\tsize;\n};", "parent": 0, "children": [195, 196, 208, 217, 241, 256, 279, 290, 301, 310, 319, 336], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 150, "column": 2}}, {"id": 195, "type": "number_literal", "text": "0", "parent": 194, "children": [], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 24}}, {"id": 196, "type": "struct_specifier", "text": "struct hGLBlend {\n GLenum func;\n GLenum src;\n GLenum dest;\n}", "parent": 194, "children": [197, 198], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 87, "column": 1}}, {"id": 197, "type": "struct", "text": "struct", "parent": 196, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 6}}, {"id": 198, "type": "type_identifier", "text": "hGLBlend", "parent": 196, "children": [], "start_point": {"row": 83, "column": 7}, "end_point": {"row": 83, "column": 15}}, {"id": 199, "type": "field_declaration", "text": "GLenum func;", "parent": 196, "children": [200, 201], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 16}}, {"id": 200, "type": "type_identifier", "text": "GLenum", "parent": 199, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 10}}, {"id": 201, "type": "field_identifier", "text": "func", "parent": 199, "children": [], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 15}}, {"id": 202, "type": "field_declaration", "text": "GLenum src;", "parent": 196, "children": [203, 204], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 15}}, {"id": 203, "type": "type_identifier", "text": "GLenum", "parent": 202, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 10}}, {"id": 204, "type": "field_identifier", "text": "src", "parent": 202, "children": [], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 14}}, {"id": 205, "type": "field_declaration", "text": "GLenum dest;", "parent": 196, "children": [206, 207], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 16}}, {"id": 206, "type": "type_identifier", "text": "GLenum", "parent": 205, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 10}}, {"id": 207, "type": "field_identifier", "text": "dest", "parent": 205, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 15}}, {"id": 208, "type": "struct_specifier", "text": "struct hGLDepth {\n GLenum func;\n hUint32 mask;\n}", "parent": 194, "children": [209, 210], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 92, "column": 1}}, {"id": 209, "type": "struct", "text": "struct", "parent": 208, "children": [], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 6}}, {"id": 210, "type": "type_identifier", "text": "hGLDepth", "parent": 208, "children": [], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 15}}, {"id": 211, "type": "field_declaration", "text": "GLenum func;", "parent": 208, "children": [212, 213], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 17}}, {"id": 212, "type": "type_identifier", "text": "GLenum", "parent": 211, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 10}}, {"id": 213, "type": "field_identifier", "text": "func", "parent": 211, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 16}}, {"id": 214, "type": "field_declaration", "text": "hUint32 mask;", "parent": 208, "children": [215, 216], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 17}}, {"id": 215, "type": "type_identifier", "text": "hUint32", "parent": 214, "children": [], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 11}}, {"id": 216, "type": "field_identifier", "text": "mask", "parent": 214, "children": [], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 16}}, {"id": 217, "type": "struct_specifier", "text": "struct hGLStencil {\n hUint32 readMask_;\n hUint32 writeMask_;\n hUint32 ref_;\n GLenum failOp_;\n GLenum depthFailOp_;\n GLenum passOp_;\n GLenum func_;\n}", "parent": 194, "children": [218, 219], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 102, "column": 1}}, {"id": 218, "type": "struct", "text": "struct", "parent": 217, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 6}}, {"id": 219, "type": "type_identifier", "text": "hGLStencil", "parent": 217, "children": [], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 17}}, {"id": 220, "type": "field_declaration", "text": "hUint32 readMask_;", "parent": 217, "children": [221, 222], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 22}}, {"id": 221, "type": "type_identifier", "text": "hUint32", "parent": 220, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 11}}, {"id": 222, "type": "field_identifier", "text": "readMask_", "parent": 220, "children": [], "start_point": {"row": 95, "column": 12}, "end_point": {"row": 95, "column": 21}}, {"id": 223, "type": "field_declaration", "text": "hUint32 writeMask_;", "parent": 217, "children": [224, 225], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 23}}, {"id": 224, "type": "type_identifier", "text": "hUint32", "parent": 223, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 11}}, {"id": 225, "type": "field_identifier", "text": "writeMask_", "parent": 223, "children": [], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 22}}, {"id": 226, "type": "field_declaration", "text": "hUint32 ref_;", "parent": 217, "children": [227, 228], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 17}}, {"id": 227, "type": "type_identifier", "text": "hUint32", "parent": 226, "children": [], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 11}}, {"id": 228, "type": "field_identifier", "text": "ref_", "parent": 226, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 16}}, {"id": 229, "type": "field_declaration", "text": "GLenum failOp_;", "parent": 217, "children": [230, 231], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 20}}, {"id": 230, "type": "type_identifier", "text": "GLenum", "parent": 229, "children": [], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 10}}, {"id": 231, "type": "field_identifier", "text": "failOp_", "parent": 229, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 19}}, {"id": 232, "type": "field_declaration", "text": "GLenum depthFailOp_;", "parent": 217, "children": [233, 234], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 25}}, {"id": 233, "type": "type_identifier", "text": "GLenum", "parent": 232, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 10}}, {"id": 234, "type": "field_identifier", "text": "depthFailOp_", "parent": 232, "children": [], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 24}}, {"id": 235, "type": "field_declaration", "text": "GLenum passOp_;", "parent": 217, "children": [236, 237], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 20}}, {"id": 236, "type": "type_identifier", "text": "GLenum", "parent": 235, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 10}}, {"id": 237, "type": "field_identifier", "text": "passOp_", "parent": 235, "children": [], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 19}}, {"id": 238, "type": "field_declaration", "text": "GLenum func_;", "parent": 217, "children": [239, 240], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 18}}, {"id": 239, "type": "type_identifier", "text": "GLenum", "parent": 238, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 10}}, {"id": 240, "type": "field_identifier", "text": "func_", "parent": 238, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 17}}, {"id": 241, "type": "struct_specifier", "text": "struct hGLDepthBais {\n hInt32 depthBias_;\n hFloat depthBiasClamp_;\n hFloat slopeScaledDepthBias_;\n hUint32 depthClipEnable_;\n}", "parent": 194, "children": [242, 243], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 109, "column": 1}}, {"id": 242, "type": "struct", "text": "struct", "parent": 241, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 6}}, {"id": 243, "type": "type_identifier", "text": "hGLDepthBais", "parent": 241, "children": [], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 104, "column": 19}}, {"id": 244, "type": "field_declaration", "text": "hInt32 depthBias_;", "parent": 241, "children": [245, 246], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 23}}, {"id": 245, "type": "type_identifier", "text": "hInt32", "parent": 244, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 10}}, {"id": 246, "type": "field_identifier", "text": "depthBias_", "parent": 244, "children": [], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 22}}, {"id": 247, "type": "field_declaration", "text": "hFloat depthBiasClamp_;", "parent": 241, "children": [248, 249], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 28}}, {"id": 248, "type": "type_identifier", "text": "hFloat", "parent": 247, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 10}}, {"id": 249, "type": "field_identifier", "text": "depthBiasClamp_", "parent": 247, "children": [], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 27}}, {"id": 250, "type": "field_declaration", "text": "hFloat slopeScaledDepthBias_;", "parent": 241, "children": [251, 252], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 34}}, {"id": 251, "type": "type_identifier", "text": "hFloat", "parent": 250, "children": [], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 10}}, {"id": 252, "type": "field_identifier", "text": "slopeScaledDepthBias_", "parent": 250, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 33}}, {"id": 253, "type": "field_declaration", "text": "hUint32 depthClipEnable_;", "parent": 241, "children": [254, 255], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 29}}, {"id": 254, "type": "type_identifier", "text": "hUint32", "parent": 253, "children": [], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 11}}, {"id": 255, "type": "field_identifier", "text": "depthClipEnable_", "parent": 253, "children": [], "start_point": {"row": 108, "column": 12}, "end_point": {"row": 108, "column": 28}}, {"id": 256, "type": "struct_specifier", "text": "struct hGLVtxAttrib {\n GLuint index_;\n GLint size_;\n GLenum type_;\n GLsizei stride_;\n hBool normalise;\n void* pointer_;\n}", "parent": 194, "children": [257, 258], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 118, "column": 1}}, {"id": 257, "type": "struct", "text": "struct", "parent": 256, "children": [], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 111, "column": 6}}, {"id": 258, "type": "type_identifier", "text": "hGLVtxAttrib", "parent": 256, "children": [], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 19}}, {"id": 259, "type": "field_declaration", "text": "GLuint index_;", "parent": 256, "children": [260, 261], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 19}}, {"id": 260, "type": "type_identifier", "text": "GLuint", "parent": 259, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 10}}, {"id": 261, "type": "field_identifier", "text": "index_", "parent": 259, "children": [], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 18}}, {"id": 262, "type": "field_declaration", "text": "GLint size_;", "parent": 256, "children": [263, 264], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 18}}, {"id": 263, "type": "type_identifier", "text": "GLint", "parent": 262, "children": [], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 9}}, {"id": 264, "type": "field_identifier", "text": "size_", "parent": 262, "children": [], "start_point": {"row": 113, "column": 12}, "end_point": {"row": 113, "column": 17}}, {"id": 265, "type": "field_declaration", "text": "GLenum type_;", "parent": 256, "children": [266, 267], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 18}}, {"id": 266, "type": "type_identifier", "text": "GLenum", "parent": 265, "children": [], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 10}}, {"id": 267, "type": "field_identifier", "text": "type_", "parent": 265, "children": [], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 17}}, {"id": 268, "type": "field_declaration", "text": "GLsizei stride_;", "parent": 256, "children": [269, 270], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 20}}, {"id": 269, "type": "type_identifier", "text": "GLsizei", "parent": 268, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 11}}, {"id": 270, "type": "field_identifier", "text": "stride_", "parent": 268, "children": [], "start_point": {"row": 115, "column": 12}, "end_point": {"row": 115, "column": 19}}, {"id": 271, "type": "field_declaration", "text": "hBool normalise;", "parent": 256, "children": [272, 273], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 22}}, {"id": 272, "type": "type_identifier", "text": "hBool", "parent": 271, "children": [], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 9}}, {"id": 273, "type": "field_identifier", "text": "normalise", "parent": 271, "children": [], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 21}}, {"id": 274, "type": "field_declaration", "text": "void* pointer_;", "parent": 256, "children": [275, 276], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 21}}, {"id": 275, "type": "primitive_type", "text": "void", "parent": 274, "children": [], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 8}}, {"id": 276, "type": "pointer_declarator", "text": "* pointer_", "parent": 274, "children": [277, 278], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 20}}, {"id": 277, "type": "*", "text": "*", "parent": 276, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 9}}, {"id": 278, "type": "field_identifier", "text": "pointer_", "parent": 276, "children": [], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 20}}, {"id": 279, "type": "struct_specifier", "text": "struct hGLTexture2D {\n GLint index_;\n const hTexture2D* tex_;\n}", "parent": 194, "children": [280, 281], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 123, "column": 1}}, {"id": 280, "type": "struct", "text": "struct", "parent": 279, "children": [], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 120, "column": 6}}, {"id": 281, "type": "type_identifier", "text": "hGLTexture2D", "parent": 279, "children": [], "start_point": {"row": 120, "column": 7}, "end_point": {"row": 120, "column": 19}}, {"id": 282, "type": "field_declaration", "text": "GLint index_;", "parent": 279, "children": [283, 284], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 23}}, {"id": 283, "type": "type_identifier", "text": "GLint", "parent": 282, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 9}}, {"id": 284, "type": "field_identifier", "text": "index_", "parent": 282, "children": [], "start_point": {"row": 121, "column": 16}, "end_point": {"row": 121, "column": 22}}, {"id": 285, "type": "field_declaration", "text": "const hTexture2D* tex_;", "parent": 279, "children": [286, 287], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 27}}, {"id": 286, "type": "type_identifier", "text": "hTexture2D", "parent": 285, "children": [], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 20}}, {"id": 287, "type": "pointer_declarator", "text": "* tex_", "parent": 285, "children": [288, 289], "start_point": {"row": 122, "column": 20}, "end_point": {"row": 122, "column": 26}}, {"id": 288, "type": "*", "text": "*", "parent": 287, "children": [], "start_point": {"row": 122, "column": 20}, "end_point": {"row": 122, "column": 21}}, {"id": 289, "type": "field_identifier", "text": "tex_", "parent": 287, "children": [], "start_point": {"row": 122, "column": 22}, "end_point": {"row": 122, "column": 26}}, {"id": 290, "type": "struct_specifier", "text": "struct hGLUniformBuffer {\n GLint index_;\n const hUniformBuffer* ub_;\n}", "parent": 194, "children": [291, 292], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 128, "column": 1}}, {"id": 291, "type": "struct", "text": "struct", "parent": 290, "children": [], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 6}}, {"id": 292, "type": "type_identifier", "text": "hGLUniformBuffer", "parent": 290, "children": [], "start_point": {"row": 125, "column": 7}, "end_point": {"row": 125, "column": 23}}, {"id": 293, "type": "field_declaration", "text": "GLint index_;", "parent": 290, "children": [294, 295], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 27}}, {"id": 294, "type": "type_identifier", "text": "GLint", "parent": 293, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 9}}, {"id": 295, "type": "field_identifier", "text": "index_", "parent": 293, "children": [], "start_point": {"row": 126, "column": 20}, "end_point": {"row": 126, "column": 26}}, {"id": 296, "type": "field_declaration", "text": "const hUniformBuffer* ub_;", "parent": 290, "children": [297, 298], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 30}}, {"id": 297, "type": "type_identifier", "text": "hUniformBuffer", "parent": 296, "children": [], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 24}}, {"id": 298, "type": "pointer_declarator", "text": "* ub_", "parent": 296, "children": [299, 300], "start_point": {"row": 127, "column": 24}, "end_point": {"row": 127, "column": 29}}, {"id": 299, "type": "*", "text": "*", "parent": 298, "children": [], "start_point": {"row": 127, "column": 24}, "end_point": {"row": 127, "column": 25}}, {"id": 300, "type": "field_identifier", "text": "ub_", "parent": 298, "children": [], "start_point": {"row": 127, "column": 26}, "end_point": {"row": 127, "column": 29}}, {"id": 301, "type": "struct_specifier", "text": "struct hGLClear {\n hColour colour;\n hFloat depth;\n}", "parent": 194, "children": [302, 303], "start_point": {"row": 130, "column": 0}, "end_point": {"row": 133, "column": 1}}, {"id": 302, "type": "struct", "text": "struct", "parent": 301, "children": [], "start_point": {"row": 130, "column": 0}, "end_point": {"row": 130, "column": 6}}, {"id": 303, "type": "type_identifier", "text": "hGLClear", "parent": 301, "children": [], "start_point": {"row": 130, "column": 7}, "end_point": {"row": 130, "column": 15}}, {"id": 304, "type": "field_declaration", "text": "hColour colour;", "parent": 301, "children": [305, 306], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 19}}, {"id": 305, "type": "type_identifier", "text": "hColour", "parent": 304, "children": [], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 131, "column": 11}}, {"id": 306, "type": "field_identifier", "text": "colour", "parent": 304, "children": [], "start_point": {"row": 131, "column": 12}, "end_point": {"row": 131, "column": 18}}, {"id": 307, "type": "field_declaration", "text": "hFloat depth;", "parent": 301, "children": [308, 309], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 18}}, {"id": 308, "type": "type_identifier", "text": "hFloat", "parent": 307, "children": [], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 10}}, {"id": 309, "type": "field_identifier", "text": "depth", "parent": 307, "children": [], "start_point": {"row": 132, "column": 12}, "end_point": {"row": 132, "column": 17}}, {"id": 310, "type": "struct_specifier", "text": "struct hGLScissor {\n hUint x, y, width, height;\n}", "parent": 194, "children": [311, 312], "start_point": {"row": 135, "column": 0}, "end_point": {"row": 137, "column": 1}}, {"id": 311, "type": "struct", "text": "struct", "parent": 310, "children": [], "start_point": {"row": 135, "column": 0}, "end_point": {"row": 135, "column": 6}}, {"id": 312, "type": "type_identifier", "text": "hGLScissor", "parent": 310, "children": [], "start_point": {"row": 135, "column": 7}, "end_point": {"row": 135, "column": 17}}, {"id": 313, "type": "field_declaration", "text": "hUint x, y, width, height;", "parent": 310, "children": [314, 315, 316, 317, 318], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 30}}, {"id": 314, "type": "type_identifier", "text": "hUint", "parent": 313, "children": [], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 136, "column": 9}}, {"id": 315, "type": "field_identifier", "text": "x", "parent": 313, "children": [], "start_point": {"row": 136, "column": 10}, "end_point": {"row": 136, "column": 11}}, {"id": 316, "type": "field_identifier", "text": "y", "parent": 313, "children": [], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 14}}, {"id": 317, "type": "field_identifier", "text": "width", "parent": 313, "children": [], "start_point": {"row": 136, "column": 16}, "end_point": {"row": 136, "column": 21}}, {"id": 318, "type": "field_identifier", "text": "height", "parent": 313, "children": [], "start_point": {"row": 136, "column": 23}, "end_point": {"row": 136, "column": 29}}, {"id": 319, "type": "struct_specifier", "text": "struct hGLDraw {\n\thRenderCall* rc;\n\tGLenum\t\t primType;\n\thUint\t\t count;\n hUint vtxOffset;\n}", "parent": 194, "children": [320, 321], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 144, "column": 1}}, {"id": 320, "type": "struct", "text": "struct", "parent": 319, "children": [], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 6}}, {"id": 321, "type": "type_identifier", "text": "hGLDraw", "parent": 319, "children": [], "start_point": {"row": 139, "column": 7}, "end_point": {"row": 139, "column": 14}}, {"id": 322, "type": "field_declaration", "text": "hRenderCall* rc;", "parent": 319, "children": [323, 324], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 17}}, {"id": 323, "type": "type_identifier", "text": "hRenderCall", "parent": 322, "children": [], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 12}}, {"id": 324, "type": "pointer_declarator", "text": "* rc", "parent": 322, "children": [325, 326], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 16}}, {"id": 325, "type": "*", "text": "*", "parent": 324, "children": [], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 13}}, {"id": 326, "type": "field_identifier", "text": "rc", "parent": 324, "children": [], "start_point": {"row": 140, "column": 14}, "end_point": {"row": 140, "column": 16}}, {"id": 327, "type": "field_declaration", "text": "GLenum\t\t primType;", "parent": 319, "children": [328, 329], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 141, "column": 19}}, {"id": 328, "type": "type_identifier", "text": "GLenum", "parent": 327, "children": [], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 141, "column": 7}}, {"id": 329, "type": "field_identifier", "text": "primType", "parent": 327, "children": [], "start_point": {"row": 141, "column": 10}, "end_point": {"row": 141, "column": 18}}, {"id": 330, "type": "field_declaration", "text": "hUint\t\t count;", "parent": 319, "children": [331, 332], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 15}}, {"id": 331, "type": "type_identifier", "text": "hUint", "parent": 330, "children": [], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 6}}, {"id": 332, "type": "field_identifier", "text": "count", "parent": 330, "children": [], "start_point": {"row": 142, "column": 9}, "end_point": {"row": 142, "column": 14}}, {"id": 333, "type": "field_declaration", "text": "hUint vtxOffset;", "parent": 319, "children": [334, 335], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 27}}, {"id": 334, "type": "type_identifier", "text": "hUint", "parent": 333, "children": [], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 9}}, {"id": 335, "type": "field_identifier", "text": "vtxOffset", "parent": 333, "children": [], "start_point": {"row": 143, "column": 17}, "end_point": {"row": 143, "column": 26}}, {"id": 336, "type": "struct_specifier", "text": "struct hGLUniBufferFlush {\n\thUniformBuffer* ub;\n\thUint\t\t\toffset;\n\thUint\t\t\tsize;\n}", "parent": 194, "children": [337, 338], "start_point": {"row": 146, "column": 0}, "end_point": {"row": 150, "column": 1}}, {"id": 337, "type": "struct", "text": "struct", "parent": 336, "children": [], "start_point": {"row": 146, "column": 0}, "end_point": {"row": 146, "column": 6}}, {"id": 338, "type": "type_identifier", "text": "hGLUniBufferFlush", "parent": 336, "children": [], "start_point": {"row": 146, "column": 7}, "end_point": {"row": 146, "column": 24}}, {"id": 339, "type": "field_declaration", "text": "hUniformBuffer* ub;", "parent": 336, "children": [340, 341], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 147, "column": 20}}, {"id": 340, "type": "type_identifier", "text": "hUniformBuffer", "parent": 339, "children": [], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 147, "column": 15}}, {"id": 341, "type": "pointer_declarator", "text": "* ub", "parent": 339, "children": [342, 343], "start_point": {"row": 147, "column": 15}, "end_point": {"row": 147, "column": 19}}, {"id": 342, "type": "*", "text": "*", "parent": 341, "children": [], "start_point": {"row": 147, "column": 15}, "end_point": {"row": 147, "column": 16}}, {"id": 343, "type": "field_identifier", "text": "ub", "parent": 341, "children": [], "start_point": {"row": 147, "column": 17}, "end_point": {"row": 147, "column": 19}}, {"id": 344, "type": "field_declaration", "text": "hUint\t\t\toffset;", "parent": 336, "children": [345, 346], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 148, "column": 16}}, {"id": 345, "type": "type_identifier", "text": "hUint", "parent": 344, "children": [], "start_point": {"row": 148, "column": 1}, "end_point": {"row": 148, "column": 6}}, {"id": 346, "type": "field_identifier", "text": "offset", "parent": 344, "children": [], "start_point": {"row": 148, "column": 9}, "end_point": {"row": 148, "column": 15}}, {"id": 347, "type": "field_declaration", "text": "hUint\t\t\tsize;", "parent": 336, "children": [348, 349], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 14}}, {"id": 348, "type": "type_identifier", "text": "hUint", "parent": 347, "children": [], "start_point": {"row": 149, "column": 1}, "end_point": {"row": 149, "column": 6}}, {"id": 349, "type": "field_identifier", "text": "size", "parent": 347, "children": [], "start_point": {"row": 149, "column": 9}, "end_point": {"row": 149, "column": 13}}, {"id": 350, "type": "type_descriptor", "text": "struct hGLVertexBufferFlush {\n hVertexBuffer* vb;\n hUint offset;\n hUint size;\n}", "parent": 0, "children": [351], "start_point": {"row": 152, "column": 0}, "end_point": {"row": 156, "column": 1}}, {"id": 351, "type": "struct_specifier", "text": "struct hGLVertexBufferFlush {\n hVertexBuffer* vb;\n hUint offset;\n hUint size;\n}", "parent": 350, "children": [352, 353], "start_point": {"row": 152, "column": 0}, "end_point": {"row": 156, "column": 1}}, {"id": 352, "type": "struct", "text": "struct", "parent": 351, "children": [], "start_point": {"row": 152, "column": 0}, "end_point": {"row": 152, "column": 6}}, {"id": 353, "type": "type_identifier", "text": "hGLVertexBufferFlush", "parent": 351, "children": [], "start_point": {"row": 152, "column": 7}, "end_point": {"row": 152, "column": 27}}, {"id": 354, "type": "field_declaration", "text": "hVertexBuffer* vb;", "parent": 351, "children": [355, 356], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 22}}, {"id": 355, "type": "type_identifier", "text": "hVertexBuffer", "parent": 354, "children": [], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 17}}, {"id": 356, "type": "pointer_declarator", "text": "* vb", "parent": 354, "children": [357, 358], "start_point": {"row": 153, "column": 17}, "end_point": {"row": 153, "column": 21}}, {"id": 357, "type": "*", "text": "*", "parent": 356, "children": [], "start_point": {"row": 153, "column": 17}, "end_point": {"row": 153, "column": 18}}, {"id": 358, "type": "field_identifier", "text": "vb", "parent": 356, "children": [], "start_point": {"row": 153, "column": 19}, "end_point": {"row": 153, "column": 21}}, {"id": 359, "type": "field_declaration", "text": "hUint offset;", "parent": 351, "children": [360, 361], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 17}}, {"id": 360, "type": "type_identifier", "text": "hUint", "parent": 359, "children": [], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 9}}, {"id": 361, "type": "field_identifier", "text": "offset", "parent": 359, "children": [], "start_point": {"row": 154, "column": 10}, "end_point": {"row": 154, "column": 16}}, {"id": 362, "type": "field_declaration", "text": "hUint size;", "parent": 351, "children": [363, 364], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 15}}, {"id": 363, "type": "type_identifier", "text": "hUint", "parent": 362, "children": [], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 9}}, {"id": 364, "type": "field_identifier", "text": "size", "parent": 362, "children": [], "start_point": {"row": 155, "column": 10}, "end_point": {"row": 155, "column": 14}}, {"id": 365, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 161, "column": 0}, "end_point": {"row": 161, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [71, 80, 88, 96, 103, 106, 109, 114, 119, 124, 129, 134, 139, 144, 149, 154, 159, 164, 167, 170, 173, 176, 199, 202, 205, 211, 214, 220, 223, 226, 229, 232, 235, 238, 244, 247, 250, 253, 259, 262, 265, 268, 271, 274, 282, 285, 293, 296, 304, 307, 313, 322, 327, 330, 333, 339, 344, 347, 354, 359, 362], "classes": [23, 24, 26, 27, 29, 30, 32, 33, 35, 36, 38, 39, 77, 78, 85, 86, 93, 94, 101, 104, 105, 107, 108, 196, 197, 208, 209, 217, 218, 241, 242, 256, 257, 279, 280, 290, 291, 301, 302, 310, 311, 319, 320, 336, 337, 351, 352], "imports": [4, 5, 7, 8, 10, 11, 13, 14], "modules": [], "enums": [41, 42]}, "statements": {"expressions": [46, 51, 53, 55, 57, 59, 61, 63, 65, 67], "assignments": [47], "loops": [], "conditionals": [16, 17, 19, 20, 21, 22, 25, 28, 31, 34, 37, 40, 44, 45, 48, 52, 54, 56, 58, 60, 62, 64, 66, 68, 69, 72, 74, 79, 84, 87, 89, 92, 95, 97, 100, 102, 110, 111, 115, 116, 120, 121, 125, 126, 130, 131, 135, 136, 140, 141, 145, 146, 150, 151, 155, 156, 160, 161, 165, 166, 168, 169, 171, 172, 174, 175, 177, 178, 179, 181, 184, 187, 190, 193, 198, 200, 201, 203, 204, 206, 207, 210, 212, 213, 215, 216, 219, 221, 222, 224, 225, 227, 228, 230, 231, 233, 234, 236, 237, 239, 240, 243, 245, 246, 248, 249, 251, 252, 254, 255, 258, 260, 261, 263, 264, 266, 267, 269, 270, 272, 273, 278, 281, 283, 284, 286, 289, 292, 294, 295, 297, 300, 303, 305, 306, 308, 309, 312, 314, 315, 316, 317, 318, 321, 323, 326, 328, 329, 331, 332, 334, 335, 338, 340, 343, 345, 346, 348, 349, 353, 355, 358, 360, 361, 363, 364, 365], "returns": [], "exceptions": []}, "expressions": {"calls": [1], "literals": [6, 9, 12, 15, 50, 76, 113, 118, 123, 128, 133, 138, 143, 148, 153, 158, 163, 183, 186, 189, 192, 195], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [112, 117, 122, 127, 132, 137, 142, 147, 152, 157, 162]}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 23, "universal_type": "class", "name": "hUniformBuffer", "text_snippet": "struct hUniformBuffer"}, {"node_id": 24, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 26, "universal_type": "class", "name": "hVertexBuffer", "text_snippet": "struct hVertexBuffer"}, {"node_id": 27, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 29, "universal_type": "class", "name": "hTexture2D", "text_snippet": "struct hTexture2D"}, {"node_id": 30, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 32, "universal_type": "class", "name": "hRenderCall", "text_snippet": "struct hRenderCall"}, {"node_id": 33, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 35, "universal_type": "class", "name": "hRenderFence", "text_snippet": "struct hRenderFence"}, {"node_id": 36, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 38, "universal_type": "class", "name": "hCmdList", "text_snippet": "struct hCmdList"}, {"node_id": 39, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 77, "universal_type": "class", "name": "hGLJump", "text_snippet": "struct hGLJump {\n void* next;\n}"}, {"node_id": 78, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 85, "universal_type": "class", "name": "hGLCall", "text_snippet": "struct hGLCall {\n hCmdList* jumpTo;\n}"}, {"node_id": 86, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 93, "universal_type": "class", "name": "hGLFence", "text_snippet": "struct hGLFence {\n\thRenderFence* fence;\n}"}, {"node_id": 94, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 101, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 104, "universal_type": "class", "name": "{", "text_snippet": "union {\n struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool d"}, {"node_id": 105, "universal_type": "class", "name": "unknown", "text_snippet": "union"}, {"node_id": 107, "universal_type": "class", "name": "{", "text_snippet": "struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n "}, {"node_id": 108, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 196, "universal_type": "class", "name": "hGLBlend", "text_snippet": "struct hGLBlend {\n GLenum func;\n GLenum src;\n GLenum dest;\n}"}, {"node_id": 197, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 208, "universal_type": "class", "name": "hGLDepth", "text_snippet": "struct hGLDepth {\n GLenum func;\n hUint32 mask;\n}"}, {"node_id": 209, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 217, "universal_type": "class", "name": "hGLStencil", "text_snippet": "struct hGLStencil {\n hUint32 readMask_;\n hUint32 writeMask_;\n hUint32 ref_;\n GLenum fai"}, {"node_id": 218, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 241, "universal_type": "class", "name": "hGLDepthBais", "text_snippet": "struct hGLDepthBais {\n hInt32 depthBias_;\n hFloat depthBiasClamp_;\n hFloat slopeScaledDe"}, {"node_id": 242, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 256, "universal_type": "class", "name": "hGLVtxAttrib", "text_snippet": "struct hGLVtxAttrib {\n GLuint index_;\n GLint size_;\n GLenum type_;\n GLsizei stride_;"}, {"node_id": 257, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 279, "universal_type": "class", "name": "hGLTexture2D", "text_snippet": "struct hGLTexture2D {\n GLint index_;\n const hTexture2D* tex_;\n}"}, {"node_id": 280, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 290, "universal_type": "class", "name": "hGLUniformBuffer", "text_snippet": "struct hGLUniformBuffer {\n GLint index_;\n const hUniformBuffer* ub_;\n}"}, {"node_id": 291, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 301, "universal_type": "class", "name": "hGLClear", "text_snippet": "struct hGLClear {\n hColour colour;\n hFloat depth;\n}"}, {"node_id": 302, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 310, "universal_type": "class", "name": "hGLScissor", "text_snippet": "struct hGLScissor {\n hUint x, y, width, height;\n}"}, {"node_id": 311, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 319, "universal_type": "class", "name": "hGLDraw", "text_snippet": "struct hGLDraw {\n\thRenderCall* rc;\n\tGLenum\t\t primType;\n\thUint\t\t count;\n hUint vtxOffset;\n}"}, {"node_id": 320, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 336, "universal_type": "class", "name": "hGLUniBufferFlush", "text_snippet": "struct hGLUniBufferFlush {\n\thUniformBuffer* ub;\n\thUint\t\t\toffset;\n\thUint\t\t\tsize;\n}"}, {"node_id": 337, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 351, "universal_type": "class", "name": "hGLVertexBufferFlush", "text_snippet": "struct hGLVertexBufferFlush {\n hVertexBuffer* vb;\n hUint offset;\n hUint size;\n}"}, {"node_id": 352, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 4, "text": "#include \"base/hTypes.h\"\n"}, {"node_id": 5, "text": "#include"}, {"node_id": 7, "text": "#include \"base/hColour.h\"\n"}, {"node_id": 8, "text": "#include"}, {"node_id": 10, "text": "#include <GLES2/gl2.h>\n"}, {"node_id": 11, "text": "#include"}, {"node_id": 13, "text": "#include <GLES2/gl2ext.h>\n"}, {"node_id": 14, "text": "#include"}]}, "original_source_code": "/********************************************************************\n Written by <NAME>\n Please see the file HEART_LICENSE.txt in the source's root directory.\n*********************************************************************/\n#pragma once\n\n#include \"base/hTypes.h\"\n#include \"base/hColour.h\"\n#include <GLES2/gl2.h>\n#include <GLES2/gl2ext.h>\n\n#if HEART_USEOPENGL\n\nnamespace Heart {\nnamespace hRenderer {\n\nstruct hUniformBuffer;\nstruct hVertexBuffer;\nstruct hTexture2D;\nstruct hRenderCall;\nstruct hRenderFence;\nstruct hCmdList;\n\nenum class Op : hUint8 {\n NoOp = 0,\n Clear,\n Swap,\n\tDraw,\n Jump,\n\tFence,\n\tUniBufferFlush,\n VtxBufferFlush,\n SetScissor,\n Call,\n Return,\n};\n\nstatic hUint OpCodeSize = 8; // required for cmd alignment, 4 for opcode, 4 for next cmd offset\n\nstruct hGLJump {\n void* next;\n};\n\nstruct hGLCall {\n hCmdList* jumpTo;\n};\n\nstruct hGLFence {\n\thRenderFence* fence;\n};\n\nstruct hGLRCHeader {\n union {\n struct {\n hBool blend : 1;\n hBool seperateAlpha : 1;\n hBool depth : 1;\n hBool stencil : 1;\n hBool index : 1;\n hBool writeMask : 1; // if true assume ~0u\n hBool fill : 1;\n hBool cullCW : 1;\n hBool cullCCW : 1;\n hBool scissor : 1;\n hBool depthBais : 1;\n };\n hUint32 flags;\n };\n hUint8 samplerCount_;\n hUint8 uniBufferCount_;\n hUint8 textureCount_;\n hUint8 vtxAttCount_;\n\n hGLRCHeader() \n : flags(0)\n , samplerCount_(0)\n , uniBufferCount_(0)\n , textureCount_(0)\n , vtxAttCount_(0) {\n\n }\n};\n\nstruct hGLBlend {\n GLenum func;\n GLenum src;\n GLenum dest;\n};\n\nstruct hGLDepth {\n GLenum func;\n hUint32 mask;\n};\n\nstruct hGLStencil {\n hUint32 readMask_;\n hUint32 writeMask_;\n hUint32 ref_;\n GLenum failOp_;\n GLenum depthFailOp_;\n GLenum passOp_;\n GLenum func_;\n};\n\nstruct hGLDepthBais {\n hInt32 depthBias_;\n hFloat depthBiasClamp_;\n hFloat slopeScaledDepthBias_;\n hUint32 depthClipEnable_;\n};\n\nstruct hGLVtxAttrib {\n GLuint index_;\n GLint size_;\n GLenum type_;\n GLsizei stride_;\n hBool normalise;\n void* pointer_;\n};\n\nstruct hGLTexture2D {\n GLint index_;\n const hTexture2D* tex_;\n};\n\nstruct hGLUniformBuffer {\n GLint index_;\n const hUniformBuffer* ub_;\n};\n\nstruct hGLClear {\n hColour colour;\n hFloat depth;\n};\n\nstruct hGLScissor {\n hUint x, y, width, height;\n};\n\nstruct hGLDraw {\n\thRenderCall* rc;\n\tGLenum\t\t primType;\n\thUint\t\t count;\n hUint vtxOffset;\n};\n\nstruct hGLUniBufferFlush {\n\thUniformBuffer* ub;\n\thUint\t\t\toffset;\n\thUint\t\t\tsize;\n};\n\nstruct hGLVertexBufferFlush {\n hVertexBuffer* vb;\n hUint offset;\n hUint size;\n};\n\n}\n}\n\n#endif//HEART_USEOPENGL\n"}
80,958
c
// // DateRangePicker.h // DateRangePicker // // Created by <NAME> on 07.11.15. // Copyright © 2015 <NAME>. All rights reserved. // #import <Cocoa/Cocoa.h> //! Project version number for DateRangePicker. FOUNDATION_EXPORT double DateRangePickerVersionNumber; //! Project version string for DateRangePicker. FOUNDATION_EXPORT const unsigned char DateRangePickerVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <DateRangePicker/PublicHeader.h>
39.15
13
(translation_unit) "//\n// DateRangePicker.h\n// DateRangePicker\n//\n// Created by <NAME> on 07.11.15.\n// Copyright © 2015 <NAME>. All rights reserved.\n//\n\n#import <Cocoa/Cocoa.h>\n\n//! Project version number for DateRangePicker.\nFOUNDATION_EXPORT double DateRangePickerVersionNumber;\n\n//! Project version string for DateRangePicker.\nFOUNDATION_EXPORT const unsigned char DateRangePickerVersionString[];\n\n// In this header, you should import all the public headers of your framework using statements like #import <DateRangePicker/PublicHeader.h>\n\n\n" (comment) "//" (comment) "// DateRangePicker.h" (comment) "// DateRangePicker" (comment) "//" (comment) "// Created by <NAME> on 07.11.15." (comment) "// Copyright © 2015 <NAME>. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <Cocoa/Cocoa.h>\n\n" (preproc_directive) "import " (preproc_arg) "Cocoa/Cocoa.h>\n" (comment) "/! Project version number for DateRangePicker.\n" (declaration) "OUNDATION_EXPORT double DateRangePickerVersionNumber;\n" (type_identifier) "OUNDATION_EXPORT " (ERROR) "ouble " (identifier) "ouble " (identifier) "ateRangePickerVersionNumber;" (;) "\n" (comment) "/! Project version string for DateRangePicker.\n" (declaration) "OUNDATION_EXPORT const unsigned " (type_identifier) "OUNDATION_EXPORT " (type_qualifier) "onst " (const) "onst " (identifier) "nsigned " (;) "" (declaration) "har DateRangePickerVersionString[];\n" (primitive_type) "har " (array_declarator) "ateRangePickerVersionString[];" (identifier) "ateRangePickerVersionString[" ([) "]" (]) ";" (;) "\n" (comment) "/ In this header, you should import all the public headers of your framework using statements like #import <DateRangePicker/PublicHeader.h>\n"
33
1
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 39.15, "nodes": 15, "errors": 0, "source_hash": "65cf77d4d5a9c3ffd964e243aaf8174e389b5f0631772389b0bfc0239f784ca6", "categorized_nodes": 11}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "import <Cocoa/Cocoa.h>\n\n", "parent": null, "children": [1], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_arg", "text": "Cocoa/Cocoa.h>\n", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 2, "type": "declaration", "text": "OUNDATION_EXPORT double DateRangePickerVersionNumber;\n", "parent": null, "children": [3, 4, 6], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 54}}, {"id": 3, "type": "type_identifier", "text": "OUNDATION_EXPORT ", "parent": 2, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 17}}, {"id": 4, "type": "ERROR", "text": "ouble ", "parent": 2, "children": [5], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 24}}, {"id": 5, "type": "identifier", "text": "ouble ", "parent": 4, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 24}}, {"id": 6, "type": "identifier", "text": "ateRangePickerVersionNumber;", "parent": 2, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 53}}, {"id": 7, "type": "declaration", "text": "OUNDATION_EXPORT const unsigned ", "parent": null, "children": [8, 9, 10], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 32}}, {"id": 8, "type": "type_identifier", "text": "OUNDATION_EXPORT ", "parent": 7, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 17}}, {"id": 9, "type": "type_qualifier", "text": "onst ", "parent": 7, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 23}}, {"id": 10, "type": "identifier", "text": "nsigned ", "parent": 7, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 32}}, {"id": 11, "type": "declaration", "text": "har DateRangePickerVersionString[];\n", "parent": null, "children": [12, 13], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 69}}, {"id": 12, "type": "primitive_type", "text": "har ", "parent": 11, "children": [], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 37}}, {"id": 13, "type": "array_declarator", "text": "ateRangePickerVersionString[];", "parent": 11, "children": [14], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 68}}, {"id": 14, "type": "identifier", "text": "ateRangePickerVersionString[", "parent": 13, "children": [], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 66}}]}, "node_categories": {"declarations": {"functions": [], "variables": [2, 7, 11], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3, 5, 6, 8, 9, 10, 14], "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// DateRangePicker.h\n// DateRangePicker\n//\n// Created by <NAME> on 07.11.15.\n// Copyright \u00a9 2015 <NAME>. All rights reserved.\n//\n\n#import <Cocoa/Cocoa.h>\n\n//! Project version number for DateRangePicker.\nFOUNDATION_EXPORT double DateRangePickerVersionNumber;\n\n//! Project version string for DateRangePicker.\nFOUNDATION_EXPORT const unsigned char DateRangePickerVersionString[];\n\n// In this header, you should import all the public headers of your framework using statements like #import <DateRangePicker/PublicHeader.h>\n\n\n"}
80,959
c
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "NR-RRC-Definitions" * found in "NR-RRC-Definitions.asn" * `asn1c -fcompound-names -no-gen-example -pdu=all` */ #ifndef _SRS_ResourceSet_H_ #define _SRS_ResourceSet_H_ #include "asn_application.h" /* Including external dependencies */ #include "SRS-ResourceSetId.h" #include "NativeEnumerated.h" #include "Alpha.h" #include "NativeInteger.h" #include "SRS-ResourceId.h" #include "asn_SEQUENCE_OF.h" #include "constr_SEQUENCE_OF.h" #include "NZP-CSI-RS-ResourceId.h" #include "constr_SEQUENCE.h" #include "constr_CHOICE.h" #include "NULL.h" #include "PathlossReferenceRSList-r16.h" #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum SRS_ResourceSet__resourceType_PR { SRS_ResourceSet__resourceType_PR_NOTHING, /* No components present */ SRS_ResourceSet__resourceType_PR_aperiodic, SRS_ResourceSet__resourceType_PR_semi_persistent, SRS_ResourceSet__resourceType_PR_periodic } SRS_ResourceSet__resourceType_PR; typedef enum SRS_ResourceSet__usage { SRS_ResourceSet__usage_beamManagement = 0, SRS_ResourceSet__usage_codebook = 1, SRS_ResourceSet__usage_nonCodebook = 2, SRS_ResourceSet__usage_antennaSwitching = 3 } e_SRS_ResourceSet__usage; typedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates { SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2 = 0, SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop = 1 } e_SRS_ResourceSet__srs_PowerControlAdjustmentStates; typedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR { SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING, /* No components present */ SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release, SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup } SRS_ResourceSet__pathlossReferenceRSList_r16_PR; /* Forward declarations */ struct PathlossReferenceRS_Config; /* SRS-ResourceSet */ typedef struct SRS_ResourceSet { SRS_ResourceSetId_t srs_ResourceSetId; struct SRS_ResourceSet__srs_ResourceIdList { A_SEQUENCE_OF(SRS_ResourceId_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } *srs_ResourceIdList; struct SRS_ResourceSet__resourceType { SRS_ResourceSet__resourceType_PR present; union SRS_ResourceSet__resourceType_u { struct SRS_ResourceSet__resourceType__aperiodic { long aperiodicSRS_ResourceTrigger; NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */; long *slotOffset /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. */ struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList { A_SEQUENCE_OF(long) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } *aperiodicSRS_ResourceTriggerList; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } aperiodic; struct SRS_ResourceSet__resourceType__semi_persistent { NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } semi_persistent; struct SRS_ResourceSet__resourceType__periodic { NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } periodic; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } resourceType; long usage; Alpha_t *alpha /* OPTIONAL */; long *p0 /* OPTIONAL */; struct PathlossReferenceRS_Config *pathlossReferenceRS /* OPTIONAL */; long *srs_PowerControlAdjustmentStates /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. */ struct SRS_ResourceSet__pathlossReferenceRSList_r16 { SRS_ResourceSet__pathlossReferenceRSList_r16_PR present; union SRS_ResourceSet__pathlossReferenceRSList_r16_u { NULL_t release; PathlossReferenceRSList_r16_t setup; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } *pathlossReferenceRSList_r16; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } SRS_ResourceSet_t; /* Implementation */ /* extern asn_TYPE_descriptor_t asn_DEF_usage_19; // (Use -fall-defs-global to expose) */ /* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27; // (Use -fall-defs-global to expose) */ extern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet; extern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1; extern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9]; #ifdef __cplusplus } #endif /* Referred external types */ #include "PathlossReferenceRS-Config.h" #endif /* _SRS_ResourceSet_H_ */ #include "asn_internal.h"
34.24
141
(translation_unit) "/*\n * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)\n * From ASN.1 module "NR-RRC-Definitions"\n * found in "NR-RRC-Definitions.asn"\n * `asn1c -fcompound-names -no-gen-example -pdu=all`\n */\n\n#ifndef _SRS_ResourceSet_H_\n#define _SRS_ResourceSet_H_\n\n\n#include "asn_application.h"\n\n/* Including external dependencies */\n#include "SRS-ResourceSetId.h"\n#include "NativeEnumerated.h"\n#include "Alpha.h"\n#include "NativeInteger.h"\n#include "SRS-ResourceId.h"\n#include "asn_SEQUENCE_OF.h"\n#include "constr_SEQUENCE_OF.h"\n#include "NZP-CSI-RS-ResourceId.h"\n#include "constr_SEQUENCE.h"\n#include "constr_CHOICE.h"\n#include "NULL.h"\n#include "PathlossReferenceRSList-r16.h"\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\n/* Dependencies */\ntypedef enum SRS_ResourceSet__resourceType_PR {\n SRS_ResourceSet__resourceType_PR_NOTHING, /* No components present */\n SRS_ResourceSet__resourceType_PR_aperiodic,\n SRS_ResourceSet__resourceType_PR_semi_persistent,\n SRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;\ntypedef enum SRS_ResourceSet__usage {\n SRS_ResourceSet__usage_beamManagement = 0,\n SRS_ResourceSet__usage_codebook = 1,\n SRS_ResourceSet__usage_nonCodebook = 2,\n SRS_ResourceSet__usage_antennaSwitching = 3\n} e_SRS_ResourceSet__usage;\ntypedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2 = 0,\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop = 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;\ntypedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING, /* No components present */\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;\n\n/* Forward declarations */\nstruct PathlossReferenceRS_Config;\n\n/* SRS-ResourceSet */\ntypedef struct SRS_ResourceSet {\n SRS_ResourceSetId_t srs_ResourceSetId;\n struct SRS_ResourceSet__srs_ResourceIdList {\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *srs_ResourceIdList;\n struct SRS_ResourceSet__resourceType {\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } resourceType;\n long usage;\n Alpha_t *alpha /* OPTIONAL */;\n long *p0 /* OPTIONAL */;\n struct PathlossReferenceRS_Config *pathlossReferenceRS /* OPTIONAL */;\n long *srs_PowerControlAdjustmentStates /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *pathlossReferenceRSList_r16;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;\n\n/* Implementation */\n/* extern asn_TYPE_descriptor_t asn_DEF_usage_19; // (Use -fall-defs-global to expose) */\n/* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27; // (Use -fall-defs-global to expose) */\nextern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;\nextern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;\nextern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];\n\n#ifdef __cplusplus\n}\n#endif\n\n/* Referred external types */\n#include "PathlossReferenceRS-Config.h"\n\n#endif /* _SRS_ResourceSet_H_ */\n#include "asn_internal.h"\n" (comment) "/*\n * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)\n * From ASN.1 module "NR-RRC-Definitions"\n * found in "NR-RRC-Definitions.asn"\n * `asn1c -fcompound-names -no-gen-example -pdu=all`\n */" (preproc_ifdef) "#ifndef _SRS_ResourceSet_H_\n#define _SRS_ResourceSet_H_\n\n\n#include "asn_application.h"\n\n/* Including external dependencies */\n#include "SRS-ResourceSetId.h"\n#include "NativeEnumerated.h"\n#include "Alpha.h"\n#include "NativeInteger.h"\n#include "SRS-ResourceId.h"\n#include "asn_SEQUENCE_OF.h"\n#include "constr_SEQUENCE_OF.h"\n#include "NZP-CSI-RS-ResourceId.h"\n#include "constr_SEQUENCE.h"\n#include "constr_CHOICE.h"\n#include "NULL.h"\n#include "PathlossReferenceRSList-r16.h"\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\n/* Dependencies */\ntypedef enum SRS_ResourceSet__resourceType_PR {\n SRS_ResourceSet__resourceType_PR_NOTHING, /* No components present */\n SRS_ResourceSet__resourceType_PR_aperiodic,\n SRS_ResourceSet__resourceType_PR_semi_persistent,\n SRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;\ntypedef enum SRS_ResourceSet__usage {\n SRS_ResourceSet__usage_beamManagement = 0,\n SRS_ResourceSet__usage_codebook = 1,\n SRS_ResourceSet__usage_nonCodebook = 2,\n SRS_ResourceSet__usage_antennaSwitching = 3\n} e_SRS_ResourceSet__usage;\ntypedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2 = 0,\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop = 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;\ntypedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING, /* No components present */\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;\n\n/* Forward declarations */\nstruct PathlossReferenceRS_Config;\n\n/* SRS-ResourceSet */\ntypedef struct SRS_ResourceSet {\n SRS_ResourceSetId_t srs_ResourceSetId;\n struct SRS_ResourceSet__srs_ResourceIdList {\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *srs_ResourceIdList;\n struct SRS_ResourceSet__resourceType {\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } resourceType;\n long usage;\n Alpha_t *alpha /* OPTIONAL */;\n long *p0 /* OPTIONAL */;\n struct PathlossReferenceRS_Config *pathlossReferenceRS /* OPTIONAL */;\n long *srs_PowerControlAdjustmentStates /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *pathlossReferenceRSList_r16;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;\n\n/* Implementation */\n/* extern asn_TYPE_descriptor_t asn_DEF_usage_19; // (Use -fall-defs-global to expose) */\n/* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27; // (Use -fall-defs-global to expose) */\nextern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;\nextern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;\nextern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];\n\n#ifdef __cplusplus\n}\n#endif\n\n/* Referred external types */\n#include "PathlossReferenceRS-Config.h"\n\n#endif" (#ifndef) "#ifndef" (identifier) "_SRS_ResourceSet_H_" (preproc_def) "#define _SRS_ResourceSet_H_\n" (#define) "#define" (identifier) "_SRS_ResourceSet_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 "SRS-ResourceSetId.h"\n" (#include) "#include" (string_literal) ""SRS-ResourceSetId.h"" (") """ (string_content) "SRS-ResourceSetId.h" (") """ (preproc_include) "#include "NativeEnumerated.h"\n" (#include) "#include" (string_literal) ""NativeEnumerated.h"" (") """ (string_content) "NativeEnumerated.h" (") """ (preproc_include) "#include "Alpha.h"\n" (#include) "#include" (string_literal) ""Alpha.h"" (") """ (string_content) "Alpha.h" (") """ (preproc_include) "#include "NativeInteger.h"\n" (#include) "#include" (string_literal) ""NativeInteger.h"" (") """ (string_content) "NativeInteger.h" (") """ (preproc_include) "#include "SRS-ResourceId.h"\n" (#include) "#include" (string_literal) ""SRS-ResourceId.h"" (") """ (string_content) "SRS-ResourceId.h" (") """ (preproc_include) "#include "asn_SEQUENCE_OF.h"\n" (#include) "#include" (string_literal) ""asn_SEQUENCE_OF.h"" (") """ (string_content) "asn_SEQUENCE_OF.h" (") """ (preproc_include) "#include "constr_SEQUENCE_OF.h"\n" (#include) "#include" (string_literal) ""constr_SEQUENCE_OF.h"" (") """ (string_content) "constr_SEQUENCE_OF.h" (") """ (preproc_include) "#include "NZP-CSI-RS-ResourceId.h"\n" (#include) "#include" (string_literal) ""NZP-CSI-RS-ResourceId.h"" (") """ (string_content) "NZP-CSI-RS-ResourceId.h" (") """ (preproc_include) "#include "constr_SEQUENCE.h"\n" (#include) "#include" (string_literal) ""constr_SEQUENCE.h"" (") """ (string_content) "constr_SEQUENCE.h" (") """ (preproc_include) "#include "constr_CHOICE.h"\n" (#include) "#include" (string_literal) ""constr_CHOICE.h"" (") """ (string_content) "constr_CHOICE.h" (") """ (preproc_include) "#include "NULL.h"\n" (#include) "#include" (string_literal) ""NULL.h"" (") """ (string_content) "NULL.h" (") """ (preproc_include) "#include "PathlossReferenceRSList-r16.h"\n" (#include) "#include" (string_literal) ""PathlossReferenceRSList-r16.h"" (") """ (string_content) "PathlossReferenceRSList-r16.h" (") """ (preproc_ifdef) "#ifdef __cplusplus\nextern "C" {\n#endif\n\n/* Dependencies */\ntypedef enum SRS_ResourceSet__resourceType_PR {\n SRS_ResourceSet__resourceType_PR_NOTHING, /* No components present */\n SRS_ResourceSet__resourceType_PR_aperiodic,\n SRS_ResourceSet__resourceType_PR_semi_persistent,\n SRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;\ntypedef enum SRS_ResourceSet__usage {\n SRS_ResourceSet__usage_beamManagement = 0,\n SRS_ResourceSet__usage_codebook = 1,\n SRS_ResourceSet__usage_nonCodebook = 2,\n SRS_ResourceSet__usage_antennaSwitching = 3\n} e_SRS_ResourceSet__usage;\ntypedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2 = 0,\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop = 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;\ntypedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING, /* No components present */\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;\n\n/* Forward declarations */\nstruct PathlossReferenceRS_Config;\n\n/* SRS-ResourceSet */\ntypedef struct SRS_ResourceSet {\n SRS_ResourceSetId_t srs_ResourceSetId;\n struct SRS_ResourceSet__srs_ResourceIdList {\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *srs_ResourceIdList;\n struct SRS_ResourceSet__resourceType {\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } resourceType;\n long usage;\n Alpha_t *alpha /* OPTIONAL */;\n long *p0 /* OPTIONAL */;\n struct PathlossReferenceRS_Config *pathlossReferenceRS /* OPTIONAL */;\n long *srs_PowerControlAdjustmentStates /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *pathlossReferenceRSList_r16;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;\n\n/* Implementation */\n/* extern asn_TYPE_descriptor_t asn_DEF_usage_19; // (Use -fall-defs-global to expose) */\n/* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27; // (Use -fall-defs-global to expose) */\nextern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;\nextern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;\nextern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];\n\n#ifdef __cplusplus\n}\n#endif" (#ifdef) "#ifdef" (identifier) "__cplusplus" (linkage_specification) "extern "C" {\n#endif\n\n/* Dependencies */\ntypedef enum SRS_ResourceSet__resourceType_PR {\n SRS_ResourceSet__resourceType_PR_NOTHING, /* No components present */\n SRS_ResourceSet__resourceType_PR_aperiodic,\n SRS_ResourceSet__resourceType_PR_semi_persistent,\n SRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;\ntypedef enum SRS_ResourceSet__usage {\n SRS_ResourceSet__usage_beamManagement = 0,\n SRS_ResourceSet__usage_codebook = 1,\n SRS_ResourceSet__usage_nonCodebook = 2,\n SRS_ResourceSet__usage_antennaSwitching = 3\n} e_SRS_ResourceSet__usage;\ntypedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2 = 0,\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop = 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;\ntypedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING, /* No components present */\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;\n\n/* Forward declarations */\nstruct PathlossReferenceRS_Config;\n\n/* SRS-ResourceSet */\ntypedef struct SRS_ResourceSet {\n SRS_ResourceSetId_t srs_ResourceSetId;\n struct SRS_ResourceSet__srs_ResourceIdList {\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *srs_ResourceIdList;\n struct SRS_ResourceSet__resourceType {\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } resourceType;\n long usage;\n Alpha_t *alpha /* OPTIONAL */;\n long *p0 /* OPTIONAL */;\n struct PathlossReferenceRS_Config *pathlossReferenceRS /* OPTIONAL */;\n long *srs_PowerControlAdjustmentStates /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *pathlossReferenceRSList_r16;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;\n\n/* Implementation */\n/* extern asn_TYPE_descriptor_t asn_DEF_usage_19; // (Use -fall-defs-global to expose) */\n/* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27; // (Use -fall-defs-global to expose) */\nextern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;\nextern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;\nextern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];\n\n#ifdef __cplusplus\n}" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration_list) "{\n#endif\n\n/* Dependencies */\ntypedef enum SRS_ResourceSet__resourceType_PR {\n SRS_ResourceSet__resourceType_PR_NOTHING, /* No components present */\n SRS_ResourceSet__resourceType_PR_aperiodic,\n SRS_ResourceSet__resourceType_PR_semi_persistent,\n SRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;\ntypedef enum SRS_ResourceSet__usage {\n SRS_ResourceSet__usage_beamManagement = 0,\n SRS_ResourceSet__usage_codebook = 1,\n SRS_ResourceSet__usage_nonCodebook = 2,\n SRS_ResourceSet__usage_antennaSwitching = 3\n} e_SRS_ResourceSet__usage;\ntypedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2 = 0,\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop = 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;\ntypedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING, /* No components present */\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;\n\n/* Forward declarations */\nstruct PathlossReferenceRS_Config;\n\n/* SRS-ResourceSet */\ntypedef struct SRS_ResourceSet {\n SRS_ResourceSetId_t srs_ResourceSetId;\n struct SRS_ResourceSet__srs_ResourceIdList {\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *srs_ResourceIdList;\n struct SRS_ResourceSet__resourceType {\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } resourceType;\n long usage;\n Alpha_t *alpha /* OPTIONAL */;\n long *p0 /* OPTIONAL */;\n struct PathlossReferenceRS_Config *pathlossReferenceRS /* OPTIONAL */;\n long *srs_PowerControlAdjustmentStates /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *pathlossReferenceRSList_r16;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;\n\n/* Implementation */\n/* extern asn_TYPE_descriptor_t asn_DEF_usage_19; // (Use -fall-defs-global to expose) */\n/* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27; // (Use -fall-defs-global to expose) */\nextern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;\nextern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;\nextern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];\n\n#ifdef __cplusplus\n}" ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (comment) "/* Dependencies */" (type_definition) "typedef enum SRS_ResourceSet__resourceType_PR {\n SRS_ResourceSet__resourceType_PR_NOTHING, /* No components present */\n SRS_ResourceSet__resourceType_PR_aperiodic,\n SRS_ResourceSet__resourceType_PR_semi_persistent,\n SRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;" (typedef) "typedef" (enum_specifier) "enum SRS_ResourceSet__resourceType_PR {\n SRS_ResourceSet__resourceType_PR_NOTHING, /* No components present */\n SRS_ResourceSet__resourceType_PR_aperiodic,\n SRS_ResourceSet__resourceType_PR_semi_persistent,\n SRS_ResourceSet__resourceType_PR_periodic\n}" (enum) "enum" (type_identifier) "SRS_ResourceSet__resourceType_PR" (enumerator_list) "{\n SRS_ResourceSet__resourceType_PR_NOTHING, /* No components present */\n SRS_ResourceSet__resourceType_PR_aperiodic,\n SRS_ResourceSet__resourceType_PR_semi_persistent,\n SRS_ResourceSet__resourceType_PR_periodic\n}" ({) "{" (enumerator) "SRS_ResourceSet__resourceType_PR_NOTHING" (identifier) "SRS_ResourceSet__resourceType_PR_NOTHING" (,) "," (comment) "/* No components present */" (enumerator) "SRS_ResourceSet__resourceType_PR_aperiodic" (identifier) "SRS_ResourceSet__resourceType_PR_aperiodic" (,) "," (enumerator) "SRS_ResourceSet__resourceType_PR_semi_persistent" (identifier) "SRS_ResourceSet__resourceType_PR_semi_persistent" (,) "," (enumerator) "SRS_ResourceSet__resourceType_PR_periodic" (identifier) "SRS_ResourceSet__resourceType_PR_periodic" (}) "}" (type_identifier) "SRS_ResourceSet__resourceType_PR" (;) ";" (type_definition) "typedef enum SRS_ResourceSet__usage {\n SRS_ResourceSet__usage_beamManagement = 0,\n SRS_ResourceSet__usage_codebook = 1,\n SRS_ResourceSet__usage_nonCodebook = 2,\n SRS_ResourceSet__usage_antennaSwitching = 3\n} e_SRS_ResourceSet__usage;" (typedef) "typedef" (enum_specifier) "enum SRS_ResourceSet__usage {\n SRS_ResourceSet__usage_beamManagement = 0,\n SRS_ResourceSet__usage_codebook = 1,\n SRS_ResourceSet__usage_nonCodebook = 2,\n SRS_ResourceSet__usage_antennaSwitching = 3\n}" (enum) "enum" (type_identifier) "SRS_ResourceSet__usage" (enumerator_list) "{\n SRS_ResourceSet__usage_beamManagement = 0,\n SRS_ResourceSet__usage_codebook = 1,\n SRS_ResourceSet__usage_nonCodebook = 2,\n SRS_ResourceSet__usage_antennaSwitching = 3\n}" ({) "{" (enumerator) "SRS_ResourceSet__usage_beamManagement = 0" (identifier) "SRS_ResourceSet__usage_beamManagement" (=) "=" (number_literal) "0" (,) "," (enumerator) "SRS_ResourceSet__usage_codebook = 1" (identifier) "SRS_ResourceSet__usage_codebook" (=) "=" (number_literal) "1" (,) "," (enumerator) "SRS_ResourceSet__usage_nonCodebook = 2" (identifier) "SRS_ResourceSet__usage_nonCodebook" (=) "=" (number_literal) "2" (,) "," (enumerator) "SRS_ResourceSet__usage_antennaSwitching = 3" (identifier) "SRS_ResourceSet__usage_antennaSwitching" (=) "=" (number_literal) "3" (}) "}" (type_identifier) "e_SRS_ResourceSet__usage" (;) ";" (type_definition) "typedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2 = 0,\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop = 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;" (typedef) "typedef" (enum_specifier) "enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2 = 0,\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop = 1\n}" (enum) "enum" (type_identifier) "SRS_ResourceSet__srs_PowerControlAdjustmentStates" (enumerator_list) "{\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2 = 0,\n SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop = 1\n}" ({) "{" (enumerator) "SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2 = 0" (identifier) "SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2" (=) "=" (number_literal) "0" (,) "," (enumerator) "SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop = 1" (identifier) "SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop" (=) "=" (number_literal) "1" (}) "}" (type_identifier) "e_SRS_ResourceSet__srs_PowerControlAdjustmentStates" (;) ";" (type_definition) "typedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING, /* No components present */\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;" (typedef) "typedef" (enum_specifier) "enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING, /* No components present */\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n}" (enum) "enum" (type_identifier) "SRS_ResourceSet__pathlossReferenceRSList_r16_PR" (enumerator_list) "{\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING, /* No components present */\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n}" ({) "{" (enumerator) "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING" (identifier) "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING" (,) "," (comment) "/* No components present */" (enumerator) "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release" (identifier) "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release" (,) "," (enumerator) "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup" (identifier) "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup" (}) "}" (type_identifier) "SRS_ResourceSet__pathlossReferenceRSList_r16_PR" (;) ";" (comment) "/* Forward declarations */" (struct_specifier) "struct PathlossReferenceRS_Config" (struct) "struct" (type_identifier) "PathlossReferenceRS_Config" (;) ";" (comment) "/* SRS-ResourceSet */" (type_definition) "typedef struct SRS_ResourceSet {\n SRS_ResourceSetId_t srs_ResourceSetId;\n struct SRS_ResourceSet__srs_ResourceIdList {\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *srs_ResourceIdList;\n struct SRS_ResourceSet__resourceType {\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } resourceType;\n long usage;\n Alpha_t *alpha /* OPTIONAL */;\n long *p0 /* OPTIONAL */;\n struct PathlossReferenceRS_Config *pathlossReferenceRS /* OPTIONAL */;\n long *srs_PowerControlAdjustmentStates /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *pathlossReferenceRSList_r16;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;" (typedef) "typedef" (struct_specifier) "struct SRS_ResourceSet {\n SRS_ResourceSetId_t srs_ResourceSetId;\n struct SRS_ResourceSet__srs_ResourceIdList {\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *srs_ResourceIdList;\n struct SRS_ResourceSet__resourceType {\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } resourceType;\n long usage;\n Alpha_t *alpha /* OPTIONAL */;\n long *p0 /* OPTIONAL */;\n struct PathlossReferenceRS_Config *pathlossReferenceRS /* OPTIONAL */;\n long *srs_PowerControlAdjustmentStates /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *pathlossReferenceRSList_r16;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n}" (struct) "struct" (type_identifier) "SRS_ResourceSet" (field_declaration_list) "{\n SRS_ResourceSetId_t srs_ResourceSetId;\n struct SRS_ResourceSet__srs_ResourceIdList {\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *srs_ResourceIdList;\n struct SRS_ResourceSet__resourceType {\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } resourceType;\n long usage;\n Alpha_t *alpha /* OPTIONAL */;\n long *p0 /* OPTIONAL */;\n struct PathlossReferenceRS_Config *pathlossReferenceRS /* OPTIONAL */;\n long *srs_PowerControlAdjustmentStates /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *pathlossReferenceRSList_r16;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n}" ({) "{" (field_declaration) "SRS_ResourceSetId_t srs_ResourceSetId;" (type_identifier) "SRS_ResourceSetId_t" (field_identifier) "srs_ResourceSetId" (;) ";" (field_declaration) "struct SRS_ResourceSet__srs_ResourceIdList {\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *srs_ResourceIdList;" (struct_specifier) "struct SRS_ResourceSet__srs_ResourceIdList {\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" (struct) "struct" (type_identifier) "SRS_ResourceSet__srs_ResourceIdList" (field_declaration_list) "{\n A_SEQUENCE_OF(SRS_ResourceId_t) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" ({) "{" (field_declaration) "A_SEQUENCE_OF(SRS_ResourceId_t) list;" (macro_type_specifier) "A_SEQUENCE_OF(SRS_ResourceId_t)" (identifier) "A_SEQUENCE_OF" (() "(" (type_descriptor) "SRS_ResourceId_t" (type_identifier) "SRS_ResourceId_t" ()) ")" (field_identifier) "list" (;) ";" (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" (;) ";" (}) "}" (pointer_declarator) "*srs_ResourceIdList" (*) "*" (field_identifier) "srs_ResourceIdList" (;) ";" (field_declaration) "struct SRS_ResourceSet__resourceType {\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } resourceType;" (struct_specifier) "struct SRS_ResourceSet__resourceType {\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" (struct) "struct" (type_identifier) "SRS_ResourceSet__resourceType" (field_declaration_list) "{\n SRS_ResourceSet__resourceType_PR present;\n union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" ({) "{" (field_declaration) "SRS_ResourceSet__resourceType_PR present;" (type_identifier) "SRS_ResourceSet__resourceType_PR" (field_identifier) "present" (;) ";" (field_declaration) "union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n } choice;" (union_specifier) "union SRS_ResourceSet__resourceType_u {\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n }" (union) "union" (type_identifier) "SRS_ResourceSet__resourceType_u" (field_declaration_list) "{\n struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;\n struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;\n struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;\n }" ({) "{" (field_declaration) "struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } aperiodic;" (struct_specifier) "struct SRS_ResourceSet__resourceType__aperiodic {\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" (struct) "struct" (type_identifier) "SRS_ResourceSet__resourceType__aperiodic" (field_declaration_list) "{\n long aperiodicSRS_ResourceTrigger;\n NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;\n long *slotOffset /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" ({) "{" (field_declaration) "long aperiodicSRS_ResourceTrigger;" (sized_type_specifier) "long" (long) "long" (field_identifier) "aperiodicSRS_ResourceTrigger" (;) ";" (field_declaration) "NZP_CSI_RS_ResourceId_t *csi_RS /* OPTIONAL */;" (type_identifier) "NZP_CSI_RS_ResourceId_t" (pointer_declarator) "*csi_RS" (*) "*" (field_identifier) "csi_RS" (comment) "/* OPTIONAL */" (;) ";" (field_declaration) "long *slotOffset /* OPTIONAL */;" (sized_type_specifier) "long" (long) "long" (pointer_declarator) "*slotOffset" (*) "*" (field_identifier) "slotOffset" (comment) "/* OPTIONAL */" (;) ";" (comment) "/*\n * This type is extensible,\n * possible extensions are below.\n */" (field_declaration) "struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *aperiodicSRS_ResourceTriggerList;" (struct_specifier) "struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" (struct) "struct" (type_identifier) "SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList" (field_declaration_list) "{\n A_SEQUENCE_OF(long) list;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" ({) "{" (field_declaration) "A_SEQUENCE_OF(long) list;" (macro_type_specifier) "A_SEQUENCE_OF(long)" (identifier) "A_SEQUENCE_OF" (() "(" (type_descriptor) "long" (sized_type_specifier) "long" (long) "long" ()) ")" (field_identifier) "list" (;) ";" (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" (;) ";" (}) "}" (pointer_declarator) "*aperiodicSRS_ResourceTriggerList" (*) "*" (field_identifier) "aperiodicSRS_ResourceTriggerList" (;) ";" (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" (;) ";" (}) "}" (field_identifier) "aperiodic" (;) ";" (field_declaration) "struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } semi_persistent;" (struct_specifier) "struct SRS_ResourceSet__resourceType__semi_persistent {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" (struct) "struct" (type_identifier) "SRS_ResourceSet__resourceType__semi_persistent" (field_declaration_list) "{\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" ({) "{" (field_declaration) "NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;" (type_identifier) "NZP_CSI_RS_ResourceId_t" (pointer_declarator) "*associatedCSI_RS" (*) "*" (field_identifier) "associatedCSI_RS" (comment) "/* OPTIONAL */" (;) ";" (comment) "/*\n * This type is extensible,\n * possible extensions are below.\n */" (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" (;) ";" (}) "}" (field_identifier) "semi_persistent" (;) ";" (field_declaration) "struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } periodic;" (struct_specifier) "struct SRS_ResourceSet__resourceType__periodic {\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" (struct) "struct" (type_identifier) "SRS_ResourceSet__resourceType__periodic" (field_declaration_list) "{\n NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;\n /*\n * This type is extensible,\n * possible extensions are below.\n */\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" ({) "{" (field_declaration) "NZP_CSI_RS_ResourceId_t *associatedCSI_RS /* OPTIONAL */;" (type_identifier) "NZP_CSI_RS_ResourceId_t" (pointer_declarator) "*associatedCSI_RS" (*) "*" (field_identifier) "associatedCSI_RS" (comment) "/* OPTIONAL */" (;) ";" (comment) "/*\n * This type is extensible,\n * possible extensions are below.\n */" (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" (;) ";" (}) "}" (field_identifier) "periodic" (;) ";" (}) "}" (field_identifier) "choice" (;) ";" (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" (;) ";" (}) "}" (field_identifier) "resourceType" (;) ";" (field_declaration) "long usage;" (sized_type_specifier) "long" (long) "long" (field_identifier) "usage" (;) ";" (field_declaration) "Alpha_t *alpha /* OPTIONAL */;" (type_identifier) "Alpha_t" (pointer_declarator) "*alpha" (*) "*" (field_identifier) "alpha" (comment) "/* OPTIONAL */" (;) ";" (field_declaration) "long *p0 /* OPTIONAL */;" (sized_type_specifier) "long" (long) "long" (pointer_declarator) "*p0" (*) "*" (field_identifier) "p0" (comment) "/* OPTIONAL */" (;) ";" (field_declaration) "struct PathlossReferenceRS_Config *pathlossReferenceRS /* OPTIONAL */;" (struct_specifier) "struct PathlossReferenceRS_Config" (struct) "struct" (type_identifier) "PathlossReferenceRS_Config" (pointer_declarator) "*pathlossReferenceRS" (*) "*" (field_identifier) "pathlossReferenceRS" (comment) "/* OPTIONAL */" (;) ";" (field_declaration) "long *srs_PowerControlAdjustmentStates /* OPTIONAL */;" (sized_type_specifier) "long" (long) "long" (pointer_declarator) "*srs_PowerControlAdjustmentStates" (*) "*" (field_identifier) "srs_PowerControlAdjustmentStates" (comment) "/* OPTIONAL */" (;) ";" (comment) "/*\n * This type is extensible,\n * possible extensions are below.\n */" (field_declaration) "struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n } *pathlossReferenceRSList_r16;" (struct_specifier) "struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" (struct) "struct" (type_identifier) "SRS_ResourceSet__pathlossReferenceRSList_r16" (field_declaration_list) "{\n SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;\n \n /* Context for parsing across buffer boundaries */\n asn_struct_ctx_t _asn_ctx;\n }" ({) "{" (field_declaration) "SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;" (type_identifier) "SRS_ResourceSet__pathlossReferenceRSList_r16_PR" (field_identifier) "present" (;) ";" (field_declaration) "union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n } choice;" (union_specifier) "union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n }" (union) "union" (type_identifier) "SRS_ResourceSet__pathlossReferenceRSList_r16_u" (field_declaration_list) "{\n NULL_t release;\n PathlossReferenceRSList_r16_t setup;\n }" ({) "{" (field_declaration) "NULL_t release;" (type_identifier) "NULL_t" (field_identifier) "release" (;) ";" (field_declaration) "PathlossReferenceRSList_r16_t setup;" (type_identifier) "PathlossReferenceRSList_r16_t" (field_identifier) "setup" (;) ";" (}) "}" (field_identifier) "choice" (;) ";" (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" (;) ";" (}) "}" (pointer_declarator) "*pathlossReferenceRSList_r16" (*) "*" (field_identifier) "pathlossReferenceRSList_r16" (;) ";" (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) "SRS_ResourceSet_t" (;) ";" (comment) "/* Implementation */" (comment) "/* extern asn_TYPE_descriptor_t asn_DEF_usage_19; // (Use -fall-defs-global to expose) */" (comment) "/* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27; // (Use -fall-defs-global to expose) */" (declaration) "extern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "asn_TYPE_descriptor_t" (identifier) "asn_DEF_SRS_ResourceSet" (;) ";" (declaration) "extern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "asn_SEQUENCE_specifics_t" (identifier) "asn_SPC_SRS_ResourceSet_specs_1" (;) ";" (declaration) "extern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "asn_TYPE_member_t" (array_declarator) "asn_MBR_SRS_ResourceSet_1[9]" (identifier) "asn_MBR_SRS_ResourceSet_1" ([) "[" (number_literal) "9" (]) "]" (;) ";" (preproc_ifdef) "#ifdef __cplusplus" (#ifdef) "#ifdef" (identifier) "__cplusplus" (#endif) "" (}) "}" (#endif) "#endif" (comment) "/* Referred external types */" (preproc_include) "#include "PathlossReferenceRS-Config.h"\n" (#include) "#include" (string_literal) ""PathlossReferenceRS-Config.h"" (") """ (string_content) "PathlossReferenceRS-Config.h" (") """ (#endif) "#endif" (comment) "/* _SRS_ResourceSet_H_ */" (preproc_include) "#include "asn_internal.h"\n" (#include) "#include" (string_literal) ""asn_internal.h"" (") """ (string_content) "asn_internal.h" (") """
493
0
{"language": "c", "success": true, "metadata": {"lines": 141, "avg_line_length": 34.24, "nodes": 313, "errors": 0, "source_hash": "64f1bc613e625006701b12d3a58e77638ce8381c03337b3da483fa5bf28b2c68", "categorized_nodes": 264}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef\t_SRS_ResourceSet_H_\n#define\t_SRS_ResourceSet_H_\n\n\n#include \"asn_application.h\"\n\n/* Including external dependencies */\n#include \"SRS-ResourceSetId.h\"\n#include \"NativeEnumerated.h\"\n#include \"Alpha.h\"\n#include \"NativeInteger.h\"\n#include \"SRS-ResourceId.h\"\n#include \"asn_SEQUENCE_OF.h\"\n#include \"constr_SEQUENCE_OF.h\"\n#include \"NZP-CSI-RS-ResourceId.h\"\n#include \"constr_SEQUENCE.h\"\n#include \"constr_CHOICE.h\"\n#include \"NULL.h\"\n#include \"PathlossReferenceRSList-r16.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Dependencies */\ntypedef enum SRS_ResourceSet__resourceType_PR {\n\tSRS_ResourceSet__resourceType_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__resourceType_PR_aperiodic,\n\tSRS_ResourceSet__resourceType_PR_semi_persistent,\n\tSRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;\ntypedef enum SRS_ResourceSet__usage {\n\tSRS_ResourceSet__usage_beamManagement\t= 0,\n\tSRS_ResourceSet__usage_codebook\t= 1,\n\tSRS_ResourceSet__usage_nonCodebook\t= 2,\n\tSRS_ResourceSet__usage_antennaSwitching\t= 3\n} e_SRS_ResourceSet__usage;\ntypedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2\t= 0,\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop\t= 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;\ntypedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;\n\n/* Forward declarations */\nstruct PathlossReferenceRS_Config;\n\n/* SRS-ResourceSet */\ntypedef struct SRS_ResourceSet {\n\tSRS_ResourceSetId_t\t srs_ResourceSetId;\n\tstruct SRS_ResourceSet__srs_ResourceIdList {\n\t\tA_SEQUENCE_OF(SRS_ResourceId_t) list;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *srs_ResourceIdList;\n\tstruct SRS_ResourceSet__resourceType {\n\t\tSRS_ResourceSet__resourceType_PR present;\n\t\tunion SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;\n\t\t\tstruct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;\n\t\t\tstruct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} resourceType;\n\tlong\t usage;\n\tAlpha_t\t*alpha\t/* OPTIONAL */;\n\tlong\t*p0\t/* OPTIONAL */;\n\tstruct PathlossReferenceRS_Config\t*pathlossReferenceRS\t/* OPTIONAL */;\n\tlong\t*srs_PowerControlAdjustmentStates\t/* OPTIONAL */;\n\t/*\n\t * This type is extensible,\n\t * possible extensions are below.\n\t */\n\tstruct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n\t\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n\t\tunion SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSList_r16_t\t setup;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *pathlossReferenceRSList_r16;\n\t\n\t/* Context for parsing across buffer boundaries */\n\tasn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;\n\n/* Implementation */\n/* extern asn_TYPE_descriptor_t asn_DEF_usage_19;\t// (Use -fall-defs-global to expose) */\n/* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27;\t// (Use -fall-defs-global to expose) */\nextern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;\nextern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;\nextern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];\n\n#ifdef __cplusplus\n}\n#endif\n\n/* Referred external types */\n#include \"PathlossReferenceRS-Config.h\"\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 306, 309], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 150, "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": "_SRS_ResourceSet_H_", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 27}}, {"id": 3, "type": "preproc_def", "text": "#define\t_SRS_ResourceSet_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": "_SRS_ResourceSet_H_", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 27}}, {"id": 6, "type": "preproc_include", "text": "#include \"asn_application.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": "\"asn_application.h\"", "parent": 6, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 28}}, {"id": 9, "type": "preproc_include", "text": "#include \"SRS-ResourceSetId.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"SRS-ResourceSetId.h\"", "parent": 9, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 30}}, {"id": 12, "type": "preproc_include", "text": "#include \"NativeEnumerated.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"NativeEnumerated.h\"", "parent": 12, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 29}}, {"id": 15, "type": "preproc_include", "text": "#include \"Alpha.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"Alpha.h\"", "parent": 15, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include \"NativeInteger.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"NativeInteger.h\"", "parent": 18, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 26}}, {"id": 21, "type": "preproc_include", "text": "#include \"SRS-ResourceId.h\"\n", "parent": 0, "children": [22, 23], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"SRS-ResourceId.h\"", "parent": 21, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 27}}, {"id": 24, "type": "preproc_include", "text": "#include \"asn_SEQUENCE_OF.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"asn_SEQUENCE_OF.h\"", "parent": 24, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 28}}, {"id": 27, "type": "preproc_include", "text": "#include \"constr_SEQUENCE_OF.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"constr_SEQUENCE_OF.h\"", "parent": 27, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 31}}, {"id": 30, "type": "preproc_include", "text": "#include \"NZP-CSI-RS-ResourceId.h\"\n", "parent": 0, "children": [31, 32], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"NZP-CSI-RS-ResourceId.h\"", "parent": 30, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 34}}, {"id": 33, "type": "preproc_include", "text": "#include \"constr_SEQUENCE.h\"\n", "parent": 0, "children": [34, 35], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"constr_SEQUENCE.h\"", "parent": 33, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 28}}, {"id": 36, "type": "preproc_include", "text": "#include \"constr_CHOICE.h\"\n", "parent": 0, "children": [37, 38], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"constr_CHOICE.h\"", "parent": 36, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 26}}, {"id": 39, "type": "preproc_include", "text": "#include \"NULL.h\"\n", "parent": 0, "children": [40, 41], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 41, "type": "string_literal", "text": "\"NULL.h\"", "parent": 39, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 17}}, {"id": 42, "type": "preproc_include", "text": "#include \"PathlossReferenceRSList-r16.h\"\n", "parent": 0, "children": [43, 44], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 44, "type": "string_literal", "text": "\"PathlossReferenceRSList-r16.h\"", "parent": 42, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 40}}, {"id": 45, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Dependencies */\ntypedef enum SRS_ResourceSet__resourceType_PR {\n\tSRS_ResourceSet__resourceType_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__resourceType_PR_aperiodic,\n\tSRS_ResourceSet__resourceType_PR_semi_persistent,\n\tSRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;\ntypedef enum SRS_ResourceSet__usage {\n\tSRS_ResourceSet__usage_beamManagement\t= 0,\n\tSRS_ResourceSet__usage_codebook\t= 1,\n\tSRS_ResourceSet__usage_nonCodebook\t= 2,\n\tSRS_ResourceSet__usage_antennaSwitching\t= 3\n} e_SRS_ResourceSet__usage;\ntypedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2\t= 0,\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop\t= 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;\ntypedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;\n\n/* Forward declarations */\nstruct PathlossReferenceRS_Config;\n\n/* SRS-ResourceSet */\ntypedef struct SRS_ResourceSet {\n\tSRS_ResourceSetId_t\t srs_ResourceSetId;\n\tstruct SRS_ResourceSet__srs_ResourceIdList {\n\t\tA_SEQUENCE_OF(SRS_ResourceId_t) list;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *srs_ResourceIdList;\n\tstruct SRS_ResourceSet__resourceType {\n\t\tSRS_ResourceSet__resourceType_PR present;\n\t\tunion SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;\n\t\t\tstruct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;\n\t\t\tstruct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} resourceType;\n\tlong\t usage;\n\tAlpha_t\t*alpha\t/* OPTIONAL */;\n\tlong\t*p0\t/* OPTIONAL */;\n\tstruct PathlossReferenceRS_Config\t*pathlossReferenceRS\t/* OPTIONAL */;\n\tlong\t*srs_PowerControlAdjustmentStates\t/* OPTIONAL */;\n\t/*\n\t * This type is extensible,\n\t * possible extensions are below.\n\t */\n\tstruct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n\t\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n\t\tunion SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSList_r16_t\t setup;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *pathlossReferenceRSList_r16;\n\t\n\t/* Context for parsing across buffer boundaries */\n\tasn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;\n\n/* Implementation */\n/* extern asn_TYPE_descriptor_t asn_DEF_usage_19;\t// (Use -fall-defs-global to expose) */\n/* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27;\t// (Use -fall-defs-global to expose) */\nextern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;\nextern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;\nextern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];\n\n#ifdef __cplusplus\n}\n#endif", "parent": 0, "children": [46, 47, 48, 305], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 145, "column": 6}}, {"id": 46, "type": "#ifdef", "text": "#ifdef", "parent": 45, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 47, "type": "identifier", "text": "__cplusplus", "parent": 45, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 18}}, {"id": 48, "type": "linkage_specification", "text": "extern \"C\" {\n#endif\n\n/* Dependencies */\ntypedef enum SRS_ResourceSet__resourceType_PR {\n\tSRS_ResourceSet__resourceType_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__resourceType_PR_aperiodic,\n\tSRS_ResourceSet__resourceType_PR_semi_persistent,\n\tSRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;\ntypedef enum SRS_ResourceSet__usage {\n\tSRS_ResourceSet__usage_beamManagement\t= 0,\n\tSRS_ResourceSet__usage_codebook\t= 1,\n\tSRS_ResourceSet__usage_nonCodebook\t= 2,\n\tSRS_ResourceSet__usage_antennaSwitching\t= 3\n} e_SRS_ResourceSet__usage;\ntypedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2\t= 0,\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop\t= 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;\ntypedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;\n\n/* Forward declarations */\nstruct PathlossReferenceRS_Config;\n\n/* SRS-ResourceSet */\ntypedef struct SRS_ResourceSet {\n\tSRS_ResourceSetId_t\t srs_ResourceSetId;\n\tstruct SRS_ResourceSet__srs_ResourceIdList {\n\t\tA_SEQUENCE_OF(SRS_ResourceId_t) list;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *srs_ResourceIdList;\n\tstruct SRS_ResourceSet__resourceType {\n\t\tSRS_ResourceSet__resourceType_PR present;\n\t\tunion SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;\n\t\t\tstruct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;\n\t\t\tstruct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} resourceType;\n\tlong\t usage;\n\tAlpha_t\t*alpha\t/* OPTIONAL */;\n\tlong\t*p0\t/* OPTIONAL */;\n\tstruct PathlossReferenceRS_Config\t*pathlossReferenceRS\t/* OPTIONAL */;\n\tlong\t*srs_PowerControlAdjustmentStates\t/* OPTIONAL */;\n\t/*\n\t * This type is extensible,\n\t * possible extensions are below.\n\t */\n\tstruct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n\t\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n\t\tunion SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSList_r16_t\t setup;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *pathlossReferenceRSList_r16;\n\t\n\t/* Context for parsing across buffer boundaries */\n\tasn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;\n\n/* Implementation */\n/* extern asn_TYPE_descriptor_t asn_DEF_usage_19;\t// (Use -fall-defs-global to expose) */\n/* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27;\t// (Use -fall-defs-global to expose) */\nextern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;\nextern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;\nextern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];\n\n#ifdef __cplusplus\n}", "parent": 45, "children": [49, 50], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 144, "column": 1}}, {"id": 49, "type": "extern", "text": "extern", "parent": 48, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 50, "type": "string_literal", "text": "\"C\"", "parent": 48, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 10}}, {"id": 51, "type": "preproc_call", "text": "#endif\n", "parent": 48, "children": [52], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 52, "type": "preproc_directive", "text": "#endif", "parent": 51, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 53, "type": "type_definition", "text": "typedef enum SRS_ResourceSet__resourceType_PR {\n\tSRS_ResourceSet__resourceType_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__resourceType_PR_aperiodic,\n\tSRS_ResourceSet__resourceType_PR_semi_persistent,\n\tSRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;", "parent": 48, "children": [54, 55, 67], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 37, "column": 35}}, {"id": 54, "type": "typedef", "text": "typedef", "parent": 53, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 55, "type": "enum_specifier", "text": "enum SRS_ResourceSet__resourceType_PR {\n\tSRS_ResourceSet__resourceType_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__resourceType_PR_aperiodic,\n\tSRS_ResourceSet__resourceType_PR_semi_persistent,\n\tSRS_ResourceSet__resourceType_PR_periodic\n}", "parent": 53, "children": [56, 57, 58], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 37, "column": 1}}, {"id": 56, "type": "enum", "text": "enum", "parent": 55, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 12}}, {"id": 57, "type": "type_identifier", "text": "SRS_ResourceSet__resourceType_PR", "parent": 55, "children": [], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 45}}, {"id": 58, "type": "enumerator_list", "text": "{\n\tSRS_ResourceSet__resourceType_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__resourceType_PR_aperiodic,\n\tSRS_ResourceSet__resourceType_PR_semi_persistent,\n\tSRS_ResourceSet__resourceType_PR_periodic\n}", "parent": 55, "children": [59, 61, 63, 65], "start_point": {"row": 32, "column": 46}, "end_point": {"row": 37, "column": 1}}, {"id": 59, "type": "enumerator", "text": "SRS_ResourceSet__resourceType_PR_NOTHING", "parent": 58, "children": [60], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 41}}, {"id": 60, "type": "identifier", "text": "SRS_ResourceSet__resourceType_PR_NOTHING", "parent": 59, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 41}}, {"id": 61, "type": "enumerator", "text": "SRS_ResourceSet__resourceType_PR_aperiodic", "parent": 58, "children": [62], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 43}}, {"id": 62, "type": "identifier", "text": "SRS_ResourceSet__resourceType_PR_aperiodic", "parent": 61, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 43}}, {"id": 63, "type": "enumerator", "text": "SRS_ResourceSet__resourceType_PR_semi_persistent", "parent": 58, "children": [64], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 49}}, {"id": 64, "type": "identifier", "text": "SRS_ResourceSet__resourceType_PR_semi_persistent", "parent": 63, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 49}}, {"id": 65, "type": "enumerator", "text": "SRS_ResourceSet__resourceType_PR_periodic", "parent": 58, "children": [66], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 42}}, {"id": 66, "type": "identifier", "text": "SRS_ResourceSet__resourceType_PR_periodic", "parent": 65, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 42}}, {"id": 67, "type": "type_identifier", "text": "SRS_ResourceSet__resourceType_PR", "parent": 53, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 34}}, {"id": 68, "type": "type_definition", "text": "typedef enum SRS_ResourceSet__usage {\n\tSRS_ResourceSet__usage_beamManagement\t= 0,\n\tSRS_ResourceSet__usage_codebook\t= 1,\n\tSRS_ResourceSet__usage_nonCodebook\t= 2,\n\tSRS_ResourceSet__usage_antennaSwitching\t= 3\n} e_SRS_ResourceSet__usage;", "parent": 48, "children": [69, 70, 90], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 43, "column": 27}}, {"id": 69, "type": "typedef", "text": "typedef", "parent": 68, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 70, "type": "enum_specifier", "text": "enum SRS_ResourceSet__usage {\n\tSRS_ResourceSet__usage_beamManagement\t= 0,\n\tSRS_ResourceSet__usage_codebook\t= 1,\n\tSRS_ResourceSet__usage_nonCodebook\t= 2,\n\tSRS_ResourceSet__usage_antennaSwitching\t= 3\n}", "parent": 68, "children": [71, 72, 73], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 43, "column": 1}}, {"id": 71, "type": "enum", "text": "enum", "parent": 70, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 12}}, {"id": 72, "type": "type_identifier", "text": "SRS_ResourceSet__usage", "parent": 70, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 35}}, {"id": 73, "type": "enumerator_list", "text": "{\n\tSRS_ResourceSet__usage_beamManagement\t= 0,\n\tSRS_ResourceSet__usage_codebook\t= 1,\n\tSRS_ResourceSet__usage_nonCodebook\t= 2,\n\tSRS_ResourceSet__usage_antennaSwitching\t= 3\n}", "parent": 70, "children": [74, 78, 82, 86], "start_point": {"row": 38, "column": 36}, "end_point": {"row": 43, "column": 1}}, {"id": 74, "type": "enumerator", "text": "SRS_ResourceSet__usage_beamManagement\t= 0", "parent": 73, "children": [75, 76, 77], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 42}}, {"id": 75, "type": "identifier", "text": "SRS_ResourceSet__usage_beamManagement", "parent": 74, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 38}}, {"id": 76, "type": "=", "text": "=", "parent": 74, "children": [], "start_point": {"row": 39, "column": 39}, "end_point": {"row": 39, "column": 40}}, {"id": 77, "type": "number_literal", "text": "0", "parent": 74, "children": [], "start_point": {"row": 39, "column": 41}, "end_point": {"row": 39, "column": 42}}, {"id": 78, "type": "enumerator", "text": "SRS_ResourceSet__usage_codebook\t= 1", "parent": 73, "children": [79, 80, 81], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 36}}, {"id": 79, "type": "identifier", "text": "SRS_ResourceSet__usage_codebook", "parent": 78, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 32}}, {"id": 80, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 40, "column": 33}, "end_point": {"row": 40, "column": 34}}, {"id": 81, "type": "number_literal", "text": "1", "parent": 78, "children": [], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 36}}, {"id": 82, "type": "enumerator", "text": "SRS_ResourceSet__usage_nonCodebook\t= 2", "parent": 73, "children": [83, 84, 85], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 39}}, {"id": 83, "type": "identifier", "text": "SRS_ResourceSet__usage_nonCodebook", "parent": 82, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 35}}, {"id": 84, "type": "=", "text": "=", "parent": 82, "children": [], "start_point": {"row": 41, "column": 36}, "end_point": {"row": 41, "column": 37}}, {"id": 85, "type": "number_literal", "text": "2", "parent": 82, "children": [], "start_point": {"row": 41, "column": 38}, "end_point": {"row": 41, "column": 39}}, {"id": 86, "type": "enumerator", "text": "SRS_ResourceSet__usage_antennaSwitching\t= 3", "parent": 73, "children": [87, 88, 89], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 44}}, {"id": 87, "type": "identifier", "text": "SRS_ResourceSet__usage_antennaSwitching", "parent": 86, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 40}}, {"id": 88, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 42, "column": 41}, "end_point": {"row": 42, "column": 42}}, {"id": 89, "type": "number_literal", "text": "3", "parent": 86, "children": [], "start_point": {"row": 42, "column": 43}, "end_point": {"row": 42, "column": 44}}, {"id": 90, "type": "type_identifier", "text": "e_SRS_ResourceSet__usage", "parent": 68, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 26}}, {"id": 91, "type": "type_definition", "text": "typedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2\t= 0,\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop\t= 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;", "parent": 48, "children": [92, 93, 105], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 47, "column": 54}}, {"id": 92, "type": "typedef", "text": "typedef", "parent": 91, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 93, "type": "enum_specifier", "text": "enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2\t= 0,\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop\t= 1\n}", "parent": 91, "children": [94, 95, 96], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 47, "column": 1}}, {"id": 94, "type": "enum", "text": "enum", "parent": 93, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 12}}, {"id": 95, "type": "type_identifier", "text": "SRS_ResourceSet__srs_PowerControlAdjustmentStates", "parent": 93, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 62}}, {"id": 96, "type": "enumerator_list", "text": "{\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2\t= 0,\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop\t= 1\n}", "parent": 93, "children": [97, 101], "start_point": {"row": 44, "column": 63}, "end_point": {"row": 47, "column": 1}}, {"id": 97, "type": "enumerator", "text": "SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2\t= 0", "parent": 96, "children": [98, 99, 100], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 65}}, {"id": 98, "type": "identifier", "text": "SRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2", "parent": 97, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 61}}, {"id": 99, "type": "=", "text": "=", "parent": 97, "children": [], "start_point": {"row": 45, "column": 62}, "end_point": {"row": 45, "column": 63}}, {"id": 100, "type": "number_literal", "text": "0", "parent": 97, "children": [], "start_point": {"row": 45, "column": 64}, "end_point": {"row": 45, "column": 65}}, {"id": 101, "type": "enumerator", "text": "SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop\t= 1", "parent": 96, "children": [102, 103, 104], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 73}}, {"id": 102, "type": "identifier", "text": "SRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop", "parent": 101, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 69}}, {"id": 103, "type": "=", "text": "=", "parent": 101, "children": [], "start_point": {"row": 46, "column": 70}, "end_point": {"row": 46, "column": 71}}, {"id": 104, "type": "number_literal", "text": "1", "parent": 101, "children": [], "start_point": {"row": 46, "column": 72}, "end_point": {"row": 46, "column": 73}}, {"id": 105, "type": "type_identifier", "text": "e_SRS_ResourceSet__srs_PowerControlAdjustmentStates", "parent": 91, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 53}}, {"id": 106, "type": "type_definition", "text": "typedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;", "parent": 48, "children": [107, 108, 118], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 52, "column": 50}}, {"id": 107, "type": "typedef", "text": "typedef", "parent": 106, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 108, "type": "enum_specifier", "text": "enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n}", "parent": 106, "children": [109, 110, 111], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 52, "column": 1}}, {"id": 109, "type": "enum", "text": "enum", "parent": 108, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 12}}, {"id": 110, "type": "type_identifier", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_PR", "parent": 108, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 60}}, {"id": 111, "type": "enumerator_list", "text": "{\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n}", "parent": 108, "children": [112, 114, 116], "start_point": {"row": 48, "column": 61}, "end_point": {"row": 52, "column": 1}}, {"id": 112, "type": "enumerator", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING", "parent": 111, "children": [113], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 56}}, {"id": 113, "type": "identifier", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING", "parent": 112, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 56}}, {"id": 114, "type": "enumerator", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release", "parent": 111, "children": [115], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 56}}, {"id": 115, "type": "identifier", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_release", "parent": 114, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 56}}, {"id": 116, "type": "enumerator", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup", "parent": 111, "children": [117], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 54}}, {"id": 117, "type": "identifier", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup", "parent": 116, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 54}}, {"id": 118, "type": "type_identifier", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_PR", "parent": 106, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 49}}, {"id": 119, "type": "struct_specifier", "text": "struct PathlossReferenceRS_Config", "parent": 48, "children": [120, 121], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 33}}, {"id": 120, "type": "struct", "text": "struct", "parent": 119, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 6}}, {"id": 121, "type": "type_identifier", "text": "PathlossReferenceRS_Config", "parent": 119, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 33}}, {"id": 122, "type": "type_definition", "text": "typedef struct SRS_ResourceSet {\n\tSRS_ResourceSetId_t\t srs_ResourceSetId;\n\tstruct SRS_ResourceSet__srs_ResourceIdList {\n\t\tA_SEQUENCE_OF(SRS_ResourceId_t) list;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *srs_ResourceIdList;\n\tstruct SRS_ResourceSet__resourceType {\n\t\tSRS_ResourceSet__resourceType_PR present;\n\t\tunion SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;\n\t\t\tstruct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;\n\t\t\tstruct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} resourceType;\n\tlong\t usage;\n\tAlpha_t\t*alpha\t/* OPTIONAL */;\n\tlong\t*p0\t/* OPTIONAL */;\n\tstruct PathlossReferenceRS_Config\t*pathlossReferenceRS\t/* OPTIONAL */;\n\tlong\t*srs_PowerControlAdjustmentStates\t/* OPTIONAL */;\n\t/*\n\t * This type is extensible,\n\t * possible extensions are below.\n\t */\n\tstruct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n\t\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n\t\tunion SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSList_r16_t\t setup;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *pathlossReferenceRSList_r16;\n\t\n\t/* Context for parsing across buffer boundaries */\n\tasn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;", "parent": 48, "children": [123, 124, 283], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 134, "column": 20}}, {"id": 123, "type": "typedef", "text": "typedef", "parent": 122, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 7}}, {"id": 124, "type": "struct_specifier", "text": "struct SRS_ResourceSet {\n\tSRS_ResourceSetId_t\t srs_ResourceSetId;\n\tstruct SRS_ResourceSet__srs_ResourceIdList {\n\t\tA_SEQUENCE_OF(SRS_ResourceId_t) list;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *srs_ResourceIdList;\n\tstruct SRS_ResourceSet__resourceType {\n\t\tSRS_ResourceSet__resourceType_PR present;\n\t\tunion SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;\n\t\t\tstruct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;\n\t\t\tstruct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} resourceType;\n\tlong\t usage;\n\tAlpha_t\t*alpha\t/* OPTIONAL */;\n\tlong\t*p0\t/* OPTIONAL */;\n\tstruct PathlossReferenceRS_Config\t*pathlossReferenceRS\t/* OPTIONAL */;\n\tlong\t*srs_PowerControlAdjustmentStates\t/* OPTIONAL */;\n\t/*\n\t * This type is extensible,\n\t * possible extensions are below.\n\t */\n\tstruct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n\t\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n\t\tunion SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSList_r16_t\t setup;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *pathlossReferenceRSList_r16;\n\t\n\t/* Context for parsing across buffer boundaries */\n\tasn_struct_ctx_t _asn_ctx;\n}", "parent": 122, "children": [125, 126], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 134, "column": 1}}, {"id": 125, "type": "struct", "text": "struct", "parent": 124, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 14}}, {"id": 126, "type": "type_identifier", "text": "SRS_ResourceSet", "parent": 124, "children": [], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 30}}, {"id": 127, "type": "field_declaration", "text": "SRS_ResourceSetId_t\t srs_ResourceSetId;", "parent": 124, "children": [128, 129], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 40}}, {"id": 128, "type": "type_identifier", "text": "SRS_ResourceSetId_t", "parent": 127, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 20}}, {"id": 129, "type": "field_identifier", "text": "srs_ResourceSetId", "parent": 127, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 39}}, {"id": 130, "type": "field_declaration", "text": "struct SRS_ResourceSet__srs_ResourceIdList {\n\t\tA_SEQUENCE_OF(SRS_ResourceId_t) list;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *srs_ResourceIdList;", "parent": 124, "children": [131, 143], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 65, "column": 23}}, {"id": 131, "type": "struct_specifier", "text": "struct SRS_ResourceSet__srs_ResourceIdList {\n\t\tA_SEQUENCE_OF(SRS_ResourceId_t) list;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t}", "parent": 130, "children": [132, 133], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 65, "column": 2}}, {"id": 132, "type": "struct", "text": "struct", "parent": 131, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 7}}, {"id": 133, "type": "type_identifier", "text": "SRS_ResourceSet__srs_ResourceIdList", "parent": 131, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 43}}, {"id": 134, "type": "field_declaration", "text": "A_SEQUENCE_OF(SRS_ResourceId_t) list;", "parent": 131, "children": [135, 139], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 39}}, {"id": 135, "type": "macro_type_specifier", "text": "A_SEQUENCE_OF(SRS_ResourceId_t)", "parent": 134, "children": [136, 137], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 33}}, {"id": 136, "type": "identifier", "text": "A_SEQUENCE_OF", "parent": 135, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 15}}, {"id": 137, "type": "type_descriptor", "text": "SRS_ResourceId_t", "parent": 135, "children": [138], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 32}}, {"id": 138, "type": "type_identifier", "text": "SRS_ResourceId_t", "parent": 137, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 32}}, {"id": 139, "type": "field_identifier", "text": "list", "parent": 134, "children": [], "start_point": {"row": 61, "column": 34}, "end_point": {"row": 61, "column": 38}}, {"id": 140, "type": "field_declaration", "text": "asn_struct_ctx_t _asn_ctx;", "parent": 131, "children": [141, 142], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 28}}, {"id": 141, "type": "type_identifier", "text": "asn_struct_ctx_t", "parent": 140, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 18}}, {"id": 142, "type": "field_identifier", "text": "_asn_ctx", "parent": 140, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 27}}, {"id": 143, "type": "pointer_declarator", "text": "*srs_ResourceIdList", "parent": 130, "children": [144, 145], "start_point": {"row": 65, "column": 3}, "end_point": {"row": 65, "column": 22}}, {"id": 144, "type": "*", "text": "*", "parent": 143, "children": [], "start_point": {"row": 65, "column": 3}, "end_point": {"row": 65, "column": 4}}, {"id": 145, "type": "field_identifier", "text": "srs_ResourceIdList", "parent": 143, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 22}}, {"id": 146, "type": "field_declaration", "text": "struct SRS_ResourceSet__resourceType {\n\t\tSRS_ResourceSet__resourceType_PR present;\n\t\tunion SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;\n\t\t\tstruct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;\n\t\t\tstruct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} resourceType;", "parent": 124, "children": [147, 227], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 111, "column": 16}}, {"id": 147, "type": "struct_specifier", "text": "struct SRS_ResourceSet__resourceType {\n\t\tSRS_ResourceSet__resourceType_PR present;\n\t\tunion SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;\n\t\t\tstruct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;\n\t\t\tstruct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t}", "parent": 146, "children": [148, 149], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 111, "column": 2}}, {"id": 148, "type": "struct", "text": "struct", "parent": 147, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 7}}, {"id": 149, "type": "type_identifier", "text": "SRS_ResourceSet__resourceType", "parent": 147, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 37}}, {"id": 150, "type": "field_declaration", "text": "SRS_ResourceSet__resourceType_PR present;", "parent": 147, "children": [151, 152], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 43}}, {"id": 151, "type": "type_identifier", "text": "SRS_ResourceSet__resourceType_PR", "parent": 150, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 34}}, {"id": 152, "type": "field_identifier", "text": "present", "parent": 150, "children": [], "start_point": {"row": 67, "column": 35}, "end_point": {"row": 67, "column": 42}}, {"id": 153, "type": "field_declaration", "text": "union SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;\n\t\t\tstruct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;\n\t\t\tstruct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;\n\t\t} choice;", "parent": 147, "children": [154, 223], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 107, "column": 11}}, {"id": 154, "type": "union_specifier", "text": "union SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;\n\t\t\tstruct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;\n\t\t\tstruct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;\n\t\t}", "parent": 153, "children": [155, 156], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 107, "column": 3}}, {"id": 155, "type": "union", "text": "union", "parent": 154, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 7}}, {"id": 156, "type": "type_identifier", "text": "SRS_ResourceSet__resourceType_u", "parent": 154, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 39}}, {"id": 157, "type": "field_declaration", "text": "struct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;", "parent": 154, "children": [158, 196], "start_point": {"row": 69, "column": 3}, "end_point": {"row": 86, "column": 15}}, {"id": 158, "type": "struct_specifier", "text": "struct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t}", "parent": 157, "children": [159, 160], "start_point": {"row": 69, "column": 3}, "end_point": {"row": 86, "column": 4}}, {"id": 159, "type": "struct", "text": "struct", "parent": 158, "children": [], "start_point": {"row": 69, "column": 3}, "end_point": {"row": 69, "column": 9}}, {"id": 160, "type": "type_identifier", "text": "SRS_ResourceSet__resourceType__aperiodic", "parent": 158, "children": [], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 50}}, {"id": 161, "type": "field_declaration", "text": "long\t aperiodicSRS_ResourceTrigger;", "parent": 158, "children": [162, 164], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 39}}, {"id": 162, "type": "sized_type_specifier", "text": "long", "parent": 161, "children": [163], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 8}}, {"id": 163, "type": "long", "text": "long", "parent": 162, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 8}}, {"id": 164, "type": "field_identifier", "text": "aperiodicSRS_ResourceTrigger", "parent": 161, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 38}}, {"id": 165, "type": "field_declaration", "text": "NZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;", "parent": 158, "children": [166, 167], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 51}}, {"id": 166, "type": "type_identifier", "text": "NZP_CSI_RS_ResourceId_t", "parent": 165, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 27}}, {"id": 167, "type": "pointer_declarator", "text": "*csi_RS", "parent": 165, "children": [168, 169], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 35}}, {"id": 168, "type": "*", "text": "*", "parent": 167, "children": [], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 29}}, {"id": 169, "type": "field_identifier", "text": "csi_RS", "parent": 167, "children": [], "start_point": {"row": 71, "column": 29}, "end_point": {"row": 71, "column": 35}}, {"id": 170, "type": "field_declaration", "text": "long\t*slotOffset\t/* OPTIONAL */;", "parent": 158, "children": [171, 173], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 36}}, {"id": 171, "type": "sized_type_specifier", "text": "long", "parent": 170, "children": [172], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 8}}, {"id": 172, "type": "long", "text": "long", "parent": 171, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 8}}, {"id": 173, "type": "pointer_declarator", "text": "*slotOffset", "parent": 170, "children": [174, 175], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 20}}, {"id": 174, "type": "*", "text": "*", "parent": 173, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 10}}, {"id": 175, "type": "field_identifier", "text": "slotOffset", "parent": 173, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 20}}, {"id": 176, "type": "field_declaration", "text": "struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;", "parent": 158, "children": [177, 190], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 82, "column": 40}}, {"id": 177, "type": "struct_specifier", "text": "struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t}", "parent": 176, "children": [178, 179], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 82, "column": 5}}, {"id": 178, "type": "struct", "text": "struct", "parent": 177, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 10}}, {"id": 179, "type": "type_identifier", "text": "SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList", "parent": 177, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 85}}, {"id": 180, "type": "field_declaration", "text": "A_SEQUENCE_OF(long) list;", "parent": 177, "children": [181, 186], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 30}}, {"id": 181, "type": "macro_type_specifier", "text": "A_SEQUENCE_OF(long)", "parent": 180, "children": [182, 183], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 24}}, {"id": 182, "type": "identifier", "text": "A_SEQUENCE_OF", "parent": 181, "children": [], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 18}}, {"id": 183, "type": "type_descriptor", "text": "long", "parent": 181, "children": [184], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 23}}, {"id": 184, "type": "sized_type_specifier", "text": "long", "parent": 183, "children": [185], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 23}}, {"id": 185, "type": "long", "text": "long", "parent": 184, "children": [], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 23}}, {"id": 186, "type": "field_identifier", "text": "list", "parent": 180, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 29}}, {"id": 187, "type": "field_declaration", "text": "asn_struct_ctx_t _asn_ctx;", "parent": 177, "children": [188, 189], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 31}}, {"id": 188, "type": "type_identifier", "text": "asn_struct_ctx_t", "parent": 187, "children": [], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 21}}, {"id": 189, "type": "field_identifier", "text": "_asn_ctx", "parent": 187, "children": [], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 30}}, {"id": 190, "type": "pointer_declarator", "text": "*aperiodicSRS_ResourceTriggerList", "parent": 176, "children": [191, 192], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 39}}, {"id": 191, "type": "*", "text": "*", "parent": 190, "children": [], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 7}}, {"id": 192, "type": "field_identifier", "text": "aperiodicSRS_ResourceTriggerList", "parent": 190, "children": [], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 82, "column": 39}}, {"id": 193, "type": "field_declaration", "text": "asn_struct_ctx_t _asn_ctx;", "parent": 158, "children": [194, 195], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 30}}, {"id": 194, "type": "type_identifier", "text": "asn_struct_ctx_t", "parent": 193, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 20}}, {"id": 195, "type": "field_identifier", "text": "_asn_ctx", "parent": 193, "children": [], "start_point": {"row": 85, "column": 21}, "end_point": {"row": 85, "column": 29}}, {"id": 196, "type": "field_identifier", "text": "aperiodic", "parent": 157, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 14}}, {"id": 197, "type": "field_declaration", "text": "struct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;", "parent": 154, "children": [198, 209], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 96, "column": 21}}, {"id": 198, "type": "struct_specifier", "text": "struct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t}", "parent": 197, "children": [199, 200], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 96, "column": 4}}, {"id": 199, "type": "struct", "text": "struct", "parent": 198, "children": [], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 9}}, {"id": 200, "type": "type_identifier", "text": "SRS_ResourceSet__resourceType__semi_persistent", "parent": 198, "children": [], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 56}}, {"id": 201, "type": "field_declaration", "text": "NZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;", "parent": 198, "children": [202, 203], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 61}}, {"id": 202, "type": "type_identifier", "text": "NZP_CSI_RS_ResourceId_t", "parent": 201, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 27}}, {"id": 203, "type": "pointer_declarator", "text": "*associatedCSI_RS", "parent": 201, "children": [204, 205], "start_point": {"row": 88, "column": 28}, "end_point": {"row": 88, "column": 45}}, {"id": 204, "type": "*", "text": "*", "parent": 203, "children": [], "start_point": {"row": 88, "column": 28}, "end_point": {"row": 88, "column": 29}}, {"id": 205, "type": "field_identifier", "text": "associatedCSI_RS", "parent": 203, "children": [], "start_point": {"row": 88, "column": 29}, "end_point": {"row": 88, "column": 45}}, {"id": 206, "type": "field_declaration", "text": "asn_struct_ctx_t _asn_ctx;", "parent": 198, "children": [207, 208], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 30}}, {"id": 207, "type": "type_identifier", "text": "asn_struct_ctx_t", "parent": 206, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 20}}, {"id": 208, "type": "field_identifier", "text": "_asn_ctx", "parent": 206, "children": [], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 29}}, {"id": 209, "type": "field_identifier", "text": "semi_persistent", "parent": 197, "children": [], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 20}}, {"id": 210, "type": "field_declaration", "text": "struct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;", "parent": 154, "children": [211, 222], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 106, "column": 14}}, {"id": 211, "type": "struct_specifier", "text": "struct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t}", "parent": 210, "children": [212, 213], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 106, "column": 4}}, {"id": 212, "type": "struct", "text": "struct", "parent": 211, "children": [], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 9}}, {"id": 213, "type": "type_identifier", "text": "SRS_ResourceSet__resourceType__periodic", "parent": 211, "children": [], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 49}}, {"id": 214, "type": "field_declaration", "text": "NZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;", "parent": 211, "children": [215, 216], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 61}}, {"id": 215, "type": "type_identifier", "text": "NZP_CSI_RS_ResourceId_t", "parent": 214, "children": [], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 27}}, {"id": 216, "type": "pointer_declarator", "text": "*associatedCSI_RS", "parent": 214, "children": [217, 218], "start_point": {"row": 98, "column": 28}, "end_point": {"row": 98, "column": 45}}, {"id": 217, "type": "*", "text": "*", "parent": 216, "children": [], "start_point": {"row": 98, "column": 28}, "end_point": {"row": 98, "column": 29}}, {"id": 218, "type": "field_identifier", "text": "associatedCSI_RS", "parent": 216, "children": [], "start_point": {"row": 98, "column": 29}, "end_point": {"row": 98, "column": 45}}, {"id": 219, "type": "field_declaration", "text": "asn_struct_ctx_t _asn_ctx;", "parent": 211, "children": [220, 221], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 30}}, {"id": 220, "type": "type_identifier", "text": "asn_struct_ctx_t", "parent": 219, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 20}}, {"id": 221, "type": "field_identifier", "text": "_asn_ctx", "parent": 219, "children": [], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 29}}, {"id": 222, "type": "field_identifier", "text": "periodic", "parent": 210, "children": [], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 13}}, {"id": 223, "type": "field_identifier", "text": "choice", "parent": 153, "children": [], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 10}}, {"id": 224, "type": "field_declaration", "text": "asn_struct_ctx_t _asn_ctx;", "parent": 147, "children": [225, 226], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 28}}, {"id": 225, "type": "type_identifier", "text": "asn_struct_ctx_t", "parent": 224, "children": [], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 18}}, {"id": 226, "type": "field_identifier", "text": "_asn_ctx", "parent": 224, "children": [], "start_point": {"row": 110, "column": 19}, "end_point": {"row": 110, "column": 27}}, {"id": 227, "type": "field_identifier", "text": "resourceType", "parent": 146, "children": [], "start_point": {"row": 111, "column": 3}, "end_point": {"row": 111, "column": 15}}, {"id": 228, "type": "field_declaration", "text": "long\t usage;", "parent": 124, "children": [229, 231], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 13}}, {"id": 229, "type": "sized_type_specifier", "text": "long", "parent": 228, "children": [230], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 5}}, {"id": 230, "type": "long", "text": "long", "parent": 229, "children": [], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 5}}, {"id": 231, "type": "field_identifier", "text": "usage", "parent": 228, "children": [], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 12}}, {"id": 232, "type": "field_declaration", "text": "Alpha_t\t*alpha\t/* OPTIONAL */;", "parent": 124, "children": [233, 234], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 31}}, {"id": 233, "type": "type_identifier", "text": "Alpha_t", "parent": 232, "children": [], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 113, "column": 8}}, {"id": 234, "type": "pointer_declarator", "text": "*alpha", "parent": 232, "children": [235, 236], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 15}}, {"id": 235, "type": "*", "text": "*", "parent": 234, "children": [], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 10}}, {"id": 236, "type": "field_identifier", "text": "alpha", "parent": 234, "children": [], "start_point": {"row": 113, "column": 10}, "end_point": {"row": 113, "column": 15}}, {"id": 237, "type": "field_declaration", "text": "long\t*p0\t/* OPTIONAL */;", "parent": 124, "children": [238, 240], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 25}}, {"id": 238, "type": "sized_type_specifier", "text": "long", "parent": 237, "children": [239], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 5}}, {"id": 239, "type": "long", "text": "long", "parent": 238, "children": [], "start_point": {"row": 114, "column": 1}, "end_point": {"row": 114, "column": 5}}, {"id": 240, "type": "pointer_declarator", "text": "*p0", "parent": 237, "children": [241, 242], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 9}}, {"id": 241, "type": "*", "text": "*", "parent": 240, "children": [], "start_point": {"row": 114, "column": 6}, "end_point": {"row": 114, "column": 7}}, {"id": 242, "type": "field_identifier", "text": "p0", "parent": 240, "children": [], "start_point": {"row": 114, "column": 7}, "end_point": {"row": 114, "column": 9}}, {"id": 243, "type": "field_declaration", "text": "struct PathlossReferenceRS_Config\t*pathlossReferenceRS\t/* OPTIONAL */;", "parent": 124, "children": [244, 247], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 115, "column": 71}}, {"id": 244, "type": "struct_specifier", "text": "struct PathlossReferenceRS_Config", "parent": 243, "children": [245, 246], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 115, "column": 34}}, {"id": 245, "type": "struct", "text": "struct", "parent": 244, "children": [], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 115, "column": 7}}, {"id": 246, "type": "type_identifier", "text": "PathlossReferenceRS_Config", "parent": 244, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 34}}, {"id": 247, "type": "pointer_declarator", "text": "*pathlossReferenceRS", "parent": 243, "children": [248, 249], "start_point": {"row": 115, "column": 35}, "end_point": {"row": 115, "column": 55}}, {"id": 248, "type": "*", "text": "*", "parent": 247, "children": [], "start_point": {"row": 115, "column": 35}, "end_point": {"row": 115, "column": 36}}, {"id": 249, "type": "field_identifier", "text": "pathlossReferenceRS", "parent": 247, "children": [], "start_point": {"row": 115, "column": 36}, "end_point": {"row": 115, "column": 55}}, {"id": 250, "type": "field_declaration", "text": "long\t*srs_PowerControlAdjustmentStates\t/* OPTIONAL */;", "parent": 124, "children": [251, 253], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 55}}, {"id": 251, "type": "sized_type_specifier", "text": "long", "parent": 250, "children": [252], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 5}}, {"id": 252, "type": "long", "text": "long", "parent": 251, "children": [], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 5}}, {"id": 253, "type": "pointer_declarator", "text": "*srs_PowerControlAdjustmentStates", "parent": 250, "children": [254, 255], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 39}}, {"id": 254, "type": "*", "text": "*", "parent": 253, "children": [], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 7}}, {"id": 255, "type": "field_identifier", "text": "srs_PowerControlAdjustmentStates", "parent": 253, "children": [], "start_point": {"row": 116, "column": 7}, "end_point": {"row": 116, "column": 39}}, {"id": 256, "type": "field_declaration", "text": "struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n\t\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n\t\tunion SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSList_r16_t\t setup;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *pathlossReferenceRSList_r16;", "parent": 124, "children": [257, 277], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 130, "column": 32}}, {"id": 257, "type": "struct_specifier", "text": "struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n\t\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n\t\tunion SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSList_r16_t\t setup;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t}", "parent": 256, "children": [258, 259], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 130, "column": 2}}, {"id": 258, "type": "struct", "text": "struct", "parent": 257, "children": [], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 121, "column": 7}}, {"id": 259, "type": "type_identifier", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16", "parent": 257, "children": [], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 52}}, {"id": 260, "type": "field_declaration", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_PR present;", "parent": 257, "children": [261, 262], "start_point": {"row": 122, "column": 2}, "end_point": {"row": 122, "column": 58}}, {"id": 261, "type": "type_identifier", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_PR", "parent": 260, "children": [], "start_point": {"row": 122, "column": 2}, "end_point": {"row": 122, "column": 49}}, {"id": 262, "type": "field_identifier", "text": "present", "parent": 260, "children": [], "start_point": {"row": 122, "column": 50}, "end_point": {"row": 122, "column": 57}}, {"id": 263, "type": "field_declaration", "text": "union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSList_r16_t\t setup;\n\t\t} choice;", "parent": 257, "children": [264, 273], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 126, "column": 11}}, {"id": 264, "type": "union_specifier", "text": "union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSList_r16_t\t setup;\n\t\t}", "parent": 263, "children": [265, 266], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 126, "column": 3}}, {"id": 265, "type": "union", "text": "union", "parent": 264, "children": [], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 7}}, {"id": 266, "type": "type_identifier", "text": "SRS_ResourceSet__pathlossReferenceRSList_r16_u", "parent": 264, "children": [], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 54}}, {"id": 267, "type": "field_declaration", "text": "NULL_t\t release;", "parent": 264, "children": [268, 269], "start_point": {"row": 124, "column": 3}, "end_point": {"row": 124, "column": 19}}, {"id": 268, "type": "type_identifier", "text": "NULL_t", "parent": 267, "children": [], "start_point": {"row": 124, "column": 3}, "end_point": {"row": 124, "column": 9}}, {"id": 269, "type": "field_identifier", "text": "release", "parent": 267, "children": [], "start_point": {"row": 124, "column": 11}, "end_point": {"row": 124, "column": 18}}, {"id": 270, "type": "field_declaration", "text": "PathlossReferenceRSList_r16_t\t setup;", "parent": 264, "children": [271, 272], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 40}}, {"id": 271, "type": "type_identifier", "text": "PathlossReferenceRSList_r16_t", "parent": 270, "children": [], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 32}}, {"id": 272, "type": "field_identifier", "text": "setup", "parent": 270, "children": [], "start_point": {"row": 125, "column": 34}, "end_point": {"row": 125, "column": 39}}, {"id": 273, "type": "field_identifier", "text": "choice", "parent": 263, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 10}}, {"id": 274, "type": "field_declaration", "text": "asn_struct_ctx_t _asn_ctx;", "parent": 257, "children": [275, 276], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 28}}, {"id": 275, "type": "type_identifier", "text": "asn_struct_ctx_t", "parent": 274, "children": [], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 18}}, {"id": 276, "type": "field_identifier", "text": "_asn_ctx", "parent": 274, "children": [], "start_point": {"row": 129, "column": 19}, "end_point": {"row": 129, "column": 27}}, {"id": 277, "type": "pointer_declarator", "text": "*pathlossReferenceRSList_r16", "parent": 256, "children": [278, 279], "start_point": {"row": 130, "column": 3}, "end_point": {"row": 130, "column": 31}}, {"id": 278, "type": "*", "text": "*", "parent": 277, "children": [], "start_point": {"row": 130, "column": 3}, "end_point": {"row": 130, "column": 4}}, {"id": 279, "type": "field_identifier", "text": "pathlossReferenceRSList_r16", "parent": 277, "children": [], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 31}}, {"id": 280, "type": "field_declaration", "text": "asn_struct_ctx_t _asn_ctx;", "parent": 124, "children": [281, 282], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 27}}, {"id": 281, "type": "type_identifier", "text": "asn_struct_ctx_t", "parent": 280, "children": [], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 17}}, {"id": 282, "type": "field_identifier", "text": "_asn_ctx", "parent": 280, "children": [], "start_point": {"row": 133, "column": 18}, "end_point": {"row": 133, "column": 26}}, {"id": 283, "type": "type_identifier", "text": "SRS_ResourceSet_t", "parent": 122, "children": [], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 19}}, {"id": 284, "type": "declaration", "text": "extern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;", "parent": 48, "children": [285, 287, 288], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 53}}, {"id": 285, "type": "storage_class_specifier", "text": "extern", "parent": 284, "children": [286], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 6}}, {"id": 286, "type": "extern", "text": "extern", "parent": 285, "children": [], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 6}}, {"id": 287, "type": "type_identifier", "text": "asn_TYPE_descriptor_t", "parent": 284, "children": [], "start_point": {"row": 139, "column": 7}, "end_point": {"row": 139, "column": 28}}, {"id": 288, "type": "identifier", "text": "asn_DEF_SRS_ResourceSet", "parent": 284, "children": [], "start_point": {"row": 139, "column": 29}, "end_point": {"row": 139, "column": 52}}, {"id": 289, "type": "declaration", "text": "extern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;", "parent": 48, "children": [290, 292, 293], "start_point": {"row": 140, "column": 0}, "end_point": {"row": 140, "column": 64}}, {"id": 290, "type": "storage_class_specifier", "text": "extern", "parent": 289, "children": [291], "start_point": {"row": 140, "column": 0}, "end_point": {"row": 140, "column": 6}}, {"id": 291, "type": "extern", "text": "extern", "parent": 290, "children": [], "start_point": {"row": 140, "column": 0}, "end_point": {"row": 140, "column": 6}}, {"id": 292, "type": "type_identifier", "text": "asn_SEQUENCE_specifics_t", "parent": 289, "children": [], "start_point": {"row": 140, "column": 7}, "end_point": {"row": 140, "column": 31}}, {"id": 293, "type": "identifier", "text": "asn_SPC_SRS_ResourceSet_specs_1", "parent": 289, "children": [], "start_point": {"row": 140, "column": 32}, "end_point": {"row": 140, "column": 63}}, {"id": 294, "type": "declaration", "text": "extern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];", "parent": 48, "children": [295, 297, 298], "start_point": {"row": 141, "column": 0}, "end_point": {"row": 141, "column": 54}}, {"id": 295, "type": "storage_class_specifier", "text": "extern", "parent": 294, "children": [296], "start_point": {"row": 141, "column": 0}, "end_point": {"row": 141, "column": 6}}, {"id": 296, "type": "extern", "text": "extern", "parent": 295, "children": [], "start_point": {"row": 141, "column": 0}, "end_point": {"row": 141, "column": 6}}, {"id": 297, "type": "type_identifier", "text": "asn_TYPE_member_t", "parent": 294, "children": [], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 24}}, {"id": 298, "type": "array_declarator", "text": "asn_MBR_SRS_ResourceSet_1[9]", "parent": 294, "children": [299, 300], "start_point": {"row": 141, "column": 25}, "end_point": {"row": 141, "column": 53}}, {"id": 299, "type": "identifier", "text": "asn_MBR_SRS_ResourceSet_1", "parent": 298, "children": [], "start_point": {"row": 141, "column": 25}, "end_point": {"row": 141, "column": 50}}, {"id": 300, "type": "number_literal", "text": "9", "parent": 298, "children": [], "start_point": {"row": 141, "column": 51}, "end_point": {"row": 141, "column": 52}}, {"id": 301, "type": "preproc_ifdef", "text": "#ifdef __cplusplus", "parent": 48, "children": [302, 303, 304], "start_point": {"row": 143, "column": 0}, "end_point": {"row": 143, "column": 18}}, {"id": 302, "type": "#ifdef", "text": "#ifdef", "parent": 301, "children": [], "start_point": {"row": 143, "column": 0}, "end_point": {"row": 143, "column": 6}}, {"id": 303, "type": "identifier", "text": "__cplusplus", "parent": 301, "children": [], "start_point": {"row": 143, "column": 7}, "end_point": {"row": 143, "column": 18}}, {"id": 304, "type": "#endif", "text": "", "parent": 301, "children": [], "start_point": {"row": 143, "column": 18}, "end_point": {"row": 143, "column": 18}}, {"id": 305, "type": "#endif", "text": "#endif", "parent": 45, "children": [], "start_point": {"row": 145, "column": 0}, "end_point": {"row": 145, "column": 6}}, {"id": 306, "type": "preproc_include", "text": "#include \"PathlossReferenceRS-Config.h\"\n", "parent": 0, "children": [307, 308], "start_point": {"row": 148, "column": 0}, "end_point": {"row": 149, "column": 0}}, {"id": 307, "type": "#include", "text": "#include", "parent": 306, "children": [], "start_point": {"row": 148, "column": 0}, "end_point": {"row": 148, "column": 8}}, {"id": 308, "type": "string_literal", "text": "\"PathlossReferenceRS-Config.h\"", "parent": 306, "children": [], "start_point": {"row": 148, "column": 9}, "end_point": {"row": 148, "column": 39}}, {"id": 309, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 150, "column": 6}}, {"id": 310, "type": "preproc_include", "text": "#include \"asn_internal.h\"\n", "parent": null, "children": [311, 312], "start_point": {"row": 151, "column": 0}, "end_point": {"row": 152, "column": 0}}, {"id": 311, "type": "#include", "text": "#include", "parent": 310, "children": [], "start_point": {"row": 151, "column": 0}, "end_point": {"row": 151, "column": 8}}, {"id": 312, "type": "string_literal", "text": "\"asn_internal.h\"", "parent": 310, "children": [], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 151, "column": 25}}]}, "node_categories": {"declarations": {"functions": [], "variables": [53, 68, 91, 106, 122, 127, 130, 134, 140, 146, 150, 153, 157, 161, 165, 170, 176, 180, 187, 193, 197, 201, 206, 210, 214, 219, 224, 228, 232, 237, 243, 250, 256, 260, 263, 267, 270, 274, 280, 284, 289, 294], "classes": [119, 120, 124, 125, 131, 132, 147, 148, 154, 155, 158, 159, 177, 178, 198, 199, 211, 212, 244, 245, 257, 258, 264, 265, 285, 290, 295], "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, 306, 307, 310, 311], "modules": [], "enums": [55, 56, 58, 59, 61, 63, 65, 70, 71, 73, 74, 78, 82, 86, 93, 94, 96, 97, 101, 108, 109, 111, 112, 114, 116]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 45, 46, 47, 48, 57, 60, 62, 64, 66, 67, 72, 75, 79, 83, 87, 90, 95, 98, 102, 105, 110, 113, 115, 117, 118, 121, 126, 128, 129, 133, 135, 136, 138, 139, 141, 142, 145, 149, 151, 152, 156, 160, 162, 164, 166, 169, 171, 175, 179, 181, 182, 184, 186, 188, 189, 192, 194, 195, 196, 200, 202, 205, 207, 208, 209, 213, 215, 218, 220, 221, 222, 223, 225, 226, 227, 229, 231, 233, 236, 238, 242, 246, 249, 251, 255, 259, 261, 262, 266, 268, 269, 271, 272, 273, 275, 276, 279, 281, 282, 283, 287, 288, 292, 293, 297, 299, 301, 302, 303, 304, 305, 309], "returns": [], "exceptions": []}, "expressions": {"calls": [51], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 50, 77, 81, 85, 89, 100, 104, 300, 308, 312], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 119, "universal_type": "class", "name": "PathlossReferenceRS_Config", "text_snippet": "struct PathlossReferenceRS_Config"}, {"node_id": 120, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 124, "universal_type": "class", "name": "SRS_ResourceSet", "text_snippet": "struct SRS_ResourceSet {\n\tSRS_ResourceSetId_t\t srs_ResourceSetId;\n\tstruct SRS_ResourceSet__srs_Resou"}, {"node_id": 125, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 131, "universal_type": "class", "name": "SRS_ResourceSet__srs_ResourceIdList", "text_snippet": "struct SRS_ResourceSet__srs_ResourceIdList {\n\t\tA_SEQUENCE_OF(SRS_ResourceId_t) list;\n\t\t\n\t\t/* Context"}, {"node_id": 132, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 147, "universal_type": "class", "name": "SRS_ResourceSet__resourceType", "text_snippet": "struct SRS_ResourceSet__resourceType {\n\t\tSRS_ResourceSet__resourceType_PR present;\n\t\tunion SRS_Resou"}, {"node_id": 148, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 154, "universal_type": "class", "name": "SRS_ResourceSet__resourceType_u", "text_snippet": "union SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlon"}, {"node_id": 155, "universal_type": "class", "name": "unknown", "text_snippet": "union"}, {"node_id": 158, "universal_type": "class", "name": "SRS_ResourceSet__resourceType__aperiodic", "text_snippet": "struct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CS"}, {"node_id": 159, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 177, "universal_type": "class", "name": "SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList", "text_snippet": "struct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_"}, {"node_id": 178, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 198, "universal_type": "class", "name": "SRS_ResourceSet__resourceType__semi_persistent", "text_snippet": "struct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_R"}, {"node_id": 199, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 211, "universal_type": "class", "name": "SRS_ResourceSet__resourceType__periodic", "text_snippet": "struct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OP"}, {"node_id": 212, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 244, "universal_type": "class", "name": "PathlossReferenceRS_Config", "text_snippet": "struct PathlossReferenceRS_Config"}, {"node_id": 245, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 257, "universal_type": "class", "name": "SRS_ResourceSet__pathlossReferenceRSList_r16", "text_snippet": "struct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n\t\tSRS_ResourceSet__pathlossReferenceRSList_r16"}, {"node_id": 258, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 264, "universal_type": "class", "name": "SRS_ResourceSet__pathlossReferenceRSList_r16_u", "text_snippet": "union SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSLis"}, {"node_id": 265, "universal_type": "class", "name": "unknown", "text_snippet": "union"}, {"node_id": 285, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 290, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 295, "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 \"SRS-ResourceSetId.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"NativeEnumerated.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"Alpha.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"NativeInteger.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"SRS-ResourceId.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"asn_SEQUENCE_OF.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"constr_SEQUENCE_OF.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"NZP-CSI-RS-ResourceId.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"constr_SEQUENCE.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"constr_CHOICE.h\"\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include \"NULL.h\"\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include \"PathlossReferenceRSList-r16.h\"\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 306, "text": "#include \"PathlossReferenceRS-Config.h\"\n"}, {"node_id": 307, "text": "#include"}, {"node_id": 310, "text": "#include \"asn_internal.h\"\n"}, {"node_id": 311, "text": "#include"}]}, "original_source_code": "/*\n * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)\n * From ASN.1 module \"NR-RRC-Definitions\"\n * \tfound in \"NR-RRC-Definitions.asn\"\n * \t`asn1c -fcompound-names -no-gen-example -pdu=all`\n */\n\n#ifndef\t_SRS_ResourceSet_H_\n#define\t_SRS_ResourceSet_H_\n\n\n#include \"asn_application.h\"\n\n/* Including external dependencies */\n#include \"SRS-ResourceSetId.h\"\n#include \"NativeEnumerated.h\"\n#include \"Alpha.h\"\n#include \"NativeInteger.h\"\n#include \"SRS-ResourceId.h\"\n#include \"asn_SEQUENCE_OF.h\"\n#include \"constr_SEQUENCE_OF.h\"\n#include \"NZP-CSI-RS-ResourceId.h\"\n#include \"constr_SEQUENCE.h\"\n#include \"constr_CHOICE.h\"\n#include \"NULL.h\"\n#include \"PathlossReferenceRSList-r16.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Dependencies */\ntypedef enum SRS_ResourceSet__resourceType_PR {\n\tSRS_ResourceSet__resourceType_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__resourceType_PR_aperiodic,\n\tSRS_ResourceSet__resourceType_PR_semi_persistent,\n\tSRS_ResourceSet__resourceType_PR_periodic\n} SRS_ResourceSet__resourceType_PR;\ntypedef enum SRS_ResourceSet__usage {\n\tSRS_ResourceSet__usage_beamManagement\t= 0,\n\tSRS_ResourceSet__usage_codebook\t= 1,\n\tSRS_ResourceSet__usage_nonCodebook\t= 2,\n\tSRS_ResourceSet__usage_antennaSwitching\t= 3\n} e_SRS_ResourceSet__usage;\ntypedef enum SRS_ResourceSet__srs_PowerControlAdjustmentStates {\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_sameAsFci2\t= 0,\n\tSRS_ResourceSet__srs_PowerControlAdjustmentStates_separateClosedLoop\t= 1\n} e_SRS_ResourceSet__srs_PowerControlAdjustmentStates;\ntypedef enum SRS_ResourceSet__pathlossReferenceRSList_r16_PR {\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_NOTHING,\t/* No components present */\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_release,\n\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR_setup\n} SRS_ResourceSet__pathlossReferenceRSList_r16_PR;\n\n/* Forward declarations */\nstruct PathlossReferenceRS_Config;\n\n/* SRS-ResourceSet */\ntypedef struct SRS_ResourceSet {\n\tSRS_ResourceSetId_t\t srs_ResourceSetId;\n\tstruct SRS_ResourceSet__srs_ResourceIdList {\n\t\tA_SEQUENCE_OF(SRS_ResourceId_t) list;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *srs_ResourceIdList;\n\tstruct SRS_ResourceSet__resourceType {\n\t\tSRS_ResourceSet__resourceType_PR present;\n\t\tunion SRS_ResourceSet__resourceType_u {\n\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic {\n\t\t\t\tlong\t aperiodicSRS_ResourceTrigger;\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*csi_RS\t/* OPTIONAL */;\n\t\t\t\tlong\t*slotOffset\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\tstruct SRS_ResourceSet__resourceType__aperiodic__aperiodicSRS_ResourceTriggerList {\n\t\t\t\t\tA_SEQUENCE_OF(long) list;\n\t\t\t\t\t\n\t\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t\t} *aperiodicSRS_ResourceTriggerList;\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} aperiodic;\n\t\t\tstruct SRS_ResourceSet__resourceType__semi_persistent {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} semi_persistent;\n\t\t\tstruct SRS_ResourceSet__resourceType__periodic {\n\t\t\t\tNZP_CSI_RS_ResourceId_t\t*associatedCSI_RS\t/* OPTIONAL */;\n\t\t\t\t/*\n\t\t\t\t * This type is extensible,\n\t\t\t\t * possible extensions are below.\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t/* Context for parsing across buffer boundaries */\n\t\t\t\tasn_struct_ctx_t _asn_ctx;\n\t\t\t} periodic;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} resourceType;\n\tlong\t usage;\n\tAlpha_t\t*alpha\t/* OPTIONAL */;\n\tlong\t*p0\t/* OPTIONAL */;\n\tstruct PathlossReferenceRS_Config\t*pathlossReferenceRS\t/* OPTIONAL */;\n\tlong\t*srs_PowerControlAdjustmentStates\t/* OPTIONAL */;\n\t/*\n\t * This type is extensible,\n\t * possible extensions are below.\n\t */\n\tstruct SRS_ResourceSet__pathlossReferenceRSList_r16 {\n\t\tSRS_ResourceSet__pathlossReferenceRSList_r16_PR present;\n\t\tunion SRS_ResourceSet__pathlossReferenceRSList_r16_u {\n\t\t\tNULL_t\t release;\n\t\t\tPathlossReferenceRSList_r16_t\t setup;\n\t\t} choice;\n\t\t\n\t\t/* Context for parsing across buffer boundaries */\n\t\tasn_struct_ctx_t _asn_ctx;\n\t} *pathlossReferenceRSList_r16;\n\t\n\t/* Context for parsing across buffer boundaries */\n\tasn_struct_ctx_t _asn_ctx;\n} SRS_ResourceSet_t;\n\n/* Implementation */\n/* extern asn_TYPE_descriptor_t asn_DEF_usage_19;\t// (Use -fall-defs-global to expose) */\n/* extern asn_TYPE_descriptor_t asn_DEF_srs_PowerControlAdjustmentStates_27;\t// (Use -fall-defs-global to expose) */\nextern asn_TYPE_descriptor_t asn_DEF_SRS_ResourceSet;\nextern asn_SEQUENCE_specifics_t asn_SPC_SRS_ResourceSet_specs_1;\nextern asn_TYPE_member_t asn_MBR_SRS_ResourceSet_1[9];\n\n#ifdef __cplusplus\n}\n#endif\n\n/* Referred external types */\n#include \"PathlossReferenceRS-Config.h\"\n\n#endif\t/* _SRS_ResourceSet_H_ */\n#include \"asn_internal.h\"\n"}
80,960
c
/* * Vortex OpenSplice * * This software and documentation are Copyright 2006 to TO_YEAR ADLINK * Technology Limited, its affiliated companies and licensors. All rights * reserved. * * 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 SD_XMLPARSER_H #define SD_XMLPARSER_H #include "c_base.h" #include "sd_list.h" #include "sd__deepwalkMeta.h" #include "sd_errorReport.h" C_CLASS(sd_xmlParser); typedef enum { SD_XML_PARSER_KIND_ELEMENT_START, SD_XML_PARSER_KIND_ELEMENT_END, SD_XML_PARSER_KIND_DATA } sd_xmlParserKind; C_CLASS(sd_xmlParserAttribute); C_STRUCT(sd_xmlParserAttribute) { c_char *name; c_char *value; }; C_CLASS(sd_xmlParserElement); C_STRUCT(sd_xmlParserElement) { c_char *name; sd_list attributes; c_char *data; }; typedef c_bool (*sd_xmlParserCallback)( sd_xmlParserKind kind, sd_xmlParserElement element, void *argument, sd_xmlParser handle) __nonnull((3, 4)) __attribute_warn_unused_result__; c_bool sd_xmlParserParse ( const c_char *xmlString, sd_xmlParserCallback callback, void *argument, sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__; void sd_xmlParserSetError ( sd_xmlParser handle, c_ulong errorNumber, const c_char *message) __nonnull_all__; #endif /* SD_XMLPARSER_H */
31.27
60
(translation_unit) "/*\n * Vortex OpenSplice\n *\n * This software and documentation are Copyright 2006 to TO_YEAR ADLINK\n * Technology Limited, its affiliated companies and licensors. All rights\n * reserved.\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 */\n#ifndef SD_XMLPARSER_H\n#define SD_XMLPARSER_H\n\n#include "c_base.h"\n\n#include "sd_list.h"\n#include "sd__deepwalkMeta.h"\n#include "sd_errorReport.h"\n\nC_CLASS(sd_xmlParser);\n\ntypedef enum {\n SD_XML_PARSER_KIND_ELEMENT_START,\n SD_XML_PARSER_KIND_ELEMENT_END,\n SD_XML_PARSER_KIND_DATA\n} sd_xmlParserKind;\n\nC_CLASS(sd_xmlParserAttribute);\nC_STRUCT(sd_xmlParserAttribute) {\n c_char *name;\n c_char *value;\n};\n\nC_CLASS(sd_xmlParserElement);\nC_STRUCT(sd_xmlParserElement) {\n c_char *name;\n sd_list attributes;\n c_char *data;\n};\n\ntypedef c_bool (*sd_xmlParserCallback)(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n void *argument,\n sd_xmlParser handle) __nonnull((3, 4)) __attribute_warn_unused_result__;\n\nc_bool\nsd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__;\n\nvoid\nsd_xmlParserSetError (\n sd_xmlParser handle,\n c_ulong errorNumber,\n const c_char *message) __nonnull_all__;\n\n#endif /* SD_XMLPARSER_H */\n\n" (comment) "/*\n * Vortex OpenSplice\n *\n * This software and documentation are Copyright 2006 to TO_YEAR ADLINK\n * Technology Limited, its affiliated companies and licensors. All rights\n * reserved.\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 */" (preproc_ifdef) "#ifndef SD_XMLPARSER_H\n#define SD_XMLPARSER_H\n\n#include "c_base.h"\n\n#include "sd_list.h"\n#include "sd__deepwalkMeta.h"\n#include "sd_errorReport.h"\n\nC_CLASS(sd_xmlParser);\n\ntypedef enum {\n SD_XML_PARSER_KIND_ELEMENT_START,\n SD_XML_PARSER_KIND_ELEMENT_END,\n SD_XML_PARSER_KIND_DATA\n} sd_xmlParserKind;\n\nC_CLASS(sd_xmlParserAttribute);\nC_STRUCT(sd_xmlParserAttribute) {\n c_char *name;\n c_char *value;\n};\n\nC_CLASS(sd_xmlParserElement);\nC_STRUCT(sd_xmlParserElement) {\n c_char *name;\n sd_list attributes;\n c_char *data;\n};\n\ntypedef c_bool (*sd_xmlParserCallback)(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n void *argument,\n sd_xmlParser handle) __nonnull((3, 4)) __attribute_warn_unused_result__;\n\nc_bool\nsd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__;\n\nvoid\nsd_xmlParserSetError (\n sd_xmlParser handle,\n c_ulong errorNumber,\n const c_char *message) __nonnull_all__;\n\n#endif" (#ifndef) "#ifndef" (identifier) "SD_XMLPARSER_H" (preproc_def) "#define SD_XMLPARSER_H\n" (#define) "#define" (identifier) "SD_XMLPARSER_H" (preproc_include) "#include "c_base.h"\n" (#include) "#include" (string_literal) ""c_base.h"" (") """ (string_content) "c_base.h" (") """ (preproc_include) "#include "sd_list.h"\n" (#include) "#include" (string_literal) ""sd_list.h"" (") """ (string_content) "sd_list.h" (") """ (preproc_include) "#include "sd__deepwalkMeta.h"\n" (#include) "#include" (string_literal) ""sd__deepwalkMeta.h"" (") """ (string_content) "sd__deepwalkMeta.h" (") """ (preproc_include) "#include "sd_errorReport.h"\n" (#include) "#include" (string_literal) ""sd_errorReport.h"" (") """ (string_content) "sd_errorReport.h" (") """ (expression_statement) "C_CLASS(sd_xmlParser);" (call_expression) "C_CLASS(sd_xmlParser)" (identifier) "C_CLASS" (argument_list) "(sd_xmlParser)" (() "(" (identifier) "sd_xmlParser" ()) ")" (;) ";" (type_definition) "typedef enum {\n SD_XML_PARSER_KIND_ELEMENT_START,\n SD_XML_PARSER_KIND_ELEMENT_END,\n SD_XML_PARSER_KIND_DATA\n} sd_xmlParserKind;" (typedef) "typedef" (enum_specifier) "enum {\n SD_XML_PARSER_KIND_ELEMENT_START,\n SD_XML_PARSER_KIND_ELEMENT_END,\n SD_XML_PARSER_KIND_DATA\n}" (enum) "enum" (enumerator_list) "{\n SD_XML_PARSER_KIND_ELEMENT_START,\n SD_XML_PARSER_KIND_ELEMENT_END,\n SD_XML_PARSER_KIND_DATA\n}" ({) "{" (enumerator) "SD_XML_PARSER_KIND_ELEMENT_START" (identifier) "SD_XML_PARSER_KIND_ELEMENT_START" (,) "," (enumerator) "SD_XML_PARSER_KIND_ELEMENT_END" (identifier) "SD_XML_PARSER_KIND_ELEMENT_END" (,) "," (enumerator) "SD_XML_PARSER_KIND_DATA" (identifier) "SD_XML_PARSER_KIND_DATA" (}) "}" (type_identifier) "sd_xmlParserKind" (;) ";" (expression_statement) "C_CLASS(sd_xmlParserAttribute);" (call_expression) "C_CLASS(sd_xmlParserAttribute)" (identifier) "C_CLASS" (argument_list) "(sd_xmlParserAttribute)" (() "(" (identifier) "sd_xmlParserAttribute" ()) ")" (;) ";" (function_definition) "C_STRUCT(sd_xmlParserAttribute) {\n c_char *name;\n c_char *value;\n}" (type_identifier) "C_STRUCT" (parenthesized_declarator) "(sd_xmlParserAttribute)" (() "(" (identifier) "sd_xmlParserAttribute" ()) ")" (compound_statement) "{\n c_char *name;\n c_char *value;\n}" ({) "{" (declaration) "c_char *name;" (type_identifier) "c_char" (pointer_declarator) "*name" (*) "*" (identifier) "name" (;) ";" (declaration) "c_char *value;" (type_identifier) "c_char" (pointer_declarator) "*value" (*) "*" (identifier) "value" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "C_CLASS(sd_xmlParserElement);" (call_expression) "C_CLASS(sd_xmlParserElement)" (identifier) "C_CLASS" (argument_list) "(sd_xmlParserElement)" (() "(" (identifier) "sd_xmlParserElement" ()) ")" (;) ";" (function_definition) "C_STRUCT(sd_xmlParserElement) {\n c_char *name;\n sd_list attributes;\n c_char *data;\n}" (type_identifier) "C_STRUCT" (parenthesized_declarator) "(sd_xmlParserElement)" (() "(" (identifier) "sd_xmlParserElement" ()) ")" (compound_statement) "{\n c_char *name;\n sd_list attributes;\n c_char *data;\n}" ({) "{" (declaration) "c_char *name;" (type_identifier) "c_char" (pointer_declarator) "*name" (*) "*" (identifier) "name" (;) ";" (declaration) "sd_list attributes;" (type_identifier) "sd_list" (identifier) "attributes" (;) ";" (declaration) "c_char *data;" (type_identifier) "c_char" (pointer_declarator) "*data" (*) "*" (identifier) "data" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (type_definition) "typedef c_bool (*sd_xmlParserCallback)(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n void *argument,\n sd_xmlParser handle)" (typedef) "typedef" (type_identifier) "c_bool" (function_declarator) "(*sd_xmlParserCallback)(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n void *argument,\n sd_xmlParser handle)" (parenthesized_declarator) "(*sd_xmlParserCallback)" (() "(" (pointer_declarator) "*sd_xmlParserCallback" (*) "*" (type_identifier) "sd_xmlParserCallback" ()) ")" (parameter_list) "(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n void *argument,\n sd_xmlParser handle)" (() "(" (parameter_declaration) "sd_xmlParserKind kind" (type_identifier) "sd_xmlParserKind" (identifier) "kind" (,) "," (parameter_declaration) "sd_xmlParserElement element" (type_identifier) "sd_xmlParserElement" (identifier) "element" (,) "," (parameter_declaration) "void *argument" (primitive_type) "void" (pointer_declarator) "*argument" (*) "*" (identifier) "argument" (,) "," (parameter_declaration) "sd_xmlParser handle" (type_identifier) "sd_xmlParser" (identifier) "handle" ()) ")" (;) "" (expression_statement) "__nonnull((3, 4))" (call_expression) "__nonnull((3, 4))" (identifier) "__nonnull" (argument_list) "((3, 4))" (() "(" (parenthesized_expression) "(3, 4)" (() "(" (comma_expression) "3, 4" (number_literal) "3" (,) "," (number_literal) "4" ()) ")" ()) ")" (;) "" (expression_statement) "__attribute_warn_unused_result__;" (identifier) "__attribute_warn_unused_result__" (;) ";" (ERROR) "c_bool\nsd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__;\n\nvoid\nsd_xmlParserSetError (\n sd_xmlParser handle,\n c_ulong errorNumber,\n const c_char *message) __nonnull_all__" (type_identifier) "c_bool" (function_declarator) "sd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__;\n\nvoid\nsd_xmlParserSetError (\n sd_xmlParser handle,\n c_ulong errorNumber,\n const c_char *message) __nonnull_all__" (function_declarator) "sd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__" (identifier) "sd_xmlParserParse" (parameter_list) "(\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo)" (() "(" (parameter_declaration) "const c_char *xmlString" (type_qualifier) "const" (const) "const" (type_identifier) "c_char" (pointer_declarator) "*xmlString" (*) "*" (identifier) "xmlString" (,) "," (parameter_declaration) "sd_xmlParserCallback callback" (type_identifier) "sd_xmlParserCallback" (identifier) "callback" (,) "," (parameter_declaration) "void *argument" (primitive_type) "void" (pointer_declarator) "*argument" (*) "*" (identifier) "argument" (,) "," (parameter_declaration) "sd_errorReport *errorInfo" (type_identifier) "sd_errorReport" (pointer_declarator) "*errorInfo" (*) "*" (identifier) "errorInfo" ()) ")" (identifier) "__nonnull_all__" (identifier) "__attribute_warn_unused_result__" (ERROR) ";\n\nvoid\nsd_xmlParserSetError" (;) ";" (primitive_type) "void" (identifier) "sd_xmlParserSetError" (parameter_list) "(\n sd_xmlParser handle,\n c_ulong errorNumber,\n const c_char *message)" (() "(" (parameter_declaration) "sd_xmlParser handle" (type_identifier) "sd_xmlParser" (identifier) "handle" (,) "," (parameter_declaration) "c_ulong errorNumber" (type_identifier) "c_ulong" (identifier) "errorNumber" (,) "," (parameter_declaration) "const c_char *message" (type_qualifier) "const" (const) "const" (type_identifier) "c_char" (pointer_declarator) "*message" (*) "*" (identifier) "message" ()) ")" (identifier) "__nonnull_all__" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "/* SD_XMLPARSER_H */"
231
2
{"language": "c", "success": true, "metadata": {"lines": 60, "avg_line_length": 31.27, "nodes": 147, "errors": 0, "source_hash": "3dcc45998182199271d511fa115a842e28f8de066ae5ae6c11872d8e4010df96", "categorized_nodes": 108}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SD_XMLPARSER_H\n#define SD_XMLPARSER_H\n\n#include \"c_base.h\"\n\n#include \"sd_list.h\"\n#include \"sd__deepwalkMeta.h\"\n#include \"sd_errorReport.h\"\n\nC_CLASS(sd_xmlParser);\n\ntypedef enum {\n SD_XML_PARSER_KIND_ELEMENT_START,\n SD_XML_PARSER_KIND_ELEMENT_END,\n SD_XML_PARSER_KIND_DATA\n} sd_xmlParserKind;\n\nC_CLASS(sd_xmlParserAttribute);\nC_STRUCT(sd_xmlParserAttribute) {\n c_char *name;\n c_char *value;\n};\n\nC_CLASS(sd_xmlParserElement);\nC_STRUCT(sd_xmlParserElement) {\n c_char *name;\n sd_list attributes;\n c_char *data;\n};\n\ntypedef c_bool (*sd_xmlParserCallback)(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n void *argument,\n sd_xmlParser handle) __nonnull((3, 4)) __attribute_warn_unused_result__;\n\nc_bool\nsd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__;\n\nvoid\nsd_xmlParserSetError (\n sd_xmlParser handle,\n c_ulong errorNumber,\n const c_char *message) __nonnull_all__;\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 22, 38, 56, 73, 104, 146], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 2, "type": "identifier", "text": "SD_XMLPARSER_H", "parent": 0, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define SD_XMLPARSER_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 5, "type": "identifier", "text": "SD_XMLPARSER_H", "parent": 3, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include \"c_base.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"c_base.h\"", "parent": 6, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"sd_list.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"sd_list.h\"", "parent": 9, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include \"sd__deepwalkMeta.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"sd__deepwalkMeta.h\"", "parent": 12, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 29}}, {"id": 15, "type": "preproc_include", "text": "#include \"sd_errorReport.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"sd_errorReport.h\"", "parent": 15, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 27}}, {"id": 18, "type": "call_expression", "text": "C_CLASS(sd_xmlParser)", "parent": 0, "children": [19, 20], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 21}}, {"id": 19, "type": "identifier", "text": "C_CLASS", "parent": 18, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 20, "type": "argument_list", "text": "(sd_xmlParser)", "parent": 18, "children": [21], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 21}}, {"id": 21, "type": "identifier", "text": "sd_xmlParser", "parent": 20, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 20}}, {"id": 22, "type": "type_definition", "text": "typedef enum {\n SD_XML_PARSER_KIND_ELEMENT_START,\n SD_XML_PARSER_KIND_ELEMENT_END,\n SD_XML_PARSER_KIND_DATA\n} sd_xmlParserKind;", "parent": 0, "children": [23, 24, 33], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 35, "column": 19}}, {"id": 23, "type": "typedef", "text": "typedef", "parent": 22, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 24, "type": "enum_specifier", "text": "enum {\n SD_XML_PARSER_KIND_ELEMENT_START,\n SD_XML_PARSER_KIND_ELEMENT_END,\n SD_XML_PARSER_KIND_DATA\n}", "parent": 22, "children": [25, 26], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 35, "column": 1}}, {"id": 25, "type": "enum", "text": "enum", "parent": 24, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 12}}, {"id": 26, "type": "enumerator_list", "text": "{\n SD_XML_PARSER_KIND_ELEMENT_START,\n SD_XML_PARSER_KIND_ELEMENT_END,\n SD_XML_PARSER_KIND_DATA\n}", "parent": 24, "children": [27, 29, 31], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 35, "column": 1}}, {"id": 27, "type": "enumerator", "text": "SD_XML_PARSER_KIND_ELEMENT_START", "parent": 26, "children": [28], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 36}}, {"id": 28, "type": "identifier", "text": "SD_XML_PARSER_KIND_ELEMENT_START", "parent": 27, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 36}}, {"id": 29, "type": "enumerator", "text": "SD_XML_PARSER_KIND_ELEMENT_END", "parent": 26, "children": [30], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 34}}, {"id": 30, "type": "identifier", "text": "SD_XML_PARSER_KIND_ELEMENT_END", "parent": 29, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 34}}, {"id": 31, "type": "enumerator", "text": "SD_XML_PARSER_KIND_DATA", "parent": 26, "children": [32], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 27}}, {"id": 32, "type": "identifier", "text": "SD_XML_PARSER_KIND_DATA", "parent": 31, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 27}}, {"id": 33, "type": "type_identifier", "text": "sd_xmlParserKind", "parent": 22, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 18}}, {"id": 34, "type": "call_expression", "text": "C_CLASS(sd_xmlParserAttribute)", "parent": 0, "children": [35, 36], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 30}}, {"id": 35, "type": "identifier", "text": "C_CLASS", "parent": 34, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 36, "type": "argument_list", "text": "(sd_xmlParserAttribute)", "parent": 34, "children": [37], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 30}}, {"id": 37, "type": "identifier", "text": "sd_xmlParserAttribute", "parent": 36, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 29}}, {"id": 38, "type": "function_definition", "text": "C_STRUCT(sd_xmlParserAttribute) {\n c_char *name;\n c_char *value;\n}", "parent": 0, "children": [39, 40], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 39, "type": "type_identifier", "text": "C_STRUCT", "parent": 38, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 8}}, {"id": 40, "type": "parenthesized_declarator", "text": "(sd_xmlParserAttribute)", "parent": 38, "children": [41], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 31}}, {"id": 41, "type": "identifier", "text": "sd_xmlParserAttribute", "parent": 40, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 30}}, {"id": 42, "type": "declaration", "text": "c_char *name;", "parent": 38, "children": [43, 44], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 17}}, {"id": 43, "type": "type_identifier", "text": "c_char", "parent": 42, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 10}}, {"id": 44, "type": "pointer_declarator", "text": "*name", "parent": 42, "children": [45, 46], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 16}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 12}}, {"id": 46, "type": "identifier", "text": "name", "parent": 44, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 16}}, {"id": 47, "type": "declaration", "text": "c_char *value;", "parent": 38, "children": [48, 49], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 18}}, {"id": 48, "type": "type_identifier", "text": "c_char", "parent": 47, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 10}}, {"id": 49, "type": "pointer_declarator", "text": "*value", "parent": 47, "children": [50, 51], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 17}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 12}}, {"id": 51, "type": "identifier", "text": "value", "parent": 49, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 17}}, {"id": 52, "type": "call_expression", "text": "C_CLASS(sd_xmlParserElement)", "parent": 0, "children": [53, 54], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 28}}, {"id": 53, "type": "identifier", "text": "C_CLASS", "parent": 52, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 54, "type": "argument_list", "text": "(sd_xmlParserElement)", "parent": 52, "children": [55], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 28}}, {"id": 55, "type": "identifier", "text": "sd_xmlParserElement", "parent": 54, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 27}}, {"id": 56, "type": "function_definition", "text": "C_STRUCT(sd_xmlParserElement) {\n c_char *name;\n sd_list attributes;\n c_char *data;\n}", "parent": 0, "children": [57, 58], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 57, "type": "type_identifier", "text": "C_STRUCT", "parent": 56, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 8}}, {"id": 58, "type": "parenthesized_declarator", "text": "(sd_xmlParserElement)", "parent": 56, "children": [59], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 29}}, {"id": 59, "type": "identifier", "text": "sd_xmlParserElement", "parent": 58, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 28}}, {"id": 60, "type": "declaration", "text": "c_char *name;", "parent": 56, "children": [61, 62], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 18}}, {"id": 61, "type": "type_identifier", "text": "c_char", "parent": 60, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 10}}, {"id": 62, "type": "pointer_declarator", "text": "*name", "parent": 60, "children": [63, 64], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 17}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 13}}, {"id": 64, "type": "identifier", "text": "name", "parent": 62, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 17}}, {"id": 65, "type": "declaration", "text": "sd_list attributes;", "parent": 56, "children": [66, 67], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 24}}, {"id": 66, "type": "type_identifier", "text": "sd_list", "parent": 65, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 11}}, {"id": 67, "type": "identifier", "text": "attributes", "parent": 65, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 23}}, {"id": 68, "type": "declaration", "text": "c_char *data;", "parent": 56, "children": [69, 70], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 18}}, {"id": 69, "type": "type_identifier", "text": "c_char", "parent": 68, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 10}}, {"id": 70, "type": "pointer_declarator", "text": "*data", "parent": 68, "children": [71, 72], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 17}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 13}}, {"id": 72, "type": "identifier", "text": "data", "parent": 70, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 17}}, {"id": 73, "type": "type_definition", "text": "typedef c_bool (*sd_xmlParserCallback)(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n void *argument,\n sd_xmlParser handle)", "parent": 0, "children": [74, 75, 76], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 54, "column": 28}}, {"id": 74, "type": "typedef", "text": "typedef", "parent": 73, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 7}}, {"id": 75, "type": "type_identifier", "text": "c_bool", "parent": 73, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 14}}, {"id": 76, "type": "function_declarator", "text": "(*sd_xmlParserCallback)(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n void *argument,\n sd_xmlParser handle)", "parent": 73, "children": [77, 81], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 54, "column": 28}}, {"id": 77, "type": "parenthesized_declarator", "text": "(*sd_xmlParserCallback)", "parent": 76, "children": [78], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 38}}, {"id": 78, "type": "pointer_declarator", "text": "*sd_xmlParserCallback", "parent": 77, "children": [79, 80], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 37}}, {"id": 79, "type": "*", "text": "*", "parent": 78, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 17}}, {"id": 80, "type": "type_identifier", "text": "sd_xmlParserCallback", "parent": 78, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 37}}, {"id": 81, "type": "parameter_list", "text": "(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n void *argument,\n sd_xmlParser handle)", "parent": 76, "children": [82, 85, 88, 93], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 54, "column": 28}}, {"id": 82, "type": "parameter_declaration", "text": "sd_xmlParserKind kind", "parent": 81, "children": [83, 84], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 29}}, {"id": 83, "type": "type_identifier", "text": "sd_xmlParserKind", "parent": 82, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 24}}, {"id": 84, "type": "identifier", "text": "kind", "parent": 82, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 29}}, {"id": 85, "type": "parameter_declaration", "text": "sd_xmlParserElement element", "parent": 81, "children": [86, 87], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 35}}, {"id": 86, "type": "type_identifier", "text": "sd_xmlParserElement", "parent": 85, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 27}}, {"id": 87, "type": "identifier", "text": "element", "parent": 85, "children": [], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 35}}, {"id": 88, "type": "parameter_declaration", "text": "void *argument", "parent": 81, "children": [89, 90], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 22}}, {"id": 89, "type": "primitive_type", "text": "void", "parent": 88, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 12}}, {"id": 90, "type": "pointer_declarator", "text": "*argument", "parent": 88, "children": [91, 92], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 22}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 14}}, {"id": 92, "type": "identifier", "text": "argument", "parent": 90, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 22}}, {"id": 93, "type": "parameter_declaration", "text": "sd_xmlParser handle", "parent": 81, "children": [94, 95], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 27}}, {"id": 94, "type": "type_identifier", "text": "sd_xmlParser", "parent": 93, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 20}}, {"id": 95, "type": "identifier", "text": "handle", "parent": 93, "children": [], "start_point": {"row": 54, "column": 21}, "end_point": {"row": 54, "column": 27}}, {"id": 96, "type": "call_expression", "text": "__nonnull((3, 4))", "parent": 0, "children": [97, 98], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 46}}, {"id": 97, "type": "identifier", "text": "__nonnull", "parent": 96, "children": [], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 38}}, {"id": 98, "type": "argument_list", "text": "((3, 4))", "parent": 96, "children": [99], "start_point": {"row": 54, "column": 38}, "end_point": {"row": 54, "column": 46}}, {"id": 99, "type": "parenthesized_expression", "text": "(3, 4)", "parent": 98, "children": [100], "start_point": {"row": 54, "column": 39}, "end_point": {"row": 54, "column": 45}}, {"id": 100, "type": "comma_expression", "text": "3, 4", "parent": 99, "children": [101, 102], "start_point": {"row": 54, "column": 40}, "end_point": {"row": 54, "column": 44}}, {"id": 101, "type": "number_literal", "text": "3", "parent": 100, "children": [], "start_point": {"row": 54, "column": 40}, "end_point": {"row": 54, "column": 41}}, {"id": 102, "type": "number_literal", "text": "4", "parent": 100, "children": [], "start_point": {"row": 54, "column": 43}, "end_point": {"row": 54, "column": 44}}, {"id": 103, "type": "identifier", "text": "__attribute_warn_unused_result__", "parent": 0, "children": [], "start_point": {"row": 54, "column": 47}, "end_point": {"row": 54, "column": 79}}, {"id": 104, "type": "ERROR", "text": "c_bool\nsd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__;\n\nvoid\nsd_xmlParserSetError (\n sd_xmlParser handle,\n c_ulong errorNumber,\n const c_char *message) __nonnull_all__", "parent": 0, "children": [105, 106], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 67, "column": 42}}, {"id": 105, "type": "type_identifier", "text": "c_bool", "parent": 104, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 6}}, {"id": 106, "type": "function_declarator", "text": "sd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__;\n\nvoid\nsd_xmlParserSetError (\n sd_xmlParser handle,\n c_ulong errorNumber,\n const c_char *message) __nonnull_all__", "parent": 104, "children": [107, 130, 133, 145], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 67, "column": 42}}, {"id": 107, "type": "function_declarator", "text": "sd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__", "parent": 106, "children": [108, 109, 128, 129], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 61, "column": 86}}, {"id": 108, "type": "identifier", "text": "sd_xmlParserParse", "parent": 107, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 17}}, {"id": 109, "type": "parameter_list", "text": "(\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo)", "parent": 107, "children": [110, 115, 118, 123], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 61, "column": 37}}, {"id": 110, "type": "parameter_declaration", "text": "const c_char *xmlString", "parent": 109, "children": [111, 112], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 36}}, {"id": 111, "type": "type_identifier", "text": "c_char", "parent": 110, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 17}}, {"id": 112, "type": "pointer_declarator", "text": "*xmlString", "parent": 110, "children": [113, 114], "start_point": {"row": 58, "column": 26}, "end_point": {"row": 58, "column": 36}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 58, "column": 26}, "end_point": {"row": 58, "column": 27}}, {"id": 114, "type": "identifier", "text": "xmlString", "parent": 112, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 36}}, {"id": 115, "type": "parameter_declaration", "text": "sd_xmlParserCallback callback", "parent": 109, "children": [116, 117], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 35}}, {"id": 116, "type": "type_identifier", "text": "sd_xmlParserCallback", "parent": 115, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 25}}, {"id": 117, "type": "identifier", "text": "callback", "parent": 115, "children": [], "start_point": {"row": 59, "column": 27}, "end_point": {"row": 59, "column": 35}}, {"id": 118, "type": "parameter_declaration", "text": "void *argument", "parent": 109, "children": [119, 120], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 35}}, {"id": 119, "type": "primitive_type", "text": "void", "parent": 118, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 9}}, {"id": 120, "type": "pointer_declarator", "text": "*argument", "parent": 118, "children": [121, 122], "start_point": {"row": 60, "column": 26}, "end_point": {"row": 60, "column": 35}}, {"id": 121, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 60, "column": 26}, "end_point": {"row": 60, "column": 27}}, {"id": 122, "type": "identifier", "text": "argument", "parent": 120, "children": [], "start_point": {"row": 60, "column": 27}, "end_point": {"row": 60, "column": 35}}, {"id": 123, "type": "parameter_declaration", "text": "sd_errorReport *errorInfo", "parent": 109, "children": [124, 125], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 36}}, {"id": 124, "type": "type_identifier", "text": "sd_errorReport", "parent": 123, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 19}}, {"id": 125, "type": "pointer_declarator", "text": "*errorInfo", "parent": 123, "children": [126, 127], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 36}}, {"id": 126, "type": "*", "text": "*", "parent": 125, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 27}}, {"id": 127, "type": "identifier", "text": "errorInfo", "parent": 125, "children": [], "start_point": {"row": 61, "column": 27}, "end_point": {"row": 61, "column": 36}}, {"id": 128, "type": "identifier", "text": "__nonnull_all__", "parent": 107, "children": [], "start_point": {"row": 61, "column": 38}, "end_point": {"row": 61, "column": 53}}, {"id": 129, "type": "identifier", "text": "__attribute_warn_unused_result__", "parent": 107, "children": [], "start_point": {"row": 61, "column": 54}, "end_point": {"row": 61, "column": 86}}, {"id": 130, "type": "ERROR", "text": ";\n\nvoid\nsd_xmlParserSetError", "parent": 106, "children": [131, 132], "start_point": {"row": 61, "column": 86}, "end_point": {"row": 64, "column": 20}}, {"id": 131, "type": "primitive_type", "text": "void", "parent": 130, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 4}}, {"id": 132, "type": "identifier", "text": "sd_xmlParserSetError", "parent": 130, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 20}}, {"id": 133, "type": "parameter_list", "text": "(\n sd_xmlParser handle,\n c_ulong errorNumber,\n const c_char *message)", "parent": 106, "children": [134, 137, 140], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 67, "column": 26}}, {"id": 134, "type": "parameter_declaration", "text": "sd_xmlParser handle", "parent": 133, "children": [135, 136], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 24}}, {"id": 135, "type": "type_identifier", "text": "sd_xmlParser", "parent": 134, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 16}}, {"id": 136, "type": "identifier", "text": "handle", "parent": 134, "children": [], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 24}}, {"id": 137, "type": "parameter_declaration", "text": "c_ulong errorNumber", "parent": 133, "children": [138, 139], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 29}}, {"id": 138, "type": "type_identifier", "text": "c_ulong", "parent": 137, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 11}}, {"id": 139, "type": "identifier", "text": "errorNumber", "parent": 137, "children": [], "start_point": {"row": 66, "column": 18}, "end_point": {"row": 66, "column": 29}}, {"id": 140, "type": "parameter_declaration", "text": "const c_char *message", "parent": 133, "children": [141, 142], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 25}}, {"id": 141, "type": "type_identifier", "text": "c_char", "parent": 140, "children": [], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 16}}, {"id": 142, "type": "pointer_declarator", "text": "*message", "parent": 140, "children": [143, 144], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 25}}, {"id": 143, "type": "*", "text": "*", "parent": 142, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 18}}, {"id": 144, "type": "identifier", "text": "message", "parent": 142, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 25}}, {"id": 145, "type": "identifier", "text": "__nonnull_all__", "parent": 106, "children": [], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 42}}, {"id": 146, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 6}}]}, "node_categories": {"declarations": {"functions": [38, 56, 76, 106, 107], "variables": [22, 42, 47, 60, 65, 68, 73, 82, 85, 88, 93, 110, 115, 118, 123, 134, 137, 140], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": [24, 25, 26, 27, 29, 31]}, "statements": {"expressions": [18, 34, 52, 96, 99, 100], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 19, 21, 28, 30, 32, 33, 35, 37, 39, 41, 43, 46, 48, 51, 53, 55, 57, 59, 61, 64, 66, 67, 69, 72, 75, 80, 83, 84, 86, 87, 92, 94, 95, 97, 103, 105, 108, 111, 114, 116, 117, 122, 124, 127, 128, 129, 132, 135, 136, 138, 139, 141, 144, 145, 146], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 101, 102], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "C_STRUCT(sd_xmlParserAttribute) {\n c_char *name;\n c_char *value;\n}"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "C_STRUCT(sd_xmlParserElement) {\n c_char *name;\n sd_list attributes;\n c_char *data;\n}"}, {"node_id": 76, "universal_type": "function", "name": "*argument,", "text_snippet": "(*sd_xmlParserCallback)(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n "}, {"node_id": 106, "universal_type": "function", "name": "*argument,", "text_snippet": "sd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n "}, {"node_id": 107, "universal_type": "function", "name": "*argument,", "text_snippet": "sd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n "}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"c_base.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"sd_list.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"sd__deepwalkMeta.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"sd_errorReport.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "/*\n * Vortex OpenSplice\n *\n * This software and documentation are Copyright 2006 to TO_YEAR ADLINK\n * Technology Limited, its affiliated companies and licensors. All rights\n * reserved.\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 */\n#ifndef SD_XMLPARSER_H\n#define SD_XMLPARSER_H\n\n#include \"c_base.h\"\n\n#include \"sd_list.h\"\n#include \"sd__deepwalkMeta.h\"\n#include \"sd_errorReport.h\"\n\nC_CLASS(sd_xmlParser);\n\ntypedef enum {\n SD_XML_PARSER_KIND_ELEMENT_START,\n SD_XML_PARSER_KIND_ELEMENT_END,\n SD_XML_PARSER_KIND_DATA\n} sd_xmlParserKind;\n\nC_CLASS(sd_xmlParserAttribute);\nC_STRUCT(sd_xmlParserAttribute) {\n c_char *name;\n c_char *value;\n};\n\nC_CLASS(sd_xmlParserElement);\nC_STRUCT(sd_xmlParserElement) {\n c_char *name;\n sd_list attributes;\n c_char *data;\n};\n\ntypedef c_bool (*sd_xmlParserCallback)(\n sd_xmlParserKind kind,\n sd_xmlParserElement element,\n void *argument,\n sd_xmlParser handle) __nonnull((3, 4)) __attribute_warn_unused_result__;\n\nc_bool\nsd_xmlParserParse (\n const c_char *xmlString,\n sd_xmlParserCallback callback,\n void *argument,\n sd_errorReport *errorInfo) __nonnull_all__ __attribute_warn_unused_result__;\n\nvoid\nsd_xmlParserSetError (\n sd_xmlParser handle,\n c_ulong errorNumber,\n const c_char *message) __nonnull_all__;\n\n#endif /* SD_XMLPARSER_H */\n\n"}
80,961
c
/* ANSI colour library codes * {@link https://github.com/shiena/ansicolor/blob/master/README.md} * * Usage: printf(FORE_BLU "This is blue text" RESET); * printf(FORE_RED "This is %s text" RESET, "red"); * */ // Resets All colour attributes to initial terminal state #define RESET "\x1B[0m" // Foreground Colours #define FORE_RED "\x1B[31m" #define FORE_GRN "\x1B[32m" #define FORE_YEL "\x1B[33m" #define FORE_BLU "\x1B[34m" #define FORE_MAG "\x1B[35m" #define FORE_CYN "\x1B[36m" #define FORE_WHT "\x1B[37m" // Background Colours #define BACK_YEL "\x1b[43m" // Other Attributes #define ATTR_BOLD "\x1b[1m" // Symbols #define SYMBOL_TICK "\xE2\x9C\x93" #define DASHES "======================================================================================\n"
31.25
24
(translation_unit) "/* ANSI colour library codes\n* {@link https://github.com/shiena/ansicolor/blob/master/README.md}\n*\n* Usage: printf(FORE_BLU "This is blue text" RESET);\n* printf(FORE_RED "This is %s text" RESET, "red");\n* \n*/\n\n// Resets All colour attributes to initial terminal state\n#define RESET "\x1B[0m"\n\n// Foreground Colours\n#define FORE_RED "\x1B[31m"\n#define FORE_GRN "\x1B[32m"\n#define FORE_YEL "\x1B[33m"\n#define FORE_BLU "\x1B[34m"\n#define FORE_MAG "\x1B[35m"\n#define FORE_CYN "\x1B[36m"\n#define FORE_WHT "\x1B[37m"\n\n// Background Colours\n#define BACK_YEL "\x1b[43m"\n\n// Other Attributes\n#define ATTR_BOLD "\x1b[1m"\n\n// Symbols\n#define SYMBOL_TICK "\xE2\x9C\x93"\n\n#define DASHES "======================================================================================\n"\n" (comment) "/* ANSI colour library codes\n* {@link https://github.com/shiena/ansicolor/blob/master/README.md}\n*\n* Usage: printf(FORE_BLU "This is blue text" RESET);\n* printf(FORE_RED "This is %s text" RESET, "red");\n* \n*/" (comment) "// Resets All colour attributes to initial terminal state" (preproc_def) "#define RESET "\x1B[0m"\n" (#define) "#define" (identifier) "RESET" (preproc_arg) ""\x1B[0m"" (comment) "// Foreground Colours" (preproc_def) "#define FORE_RED "\x1B[31m"\n" (#define) "#define" (identifier) "FORE_RED" (preproc_arg) ""\x1B[31m"" (preproc_def) "#define FORE_GRN "\x1B[32m"\n" (#define) "#define" (identifier) "FORE_GRN" (preproc_arg) ""\x1B[32m"" (preproc_def) "#define FORE_YEL "\x1B[33m"\n" (#define) "#define" (identifier) "FORE_YEL" (preproc_arg) ""\x1B[33m"" (preproc_def) "#define FORE_BLU "\x1B[34m"\n" (#define) "#define" (identifier) "FORE_BLU" (preproc_arg) ""\x1B[34m"" (preproc_def) "#define FORE_MAG "\x1B[35m"\n" (#define) "#define" (identifier) "FORE_MAG" (preproc_arg) ""\x1B[35m"" (preproc_def) "#define FORE_CYN "\x1B[36m"\n" (#define) "#define" (identifier) "FORE_CYN" (preproc_arg) ""\x1B[36m"" (preproc_def) "#define FORE_WHT "\x1B[37m"\n" (#define) "#define" (identifier) "FORE_WHT" (preproc_arg) ""\x1B[37m"" (comment) "// Background Colours" (preproc_def) "#define BACK_YEL "\x1b[43m"\n" (#define) "#define" (identifier) "BACK_YEL" (preproc_arg) ""\x1b[43m"" (comment) "// Other Attributes" (preproc_def) "#define ATTR_BOLD "\x1b[1m"\n" (#define) "#define" (identifier) "ATTR_BOLD" (preproc_arg) ""\x1b[1m"" (comment) "// Symbols" (preproc_def) "#define SYMBOL_TICK "\xE2\x9C\x93"\n" (#define) "#define" (identifier) "SYMBOL_TICK" (preproc_arg) ""\xE2\x9C\x93"" (preproc_def) "#define DASHES "======================================================================================\n"\n" (#define) "#define" (identifier) "DASHES" (preproc_arg) ""======================================================================================\n""
55
0
{"language": "c", "success": true, "metadata": {"lines": 24, "avg_line_length": 31.25, "nodes": 48, "errors": 0, "source_hash": "6c585ae6bb58c32fb43c2e04ff3928c7ff6575d4a32de3fb25d77dc1caf2e21b", "categorized_nodes": 12}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_def", "text": "#define RESET \"\\x1B[0m\"\n", "parent": null, "children": [1, 2, 3], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 1, "type": "#define", "text": "#define", "parent": 0, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 2, "type": "identifier", "text": "RESET", "parent": 0, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 13}}, {"id": 3, "type": "preproc_arg", "text": "\"\\x1B[0m\"", "parent": 0, "children": [], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 24}}, {"id": 4, "type": "preproc_def", "text": "#define FORE_RED \"\\x1B[31m\"\n", "parent": null, "children": [5, 6, 7], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 5, "type": "#define", "text": "#define", "parent": 4, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 6, "type": "identifier", "text": "FORE_RED", "parent": 4, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 16}}, {"id": 7, "type": "preproc_arg", "text": "\"\\x1B[31m\"", "parent": 4, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 28}}, {"id": 8, "type": "preproc_def", "text": "#define FORE_GRN \"\\x1B[32m\"\n", "parent": null, "children": [9, 10, 11], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 9, "type": "#define", "text": "#define", "parent": 8, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 10, "type": "identifier", "text": "FORE_GRN", "parent": 8, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 16}}, {"id": 11, "type": "preproc_arg", "text": "\"\\x1B[32m\"", "parent": 8, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 28}}, {"id": 12, "type": "preproc_def", "text": "#define FORE_YEL \"\\x1B[33m\"\n", "parent": null, "children": [13, 14, 15], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 14, "type": "identifier", "text": "FORE_YEL", "parent": 12, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 16}}, {"id": 15, "type": "preproc_arg", "text": "\"\\x1B[33m\"", "parent": 12, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 28}}, {"id": 16, "type": "preproc_def", "text": "#define FORE_BLU \"\\x1B[34m\"\n", "parent": null, "children": [17, 18, 19], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 17, "type": "#define", "text": "#define", "parent": 16, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 18, "type": "identifier", "text": "FORE_BLU", "parent": 16, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 16}}, {"id": 19, "type": "preproc_arg", "text": "\"\\x1B[34m\"", "parent": 16, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 28}}, {"id": 20, "type": "preproc_def", "text": "#define FORE_MAG \"\\x1B[35m\"\n", "parent": null, "children": [21, 22, 23], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 21, "type": "#define", "text": "#define", "parent": 20, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 22, "type": "identifier", "text": "FORE_MAG", "parent": 20, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 16}}, {"id": 23, "type": "preproc_arg", "text": "\"\\x1B[35m\"", "parent": 20, "children": [], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 28}}, {"id": 24, "type": "preproc_def", "text": "#define FORE_CYN \"\\x1B[36m\"\n", "parent": null, "children": [25, 26, 27], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 25, "type": "#define", "text": "#define", "parent": 24, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 26, "type": "identifier", "text": "FORE_CYN", "parent": 24, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 16}}, {"id": 27, "type": "preproc_arg", "text": "\"\\x1B[36m\"", "parent": 24, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 28}}, {"id": 28, "type": "preproc_def", "text": "#define FORE_WHT \"\\x1B[37m\"\n", "parent": null, "children": [29, 30, 31], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 29, "type": "#define", "text": "#define", "parent": 28, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 30, "type": "identifier", "text": "FORE_WHT", "parent": 28, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 16}}, {"id": 31, "type": "preproc_arg", "text": "\"\\x1B[37m\"", "parent": 28, "children": [], "start_point": {"row": 19, "column": 18}, "end_point": {"row": 19, "column": 28}}, {"id": 32, "type": "preproc_def", "text": "#define BACK_YEL \"\\x1b[43m\"\n", "parent": null, "children": [33, 34, 35], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 33, "type": "#define", "text": "#define", "parent": 32, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 34, "type": "identifier", "text": "BACK_YEL", "parent": 32, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 16}}, {"id": 35, "type": "preproc_arg", "text": "\"\\x1b[43m\"", "parent": 32, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 27}}, {"id": 36, "type": "preproc_def", "text": "#define ATTR_BOLD \"\\x1b[1m\"\n", "parent": null, "children": [37, 38, 39], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 38, "type": "identifier", "text": "ATTR_BOLD", "parent": 36, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 17}}, {"id": 39, "type": "preproc_arg", "text": "\"\\x1b[1m\"", "parent": 36, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 27}}, {"id": 40, "type": "preproc_def", "text": "#define SYMBOL_TICK \"\\xE2\\x9C\\x93\"\n", "parent": null, "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": "SYMBOL_TICK", "parent": 40, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 19}}, {"id": 43, "type": "preproc_arg", "text": "\"\\xE2\\x9C\\x93\"", "parent": 40, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 34}}, {"id": 44, "type": "preproc_def", "text": "#define DASHES \"======================================================================================\\n\"\n", "parent": null, "children": [45, 46, 47], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 45, "type": "#define", "text": "#define", "parent": 44, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 46, "type": "identifier", "text": "DASHES", "parent": 44, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 14}}, {"id": 47, "type": "preproc_arg", "text": "\"======================================================================================\\n\"", "parent": 44, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 105}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46], "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/* ANSI colour library codes\n* {@link https://github.com/shiena/ansicolor/blob/master/README.md}\n*\n* Usage: printf(FORE_BLU \"This is blue text\" RESET);\n* printf(FORE_RED \"This is %s text\" RESET, \"red\");\n* \n*/\n\n// Resets All colour attributes to initial terminal state\n#define RESET \"\\x1B[0m\"\n\n// Foreground Colours\n#define FORE_RED \"\\x1B[31m\"\n#define FORE_GRN \"\\x1B[32m\"\n#define FORE_YEL \"\\x1B[33m\"\n#define FORE_BLU \"\\x1B[34m\"\n#define FORE_MAG \"\\x1B[35m\"\n#define FORE_CYN \"\\x1B[36m\"\n#define FORE_WHT \"\\x1B[37m\"\n\n// Background Colours\n#define BACK_YEL \"\\x1b[43m\"\n\n// Other Attributes\n#define ATTR_BOLD \"\\x1b[1m\"\n\n// Symbols\n#define SYMBOL_TICK \"\\xE2\\x9C\\x93\"\n\n#define DASHES \"======================================================================================\\n\"\n"}
80,962
c
// // MetricsKitSession.h // MetricsKit // // Created by <NAME> on 4/15/13. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface MetricsKitSession : NSObject - (id)initWithAppKey:(NSString *)key host:(NSString *)host; - (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation count:(NSNumber *)count sum:(NSNumber *)sum; @end
31.75
12
(translation_unit) "//\n// MetricsKitSession.h\n// MetricsKit\n//\n// Created by <NAME> on 4/15/13.\n// Copyright (c) 2013 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface MetricsKitSession : NSObject\n\n- (id)initWithAppKey:(NSString *)key host:(NSString *)host;\n\n- (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation count:(NSNumber *)count sum:(NSNumber *)sum;\n\n@end\n" (comment) "//" (comment) "// MetricsKitSession.h" (comment) "// MetricsKit" (comment) "//" (comment) "// Created by <NAME> on 4/15/13." (comment) "// Copyright (c) 2013 <NAME>. All rights reserved." (comment) "//" (preproc_call) "#import <Foundation/Foundation.h>\n" (preproc_directive) "#import" (preproc_arg) "<Foundation/Foundation.h>" (ERROR) "@interface MetricsKitSession : NSObject\n\n- (id)initWithAppKey:(NSString *)key host:(NSString *)host" (ERROR) "@" (type_identifier) "interface" (identifier) "MetricsKitSession" (:) ":" (identifier) "NSObject" (unary_expression) "- (id)initWithAppKey" (-) "-" (cast_expression) "(id)initWithAppKey" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "initWithAppKey" (:) ":" (() "(" (binary_expression) "NSString *)key host" (identifier) "NSString" (*) "*" (ERROR) ")key" ()) ")" (identifier) "key" (identifier) "host" (:) ":" (() "(" (binary_expression) "NSString *)host" (identifier) "NSString" (*) "*" (ERROR) ")" ()) ")" (identifier) "host" (expression_statement) ";" (;) ";" (ERROR) "- (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation count:(NSNumber *)count sum:(NSNumber *)sum;\n\n@end" (binary_expression) "- (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation count:(NSNumber *)count sum:(NSNumber *)sum" (binary_expression) "- (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation count:(NSNumber *)count" (binary_expression) "- (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation" (binary_expression) "- (void)addEvent:(NSString *)key segmentation" (unary_expression) "- (void)addEvent" (-) "-" (cast_expression) "(void)addEvent" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "addEvent" (ERROR) ":(NSString" (:) ":" (() "(" (identifier) "NSString" (*) "*" (ERROR) ")key" ()) ")" (identifier) "key" (identifier) "segmentation" (ERROR) ":(NSDictionary" (:) ":" (() "(" (identifier) "NSDictionary" (*) "*" (ERROR) ")" ()) ")" (identifier) "segmentation" (ERROR) "count:(NSNumber" (identifier) "count" (:) ":" (() "(" (identifier) "NSNumber" (*) "*" (ERROR) ")" ()) ")" (identifier) "count" (ERROR) "sum:(NSNumber" (identifier) "sum" (:) ":" (() "(" (identifier) "NSNumber" (*) "*" (ERROR) ")" ()) ")" (identifier) "sum" (;) ";" (ERROR) "@" (identifier) "end"
95
14
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 31.75, "nodes": 56, "errors": 0, "source_hash": "ea1bf8cc3e94e41e0e651d698369a7148fdb31f6610e929afeb57da29152fd82", "categorized_nodes": 33}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <Foundation/Foundation.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": "<Foundation/Foundation.h>", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "ERROR", "text": "@interface MetricsKitSession : NSObject\n\n- (id)initWithAppKey:(NSString *)key host:(NSString *)host", "parent": null, "children": [4, 5, 6, 7, 8, 14, 20], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 58}}, {"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": "MetricsKitSession", "parent": 3, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 28}}, {"id": 7, "type": "identifier", "text": "NSObject", "parent": 3, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 39}}, {"id": 8, "type": "unary_expression", "text": "- (id)initWithAppKey", "parent": 3, "children": [9, 10], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 20}}, {"id": 9, "type": "-", "text": "-", "parent": 8, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 10, "type": "cast_expression", "text": "(id)initWithAppKey", "parent": 8, "children": [11, 13], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 20}}, {"id": 11, "type": "type_descriptor", "text": "id", "parent": 10, "children": [12], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 5}}, {"id": 12, "type": "type_identifier", "text": "id", "parent": 11, "children": [], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 5}}, {"id": 13, "type": "identifier", "text": "initWithAppKey", "parent": 10, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 20}}, {"id": 14, "type": "binary_expression", "text": "NSString *)key host", "parent": 3, "children": [15, 16, 17, 19], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 41}}, {"id": 15, "type": "identifier", "text": "NSString", "parent": 14, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 30}}, {"id": 16, "type": "*", "text": "*", "parent": 14, "children": [], "start_point": {"row": 12, "column": 31}, "end_point": {"row": 12, "column": 32}}, {"id": 17, "type": "ERROR", "text": ")key", "parent": 14, "children": [18], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 36}}, {"id": 18, "type": "identifier", "text": "key", "parent": 17, "children": [], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 36}}, {"id": 19, "type": "identifier", "text": "host", "parent": 14, "children": [], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 41}}, {"id": 20, "type": "binary_expression", "text": "NSString *)host", "parent": 3, "children": [21, 22, 23], "start_point": {"row": 12, "column": 43}, "end_point": {"row": 12, "column": 58}}, {"id": 21, "type": "identifier", "text": "NSString", "parent": 20, "children": [], "start_point": {"row": 12, "column": 43}, "end_point": {"row": 12, "column": 51}}, {"id": 22, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 12, "column": 52}, "end_point": {"row": 12, "column": 53}}, {"id": 23, "type": "identifier", "text": "host", "parent": 20, "children": [], "start_point": {"row": 12, "column": 54}, "end_point": {"row": 12, "column": 58}}, {"id": 24, "type": "ERROR", "text": "- (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation count:(NSNumber *)count sum:(NSNumber *)sum;\n\n@end", "parent": null, "children": [25, 55], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 16, "column": 4}}, {"id": 25, "type": "binary_expression", "text": "- (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation count:(NSNumber *)count sum:(NSNumber *)sum", "parent": 24, "children": [26, 50, 53, 54], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 118}}, {"id": 26, "type": "binary_expression", "text": "- (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation count:(NSNumber *)count", "parent": 25, "children": [27, 45, 48, 49], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 98}}, {"id": 27, "type": "binary_expression", "text": "- (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation", "parent": 26, "children": [28, 41, 43, 44], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 74}}, {"id": 28, "type": "binary_expression", "text": "- (void)addEvent:(NSString *)key segmentation", "parent": 27, "children": [29, 35, 37, 38, 40], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 45}}, {"id": 29, "type": "unary_expression", "text": "- (void)addEvent", "parent": 28, "children": [30, 31], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 16}}, {"id": 30, "type": "-", "text": "-", "parent": 29, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 31, "type": "cast_expression", "text": "(void)addEvent", "parent": 29, "children": [32, 34], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 16}}, {"id": 32, "type": "type_descriptor", "text": "void", "parent": 31, "children": [33], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 7}}, {"id": 33, "type": "primitive_type", "text": "void", "parent": 32, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 7}}, {"id": 34, "type": "identifier", "text": "addEvent", "parent": 31, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 16}}, {"id": 35, "type": "ERROR", "text": ":(NSString", "parent": 28, "children": [36], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 26}}, {"id": 36, "type": "identifier", "text": "NSString", "parent": 35, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 26}}, {"id": 37, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 28}}, {"id": 38, "type": "ERROR", "text": ")key", "parent": 28, "children": [39], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 32}}, {"id": 39, "type": "identifier", "text": "key", "parent": 38, "children": [], "start_point": {"row": 14, "column": 29}, "end_point": {"row": 14, "column": 32}}, {"id": 40, "type": "identifier", "text": "segmentation", "parent": 28, "children": [], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 45}}, {"id": 41, "type": "ERROR", "text": ":(NSDictionary", "parent": 27, "children": [42], "start_point": {"row": 14, "column": 45}, "end_point": {"row": 14, "column": 59}}, {"id": 42, "type": "identifier", "text": "NSDictionary", "parent": 41, "children": [], "start_point": {"row": 14, "column": 47}, "end_point": {"row": 14, "column": 59}}, {"id": 43, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 14, "column": 60}, "end_point": {"row": 14, "column": 61}}, {"id": 44, "type": "identifier", "text": "segmentation", "parent": 27, "children": [], "start_point": {"row": 14, "column": 62}, "end_point": {"row": 14, "column": 74}}, {"id": 45, "type": "ERROR", "text": "count:(NSNumber", "parent": 26, "children": [46, 47], "start_point": {"row": 14, "column": 75}, "end_point": {"row": 14, "column": 90}}, {"id": 46, "type": "identifier", "text": "count", "parent": 45, "children": [], "start_point": {"row": 14, "column": 75}, "end_point": {"row": 14, "column": 80}}, {"id": 47, "type": "identifier", "text": "NSNumber", "parent": 45, "children": [], "start_point": {"row": 14, "column": 82}, "end_point": {"row": 14, "column": 90}}, {"id": 48, "type": "*", "text": "*", "parent": 26, "children": [], "start_point": {"row": 14, "column": 91}, "end_point": {"row": 14, "column": 92}}, {"id": 49, "type": "identifier", "text": "count", "parent": 26, "children": [], "start_point": {"row": 14, "column": 93}, "end_point": {"row": 14, "column": 98}}, {"id": 50, "type": "ERROR", "text": "sum:(NSNumber", "parent": 25, "children": [51, 52], "start_point": {"row": 14, "column": 99}, "end_point": {"row": 14, "column": 112}}, {"id": 51, "type": "identifier", "text": "sum", "parent": 50, "children": [], "start_point": {"row": 14, "column": 99}, "end_point": {"row": 14, "column": 102}}, {"id": 52, "type": "identifier", "text": "NSNumber", "parent": 50, "children": [], "start_point": {"row": 14, "column": 104}, "end_point": {"row": 14, "column": 112}}, {"id": 53, "type": "*", "text": "*", "parent": 25, "children": [], "start_point": {"row": 14, "column": 113}, "end_point": {"row": 14, "column": 114}}, {"id": 54, "type": "identifier", "text": "sum", "parent": 25, "children": [], "start_point": {"row": 14, "column": 115}, "end_point": {"row": 14, "column": 118}}, {"id": 55, "type": "ERROR", "text": "@", "parent": 24, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [8, 10, 14, 20, 25, 26, 27, 28, 29, 31], "assignments": [], "loops": [], "conditionals": [5, 6, 7, 12, 13, 15, 18, 19, 21, 23, 34, 36, 39, 40, 42, 44, 46, 47, 49, 51, 52, 54], "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// MetricsKitSession.h\n// MetricsKit\n//\n// Created by <NAME> on 4/15/13.\n// Copyright (c) 2013 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface MetricsKitSession : NSObject\n\n- (id)initWithAppKey:(NSString *)key host:(NSString *)host;\n\n- (void)addEvent:(NSString *)key segmentation:(NSDictionary *)segmentation count:(NSNumber *)count sum:(NSNumber *)sum;\n\n@end\n"}
80,963
c
// // UIButton+ZQBackgroundColor.h // ZQPacking_Example // // Created by 张奇 on 2018/4/18. // Copyright © 2018年 <EMAIL>. All rights reserved. // #import <UIKit/UIKit.h> @interface UIButton (ZQBackgroundColor) - (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state; - (void)setCornerBackgroundColor:(UIColor *)backgroundColor withRadius:(CGFloat)radius forState:(UIControlState)state; @end
34.17
12
(translation_unit) "//\n// UIButton+ZQBackgroundColor.h\n// ZQPacking_Example\n//\n// Created by 张奇 on 2018/4/18.\n// Copyright © 2018年 <EMAIL>. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface UIButton (ZQBackgroundColor)\n\n- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state;\n\n- (void)setCornerBackgroundColor:(UIColor *)backgroundColor withRadius:(CGFloat)radius forState:(UIControlState)state;\n\n@end\n" (comment) "//" (comment) "// UIButton+ZQBackgroundColor.h" (comment) "// ZQPacking_Example" (comment) "//" (comment) "// Created by 张奇 on 2018/4/18.\n// " (comment) "Copyright © 2018年 <EMAIL>. All rights reserved.\n//\n\n#i" (comment) "po" (preproc_call) " <UIKit/UIKit.h>\n\n@inter" (preproc_directive) " <UIKit" (preproc_arg) "UIKit.h>\n\n@inte" (ERROR) "ace UIButton (ZQBackgroundColor)\n\n- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state;\n\n- (void)setCornerBackgroundColor:(UIColor *)backgroundColor withRadius:(CGFloat)radius forState:(UIControlState)state;\n\n@end\n" (ERROR) "a" (type_identifier) "ce UIButt" (function_declarator) "n (ZQBackgroundColor)\n\n- (vo" (identifier) "n (ZQBac" (parameter_list) "groundColor)\n\n- (vo" (() "g" (identifier) "roundColor)\n\n- (v" ()) "o" (unary_expression) ")setBackgroundColor:(UICol" (-) ")" (cast_expression) "etBackgroundColor:(UICol" (() "e" (type_descriptor) "tBac" (primitive_type) "tBac" ()) "k" (identifier) "groundColor:(UICol" (:) "o" (() "r" (binary_expression) " *)backgroundColor forState:(UIControlState)state;\n\n- (void)setCornerBackgroundColor:(UICol" (binary_expression) " *)backgroundColor forSta" (identifier) " *)back" (*) "r" (ERROR) "o" ()) "o" (identifier) "undColor forSta" (ERROR) "e:(UIControlState)state;\n\n- (vo" (identifier) "e:(UICon" (:) "t" (() "r" (identifier) "olState)state;" ()) "\n" (identifier) "\n- (v" (;) "o" (-) ")" (cast_expression) "etCornerBackgroundColor:(UICol" (() "e" (type_descriptor) "tCor" (primitive_type) "tCor" ()) "n" (identifier) "erBackgroundColor:(UICol" (:) "o" (() "r" (binary_expression) " *)backgroundColor withRa" (identifier) " *)back" (*) "r" (ERROR) "o" ()) "o" (identifier) "undColor withRa" (identifier) "ius:(CGFlo" (:) "a" (() "t" (identifier) ")radius" ()) " " (identifier) "forSta" (identifier) "e:(UICon" (:) "t" (() "r" (identifier) "olState)state;" ()) "\n" (identifier) "\n@end" (;) "\n" (ERROR) "" (identifier) ""
75
6
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 34.17, "nodes": 42, "errors": 0, "source_hash": "14b06ee60ac74a55cf670151f6bab92a8a0be3501068257fabf31f23d559c9da", "categorized_nodes": 27}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": " <UIKit/UIKit.h>\n\n@inter", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": " <UIKit", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "UIKit.h>\n\n@inte", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "ace UIButton (ZQBackgroundColor)\n\n- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state;\n\n- (void)setCornerBackgroundColor:(UIColor *)backgroundColor withRadius:(CGFloat)radius forState:(UIControlState)state;\n\n@end\n", "parent": null, "children": [4, 5, 6, 10, 15, 29, 34, 35, 36, 37, 38, 39, 40, 41], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 16, "column": 4}}, {"id": 4, "type": "ERROR", "text": "a", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "type_identifier", "text": "ce UIButt", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "function_declarator", "text": "n (ZQBackgroundColor)\n\n- (vo", "parent": 3, "children": [7, 8], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 39}}, {"id": 7, "type": "identifier", "text": "n (ZQBac", "parent": 6, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 19}}, {"id": 8, "type": "parameter_list", "text": "groundColor)\n\n- (vo", "parent": 6, "children": [9], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 39}}, {"id": 9, "type": "identifier", "text": "roundColor)\n\n- (v", "parent": 8, "children": [], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 38}}, {"id": 10, "type": "unary_expression", "text": ")setBackgroundColor:(UICol", "parent": 3, "children": [11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 26}}, {"id": 11, "type": "cast_expression", "text": "etBackgroundColor:(UICol", "parent": 10, "children": [12, 14], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 26}}, {"id": 12, "type": "type_descriptor", "text": "tBac", "parent": 11, "children": [13], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 13, "type": "primitive_type", "text": "tBac", "parent": 12, "children": [], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 14, "type": "identifier", "text": "groundColor:(UICol", "parent": 11, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 26}}, {"id": 15, "type": "binary_expression", "text": " *)backgroundColor forState:(UIControlState)state;\n\n- (void)setCornerBackgroundColor:(UICol", "parent": 3, "children": [16, 21, 25], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 14, "column": 32}}, {"id": 16, "type": "binary_expression", "text": " *)backgroundColor forSta", "parent": 15, "children": [17, 18, 19, 20], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 53}}, {"id": 17, "type": "identifier", "text": " *)back", "parent": 16, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 35}}, {"id": 18, "type": "*", "text": "r", "parent": 16, "children": [], "start_point": {"row": 12, "column": 36}, "end_point": {"row": 12, "column": 37}}, {"id": 19, "type": "ERROR", "text": "o", "parent": 16, "children": [], "start_point": {"row": 12, "column": 37}, "end_point": {"row": 12, "column": 38}}, {"id": 20, "type": "identifier", "text": "undColor forSta", "parent": 16, "children": [], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 12, "column": 53}}, {"id": 21, "type": "ERROR", "text": "e:(UIControlState)state;\n\n- (vo", "parent": 15, "children": [22, 23, 24], "start_point": {"row": 12, "column": 54}, "end_point": {"row": 12, "column": 85}}, {"id": 22, "type": "identifier", "text": "e:(UICon", "parent": 21, "children": [], "start_point": {"row": 12, "column": 54}, "end_point": {"row": 12, "column": 62}}, {"id": 23, "type": "identifier", "text": "olState)state;", "parent": 21, "children": [], "start_point": {"row": 12, "column": 64}, "end_point": {"row": 12, "column": 78}}, {"id": 24, "type": "identifier", "text": "\n- (v", "parent": 21, "children": [], "start_point": {"row": 12, "column": 79}, "end_point": {"row": 12, "column": 84}}, {"id": 25, "type": "cast_expression", "text": "etCornerBackgroundColor:(UICol", "parent": 15, "children": [26, 28], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 32}}, {"id": 26, "type": "type_descriptor", "text": "tCor", "parent": 25, "children": [27], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 7}}, {"id": 27, "type": "primitive_type", "text": "tCor", "parent": 26, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 7}}, {"id": 28, "type": "identifier", "text": "erBackgroundColor:(UICol", "parent": 25, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 32}}, {"id": 29, "type": "binary_expression", "text": " *)backgroundColor withRa", "parent": 3, "children": [30, 31, 32, 33], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 59}}, {"id": 30, "type": "identifier", "text": " *)back", "parent": 29, "children": [], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 41}}, {"id": 31, "type": "*", "text": "r", "parent": 29, "children": [], "start_point": {"row": 14, "column": 42}, "end_point": {"row": 14, "column": 43}}, {"id": 32, "type": "ERROR", "text": "o", "parent": 29, "children": [], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 44}}, {"id": 33, "type": "identifier", "text": "undColor withRa", "parent": 29, "children": [], "start_point": {"row": 14, "column": 44}, "end_point": {"row": 14, "column": 59}}, {"id": 34, "type": "identifier", "text": "ius:(CGFlo", "parent": 3, "children": [], "start_point": {"row": 14, "column": 60}, "end_point": {"row": 14, "column": 70}}, {"id": 35, "type": "identifier", "text": ")radius", "parent": 3, "children": [], "start_point": {"row": 14, "column": 72}, "end_point": {"row": 14, "column": 79}}, {"id": 36, "type": "identifier", "text": "forSta", "parent": 3, "children": [], "start_point": {"row": 14, "column": 80}, "end_point": {"row": 14, "column": 86}}, {"id": 37, "type": "identifier", "text": "e:(UICon", "parent": 3, "children": [], "start_point": {"row": 14, "column": 87}, "end_point": {"row": 14, "column": 95}}, {"id": 38, "type": "identifier", "text": "olState)state;", "parent": 3, "children": [], "start_point": {"row": 14, "column": 97}, "end_point": {"row": 14, "column": 111}}, {"id": 39, "type": "identifier", "text": "\n@end", "parent": 3, "children": [], "start_point": {"row": 14, "column": 112}, "end_point": {"row": 14, "column": 117}}, {"id": 40, "type": "ERROR", "text": "", "parent": 3, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 41, "type": "identifier", "text": "", "parent": 3, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 4}}]}, "node_categories": {"declarations": {"functions": [6], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 11, 15, 16, 25, 29], "assignments": [], "loops": [], "conditionals": [5, 7, 9, 14, 17, 20, 22, 23, 24, 28, 30, 33, 34, 35, 36, 37, 38, 39, 41], "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": "n (ZQBackgroundColor)\n\n- (vo"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// UIButton+ZQBackgroundColor.h\n// ZQPacking_Example\n//\n// Created by \u5f20\u5947 on 2018/4/18.\n// Copyright \u00a9 2018\u5e74 <EMAIL>. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface UIButton (ZQBackgroundColor)\n\n- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state;\n\n- (void)setCornerBackgroundColor:(UIColor *)backgroundColor withRadius:(CGFloat)radius forState:(UIControlState)state;\n\n@end\n"}
80,964
c
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20). // // Copyright (C) 1997-2019 <NAME>. // #import "NTKDCollectionStoreObserver-Protocol.h" @class NSNumber, NTKDCollectionStore; @protocol NTKDCollectionStoreSyncObserver <NTKDCollectionStoreObserver> - (void)collectionStore:(NTKDCollectionStore *)arg1 didSuppressNotificationForSeqId:(NSNumber *)arg2; @end
42.2
10
(translation_unit) "//\n// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20).\n//\n// Copyright (C) 1997-2019 <NAME>.\n//\n\n#import "NTKDCollectionStoreObserver-Protocol.h"\n\n@class NSNumber, NTKDCollectionStore;\n\n@protocol NTKDCollectionStoreSyncObserver <NTKDCollectionStoreObserver>\n- (void)collectionStore:(NTKDCollectionStore *)arg1 didSuppressNotificationForSeqId:(NSNumber *)arg2;\n@end\n\n" (comment) "//" (comment) "// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20)." (comment) "//" (comment) "// Copyright (C) 1997-2019 <NAME>." (comment) "//" (preproc_call) "#import "NTKDCollectionStoreObserver-Protocol.h"\n" (preproc_directive) "#import" (preproc_arg) ""NTKDCollectionStoreObserver-Protocol.h"" (ERROR) "@" (ERROR) "@" (declaration) "class NSNumber, NTKDCollectionStore;" (type_identifier) "class" (identifier) "NSNumber" (,) "," (identifier) "NTKDCollectionStore" (;) ";" (ERROR) "@protocol NTKDCollectionStoreSyncObserver <NTKDCollectionStoreObserver>\n- (void)collectionStore:(NTKDCollectionStore *)arg1 didSuppressNotificationForSeqId:(NSNumber *)arg2" (ERROR) "@" (type_identifier) "protocol" (identifier) "NTKDCollectionStoreSyncObserver" (<) "<" (identifier) "NTKDCollectionStoreObserver" (>) ">" (unary_expression) "- (void)collectionStore" (-) "-" (cast_expression) "(void)collectionStore" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "collectionStore" (:) ":" (() "(" (binary_expression) "NTKDCollectionStore *)arg1 didSuppressNotificationForSeqId" (identifier) "NTKDCollectionStore" (*) "*" (ERROR) ")arg1" ()) ")" (identifier) "arg1" (identifier) "didSuppressNotificationForSeqId" (:) ":" (() "(" (binary_expression) "NSNumber *)arg2" (identifier) "NSNumber" (*) "*" (ERROR) ")" ()) ")" (identifier) "arg2" (expression_statement) ";" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
56
8
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 42.2, "nodes": 33, "errors": 0, "source_hash": "bd8ad694f1b61cbe2de97966396538574d4b00702e03c500274ce18cdc842231", "categorized_nodes": 17}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import \"NTKDCollectionStoreObserver-Protocol.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "\"NTKDCollectionStoreObserver-Protocol.h\"", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 48}}, {"id": 3, "type": "ERROR", "text": "@", "parent": null, "children": [4], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 5, "type": "declaration", "text": "class NSNumber, NTKDCollectionStore;", "parent": null, "children": [6, 7], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 37}}, {"id": 6, "type": "identifier", "text": "NSNumber", "parent": 5, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 15}}, {"id": 7, "type": "identifier", "text": "NTKDCollectionStore", "parent": 5, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 36}}, {"id": 8, "type": "ERROR", "text": "@protocol NTKDCollectionStoreSyncObserver <NTKDCollectionStoreObserver>\n- (void)collectionStore:(NTKDCollectionStore *)arg1 didSuppressNotificationForSeqId:(NSNumber *)arg2", "parent": null, "children": [9, 10, 11, 12, 13, 14, 15, 21, 27], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 100}}, {"id": 9, "type": "ERROR", "text": "@", "parent": 8, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "protocol", "parent": 8, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 9}}, {"id": 11, "type": "identifier", "text": "NTKDCollectionStoreSyncObserver", "parent": 8, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 41}}, {"id": 12, "type": "<", "text": "<", "parent": 8, "children": [], "start_point": {"row": 10, "column": 42}, "end_point": {"row": 10, "column": 43}}, {"id": 13, "type": "identifier", "text": "NTKDCollectionStoreObserver", "parent": 8, "children": [], "start_point": {"row": 10, "column": 43}, "end_point": {"row": 10, "column": 70}}, {"id": 14, "type": ">", "text": ">", "parent": 8, "children": [], "start_point": {"row": 10, "column": 70}, "end_point": {"row": 10, "column": 71}}, {"id": 15, "type": "unary_expression", "text": "- (void)collectionStore", "parent": 8, "children": [16, 17], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 23}}, {"id": 16, "type": "-", "text": "-", "parent": 15, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 17, "type": "cast_expression", "text": "(void)collectionStore", "parent": 15, "children": [18, 20], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 23}}, {"id": 18, "type": "type_descriptor", "text": "void", "parent": 17, "children": [19], "start_point": {"row": 11, "column": 3}, "end_point": {"row": 11, "column": 7}}, {"id": 19, "type": "primitive_type", "text": "void", "parent": 18, "children": [], "start_point": {"row": 11, "column": 3}, "end_point": {"row": 11, "column": 7}}, {"id": 20, "type": "identifier", "text": "collectionStore", "parent": 17, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 23}}, {"id": 21, "type": "binary_expression", "text": "NTKDCollectionStore *)arg1 didSuppressNotificationForSeqId", "parent": 8, "children": [22, 23, 24, 26], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 83}}, {"id": 22, "type": "identifier", "text": "NTKDCollectionStore", "parent": 21, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 44}}, {"id": 23, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 11, "column": 45}, "end_point": {"row": 11, "column": 46}}, {"id": 24, "type": "ERROR", "text": ")arg1", "parent": 21, "children": [25], "start_point": {"row": 11, "column": 46}, "end_point": {"row": 11, "column": 51}}, {"id": 25, "type": "identifier", "text": "arg1", "parent": 24, "children": [], "start_point": {"row": 11, "column": 47}, "end_point": {"row": 11, "column": 51}}, {"id": 26, "type": "identifier", "text": "didSuppressNotificationForSeqId", "parent": 21, "children": [], "start_point": {"row": 11, "column": 52}, "end_point": {"row": 11, "column": 83}}, {"id": 27, "type": "binary_expression", "text": "NSNumber *)arg2", "parent": 8, "children": [28, 29, 30], "start_point": {"row": 11, "column": 85}, "end_point": {"row": 11, "column": 100}}, {"id": 28, "type": "identifier", "text": "NSNumber", "parent": 27, "children": [], "start_point": {"row": 11, "column": 85}, "end_point": {"row": 11, "column": 93}}, {"id": 29, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 11, "column": 94}, "end_point": {"row": 11, "column": 95}}, {"id": 30, "type": "identifier", "text": "arg2", "parent": 27, "children": [], "start_point": {"row": 11, "column": 96}, "end_point": {"row": 11, "column": 100}}, {"id": 31, "type": "ERROR", "text": "@", "parent": null, "children": [32], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 32, "type": "ERROR", "text": "@", "parent": 31, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [5], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [15, 17, 21, 27], "assignments": [], "loops": [], "conditionals": [6, 7, 10, 11, 13, 20, 22, 25, 26, 28, 30], "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// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20).\n//\n// Copyright (C) 1997-2019 <NAME>.\n//\n\n#import \"NTKDCollectionStoreObserver-Protocol.h\"\n\n@class NSNumber, NTKDCollectionStore;\n\n@protocol NTKDCollectionStoreSyncObserver <NTKDCollectionStoreObserver>\n- (void)collectionStore:(NTKDCollectionStore *)arg1 didSuppressNotificationForSeqId:(NSNumber *)arg2;\n@end\n\n"}
80,965
c
/* * focus - main header * copyright (c) 2022 fenze. * all rights reserved. */ #ifndef _FOCUS_H #define _FOCUS_H #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <time.h> #include "util.h" /* * config * ------ * tmp - temporary file that * keeps start times. * hist - file where program * saves results. */ static char *tmp = ""; static char *hist = ""; // Time units struct struct units { int hours; int minutes; int seconds; }; /* * time_units() - returns time struct */ void fill_units(struct units *__name); /* * is_running() - checks status of session * and returns boolean */ bool is_running(); /* * start() - generates new session with unique * identity and starts timer. */ int start(); /* * show_status() - shows all sessions, their * identity, and timer */ int show_status(); /* * stop() - stops given session, * saves results to file. */ int stop(); #endif /* _FOCUS_H */
17.36
55
(translation_unit) "/*\n * focus - main header\n * copyright (c) 2022 fenze.\n * all rights reserved.\n */\n\n#ifndef _FOCUS_H\n#define _FOCUS_H\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdbool.h>\n#include <string.h>\n#include <time.h>\n\n#include "util.h"\n\n/*\n * config\n * ------\n * tmp - temporary file that\n * keeps start times.\n * hist - file where program\n * saves results.\n */\nstatic char *tmp = "";\nstatic char *hist = "";\n\n// Time units struct\nstruct units {\n int hours;\n int minutes;\n int seconds;\n};\n\n\n/*\n * time_units() - returns time struct\n */\nvoid fill_units(struct units *__name);\n\n/*\n * is_running() - checks status of session\n * and returns boolean\n */\nbool is_running();\n\n/*\n * start() - generates new session with unique\n * identity and starts timer.\n */\nint start();\n\n/*\n * show_status() - shows all sessions, their\n * identity, and timer\n */\nint show_status();\n\n/*\n * stop() - stops given session,\n * saves results to file.\n */\nint stop();\n\n#endif /* _FOCUS_H */\n" (comment) "/*\n * focus - main header\n * copyright (c) 2022 fenze.\n * all rights reserved.\n */" (preproc_ifdef) "#ifndef _FOCUS_H\n#define _FOCUS_H\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdbool.h>\n#include <string.h>\n#include <time.h>\n\n#include "util.h"\n\n/*\n * config\n * ------\n * tmp - temporary file that\n * keeps start times.\n * hist - file where program\n * saves results.\n */\nstatic char *tmp = "";\nstatic char *hist = "";\n\n// Time units struct\nstruct units {\n int hours;\n int minutes;\n int seconds;\n};\n\n\n/*\n * time_units() - returns time struct\n */\nvoid fill_units(struct units *__name);\n\n/*\n * is_running() - checks status of session\n * and returns boolean\n */\nbool is_running();\n\n/*\n * start() - generates new session with unique\n * identity and starts timer.\n */\nint start();\n\n/*\n * show_status() - shows all sessions, their\n * identity, and timer\n */\nint show_status();\n\n/*\n * stop() - stops given session,\n * saves results to file.\n */\nint stop();\n\n#endif" (#ifndef) "#ifndef" (identifier) "_FOCUS_H" (preproc_def) "#define _FOCUS_H\n" (#define) "#define" (identifier) "_FOCUS_H" (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 <stdbool.h>\n" (#include) "#include" (system_lib_string) "<stdbool.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include <time.h>\n" (#include) "#include" (system_lib_string) "<time.h>" (preproc_include) "#include "util.h"\n" (#include) "#include" (string_literal) ""util.h"" (") """ (string_content) "util.h" (") """ (comment) "/*\n * config\n * ------\n * tmp - temporary file that\n * keeps start times.\n * hist - file where program\n * saves results.\n */" (declaration) "static char *tmp = "";" (storage_class_specifier) "static" (static) "static" (primitive_type) "char" (init_declarator) "*tmp = """ (pointer_declarator) "*tmp" (*) "*" (identifier) "tmp" (=) "=" (string_literal) """" (") """ (") """ (;) ";" (declaration) "static char *hist = "";" (storage_class_specifier) "static" (static) "static" (primitive_type) "char" (init_declarator) "*hist = """ (pointer_declarator) "*hist" (*) "*" (identifier) "hist" (=) "=" (string_literal) """" (") """ (") """ (;) ";" (comment) "// Time units struct" (struct_specifier) "struct units {\n int hours;\n int minutes;\n int seconds;\n}" (struct) "struct" (type_identifier) "units" (field_declaration_list) "{\n int hours;\n int minutes;\n int seconds;\n}" ({) "{" (field_declaration) "int hours;" (primitive_type) "int" (field_identifier) "hours" (;) ";" (field_declaration) "int minutes;" (primitive_type) "int" (field_identifier) "minutes" (;) ";" (field_declaration) "int seconds;" (primitive_type) "int" (field_identifier) "seconds" (;) ";" (}) "}" (;) ";" (comment) "/*\n * time_units() - returns time struct\n */" (declaration) "void fill_units(struct units *__name);" (primitive_type) "void" (function_declarator) "fill_units(struct units *__name)" (identifier) "fill_units" (parameter_list) "(struct units *__name)" (() "(" (parameter_declaration) "struct units *__name" (struct_specifier) "struct units" (struct) "struct" (type_identifier) "units" (pointer_declarator) "*__name" (*) "*" (identifier) "__name" ()) ")" (;) ";" (comment) "/*\n * is_running() - checks status of session\n * and returns boolean\n */" (declaration) "bool is_running();" (primitive_type) "bool" (function_declarator) "is_running()" (identifier) "is_running" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/*\n * start() - generates new session with unique\n * identity and starts timer.\n */" (declaration) "int start();" (primitive_type) "int" (function_declarator) "start()" (identifier) "start" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/*\n * show_status() - shows all sessions, their\n * identity, and timer\n */" (declaration) "int show_status();" (primitive_type) "int" (function_declarator) "show_status()" (identifier) "show_status" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/*\n * stop() - stops given session,\n * saves results to file.\n */" (declaration) "int stop();" (primitive_type) "int" (function_declarator) "stop()" (identifier) "stop" (parameter_list) "()" (() "(" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* _FOCUS_H */"
130
0
{"language": "c", "success": true, "metadata": {"lines": 55, "avg_line_length": 17.36, "nodes": 85, "errors": 0, "source_hash": "cb4e5f2e0bf2010746d7086d05d1eff1db944caf15fd6c0db834dd15cbd9a8f6", "categorized_nodes": 58}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _FOCUS_H\n#define _FOCUS_H\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdbool.h>\n#include <string.h>\n#include <time.h>\n\n#include \"util.h\"\n\n/*\n * config\n * ------\n * tmp - temporary file that\n * keeps start times.\n * hist - file where program\n * saves results.\n */\nstatic char *tmp = \"\";\nstatic char *hist = \"\";\n\n// Time units struct\nstruct units {\n\tint hours;\n\tint minutes;\n\tint seconds;\n};\n\n\n/*\n * time_units() - returns time struct\n */\nvoid fill_units(struct units *__name);\n\n/*\n * is_running() - checks status of session\n * and returns boolean\n */\nbool is_running();\n\n/*\n * start() - generates new session with unique\n * identity and starts timer.\n */\nint start();\n\n/*\n * show_status() - shows all sessions, their\n * identity, and timer\n */\nint show_status();\n\n/*\n * stop() - stops given session,\n * saves results to file.\n */\nint stop();\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 32, 40, 52, 64, 69, 74, 79, 84], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 65, "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": "_FOCUS_H", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define _FOCUS_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": "_FOCUS_H", "parent": 3, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 16}}, {"id": 6, "type": "preproc_include", "text": "#include <stdio.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": "system_lib_string", "text": "<stdio.h>", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <stdlib.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": "system_lib_string", "text": "<stdlib.h>", "parent": 9, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <stdbool.h>\n", "parent": 0, "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": "system_lib_string", "text": "<stdbool.h>", "parent": 12, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 20}}, {"id": 15, "type": "preproc_include", "text": "#include <string.h>\n", "parent": 0, "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": "system_lib_string", "text": "<string.h>", "parent": 15, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 18, "type": "preproc_include", "text": "#include <time.h>\n", "parent": 0, "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": "system_lib_string", "text": "<time.h>", "parent": 18, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 17}}, {"id": 21, "type": "preproc_include", "text": "#include \"util.h\"\n", "parent": 0, "children": [22, 23], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"util.h\"", "parent": 21, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 17}}, {"id": 24, "type": "declaration", "text": "static char *tmp = \"\";", "parent": 0, "children": [25, 26], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 22}}, {"id": 25, "type": "primitive_type", "text": "char", "parent": 24, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 11}}, {"id": 26, "type": "init_declarator", "text": "*tmp = \"\"", "parent": 24, "children": [27, 30, 31], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 21}}, {"id": 27, "type": "pointer_declarator", "text": "*tmp", "parent": 26, "children": [28, 29], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 16}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 13}}, {"id": 29, "type": "identifier", "text": "tmp", "parent": 27, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 16}}, {"id": 30, "type": "=", "text": "=", "parent": 26, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 18}}, {"id": 31, "type": "string_literal", "text": "\"\"", "parent": 26, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 21}}, {"id": 32, "type": "declaration", "text": "static char *hist = \"\";", "parent": 0, "children": [33, 34], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 23}}, {"id": 33, "type": "primitive_type", "text": "char", "parent": 32, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 11}}, {"id": 34, "type": "init_declarator", "text": "*hist = \"\"", "parent": 32, "children": [35, 38, 39], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 22}}, {"id": 35, "type": "pointer_declarator", "text": "*hist", "parent": 34, "children": [36, 37], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 17}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 13}}, {"id": 37, "type": "identifier", "text": "hist", "parent": 35, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 17}}, {"id": 38, "type": "=", "text": "=", "parent": 34, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 19}}, {"id": 39, "type": "string_literal", "text": "\"\"", "parent": 34, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 22}}, {"id": 40, "type": "struct_specifier", "text": "struct units {\n\tint hours;\n\tint minutes;\n\tint seconds;\n}", "parent": 0, "children": [41, 42], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 41, "type": "struct", "text": "struct", "parent": 40, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 42, "type": "type_identifier", "text": "units", "parent": 40, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 12}}, {"id": 43, "type": "field_declaration", "text": "int hours;", "parent": 40, "children": [44, 45], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 11}}, {"id": 44, "type": "primitive_type", "text": "int", "parent": 43, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 4}}, {"id": 45, "type": "field_identifier", "text": "hours", "parent": 43, "children": [], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 10}}, {"id": 46, "type": "field_declaration", "text": "int minutes;", "parent": 40, "children": [47, 48], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 13}}, {"id": 47, "type": "primitive_type", "text": "int", "parent": 46, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 4}}, {"id": 48, "type": "field_identifier", "text": "minutes", "parent": 46, "children": [], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 12}}, {"id": 49, "type": "field_declaration", "text": "int seconds;", "parent": 40, "children": [50, 51], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 13}}, {"id": 50, "type": "primitive_type", "text": "int", "parent": 49, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 4}}, {"id": 51, "type": "field_identifier", "text": "seconds", "parent": 49, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 12}}, {"id": 52, "type": "declaration", "text": "void fill_units(struct units *__name);", "parent": 0, "children": [53, 54], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 38}}, {"id": 53, "type": "primitive_type", "text": "void", "parent": 52, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 4}}, {"id": 54, "type": "function_declarator", "text": "fill_units(struct units *__name)", "parent": 52, "children": [55, 56], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 37}}, {"id": 55, "type": "identifier", "text": "fill_units", "parent": 54, "children": [], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 15}}, {"id": 56, "type": "parameter_list", "text": "(struct units *__name)", "parent": 54, "children": [57], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 37}}, {"id": 57, "type": "parameter_declaration", "text": "struct units *__name", "parent": 56, "children": [58, 61], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 36}}, {"id": 58, "type": "struct_specifier", "text": "struct units", "parent": 57, "children": [59, 60], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 28}}, {"id": 59, "type": "struct", "text": "struct", "parent": 58, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 22}}, {"id": 60, "type": "type_identifier", "text": "units", "parent": 58, "children": [], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 28}}, {"id": 61, "type": "pointer_declarator", "text": "*__name", "parent": 57, "children": [62, 63], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 36}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 30}}, {"id": 63, "type": "identifier", "text": "__name", "parent": 61, "children": [], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 36}}, {"id": 64, "type": "declaration", "text": "bool is_running();", "parent": 0, "children": [65, 66], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 18}}, {"id": 65, "type": "primitive_type", "text": "bool", "parent": 64, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 4}}, {"id": 66, "type": "function_declarator", "text": "is_running()", "parent": 64, "children": [67, 68], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 17}}, {"id": 67, "type": "identifier", "text": "is_running", "parent": 66, "children": [], "start_point": {"row": 45, "column": 5}, "end_point": {"row": 45, "column": 15}}, {"id": 68, "type": "parameter_list", "text": "()", "parent": 66, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 17}}, {"id": 69, "type": "declaration", "text": "int start();", "parent": 0, "children": [70, 71], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 12}}, {"id": 70, "type": "primitive_type", "text": "int", "parent": 69, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 3}}, {"id": 71, "type": "function_declarator", "text": "start()", "parent": 69, "children": [72, 73], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 11}}, {"id": 72, "type": "identifier", "text": "start", "parent": 71, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 9}}, {"id": 73, "type": "parameter_list", "text": "()", "parent": 71, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 11}}, {"id": 74, "type": "declaration", "text": "int show_status();", "parent": 0, "children": [75, 76], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 18}}, {"id": 75, "type": "primitive_type", "text": "int", "parent": 74, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 3}}, {"id": 76, "type": "function_declarator", "text": "show_status()", "parent": 74, "children": [77, 78], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 17}}, {"id": 77, "type": "identifier", "text": "show_status", "parent": 76, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 15}}, {"id": 78, "type": "parameter_list", "text": "()", "parent": 76, "children": [], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 17}}, {"id": 79, "type": "declaration", "text": "int stop();", "parent": 0, "children": [80, 81], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 11}}, {"id": 80, "type": "primitive_type", "text": "int", "parent": 79, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 3}}, {"id": 81, "type": "function_declarator", "text": "stop()", "parent": 79, "children": [82, 83], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 10}}, {"id": 82, "type": "identifier", "text": "stop", "parent": 81, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 8}}, {"id": 83, "type": "parameter_list", "text": "()", "parent": 81, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 10}}, {"id": 84, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 6}}]}, "node_categories": {"declarations": {"functions": [54, 66, 71, 76, 81], "variables": [24, 32, 43, 46, 49, 52, 57, 64, 69, 74, 79], "classes": [40, 41, 58, 59], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 29, 37, 42, 45, 48, 51, 55, 60, 63, 67, 72, 77, 82, 84], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 31, 39], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "fill_units(struct units *__name)"}, {"node_id": 66, "universal_type": "function", "name": "unknown", "text_snippet": "is_running()"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "start()"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "show_status()"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "stop()"}], "class_declarations": [{"node_id": 40, "universal_type": "class", "name": "units", "text_snippet": "struct units {\n\tint hours;\n\tint minutes;\n\tint seconds;\n}"}, {"node_id": 41, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 58, "universal_type": "class", "name": "units", "text_snippet": "struct units"}, {"node_id": 59, "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 <stdlib.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <stdbool.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <string.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <time.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"util.h\"\n"}, {"node_id": 22, "text": "#include"}]}, "original_source_code": "/*\n * focus - main header\n * copyright (c) 2022 fenze.\n * all rights reserved.\n */\n\n#ifndef _FOCUS_H\n#define _FOCUS_H\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdbool.h>\n#include <string.h>\n#include <time.h>\n\n#include \"util.h\"\n\n/*\n * config\n * ------\n * tmp - temporary file that\n * keeps start times.\n * hist - file where program\n * saves results.\n */\nstatic char *tmp = \"\";\nstatic char *hist = \"\";\n\n// Time units struct\nstruct units {\n\tint hours;\n\tint minutes;\n\tint seconds;\n};\n\n\n/*\n * time_units() - returns time struct\n */\nvoid fill_units(struct units *__name);\n\n/*\n * is_running() - checks status of session\n * and returns boolean\n */\nbool is_running();\n\n/*\n * start() - generates new session with unique\n * identity and starts timer.\n */\nint start();\n\n/*\n * show_status() - shows all sessions, their\n * identity, and timer\n */\nint show_status();\n\n/*\n * stop() - stops given session,\n * saves results to file.\n */\nint stop();\n\n#endif /* _FOCUS_H */\n"}
80,966
c
// // AppDelegate.h // CGRTC // // Created by UFOTO on 2021/5/26. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property(nonatomic, strong)UIWindow *window; @end
19.8
10
(translation_unit) "//\n// AppDelegate.h\n// CGRTC\n//\n// Created by UFOTO on 2021/5/26.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property(nonatomic, strong)UIWindow *window;\n\n@end\n" (comment) "//" (comment) "// AppDelegate.h" (comment) "// CGRTC" (comment) "//" (comment) "// Created by UFOTO on 2021/5/26." (comment) "//" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (ERROR) "@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property(nonatomic, strong)UIWindow *window;\n\n@end" (ERROR) "@" (type_identifier) "interface" (ERROR) "AppDelegate : UIResponder <UIApplicationDelegate>\n\n@" (identifier) "AppDelegate" (:) ":" (identifier) "UIResponder" (<) "<" (identifier) "UIApplicationDelegate" (>) ">" (ERROR) "@" (function_declarator) "property(nonatomic, strong)" (identifier) "property" (parameter_list) "(nonatomic, strong)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "strong" ()) ")" (declaration) "UIWindow *window;" (type_identifier) "UIWindow" (pointer_declarator) "*window" (*) "*" (identifier) "window" (;) ";" (ERROR) "@" (ERROR) "@" (identifier) "end"
38
6
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 19.8, "nodes": 25, "errors": 0, "source_hash": "d4519b9e58862b8b6d7168664c3417909c835463cb60f862dd941e4888443bae", "categorized_nodes": 12}, "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 AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property(nonatomic, strong)UIWindow *window;\n\n@end", "parent": null, "children": [4, 5, 6, 13, 18, 23], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 13, "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": "ERROR", "text": "AppDelegate : UIResponder <UIApplicationDelegate>\n\n@", "parent": 3, "children": [7, 8, 9, 10, 11, 12], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 11, "column": 1}}, {"id": 7, "type": "identifier", "text": "AppDelegate", "parent": 6, "children": [], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 22}}, {"id": 8, "type": "identifier", "text": "UIResponder", "parent": 6, "children": [], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 36}}, {"id": 9, "type": "<", "text": "<", "parent": 6, "children": [], "start_point": {"row": 9, "column": 37}, "end_point": {"row": 9, "column": 38}}, {"id": 10, "type": "identifier", "text": "UIApplicationDelegate", "parent": 6, "children": [], "start_point": {"row": 9, "column": 38}, "end_point": {"row": 9, "column": 59}}, {"id": 11, "type": ">", "text": ">", "parent": 6, "children": [], "start_point": {"row": 9, "column": 59}, "end_point": {"row": 9, "column": 60}}, {"id": 12, "type": "ERROR", "text": "@", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 13, "type": "function_declarator", "text": "property(nonatomic, strong)", "parent": 3, "children": [14, 15], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 28}}, {"id": 14, "type": "identifier", "text": "property", "parent": 13, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 9}}, {"id": 15, "type": "parameter_list", "text": "(nonatomic, strong)", "parent": 13, "children": [16, 17], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 28}}, {"id": 16, "type": "identifier", "text": "nonatomic", "parent": 15, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 19}}, {"id": 17, "type": "identifier", "text": "strong", "parent": 15, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 27}}, {"id": 18, "type": "declaration", "text": "UIWindow *window;", "parent": 3, "children": [19, 20], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 45}}, {"id": 19, "type": "type_identifier", "text": "UIWindow", "parent": 18, "children": [], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 36}}, {"id": 20, "type": "pointer_declarator", "text": "*window", "parent": 18, "children": [21, 22], "start_point": {"row": 11, "column": 37}, "end_point": {"row": 11, "column": 44}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 11, "column": 37}, "end_point": {"row": 11, "column": 38}}, {"id": 22, "type": "identifier", "text": "window", "parent": 20, "children": [], "start_point": {"row": 11, "column": 38}, "end_point": {"row": 11, "column": 44}}, {"id": 23, "type": "ERROR", "text": "@", "parent": 3, "children": [24], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 24, "type": "ERROR", "text": "@", "parent": 23, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}]}, "node_categories": {"declarations": {"functions": [13], "variables": [18], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 7, 8, 10, 14, 16, 17, 19, 22], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 13, "universal_type": "function", "name": "unknown", "text_snippet": "property(nonatomic, strong)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// AppDelegate.h\n// CGRTC\n//\n// Created by UFOTO on 2021/5/26.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property(nonatomic, strong)UIWindow *window;\n\n@end\n"}
80,967
c
// // newShop.h // shouCangShop // // Created by Book on 16/10/14. // Copyright © 2016年 qau. All rights reserved. // #import <UIKit/UIKit.h> @class newShop; @protocol newShopDelegate <NSObject> -(void)newShop:(newShop *)news andWith:(NSArray *) modele; @end @interface newShop : UITableViewController @property (nonatomic,copy) void (^myBlock)(NSArray*); @property(nonatomic,strong)NSArray *arrmodel; @property(nonatomic,weak)id<newShopDelegate> delegate; @end
26.35
17
(translation_unit) "//\n// newShop.h\n// shouCangShop\n//\n// Created by Book on 16/10/14.\n// Copyright © 2016年 qau. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n@class newShop;\n\n@protocol newShopDelegate <NSObject>\n\n-(void)newShop:(newShop *)news andWith:(NSArray *) modele;\n\n@end\n\n@interface newShop : UITableViewController\n@property (nonatomic,copy) void (^myBlock)(NSArray*);\n@property(nonatomic,strong)NSArray *arrmodel;\n\n@property(nonatomic,weak)id<newShopDelegate> delegate;\n@end\n" (comment) "//" (comment) "// newShop.h" (comment) "// shouCangShop" (comment) "//" (comment) "// Created by Book on 16/10/14." (comment) "// Copyright © 2016年 qau. All rights reserved.\n//" (comment) "\n#" (preproc_call) "port <UIKit/UIKit.h>\n@cl" (preproc_directive) "port <U" (preproc_arg) "Kit/UIKit.h>\n@c" (ERROR) "a" (ERROR) "a" (declaration) "ss newShop;\n\n@" (type_identifier) "ss ne" (identifier) "Shop;\n\n" (;) "@" (ERROR) "otocol newShopDelegate <NSObject>\n\n-(void)newShop:(newShop *)news andWith:(NSArray *) modele;\n\n" (ERROR) "o" (type_identifier) "tocol ne" (identifier) "ShopDelegate <N" (<) "O" (identifier) "bject>\n\n" (>) "-" (unary_expression) "oid)newShop:(n" (-) "o" (cast_expression) "id)newShop:(n" (() "i" (type_descriptor) "d)ne" (primitive_type) "d)ne" ()) "w" (identifier) "Shop:(n" (:) "e" (() "w" (binary_expression) "Shop *)news andWith:(N" (identifier) "Shop *)" (*) "e" (ERROR) "ws an" ()) "w" (identifier) "s an" (identifier) "With:(N" (:) "S" (() "A" (binary_expression) "rray *) modele;\n\n" (identifier) "rray *)" (*) "m" (ERROR) "o" ()) "o" (identifier) "ele;\n\n" (expression_statement) "@" (;) "@" (ERROR) "d" (ERROR) "d" (declaration) "\n\n@interface ne" (type_identifier) "\n\n@" (ERROR) "t" (ERROR) "t" (identifier) "erface ne" (;) "" (labeled_statement) "Shop : UITableViewController\n@property (nonatomic,copy) void (^myBlock)(NSArray*);\n@p" (statement_identifier) "Shop : " (:) "I" (declaration) "ableViewController\n@property (nonatomic,copy) void (^myBlock)(NSArray*);\n@p" (type_identifier) "ableViewController\n@p" (ERROR) "o" (ERROR) "o" (function_declarator) "perty (nonatomic,copy) void (^myBlock)(NSArray*);\n@" (function_declarator) "perty (nonatomic,copy) void (^myBlock)(NS" (identifier) "perty (n" (parameter_list) "natomic,copy) vo" (() "n" (parameter_declaration) "atomic,co" (type_identifier) "atomic,co" (,) "p" (parameter_declaration) "y) v" (type_identifier) "y) v" ()) "o" (call_expression) "d (^myBlock)(NS" (identifier) "d (^" (argument_list) "yBlock)(NS" (() "y" (ERROR) "B" (^) "B" (identifier) "lock)(N" ()) "S" (parameter_list) "Array*);\n@" (() "A" (parameter_declaration) "rray*);\n" (type_identifier) "rray*);" (abstract_pointer_declarator) "\n" (*) "\n" ()) "@" (;) "p" (ERROR) "o" (ERROR) "o" (expression_statement) "perty(nonatomic,strong)NSA" (call_expression) "perty(nonatomic,strong)NSA" (identifier) "perty(no" (argument_list) "natomic,strong)NSA" (() "n" (identifier) "atomic,st" (,) "r" (identifier) "ong)NS" ()) "A" (;) "" (declaration) "rray *arrmodel;\n\n@" (type_identifier) "rray *a" (pointer_declarator) "rmodel;\n\n" (*) "r" (identifier) "model;\n\n" (;) "@" (ERROR) "operty(nonatomic,weak)id<newShopDelegate> delegate;\n@end" (ERROR) "o" (binary_expression) "perty(nonatomic,weak)id<newShopDelegate> delegate;\n@" (binary_expression) "perty(nonatomic,weak)id<newShopDelegate> d" (call_expression) "perty(nonatomic,weak)id<" (identifier) "perty(no" (argument_list) "natomic,weak)id<" (() "n" (identifier) "atomic,we" (,) "a" (identifier) "k)id" ()) "<" (ERROR) "ne" (identifier) "ne" (<) "w" (identifier) "ShopDelegate> d" (>) "e" (identifier) "egate;\n@" (;) "e" (ERROR) "d" (expression_statement) "\n" (identifier) "\n" (;) ""
134
19
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 26.35, "nodes": 93, "errors": 0, "source_hash": "69a23325a59464a14ad7514f389ca7b79f39b3b79e3085c6b31e4ae117f78033", "categorized_nodes": 52}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port <UIKit/UIKit.h>\n@cl", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "port <U", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "Kit/UIKit.h>\n@c", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "a", "parent": null, "children": [4], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 4, "type": "ERROR", "text": "a", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 5, "type": "declaration", "text": "ss newShop;\n\n@", "parent": null, "children": [6, 7], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 15}}, {"id": 6, "type": "type_identifier", "text": "ss ne", "parent": 5, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 6}}, {"id": 7, "type": "identifier", "text": "Shop;\n\n", "parent": 5, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 14}}, {"id": 8, "type": "ERROR", "text": "otocol newShopDelegate <NSObject>\n\n-(void)newShop:(newShop *)news andWith:(NSArray *) modele;\n\n", "parent": null, "children": [9, 10, 11, 12, 13, 14, 15, 21, 27], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 13, "column": 57}}, {"id": 9, "type": "ERROR", "text": "o", "parent": 8, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "tocol ne", "parent": 8, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 9}}, {"id": 11, "type": "identifier", "text": "ShopDelegate <N", "parent": 8, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 25}}, {"id": 12, "type": "<", "text": "O", "parent": 8, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 27}}, {"id": 13, "type": "identifier", "text": "bject>\n\n", "parent": 8, "children": [], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 35}}, {"id": 14, "type": ">", "text": "-", "parent": 8, "children": [], "start_point": {"row": 11, "column": 35}, "end_point": {"row": 11, "column": 36}}, {"id": 15, "type": "unary_expression", "text": "oid)newShop:(n", "parent": 8, "children": [16, 17], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 14}}, {"id": 16, "type": "-", "text": "o", "parent": 15, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 17, "type": "cast_expression", "text": "id)newShop:(n", "parent": 15, "children": [18, 20], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 14}}, {"id": 18, "type": "type_descriptor", "text": "d)ne", "parent": 17, "children": [19], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 6}}, {"id": 19, "type": "primitive_type", "text": "d)ne", "parent": 18, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 6}}, {"id": 20, "type": "identifier", "text": "Shop:(n", "parent": 17, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 14}}, {"id": 21, "type": "binary_expression", "text": "Shop *)news andWith:(N", "parent": 8, "children": [22, 23, 24, 26], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 38}}, {"id": 22, "type": "identifier", "text": "Shop *)", "parent": 21, "children": [], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 23}}, {"id": 23, "type": "*", "text": "e", "parent": 21, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 25}}, {"id": 24, "type": "ERROR", "text": "ws an", "parent": 21, "children": [25], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 30}}, {"id": 25, "type": "identifier", "text": "s an", "parent": 24, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 30}}, {"id": 26, "type": "identifier", "text": "With:(N", "parent": 21, "children": [], "start_point": {"row": 13, "column": 31}, "end_point": {"row": 13, "column": 38}}, {"id": 27, "type": "binary_expression", "text": "rray *) modele;\n\n", "parent": 8, "children": [28, 29, 30, 31], "start_point": {"row": 13, "column": 40}, "end_point": {"row": 13, "column": 57}}, {"id": 28, "type": "identifier", "text": "rray *)", "parent": 27, "children": [], "start_point": {"row": 13, "column": 40}, "end_point": {"row": 13, "column": 47}}, {"id": 29, "type": "*", "text": "m", "parent": 27, "children": [], "start_point": {"row": 13, "column": 48}, "end_point": {"row": 13, "column": 49}}, {"id": 30, "type": "ERROR", "text": "o", "parent": 27, "children": [], "start_point": {"row": 13, "column": 49}, "end_point": {"row": 13, "column": 50}}, {"id": 31, "type": "identifier", "text": "ele;\n\n", "parent": 27, "children": [], "start_point": {"row": 13, "column": 51}, "end_point": {"row": 13, "column": 57}}, {"id": 32, "type": "ERROR", "text": "d", "parent": null, "children": [33], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 33, "type": "ERROR", "text": "d", "parent": 32, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 34, "type": "declaration", "text": "\n\n@interface ne", "parent": null, "children": [35, 36, 38], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 17, "column": 10}}, {"id": 35, "type": "type_identifier", "text": "\n\n@", "parent": 34, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 4}}, {"id": 36, "type": "ERROR", "text": "t", "parent": 34, "children": [37], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 37, "type": "ERROR", "text": "t", "parent": 36, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 38, "type": "identifier", "text": "erface ne", "parent": 34, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 10}}, {"id": 39, "type": "labeled_statement", "text": "Shop : UITableViewController\n@property (nonatomic,copy) void (^myBlock)(NSArray*);\n@p", "parent": null, "children": [40, 41], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 18, "column": 53}}, {"id": 40, "type": "statement_identifier", "text": "Shop : ", "parent": 39, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 18}}, {"id": 41, "type": "declaration", "text": "ableViewController\n@property (nonatomic,copy) void (^myBlock)(NSArray*);\n@p", "parent": 39, "children": [42, 43, 45], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 18, "column": 53}}, {"id": 42, "type": "type_identifier", "text": "ableViewController\n@p", "parent": 41, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 42}}, {"id": 43, "type": "ERROR", "text": "o", "parent": 41, "children": [44], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 44, "type": "ERROR", "text": "o", "parent": 43, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 45, "type": "function_declarator", "text": "perty (nonatomic,copy) void (^myBlock)(NSArray*);\n@", "parent": 41, "children": [46, 59], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 52}}, {"id": 46, "type": "function_declarator", "text": "perty (nonatomic,copy) void (^myBlock)(NS", "parent": 45, "children": [47, 48, 53], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 42}}, {"id": 47, "type": "identifier", "text": "perty (n", "parent": 46, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 9}}, {"id": 48, "type": "parameter_list", "text": "natomic,copy) vo", "parent": 46, "children": [49, 51], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 26}}, {"id": 49, "type": "parameter_declaration", "text": "atomic,co", "parent": 48, "children": [50], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 20}}, {"id": 50, "type": "type_identifier", "text": "atomic,co", "parent": 49, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 20}}, {"id": 51, "type": "parameter_declaration", "text": "y) v", "parent": 48, "children": [52], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 25}}, {"id": 52, "type": "type_identifier", "text": "y) v", "parent": 51, "children": [], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 25}}, {"id": 53, "type": "call_expression", "text": "d (^myBlock)(NS", "parent": 46, "children": [54, 55], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 42}}, {"id": 54, "type": "identifier", "text": "d (^", "parent": 53, "children": [], "start_point": {"row": 18, "column": 27}, "end_point": {"row": 18, "column": 31}}, {"id": 55, "type": "argument_list", "text": "yBlock)(NS", "parent": 53, "children": [56, 58], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 42}}, {"id": 56, "type": "ERROR", "text": "B", "parent": 55, "children": [57], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 34}}, {"id": 57, "type": "^", "text": "B", "parent": 56, "children": [], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 34}}, {"id": 58, "type": "identifier", "text": "lock)(N", "parent": 55, "children": [], "start_point": {"row": 18, "column": 34}, "end_point": {"row": 18, "column": 41}}, {"id": 59, "type": "parameter_list", "text": "Array*);\n@", "parent": 45, "children": [60], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 52}}, {"id": 60, "type": "parameter_declaration", "text": "rray*);\n", "parent": 59, "children": [61, 62], "start_point": {"row": 18, "column": 43}, "end_point": {"row": 18, "column": 51}}, {"id": 61, "type": "type_identifier", "text": "rray*);", "parent": 60, "children": [], "start_point": {"row": 18, "column": 43}, "end_point": {"row": 18, "column": 50}}, {"id": 62, "type": "abstract_pointer_declarator", "text": "\n", "parent": 60, "children": [63], "start_point": {"row": 18, "column": 50}, "end_point": {"row": 18, "column": 51}}, {"id": 63, "type": "*", "text": "\n", "parent": 62, "children": [], "start_point": {"row": 18, "column": 50}, "end_point": {"row": 18, "column": 51}}, {"id": 64, "type": "ERROR", "text": "o", "parent": null, "children": [65], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 65, "type": "ERROR", "text": "o", "parent": 64, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 66, "type": "call_expression", "text": "perty(nonatomic,strong)NSA", "parent": null, "children": [67, 68], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 27}}, {"id": 67, "type": "identifier", "text": "perty(no", "parent": 66, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 9}}, {"id": 68, "type": "argument_list", "text": "natomic,strong)NSA", "parent": 66, "children": [69, 70], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 27}}, {"id": 69, "type": "identifier", "text": "atomic,st", "parent": 68, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 19}}, {"id": 70, "type": "identifier", "text": "ong)NS", "parent": 68, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 26}}, {"id": 71, "type": "declaration", "text": "rray *arrmodel;\n\n@", "parent": null, "children": [72, 73], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 45}}, {"id": 72, "type": "type_identifier", "text": "rray *a", "parent": 71, "children": [], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 34}}, {"id": 73, "type": "pointer_declarator", "text": "rmodel;\n\n", "parent": 71, "children": [74, 75], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 44}}, {"id": 74, "type": "*", "text": "r", "parent": 73, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 36}}, {"id": 75, "type": "identifier", "text": "model;\n\n", "parent": 73, "children": [], "start_point": {"row": 19, "column": 36}, "end_point": {"row": 19, "column": 44}}, {"id": 76, "type": "ERROR", "text": "operty(nonatomic,weak)id<newShopDelegate> delegate;\n@end", "parent": null, "children": [77, 78, 91], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 77, "type": "ERROR", "text": "o", "parent": 76, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 78, "type": "binary_expression", "text": "perty(nonatomic,weak)id<newShopDelegate> delegate;\n@", "parent": 76, "children": [79, 89, 90], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 53}}, {"id": 79, "type": "binary_expression", "text": "perty(nonatomic,weak)id<newShopDelegate> d", "parent": 78, "children": [80, 85, 87, 88], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 43}}, {"id": 80, "type": "call_expression", "text": "perty(nonatomic,weak)id<", "parent": 79, "children": [81, 82], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 25}}, {"id": 81, "type": "identifier", "text": "perty(no", "parent": 80, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 82, "type": "argument_list", "text": "natomic,weak)id<", "parent": 80, "children": [83, 84], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 25}}, {"id": 83, "type": "identifier", "text": "atomic,we", "parent": 82, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 19}}, {"id": 84, "type": "identifier", "text": "k)id", "parent": 82, "children": [], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 24}}, {"id": 85, "type": "ERROR", "text": "ne", "parent": 79, "children": [86], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 27}}, {"id": 86, "type": "identifier", "text": "ne", "parent": 85, "children": [], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 27}}, {"id": 87, "type": "<", "text": "w", "parent": 79, "children": [], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 28}}, {"id": 88, "type": "identifier", "text": "ShopDelegate> d", "parent": 79, "children": [], "start_point": {"row": 21, "column": 28}, "end_point": {"row": 21, "column": 43}}, {"id": 89, "type": ">", "text": "e", "parent": 78, "children": [], "start_point": {"row": 21, "column": 43}, "end_point": {"row": 21, "column": 44}}, {"id": 90, "type": "identifier", "text": "egate;\n@", "parent": 78, "children": [], "start_point": {"row": 21, "column": 45}, "end_point": {"row": 21, "column": 53}}, {"id": 91, "type": "ERROR", "text": "d", "parent": 76, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 92, "type": "identifier", "text": "\n", "parent": null, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 4}}]}, "node_categories": {"declarations": {"functions": [45, 46], "variables": [5, 34, 41, 49, 51, 60, 71], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [15, 17, 21, 27, 53, 66, 78, 79, 80], "assignments": [], "loops": [], "conditionals": [6, 7, 10, 11, 13, 20, 22, 25, 26, 28, 31, 35, 38, 40, 42, 47, 50, 52, 54, 58, 61, 67, 69, 70, 72, 75, 81, 83, 84, 86, 88, 90, 92], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 45, "universal_type": "function", "name": "", "text_snippet": "perty (nonatomic,copy) void (^myBlock)(NSArray*);\n@"}, {"node_id": 46, "universal_type": "function", "name": "", "text_snippet": "perty (nonatomic,copy) void (^myBlock)(NS"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// newShop.h\n// shouCangShop\n//\n// Created by Book on 16/10/14.\n// Copyright \u00a9 2016\u5e74 qau. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n@class newShop;\n\n@protocol newShopDelegate <NSObject>\n\n-(void)newShop:(newShop *)news andWith:(NSArray *) modele;\n\n@end\n\n@interface newShop : UITableViewController\n@property (nonatomic,copy) void (^myBlock)(NSArray*);\n@property(nonatomic,strong)NSArray *arrmodel;\n\n@property(nonatomic,weak)id<newShopDelegate> delegate;\n@end\n"}
80,968
c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* heredoc.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: tderwedu <<EMAIL>> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/01 15:24:00 by namenega #+# #+# */ /* Updated: 2021/10/13 10:04:30 by tderwedu ### ########.fr */ /* */ /* ************************************************************************** */ #include "launcher.h" extern pid_t g_sig; void hdoc_param_expansion(t_hdoc *hdoc) { char *ptr; char *param; param = NULL; ptr = env_check_name(++(hdoc->ptr_r)); if (ptr) { param = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r); hdoc->ptr_r = ptr - 1; } else if (*hdoc->ptr_r == '?') param = hdoc->msh->ret; else *hdoc->buff->ptr++ = *(--(hdoc->ptr_r)); if (!param) return ; if (ft_vec_check(hdoc->buff, param)) { print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE); return ; } while (*param) *hdoc->buff->ptr++ = *param++; } static void hdoc_if_dollar(t_hdoc *hdoc) { while (*hdoc->ptr_r) { if (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\'' || *(hdoc->ptr_r + 1) == '\"')) *hdoc->buff->ptr++ = *hdoc->ptr_r; else if (*hdoc->ptr_r == '$') hdoc_param_expansion(hdoc); else *hdoc->buff->ptr++ = *hdoc->ptr_r; hdoc->ptr_r++; } } static void read_heredoc(t_hdoc *hdoc) { hdoc->buff = ft_vec_new(DFLT_VEC_SIZE); while (1) { hdoc->buff->ptr = hdoc->buff->str; hdoc->line = readline("heredoc> "); if (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof)) break ; if (ft_vec_check(hdoc->buff, hdoc->line)) { print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE); return ; } hdoc->ptr_r = hdoc->line; hdoc_if_dollar(hdoc); *hdoc->buff->ptr = '\0'; write(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str)); write(hdoc->pipefd[1], "\n", 1); } free(hdoc->line); ft_vec_free(hdoc->buff); } static void pid_is_null(t_hdoc *hdoc) { g_sig = 1; signal(SIGINT, SIG_DFL); read_heredoc(hdoc); close(hdoc->pipefd[1]); close(hdoc->pipefd[0]); exit(0); } int heredoc(t_msh *msh, t_ast *ast) { pid_t pid; t_hdoc hdoc; int ret; hdoc.eof = ast->right->lex; hdoc.msh = msh; if (pipe(hdoc.pipefd) == -1) return (print_error(MSG_PIPE, strerror(errno), "\n", EXIT_FAILURE)); pid = fork(); if (pid < 0) return (print_error(MSG_FORK, strerror(errno), "\n", EXIT_FAILURE)); if (pid == 0) pid_is_null(&hdoc); signal(SIGINT, SIG_IGN); waitpid(pid, &ret, 0); signal(SIGINT, handle_sigint); if (WIFSIGNALED(ret)) printf("\n"); close(hdoc.pipefd[1]); if (ret) { close(hdoc.pipefd[0]); return (-1); } return (hdoc.pipefd[0]); }
27.07
111
(translation_unit) "/* ************************************************************************** */\n/* */\n/* ::: :::::::: */\n/* heredoc.c :+: :+: :+: */\n/* +:+ +:+ +:+ */\n/* By: tderwedu <<EMAIL>> +#+ +:+ +#+ */\n/* +#+#+#+#+#+ +#+ */\n/* Created: 2021/10/01 15:24:00 by namenega #+# #+# */\n/* Updated: 2021/10/13 10:04:30 by tderwedu ### ########.fr */\n/* */\n/* ************************************************************************** */\n\n#include "launcher.h"\n\nextern pid_t g_sig;\n\nvoid hdoc_param_expansion(t_hdoc *hdoc)\n{\n char *ptr;\n char *param;\n\n param = NULL;\n ptr = env_check_name(++(hdoc->ptr_r));\n if (ptr)\n {\n param = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r);\n hdoc->ptr_r = ptr - 1;\n }\n else if (*hdoc->ptr_r == '?')\n param = hdoc->msh->ret;\n else\n *hdoc->buff->ptr++ = *(--(hdoc->ptr_r));\n if (!param)\n return ;\n if (ft_vec_check(hdoc->buff, param))\n {\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }\n while (*param)\n *hdoc->buff->ptr++ = *param++;\n}\n\nstatic void hdoc_if_dollar(t_hdoc *hdoc)\n{\n while (*hdoc->ptr_r)\n {\n if (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\''\n || *(hdoc->ptr_r + 1) == '\"'))\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n else if (*hdoc->ptr_r == '$')\n hdoc_param_expansion(hdoc);\n else\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n hdoc->ptr_r++;\n }\n}\n\nstatic void read_heredoc(t_hdoc *hdoc)\n{\n hdoc->buff = ft_vec_new(DFLT_VEC_SIZE);\n while (1)\n {\n hdoc->buff->ptr = hdoc->buff->str;\n hdoc->line = readline("heredoc> ");\n if (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))\n break ;\n if (ft_vec_check(hdoc->buff, hdoc->line))\n {\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }\n hdoc->ptr_r = hdoc->line;\n hdoc_if_dollar(hdoc);\n *hdoc->buff->ptr = '\0';\n write(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str));\n write(hdoc->pipefd[1], "\n", 1);\n }\n free(hdoc->line);\n ft_vec_free(hdoc->buff);\n}\n\nstatic void pid_is_null(t_hdoc *hdoc)\n{\n g_sig = 1;\n signal(SIGINT, SIG_DFL);\n read_heredoc(hdoc);\n close(hdoc->pipefd[1]);\n close(hdoc->pipefd[0]);\n exit(0);\n}\n\nint heredoc(t_msh *msh, t_ast *ast)\n{\n pid_t pid;\n t_hdoc hdoc;\n int ret;\n\n hdoc.eof = ast->right->lex;\n hdoc.msh = msh;\n if (pipe(hdoc.pipefd) == -1)\n return (print_error(MSG_PIPE, strerror(errno), "\n", EXIT_FAILURE));\n pid = fork();\n if (pid < 0)\n return (print_error(MSG_FORK, strerror(errno), "\n", EXIT_FAILURE));\n if (pid == 0)\n pid_is_null(&hdoc);\n signal(SIGINT, SIG_IGN);\n waitpid(pid, &ret, 0);\n signal(SIGINT, handle_sigint);\n if (WIFSIGNALED(ret))\n printf("\n");\n close(hdoc.pipefd[1]);\n if (ret)\n {\n close(hdoc.pipefd[0]);\n return (-1);\n }\n return (hdoc.pipefd[0]);\n}\n" (comment) "/* ************************************************************************** */" (comment) "/* */" (comment) "/* ::: :::::::: */" (comment) "/* heredoc.c :+: :+: :+: */" (comment) "/* +:+ +:+ +:+ */" (comment) "/* By: tderwedu <<EMAIL>> +#+ +:+ +#+ */" (comment) "/* +#+#+#+#+#+ +#+ */" (comment) "/* Created: 2021/10/01 15:24:00 by namenega #+# #+# */" (comment) "/* Updated: 2021/10/13 10:04:30 by tderwedu ### ########.fr */" (comment) "/* */" (comment) "/* ************************************************************************** */" (preproc_include) "#include "launcher.h"\n" (#include) "#include" (string_literal) ""launcher.h"" (") """ (string_content) "launcher.h" (") """ (declaration) "extern pid_t g_sig;" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "pid_t" (identifier) "g_sig" (;) ";" (function_definition) "void hdoc_param_expansion(t_hdoc *hdoc)\n{\n char *ptr;\n char *param;\n\n param = NULL;\n ptr = env_check_name(++(hdoc->ptr_r));\n if (ptr)\n {\n param = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r);\n hdoc->ptr_r = ptr - 1;\n }\n else if (*hdoc->ptr_r == '?')\n param = hdoc->msh->ret;\n else\n *hdoc->buff->ptr++ = *(--(hdoc->ptr_r));\n if (!param)\n return ;\n if (ft_vec_check(hdoc->buff, param))\n {\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }\n while (*param)\n *hdoc->buff->ptr++ = *param++;\n}" (primitive_type) "void" (function_declarator) "hdoc_param_expansion(t_hdoc *hdoc)" (identifier) "hdoc_param_expansion" (parameter_list) "(t_hdoc *hdoc)" (() "(" (parameter_declaration) "t_hdoc *hdoc" (type_identifier) "t_hdoc" (pointer_declarator) "*hdoc" (*) "*" (identifier) "hdoc" ()) ")" (compound_statement) "{\n char *ptr;\n char *param;\n\n param = NULL;\n ptr = env_check_name(++(hdoc->ptr_r));\n if (ptr)\n {\n param = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r);\n hdoc->ptr_r = ptr - 1;\n }\n else if (*hdoc->ptr_r == '?')\n param = hdoc->msh->ret;\n else\n *hdoc->buff->ptr++ = *(--(hdoc->ptr_r));\n if (!param)\n return ;\n if (ft_vec_check(hdoc->buff, param))\n {\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }\n while (*param)\n *hdoc->buff->ptr++ = *param++;\n}" ({) "{" (declaration) "char *ptr;" (primitive_type) "char" (pointer_declarator) "*ptr" (*) "*" (identifier) "ptr" (;) ";" (declaration) "char *param;" (primitive_type) "char" (pointer_declarator) "*param" (*) "*" (identifier) "param" (;) ";" (expression_statement) "param = NULL;" (assignment_expression) "param = NULL" (identifier) "param" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "ptr = env_check_name(++(hdoc->ptr_r));" (assignment_expression) "ptr = env_check_name(++(hdoc->ptr_r))" (identifier) "ptr" (=) "=" (call_expression) "env_check_name(++(hdoc->ptr_r))" (identifier) "env_check_name" (argument_list) "(++(hdoc->ptr_r))" (() "(" (update_expression) "++(hdoc->ptr_r)" (++) "++" (parenthesized_expression) "(hdoc->ptr_r)" (() "(" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" ()) ")" ()) ")" (;) ";" (if_statement) "if (ptr)\n {\n param = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r);\n hdoc->ptr_r = ptr - 1;\n }\n else if (*hdoc->ptr_r == '?')\n param = hdoc->msh->ret;\n else\n *hdoc->buff->ptr++ = *(--(hdoc->ptr_r));" (if) "if" (parenthesized_expression) "(ptr)" (() "(" (identifier) "ptr" ()) ")" (compound_statement) "{\n param = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r);\n hdoc->ptr_r = ptr - 1;\n }" ({) "{" (expression_statement) "param = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r);" (assignment_expression) "param = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r)" (identifier) "param" (=) "=" (call_expression) "msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r)" (identifier) "msh_getenv" (argument_list) "(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r)" (() "(" (field_expression) "hdoc->msh->env" (field_expression) "hdoc->msh" (identifier) "hdoc" (->) "->" (field_identifier) "msh" (->) "->" (field_identifier) "env" (,) "," (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (,) "," (binary_expression) "ptr - hdoc->ptr_r" (identifier) "ptr" (-) "-" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" ()) ")" (;) ";" (expression_statement) "hdoc->ptr_r = ptr - 1;" (assignment_expression) "hdoc->ptr_r = ptr - 1" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (=) "=" (binary_expression) "ptr - 1" (identifier) "ptr" (-) "-" (number_literal) "1" (;) ";" (}) "}" (else_clause) "else if (*hdoc->ptr_r == '?')\n param = hdoc->msh->ret;\n else\n *hdoc->buff->ptr++ = *(--(hdoc->ptr_r));" (else) "else" (if_statement) "if (*hdoc->ptr_r == '?')\n param = hdoc->msh->ret;\n else\n *hdoc->buff->ptr++ = *(--(hdoc->ptr_r));" (if) "if" (parenthesized_expression) "(*hdoc->ptr_r == '?')" (() "(" (binary_expression) "*hdoc->ptr_r == '?'" (pointer_expression) "*hdoc->ptr_r" (*) "*" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (==) "==" (char_literal) "'?'" (') "'" (character) "?" (') "'" ()) ")" (expression_statement) "param = hdoc->msh->ret;" (assignment_expression) "param = hdoc->msh->ret" (identifier) "param" (=) "=" (field_expression) "hdoc->msh->ret" (field_expression) "hdoc->msh" (identifier) "hdoc" (->) "->" (field_identifier) "msh" (->) "->" (field_identifier) "ret" (;) ";" (else_clause) "else\n *hdoc->buff->ptr++ = *(--(hdoc->ptr_r));" (else) "else" (expression_statement) "*hdoc->buff->ptr++ = *(--(hdoc->ptr_r));" (assignment_expression) "*hdoc->buff->ptr++ = *(--(hdoc->ptr_r))" (pointer_expression) "*hdoc->buff->ptr++" (*) "*" (update_expression) "hdoc->buff->ptr++" (field_expression) "hdoc->buff->ptr" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (->) "->" (field_identifier) "ptr" (++) "++" (=) "=" (pointer_expression) "*(--(hdoc->ptr_r))" (*) "*" (parenthesized_expression) "(--(hdoc->ptr_r))" (() "(" (update_expression) "--(hdoc->ptr_r)" (--) "--" (parenthesized_expression) "(hdoc->ptr_r)" (() "(" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" ()) ")" ()) ")" (;) ";" (if_statement) "if (!param)\n return ;" (if) "if" (parenthesized_expression) "(!param)" (() "(" (unary_expression) "!param" (!) "!" (identifier) "param" ()) ")" (return_statement) "return ;" (return) "return" (;) ";" (if_statement) "if (ft_vec_check(hdoc->buff, param))\n {\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }" (if) "if" (parenthesized_expression) "(ft_vec_check(hdoc->buff, param))" (() "(" (call_expression) "ft_vec_check(hdoc->buff, param)" (identifier) "ft_vec_check" (argument_list) "(hdoc->buff, param)" (() "(" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (,) "," (identifier) "param" ()) ")" ()) ")" (compound_statement) "{\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }" ({) "{" (expression_statement) "print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);" (call_expression) "print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE)" (identifier) "print_error" (argument_list) "(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE)" (() "(" (identifier) "MSG_MSH" (,) "," (identifier) "ERR_MALLOC" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (identifier) "EXIT_FAILURE" ()) ")" (;) ";" (return_statement) "return ;" (return) "return" (;) ";" (}) "}" (while_statement) "while (*param)\n *hdoc->buff->ptr++ = *param++;" (while) "while" (parenthesized_expression) "(*param)" (() "(" (pointer_expression) "*param" (*) "*" (identifier) "param" ()) ")" (expression_statement) "*hdoc->buff->ptr++ = *param++;" (assignment_expression) "*hdoc->buff->ptr++ = *param++" (pointer_expression) "*hdoc->buff->ptr++" (*) "*" (update_expression) "hdoc->buff->ptr++" (field_expression) "hdoc->buff->ptr" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (->) "->" (field_identifier) "ptr" (++) "++" (=) "=" (pointer_expression) "*param++" (*) "*" (update_expression) "param++" (identifier) "param" (++) "++" (;) ";" (}) "}" (function_definition) "static void hdoc_if_dollar(t_hdoc *hdoc)\n{\n while (*hdoc->ptr_r)\n {\n if (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\''\n || *(hdoc->ptr_r + 1) == '\"'))\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n else if (*hdoc->ptr_r == '$')\n hdoc_param_expansion(hdoc);\n else\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n hdoc->ptr_r++;\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "hdoc_if_dollar(t_hdoc *hdoc)" (identifier) "hdoc_if_dollar" (parameter_list) "(t_hdoc *hdoc)" (() "(" (parameter_declaration) "t_hdoc *hdoc" (type_identifier) "t_hdoc" (pointer_declarator) "*hdoc" (*) "*" (identifier) "hdoc" ()) ")" (compound_statement) "{\n while (*hdoc->ptr_r)\n {\n if (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\''\n || *(hdoc->ptr_r + 1) == '\"'))\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n else if (*hdoc->ptr_r == '$')\n hdoc_param_expansion(hdoc);\n else\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n hdoc->ptr_r++;\n }\n}" ({) "{" (while_statement) "while (*hdoc->ptr_r)\n {\n if (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\''\n || *(hdoc->ptr_r + 1) == '\"'))\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n else if (*hdoc->ptr_r == '$')\n hdoc_param_expansion(hdoc);\n else\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n hdoc->ptr_r++;\n }" (while) "while" (parenthesized_expression) "(*hdoc->ptr_r)" (() "(" (pointer_expression) "*hdoc->ptr_r" (*) "*" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" ()) ")" (compound_statement) "{\n if (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\''\n || *(hdoc->ptr_r + 1) == '\"'))\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n else if (*hdoc->ptr_r == '$')\n hdoc_param_expansion(hdoc);\n else\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n hdoc->ptr_r++;\n }" ({) "{" (if_statement) "if (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\''\n || *(hdoc->ptr_r + 1) == '\"'))\n *hdoc->buff->ptr++ = *hdoc->ptr_r;\n else if (*hdoc->ptr_r == '$')\n hdoc_param_expansion(hdoc);\n else\n *hdoc->buff->ptr++ = *hdoc->ptr_r;" (if) "if" (parenthesized_expression) "(*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\''\n || *(hdoc->ptr_r + 1) == '\"'))" (() "(" (binary_expression) "*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\''\n || *(hdoc->ptr_r + 1) == '\"')" (binary_expression) "*hdoc->ptr_r == '$'" (pointer_expression) "*hdoc->ptr_r" (*) "*" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (==) "==" (char_literal) "'$'" (') "'" (character) "$" (') "'" (&&) "&&" (parenthesized_expression) "(*(hdoc->ptr_r + 1) == '\''\n || *(hdoc->ptr_r + 1) == '\"')" (() "(" (binary_expression) "*(hdoc->ptr_r + 1) == '\''\n || *(hdoc->ptr_r + 1) == '\"'" (binary_expression) "*(hdoc->ptr_r + 1) == '\''" (pointer_expression) "*(hdoc->ptr_r + 1)" (*) "*" (parenthesized_expression) "(hdoc->ptr_r + 1)" (() "(" (binary_expression) "hdoc->ptr_r + 1" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (+) "+" (number_literal) "1" ()) ")" (==) "==" (char_literal) "'\''" (') "'" (escape_sequence) "\'" (') "'" (||) "||" (binary_expression) "*(hdoc->ptr_r + 1) == '\"'" (pointer_expression) "*(hdoc->ptr_r + 1)" (*) "*" (parenthesized_expression) "(hdoc->ptr_r + 1)" (() "(" (binary_expression) "hdoc->ptr_r + 1" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (+) "+" (number_literal) "1" ()) ")" (==) "==" (char_literal) "'\"'" (') "'" (escape_sequence) "\"" (') "'" ()) ")" ()) ")" (expression_statement) "*hdoc->buff->ptr++ = *hdoc->ptr_r;" (assignment_expression) "*hdoc->buff->ptr++ = *hdoc->ptr_r" (pointer_expression) "*hdoc->buff->ptr++" (*) "*" (update_expression) "hdoc->buff->ptr++" (field_expression) "hdoc->buff->ptr" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (->) "->" (field_identifier) "ptr" (++) "++" (=) "=" (pointer_expression) "*hdoc->ptr_r" (*) "*" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (;) ";" (else_clause) "else if (*hdoc->ptr_r == '$')\n hdoc_param_expansion(hdoc);\n else\n *hdoc->buff->ptr++ = *hdoc->ptr_r;" (else) "else" (if_statement) "if (*hdoc->ptr_r == '$')\n hdoc_param_expansion(hdoc);\n else\n *hdoc->buff->ptr++ = *hdoc->ptr_r;" (if) "if" (parenthesized_expression) "(*hdoc->ptr_r == '$')" (() "(" (binary_expression) "*hdoc->ptr_r == '$'" (pointer_expression) "*hdoc->ptr_r" (*) "*" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (==) "==" (char_literal) "'$'" (') "'" (character) "$" (') "'" ()) ")" (expression_statement) "hdoc_param_expansion(hdoc);" (call_expression) "hdoc_param_expansion(hdoc)" (identifier) "hdoc_param_expansion" (argument_list) "(hdoc)" (() "(" (identifier) "hdoc" ()) ")" (;) ";" (else_clause) "else\n *hdoc->buff->ptr++ = *hdoc->ptr_r;" (else) "else" (expression_statement) "*hdoc->buff->ptr++ = *hdoc->ptr_r;" (assignment_expression) "*hdoc->buff->ptr++ = *hdoc->ptr_r" (pointer_expression) "*hdoc->buff->ptr++" (*) "*" (update_expression) "hdoc->buff->ptr++" (field_expression) "hdoc->buff->ptr" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (->) "->" (field_identifier) "ptr" (++) "++" (=) "=" (pointer_expression) "*hdoc->ptr_r" (*) "*" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (;) ";" (expression_statement) "hdoc->ptr_r++;" (update_expression) "hdoc->ptr_r++" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (++) "++" (;) ";" (}) "}" (}) "}" (function_definition) "static void read_heredoc(t_hdoc *hdoc)\n{\n hdoc->buff = ft_vec_new(DFLT_VEC_SIZE);\n while (1)\n {\n hdoc->buff->ptr = hdoc->buff->str;\n hdoc->line = readline("heredoc> ");\n if (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))\n break ;\n if (ft_vec_check(hdoc->buff, hdoc->line))\n {\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }\n hdoc->ptr_r = hdoc->line;\n hdoc_if_dollar(hdoc);\n *hdoc->buff->ptr = '\0';\n write(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str));\n write(hdoc->pipefd[1], "\n", 1);\n }\n free(hdoc->line);\n ft_vec_free(hdoc->buff);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "read_heredoc(t_hdoc *hdoc)" (identifier) "read_heredoc" (parameter_list) "(t_hdoc *hdoc)" (() "(" (parameter_declaration) "t_hdoc *hdoc" (type_identifier) "t_hdoc" (pointer_declarator) "*hdoc" (*) "*" (identifier) "hdoc" ()) ")" (compound_statement) "{\n hdoc->buff = ft_vec_new(DFLT_VEC_SIZE);\n while (1)\n {\n hdoc->buff->ptr = hdoc->buff->str;\n hdoc->line = readline("heredoc> ");\n if (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))\n break ;\n if (ft_vec_check(hdoc->buff, hdoc->line))\n {\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }\n hdoc->ptr_r = hdoc->line;\n hdoc_if_dollar(hdoc);\n *hdoc->buff->ptr = '\0';\n write(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str));\n write(hdoc->pipefd[1], "\n", 1);\n }\n free(hdoc->line);\n ft_vec_free(hdoc->buff);\n}" ({) "{" (expression_statement) "hdoc->buff = ft_vec_new(DFLT_VEC_SIZE);" (assignment_expression) "hdoc->buff = ft_vec_new(DFLT_VEC_SIZE)" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (=) "=" (call_expression) "ft_vec_new(DFLT_VEC_SIZE)" (identifier) "ft_vec_new" (argument_list) "(DFLT_VEC_SIZE)" (() "(" (identifier) "DFLT_VEC_SIZE" ()) ")" (;) ";" (while_statement) "while (1)\n {\n hdoc->buff->ptr = hdoc->buff->str;\n hdoc->line = readline("heredoc> ");\n if (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))\n break ;\n if (ft_vec_check(hdoc->buff, hdoc->line))\n {\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }\n hdoc->ptr_r = hdoc->line;\n hdoc_if_dollar(hdoc);\n *hdoc->buff->ptr = '\0';\n write(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str));\n write(hdoc->pipefd[1], "\n", 1);\n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{\n hdoc->buff->ptr = hdoc->buff->str;\n hdoc->line = readline("heredoc> ");\n if (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))\n break ;\n if (ft_vec_check(hdoc->buff, hdoc->line))\n {\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }\n hdoc->ptr_r = hdoc->line;\n hdoc_if_dollar(hdoc);\n *hdoc->buff->ptr = '\0';\n write(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str));\n write(hdoc->pipefd[1], "\n", 1);\n }" ({) "{" (expression_statement) "hdoc->buff->ptr = hdoc->buff->str;" (assignment_expression) "hdoc->buff->ptr = hdoc->buff->str" (field_expression) "hdoc->buff->ptr" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (->) "->" (field_identifier) "ptr" (=) "=" (field_expression) "hdoc->buff->str" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (->) "->" (field_identifier) "str" (;) ";" (expression_statement) "hdoc->line = readline("heredoc> ");" (assignment_expression) "hdoc->line = readline("heredoc> ")" (field_expression) "hdoc->line" (identifier) "hdoc" (->) "->" (field_identifier) "line" (=) "=" (call_expression) "readline("heredoc> ")" (identifier) "readline" (argument_list) "("heredoc> ")" (() "(" (string_literal) ""heredoc> "" (") """ (string_content) "heredoc> " (") """ ()) ")" (;) ";" (if_statement) "if (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))\n break ;" (if) "if" (parenthesized_expression) "(!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))" (() "(" (binary_expression) "!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof)" (unary_expression) "!hdoc->line" (!) "!" (field_expression) "hdoc->line" (identifier) "hdoc" (->) "->" (field_identifier) "line" (||) "||" (unary_expression) "!ft_strcmp(hdoc->line, hdoc->eof)" (!) "!" (call_expression) "ft_strcmp(hdoc->line, hdoc->eof)" (identifier) "ft_strcmp" (argument_list) "(hdoc->line, hdoc->eof)" (() "(" (field_expression) "hdoc->line" (identifier) "hdoc" (->) "->" (field_identifier) "line" (,) "," (field_expression) "hdoc->eof" (identifier) "hdoc" (->) "->" (field_identifier) "eof" ()) ")" ()) ")" (break_statement) "break ;" (break) "break" (;) ";" (if_statement) "if (ft_vec_check(hdoc->buff, hdoc->line))\n {\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }" (if) "if" (parenthesized_expression) "(ft_vec_check(hdoc->buff, hdoc->line))" (() "(" (call_expression) "ft_vec_check(hdoc->buff, hdoc->line)" (identifier) "ft_vec_check" (argument_list) "(hdoc->buff, hdoc->line)" (() "(" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (,) "," (field_expression) "hdoc->line" (identifier) "hdoc" (->) "->" (field_identifier) "line" ()) ")" ()) ")" (compound_statement) "{\n print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n return ;\n }" ({) "{" (expression_statement) "print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);" (call_expression) "print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE)" (identifier) "print_error" (argument_list) "(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE)" (() "(" (identifier) "MSG_MSH" (,) "," (identifier) "ERR_MALLOC" (,) "," (null) "NULL" (NULL) "NULL" (,) "," (identifier) "EXIT_FAILURE" ()) ")" (;) ";" (return_statement) "return ;" (return) "return" (;) ";" (}) "}" (expression_statement) "hdoc->ptr_r = hdoc->line;" (assignment_expression) "hdoc->ptr_r = hdoc->line" (field_expression) "hdoc->ptr_r" (identifier) "hdoc" (->) "->" (field_identifier) "ptr_r" (=) "=" (field_expression) "hdoc->line" (identifier) "hdoc" (->) "->" (field_identifier) "line" (;) ";" (expression_statement) "hdoc_if_dollar(hdoc);" (call_expression) "hdoc_if_dollar(hdoc)" (identifier) "hdoc_if_dollar" (argument_list) "(hdoc)" (() "(" (identifier) "hdoc" ()) ")" (;) ";" (expression_statement) "*hdoc->buff->ptr = '\0';" (assignment_expression) "*hdoc->buff->ptr = '\0'" (pointer_expression) "*hdoc->buff->ptr" (*) "*" (field_expression) "hdoc->buff->ptr" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (->) "->" (field_identifier) "ptr" (=) "=" (char_literal) "'\0'" (') "'" (escape_sequence) "\0" (') "'" (;) ";" (expression_statement) "write(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str));" (call_expression) "write(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str))" (identifier) "write" (argument_list) "(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str))" (() "(" (subscript_expression) "hdoc->pipefd[1]" (field_expression) "hdoc->pipefd" (identifier) "hdoc" (->) "->" (field_identifier) "pipefd" ([) "[" (number_literal) "1" (]) "]" (,) "," (field_expression) "hdoc->buff->str" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (->) "->" (field_identifier) "str" (,) "," (call_expression) "ft_strlen(hdoc->buff->str)" (identifier) "ft_strlen" (argument_list) "(hdoc->buff->str)" (() "(" (field_expression) "hdoc->buff->str" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" (->) "->" (field_identifier) "str" ()) ")" ()) ")" (;) ";" (expression_statement) "write(hdoc->pipefd[1], "\n", 1);" (call_expression) "write(hdoc->pipefd[1], "\n", 1)" (identifier) "write" (argument_list) "(hdoc->pipefd[1], "\n", 1)" (() "(" (subscript_expression) "hdoc->pipefd[1]" (field_expression) "hdoc->pipefd" (identifier) "hdoc" (->) "->" (field_identifier) "pipefd" ([) "[" (number_literal) "1" (]) "]" (,) "," (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ (,) "," (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "free(hdoc->line);" (call_expression) "free(hdoc->line)" (identifier) "free" (argument_list) "(hdoc->line)" (() "(" (field_expression) "hdoc->line" (identifier) "hdoc" (->) "->" (field_identifier) "line" ()) ")" (;) ";" (expression_statement) "ft_vec_free(hdoc->buff);" (call_expression) "ft_vec_free(hdoc->buff)" (identifier) "ft_vec_free" (argument_list) "(hdoc->buff)" (() "(" (field_expression) "hdoc->buff" (identifier) "hdoc" (->) "->" (field_identifier) "buff" ()) ")" (;) ";" (}) "}" (function_definition) "static void pid_is_null(t_hdoc *hdoc)\n{\n g_sig = 1;\n signal(SIGINT, SIG_DFL);\n read_heredoc(hdoc);\n close(hdoc->pipefd[1]);\n close(hdoc->pipefd[0]);\n exit(0);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "pid_is_null(t_hdoc *hdoc)" (identifier) "pid_is_null" (parameter_list) "(t_hdoc *hdoc)" (() "(" (parameter_declaration) "t_hdoc *hdoc" (type_identifier) "t_hdoc" (pointer_declarator) "*hdoc" (*) "*" (identifier) "hdoc" ()) ")" (compound_statement) "{\n g_sig = 1;\n signal(SIGINT, SIG_DFL);\n read_heredoc(hdoc);\n close(hdoc->pipefd[1]);\n close(hdoc->pipefd[0]);\n exit(0);\n}" ({) "{" (expression_statement) "g_sig = 1;" (assignment_expression) "g_sig = 1" (identifier) "g_sig" (=) "=" (number_literal) "1" (;) ";" (expression_statement) "signal(SIGINT, SIG_DFL);" (call_expression) "signal(SIGINT, SIG_DFL)" (identifier) "signal" (argument_list) "(SIGINT, SIG_DFL)" (() "(" (identifier) "SIGINT" (,) "," (identifier) "SIG_DFL" ()) ")" (;) ";" (expression_statement) "read_heredoc(hdoc);" (call_expression) "read_heredoc(hdoc)" (identifier) "read_heredoc" (argument_list) "(hdoc)" (() "(" (identifier) "hdoc" ()) ")" (;) ";" (expression_statement) "close(hdoc->pipefd[1]);" (call_expression) "close(hdoc->pipefd[1])" (identifier) "close" (argument_list) "(hdoc->pipefd[1])" (() "(" (subscript_expression) "hdoc->pipefd[1]" (field_expression) "hdoc->pipefd" (identifier) "hdoc" (->) "->" (field_identifier) "pipefd" ([) "[" (number_literal) "1" (]) "]" ()) ")" (;) ";" (expression_statement) "close(hdoc->pipefd[0]);" (call_expression) "close(hdoc->pipefd[0])" (identifier) "close" (argument_list) "(hdoc->pipefd[0])" (() "(" (subscript_expression) "hdoc->pipefd[0]" (field_expression) "hdoc->pipefd" (identifier) "hdoc" (->) "->" (field_identifier) "pipefd" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (expression_statement) "exit(0);" (call_expression) "exit(0)" (identifier) "exit" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}" (function_definition) "int heredoc(t_msh *msh, t_ast *ast)\n{\n pid_t pid;\n t_hdoc hdoc;\n int ret;\n\n hdoc.eof = ast->right->lex;\n hdoc.msh = msh;\n if (pipe(hdoc.pipefd) == -1)\n return (print_error(MSG_PIPE, strerror(errno), "\n", EXIT_FAILURE));\n pid = fork();\n if (pid < 0)\n return (print_error(MSG_FORK, strerror(errno), "\n", EXIT_FAILURE));\n if (pid == 0)\n pid_is_null(&hdoc);\n signal(SIGINT, SIG_IGN);\n waitpid(pid, &ret, 0);\n signal(SIGINT, handle_sigint);\n if (WIFSIGNALED(ret))\n printf("\n");\n close(hdoc.pipefd[1]);\n if (ret)\n {\n close(hdoc.pipefd[0]);\n return (-1);\n }\n return (hdoc.pipefd[0]);\n}" (primitive_type) "int" (function_declarator) "heredoc(t_msh *msh, t_ast *ast)" (identifier) "heredoc" (parameter_list) "(t_msh *msh, t_ast *ast)" (() "(" (parameter_declaration) "t_msh *msh" (type_identifier) "t_msh" (pointer_declarator) "*msh" (*) "*" (identifier) "msh" (,) "," (parameter_declaration) "t_ast *ast" (type_identifier) "t_ast" (pointer_declarator) "*ast" (*) "*" (identifier) "ast" ()) ")" (compound_statement) "{\n pid_t pid;\n t_hdoc hdoc;\n int ret;\n\n hdoc.eof = ast->right->lex;\n hdoc.msh = msh;\n if (pipe(hdoc.pipefd) == -1)\n return (print_error(MSG_PIPE, strerror(errno), "\n", EXIT_FAILURE));\n pid = fork();\n if (pid < 0)\n return (print_error(MSG_FORK, strerror(errno), "\n", EXIT_FAILURE));\n if (pid == 0)\n pid_is_null(&hdoc);\n signal(SIGINT, SIG_IGN);\n waitpid(pid, &ret, 0);\n signal(SIGINT, handle_sigint);\n if (WIFSIGNALED(ret))\n printf("\n");\n close(hdoc.pipefd[1]);\n if (ret)\n {\n close(hdoc.pipefd[0]);\n return (-1);\n }\n return (hdoc.pipefd[0]);\n}" ({) "{" (declaration) "pid_t pid;" (type_identifier) "pid_t" (identifier) "pid" (;) ";" (declaration) "t_hdoc hdoc;" (type_identifier) "t_hdoc" (identifier) "hdoc" (;) ";" (declaration) "int ret;" (primitive_type) "int" (identifier) "ret" (;) ";" (expression_statement) "hdoc.eof = ast->right->lex;" (assignment_expression) "hdoc.eof = ast->right->lex" (field_expression) "hdoc.eof" (identifier) "hdoc" (.) "." (field_identifier) "eof" (=) "=" (field_expression) "ast->right->lex" (field_expression) "ast->right" (identifier) "ast" (->) "->" (field_identifier) "right" (->) "->" (field_identifier) "lex" (;) ";" (expression_statement) "hdoc.msh = msh;" (assignment_expression) "hdoc.msh = msh" (field_expression) "hdoc.msh" (identifier) "hdoc" (.) "." (field_identifier) "msh" (=) "=" (identifier) "msh" (;) ";" (if_statement) "if (pipe(hdoc.pipefd) == -1)\n return (print_error(MSG_PIPE, strerror(errno), "\n", EXIT_FAILURE));" (if) "if" (parenthesized_expression) "(pipe(hdoc.pipefd) == -1)" (() "(" (binary_expression) "pipe(hdoc.pipefd) == -1" (call_expression) "pipe(hdoc.pipefd)" (identifier) "pipe" (argument_list) "(hdoc.pipefd)" (() "(" (field_expression) "hdoc.pipefd" (identifier) "hdoc" (.) "." (field_identifier) "pipefd" ()) ")" (==) "==" (number_literal) "-1" ()) ")" (return_statement) "return (print_error(MSG_PIPE, strerror(errno), "\n", EXIT_FAILURE));" (return) "return" (parenthesized_expression) "(print_error(MSG_PIPE, strerror(errno), "\n", EXIT_FAILURE))" (() "(" (call_expression) "print_error(MSG_PIPE, strerror(errno), "\n", EXIT_FAILURE)" (identifier) "print_error" (argument_list) "(MSG_PIPE, strerror(errno), "\n", EXIT_FAILURE)" (() "(" (identifier) "MSG_PIPE" (,) "," (call_expression) "strerror(errno)" (identifier) "strerror" (argument_list) "(errno)" (() "(" (identifier) "errno" ()) ")" (,) "," (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ (,) "," (identifier) "EXIT_FAILURE" ()) ")" ()) ")" (;) ";" (expression_statement) "pid = fork();" (assignment_expression) "pid = fork()" (identifier) "pid" (=) "=" (call_expression) "fork()" (identifier) "fork" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (pid < 0)\n return (print_error(MSG_FORK, strerror(errno), "\n", EXIT_FAILURE));" (if) "if" (parenthesized_expression) "(pid < 0)" (() "(" (binary_expression) "pid < 0" (identifier) "pid" (<) "<" (number_literal) "0" ()) ")" (return_statement) "return (print_error(MSG_FORK, strerror(errno), "\n", EXIT_FAILURE));" (return) "return" (parenthesized_expression) "(print_error(MSG_FORK, strerror(errno), "\n", EXIT_FAILURE))" (() "(" (call_expression) "print_error(MSG_FORK, strerror(errno), "\n", EXIT_FAILURE)" (identifier) "print_error" (argument_list) "(MSG_FORK, strerror(errno), "\n", EXIT_FAILURE)" (() "(" (identifier) "MSG_FORK" (,) "," (call_expression) "strerror(errno)" (identifier) "strerror" (argument_list) "(errno)" (() "(" (identifier) "errno" ()) ")" (,) "," (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ (,) "," (identifier) "EXIT_FAILURE" ()) ")" ()) ")" (;) ";" (if_statement) "if (pid == 0)\n pid_is_null(&hdoc);" (if) "if" (parenthesized_expression) "(pid == 0)" (() "(" (binary_expression) "pid == 0" (identifier) "pid" (==) "==" (number_literal) "0" ()) ")" (expression_statement) "pid_is_null(&hdoc);" (call_expression) "pid_is_null(&hdoc)" (identifier) "pid_is_null" (argument_list) "(&hdoc)" (() "(" (pointer_expression) "&hdoc" (&) "&" (identifier) "hdoc" ()) ")" (;) ";" (expression_statement) "signal(SIGINT, SIG_IGN);" (call_expression) "signal(SIGINT, SIG_IGN)" (identifier) "signal" (argument_list) "(SIGINT, SIG_IGN)" (() "(" (identifier) "SIGINT" (,) "," (identifier) "SIG_IGN" ()) ")" (;) ";" (expression_statement) "waitpid(pid, &ret, 0);" (call_expression) "waitpid(pid, &ret, 0)" (identifier) "waitpid" (argument_list) "(pid, &ret, 0)" (() "(" (identifier) "pid" (,) "," (pointer_expression) "&ret" (&) "&" (identifier) "ret" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "signal(SIGINT, handle_sigint);" (call_expression) "signal(SIGINT, handle_sigint)" (identifier) "signal" (argument_list) "(SIGINT, handle_sigint)" (() "(" (identifier) "SIGINT" (,) "," (identifier) "handle_sigint" ()) ")" (;) ";" (if_statement) "if (WIFSIGNALED(ret))\n printf("\n");" (if) "if" (parenthesized_expression) "(WIFSIGNALED(ret))" (() "(" (call_expression) "WIFSIGNALED(ret)" (identifier) "WIFSIGNALED" (argument_list) "(ret)" (() "(" (identifier) "ret" ()) ")" ()) ")" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "close(hdoc.pipefd[1]);" (call_expression) "close(hdoc.pipefd[1])" (identifier) "close" (argument_list) "(hdoc.pipefd[1])" (() "(" (subscript_expression) "hdoc.pipefd[1]" (field_expression) "hdoc.pipefd" (identifier) "hdoc" (.) "." (field_identifier) "pipefd" ([) "[" (number_literal) "1" (]) "]" ()) ")" (;) ";" (if_statement) "if (ret)\n {\n close(hdoc.pipefd[0]);\n return (-1);\n }" (if) "if" (parenthesized_expression) "(ret)" (() "(" (identifier) "ret" ()) ")" (compound_statement) "{\n close(hdoc.pipefd[0]);\n return (-1);\n }" ({) "{" (expression_statement) "close(hdoc.pipefd[0]);" (call_expression) "close(hdoc.pipefd[0])" (identifier) "close" (argument_list) "(hdoc.pipefd[0])" (() "(" (subscript_expression) "hdoc.pipefd[0]" (field_expression) "hdoc.pipefd" (identifier) "hdoc" (.) "." (field_identifier) "pipefd" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (return_statement) "return (-1);" (return) "return" (parenthesized_expression) "(-1)" (() "(" (number_literal) "-1" ()) ")" (;) ";" (}) "}" (return_statement) "return (hdoc.pipefd[0]);" (return) "return" (parenthesized_expression) "(hdoc.pipefd[0])" (() "(" (subscript_expression) "hdoc.pipefd[0]" (field_expression) "hdoc.pipefd" (identifier) "hdoc" (.) "." (field_identifier) "pipefd" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (}) "}"
1,059
0
{"language": "c", "success": true, "metadata": {"lines": 111, "avg_line_length": 27.07, "nodes": 640, "errors": 0, "source_hash": "b3394112745c97a82dcea450da143edcbc9a71aedafd5857a5518e59a11f2533", "categorized_nodes": 481}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"launcher.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"launcher.h\"", "parent": 0, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 21}}, {"id": 3, "type": "declaration", "text": "extern pid_t\tg_sig;", "parent": null, "children": [4, 6, 7], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 19}}, {"id": 4, "type": "storage_class_specifier", "text": "extern", "parent": 3, "children": [5], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 5, "type": "extern", "text": "extern", "parent": 4, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 6, "type": "type_identifier", "text": "pid_t", "parent": 3, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 12}}, {"id": 7, "type": "identifier", "text": "g_sig", "parent": 3, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 18}}, {"id": 8, "type": "function_definition", "text": "void\thdoc_param_expansion(t_hdoc *hdoc)\n{\n\tchar\t*ptr;\n\tchar\t*param;\n\n\tparam = NULL;\n\tptr = env_check_name(++(hdoc->ptr_r));\n\tif (ptr)\n\t{\n\t\tparam = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r);\n\t\thdoc->ptr_r = ptr - 1;\n\t}\n\telse if (*hdoc->ptr_r == '?')\n\t\tparam = hdoc->msh->ret;\n\telse\n\t\t*hdoc->buff->ptr++ = *(--(hdoc->ptr_r));\n\tif (!param)\n\t\treturn ;\n\tif (ft_vec_check(hdoc->buff, param))\n\t{\n\t\tprint_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n\t\treturn ;\n\t}\n\twhile (*param)\n\t\t*hdoc->buff->ptr++ = *param++;\n}", "parent": null, "children": [9, 10], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 9, "type": "primitive_type", "text": "void", "parent": 8, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 4}}, {"id": 10, "type": "function_declarator", "text": "hdoc_param_expansion(t_hdoc *hdoc)", "parent": 8, "children": [11, 12], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 39}}, {"id": 11, "type": "identifier", "text": "hdoc_param_expansion", "parent": 10, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 25}}, {"id": 12, "type": "parameter_list", "text": "(t_hdoc *hdoc)", "parent": 10, "children": [13], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 39}}, {"id": 13, "type": "parameter_declaration", "text": "t_hdoc *hdoc", "parent": 12, "children": [14, 15], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 38}}, {"id": 14, "type": "type_identifier", "text": "t_hdoc", "parent": 13, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 32}}, {"id": 15, "type": "pointer_declarator", "text": "*hdoc", "parent": 13, "children": [16, 17], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 38}}, {"id": 16, "type": "*", "text": "*", "parent": 15, "children": [], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 34}}, {"id": 17, "type": "identifier", "text": "hdoc", "parent": 15, "children": [], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 38}}, {"id": 18, "type": "declaration", "text": "char\t*ptr;", "parent": 8, "children": [19, 20], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 11}}, {"id": 19, "type": "primitive_type", "text": "char", "parent": 18, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 5}}, {"id": 20, "type": "pointer_declarator", "text": "*ptr", "parent": 18, "children": [21, 22], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 10}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 7}}, {"id": 22, "type": "identifier", "text": "ptr", "parent": 20, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 10}}, {"id": 23, "type": "declaration", "text": "char\t*param;", "parent": 8, "children": [24, 25], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 13}}, {"id": 24, "type": "primitive_type", "text": "char", "parent": 23, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 5}}, {"id": 25, "type": "pointer_declarator", "text": "*param", "parent": 23, "children": [26, 27], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 12}}, {"id": 26, "type": "*", "text": "*", "parent": 25, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 7}}, {"id": 27, "type": "identifier", "text": "param", "parent": 25, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 12}}, {"id": 28, "type": "assignment_expression", "text": "param = NULL", "parent": 8, "children": [29, 30, 31], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 13}}, {"id": 29, "type": "identifier", "text": "param", "parent": 28, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 6}}, {"id": 30, "type": "=", "text": "=", "parent": 28, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 8}}, {"id": 31, "type": "null", "text": "NULL", "parent": 28, "children": [32], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 32, "type": "NULL", "text": "NULL", "parent": 31, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 33, "type": "assignment_expression", "text": "ptr = env_check_name(++(hdoc->ptr_r))", "parent": 8, "children": [34, 35, 36], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 38}}, {"id": 34, "type": "identifier", "text": "ptr", "parent": 33, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 4}}, {"id": 35, "type": "=", "text": "=", "parent": 33, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 6}}, {"id": 36, "type": "call_expression", "text": "env_check_name(++(hdoc->ptr_r))", "parent": 33, "children": [37, 38], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 38}}, {"id": 37, "type": "identifier", "text": "env_check_name", "parent": 36, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 21}}, {"id": 38, "type": "argument_list", "text": "(++(hdoc->ptr_r))", "parent": 36, "children": [39], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 38}}, {"id": 39, "type": "update_expression", "text": "++(hdoc->ptr_r)", "parent": 38, "children": [40, 41], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 37}}, {"id": 40, "type": "++", "text": "++", "parent": 39, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 24}}, {"id": 41, "type": "parenthesized_expression", "text": "(hdoc->ptr_r)", "parent": 39, "children": [42], "start_point": {"row": 22, "column": 24}, "end_point": {"row": 22, "column": 37}}, {"id": 42, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 41, "children": [43, 44], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 36}}, {"id": 43, "type": "identifier", "text": "hdoc", "parent": 42, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 29}}, {"id": 44, "type": "field_identifier", "text": "ptr_r", "parent": 42, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 36}}, {"id": 45, "type": "if_statement", "text": "if (ptr)\n\t{\n\t\tparam = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r);\n\t\thdoc->ptr_r = ptr - 1;\n\t}\n\telse if (*hdoc->ptr_r == '?')\n\t\tparam = hdoc->msh->ret;\n\telse\n\t\t*hdoc->buff->ptr++ = *(--(hdoc->ptr_r));", "parent": 8, "children": [46, 77], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 31, "column": 42}}, {"id": 46, "type": "parenthesized_expression", "text": "(ptr)", "parent": 45, "children": [47], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 9}}, {"id": 47, "type": "identifier", "text": "ptr", "parent": 46, "children": [], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 8}}, {"id": 48, "type": "assignment_expression", "text": "param = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r)", "parent": 45, "children": [49, 50, 51], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 68}}, {"id": 49, "type": "identifier", "text": "param", "parent": 48, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 7}}, {"id": 50, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 9}}, {"id": 51, "type": "call_expression", "text": "msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r)", "parent": 48, "children": [52, 53], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 68}}, {"id": 52, "type": "identifier", "text": "msh_getenv", "parent": 51, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 20}}, {"id": 53, "type": "argument_list", "text": "(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r)", "parent": 51, "children": [54, 59, 62], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 68}}, {"id": 54, "type": "field_expression", "text": "hdoc->msh->env", "parent": 53, "children": [55, 58], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 35}}, {"id": 55, "type": "field_expression", "text": "hdoc->msh", "parent": 54, "children": [56, 57], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 30}}, {"id": 56, "type": "identifier", "text": "hdoc", "parent": 55, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 25}}, {"id": 57, "type": "field_identifier", "text": "msh", "parent": 55, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 30}}, {"id": 58, "type": "field_identifier", "text": "env", "parent": 54, "children": [], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 35}}, {"id": 59, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 53, "children": [60, 61], "start_point": {"row": 25, "column": 37}, "end_point": {"row": 25, "column": 48}}, {"id": 60, "type": "identifier", "text": "hdoc", "parent": 59, "children": [], "start_point": {"row": 25, "column": 37}, "end_point": {"row": 25, "column": 41}}, {"id": 61, "type": "field_identifier", "text": "ptr_r", "parent": 59, "children": [], "start_point": {"row": 25, "column": 43}, "end_point": {"row": 25, "column": 48}}, {"id": 62, "type": "binary_expression", "text": "ptr - hdoc->ptr_r", "parent": 53, "children": [63, 64, 65], "start_point": {"row": 25, "column": 50}, "end_point": {"row": 25, "column": 67}}, {"id": 63, "type": "identifier", "text": "ptr", "parent": 62, "children": [], "start_point": {"row": 25, "column": 50}, "end_point": {"row": 25, "column": 53}}, {"id": 64, "type": "-", "text": "-", "parent": 62, "children": [], "start_point": {"row": 25, "column": 54}, "end_point": {"row": 25, "column": 55}}, {"id": 65, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 62, "children": [66, 67], "start_point": {"row": 25, "column": 56}, "end_point": {"row": 25, "column": 67}}, {"id": 66, "type": "identifier", "text": "hdoc", "parent": 65, "children": [], "start_point": {"row": 25, "column": 56}, "end_point": {"row": 25, "column": 60}}, {"id": 67, "type": "field_identifier", "text": "ptr_r", "parent": 65, "children": [], "start_point": {"row": 25, "column": 62}, "end_point": {"row": 25, "column": 67}}, {"id": 68, "type": "assignment_expression", "text": "hdoc->ptr_r = ptr - 1", "parent": 45, "children": [69, 72, 73], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 23}}, {"id": 69, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 68, "children": [70, 71], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 13}}, {"id": 70, "type": "identifier", "text": "hdoc", "parent": 69, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 6}}, {"id": 71, "type": "field_identifier", "text": "ptr_r", "parent": 69, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 13}}, {"id": 72, "type": "=", "text": "=", "parent": 68, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 15}}, {"id": 73, "type": "binary_expression", "text": "ptr - 1", "parent": 68, "children": [74, 75, 76], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 23}}, {"id": 74, "type": "identifier", "text": "ptr", "parent": 73, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 19}}, {"id": 75, "type": "-", "text": "-", "parent": 73, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 21}}, {"id": 76, "type": "number_literal", "text": "1", "parent": 73, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 23}}, {"id": 77, "type": "else_clause", "text": "else if (*hdoc->ptr_r == '?')\n\t\tparam = hdoc->msh->ret;\n\telse\n\t\t*hdoc->buff->ptr++ = *(--(hdoc->ptr_r));", "parent": 45, "children": [78], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 31, "column": 42}}, {"id": 78, "type": "if_statement", "text": "if (*hdoc->ptr_r == '?')\n\t\tparam = hdoc->msh->ret;\n\telse\n\t\t*hdoc->buff->ptr++ = *(--(hdoc->ptr_r));", "parent": 77, "children": [79, 99], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 31, "column": 42}}, {"id": 79, "type": "parenthesized_expression", "text": "(*hdoc->ptr_r == '?')", "parent": 78, "children": [80], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 30}}, {"id": 80, "type": "binary_expression", "text": "*hdoc->ptr_r == '?'", "parent": 79, "children": [81, 86, 87], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 29}}, {"id": 81, "type": "pointer_expression", "text": "*hdoc->ptr_r", "parent": 80, "children": [82, 83], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 22}}, {"id": 82, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 11}}, {"id": 83, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 81, "children": [84, 85], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 22}}, {"id": 84, "type": "identifier", "text": "hdoc", "parent": 83, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 15}}, {"id": 85, "type": "field_identifier", "text": "ptr_r", "parent": 83, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 22}}, {"id": 86, "type": "==", "text": "==", "parent": 80, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 25}}, {"id": 87, "type": "char_literal", "text": "'?'", "parent": 80, "children": [88, 89, 90], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 29}}, {"id": 88, "type": "'", "text": "'", "parent": 87, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 27}}, {"id": 89, "type": "character", "text": "?", "parent": 87, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 28}}, {"id": 90, "type": "'", "text": "'", "parent": 87, "children": [], "start_point": {"row": 28, "column": 28}, "end_point": {"row": 28, "column": 29}}, {"id": 91, "type": "assignment_expression", "text": "param = hdoc->msh->ret", "parent": 78, "children": [92, 93, 94], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 24}}, {"id": 92, "type": "identifier", "text": "param", "parent": 91, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 7}}, {"id": 93, "type": "=", "text": "=", "parent": 91, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 9}}, {"id": 94, "type": "field_expression", "text": "hdoc->msh->ret", "parent": 91, "children": [95, 98], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 24}}, {"id": 95, "type": "field_expression", "text": "hdoc->msh", "parent": 94, "children": [96, 97], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 19}}, {"id": 96, "type": "identifier", "text": "hdoc", "parent": 95, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 14}}, {"id": 97, "type": "field_identifier", "text": "msh", "parent": 95, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 19}}, {"id": 98, "type": "field_identifier", "text": "ret", "parent": 94, "children": [], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 24}}, {"id": 99, "type": "else_clause", "text": "else\n\t\t*hdoc->buff->ptr++ = *(--(hdoc->ptr_r));", "parent": 78, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 31, "column": 42}}, {"id": 100, "type": "assignment_expression", "text": "*hdoc->buff->ptr++ = *(--(hdoc->ptr_r))", "parent": 99, "children": [101, 110, 111], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 41}}, {"id": 101, "type": "pointer_expression", "text": "*hdoc->buff->ptr++", "parent": 100, "children": [102, 103], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 20}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 3}}, {"id": 103, "type": "update_expression", "text": "hdoc->buff->ptr++", "parent": 101, "children": [104, 109], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 20}}, {"id": 104, "type": "field_expression", "text": "hdoc->buff->ptr", "parent": 103, "children": [105, 108], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 18}}, {"id": 105, "type": "field_expression", "text": "hdoc->buff", "parent": 104, "children": [106, 107], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 13}}, {"id": 106, "type": "identifier", "text": "hdoc", "parent": 105, "children": [], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 7}}, {"id": 107, "type": "field_identifier", "text": "buff", "parent": 105, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 13}}, {"id": 108, "type": "field_identifier", "text": "ptr", "parent": 104, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 18}}, {"id": 109, "type": "++", "text": "++", "parent": 103, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 20}}, {"id": 110, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 22}}, {"id": 111, "type": "pointer_expression", "text": "*(--(hdoc->ptr_r))", "parent": 100, "children": [112, 113], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 41}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 24}}, {"id": 113, "type": "parenthesized_expression", "text": "(--(hdoc->ptr_r))", "parent": 111, "children": [114], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 41}}, {"id": 114, "type": "update_expression", "text": "--(hdoc->ptr_r)", "parent": 113, "children": [115, 116], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 40}}, {"id": 115, "type": "--", "text": "--", "parent": 114, "children": [], "start_point": {"row": 31, "column": 25}, "end_point": {"row": 31, "column": 27}}, {"id": 116, "type": "parenthesized_expression", "text": "(hdoc->ptr_r)", "parent": 114, "children": [117], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 40}}, {"id": 117, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 116, "children": [118, 119], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 39}}, {"id": 118, "type": "identifier", "text": "hdoc", "parent": 117, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 32}}, {"id": 119, "type": "field_identifier", "text": "ptr_r", "parent": 117, "children": [], "start_point": {"row": 31, "column": 34}, "end_point": {"row": 31, "column": 39}}, {"id": 120, "type": "if_statement", "text": "if (!param)\n\t\treturn ;", "parent": 8, "children": [121, 125], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 33, "column": 10}}, {"id": 121, "type": "parenthesized_expression", "text": "(!param)", "parent": 120, "children": [122], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 12}}, {"id": 122, "type": "unary_expression", "text": "!param", "parent": 121, "children": [123, 124], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 11}}, {"id": 123, "type": "!", "text": "!", "parent": 122, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 6}}, {"id": 124, "type": "identifier", "text": "param", "parent": 122, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 11}}, {"id": 125, "type": "return_statement", "text": "return ;", "parent": 120, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 10}}, {"id": 126, "type": "if_statement", "text": "if (ft_vec_check(hdoc->buff, param))\n\t{\n\t\tprint_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n\t\treturn ;\n\t}", "parent": 8, "children": [127], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 38, "column": 2}}, {"id": 127, "type": "parenthesized_expression", "text": "(ft_vec_check(hdoc->buff, param))", "parent": 126, "children": [128], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 37}}, {"id": 128, "type": "call_expression", "text": "ft_vec_check(hdoc->buff, param)", "parent": 127, "children": [129, 130], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 36}}, {"id": 129, "type": "identifier", "text": "ft_vec_check", "parent": 128, "children": [], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 17}}, {"id": 130, "type": "argument_list", "text": "(hdoc->buff, param)", "parent": 128, "children": [131, 134], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 36}}, {"id": 131, "type": "field_expression", "text": "hdoc->buff", "parent": 130, "children": [132, 133], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 28}}, {"id": 132, "type": "identifier", "text": "hdoc", "parent": 131, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 22}}, {"id": 133, "type": "field_identifier", "text": "buff", "parent": 131, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 28}}, {"id": 134, "type": "identifier", "text": "param", "parent": 130, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 35}}, {"id": 135, "type": "call_expression", "text": "print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE)", "parent": 126, "children": [136, 137], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 54}}, {"id": 136, "type": "identifier", "text": "print_error", "parent": 135, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 13}}, {"id": 137, "type": "argument_list", "text": "(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE)", "parent": 135, "children": [138, 139, 140, 142], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 54}}, {"id": 138, "type": "identifier", "text": "MSG_MSH", "parent": 137, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 21}}, {"id": 139, "type": "identifier", "text": "ERR_MALLOC", "parent": 137, "children": [], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 33}}, {"id": 140, "type": "null", "text": "NULL", "parent": 137, "children": [141], "start_point": {"row": 36, "column": 35}, "end_point": {"row": 36, "column": 39}}, {"id": 141, "type": "NULL", "text": "NULL", "parent": 140, "children": [], "start_point": {"row": 36, "column": 35}, "end_point": {"row": 36, "column": 39}}, {"id": 142, "type": "identifier", "text": "EXIT_FAILURE", "parent": 137, "children": [], "start_point": {"row": 36, "column": 41}, "end_point": {"row": 36, "column": 53}}, {"id": 143, "type": "return_statement", "text": "return ;", "parent": 126, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 10}}, {"id": 144, "type": "while_statement", "text": "while (*param)\n\t\t*hdoc->buff->ptr++ = *param++;", "parent": 8, "children": [145], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 40, "column": 32}}, {"id": 145, "type": "parenthesized_expression", "text": "(*param)", "parent": 144, "children": [146], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 15}}, {"id": 146, "type": "pointer_expression", "text": "*param", "parent": 145, "children": [147, 148], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 14}}, {"id": 147, "type": "*", "text": "*", "parent": 146, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 9}}, {"id": 148, "type": "identifier", "text": "param", "parent": 146, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 14}}, {"id": 149, "type": "assignment_expression", "text": "*hdoc->buff->ptr++ = *param++", "parent": 144, "children": [150, 159, 160], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 31}}, {"id": 150, "type": "pointer_expression", "text": "*hdoc->buff->ptr++", "parent": 149, "children": [151, 152], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 20}}, {"id": 151, "type": "*", "text": "*", "parent": 150, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 3}}, {"id": 152, "type": "update_expression", "text": "hdoc->buff->ptr++", "parent": 150, "children": [153, 158], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 20}}, {"id": 153, "type": "field_expression", "text": "hdoc->buff->ptr", "parent": 152, "children": [154, 157], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 18}}, {"id": 154, "type": "field_expression", "text": "hdoc->buff", "parent": 153, "children": [155, 156], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 13}}, {"id": 155, "type": "identifier", "text": "hdoc", "parent": 154, "children": [], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 7}}, {"id": 156, "type": "field_identifier", "text": "buff", "parent": 154, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 13}}, {"id": 157, "type": "field_identifier", "text": "ptr", "parent": 153, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 18}}, {"id": 158, "type": "++", "text": "++", "parent": 152, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 20}}, {"id": 159, "type": "=", "text": "=", "parent": 149, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 22}}, {"id": 160, "type": "pointer_expression", "text": "*param++", "parent": 149, "children": [161, 162], "start_point": {"row": 40, "column": 23}, "end_point": {"row": 40, "column": 31}}, {"id": 161, "type": "*", "text": "*", "parent": 160, "children": [], "start_point": {"row": 40, "column": 23}, "end_point": {"row": 40, "column": 24}}, {"id": 162, "type": "update_expression", "text": "param++", "parent": 160, "children": [163, 164], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 31}}, {"id": 163, "type": "identifier", "text": "param", "parent": 162, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 29}}, {"id": 164, "type": "++", "text": "++", "parent": 162, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 31}}, {"id": 165, "type": "function_definition", "text": "static void\thdoc_if_dollar(t_hdoc *hdoc)\n{\n\twhile (*hdoc->ptr_r)\n\t{\n\t\tif (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\\''\n\t\t\t\t|| *(hdoc->ptr_r + 1) == '\\\"'))\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;\n\t\telse if (*hdoc->ptr_r == '$')\n\t\t\thdoc_param_expansion(hdoc);\n\t\telse\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;\n\t\thdoc->ptr_r++;\n\t}\n}", "parent": null, "children": [166, 167], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 166, "type": "primitive_type", "text": "void", "parent": 165, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 11}}, {"id": 167, "type": "function_declarator", "text": "hdoc_if_dollar(t_hdoc *hdoc)", "parent": 165, "children": [168, 169], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 40}}, {"id": 168, "type": "identifier", "text": "hdoc_if_dollar", "parent": 167, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 26}}, {"id": 169, "type": "parameter_list", "text": "(t_hdoc *hdoc)", "parent": 167, "children": [170], "start_point": {"row": 43, "column": 26}, "end_point": {"row": 43, "column": 40}}, {"id": 170, "type": "parameter_declaration", "text": "t_hdoc *hdoc", "parent": 169, "children": [171, 172], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 39}}, {"id": 171, "type": "type_identifier", "text": "t_hdoc", "parent": 170, "children": [], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 33}}, {"id": 172, "type": "pointer_declarator", "text": "*hdoc", "parent": 170, "children": [173, 174], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 39}}, {"id": 173, "type": "*", "text": "*", "parent": 172, "children": [], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 35}}, {"id": 174, "type": "identifier", "text": "hdoc", "parent": 172, "children": [], "start_point": {"row": 43, "column": 35}, "end_point": {"row": 43, "column": 39}}, {"id": 175, "type": "while_statement", "text": "while (*hdoc->ptr_r)\n\t{\n\t\tif (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\\''\n\t\t\t\t|| *(hdoc->ptr_r + 1) == '\\\"'))\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;\n\t\telse if (*hdoc->ptr_r == '$')\n\t\t\thdoc_param_expansion(hdoc);\n\t\telse\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;\n\t\thdoc->ptr_r++;\n\t}", "parent": 165, "children": [176], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 55, "column": 2}}, {"id": 176, "type": "parenthesized_expression", "text": "(*hdoc->ptr_r)", "parent": 175, "children": [177], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 21}}, {"id": 177, "type": "pointer_expression", "text": "*hdoc->ptr_r", "parent": 176, "children": [178, 179], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 20}}, {"id": 178, "type": "*", "text": "*", "parent": 177, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 9}}, {"id": 179, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 177, "children": [180, 181], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 20}}, {"id": 180, "type": "identifier", "text": "hdoc", "parent": 179, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 13}}, {"id": 181, "type": "field_identifier", "text": "ptr_r", "parent": 179, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 20}}, {"id": 182, "type": "if_statement", "text": "if (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\\''\n\t\t\t\t|| *(hdoc->ptr_r + 1) == '\\\"'))\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;\n\t\telse if (*hdoc->ptr_r == '$')\n\t\t\thdoc_param_expansion(hdoc);\n\t\telse\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;", "parent": 175, "children": [183, 246], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 53, "column": 37}}, {"id": 183, "type": "parenthesized_expression", "text": "(*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\\''\n\t\t\t\t|| *(hdoc->ptr_r + 1) == '\\\"'))", "parent": 182, "children": [184], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 48, "column": 35}}, {"id": 184, "type": "binary_expression", "text": "*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\\''\n\t\t\t\t|| *(hdoc->ptr_r + 1) == '\\\"')", "parent": 183, "children": [185, 196, 197], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 48, "column": 34}}, {"id": 185, "type": "binary_expression", "text": "*hdoc->ptr_r == '$'", "parent": 184, "children": [186, 191, 192], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 25}}, {"id": 186, "type": "pointer_expression", "text": "*hdoc->ptr_r", "parent": 185, "children": [187, 188], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 18}}, {"id": 187, "type": "*", "text": "*", "parent": 186, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 7}}, {"id": 188, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 186, "children": [189, 190], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 18}}, {"id": 189, "type": "identifier", "text": "hdoc", "parent": 188, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 11}}, {"id": 190, "type": "field_identifier", "text": "ptr_r", "parent": 188, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 18}}, {"id": 191, "type": "==", "text": "==", "parent": 185, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 21}}, {"id": 192, "type": "char_literal", "text": "'$'", "parent": 185, "children": [193, 194, 195], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 25}}, {"id": 193, "type": "'", "text": "'", "parent": 192, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 23}}, {"id": 194, "type": "character", "text": "$", "parent": 192, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 24}}, {"id": 195, "type": "'", "text": "'", "parent": 192, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 25}}, {"id": 196, "type": "&&", "text": "&&", "parent": 184, "children": [], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 28}}, {"id": 197, "type": "parenthesized_expression", "text": "(*(hdoc->ptr_r + 1) == '\\''\n\t\t\t\t|| *(hdoc->ptr_r + 1) == '\\\"')", "parent": 184, "children": [198], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 48, "column": 34}}, {"id": 198, "type": "binary_expression", "text": "*(hdoc->ptr_r + 1) == '\\''\n\t\t\t\t|| *(hdoc->ptr_r + 1) == '\\\"'", "parent": 197, "children": [199, 214, 215], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 48, "column": 33}}, {"id": 199, "type": "binary_expression", "text": "*(hdoc->ptr_r + 1) == '\\''", "parent": 198, "children": [200, 209, 210], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 56}}, {"id": 200, "type": "pointer_expression", "text": "*(hdoc->ptr_r + 1)", "parent": 199, "children": [201, 202], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 48}}, {"id": 201, "type": "*", "text": "*", "parent": 200, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 31}}, {"id": 202, "type": "parenthesized_expression", "text": "(hdoc->ptr_r + 1)", "parent": 200, "children": [203], "start_point": {"row": 47, "column": 31}, "end_point": {"row": 47, "column": 48}}, {"id": 203, "type": "binary_expression", "text": "hdoc->ptr_r + 1", "parent": 202, "children": [204, 207, 208], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 47}}, {"id": 204, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 203, "children": [205, 206], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 43}}, {"id": 205, "type": "identifier", "text": "hdoc", "parent": 204, "children": [], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 36}}, {"id": 206, "type": "field_identifier", "text": "ptr_r", "parent": 204, "children": [], "start_point": {"row": 47, "column": 38}, "end_point": {"row": 47, "column": 43}}, {"id": 207, "type": "+", "text": "+", "parent": 203, "children": [], "start_point": {"row": 47, "column": 44}, "end_point": {"row": 47, "column": 45}}, {"id": 208, "type": "number_literal", "text": "1", "parent": 203, "children": [], "start_point": {"row": 47, "column": 46}, "end_point": {"row": 47, "column": 47}}, {"id": 209, "type": "==", "text": "==", "parent": 199, "children": [], "start_point": {"row": 47, "column": 49}, "end_point": {"row": 47, "column": 51}}, {"id": 210, "type": "char_literal", "text": "'\\''", "parent": 199, "children": [211, 212, 213], "start_point": {"row": 47, "column": 52}, "end_point": {"row": 47, "column": 56}}, {"id": 211, "type": "'", "text": "'", "parent": 210, "children": [], "start_point": {"row": 47, "column": 52}, "end_point": {"row": 47, "column": 53}}, {"id": 212, "type": "escape_sequence", "text": "\\'", "parent": 210, "children": [], "start_point": {"row": 47, "column": 53}, "end_point": {"row": 47, "column": 55}}, {"id": 213, "type": "'", "text": "'", "parent": 210, "children": [], "start_point": {"row": 47, "column": 55}, "end_point": {"row": 47, "column": 56}}, {"id": 214, "type": "||", "text": "||", "parent": 198, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 6}}, {"id": 215, "type": "binary_expression", "text": "*(hdoc->ptr_r + 1) == '\\\"'", "parent": 198, "children": [216, 225, 226], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 33}}, {"id": 216, "type": "pointer_expression", "text": "*(hdoc->ptr_r + 1)", "parent": 215, "children": [217, 218], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 25}}, {"id": 217, "type": "*", "text": "*", "parent": 216, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 8}}, {"id": 218, "type": "parenthesized_expression", "text": "(hdoc->ptr_r + 1)", "parent": 216, "children": [219], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 25}}, {"id": 219, "type": "binary_expression", "text": "hdoc->ptr_r + 1", "parent": 218, "children": [220, 223, 224], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 24}}, {"id": 220, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 219, "children": [221, 222], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 20}}, {"id": 221, "type": "identifier", "text": "hdoc", "parent": 220, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 13}}, {"id": 222, "type": "field_identifier", "text": "ptr_r", "parent": 220, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 20}}, {"id": 223, "type": "+", "text": "+", "parent": 219, "children": [], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 22}}, {"id": 224, "type": "number_literal", "text": "1", "parent": 219, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 24}}, {"id": 225, "type": "==", "text": "==", "parent": 215, "children": [], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 28}}, {"id": 226, "type": "char_literal", "text": "'\\\"'", "parent": 215, "children": [227, 228, 229], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 33}}, {"id": 227, "type": "'", "text": "'", "parent": 226, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 30}}, {"id": 228, "type": "escape_sequence", "text": "\\\"", "parent": 226, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 32}}, {"id": 229, "type": "'", "text": "'", "parent": 226, "children": [], "start_point": {"row": 48, "column": 32}, "end_point": {"row": 48, "column": 33}}, {"id": 230, "type": "assignment_expression", "text": "*hdoc->buff->ptr++ = *hdoc->ptr_r", "parent": 182, "children": [231, 240, 241], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 36}}, {"id": 231, "type": "pointer_expression", "text": "*hdoc->buff->ptr++", "parent": 230, "children": [232, 233], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 21}}, {"id": 232, "type": "*", "text": "*", "parent": 231, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 4}}, {"id": 233, "type": "update_expression", "text": "hdoc->buff->ptr++", "parent": 231, "children": [234, 239], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 21}}, {"id": 234, "type": "field_expression", "text": "hdoc->buff->ptr", "parent": 233, "children": [235, 238], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 19}}, {"id": 235, "type": "field_expression", "text": "hdoc->buff", "parent": 234, "children": [236, 237], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 14}}, {"id": 236, "type": "identifier", "text": "hdoc", "parent": 235, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 8}}, {"id": 237, "type": "field_identifier", "text": "buff", "parent": 235, "children": [], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 14}}, {"id": 238, "type": "field_identifier", "text": "ptr", "parent": 234, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 19}}, {"id": 239, "type": "++", "text": "++", "parent": 233, "children": [], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 21}}, {"id": 240, "type": "=", "text": "=", "parent": 230, "children": [], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 23}}, {"id": 241, "type": "pointer_expression", "text": "*hdoc->ptr_r", "parent": 230, "children": [242, 243], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 36}}, {"id": 242, "type": "*", "text": "*", "parent": 241, "children": [], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 25}}, {"id": 243, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 241, "children": [244, 245], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 36}}, {"id": 244, "type": "identifier", "text": "hdoc", "parent": 243, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 29}}, {"id": 245, "type": "field_identifier", "text": "ptr_r", "parent": 243, "children": [], "start_point": {"row": 49, "column": 31}, "end_point": {"row": 49, "column": 36}}, {"id": 246, "type": "else_clause", "text": "else if (*hdoc->ptr_r == '$')\n\t\t\thdoc_param_expansion(hdoc);\n\t\telse\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;", "parent": 182, "children": [247], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 53, "column": 37}}, {"id": 247, "type": "if_statement", "text": "if (*hdoc->ptr_r == '$')\n\t\t\thdoc_param_expansion(hdoc);\n\t\telse\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;", "parent": 246, "children": [248, 264], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 53, "column": 37}}, {"id": 248, "type": "parenthesized_expression", "text": "(*hdoc->ptr_r == '$')", "parent": 247, "children": [249], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 31}}, {"id": 249, "type": "binary_expression", "text": "*hdoc->ptr_r == '$'", "parent": 248, "children": [250, 255, 256], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 30}}, {"id": 250, "type": "pointer_expression", "text": "*hdoc->ptr_r", "parent": 249, "children": [251, 252], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 23}}, {"id": 251, "type": "*", "text": "*", "parent": 250, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 12}}, {"id": 252, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 250, "children": [253, 254], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 23}}, {"id": 253, "type": "identifier", "text": "hdoc", "parent": 252, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 16}}, {"id": 254, "type": "field_identifier", "text": "ptr_r", "parent": 252, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 23}}, {"id": 255, "type": "==", "text": "==", "parent": 249, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 26}}, {"id": 256, "type": "char_literal", "text": "'$'", "parent": 249, "children": [257, 258, 259], "start_point": {"row": 50, "column": 27}, "end_point": {"row": 50, "column": 30}}, {"id": 257, "type": "'", "text": "'", "parent": 256, "children": [], "start_point": {"row": 50, "column": 27}, "end_point": {"row": 50, "column": 28}}, {"id": 258, "type": "character", "text": "$", "parent": 256, "children": [], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 29}}, {"id": 259, "type": "'", "text": "'", "parent": 256, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 30}}, {"id": 260, "type": "call_expression", "text": "hdoc_param_expansion(hdoc)", "parent": 247, "children": [261, 262], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 29}}, {"id": 261, "type": "identifier", "text": "hdoc_param_expansion", "parent": 260, "children": [], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 23}}, {"id": 262, "type": "argument_list", "text": "(hdoc)", "parent": 260, "children": [263], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 29}}, {"id": 263, "type": "identifier", "text": "hdoc", "parent": 262, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 28}}, {"id": 264, "type": "else_clause", "text": "else\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;", "parent": 247, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 53, "column": 37}}, {"id": 265, "type": "assignment_expression", "text": "*hdoc->buff->ptr++ = *hdoc->ptr_r", "parent": 264, "children": [266, 275, 276], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 36}}, {"id": 266, "type": "pointer_expression", "text": "*hdoc->buff->ptr++", "parent": 265, "children": [267, 268], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 21}}, {"id": 267, "type": "*", "text": "*", "parent": 266, "children": [], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 4}}, {"id": 268, "type": "update_expression", "text": "hdoc->buff->ptr++", "parent": 266, "children": [269, 274], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 21}}, {"id": 269, "type": "field_expression", "text": "hdoc->buff->ptr", "parent": 268, "children": [270, 273], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 19}}, {"id": 270, "type": "field_expression", "text": "hdoc->buff", "parent": 269, "children": [271, 272], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 14}}, {"id": 271, "type": "identifier", "text": "hdoc", "parent": 270, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 8}}, {"id": 272, "type": "field_identifier", "text": "buff", "parent": 270, "children": [], "start_point": {"row": 53, "column": 10}, "end_point": {"row": 53, "column": 14}}, {"id": 273, "type": "field_identifier", "text": "ptr", "parent": 269, "children": [], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 19}}, {"id": 274, "type": "++", "text": "++", "parent": 268, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 21}}, {"id": 275, "type": "=", "text": "=", "parent": 265, "children": [], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 23}}, {"id": 276, "type": "pointer_expression", "text": "*hdoc->ptr_r", "parent": 265, "children": [277, 278], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 36}}, {"id": 277, "type": "*", "text": "*", "parent": 276, "children": [], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 25}}, {"id": 278, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 276, "children": [279, 280], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 36}}, {"id": 279, "type": "identifier", "text": "hdoc", "parent": 278, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 29}}, {"id": 280, "type": "field_identifier", "text": "ptr_r", "parent": 278, "children": [], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 36}}, {"id": 281, "type": "update_expression", "text": "hdoc->ptr_r++", "parent": 175, "children": [282, 285], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 15}}, {"id": 282, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 281, "children": [283, 284], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 13}}, {"id": 283, "type": "identifier", "text": "hdoc", "parent": 282, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 6}}, {"id": 284, "type": "field_identifier", "text": "ptr_r", "parent": 282, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 13}}, {"id": 285, "type": "++", "text": "++", "parent": 281, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 15}}, {"id": 286, "type": "function_definition", "text": "static void\tread_heredoc(t_hdoc *hdoc)\n{\n\thdoc->buff = ft_vec_new(DFLT_VEC_SIZE);\n\twhile (1)\n\t{\n\t\thdoc->buff->ptr = hdoc->buff->str;\n\t\thdoc->line = readline(\"heredoc> \");\n\t\tif (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))\n\t\t\tbreak ;\n\t\tif (ft_vec_check(hdoc->buff, hdoc->line))\n\t\t{\n\t\t\tprint_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n\t\t\treturn ;\n\t\t}\n\t\thdoc->ptr_r = hdoc->line;\n\t\thdoc_if_dollar(hdoc);\n\t\t*hdoc->buff->ptr = '\\0';\n\t\twrite(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str));\n\t\twrite(hdoc->pipefd[1], \"\\n\", 1);\n\t}\n\tfree(hdoc->line);\n\tft_vec_free(hdoc->buff);\n}", "parent": null, "children": [287, 288], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 287, "type": "primitive_type", "text": "void", "parent": 286, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 11}}, {"id": 288, "type": "function_declarator", "text": "read_heredoc(t_hdoc *hdoc)", "parent": 286, "children": [289, 290], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 38}}, {"id": 289, "type": "identifier", "text": "read_heredoc", "parent": 288, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 24}}, {"id": 290, "type": "parameter_list", "text": "(t_hdoc *hdoc)", "parent": 288, "children": [291], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 38}}, {"id": 291, "type": "parameter_declaration", "text": "t_hdoc *hdoc", "parent": 290, "children": [292, 293], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 37}}, {"id": 292, "type": "type_identifier", "text": "t_hdoc", "parent": 291, "children": [], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 31}}, {"id": 293, "type": "pointer_declarator", "text": "*hdoc", "parent": 291, "children": [294, 295], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 37}}, {"id": 294, "type": "*", "text": "*", "parent": 293, "children": [], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 33}}, {"id": 295, "type": "identifier", "text": "hdoc", "parent": 293, "children": [], "start_point": {"row": 58, "column": 33}, "end_point": {"row": 58, "column": 37}}, {"id": 296, "type": "assignment_expression", "text": "hdoc->buff = ft_vec_new(DFLT_VEC_SIZE)", "parent": 286, "children": [297, 300, 301], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 39}}, {"id": 297, "type": "field_expression", "text": "hdoc->buff", "parent": 296, "children": [298, 299], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 11}}, {"id": 298, "type": "identifier", "text": "hdoc", "parent": 297, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 5}}, {"id": 299, "type": "field_identifier", "text": "buff", "parent": 297, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 11}}, {"id": 300, "type": "=", "text": "=", "parent": 296, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 13}}, {"id": 301, "type": "call_expression", "text": "ft_vec_new(DFLT_VEC_SIZE)", "parent": 296, "children": [302, 303], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 39}}, {"id": 302, "type": "identifier", "text": "ft_vec_new", "parent": 301, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 24}}, {"id": 303, "type": "argument_list", "text": "(DFLT_VEC_SIZE)", "parent": 301, "children": [304], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 39}}, {"id": 304, "type": "identifier", "text": "DFLT_VEC_SIZE", "parent": 303, "children": [], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 38}}, {"id": 305, "type": "while_statement", "text": "while (1)\n\t{\n\t\thdoc->buff->ptr = hdoc->buff->str;\n\t\thdoc->line = readline(\"heredoc> \");\n\t\tif (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))\n\t\t\tbreak ;\n\t\tif (ft_vec_check(hdoc->buff, hdoc->line))\n\t\t{\n\t\t\tprint_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n\t\t\treturn ;\n\t\t}\n\t\thdoc->ptr_r = hdoc->line;\n\t\thdoc_if_dollar(hdoc);\n\t\t*hdoc->buff->ptr = '\\0';\n\t\twrite(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str));\n\t\twrite(hdoc->pipefd[1], \"\\n\", 1);\n\t}", "parent": 286, "children": [306], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 77, "column": 2}}, {"id": 306, "type": "parenthesized_expression", "text": "(1)", "parent": 305, "children": [307], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 10}}, {"id": 307, "type": "number_literal", "text": "1", "parent": 306, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 9}}, {"id": 308, "type": "assignment_expression", "text": "hdoc->buff->ptr = hdoc->buff->str", "parent": 305, "children": [309, 314, 315], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 35}}, {"id": 309, "type": "field_expression", "text": "hdoc->buff->ptr", "parent": 308, "children": [310, 313], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 17}}, {"id": 310, "type": "field_expression", "text": "hdoc->buff", "parent": 309, "children": [311, 312], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 12}}, {"id": 311, "type": "identifier", "text": "hdoc", "parent": 310, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 6}}, {"id": 312, "type": "field_identifier", "text": "buff", "parent": 310, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 12}}, {"id": 313, "type": "field_identifier", "text": "ptr", "parent": 309, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 17}}, {"id": 314, "type": "=", "text": "=", "parent": 308, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 19}}, {"id": 315, "type": "field_expression", "text": "hdoc->buff->str", "parent": 308, "children": [316, 319], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 35}}, {"id": 316, "type": "field_expression", "text": "hdoc->buff", "parent": 315, "children": [317, 318], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 30}}, {"id": 317, "type": "identifier", "text": "hdoc", "parent": 316, "children": [], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 24}}, {"id": 318, "type": "field_identifier", "text": "buff", "parent": 316, "children": [], "start_point": {"row": 63, "column": 26}, "end_point": {"row": 63, "column": 30}}, {"id": 319, "type": "field_identifier", "text": "str", "parent": 315, "children": [], "start_point": {"row": 63, "column": 32}, "end_point": {"row": 63, "column": 35}}, {"id": 320, "type": "assignment_expression", "text": "hdoc->line = readline(\"heredoc> \")", "parent": 305, "children": [321, 324, 325], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 36}}, {"id": 321, "type": "field_expression", "text": "hdoc->line", "parent": 320, "children": [322, 323], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 12}}, {"id": 322, "type": "identifier", "text": "hdoc", "parent": 321, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 6}}, {"id": 323, "type": "field_identifier", "text": "line", "parent": 321, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 12}}, {"id": 324, "type": "=", "text": "=", "parent": 320, "children": [], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 14}}, {"id": 325, "type": "call_expression", "text": "readline(\"heredoc> \")", "parent": 320, "children": [326, 327], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 36}}, {"id": 326, "type": "identifier", "text": "readline", "parent": 325, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 23}}, {"id": 327, "type": "argument_list", "text": "(\"heredoc> \")", "parent": 325, "children": [328], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 36}}, {"id": 328, "type": "string_literal", "text": "\"heredoc> \"", "parent": 327, "children": [], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 35}}, {"id": 329, "type": "if_statement", "text": "if (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))\n\t\t\tbreak ;", "parent": 305, "children": [330, 349], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 66, "column": 10}}, {"id": 330, "type": "parenthesized_expression", "text": "(!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))", "parent": 329, "children": [331], "start_point": {"row": 65, "column": 5}, "end_point": {"row": 65, "column": 55}}, {"id": 331, "type": "binary_expression", "text": "!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof)", "parent": 330, "children": [332, 337, 338], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 54}}, {"id": 332, "type": "unary_expression", "text": "!hdoc->line", "parent": 331, "children": [333, 334], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 17}}, {"id": 333, "type": "!", "text": "!", "parent": 332, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 7}}, {"id": 334, "type": "field_expression", "text": "hdoc->line", "parent": 332, "children": [335, 336], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 17}}, {"id": 335, "type": "identifier", "text": "hdoc", "parent": 334, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 11}}, {"id": 336, "type": "field_identifier", "text": "line", "parent": 334, "children": [], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 17}}, {"id": 337, "type": "||", "text": "||", "parent": 331, "children": [], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 20}}, {"id": 338, "type": "unary_expression", "text": "!ft_strcmp(hdoc->line, hdoc->eof)", "parent": 331, "children": [339, 340], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 54}}, {"id": 339, "type": "!", "text": "!", "parent": 338, "children": [], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 22}}, {"id": 340, "type": "call_expression", "text": "ft_strcmp(hdoc->line, hdoc->eof)", "parent": 338, "children": [341, 342], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 54}}, {"id": 341, "type": "identifier", "text": "ft_strcmp", "parent": 340, "children": [], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 31}}, {"id": 342, "type": "argument_list", "text": "(hdoc->line, hdoc->eof)", "parent": 340, "children": [343, 346], "start_point": {"row": 65, "column": 31}, "end_point": {"row": 65, "column": 54}}, {"id": 343, "type": "field_expression", "text": "hdoc->line", "parent": 342, "children": [344, 345], "start_point": {"row": 65, "column": 32}, "end_point": {"row": 65, "column": 42}}, {"id": 344, "type": "identifier", "text": "hdoc", "parent": 343, "children": [], "start_point": {"row": 65, "column": 32}, "end_point": {"row": 65, "column": 36}}, {"id": 345, "type": "field_identifier", "text": "line", "parent": 343, "children": [], "start_point": {"row": 65, "column": 38}, "end_point": {"row": 65, "column": 42}}, {"id": 346, "type": "field_expression", "text": "hdoc->eof", "parent": 342, "children": [347, 348], "start_point": {"row": 65, "column": 44}, "end_point": {"row": 65, "column": 53}}, {"id": 347, "type": "identifier", "text": "hdoc", "parent": 346, "children": [], "start_point": {"row": 65, "column": 44}, "end_point": {"row": 65, "column": 48}}, {"id": 348, "type": "field_identifier", "text": "eof", "parent": 346, "children": [], "start_point": {"row": 65, "column": 50}, "end_point": {"row": 65, "column": 53}}, {"id": 349, "type": "break_statement", "text": "break ;", "parent": 329, "children": [350], "start_point": {"row": 66, "column": 3}, "end_point": {"row": 66, "column": 10}}, {"id": 350, "type": "break", "text": "break", "parent": 349, "children": [], "start_point": {"row": 66, "column": 3}, "end_point": {"row": 66, "column": 8}}, {"id": 351, "type": "if_statement", "text": "if (ft_vec_check(hdoc->buff, hdoc->line))\n\t\t{\n\t\t\tprint_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n\t\t\treturn ;\n\t\t}", "parent": 305, "children": [352], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 71, "column": 3}}, {"id": 352, "type": "parenthesized_expression", "text": "(ft_vec_check(hdoc->buff, hdoc->line))", "parent": 351, "children": [353], "start_point": {"row": 67, "column": 5}, "end_point": {"row": 67, "column": 43}}, {"id": 353, "type": "call_expression", "text": "ft_vec_check(hdoc->buff, hdoc->line)", "parent": 352, "children": [354, 355], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 42}}, {"id": 354, "type": "identifier", "text": "ft_vec_check", "parent": 353, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 18}}, {"id": 355, "type": "argument_list", "text": "(hdoc->buff, hdoc->line)", "parent": 353, "children": [356, 359], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 42}}, {"id": 356, "type": "field_expression", "text": "hdoc->buff", "parent": 355, "children": [357, 358], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 29}}, {"id": 357, "type": "identifier", "text": "hdoc", "parent": 356, "children": [], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 23}}, {"id": 358, "type": "field_identifier", "text": "buff", "parent": 356, "children": [], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 29}}, {"id": 359, "type": "field_expression", "text": "hdoc->line", "parent": 355, "children": [360, 361], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 41}}, {"id": 360, "type": "identifier", "text": "hdoc", "parent": 359, "children": [], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 35}}, {"id": 361, "type": "field_identifier", "text": "line", "parent": 359, "children": [], "start_point": {"row": 67, "column": 37}, "end_point": {"row": 67, "column": 41}}, {"id": 362, "type": "call_expression", "text": "print_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE)", "parent": 351, "children": [363, 364], "start_point": {"row": 69, "column": 3}, "end_point": {"row": 69, "column": 55}}, {"id": 363, "type": "identifier", "text": "print_error", "parent": 362, "children": [], "start_point": {"row": 69, "column": 3}, "end_point": {"row": 69, "column": 14}}, {"id": 364, "type": "argument_list", "text": "(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE)", "parent": 362, "children": [365, 366, 367, 369], "start_point": {"row": 69, "column": 14}, "end_point": {"row": 69, "column": 55}}, {"id": 365, "type": "identifier", "text": "MSG_MSH", "parent": 364, "children": [], "start_point": {"row": 69, "column": 15}, "end_point": {"row": 69, "column": 22}}, {"id": 366, "type": "identifier", "text": "ERR_MALLOC", "parent": 364, "children": [], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 34}}, {"id": 367, "type": "null", "text": "NULL", "parent": 364, "children": [368], "start_point": {"row": 69, "column": 36}, "end_point": {"row": 69, "column": 40}}, {"id": 368, "type": "NULL", "text": "NULL", "parent": 367, "children": [], "start_point": {"row": 69, "column": 36}, "end_point": {"row": 69, "column": 40}}, {"id": 369, "type": "identifier", "text": "EXIT_FAILURE", "parent": 364, "children": [], "start_point": {"row": 69, "column": 42}, "end_point": {"row": 69, "column": 54}}, {"id": 370, "type": "return_statement", "text": "return ;", "parent": 351, "children": [], "start_point": {"row": 70, "column": 3}, "end_point": {"row": 70, "column": 11}}, {"id": 371, "type": "assignment_expression", "text": "hdoc->ptr_r = hdoc->line", "parent": 305, "children": [372, 375, 376], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 26}}, {"id": 372, "type": "field_expression", "text": "hdoc->ptr_r", "parent": 371, "children": [373, 374], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 13}}, {"id": 373, "type": "identifier", "text": "hdoc", "parent": 372, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 6}}, {"id": 374, "type": "field_identifier", "text": "ptr_r", "parent": 372, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 13}}, {"id": 375, "type": "=", "text": "=", "parent": 371, "children": [], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 15}}, {"id": 376, "type": "field_expression", "text": "hdoc->line", "parent": 371, "children": [377, 378], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 26}}, {"id": 377, "type": "identifier", "text": "hdoc", "parent": 376, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 20}}, {"id": 378, "type": "field_identifier", "text": "line", "parent": 376, "children": [], "start_point": {"row": 72, "column": 22}, "end_point": {"row": 72, "column": 26}}, {"id": 379, "type": "call_expression", "text": "hdoc_if_dollar(hdoc)", "parent": 305, "children": [380, 381], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 22}}, {"id": 380, "type": "identifier", "text": "hdoc_if_dollar", "parent": 379, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 16}}, {"id": 381, "type": "argument_list", "text": "(hdoc)", "parent": 379, "children": [382], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 22}}, {"id": 382, "type": "identifier", "text": "hdoc", "parent": 381, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 21}}, {"id": 383, "type": "assignment_expression", "text": "*hdoc->buff->ptr = '\\0'", "parent": 305, "children": [384, 391, 392], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 25}}, {"id": 384, "type": "pointer_expression", "text": "*hdoc->buff->ptr", "parent": 383, "children": [385, 386], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 18}}, {"id": 385, "type": "*", "text": "*", "parent": 384, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 3}}, {"id": 386, "type": "field_expression", "text": "hdoc->buff->ptr", "parent": 384, "children": [387, 390], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 18}}, {"id": 387, "type": "field_expression", "text": "hdoc->buff", "parent": 386, "children": [388, 389], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 13}}, {"id": 388, "type": "identifier", "text": "hdoc", "parent": 387, "children": [], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 7}}, {"id": 389, "type": "field_identifier", "text": "buff", "parent": 387, "children": [], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 13}}, {"id": 390, "type": "field_identifier", "text": "ptr", "parent": 386, "children": [], "start_point": {"row": 74, "column": 15}, "end_point": {"row": 74, "column": 18}}, {"id": 391, "type": "=", "text": "=", "parent": 383, "children": [], "start_point": {"row": 74, "column": 19}, "end_point": {"row": 74, "column": 20}}, {"id": 392, "type": "char_literal", "text": "'\\0'", "parent": 383, "children": [393, 394, 395], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 25}}, {"id": 393, "type": "'", "text": "'", "parent": 392, "children": [], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 22}}, {"id": 394, "type": "escape_sequence", "text": "\\0", "parent": 392, "children": [], "start_point": {"row": 74, "column": 22}, "end_point": {"row": 74, "column": 24}}, {"id": 395, "type": "'", "text": "'", "parent": 392, "children": [], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 25}}, {"id": 396, "type": "call_expression", "text": "write(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str))", "parent": 305, "children": [397, 398], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 69}}, {"id": 397, "type": "identifier", "text": "write", "parent": 396, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 7}}, {"id": 398, "type": "argument_list", "text": "(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str))", "parent": 396, "children": [399, 404, 409], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 69}}, {"id": 399, "type": "subscript_expression", "text": "hdoc->pipefd[1]", "parent": 398, "children": [400, 403], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 23}}, {"id": 400, "type": "field_expression", "text": "hdoc->pipefd", "parent": 399, "children": [401, 402], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 20}}, {"id": 401, "type": "identifier", "text": "hdoc", "parent": 400, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 12}}, {"id": 402, "type": "field_identifier", "text": "pipefd", "parent": 400, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 20}}, {"id": 403, "type": "number_literal", "text": "1", "parent": 399, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 22}}, {"id": 404, "type": "field_expression", "text": "hdoc->buff->str", "parent": 398, "children": [405, 408], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 40}}, {"id": 405, "type": "field_expression", "text": "hdoc->buff", "parent": 404, "children": [406, 407], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 35}}, {"id": 406, "type": "identifier", "text": "hdoc", "parent": 405, "children": [], "start_point": {"row": 75, "column": 25}, "end_point": {"row": 75, "column": 29}}, {"id": 407, "type": "field_identifier", "text": "buff", "parent": 405, "children": [], "start_point": {"row": 75, "column": 31}, "end_point": {"row": 75, "column": 35}}, {"id": 408, "type": "field_identifier", "text": "str", "parent": 404, "children": [], "start_point": {"row": 75, "column": 37}, "end_point": {"row": 75, "column": 40}}, {"id": 409, "type": "call_expression", "text": "ft_strlen(hdoc->buff->str)", "parent": 398, "children": [410, 411], "start_point": {"row": 75, "column": 42}, "end_point": {"row": 75, "column": 68}}, {"id": 410, "type": "identifier", "text": "ft_strlen", "parent": 409, "children": [], "start_point": {"row": 75, "column": 42}, "end_point": {"row": 75, "column": 51}}, {"id": 411, "type": "argument_list", "text": "(hdoc->buff->str)", "parent": 409, "children": [412], "start_point": {"row": 75, "column": 51}, "end_point": {"row": 75, "column": 68}}, {"id": 412, "type": "field_expression", "text": "hdoc->buff->str", "parent": 411, "children": [413, 416], "start_point": {"row": 75, "column": 52}, "end_point": {"row": 75, "column": 67}}, {"id": 413, "type": "field_expression", "text": "hdoc->buff", "parent": 412, "children": [414, 415], "start_point": {"row": 75, "column": 52}, "end_point": {"row": 75, "column": 62}}, {"id": 414, "type": "identifier", "text": "hdoc", "parent": 413, "children": [], "start_point": {"row": 75, "column": 52}, "end_point": {"row": 75, "column": 56}}, {"id": 415, "type": "field_identifier", "text": "buff", "parent": 413, "children": [], "start_point": {"row": 75, "column": 58}, "end_point": {"row": 75, "column": 62}}, {"id": 416, "type": "field_identifier", "text": "str", "parent": 412, "children": [], "start_point": {"row": 75, "column": 64}, "end_point": {"row": 75, "column": 67}}, {"id": 417, "type": "call_expression", "text": "write(hdoc->pipefd[1], \"\\n\", 1)", "parent": 305, "children": [418, 419], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 33}}, {"id": 418, "type": "identifier", "text": "write", "parent": 417, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 7}}, {"id": 419, "type": "argument_list", "text": "(hdoc->pipefd[1], \"\\n\", 1)", "parent": 417, "children": [420, 425, 427], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 33}}, {"id": 420, "type": "subscript_expression", "text": "hdoc->pipefd[1]", "parent": 419, "children": [421, 424], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 23}}, {"id": 421, "type": "field_expression", "text": "hdoc->pipefd", "parent": 420, "children": [422, 423], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 20}}, {"id": 422, "type": "identifier", "text": "hdoc", "parent": 421, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 12}}, {"id": 423, "type": "field_identifier", "text": "pipefd", "parent": 421, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 20}}, {"id": 424, "type": "number_literal", "text": "1", "parent": 420, "children": [], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 22}}, {"id": 425, "type": "string_literal", "text": "\"\\n\"", "parent": 419, "children": [426], "start_point": {"row": 76, "column": 25}, "end_point": {"row": 76, "column": 29}}, {"id": 426, "type": "escape_sequence", "text": "\\n", "parent": 425, "children": [], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 28}}, {"id": 427, "type": "number_literal", "text": "1", "parent": 419, "children": [], "start_point": {"row": 76, "column": 31}, "end_point": {"row": 76, "column": 32}}, {"id": 428, "type": "call_expression", "text": "free(hdoc->line)", "parent": 286, "children": [429, 430], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 17}}, {"id": 429, "type": "identifier", "text": "free", "parent": 428, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 5}}, {"id": 430, "type": "argument_list", "text": "(hdoc->line)", "parent": 428, "children": [431], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 17}}, {"id": 431, "type": "field_expression", "text": "hdoc->line", "parent": 430, "children": [432, 433], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 16}}, {"id": 432, "type": "identifier", "text": "hdoc", "parent": 431, "children": [], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 10}}, {"id": 433, "type": "field_identifier", "text": "line", "parent": 431, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 16}}, {"id": 434, "type": "call_expression", "text": "ft_vec_free(hdoc->buff)", "parent": 286, "children": [435, 436], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 24}}, {"id": 435, "type": "identifier", "text": "ft_vec_free", "parent": 434, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 12}}, {"id": 436, "type": "argument_list", "text": "(hdoc->buff)", "parent": 434, "children": [437], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 24}}, {"id": 437, "type": "field_expression", "text": "hdoc->buff", "parent": 436, "children": [438, 439], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 23}}, {"id": 438, "type": "identifier", "text": "hdoc", "parent": 437, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 17}}, {"id": 439, "type": "field_identifier", "text": "buff", "parent": 437, "children": [], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 23}}, {"id": 440, "type": "function_definition", "text": "static void\tpid_is_null(t_hdoc *hdoc)\n{\n\tg_sig = 1;\n\tsignal(SIGINT, SIG_DFL);\n\tread_heredoc(hdoc);\n\tclose(hdoc->pipefd[1]);\n\tclose(hdoc->pipefd[0]);\n\texit(0);\n}", "parent": null, "children": [441, 442], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 90, "column": 1}}, {"id": 441, "type": "primitive_type", "text": "void", "parent": 440, "children": [], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 82, "column": 11}}, {"id": 442, "type": "function_declarator", "text": "pid_is_null(t_hdoc *hdoc)", "parent": 440, "children": [443, 444], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 37}}, {"id": 443, "type": "identifier", "text": "pid_is_null", "parent": 442, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 23}}, {"id": 444, "type": "parameter_list", "text": "(t_hdoc *hdoc)", "parent": 442, "children": [445], "start_point": {"row": 82, "column": 23}, "end_point": {"row": 82, "column": 37}}, {"id": 445, "type": "parameter_declaration", "text": "t_hdoc *hdoc", "parent": 444, "children": [446, 447], "start_point": {"row": 82, "column": 24}, "end_point": {"row": 82, "column": 36}}, {"id": 446, "type": "type_identifier", "text": "t_hdoc", "parent": 445, "children": [], "start_point": {"row": 82, "column": 24}, "end_point": {"row": 82, "column": 30}}, {"id": 447, "type": "pointer_declarator", "text": "*hdoc", "parent": 445, "children": [448, 449], "start_point": {"row": 82, "column": 31}, "end_point": {"row": 82, "column": 36}}, {"id": 448, "type": "*", "text": "*", "parent": 447, "children": [], "start_point": {"row": 82, "column": 31}, "end_point": {"row": 82, "column": 32}}, {"id": 449, "type": "identifier", "text": "hdoc", "parent": 447, "children": [], "start_point": {"row": 82, "column": 32}, "end_point": {"row": 82, "column": 36}}, {"id": 450, "type": "assignment_expression", "text": "g_sig = 1", "parent": 440, "children": [451, 452, 453], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 10}}, {"id": 451, "type": "identifier", "text": "g_sig", "parent": 450, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 6}}, {"id": 452, "type": "=", "text": "=", "parent": 450, "children": [], "start_point": {"row": 84, "column": 7}, "end_point": {"row": 84, "column": 8}}, {"id": 453, "type": "number_literal", "text": "1", "parent": 450, "children": [], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 10}}, {"id": 454, "type": "call_expression", "text": "signal(SIGINT, SIG_DFL)", "parent": 440, "children": [455, 456], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 24}}, {"id": 455, "type": "identifier", "text": "signal", "parent": 454, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 7}}, {"id": 456, "type": "argument_list", "text": "(SIGINT, SIG_DFL)", "parent": 454, "children": [457, 458], "start_point": {"row": 85, "column": 7}, "end_point": {"row": 85, "column": 24}}, {"id": 457, "type": "identifier", "text": "SIGINT", "parent": 456, "children": [], "start_point": {"row": 85, "column": 8}, "end_point": {"row": 85, "column": 14}}, {"id": 458, "type": "identifier", "text": "SIG_DFL", "parent": 456, "children": [], "start_point": {"row": 85, "column": 16}, "end_point": {"row": 85, "column": 23}}, {"id": 459, "type": "call_expression", "text": "read_heredoc(hdoc)", "parent": 440, "children": [460, 461], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 19}}, {"id": 460, "type": "identifier", "text": "read_heredoc", "parent": 459, "children": [], "start_point": {"row": 86, "column": 1}, "end_point": {"row": 86, "column": 13}}, {"id": 461, "type": "argument_list", "text": "(hdoc)", "parent": 459, "children": [462], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 19}}, {"id": 462, "type": "identifier", "text": "hdoc", "parent": 461, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 18}}, {"id": 463, "type": "call_expression", "text": "close(hdoc->pipefd[1])", "parent": 440, "children": [464, 465], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 23}}, {"id": 464, "type": "identifier", "text": "close", "parent": 463, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 6}}, {"id": 465, "type": "argument_list", "text": "(hdoc->pipefd[1])", "parent": 463, "children": [466], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 23}}, {"id": 466, "type": "subscript_expression", "text": "hdoc->pipefd[1]", "parent": 465, "children": [467, 470], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 22}}, {"id": 467, "type": "field_expression", "text": "hdoc->pipefd", "parent": 466, "children": [468, 469], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 19}}, {"id": 468, "type": "identifier", "text": "hdoc", "parent": 467, "children": [], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 11}}, {"id": 469, "type": "field_identifier", "text": "pipefd", "parent": 467, "children": [], "start_point": {"row": 87, "column": 13}, "end_point": {"row": 87, "column": 19}}, {"id": 470, "type": "number_literal", "text": "1", "parent": 466, "children": [], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 21}}, {"id": 471, "type": "call_expression", "text": "close(hdoc->pipefd[0])", "parent": 440, "children": [472, 473], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 23}}, {"id": 472, "type": "identifier", "text": "close", "parent": 471, "children": [], "start_point": {"row": 88, "column": 1}, "end_point": {"row": 88, "column": 6}}, {"id": 473, "type": "argument_list", "text": "(hdoc->pipefd[0])", "parent": 471, "children": [474], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 23}}, {"id": 474, "type": "subscript_expression", "text": "hdoc->pipefd[0]", "parent": 473, "children": [475, 478], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 22}}, {"id": 475, "type": "field_expression", "text": "hdoc->pipefd", "parent": 474, "children": [476, 477], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 19}}, {"id": 476, "type": "identifier", "text": "hdoc", "parent": 475, "children": [], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 11}}, {"id": 477, "type": "field_identifier", "text": "pipefd", "parent": 475, "children": [], "start_point": {"row": 88, "column": 13}, "end_point": {"row": 88, "column": 19}}, {"id": 478, "type": "number_literal", "text": "0", "parent": 474, "children": [], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 21}}, {"id": 479, "type": "call_expression", "text": "exit(0)", "parent": 440, "children": [480, 481], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 8}}, {"id": 480, "type": "identifier", "text": "exit", "parent": 479, "children": [], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 5}}, {"id": 481, "type": "argument_list", "text": "(0)", "parent": 479, "children": [482], "start_point": {"row": 89, "column": 5}, "end_point": {"row": 89, "column": 8}}, {"id": 482, "type": "number_literal", "text": "0", "parent": 481, "children": [], "start_point": {"row": 89, "column": 6}, "end_point": {"row": 89, "column": 7}}, {"id": 483, "type": "function_definition", "text": "int\theredoc(t_msh *msh, t_ast *ast)\n{\n\tpid_t\tpid;\n\tt_hdoc\thdoc;\n\tint\t\tret;\n\n\thdoc.eof = ast->right->lex;\n\thdoc.msh = msh;\n\tif (pipe(hdoc.pipefd) == -1)\n\t\treturn (print_error(MSG_PIPE, strerror(errno), \"\\n\", EXIT_FAILURE));\n\tpid = fork();\n\tif (pid < 0)\n\t\treturn (print_error(MSG_FORK, strerror(errno), \"\\n\", EXIT_FAILURE));\n\tif (pid == 0)\n\t\tpid_is_null(&hdoc);\n\tsignal(SIGINT, SIG_IGN);\n\twaitpid(pid, &ret, 0);\n\tsignal(SIGINT, handle_sigint);\n\tif (WIFSIGNALED(ret))\n\t\tprintf(\"\\n\");\n\tclose(hdoc.pipefd[1]);\n\tif (ret)\n\t{\n\t\tclose(hdoc.pipefd[0]);\n\t\treturn (-1);\n\t}\n\treturn (hdoc.pipefd[0]);\n}", "parent": null, "children": [484, 485], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 119, "column": 1}}, {"id": 484, "type": "primitive_type", "text": "int", "parent": 483, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 3}}, {"id": 485, "type": "function_declarator", "text": "heredoc(t_msh *msh, t_ast *ast)", "parent": 483, "children": [486, 487], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 35}}, {"id": 486, "type": "identifier", "text": "heredoc", "parent": 485, "children": [], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 11}}, {"id": 487, "type": "parameter_list", "text": "(t_msh *msh, t_ast *ast)", "parent": 485, "children": [488, 493], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 35}}, {"id": 488, "type": "parameter_declaration", "text": "t_msh *msh", "parent": 487, "children": [489, 490], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 22}}, {"id": 489, "type": "type_identifier", "text": "t_msh", "parent": 488, "children": [], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 17}}, {"id": 490, "type": "pointer_declarator", "text": "*msh", "parent": 488, "children": [491, 492], "start_point": {"row": 92, "column": 18}, "end_point": {"row": 92, "column": 22}}, {"id": 491, "type": "*", "text": "*", "parent": 490, "children": [], "start_point": {"row": 92, "column": 18}, "end_point": {"row": 92, "column": 19}}, {"id": 492, "type": "identifier", "text": "msh", "parent": 490, "children": [], "start_point": {"row": 92, "column": 19}, "end_point": {"row": 92, "column": 22}}, {"id": 493, "type": "parameter_declaration", "text": "t_ast *ast", "parent": 487, "children": [494, 495], "start_point": {"row": 92, "column": 24}, "end_point": {"row": 92, "column": 34}}, {"id": 494, "type": "type_identifier", "text": "t_ast", "parent": 493, "children": [], "start_point": {"row": 92, "column": 24}, "end_point": {"row": 92, "column": 29}}, {"id": 495, "type": "pointer_declarator", "text": "*ast", "parent": 493, "children": [496, 497], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 34}}, {"id": 496, "type": "*", "text": "*", "parent": 495, "children": [], "start_point": {"row": 92, "column": 30}, "end_point": {"row": 92, "column": 31}}, {"id": 497, "type": "identifier", "text": "ast", "parent": 495, "children": [], "start_point": {"row": 92, "column": 31}, "end_point": {"row": 92, "column": 34}}, {"id": 498, "type": "declaration", "text": "pid_t\tpid;", "parent": 483, "children": [499, 500], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 11}}, {"id": 499, "type": "type_identifier", "text": "pid_t", "parent": 498, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 6}}, {"id": 500, "type": "identifier", "text": "pid", "parent": 498, "children": [], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 10}}, {"id": 501, "type": "declaration", "text": "t_hdoc\thdoc;", "parent": 483, "children": [502, 503], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 13}}, {"id": 502, "type": "type_identifier", "text": "t_hdoc", "parent": 501, "children": [], "start_point": {"row": 95, "column": 1}, "end_point": {"row": 95, "column": 7}}, {"id": 503, "type": "identifier", "text": "hdoc", "parent": 501, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 12}}, {"id": 504, "type": "declaration", "text": "int\t\tret;", "parent": 483, "children": [505, 506], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 10}}, {"id": 505, "type": "primitive_type", "text": "int", "parent": 504, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 4}}, {"id": 506, "type": "identifier", "text": "ret", "parent": 504, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 9}}, {"id": 507, "type": "assignment_expression", "text": "hdoc.eof = ast->right->lex", "parent": 483, "children": [508, 511, 512], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 27}}, {"id": 508, "type": "field_expression", "text": "hdoc.eof", "parent": 507, "children": [509, 510], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 9}}, {"id": 509, "type": "identifier", "text": "hdoc", "parent": 508, "children": [], "start_point": {"row": 98, "column": 1}, "end_point": {"row": 98, "column": 5}}, {"id": 510, "type": "field_identifier", "text": "eof", "parent": 508, "children": [], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 9}}, {"id": 511, "type": "=", "text": "=", "parent": 507, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 11}}, {"id": 512, "type": "field_expression", "text": "ast->right->lex", "parent": 507, "children": [513, 516], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 27}}, {"id": 513, "type": "field_expression", "text": "ast->right", "parent": 512, "children": [514, 515], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 22}}, {"id": 514, "type": "identifier", "text": "ast", "parent": 513, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 15}}, {"id": 515, "type": "field_identifier", "text": "right", "parent": 513, "children": [], "start_point": {"row": 98, "column": 17}, "end_point": {"row": 98, "column": 22}}, {"id": 516, "type": "field_identifier", "text": "lex", "parent": 512, "children": [], "start_point": {"row": 98, "column": 24}, "end_point": {"row": 98, "column": 27}}, {"id": 517, "type": "assignment_expression", "text": "hdoc.msh = msh", "parent": 483, "children": [518, 521, 522], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 15}}, {"id": 518, "type": "field_expression", "text": "hdoc.msh", "parent": 517, "children": [519, 520], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 9}}, {"id": 519, "type": "identifier", "text": "hdoc", "parent": 518, "children": [], "start_point": {"row": 99, "column": 1}, "end_point": {"row": 99, "column": 5}}, {"id": 520, "type": "field_identifier", "text": "msh", "parent": 518, "children": [], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 9}}, {"id": 521, "type": "=", "text": "=", "parent": 517, "children": [], "start_point": {"row": 99, "column": 10}, "end_point": {"row": 99, "column": 11}}, {"id": 522, "type": "identifier", "text": "msh", "parent": 517, "children": [], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 15}}, {"id": 523, "type": "if_statement", "text": "if (pipe(hdoc.pipefd) == -1)\n\t\treturn (print_error(MSG_PIPE, strerror(errno), \"\\n\", EXIT_FAILURE));", "parent": 483, "children": [524, 534], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 101, "column": 70}}, {"id": 524, "type": "parenthesized_expression", "text": "(pipe(hdoc.pipefd) == -1)", "parent": 523, "children": [525], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 29}}, {"id": 525, "type": "binary_expression", "text": "pipe(hdoc.pipefd) == -1", "parent": 524, "children": [526, 532, 533], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 28}}, {"id": 526, "type": "call_expression", "text": "pipe(hdoc.pipefd)", "parent": 525, "children": [527, 528], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 22}}, {"id": 527, "type": "identifier", "text": "pipe", "parent": 526, "children": [], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 9}}, {"id": 528, "type": "argument_list", "text": "(hdoc.pipefd)", "parent": 526, "children": [529], "start_point": {"row": 100, "column": 9}, "end_point": {"row": 100, "column": 22}}, {"id": 529, "type": "field_expression", "text": "hdoc.pipefd", "parent": 528, "children": [530, 531], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 21}}, {"id": 530, "type": "identifier", "text": "hdoc", "parent": 529, "children": [], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 14}}, {"id": 531, "type": "field_identifier", "text": "pipefd", "parent": 529, "children": [], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 21}}, {"id": 532, "type": "==", "text": "==", "parent": 525, "children": [], "start_point": {"row": 100, "column": 23}, "end_point": {"row": 100, "column": 25}}, {"id": 533, "type": "number_literal", "text": "-1", "parent": 525, "children": [], "start_point": {"row": 100, "column": 26}, "end_point": {"row": 100, "column": 28}}, {"id": 534, "type": "return_statement", "text": "return (print_error(MSG_PIPE, strerror(errno), \"\\n\", EXIT_FAILURE));", "parent": 523, "children": [535], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 70}}, {"id": 535, "type": "parenthesized_expression", "text": "(print_error(MSG_PIPE, strerror(errno), \"\\n\", EXIT_FAILURE))", "parent": 534, "children": [536], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 69}}, {"id": 536, "type": "call_expression", "text": "print_error(MSG_PIPE, strerror(errno), \"\\n\", EXIT_FAILURE)", "parent": 535, "children": [537, 538], "start_point": {"row": 101, "column": 10}, "end_point": {"row": 101, "column": 68}}, {"id": 537, "type": "identifier", "text": "print_error", "parent": 536, "children": [], "start_point": {"row": 101, "column": 10}, "end_point": {"row": 101, "column": 21}}, {"id": 538, "type": "argument_list", "text": "(MSG_PIPE, strerror(errno), \"\\n\", EXIT_FAILURE)", "parent": 536, "children": [539, 540, 544, 546], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 68}}, {"id": 539, "type": "identifier", "text": "MSG_PIPE", "parent": 538, "children": [], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 30}}, {"id": 540, "type": "call_expression", "text": "strerror(errno)", "parent": 538, "children": [541, 542], "start_point": {"row": 101, "column": 32}, "end_point": {"row": 101, "column": 47}}, {"id": 541, "type": "identifier", "text": "strerror", "parent": 540, "children": [], "start_point": {"row": 101, "column": 32}, "end_point": {"row": 101, "column": 40}}, {"id": 542, "type": "argument_list", "text": "(errno)", "parent": 540, "children": [543], "start_point": {"row": 101, "column": 40}, "end_point": {"row": 101, "column": 47}}, {"id": 543, "type": "identifier", "text": "errno", "parent": 542, "children": [], "start_point": {"row": 101, "column": 41}, "end_point": {"row": 101, "column": 46}}, {"id": 544, "type": "string_literal", "text": "\"\\n\"", "parent": 538, "children": [545], "start_point": {"row": 101, "column": 49}, "end_point": {"row": 101, "column": 53}}, {"id": 545, "type": "escape_sequence", "text": "\\n", "parent": 544, "children": [], "start_point": {"row": 101, "column": 50}, "end_point": {"row": 101, "column": 52}}, {"id": 546, "type": "identifier", "text": "EXIT_FAILURE", "parent": 538, "children": [], "start_point": {"row": 101, "column": 55}, "end_point": {"row": 101, "column": 67}}, {"id": 547, "type": "assignment_expression", "text": "pid = fork()", "parent": 483, "children": [548, 549, 550], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 13}}, {"id": 548, "type": "identifier", "text": "pid", "parent": 547, "children": [], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 4}}, {"id": 549, "type": "=", "text": "=", "parent": 547, "children": [], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 6}}, {"id": 550, "type": "call_expression", "text": "fork()", "parent": 547, "children": [551, 552], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 13}}, {"id": 551, "type": "identifier", "text": "fork", "parent": 550, "children": [], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 11}}, {"id": 552, "type": "argument_list", "text": "()", "parent": 550, "children": [], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 13}}, {"id": 553, "type": "if_statement", "text": "if (pid < 0)\n\t\treturn (print_error(MSG_FORK, strerror(errno), \"\\n\", EXIT_FAILURE));", "parent": 483, "children": [554, 559], "start_point": {"row": 103, "column": 1}, "end_point": {"row": 104, "column": 70}}, {"id": 554, "type": "parenthesized_expression", "text": "(pid < 0)", "parent": 553, "children": [555], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 13}}, {"id": 555, "type": "binary_expression", "text": "pid < 0", "parent": 554, "children": [556, 557, 558], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 12}}, {"id": 556, "type": "identifier", "text": "pid", "parent": 555, "children": [], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 8}}, {"id": 557, "type": "<", "text": "<", "parent": 555, "children": [], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 10}}, {"id": 558, "type": "number_literal", "text": "0", "parent": 555, "children": [], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 12}}, {"id": 559, "type": "return_statement", "text": "return (print_error(MSG_FORK, strerror(errno), \"\\n\", EXIT_FAILURE));", "parent": 553, "children": [560], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 70}}, {"id": 560, "type": "parenthesized_expression", "text": "(print_error(MSG_FORK, strerror(errno), \"\\n\", EXIT_FAILURE))", "parent": 559, "children": [561], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 69}}, {"id": 561, "type": "call_expression", "text": "print_error(MSG_FORK, strerror(errno), \"\\n\", EXIT_FAILURE)", "parent": 560, "children": [562, 563], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 68}}, {"id": 562, "type": "identifier", "text": "print_error", "parent": 561, "children": [], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 21}}, {"id": 563, "type": "argument_list", "text": "(MSG_FORK, strerror(errno), \"\\n\", EXIT_FAILURE)", "parent": 561, "children": [564, 565, 569, 571], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 68}}, {"id": 564, "type": "identifier", "text": "MSG_FORK", "parent": 563, "children": [], "start_point": {"row": 104, "column": 22}, "end_point": {"row": 104, "column": 30}}, {"id": 565, "type": "call_expression", "text": "strerror(errno)", "parent": 563, "children": [566, 567], "start_point": {"row": 104, "column": 32}, "end_point": {"row": 104, "column": 47}}, {"id": 566, "type": "identifier", "text": "strerror", "parent": 565, "children": [], "start_point": {"row": 104, "column": 32}, "end_point": {"row": 104, "column": 40}}, {"id": 567, "type": "argument_list", "text": "(errno)", "parent": 565, "children": [568], "start_point": {"row": 104, "column": 40}, "end_point": {"row": 104, "column": 47}}, {"id": 568, "type": "identifier", "text": "errno", "parent": 567, "children": [], "start_point": {"row": 104, "column": 41}, "end_point": {"row": 104, "column": 46}}, {"id": 569, "type": "string_literal", "text": "\"\\n\"", "parent": 563, "children": [570], "start_point": {"row": 104, "column": 49}, "end_point": {"row": 104, "column": 53}}, {"id": 570, "type": "escape_sequence", "text": "\\n", "parent": 569, "children": [], "start_point": {"row": 104, "column": 50}, "end_point": {"row": 104, "column": 52}}, {"id": 571, "type": "identifier", "text": "EXIT_FAILURE", "parent": 563, "children": [], "start_point": {"row": 104, "column": 55}, "end_point": {"row": 104, "column": 67}}, {"id": 572, "type": "if_statement", "text": "if (pid == 0)\n\t\tpid_is_null(&hdoc);", "parent": 483, "children": [573], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 106, "column": 21}}, {"id": 573, "type": "parenthesized_expression", "text": "(pid == 0)", "parent": 572, "children": [574], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 14}}, {"id": 574, "type": "binary_expression", "text": "pid == 0", "parent": 573, "children": [575, 576, 577], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 105, "column": 13}}, {"id": 575, "type": "identifier", "text": "pid", "parent": 574, "children": [], "start_point": {"row": 105, "column": 5}, "end_point": {"row": 105, "column": 8}}, {"id": 576, "type": "==", "text": "==", "parent": 574, "children": [], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 11}}, {"id": 577, "type": "number_literal", "text": "0", "parent": 574, "children": [], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 13}}, {"id": 578, "type": "call_expression", "text": "pid_is_null(&hdoc)", "parent": 572, "children": [579, 580], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 106, "column": 20}}, {"id": 579, "type": "identifier", "text": "pid_is_null", "parent": 578, "children": [], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 106, "column": 13}}, {"id": 580, "type": "argument_list", "text": "(&hdoc)", "parent": 578, "children": [581], "start_point": {"row": 106, "column": 13}, "end_point": {"row": 106, "column": 20}}, {"id": 581, "type": "pointer_expression", "text": "&hdoc", "parent": 580, "children": [582], "start_point": {"row": 106, "column": 14}, "end_point": {"row": 106, "column": 19}}, {"id": 582, "type": "identifier", "text": "hdoc", "parent": 581, "children": [], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 19}}, {"id": 583, "type": "call_expression", "text": "signal(SIGINT, SIG_IGN)", "parent": 483, "children": [584, 585], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 24}}, {"id": 584, "type": "identifier", "text": "signal", "parent": 583, "children": [], "start_point": {"row": 107, "column": 1}, "end_point": {"row": 107, "column": 7}}, {"id": 585, "type": "argument_list", "text": "(SIGINT, SIG_IGN)", "parent": 583, "children": [586, 587], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 24}}, {"id": 586, "type": "identifier", "text": "SIGINT", "parent": 585, "children": [], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 14}}, {"id": 587, "type": "identifier", "text": "SIG_IGN", "parent": 585, "children": [], "start_point": {"row": 107, "column": 16}, "end_point": {"row": 107, "column": 23}}, {"id": 588, "type": "call_expression", "text": "waitpid(pid, &ret, 0)", "parent": 483, "children": [589, 590], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 22}}, {"id": 589, "type": "identifier", "text": "waitpid", "parent": 588, "children": [], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 8}}, {"id": 590, "type": "argument_list", "text": "(pid, &ret, 0)", "parent": 588, "children": [591, 592, 594], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 22}}, {"id": 591, "type": "identifier", "text": "pid", "parent": 590, "children": [], "start_point": {"row": 108, "column": 9}, "end_point": {"row": 108, "column": 12}}, {"id": 592, "type": "pointer_expression", "text": "&ret", "parent": 590, "children": [593], "start_point": {"row": 108, "column": 14}, "end_point": {"row": 108, "column": 18}}, {"id": 593, "type": "identifier", "text": "ret", "parent": 592, "children": [], "start_point": {"row": 108, "column": 15}, "end_point": {"row": 108, "column": 18}}, {"id": 594, "type": "number_literal", "text": "0", "parent": 590, "children": [], "start_point": {"row": 108, "column": 20}, "end_point": {"row": 108, "column": 21}}, {"id": 595, "type": "call_expression", "text": "signal(SIGINT, handle_sigint)", "parent": 483, "children": [596, 597], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 30}}, {"id": 596, "type": "identifier", "text": "signal", "parent": 595, "children": [], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 7}}, {"id": 597, "type": "argument_list", "text": "(SIGINT, handle_sigint)", "parent": 595, "children": [598, 599], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 30}}, {"id": 598, "type": "identifier", "text": "SIGINT", "parent": 597, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 14}}, {"id": 599, "type": "identifier", "text": "handle_sigint", "parent": 597, "children": [], "start_point": {"row": 109, "column": 16}, "end_point": {"row": 109, "column": 29}}, {"id": 600, "type": "if_statement", "text": "if (WIFSIGNALED(ret))\n\t\tprintf(\"\\n\");", "parent": 483, "children": [601], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 111, "column": 15}}, {"id": 601, "type": "parenthesized_expression", "text": "(WIFSIGNALED(ret))", "parent": 600, "children": [602], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 22}}, {"id": 602, "type": "call_expression", "text": "WIFSIGNALED(ret)", "parent": 601, "children": [603, 604], "start_point": {"row": 110, "column": 5}, "end_point": {"row": 110, "column": 21}}, {"id": 603, "type": "identifier", "text": "WIFSIGNALED", "parent": 602, "children": [], "start_point": {"row": 110, "column": 5}, "end_point": {"row": 110, "column": 16}}, {"id": 604, "type": "argument_list", "text": "(ret)", "parent": 602, "children": [605], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 21}}, {"id": 605, "type": "identifier", "text": "ret", "parent": 604, "children": [], "start_point": {"row": 110, "column": 17}, "end_point": {"row": 110, "column": 20}}, {"id": 606, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 600, "children": [607, 608], "start_point": {"row": 111, "column": 2}, "end_point": {"row": 111, "column": 14}}, {"id": 607, "type": "identifier", "text": "printf", "parent": 606, "children": [], "start_point": {"row": 111, "column": 2}, "end_point": {"row": 111, "column": 8}}, {"id": 608, "type": "argument_list", "text": "(\"\\n\")", "parent": 606, "children": [609], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 14}}, {"id": 609, "type": "string_literal", "text": "\"\\n\"", "parent": 608, "children": [610], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 13}}, {"id": 610, "type": "escape_sequence", "text": "\\n", "parent": 609, "children": [], "start_point": {"row": 111, "column": 10}, "end_point": {"row": 111, "column": 12}}, {"id": 611, "type": "call_expression", "text": "close(hdoc.pipefd[1])", "parent": 483, "children": [612, 613], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 22}}, {"id": 612, "type": "identifier", "text": "close", "parent": 611, "children": [], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 6}}, {"id": 613, "type": "argument_list", "text": "(hdoc.pipefd[1])", "parent": 611, "children": [614], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 112, "column": 22}}, {"id": 614, "type": "subscript_expression", "text": "hdoc.pipefd[1]", "parent": 613, "children": [615, 618], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 21}}, {"id": 615, "type": "field_expression", "text": "hdoc.pipefd", "parent": 614, "children": [616, 617], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 18}}, {"id": 616, "type": "identifier", "text": "hdoc", "parent": 615, "children": [], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 11}}, {"id": 617, "type": "field_identifier", "text": "pipefd", "parent": 615, "children": [], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 18}}, {"id": 618, "type": "number_literal", "text": "1", "parent": 614, "children": [], "start_point": {"row": 112, "column": 19}, "end_point": {"row": 112, "column": 20}}, {"id": 619, "type": "if_statement", "text": "if (ret)\n\t{\n\t\tclose(hdoc.pipefd[0]);\n\t\treturn (-1);\n\t}", "parent": 483, "children": [620], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 117, "column": 2}}, {"id": 620, "type": "parenthesized_expression", "text": "(ret)", "parent": 619, "children": [621], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 9}}, {"id": 621, "type": "identifier", "text": "ret", "parent": 620, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 8}}, {"id": 622, "type": "call_expression", "text": "close(hdoc.pipefd[0])", "parent": 619, "children": [623, 624], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 23}}, {"id": 623, "type": "identifier", "text": "close", "parent": 622, "children": [], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 7}}, {"id": 624, "type": "argument_list", "text": "(hdoc.pipefd[0])", "parent": 622, "children": [625], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 23}}, {"id": 625, "type": "subscript_expression", "text": "hdoc.pipefd[0]", "parent": 624, "children": [626, 629], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 22}}, {"id": 626, "type": "field_expression", "text": "hdoc.pipefd", "parent": 625, "children": [627, 628], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 19}}, {"id": 627, "type": "identifier", "text": "hdoc", "parent": 626, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 12}}, {"id": 628, "type": "field_identifier", "text": "pipefd", "parent": 626, "children": [], "start_point": {"row": 115, "column": 13}, "end_point": {"row": 115, "column": 19}}, {"id": 629, "type": "number_literal", "text": "0", "parent": 625, "children": [], "start_point": {"row": 115, "column": 20}, "end_point": {"row": 115, "column": 21}}, {"id": 630, "type": "return_statement", "text": "return (-1);", "parent": 619, "children": [631], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 116, "column": 14}}, {"id": 631, "type": "parenthesized_expression", "text": "(-1)", "parent": 630, "children": [632], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 13}}, {"id": 632, "type": "number_literal", "text": "-1", "parent": 631, "children": [], "start_point": {"row": 116, "column": 10}, "end_point": {"row": 116, "column": 12}}, {"id": 633, "type": "return_statement", "text": "return (hdoc.pipefd[0]);", "parent": 483, "children": [634], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 25}}, {"id": 634, "type": "parenthesized_expression", "text": "(hdoc.pipefd[0])", "parent": 633, "children": [635], "start_point": {"row": 118, "column": 8}, "end_point": {"row": 118, "column": 24}}, {"id": 635, "type": "subscript_expression", "text": "hdoc.pipefd[0]", "parent": 634, "children": [636, 639], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 23}}, {"id": 636, "type": "field_expression", "text": "hdoc.pipefd", "parent": 635, "children": [637, 638], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 20}}, {"id": 637, "type": "identifier", "text": "hdoc", "parent": 636, "children": [], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 13}}, {"id": 638, "type": "field_identifier", "text": "pipefd", "parent": 636, "children": [], "start_point": {"row": 118, "column": 14}, "end_point": {"row": 118, "column": 20}}, {"id": 639, "type": "number_literal", "text": "0", "parent": 635, "children": [], "start_point": {"row": 118, "column": 21}, "end_point": {"row": 118, "column": 22}}]}, "node_categories": {"declarations": {"functions": [8, 10, 165, 167, 286, 288, 440, 442, 483, 485], "variables": [3, 13, 18, 23, 170, 291, 445, 488, 493, 498, 501, 504], "classes": [4], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [36, 39, 41, 42, 46, 51, 54, 55, 59, 62, 65, 69, 73, 79, 80, 81, 83, 94, 95, 101, 103, 104, 105, 111, 113, 114, 116, 117, 121, 122, 127, 128, 131, 135, 145, 146, 150, 152, 153, 154, 160, 162, 176, 177, 179, 183, 184, 185, 186, 188, 197, 198, 199, 200, 202, 203, 204, 215, 216, 218, 219, 220, 231, 233, 234, 235, 241, 243, 248, 249, 250, 252, 260, 266, 268, 269, 270, 276, 278, 281, 282, 297, 301, 306, 309, 310, 315, 316, 321, 325, 330, 331, 332, 334, 338, 340, 343, 346, 352, 353, 356, 359, 362, 372, 376, 379, 384, 386, 387, 396, 399, 400, 404, 405, 409, 412, 413, 417, 420, 421, 428, 431, 434, 437, 454, 459, 463, 466, 467, 471, 474, 475, 479, 508, 512, 513, 518, 524, 525, 526, 529, 535, 536, 540, 550, 554, 555, 560, 561, 565, 573, 574, 578, 581, 583, 588, 592, 595, 601, 602, 606, 611, 614, 615, 620, 622, 625, 626, 631, 634, 635, 636], "assignments": [28, 33, 48, 68, 91, 100, 149, 230, 265, 296, 308, 320, 371, 383, 450, 507, 517, 547], "loops": [144, 175, 305], "conditionals": [6, 7, 11, 14, 17, 22, 27, 29, 34, 37, 43, 44, 45, 47, 49, 52, 56, 57, 58, 60, 61, 63, 66, 67, 70, 71, 74, 78, 84, 85, 92, 96, 97, 98, 106, 107, 108, 118, 119, 120, 124, 126, 129, 132, 133, 134, 136, 138, 139, 142, 148, 155, 156, 157, 163, 168, 171, 174, 180, 181, 182, 189, 190, 205, 206, 221, 222, 236, 237, 238, 244, 245, 247, 253, 254, 261, 263, 271, 272, 273, 279, 280, 283, 284, 289, 292, 295, 298, 299, 302, 304, 311, 312, 313, 317, 318, 319, 322, 323, 326, 329, 335, 336, 341, 344, 345, 347, 348, 351, 354, 357, 358, 360, 361, 363, 365, 366, 369, 373, 374, 377, 378, 380, 382, 388, 389, 390, 397, 401, 402, 406, 407, 408, 410, 414, 415, 416, 418, 422, 423, 429, 432, 433, 435, 438, 439, 443, 446, 449, 451, 455, 457, 458, 460, 462, 464, 468, 469, 472, 476, 477, 480, 486, 489, 492, 494, 497, 499, 500, 502, 503, 506, 509, 510, 514, 515, 516, 519, 520, 522, 523, 527, 530, 531, 537, 539, 541, 543, 546, 548, 551, 553, 556, 562, 564, 566, 568, 571, 572, 575, 579, 582, 584, 586, 587, 589, 591, 593, 596, 598, 599, 600, 603, 605, 607, 612, 616, 617, 619, 621, 623, 627, 628, 637, 638], "returns": [125, 143, 370, 534, 559, 630, 633], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 76, 87, 192, 208, 210, 224, 226, 256, 307, 328, 392, 403, 424, 425, 427, 453, 470, 478, 482, 533, 544, 558, 569, 577, 594, 609, 618, 629, 632, 639], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 8, "universal_type": "function", "name": "hdoc_param_expansion", "text_snippet": "void\thdoc_param_expansion(t_hdoc *hdoc)\n{\n\tchar\t*ptr;\n\tchar\t*param;\n\n\tparam = NULL;\n\tptr = env_check"}, {"node_id": 10, "universal_type": "function", "name": "unknown", "text_snippet": "hdoc_param_expansion(t_hdoc *hdoc)"}, {"node_id": 165, "universal_type": "function", "name": "hdoc_if_dollar", "text_snippet": "static void\thdoc_if_dollar(t_hdoc *hdoc)\n{\n\twhile (*hdoc->ptr_r)\n\t{\n\t\tif (*hdoc->ptr_r == '$' && (*("}, {"node_id": 167, "universal_type": "function", "name": "unknown", "text_snippet": "hdoc_if_dollar(t_hdoc *hdoc)"}, {"node_id": 286, "universal_type": "function", "name": "read_heredoc", "text_snippet": "static void\tread_heredoc(t_hdoc *hdoc)\n{\n\thdoc->buff = ft_vec_new(DFLT_VEC_SIZE);\n\twhile (1)\n\t{\n\t\thd"}, {"node_id": 288, "universal_type": "function", "name": "unknown", "text_snippet": "read_heredoc(t_hdoc *hdoc)"}, {"node_id": 440, "universal_type": "function", "name": "pid_is_null", "text_snippet": "static void\tpid_is_null(t_hdoc *hdoc)\n{\n\tg_sig = 1;\n\tsignal(SIGINT, SIG_DFL);\n\tread_heredoc(hdoc);\n\t"}, {"node_id": 442, "universal_type": "function", "name": "unknown", "text_snippet": "pid_is_null(t_hdoc *hdoc)"}, {"node_id": 483, "universal_type": "function", "name": "heredoc", "text_snippet": "int\theredoc(t_msh *msh, t_ast *ast)\n{\n\tpid_t\tpid;\n\tt_hdoc\thdoc;\n\tint\t\tret;\n\n\thdoc.eof = ast->right->"}, {"node_id": 485, "universal_type": "function", "name": "unknown", "text_snippet": "heredoc(t_msh *msh, t_ast *ast)"}], "class_declarations": [{"node_id": 4, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 0, "text": "#include \"launcher.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/* ************************************************************************** */\n/* */\n/* ::: :::::::: */\n/* heredoc.c :+: :+: :+: */\n/* +:+ +:+ +:+ */\n/* By: tderwedu <<EMAIL>> +#+ +:+ +#+ */\n/* +#+#+#+#+#+ +#+ */\n/* Created: 2021/10/01 15:24:00 by namenega #+# #+# */\n/* Updated: 2021/10/13 10:04:30 by tderwedu ### ########.fr */\n/* */\n/* ************************************************************************** */\n\n#include \"launcher.h\"\n\nextern pid_t\tg_sig;\n\nvoid\thdoc_param_expansion(t_hdoc *hdoc)\n{\n\tchar\t*ptr;\n\tchar\t*param;\n\n\tparam = NULL;\n\tptr = env_check_name(++(hdoc->ptr_r));\n\tif (ptr)\n\t{\n\t\tparam = msh_getenv(hdoc->msh->env, hdoc->ptr_r, ptr - hdoc->ptr_r);\n\t\thdoc->ptr_r = ptr - 1;\n\t}\n\telse if (*hdoc->ptr_r == '?')\n\t\tparam = hdoc->msh->ret;\n\telse\n\t\t*hdoc->buff->ptr++ = *(--(hdoc->ptr_r));\n\tif (!param)\n\t\treturn ;\n\tif (ft_vec_check(hdoc->buff, param))\n\t{\n\t\tprint_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n\t\treturn ;\n\t}\n\twhile (*param)\n\t\t*hdoc->buff->ptr++ = *param++;\n}\n\nstatic void\thdoc_if_dollar(t_hdoc *hdoc)\n{\n\twhile (*hdoc->ptr_r)\n\t{\n\t\tif (*hdoc->ptr_r == '$' && (*(hdoc->ptr_r + 1) == '\\''\n\t\t\t\t|| *(hdoc->ptr_r + 1) == '\\\"'))\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;\n\t\telse if (*hdoc->ptr_r == '$')\n\t\t\thdoc_param_expansion(hdoc);\n\t\telse\n\t\t\t*hdoc->buff->ptr++ = *hdoc->ptr_r;\n\t\thdoc->ptr_r++;\n\t}\n}\n\nstatic void\tread_heredoc(t_hdoc *hdoc)\n{\n\thdoc->buff = ft_vec_new(DFLT_VEC_SIZE);\n\twhile (1)\n\t{\n\t\thdoc->buff->ptr = hdoc->buff->str;\n\t\thdoc->line = readline(\"heredoc> \");\n\t\tif (!hdoc->line || !ft_strcmp(hdoc->line, hdoc->eof))\n\t\t\tbreak ;\n\t\tif (ft_vec_check(hdoc->buff, hdoc->line))\n\t\t{\n\t\t\tprint_error(MSG_MSH, ERR_MALLOC, NULL, EXIT_FAILURE);\n\t\t\treturn ;\n\t\t}\n\t\thdoc->ptr_r = hdoc->line;\n\t\thdoc_if_dollar(hdoc);\n\t\t*hdoc->buff->ptr = '\\0';\n\t\twrite(hdoc->pipefd[1], hdoc->buff->str, ft_strlen(hdoc->buff->str));\n\t\twrite(hdoc->pipefd[1], \"\\n\", 1);\n\t}\n\tfree(hdoc->line);\n\tft_vec_free(hdoc->buff);\n}\n\nstatic void\tpid_is_null(t_hdoc *hdoc)\n{\n\tg_sig = 1;\n\tsignal(SIGINT, SIG_DFL);\n\tread_heredoc(hdoc);\n\tclose(hdoc->pipefd[1]);\n\tclose(hdoc->pipefd[0]);\n\texit(0);\n}\n\nint\theredoc(t_msh *msh, t_ast *ast)\n{\n\tpid_t\tpid;\n\tt_hdoc\thdoc;\n\tint\t\tret;\n\n\thdoc.eof = ast->right->lex;\n\thdoc.msh = msh;\n\tif (pipe(hdoc.pipefd) == -1)\n\t\treturn (print_error(MSG_PIPE, strerror(errno), \"\\n\", EXIT_FAILURE));\n\tpid = fork();\n\tif (pid < 0)\n\t\treturn (print_error(MSG_FORK, strerror(errno), \"\\n\", EXIT_FAILURE));\n\tif (pid == 0)\n\t\tpid_is_null(&hdoc);\n\tsignal(SIGINT, SIG_IGN);\n\twaitpid(pid, &ret, 0);\n\tsignal(SIGINT, handle_sigint);\n\tif (WIFSIGNALED(ret))\n\t\tprintf(\"\\n\");\n\tclose(hdoc.pipefd[1]);\n\tif (ret)\n\t{\n\t\tclose(hdoc.pipefd[0]);\n\t\treturn (-1);\n\t}\n\treturn (hdoc.pipefd[0]);\n}\n"}
80,969
c
#include "stdlib.h" struct account { int balance; }; typedef struct account account_t; int main() //@ requires true; //@ ensures true; { account_t* my_account = malloc(sizeof(account_t)); if (!my_account) abort(); my_account->balance = 5; free(my_account); return 0; }
19.07
15
(translation_unit) "#include "stdlib.h"\n\nstruct account {\n int balance;\n};\ntypedef struct account account_t;\n\nint main()\n //@ requires true;\n //@ ensures true;\n{\n account_t* my_account = malloc(sizeof(account_t));\n if (!my_account) abort();\n my_account->balance = 5;\n free(my_account);\n\n return 0;\n}\n" (preproc_include) "#include "stdlib.h"\n" (#include) "#include" (string_literal) ""stdlib.h"" (") """ (string_content) "stdlib.h" (") """ (struct_specifier) "struct account {\n int balance;\n}" (struct) "struct" (type_identifier) "account" (field_declaration_list) "{\n int balance;\n}" ({) "{" (field_declaration) "int balance;" (primitive_type) "int" (field_identifier) "balance" (;) ";" (}) "}" (;) ";" (type_definition) "typedef struct account account_t;" (typedef) "typedef" (struct_specifier) "struct account" (struct) "struct" (type_identifier) "account" (type_identifier) "account_t" (;) ";" (function_definition) "int main()\n //@ requires true;\n //@ ensures true;\n{\n account_t* my_account = malloc(sizeof(account_t));\n if (!my_account) abort();\n my_account->balance = 5;\n free(my_account);\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (comment) "//@ requires true;" (comment) "//@ ensures true;" (compound_statement) "{\n account_t* my_account = malloc(sizeof(account_t));\n if (!my_account) abort();\n my_account->balance = 5;\n free(my_account);\n\n return 0;\n}" ({) "{" (declaration) "account_t* my_account = malloc(sizeof(account_t));" (type_identifier) "account_t" (init_declarator) "* my_account = malloc(sizeof(account_t))" (pointer_declarator) "* my_account" (*) "*" (identifier) "my_account" (=) "=" (call_expression) "malloc(sizeof(account_t))" (identifier) "malloc" (argument_list) "(sizeof(account_t))" (() "(" (sizeof_expression) "sizeof(account_t)" (sizeof) "sizeof" (parenthesized_expression) "(account_t)" (() "(" (identifier) "account_t" ()) ")" ()) ")" (;) ";" (if_statement) "if (!my_account) abort();" (if) "if" (parenthesized_expression) "(!my_account)" (() "(" (unary_expression) "!my_account" (!) "!" (identifier) "my_account" ()) ")" (expression_statement) "abort();" (call_expression) "abort()" (identifier) "abort" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "my_account->balance = 5;" (assignment_expression) "my_account->balance = 5" (field_expression) "my_account->balance" (identifier) "my_account" (->) "->" (field_identifier) "balance" (=) "=" (number_literal) "5" (;) ";" (expression_statement) "free(my_account);" (call_expression) "free(my_account)" (identifier) "free" (argument_list) "(my_account)" (() "(" (identifier) "my_account" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
92
0
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 19.07, "nodes": 53, "errors": 0, "source_hash": "fabd8120fa03ee381b7aae7cdeb180403863f8143fdd7ed56f8690a79ac52e71", "categorized_nodes": 40}, "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": "string_literal", "text": "\"stdlib.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "struct_specifier", "text": "struct account {\n int balance;\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 4, "column": 1}}, {"id": 4, "type": "struct", "text": "struct", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 6}}, {"id": 5, "type": "type_identifier", "text": "account", "parent": 3, "children": [], "start_point": {"row": 2, "column": 7}, "end_point": {"row": 2, "column": 14}}, {"id": 6, "type": "field_declaration", "text": "int balance;", "parent": 3, "children": [7, 8], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 16}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 7}}, {"id": 8, "type": "field_identifier", "text": "balance", "parent": 6, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 15}}, {"id": 9, "type": "type_definition", "text": "typedef struct account account_t;", "parent": null, "children": [10, 11, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 33}}, {"id": 10, "type": "typedef", "text": "typedef", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 11, "type": "struct_specifier", "text": "struct account", "parent": 9, "children": [12, 13], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 22}}, {"id": 12, "type": "struct", "text": "struct", "parent": 11, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 14}}, {"id": 13, "type": "type_identifier", "text": "account", "parent": 11, "children": [], "start_point": {"row": 5, "column": 15}, "end_point": {"row": 5, "column": 22}}, {"id": 14, "type": "type_identifier", "text": "account_t", "parent": 9, "children": [], "start_point": {"row": 5, "column": 23}, "end_point": {"row": 5, "column": 32}}, {"id": 15, "type": "function_definition", "text": "int main()\n //@ requires true;\n //@ ensures true;\n{\n account_t* my_account = malloc(sizeof(account_t));\n if (!my_account) abort();\n my_account->balance = 5;\n free(my_account);\n\n return 0;\n}", "parent": null, "children": [16, 17], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 16, "type": "primitive_type", "text": "int", "parent": 15, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 3}}, {"id": 17, "type": "function_declarator", "text": "main()", "parent": 15, "children": [18, 19], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 10}}, {"id": 18, "type": "identifier", "text": "main", "parent": 17, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 8}}, {"id": 19, "type": "parameter_list", "text": "()", "parent": 17, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 10}}, {"id": 20, "type": "declaration", "text": "account_t* my_account = malloc(sizeof(account_t));", "parent": 15, "children": [21, 22], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 54}}, {"id": 21, "type": "type_identifier", "text": "account_t", "parent": 20, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 13}}, {"id": 22, "type": "init_declarator", "text": "* my_account = malloc(sizeof(account_t))", "parent": 20, "children": [23, 26, 27], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 53}}, {"id": 23, "type": "pointer_declarator", "text": "* my_account", "parent": 22, "children": [24, 25], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 25}}, {"id": 24, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 14}}, {"id": 25, "type": "identifier", "text": "my_account", "parent": 23, "children": [], "start_point": {"row": 11, "column": 15}, "end_point": {"row": 11, "column": 25}}, {"id": 26, "type": "=", "text": "=", "parent": 22, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 27}}, {"id": 27, "type": "call_expression", "text": "malloc(sizeof(account_t))", "parent": 22, "children": [28, 29], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 53}}, {"id": 28, "type": "identifier", "text": "malloc", "parent": 27, "children": [], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 34}}, {"id": 29, "type": "argument_list", "text": "(sizeof(account_t))", "parent": 27, "children": [30], "start_point": {"row": 11, "column": 34}, "end_point": {"row": 11, "column": 53}}, {"id": 30, "type": "sizeof_expression", "text": "sizeof(account_t)", "parent": 29, "children": [31], "start_point": {"row": 11, "column": 35}, "end_point": {"row": 11, "column": 52}}, {"id": 31, "type": "parenthesized_expression", "text": "(account_t)", "parent": 30, "children": [32], "start_point": {"row": 11, "column": 41}, "end_point": {"row": 11, "column": 52}}, {"id": 32, "type": "identifier", "text": "account_t", "parent": 31, "children": [], "start_point": {"row": 11, "column": 42}, "end_point": {"row": 11, "column": 51}}, {"id": 33, "type": "if_statement", "text": "if (!my_account) abort();", "parent": 15, "children": [34], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 29}}, {"id": 34, "type": "parenthesized_expression", "text": "(!my_account)", "parent": 33, "children": [35], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 20}}, {"id": 35, "type": "unary_expression", "text": "!my_account", "parent": 34, "children": [36, 37], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 19}}, {"id": 36, "type": "!", "text": "!", "parent": 35, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 9}}, {"id": 37, "type": "identifier", "text": "my_account", "parent": 35, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 38, "type": "call_expression", "text": "abort()", "parent": 33, "children": [39, 40], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 28}}, {"id": 39, "type": "identifier", "text": "abort", "parent": 38, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 26}}, {"id": 40, "type": "argument_list", "text": "()", "parent": 38, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 28}}, {"id": 41, "type": "assignment_expression", "text": "my_account->balance = 5", "parent": 15, "children": [42, 45, 46], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 27}}, {"id": 42, "type": "field_expression", "text": "my_account->balance", "parent": 41, "children": [43, 44], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 23}}, {"id": 43, "type": "identifier", "text": "my_account", "parent": 42, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 14}}, {"id": 44, "type": "field_identifier", "text": "balance", "parent": 42, "children": [], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 23}}, {"id": 45, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 25}}, {"id": 46, "type": "number_literal", "text": "5", "parent": 41, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 27}}, {"id": 47, "type": "call_expression", "text": "free(my_account)", "parent": 15, "children": [48, 49], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 20}}, {"id": 48, "type": "identifier", "text": "free", "parent": 47, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 8}}, {"id": 49, "type": "argument_list", "text": "(my_account)", "parent": 47, "children": [50], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 20}}, {"id": 50, "type": "identifier", "text": "my_account", "parent": 49, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 19}}, {"id": 51, "type": "return_statement", "text": "return 0;", "parent": 15, "children": [52], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 13}}, {"id": 52, "type": "number_literal", "text": "0", "parent": 51, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 12}}]}, "node_categories": {"declarations": {"functions": [15, 17], "variables": [6, 9, 20], "classes": [3, 4, 11, 12], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [27, 30, 31, 34, 35, 38, 42, 47], "assignments": [41], "loops": [], "conditionals": [5, 8, 13, 14, 18, 21, 25, 28, 32, 33, 37, 39, 43, 44, 48, 50], "returns": [51], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 46, 52], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "main", "text_snippet": "int main()\n //@ requires true;\n //@ ensures true;\n{\n account_t* my_account = malloc(sizeof("}, {"node_id": 17, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [{"node_id": 3, "universal_type": "class", "name": "account", "text_snippet": "struct account {\n int balance;\n}"}, {"node_id": 4, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 11, "universal_type": "class", "name": "account", "text_snippet": "struct account"}, {"node_id": 12, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"stdlib.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include \"stdlib.h\"\n\nstruct account {\n int balance;\n};\ntypedef struct account account_t;\n\nint main()\n //@ requires true;\n //@ ensures true;\n{\n account_t* my_account = malloc(sizeof(account_t));\n if (!my_account) abort();\n my_account->balance = 5;\n free(my_account);\n\n return 0;\n}\n"}
80,970
c
// -*- C++ -*- //============================================================================= /** * @file Routing_Slip_Persistence_Manager.h * * $Id: Routing_Slip_Persistence_Manager.h 91628 2010-09-07 11:11:12Z johnnyw $ * * A Routing_Slip_Persistence manager controls the actual allocation of * blocks through a Persistent_Storage_Allocator and can persist an * event and its routing slip. * * @author <NAME> <<EMAIL>> */ //============================================================================= #ifndef ROUTING_SLIP_PERSISTENCE_MANAGER_H #define ROUTING_SLIP_PERSISTENCE_MANAGER_H #include /**/ "ace/pre.h" #include "orbsvcs/Notify/notify_serv_export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "tao/Versioned_Namespace.h" #include "tao/orbconf.h" #include "ace/Message_Block.h" #include "ace/Containers_T.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO_Notify { // Some forward declarations. class Standard_Event_Persistence_Factory; class Persistent_File_Allocator; class Persistent_Storage_Block; class Persistent_Callback; /** * \brief Manage interaction between Routing_Slip and persistent storage. * * todo: to complete the strategization of event persistent storage this * should become an interface that is implemented differently by different * strategies. For now it interacts with Standard_Event_Persistence. */ class TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager { public: /// A unique identifier for logical blocks in persistent storage. typedef ACE_UINT64 Block_Serial_Number; /// The physical address of a block in persistent storage. typedef ACE_UINT32 Block_Number; /// The size of a block in persistent storage. typedef ACE_UINT16 Block_Size; /// A code to indicate the type of block in persistent storage. typedef ACE_UINT16 Block_Type; /// The constructor. Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory); /// The destructor. ~Routing_Slip_Persistence_Manager(); /// Set up callbacks void set_callback(Persistent_Callback* callback); /// Store an event + routing slip. bool store(const ACE_Message_Block& event, const ACE_Message_Block& routing_slip); /// \brief Update the routing slip. /// /// We must always overwrite the first block /// last, and it may not chance. Other blocks should be freed and /// reallocated. bool update(const ACE_Message_Block& routing_slip); /// \brief Remove our associated event and routing slip from the /// Persistent_File_Allocator. bool remove(); ///////////////////////////////////////// // Methods to be used during reload only. /// \brief Call this method to recover data during event reload. /// /// It should not fail under normal circumstances. /// Caller owns the resulting message blocks and is responsible /// for deleting them. /// Reload the event and routing_slip from the Persistent_File_Allocator. bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip); /// \brief Get next RSPM during reload. /// /// After using the data from the reload method, call this /// method to get the next RSPM. It returns a null pointer /// when all persistent events have been reloaded. Routing_Slip_Persistence_Manager * load_next (); ///////////////////////// // Implementation methods. // Should not be called by Routing_Slip /// \brief Commit root data to disk, which should only be done for a root node. bool store_root(); /// \brief Reload data into this RSPM from the given block/serial# /// /// \return false if the reload is not successful. bool load(Block_Number block_number, Block_Serial_Number expected_serial_number); /// \brief Is this RSPM attached to the root block? bool is_root () const; /// \brief During cleanup for shut down, release all chained RSPMs. void release_all (); private: /** * \brief private: Storage for header information of all persistent block. */ class Block_Header { public: enum Header_Type { BT_Routing_Slip, BT_Event, BT_Overflow }; Block_Header(Header_Type type); virtual ~Block_Header (void); virtual size_t extract_header(Persistent_Storage_Block& psb, size_t offset = 0); virtual size_t put_header(Persistent_Storage_Block& psb, size_t offset = 0); public: /// Our serial number Block_Serial_Number serial_number; /// Address of the overflow record (if any) Block_Number next_overflow; /// How much extra header data is in this block (not including this header) Block_Type header_type; /// How much actual data is in this block? (not including headers) Block_Size data_size; }; /** * \brief private: Storage for header information for Routing_Slip blocks. */ class Routing_Slip_Header : public Block_Header { public: Routing_Slip_Header(); virtual size_t extract_header(Persistent_Storage_Block& psb, size_t offset = 0); virtual size_t put_header(Persistent_Storage_Block& psb, size_t offset = 0); public: /// The next event in the system Block_Number next_routing_slip_block; /// The next expected serial number Block_Serial_Number next_serial_number; Block_Number event_block; }; /// \brief An Event block header. /// /// is just a Block_Header with no extra data class Event_Header : public Block_Header { public: Event_Header (); }; /// \brief An overflow block header. /// /// is just a Block_Header with no extra data /// The same record type is used for both Routing_Slip /// and Event overflows. class Overflow_Header : public Block_Header { public: Overflow_Header (); }; bool store_i(const ACE_Message_Block& event, const ACE_Message_Block& routing_slip); bool update_i(const ACE_Message_Block& routing_slip); bool store_event(const ACE_Message_Block& event); /// Fill in a block with data, and return the number of bytes /// of data remaining to be written. size_t fill_block(Persistent_Storage_Block& psb, size_t offset_into_block, const ACE_Message_Block* data, size_t offset_into_msg); size_t fill_block(Persistent_Storage_Block& psb, size_t offset_into_block, unsigned char* data, size_t data_size); /// Build a chain of Persistent_Storage_Blocks bool build_chain( Persistent_Storage_Block* first_block, Block_Header& first_header, ACE_Unbounded_Stack<size_t>& allocated_blocks, const ACE_Message_Block& data); /// Reload a chain from persistent store. bool reload_chain(Persistent_Storage_Block* first_block, Block_Header& first_header, ACE_Unbounded_Stack<size_t>& allocated_blocks, ACE_Message_Block* amb, ACE_UINT64 expected_serial_number); /// Locked method to do the work of setting the next_manager_. bool update_next_manager(Routing_Slip_Persistence_Manager* next); /// Have we been persisted yet? bool persisted(); /// Write out our first event block. size_t write_first_routing_slip_block(bool prepare_only = false); /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers void dllist_push_back(); void insert_before (Routing_Slip_Persistence_Manager * node); /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers void remove_from_dllist(); private: TAO_SYNCH_MUTEX lock_; bool removed_; ACE_UINT64 serial_number_; Persistent_File_Allocator* allocator_; Standard_Event_Persistence_Factory* factory_; Event_Header event_header_; Routing_Slip_Header routing_slip_header_; Persistent_Storage_Block* first_event_block_; Persistent_Storage_Block* first_routing_slip_block_; /// We are part of a doubly-linked list Routing_Slip_Persistence_Manager* prev_manager_; Routing_Slip_Persistence_Manager* next_manager_; ACE_Unbounded_Stack<size_t> allocated_event_blocks_; ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_; Persistent_Callback* callback_; /// If these are non-zero we own 'em ACE_Message_Block * event_mb_; ACE_Message_Block * routing_slip_mb_; }; } /* namespace TAO_Notify */ TAO_END_VERSIONED_NAMESPACE_DECL #include /**/ "ace/post.h" #endif /* ROUTING_SLIP_PERSISTENCE_MANAGER_H */
36.57
220
(translation_unit) "// -*- C++ -*-\n\n//=============================================================================\n/**\n * @file Routing_Slip_Persistence_Manager.h\n *\n * $Id: Routing_Slip_Persistence_Manager.h 91628 2010-09-07 11:11:12Z johnnyw $\n *\n * A Routing_Slip_Persistence manager controls the actual allocation of\n * blocks through a Persistent_Storage_Allocator and can persist an\n * event and its routing slip.\n *\n * @author <NAME> <<EMAIL>>\n */\n//=============================================================================\n\n#ifndef ROUTING_SLIP_PERSISTENCE_MANAGER_H\n#define ROUTING_SLIP_PERSISTENCE_MANAGER_H\n#include /**/ "ace/pre.h"\n\n#include "orbsvcs/Notify/notify_serv_export.h"\n\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\n#pragma once\n#endif /* ACE_LACKS_PRAGMA_ONCE */\n\n#include "tao/Versioned_Namespace.h"\n#include "tao/orbconf.h"\n#include "ace/Message_Block.h"\n#include "ace/Containers_T.h"\n\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nnamespace TAO_Notify\n{\n// Some forward declarations.\nclass Standard_Event_Persistence_Factory;\nclass Persistent_File_Allocator;\nclass Persistent_Storage_Block;\nclass Persistent_Callback;\n\n/**\n * \brief Manage interaction between Routing_Slip and persistent storage.\n *\n * todo: to complete the strategization of event persistent storage this\n * should become an interface that is implemented differently by different\n * strategies. For now it interacts with Standard_Event_Persistence.\n */\nclass TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager\n{\npublic:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;\n /// The physical address of a block in persistent storage.\n typedef ACE_UINT32 Block_Number;\n /// The size of a block in persistent storage.\n typedef ACE_UINT16 Block_Size;\n /// A code to indicate the type of block in persistent storage.\n typedef ACE_UINT16 Block_Type;\n\n /// The constructor.\n Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);\n\n /// The destructor.\n ~Routing_Slip_Persistence_Manager();\n\n /// Set up callbacks\n void set_callback(Persistent_Callback* callback);\n\n /// Store an event + routing slip.\n bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n /// \brief Update the routing slip.\n ///\n /// We must always overwrite the first block\n /// last, and it may not chance. Other blocks should be freed and\n /// reallocated.\n bool update(const ACE_Message_Block& routing_slip);\n\n /// \brief Remove our associated event and routing slip from the\n /// Persistent_File_Allocator.\n bool remove();\n\n /////////////////////////////////////////\n // Methods to be used during reload only.\n\n /// \brief Call this method to recover data during event reload.\n ///\n /// It should not fail under normal circumstances.\n /// Caller owns the resulting message blocks and is responsible\n /// for deleting them.\n /// Reload the event and routing_slip from the Persistent_File_Allocator.\n bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);\n\n /// \brief Get next RSPM during reload.\n ///\n /// After using the data from the reload method, call this\n /// method to get the next RSPM. It returns a null pointer\n /// when all persistent events have been reloaded.\n Routing_Slip_Persistence_Manager * load_next ();\n\n /////////////////////////\n // Implementation methods.\n // Should not be called by Routing_Slip\n\n /// \brief Commit root data to disk, which should only be done for a root node.\n bool store_root();\n\n /// \brief Reload data into this RSPM from the given block/serial#\n ///\n /// \return false if the reload is not successful.\n bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);\n\n /// \brief Is this RSPM attached to the root block?\n bool is_root () const;\n\n /// \brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n };\n\n /**\n * \brief private: Storage for header information for Routing_Slip blocks.\n */\n class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n };\n\n /// \brief An Event block header.\n ///\n /// is just a Block_Header with no extra data\n class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n };\n\n /// \brief An overflow block header.\n ///\n /// is just a Block_Header with no extra data\n /// The same record type is used for both Routing_Slip\n /// and Event overflows.\n class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n };\n\n bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n bool update_i(const ACE_Message_Block& routing_slip);\n\n bool store_event(const ACE_Message_Block& event);\n\n /// Fill in a block with data, and return the number of bytes\n /// of data remaining to be written.\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);\n\n /// Build a chain of Persistent_Storage_Blocks\n bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);\n\n /// Reload a chain from persistent store.\n bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);\n\n /// Locked method to do the work of setting the next_manager_.\n bool update_next_manager(Routing_Slip_Persistence_Manager* next);\n\n /// Have we been persisted yet?\n bool persisted();\n\n /// Write out our first event block.\n size_t write_first_routing_slip_block(bool prepare_only = false);\n\n /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers\n void dllist_push_back();\n\n void insert_before (Routing_Slip_Persistence_Manager * node);\n\n /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers\n void remove_from_dllist();\n\nprivate:\n TAO_SYNCH_MUTEX lock_;\n bool removed_;\n ACE_UINT64 serial_number_;\n Persistent_File_Allocator* allocator_;\n Standard_Event_Persistence_Factory* factory_;\n Event_Header event_header_;\n Routing_Slip_Header routing_slip_header_;\n Persistent_Storage_Block* first_event_block_;\n Persistent_Storage_Block* first_routing_slip_block_;\n /// We are part of a doubly-linked list\n Routing_Slip_Persistence_Manager* prev_manager_;\n Routing_Slip_Persistence_Manager* next_manager_;\n ACE_Unbounded_Stack<size_t> allocated_event_blocks_;\n ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;\n Persistent_Callback* callback_;\n\n /// If these are non-zero we own 'em\n ACE_Message_Block * event_mb_;\n ACE_Message_Block * routing_slip_mb_;\n};\n\n} /* namespace TAO_Notify */\n\nTAO_END_VERSIONED_NAMESPACE_DECL\n\n#include /**/ "ace/post.h"\n#endif /* ROUTING_SLIP_PERSISTENCE_MANAGER_H */\n" (comment) "// -*- C++ -*-" (comment) "//=============================================================================" (comment) "/**\n * @file Routing_Slip_Persistence_Manager.h\n *\n * $Id: Routing_Slip_Persistence_Manager.h 91628 2010-09-07 11:11:12Z johnnyw $\n *\n * A Routing_Slip_Persistence manager controls the actual allocation of\n * blocks through a Persistent_Storage_Allocator and can persist an\n * event and its routing slip.\n *\n * @author <NAME> <<EMAIL>>\n */" (comment) "//=============================================================================" (preproc_ifdef) "#ifndef ROUTING_SLIP_PERSISTENCE_MANAGER_H\n#define ROUTING_SLIP_PERSISTENCE_MANAGER_H\n#include /**/ "ace/pre.h"\n\n#include "orbsvcs/Notify/notify_serv_export.h"\n\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\n#pragma once\n#endif /* ACE_LACKS_PRAGMA_ONCE */\n\n#include "tao/Versioned_Namespace.h"\n#include "tao/orbconf.h"\n#include "ace/Message_Block.h"\n#include "ace/Containers_T.h"\n\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nnamespace TAO_Notify\n{\n// Some forward declarations.\nclass Standard_Event_Persistence_Factory;\nclass Persistent_File_Allocator;\nclass Persistent_Storage_Block;\nclass Persistent_Callback;\n\n/**\n * \brief Manage interaction between Routing_Slip and persistent storage.\n *\n * todo: to complete the strategization of event persistent storage this\n * should become an interface that is implemented differently by different\n * strategies. For now it interacts with Standard_Event_Persistence.\n */\nclass TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager\n{\npublic:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;\n /// The physical address of a block in persistent storage.\n typedef ACE_UINT32 Block_Number;\n /// The size of a block in persistent storage.\n typedef ACE_UINT16 Block_Size;\n /// A code to indicate the type of block in persistent storage.\n typedef ACE_UINT16 Block_Type;\n\n /// The constructor.\n Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);\n\n /// The destructor.\n ~Routing_Slip_Persistence_Manager();\n\n /// Set up callbacks\n void set_callback(Persistent_Callback* callback);\n\n /// Store an event + routing slip.\n bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n /// \brief Update the routing slip.\n ///\n /// We must always overwrite the first block\n /// last, and it may not chance. Other blocks should be freed and\n /// reallocated.\n bool update(const ACE_Message_Block& routing_slip);\n\n /// \brief Remove our associated event and routing slip from the\n /// Persistent_File_Allocator.\n bool remove();\n\n /////////////////////////////////////////\n // Methods to be used during reload only.\n\n /// \brief Call this method to recover data during event reload.\n ///\n /// It should not fail under normal circumstances.\n /// Caller owns the resulting message blocks and is responsible\n /// for deleting them.\n /// Reload the event and routing_slip from the Persistent_File_Allocator.\n bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);\n\n /// \brief Get next RSPM during reload.\n ///\n /// After using the data from the reload method, call this\n /// method to get the next RSPM. It returns a null pointer\n /// when all persistent events have been reloaded.\n Routing_Slip_Persistence_Manager * load_next ();\n\n /////////////////////////\n // Implementation methods.\n // Should not be called by Routing_Slip\n\n /// \brief Commit root data to disk, which should only be done for a root node.\n bool store_root();\n\n /// \brief Reload data into this RSPM from the given block/serial#\n ///\n /// \return false if the reload is not successful.\n bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);\n\n /// \brief Is this RSPM attached to the root block?\n bool is_root () const;\n\n /// \brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n };\n\n /**\n * \brief private: Storage for header information for Routing_Slip blocks.\n */\n class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n };\n\n /// \brief An Event block header.\n ///\n /// is just a Block_Header with no extra data\n class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n };\n\n /// \brief An overflow block header.\n ///\n /// is just a Block_Header with no extra data\n /// The same record type is used for both Routing_Slip\n /// and Event overflows.\n class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n };\n\n bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n bool update_i(const ACE_Message_Block& routing_slip);\n\n bool store_event(const ACE_Message_Block& event);\n\n /// Fill in a block with data, and return the number of bytes\n /// of data remaining to be written.\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);\n\n /// Build a chain of Persistent_Storage_Blocks\n bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);\n\n /// Reload a chain from persistent store.\n bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);\n\n /// Locked method to do the work of setting the next_manager_.\n bool update_next_manager(Routing_Slip_Persistence_Manager* next);\n\n /// Have we been persisted yet?\n bool persisted();\n\n /// Write out our first event block.\n size_t write_first_routing_slip_block(bool prepare_only = false);\n\n /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers\n void dllist_push_back();\n\n void insert_before (Routing_Slip_Persistence_Manager * node);\n\n /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers\n void remove_from_dllist();\n\nprivate:\n TAO_SYNCH_MUTEX lock_;\n bool removed_;\n ACE_UINT64 serial_number_;\n Persistent_File_Allocator* allocator_;\n Standard_Event_Persistence_Factory* factory_;\n Event_Header event_header_;\n Routing_Slip_Header routing_slip_header_;\n Persistent_Storage_Block* first_event_block_;\n Persistent_Storage_Block* first_routing_slip_block_;\n /// We are part of a doubly-linked list\n Routing_Slip_Persistence_Manager* prev_manager_;\n Routing_Slip_Persistence_Manager* next_manager_;\n ACE_Unbounded_Stack<size_t> allocated_event_blocks_;\n ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;\n Persistent_Callback* callback_;\n\n /// If these are non-zero we own 'em\n ACE_Message_Block * event_mb_;\n ACE_Message_Block * routing_slip_mb_;\n};\n\n} /* namespace TAO_Notify */\n\nTAO_END_VERSIONED_NAMESPACE_DECL\n\n#include /**/ "ace/post.h"\n#endif" (#ifndef) "#ifndef" (identifier) "ROUTING_SLIP_PERSISTENCE_MANAGER_H" (preproc_def) "#define ROUTING_SLIP_PERSISTENCE_MANAGER_H\n" (#define) "#define" (identifier) "ROUTING_SLIP_PERSISTENCE_MANAGER_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/Notify/notify_serv_export.h"\n" (#include) "#include" (string_literal) ""orbsvcs/Notify/notify_serv_export.h"" (") """ (string_content) "orbsvcs/Notify/notify_serv_export.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 "tao/Versioned_Namespace.h"\n" (#include) "#include" (string_literal) ""tao/Versioned_Namespace.h"" (") """ (string_content) "tao/Versioned_Namespace.h" (") """ (preproc_include) "#include "tao/orbconf.h"\n" (#include) "#include" (string_literal) ""tao/orbconf.h"" (") """ (string_content) "tao/orbconf.h" (") """ (preproc_include) "#include "ace/Message_Block.h"\n" (#include) "#include" (string_literal) ""ace/Message_Block.h"" (") """ (string_content) "ace/Message_Block.h" (") """ (preproc_include) "#include "ace/Containers_T.h"\n" (#include) "#include" (string_literal) ""ace/Containers_T.h"" (") """ (string_content) "ace/Containers_T.h" (") """ (function_definition) "TAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nnamespace TAO_Notify\n{\n// Some forward declarations.\nclass Standard_Event_Persistence_Factory;\nclass Persistent_File_Allocator;\nclass Persistent_Storage_Block;\nclass Persistent_Callback;\n\n/**\n * \brief Manage interaction between Routing_Slip and persistent storage.\n *\n * todo: to complete the strategization of event persistent storage this\n * should become an interface that is implemented differently by different\n * strategies. For now it interacts with Standard_Event_Persistence.\n */\nclass TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager\n{\npublic:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;\n /// The physical address of a block in persistent storage.\n typedef ACE_UINT32 Block_Number;\n /// The size of a block in persistent storage.\n typedef ACE_UINT16 Block_Size;\n /// A code to indicate the type of block in persistent storage.\n typedef ACE_UINT16 Block_Type;\n\n /// The constructor.\n Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);\n\n /// The destructor.\n ~Routing_Slip_Persistence_Manager();\n\n /// Set up callbacks\n void set_callback(Persistent_Callback* callback);\n\n /// Store an event + routing slip.\n bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n /// \brief Update the routing slip.\n ///\n /// We must always overwrite the first block\n /// last, and it may not chance. Other blocks should be freed and\n /// reallocated.\n bool update(const ACE_Message_Block& routing_slip);\n\n /// \brief Remove our associated event and routing slip from the\n /// Persistent_File_Allocator.\n bool remove();\n\n /////////////////////////////////////////\n // Methods to be used during reload only.\n\n /// \brief Call this method to recover data during event reload.\n ///\n /// It should not fail under normal circumstances.\n /// Caller owns the resulting message blocks and is responsible\n /// for deleting them.\n /// Reload the event and routing_slip from the Persistent_File_Allocator.\n bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);\n\n /// \brief Get next RSPM during reload.\n ///\n /// After using the data from the reload method, call this\n /// method to get the next RSPM. It returns a null pointer\n /// when all persistent events have been reloaded.\n Routing_Slip_Persistence_Manager * load_next ();\n\n /////////////////////////\n // Implementation methods.\n // Should not be called by Routing_Slip\n\n /// \brief Commit root data to disk, which should only be done for a root node.\n bool store_root();\n\n /// \brief Reload data into this RSPM from the given block/serial#\n ///\n /// \return false if the reload is not successful.\n bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);\n\n /// \brief Is this RSPM attached to the root block?\n bool is_root () const;\n\n /// \brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n };\n\n /**\n * \brief private: Storage for header information for Routing_Slip blocks.\n */\n class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n };\n\n /// \brief An Event block header.\n ///\n /// is just a Block_Header with no extra data\n class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n };\n\n /// \brief An overflow block header.\n ///\n /// is just a Block_Header with no extra data\n /// The same record type is used for both Routing_Slip\n /// and Event overflows.\n class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n };\n\n bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n bool update_i(const ACE_Message_Block& routing_slip);\n\n bool store_event(const ACE_Message_Block& event);\n\n /// Fill in a block with data, and return the number of bytes\n /// of data remaining to be written.\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);\n\n /// Build a chain of Persistent_Storage_Blocks\n bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);\n\n /// Reload a chain from persistent store.\n bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);\n\n /// Locked method to do the work of setting the next_manager_.\n bool update_next_manager(Routing_Slip_Persistence_Manager* next);\n\n /// Have we been persisted yet?\n bool persisted();\n\n /// Write out our first event block.\n size_t write_first_routing_slip_block(bool prepare_only = false);\n\n /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers\n void dllist_push_back();\n\n void insert_before (Routing_Slip_Persistence_Manager * node);\n\n /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers\n void remove_from_dllist();\n\nprivate:\n TAO_SYNCH_MUTEX lock_;\n bool removed_;\n ACE_UINT64 serial_number_;\n Persistent_File_Allocator* allocator_;\n Standard_Event_Persistence_Factory* factory_;\n Event_Header event_header_;\n Routing_Slip_Header routing_slip_header_;\n Persistent_Storage_Block* first_event_block_;\n Persistent_Storage_Block* first_routing_slip_block_;\n /// We are part of a doubly-linked list\n Routing_Slip_Persistence_Manager* prev_manager_;\n Routing_Slip_Persistence_Manager* next_manager_;\n ACE_Unbounded_Stack<size_t> allocated_event_blocks_;\n ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;\n Persistent_Callback* callback_;\n\n /// If these are non-zero we own 'em\n ACE_Message_Block * event_mb_;\n ACE_Message_Block * routing_slip_mb_;\n};\n\n}" (type_identifier) "TAO_BEGIN_VERSIONED_NAMESPACE_DECL" (ERROR) "namespace" (identifier) "namespace" (identifier) "TAO_Notify" (compound_statement) "{\n// Some forward declarations.\nclass Standard_Event_Persistence_Factory;\nclass Persistent_File_Allocator;\nclass Persistent_Storage_Block;\nclass Persistent_Callback;\n\n/**\n * \brief Manage interaction between Routing_Slip and persistent storage.\n *\n * todo: to complete the strategization of event persistent storage this\n * should become an interface that is implemented differently by different\n * strategies. For now it interacts with Standard_Event_Persistence.\n */\nclass TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager\n{\npublic:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;\n /// The physical address of a block in persistent storage.\n typedef ACE_UINT32 Block_Number;\n /// The size of a block in persistent storage.\n typedef ACE_UINT16 Block_Size;\n /// A code to indicate the type of block in persistent storage.\n typedef ACE_UINT16 Block_Type;\n\n /// The constructor.\n Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);\n\n /// The destructor.\n ~Routing_Slip_Persistence_Manager();\n\n /// Set up callbacks\n void set_callback(Persistent_Callback* callback);\n\n /// Store an event + routing slip.\n bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n /// \brief Update the routing slip.\n ///\n /// We must always overwrite the first block\n /// last, and it may not chance. Other blocks should be freed and\n /// reallocated.\n bool update(const ACE_Message_Block& routing_slip);\n\n /// \brief Remove our associated event and routing slip from the\n /// Persistent_File_Allocator.\n bool remove();\n\n /////////////////////////////////////////\n // Methods to be used during reload only.\n\n /// \brief Call this method to recover data during event reload.\n ///\n /// It should not fail under normal circumstances.\n /// Caller owns the resulting message blocks and is responsible\n /// for deleting them.\n /// Reload the event and routing_slip from the Persistent_File_Allocator.\n bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);\n\n /// \brief Get next RSPM during reload.\n ///\n /// After using the data from the reload method, call this\n /// method to get the next RSPM. It returns a null pointer\n /// when all persistent events have been reloaded.\n Routing_Slip_Persistence_Manager * load_next ();\n\n /////////////////////////\n // Implementation methods.\n // Should not be called by Routing_Slip\n\n /// \brief Commit root data to disk, which should only be done for a root node.\n bool store_root();\n\n /// \brief Reload data into this RSPM from the given block/serial#\n ///\n /// \return false if the reload is not successful.\n bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);\n\n /// \brief Is this RSPM attached to the root block?\n bool is_root () const;\n\n /// \brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n };\n\n /**\n * \brief private: Storage for header information for Routing_Slip blocks.\n */\n class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n };\n\n /// \brief An Event block header.\n ///\n /// is just a Block_Header with no extra data\n class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n };\n\n /// \brief An overflow block header.\n ///\n /// is just a Block_Header with no extra data\n /// The same record type is used for both Routing_Slip\n /// and Event overflows.\n class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n };\n\n bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n bool update_i(const ACE_Message_Block& routing_slip);\n\n bool store_event(const ACE_Message_Block& event);\n\n /// Fill in a block with data, and return the number of bytes\n /// of data remaining to be written.\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);\n\n /// Build a chain of Persistent_Storage_Blocks\n bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);\n\n /// Reload a chain from persistent store.\n bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);\n\n /// Locked method to do the work of setting the next_manager_.\n bool update_next_manager(Routing_Slip_Persistence_Manager* next);\n\n /// Have we been persisted yet?\n bool persisted();\n\n /// Write out our first event block.\n size_t write_first_routing_slip_block(bool prepare_only = false);\n\n /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers\n void dllist_push_back();\n\n void insert_before (Routing_Slip_Persistence_Manager * node);\n\n /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers\n void remove_from_dllist();\n\nprivate:\n TAO_SYNCH_MUTEX lock_;\n bool removed_;\n ACE_UINT64 serial_number_;\n Persistent_File_Allocator* allocator_;\n Standard_Event_Persistence_Factory* factory_;\n Event_Header event_header_;\n Routing_Slip_Header routing_slip_header_;\n Persistent_Storage_Block* first_event_block_;\n Persistent_Storage_Block* first_routing_slip_block_;\n /// We are part of a doubly-linked list\n Routing_Slip_Persistence_Manager* prev_manager_;\n Routing_Slip_Persistence_Manager* next_manager_;\n ACE_Unbounded_Stack<size_t> allocated_event_blocks_;\n ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;\n Persistent_Callback* callback_;\n\n /// If these are non-zero we own 'em\n ACE_Message_Block * event_mb_;\n ACE_Message_Block * routing_slip_mb_;\n};\n\n}" ({) "{" (comment) "// Some forward declarations." (declaration) "class Standard_Event_Persistence_Factory;" (type_identifier) "class" (identifier) "Standard_Event_Persistence_Factory" (;) ";" (declaration) "class Persistent_File_Allocator;" (type_identifier) "class" (identifier) "Persistent_File_Allocator" (;) ";" (declaration) "class Persistent_Storage_Block;" (type_identifier) "class" (identifier) "Persistent_Storage_Block" (;) ";" (declaration) "class Persistent_Callback;" (type_identifier) "class" (identifier) "Persistent_Callback" (;) ";" (comment) "/**\n * \brief Manage interaction between Routing_Slip and persistent storage.\n *\n * todo: to complete the strategization of event persistent storage this\n * should become an interface that is implemented differently by different\n * strategies. For now it interacts with Standard_Event_Persistence.\n */" (function_definition) "class TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager\n{\npublic:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;\n /// The physical address of a block in persistent storage.\n typedef ACE_UINT32 Block_Number;\n /// The size of a block in persistent storage.\n typedef ACE_UINT16 Block_Size;\n /// A code to indicate the type of block in persistent storage.\n typedef ACE_UINT16 Block_Type;\n\n /// The constructor.\n Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);\n\n /// The destructor.\n ~Routing_Slip_Persistence_Manager();\n\n /// Set up callbacks\n void set_callback(Persistent_Callback* callback);\n\n /// Store an event + routing slip.\n bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n /// \brief Update the routing slip.\n ///\n /// We must always overwrite the first block\n /// last, and it may not chance. Other blocks should be freed and\n /// reallocated.\n bool update(const ACE_Message_Block& routing_slip);\n\n /// \brief Remove our associated event and routing slip from the\n /// Persistent_File_Allocator.\n bool remove();\n\n /////////////////////////////////////////\n // Methods to be used during reload only.\n\n /// \brief Call this method to recover data during event reload.\n ///\n /// It should not fail under normal circumstances.\n /// Caller owns the resulting message blocks and is responsible\n /// for deleting them.\n /// Reload the event and routing_slip from the Persistent_File_Allocator.\n bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);\n\n /// \brief Get next RSPM during reload.\n ///\n /// After using the data from the reload method, call this\n /// method to get the next RSPM. It returns a null pointer\n /// when all persistent events have been reloaded.\n Routing_Slip_Persistence_Manager * load_next ();\n\n /////////////////////////\n // Implementation methods.\n // Should not be called by Routing_Slip\n\n /// \brief Commit root data to disk, which should only be done for a root node.\n bool store_root();\n\n /// \brief Reload data into this RSPM from the given block/serial#\n ///\n /// \return false if the reload is not successful.\n bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);\n\n /// \brief Is this RSPM attached to the root block?\n bool is_root () const;\n\n /// \brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n };\n\n /**\n * \brief private: Storage for header information for Routing_Slip blocks.\n */\n class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n };\n\n /// \brief An Event block header.\n ///\n /// is just a Block_Header with no extra data\n class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n };\n\n /// \brief An overflow block header.\n ///\n /// is just a Block_Header with no extra data\n /// The same record type is used for both Routing_Slip\n /// and Event overflows.\n class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n };\n\n bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n bool update_i(const ACE_Message_Block& routing_slip);\n\n bool store_event(const ACE_Message_Block& event);\n\n /// Fill in a block with data, and return the number of bytes\n /// of data remaining to be written.\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);\n\n /// Build a chain of Persistent_Storage_Blocks\n bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);\n\n /// Reload a chain from persistent store.\n bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);\n\n /// Locked method to do the work of setting the next_manager_.\n bool update_next_manager(Routing_Slip_Persistence_Manager* next);\n\n /// Have we been persisted yet?\n bool persisted();\n\n /// Write out our first event block.\n size_t write_first_routing_slip_block(bool prepare_only = false);\n\n /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers\n void dllist_push_back();\n\n void insert_before (Routing_Slip_Persistence_Manager * node);\n\n /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers\n void remove_from_dllist();\n\nprivate:\n TAO_SYNCH_MUTEX lock_;\n bool removed_;\n ACE_UINT64 serial_number_;\n Persistent_File_Allocator* allocator_;\n Standard_Event_Persistence_Factory* factory_;\n Event_Header event_header_;\n Routing_Slip_Header routing_slip_header_;\n Persistent_Storage_Block* first_event_block_;\n Persistent_Storage_Block* first_routing_slip_block_;\n /// We are part of a doubly-linked list\n Routing_Slip_Persistence_Manager* prev_manager_;\n Routing_Slip_Persistence_Manager* next_manager_;\n ACE_Unbounded_Stack<size_t> allocated_event_blocks_;\n ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;\n Persistent_Callback* callback_;\n\n /// If these are non-zero we own 'em\n ACE_Message_Block * event_mb_;\n ACE_Message_Block * routing_slip_mb_;\n}" (type_identifier) "class" (ERROR) "TAO_Notify_Serv_Export" (identifier) "TAO_Notify_Serv_Export" (identifier) "Routing_Slip_Persistence_Manager" (compound_statement) "{\npublic:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;\n /// The physical address of a block in persistent storage.\n typedef ACE_UINT32 Block_Number;\n /// The size of a block in persistent storage.\n typedef ACE_UINT16 Block_Size;\n /// A code to indicate the type of block in persistent storage.\n typedef ACE_UINT16 Block_Type;\n\n /// The constructor.\n Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);\n\n /// The destructor.\n ~Routing_Slip_Persistence_Manager();\n\n /// Set up callbacks\n void set_callback(Persistent_Callback* callback);\n\n /// Store an event + routing slip.\n bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n /// \brief Update the routing slip.\n ///\n /// We must always overwrite the first block\n /// last, and it may not chance. Other blocks should be freed and\n /// reallocated.\n bool update(const ACE_Message_Block& routing_slip);\n\n /// \brief Remove our associated event and routing slip from the\n /// Persistent_File_Allocator.\n bool remove();\n\n /////////////////////////////////////////\n // Methods to be used during reload only.\n\n /// \brief Call this method to recover data during event reload.\n ///\n /// It should not fail under normal circumstances.\n /// Caller owns the resulting message blocks and is responsible\n /// for deleting them.\n /// Reload the event and routing_slip from the Persistent_File_Allocator.\n bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);\n\n /// \brief Get next RSPM during reload.\n ///\n /// After using the data from the reload method, call this\n /// method to get the next RSPM. It returns a null pointer\n /// when all persistent events have been reloaded.\n Routing_Slip_Persistence_Manager * load_next ();\n\n /////////////////////////\n // Implementation methods.\n // Should not be called by Routing_Slip\n\n /// \brief Commit root data to disk, which should only be done for a root node.\n bool store_root();\n\n /// \brief Reload data into this RSPM from the given block/serial#\n ///\n /// \return false if the reload is not successful.\n bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);\n\n /// \brief Is this RSPM attached to the root block?\n bool is_root () const;\n\n /// \brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n };\n\n /**\n * \brief private: Storage for header information for Routing_Slip blocks.\n */\n class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n };\n\n /// \brief An Event block header.\n ///\n /// is just a Block_Header with no extra data\n class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n };\n\n /// \brief An overflow block header.\n ///\n /// is just a Block_Header with no extra data\n /// The same record type is used for both Routing_Slip\n /// and Event overflows.\n class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n };\n\n bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n bool update_i(const ACE_Message_Block& routing_slip);\n\n bool store_event(const ACE_Message_Block& event);\n\n /// Fill in a block with data, and return the number of bytes\n /// of data remaining to be written.\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);\n\n /// Build a chain of Persistent_Storage_Blocks\n bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);\n\n /// Reload a chain from persistent store.\n bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);\n\n /// Locked method to do the work of setting the next_manager_.\n bool update_next_manager(Routing_Slip_Persistence_Manager* next);\n\n /// Have we been persisted yet?\n bool persisted();\n\n /// Write out our first event block.\n size_t write_first_routing_slip_block(bool prepare_only = false);\n\n /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers\n void dllist_push_back();\n\n void insert_before (Routing_Slip_Persistence_Manager * node);\n\n /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers\n void remove_from_dllist();\n\nprivate:\n TAO_SYNCH_MUTEX lock_;\n bool removed_;\n ACE_UINT64 serial_number_;\n Persistent_File_Allocator* allocator_;\n Standard_Event_Persistence_Factory* factory_;\n Event_Header event_header_;\n Routing_Slip_Header routing_slip_header_;\n Persistent_Storage_Block* first_event_block_;\n Persistent_Storage_Block* first_routing_slip_block_;\n /// We are part of a doubly-linked list\n Routing_Slip_Persistence_Manager* prev_manager_;\n Routing_Slip_Persistence_Manager* next_manager_;\n ACE_Unbounded_Stack<size_t> allocated_event_blocks_;\n ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;\n Persistent_Callback* callback_;\n\n /// If these are non-zero we own 'em\n ACE_Message_Block * event_mb_;\n ACE_Message_Block * routing_slip_mb_;\n}" ({) "{" (labeled_statement) "public:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;" (statement_identifier) "public" (:) ":" (comment) "/// A unique identifier for logical blocks in persistent storage." (declaration) "typedef ACE_UINT64 Block_Serial_Number;" (type_identifier) "typedef" (ERROR) "ACE_UINT64" (identifier) "ACE_UINT64" (identifier) "Block_Serial_Number" (;) ";" (comment) "/// The physical address of a block in persistent storage." (type_definition) "typedef ACE_UINT32 Block_Number;" (typedef) "typedef" (type_identifier) "ACE_UINT32" (type_identifier) "Block_Number" (;) ";" (comment) "/// The size of a block in persistent storage." (type_definition) "typedef ACE_UINT16 Block_Size;" (typedef) "typedef" (type_identifier) "ACE_UINT16" (type_identifier) "Block_Size" (;) ";" (comment) "/// A code to indicate the type of block in persistent storage." (type_definition) "typedef ACE_UINT16 Block_Type;" (typedef) "typedef" (type_identifier) "ACE_UINT16" (type_identifier) "Block_Type" (;) ";" (comment) "/// The constructor." (expression_statement) "Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);" (call_expression) "Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory)" (identifier) "Routing_Slip_Persistence_Manager" (argument_list) "(Standard_Event_Persistence_Factory* factory)" (() "(" (binary_expression) "Standard_Event_Persistence_Factory* factory" (identifier) "Standard_Event_Persistence_Factory" (*) "*" (identifier) "factory" ()) ")" (;) ";" (comment) "/// The destructor." (expression_statement) "~Routing_Slip_Persistence_Manager();" (unary_expression) "~Routing_Slip_Persistence_Manager()" (~) "~" (call_expression) "Routing_Slip_Persistence_Manager()" (identifier) "Routing_Slip_Persistence_Manager" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/// Set up callbacks" (declaration) "void set_callback(Persistent_Callback* callback);" (primitive_type) "void" (function_declarator) "set_callback(Persistent_Callback* callback)" (identifier) "set_callback" (parameter_list) "(Persistent_Callback* callback)" (() "(" (parameter_declaration) "Persistent_Callback* callback" (type_identifier) "Persistent_Callback" (pointer_declarator) "* callback" (*) "*" (identifier) "callback" ()) ")" (;) ";" (comment) "/// Store an event + routing slip." (declaration) "bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);" (primitive_type) "bool" (function_declarator) "store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip)" (identifier) "store" (parameter_list) "(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip)" (() "(" (parameter_declaration) "const ACE_Message_Block& event" (type_qualifier) "const" (const) "const" (type_identifier) "ACE_Message_Block" (ERROR) "&" (&) "&" (identifier) "event" (,) "," (parameter_declaration) "const ACE_Message_Block& routing_slip" (type_qualifier) "const" (const) "const" (type_identifier) "ACE_Message_Block" (ERROR) "&" (&) "&" (identifier) "routing_slip" ()) ")" (;) ";" (comment) "/// \brief Update the routing slip." (comment) "///" (comment) "/// We must always overwrite the first block" (comment) "/// last, and it may not chance. Other blocks should be freed and" (comment) "/// reallocated." (declaration) "bool update(const ACE_Message_Block& routing_slip);" (primitive_type) "bool" (function_declarator) "update(const ACE_Message_Block& routing_slip)" (identifier) "update" (parameter_list) "(const ACE_Message_Block& routing_slip)" (() "(" (parameter_declaration) "const ACE_Message_Block& routing_slip" (type_qualifier) "const" (const) "const" (type_identifier) "ACE_Message_Block" (ERROR) "&" (&) "&" (identifier) "routing_slip" ()) ")" (;) ";" (comment) "/// \brief Remove our associated event and routing slip from the" (comment) "/// Persistent_File_Allocator." (declaration) "bool remove();" (primitive_type) "bool" (function_declarator) "remove()" (identifier) "remove" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/////////////////////////////////////////" (comment) "// Methods to be used during reload only." (comment) "/// \brief Call this method to recover data during event reload." (comment) "///" (comment) "/// It should not fail under normal circumstances." (comment) "/// Caller owns the resulting message blocks and is responsible" (comment) "/// for deleting them." (comment) "/// Reload the event and routing_slip from the Persistent_File_Allocator." (declaration) "bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);" (primitive_type) "bool" (function_declarator) "reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip)" (identifier) "reload" (parameter_list) "(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip)" (() "(" (parameter_declaration) "ACE_Message_Block*& event" (type_identifier) "ACE_Message_Block" (pointer_declarator) "*& event" (*) "*" (ERROR) "&" (&) "&" (identifier) "event" (,) "," (parameter_declaration) "ACE_Message_Block*&routing_slip" (type_identifier) "ACE_Message_Block" (pointer_declarator) "*&routing_slip" (*) "*" (ERROR) "&" (&) "&" (identifier) "routing_slip" ()) ")" (;) ";" (comment) "/// \brief Get next RSPM during reload." (comment) "///" (comment) "/// After using the data from the reload method, call this" (comment) "/// method to get the next RSPM. It returns a null pointer" (comment) "/// when all persistent events have been reloaded." (declaration) "Routing_Slip_Persistence_Manager * load_next ();" (type_identifier) "Routing_Slip_Persistence_Manager" (pointer_declarator) "* load_next ()" (*) "*" (function_declarator) "load_next ()" (identifier) "load_next" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/////////////////////////" (comment) "// Implementation methods." (comment) "// Should not be called by Routing_Slip" (comment) "/// \brief Commit root data to disk, which should only be done for a root node." (declaration) "bool store_root();" (primitive_type) "bool" (function_declarator) "store_root()" (identifier) "store_root" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/// \brief Reload data into this RSPM from the given block/serial#" (comment) "///" (comment) "/// \return false if the reload is not successful." (declaration) "bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);" (primitive_type) "bool" (function_declarator) "load(Block_Number block_number, Block_Serial_Number expected_serial_number)" (identifier) "load" (parameter_list) "(Block_Number block_number, Block_Serial_Number expected_serial_number)" (() "(" (parameter_declaration) "Block_Number block_number" (type_identifier) "Block_Number" (identifier) "block_number" (,) "," (parameter_declaration) "Block_Serial_Number expected_serial_number" (type_identifier) "Block_Serial_Number" (identifier) "expected_serial_number" ()) ")" (;) ";" (comment) "/// \brief Is this RSPM attached to the root block?" (function_definition) "bool is_root () const;\n\n /// \brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n }" (primitive_type) "bool" (function_declarator) "is_root ()" (identifier) "is_root" (parameter_list) "()" (() "(" ()) ")" (declaration) "const;\n\n /// \brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (comment) "/// \brief During cleanup for shut down, release all chained RSPMs." (primitive_type) "void" (function_declarator) "release_all ()" (identifier) "release_all" (parameter_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "private:\n /**\n * \brief private: Storage for header information of all persistent block.\n */\n class Block_Header" (type_identifier) "private" (ERROR) ":" (:) ":" (comment) "/**\n * \brief private: Storage for header information of all persistent block.\n */" (identifier) "class" (identifier) "Block_Header" (compound_statement) "{\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n }" ({) "{" (labeled_statement) "public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);" (statement_identifier) "public" (:) ":" (declaration) "enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);" (enum_specifier) "enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n }" (enum) "enum" (type_identifier) "Header_Type" (enumerator_list) "{\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n }" ({) "{" (enumerator) "BT_Routing_Slip" (identifier) "BT_Routing_Slip" (,) "," (enumerator) "BT_Event" (identifier) "BT_Event" (,) "," (enumerator) "BT_Overflow" (identifier) "BT_Overflow" (}) "}" (ERROR) ";" (;) ";" (function_declarator) "Block_Header(Header_Type type)" (identifier) "Block_Header" (parameter_list) "(Header_Type type)" (() "(" (parameter_declaration) "Header_Type type" (type_identifier) "Header_Type" (identifier) "type" ()) ")" (;) ";" (declaration) "virtual ~Block_Header (void);" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "Block_Header (void)" (identifier) "Block_Header" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "virtual size_t" (type_identifier) "virtual" (identifier) "size_t" (;) "" (expression_statement) "extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);" (call_expression) "extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0)" (identifier) "extract_header" (argument_list) "(Persistent_Storage_Block& psb,\n size_t offset = 0)" (() "(" (binary_expression) "Persistent_Storage_Block& psb" (identifier) "Persistent_Storage_Block" (&) "&" (identifier) "psb" (,) "," (ERROR) "size_t" (identifier) "size_t" (assignment_expression) "offset = 0" (identifier) "offset" (=) "=" (number_literal) "0" ()) ")" (;) ";" (declaration) "virtual size_t" (type_identifier) "virtual" (identifier) "size_t" (;) "" (expression_statement) "put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);" (call_expression) "put_header(Persistent_Storage_Block& psb,\n size_t offset = 0)" (identifier) "put_header" (argument_list) "(Persistent_Storage_Block& psb,\n size_t offset = 0)" (() "(" (binary_expression) "Persistent_Storage_Block& psb" (identifier) "Persistent_Storage_Block" (&) "&" (identifier) "psb" (,) "," (ERROR) "size_t" (identifier) "size_t" (assignment_expression) "offset = 0" (identifier) "offset" (=) "=" (number_literal) "0" ()) ")" (;) ";" (labeled_statement) "public:\n /// Our serial number\n Block_Serial_Number serial_number;" (statement_identifier) "public" (:) ":" (comment) "/// Our serial number" (declaration) "Block_Serial_Number serial_number;" (type_identifier) "Block_Serial_Number" (identifier) "serial_number" (;) ";" (comment) "/// Address of the overflow record (if any)" (declaration) "Block_Number next_overflow;" (type_identifier) "Block_Number" (identifier) "next_overflow" (;) ";" (comment) "/// How much extra header data is in this block (not including this header)" (declaration) "Block_Type header_type;" (type_identifier) "Block_Type" (identifier) "header_type" (;) ";" (comment) "/// How much actual data is in this block? (not including headers)" (declaration) "Block_Size data_size;" (type_identifier) "Block_Size" (identifier) "data_size" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "/**\n * \brief private: Storage for header information for Routing_Slip blocks.\n */" (function_definition) "class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n }" (type_identifier) "class" (identifier) "Routing_Slip_Header" (ERROR) ": public Block_Header" (:) ":" (identifier) "public" (identifier) "Block_Header" (compound_statement) "{\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n }" ({) "{" (labeled_statement) "public:\n Routing_Slip_Header();" (statement_identifier) "public" (:) ":" (expression_statement) "Routing_Slip_Header();" (call_expression) "Routing_Slip_Header()" (identifier) "Routing_Slip_Header" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual size_t" (type_identifier) "virtual" (identifier) "size_t" (;) "" (expression_statement) "extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);" (call_expression) "extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0)" (identifier) "extract_header" (argument_list) "(Persistent_Storage_Block& psb,\n size_t offset = 0)" (() "(" (binary_expression) "Persistent_Storage_Block& psb" (identifier) "Persistent_Storage_Block" (&) "&" (identifier) "psb" (,) "," (ERROR) "size_t" (identifier) "size_t" (assignment_expression) "offset = 0" (identifier) "offset" (=) "=" (number_literal) "0" ()) ")" (;) ";" (declaration) "virtual size_t" (type_identifier) "virtual" (identifier) "size_t" (;) "" (expression_statement) "put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);" (call_expression) "put_header(Persistent_Storage_Block& psb,\n size_t offset = 0)" (identifier) "put_header" (argument_list) "(Persistent_Storage_Block& psb,\n size_t offset = 0)" (() "(" (binary_expression) "Persistent_Storage_Block& psb" (identifier) "Persistent_Storage_Block" (&) "&" (identifier) "psb" (,) "," (ERROR) "size_t" (identifier) "size_t" (assignment_expression) "offset = 0" (identifier) "offset" (=) "=" (number_literal) "0" ()) ")" (;) ";" (labeled_statement) "public:\n /// The next event in the system\n Block_Number next_routing_slip_block;" (statement_identifier) "public" (:) ":" (comment) "/// The next event in the system" (declaration) "Block_Number next_routing_slip_block;" (type_identifier) "Block_Number" (identifier) "next_routing_slip_block" (;) ";" (comment) "/// The next expected serial number" (declaration) "Block_Serial_Number next_serial_number;" (type_identifier) "Block_Serial_Number" (identifier) "next_serial_number" (;) ";" (declaration) "Block_Number event_block;" (type_identifier) "Block_Number" (identifier) "event_block" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "/// \brief An Event block header." (comment) "///" (comment) "/// is just a Block_Header with no extra data" (function_definition) "class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n }" (type_identifier) "class" (identifier) "Event_Header" (ERROR) ": public Block_Header" (:) ":" (identifier) "public" (identifier) "Block_Header" (compound_statement) "{\n public:\n Event_Header ();\n }" ({) "{" (labeled_statement) "public:\n Event_Header ();" (statement_identifier) "public" (:) ":" (expression_statement) "Event_Header ();" (call_expression) "Event_Header ()" (identifier) "Event_Header" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "/// \brief An overflow block header." (comment) "///" (comment) "/// is just a Block_Header with no extra data" (comment) "/// The same record type is used for both Routing_Slip" (comment) "/// and Event overflows." (function_definition) "class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n }" (type_identifier) "class" (identifier) "Overflow_Header" (ERROR) ": public Block_Header" (:) ":" (identifier) "public" (identifier) "Block_Header" (compound_statement) "{\n public:\n Overflow_Header ();\n }" ({) "{" (labeled_statement) "public:\n Overflow_Header ();" (statement_identifier) "public" (:) ":" (expression_statement) "Overflow_Header ();" (call_expression) "Overflow_Header ()" (identifier) "Overflow_Header" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (declaration) "bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);" (primitive_type) "bool" (function_declarator) "store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip)" (identifier) "store_i" (parameter_list) "(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip)" (() "(" (parameter_declaration) "const ACE_Message_Block& event" (type_qualifier) "const" (const) "const" (type_identifier) "ACE_Message_Block" (ERROR) "&" (&) "&" (identifier) "event" (,) "," (parameter_declaration) "const ACE_Message_Block& routing_slip" (type_qualifier) "const" (const) "const" (type_identifier) "ACE_Message_Block" (ERROR) "&" (&) "&" (identifier) "routing_slip" ()) ")" (;) ";" (declaration) "bool update_i(const ACE_Message_Block& routing_slip);" (primitive_type) "bool" (function_declarator) "update_i(const ACE_Message_Block& routing_slip)" (identifier) "update_i" (parameter_list) "(const ACE_Message_Block& routing_slip)" (() "(" (parameter_declaration) "const ACE_Message_Block& routing_slip" (type_qualifier) "const" (const) "const" (type_identifier) "ACE_Message_Block" (ERROR) "&" (&) "&" (identifier) "routing_slip" ()) ")" (;) ";" (declaration) "bool store_event(const ACE_Message_Block& event);" (primitive_type) "bool" (function_declarator) "store_event(const ACE_Message_Block& event)" (identifier) "store_event" (parameter_list) "(const ACE_Message_Block& event)" (() "(" (parameter_declaration) "const ACE_Message_Block& event" (type_qualifier) "const" (const) "const" (type_identifier) "ACE_Message_Block" (ERROR) "&" (&) "&" (identifier) "event" ()) ")" (;) ";" (comment) "/// Fill in a block with data, and return the number of bytes" (comment) "/// of data remaining to be written." (declaration) "size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);" (primitive_type) "size_t" (function_declarator) "fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg)" (identifier) "fill_block" (parameter_list) "(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg)" (() "(" (parameter_declaration) "Persistent_Storage_Block& psb" (type_identifier) "Persistent_Storage_Block" (ERROR) "&" (&) "&" (identifier) "psb" (,) "," (parameter_declaration) "size_t offset_into_block" (primitive_type) "size_t" (identifier) "offset_into_block" (,) "," (parameter_declaration) "const ACE_Message_Block* data" (type_qualifier) "const" (const) "const" (type_identifier) "ACE_Message_Block" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "size_t offset_into_msg" (primitive_type) "size_t" (identifier) "offset_into_msg" ()) ")" (;) ";" (declaration) "size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);" (primitive_type) "size_t" (function_declarator) "fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size)" (identifier) "fill_block" (parameter_list) "(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size)" (() "(" (parameter_declaration) "Persistent_Storage_Block& psb" (type_identifier) "Persistent_Storage_Block" (ERROR) "&" (&) "&" (identifier) "psb" (,) "," (parameter_declaration) "size_t offset_into_block" (primitive_type) "size_t" (identifier) "offset_into_block" (,) "," (parameter_declaration) "unsigned char* data" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "size_t data_size" (primitive_type) "size_t" (identifier) "data_size" ()) ")" (;) ";" (comment) "/// Build a chain of Persistent_Storage_Blocks" (declaration) "bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);" (primitive_type) "bool" (function_declarator) "build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data)" (identifier) "build_chain" (parameter_list) "(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data)" (() "(" (parameter_declaration) "Persistent_Storage_Block* first_block" (type_identifier) "Persistent_Storage_Block" (pointer_declarator) "* first_block" (*) "*" (identifier) "first_block" (,) "," (parameter_declaration) "Block_Header& first_header" (type_identifier) "Block_Header" (ERROR) "&" (&) "&" (identifier) "first_header" (,) "," (parameter_declaration) "ACE_Unbounded_Stack<size_t>& allocated_blocks" (type_identifier) "ACE_Unbounded_Stack" (ERROR) "<size_t>&" (<) "<" (primitive_type) "size_t" (>) ">" (&) "&" (identifier) "allocated_blocks" (,) "," (parameter_declaration) "const ACE_Message_Block& data" (type_qualifier) "const" (const) "const" (type_identifier) "ACE_Message_Block" (ERROR) "&" (&) "&" (identifier) "data" ()) ")" (;) ";" (comment) "/// Reload a chain from persistent store." (declaration) "bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);" (primitive_type) "bool" (function_declarator) "reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number)" (identifier) "reload_chain" (parameter_list) "(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number)" (() "(" (parameter_declaration) "Persistent_Storage_Block* first_block" (type_identifier) "Persistent_Storage_Block" (pointer_declarator) "* first_block" (*) "*" (identifier) "first_block" (,) "," (parameter_declaration) "Block_Header& first_header" (type_identifier) "Block_Header" (ERROR) "&" (&) "&" (identifier) "first_header" (,) "," (parameter_declaration) "ACE_Unbounded_Stack<size_t>& allocated_blocks" (type_identifier) "ACE_Unbounded_Stack" (ERROR) "<size_t>&" (<) "<" (primitive_type) "size_t" (>) ">" (&) "&" (identifier) "allocated_blocks" (,) "," (parameter_declaration) "ACE_Message_Block* amb" (type_identifier) "ACE_Message_Block" (pointer_declarator) "* amb" (*) "*" (identifier) "amb" (,) "," (parameter_declaration) "ACE_UINT64 expected_serial_number" (type_identifier) "ACE_UINT64" (identifier) "expected_serial_number" ()) ")" (;) ";" (comment) "/// Locked method to do the work of setting the next_manager_." (declaration) "bool update_next_manager(Routing_Slip_Persistence_Manager* next);" (primitive_type) "bool" (function_declarator) "update_next_manager(Routing_Slip_Persistence_Manager* next)" (identifier) "update_next_manager" (parameter_list) "(Routing_Slip_Persistence_Manager* next)" (() "(" (parameter_declaration) "Routing_Slip_Persistence_Manager* next" (type_identifier) "Routing_Slip_Persistence_Manager" (pointer_declarator) "* next" (*) "*" (identifier) "next" ()) ")" (;) ";" (comment) "/// Have we been persisted yet?" (declaration) "bool persisted();" (primitive_type) "bool" (function_declarator) "persisted()" (identifier) "persisted" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/// Write out our first event block." (declaration) "size_t write_first_routing_slip_block(bool prepare_only = false);" (primitive_type) "size_t" (init_declarator) "write_first_routing_slip_block(bool prepare_only = false" (function_declarator) "write_first_routing_slip_block(bool prepare_only" (identifier) "write_first_routing_slip_block" (parameter_list) "(bool prepare_only" (() "(" (parameter_declaration) "bool prepare_only" (primitive_type) "bool" (identifier) "prepare_only" ()) "" (=) "=" (false) "false" (ERROR) ")" ()) ")" (;) ";" (comment) "/// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers" (declaration) "void dllist_push_back();" (primitive_type) "void" (function_declarator) "dllist_push_back()" (identifier) "dllist_push_back" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void insert_before (Routing_Slip_Persistence_Manager * node);" (primitive_type) "void" (function_declarator) "insert_before (Routing_Slip_Persistence_Manager * node)" (identifier) "insert_before" (parameter_list) "(Routing_Slip_Persistence_Manager * node)" (() "(" (parameter_declaration) "Routing_Slip_Persistence_Manager * node" (type_identifier) "Routing_Slip_Persistence_Manager" (pointer_declarator) "* node" (*) "*" (identifier) "node" ()) ")" (;) ";" (comment) "/// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers" (declaration) "void remove_from_dllist();" (primitive_type) "void" (function_declarator) "remove_from_dllist()" (identifier) "remove_from_dllist" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n TAO_SYNCH_MUTEX lock_;" (statement_identifier) "private" (:) ":" (declaration) "TAO_SYNCH_MUTEX lock_;" (type_identifier) "TAO_SYNCH_MUTEX" (identifier) "lock_" (;) ";" (declaration) "bool removed_;" (primitive_type) "bool" (identifier) "removed_" (;) ";" (declaration) "ACE_UINT64 serial_number_;" (type_identifier) "ACE_UINT64" (identifier) "serial_number_" (;) ";" (declaration) "Persistent_File_Allocator* allocator_;" (type_identifier) "Persistent_File_Allocator" (pointer_declarator) "* allocator_" (*) "*" (identifier) "allocator_" (;) ";" (declaration) "Standard_Event_Persistence_Factory* factory_;" (type_identifier) "Standard_Event_Persistence_Factory" (pointer_declarator) "* factory_" (*) "*" (identifier) "factory_" (;) ";" (declaration) "Event_Header event_header_;" (type_identifier) "Event_Header" (identifier) "event_header_" (;) ";" (declaration) "Routing_Slip_Header routing_slip_header_;" (type_identifier) "Routing_Slip_Header" (identifier) "routing_slip_header_" (;) ";" (declaration) "Persistent_Storage_Block* first_event_block_;" (type_identifier) "Persistent_Storage_Block" (pointer_declarator) "* first_event_block_" (*) "*" (identifier) "first_event_block_" (;) ";" (declaration) "Persistent_Storage_Block* first_routing_slip_block_;" (type_identifier) "Persistent_Storage_Block" (pointer_declarator) "* first_routing_slip_block_" (*) "*" (identifier) "first_routing_slip_block_" (;) ";" (comment) "/// We are part of a doubly-linked list" (declaration) "Routing_Slip_Persistence_Manager* prev_manager_;" (type_identifier) "Routing_Slip_Persistence_Manager" (pointer_declarator) "* prev_manager_" (*) "*" (identifier) "prev_manager_" (;) ";" (declaration) "Routing_Slip_Persistence_Manager* next_manager_;" (type_identifier) "Routing_Slip_Persistence_Manager" (pointer_declarator) "* next_manager_" (*) "*" (identifier) "next_manager_" (;) ";" (expression_statement) "ACE_Unbounded_Stack<size_t> allocated_event_blocks_;" (binary_expression) "ACE_Unbounded_Stack<size_t> allocated_event_blocks_" (binary_expression) "ACE_Unbounded_Stack<size_t" (identifier) "ACE_Unbounded_Stack" (<) "<" (identifier) "size_t" (>) ">" (identifier) "allocated_event_blocks_" (;) ";" (expression_statement) "ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;" (binary_expression) "ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_" (binary_expression) "ACE_Unbounded_Stack<size_t" (identifier) "ACE_Unbounded_Stack" (<) "<" (identifier) "size_t" (>) ">" (identifier) "allocated_routing_slip_blocks_" (;) ";" (declaration) "Persistent_Callback* callback_;" (type_identifier) "Persistent_Callback" (pointer_declarator) "* callback_" (*) "*" (identifier) "callback_" (;) ";" (comment) "/// If these are non-zero we own 'em" (declaration) "ACE_Message_Block * event_mb_;" (type_identifier) "ACE_Message_Block" (pointer_declarator) "* event_mb_" (*) "*" (identifier) "event_mb_" (;) ";" (declaration) "ACE_Message_Block * routing_slip_mb_;" (type_identifier) "ACE_Message_Block" (pointer_declarator) "* routing_slip_mb_" (*) "*" (identifier) "routing_slip_mb_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "/* namespace TAO_Notify */" (type_identifier) "TAO_END_VERSIONED_NAMESPACE_DECL" (;) "" (preproc_include) "#include /**/ "ace/post.h"\n" (#include) "#include" (comment) "/**/" (string_literal) ""ace/post.h"" (") """ (string_content) "ace/post.h" (") """ (#endif) "#endif" (comment) "/* ROUTING_SLIP_PERSISTENCE_MANAGER_H */"
939
32
{"language": "c", "success": true, "metadata": {"lines": 220, "avg_line_length": 36.57, "nodes": 545, "errors": 0, "source_hash": "9bd46b171ca8d56d18a74d48fbe603a3061849ad02aee2bae4f13a55a366f87e", "categorized_nodes": 387}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef ROUTING_SLIP_PERSISTENCE_MANAGER_H\n#define ROUTING_SLIP_PERSISTENCE_MANAGER_H\n#include /**/ \"ace/pre.h\"\n\n#include \"orbsvcs/Notify/notify_serv_export.h\"\n\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\n#pragma once\n#endif /* ACE_LACKS_PRAGMA_ONCE */\n\n#include \"tao/Versioned_Namespace.h\"\n#include \"tao/orbconf.h\"\n#include \"ace/Message_Block.h\"\n#include \"ace/Containers_T.h\"\n\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nnamespace TAO_Notify\n{\n// Some forward declarations.\nclass Standard_Event_Persistence_Factory;\nclass Persistent_File_Allocator;\nclass Persistent_Storage_Block;\nclass Persistent_Callback;\n\n/**\n * \\brief Manage interaction between Routing_Slip and persistent storage.\n *\n * todo: to complete the strategization of event persistent storage this\n * should become an interface that is implemented differently by different\n * strategies. For now it interacts with Standard_Event_Persistence.\n */\nclass TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager\n{\npublic:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;\n /// The physical address of a block in persistent storage.\n typedef ACE_UINT32 Block_Number;\n /// The size of a block in persistent storage.\n typedef ACE_UINT16 Block_Size;\n /// A code to indicate the type of block in persistent storage.\n typedef ACE_UINT16 Block_Type;\n\n /// The constructor.\n Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);\n\n /// The destructor.\n ~Routing_Slip_Persistence_Manager();\n\n /// Set up callbacks\n void set_callback(Persistent_Callback* callback);\n\n /// Store an event + routing slip.\n bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n /// \\brief Update the routing slip.\n ///\n /// We must always overwrite the first block\n /// last, and it may not chance. Other blocks should be freed and\n /// reallocated.\n bool update(const ACE_Message_Block& routing_slip);\n\n /// \\brief Remove our associated event and routing slip from the\n /// Persistent_File_Allocator.\n bool remove();\n\n /////////////////////////////////////////\n // Methods to be used during reload only.\n\n /// \\brief Call this method to recover data during event reload.\n ///\n /// It should not fail under normal circumstances.\n /// Caller owns the resulting message blocks and is responsible\n /// for deleting them.\n /// Reload the event and routing_slip from the Persistent_File_Allocator.\n bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);\n\n /// \\brief Get next RSPM during reload.\n ///\n /// After using the data from the reload method, call this\n /// method to get the next RSPM. It returns a null pointer\n /// when all persistent events have been reloaded.\n Routing_Slip_Persistence_Manager * load_next ();\n\n /////////////////////////\n // Implementation methods.\n // Should not be called by Routing_Slip\n\n /// \\brief Commit root data to disk, which should only be done for a root node.\n bool store_root();\n\n /// \\brief Reload data into this RSPM from the given block/serial#\n ///\n /// \\return false if the reload is not successful.\n bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);\n\n /// \\brief Is this RSPM attached to the root block?\n bool is_root () const;\n\n /// \\brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \\brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n };\n\n /**\n * \\brief private: Storage for header information for Routing_Slip blocks.\n */\n class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n };\n\n /// \\brief An Event block header.\n ///\n /// is just a Block_Header with no extra data\n class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n };\n\n /// \\brief An overflow block header.\n ///\n /// is just a Block_Header with no extra data\n /// The same record type is used for both Routing_Slip\n /// and Event overflows.\n class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n };\n\n bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n bool update_i(const ACE_Message_Block& routing_slip);\n\n bool store_event(const ACE_Message_Block& event);\n\n /// Fill in a block with data, and return the number of bytes\n /// of data remaining to be written.\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);\n\n /// Build a chain of Persistent_Storage_Blocks\n bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);\n\n /// Reload a chain from persistent store.\n bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);\n\n /// Locked method to do the work of setting the next_manager_.\n bool update_next_manager(Routing_Slip_Persistence_Manager* next);\n\n /// Have we been persisted yet?\n bool persisted();\n\n /// Write out our first event block.\n size_t write_first_routing_slip_block(bool prepare_only = false);\n\n /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers\n void dllist_push_back();\n\n void insert_before (Routing_Slip_Persistence_Manager * node);\n\n /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers\n void remove_from_dllist();\n\nprivate:\n TAO_SYNCH_MUTEX lock_;\n bool removed_;\n ACE_UINT64 serial_number_;\n Persistent_File_Allocator* allocator_;\n Standard_Event_Persistence_Factory* factory_;\n Event_Header event_header_;\n Routing_Slip_Header routing_slip_header_;\n Persistent_Storage_Block* first_event_block_;\n Persistent_Storage_Block* first_routing_slip_block_;\n /// We are part of a doubly-linked list\n Routing_Slip_Persistence_Manager* prev_manager_;\n Routing_Slip_Persistence_Manager* next_manager_;\n ACE_Unbounded_Stack<size_t> allocated_event_blocks_;\n ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;\n Persistent_Callback* callback_;\n\n /// If these are non-zero we own 'em\n ACE_Message_Block * event_mb_;\n ACE_Message_Block * routing_slip_mb_;\n};\n\n} /* namespace TAO_Notify */\n\nTAO_END_VERSIONED_NAMESPACE_DECL\n\n#include /**/ \"ace/post.h\"\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 24, 27, 30, 33, 36, 540, 541, 544], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 265, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 2, "type": "identifier", "text": "ROUTING_SLIP_PERSISTENCE_MANAGER_H", "parent": 0, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 42}}, {"id": 3, "type": "preproc_def", "text": "#define ROUTING_SLIP_PERSISTENCE_MANAGER_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 5, "type": "identifier", "text": "ROUTING_SLIP_PERSISTENCE_MANAGER_H", "parent": 3, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 42}}, {"id": 6, "type": "preproc_include", "text": "#include /**/ \"ace/pre.h\"\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": "string_literal", "text": "\"ace/pre.h\"", "parent": 6, "children": [], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include \"orbsvcs/Notify/notify_serv_export.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"orbsvcs/Notify/notify_serv_export.h\"", "parent": 9, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 46}}, {"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": 22, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 13, "type": "#if", "text": "#if", "parent": 12, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 3}}, {"id": 14, "type": "unary_expression", "text": "!defined (ACE_LACKS_PRAGMA_ONCE)", "parent": 12, "children": [15, 16], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 36}}, {"id": 15, "type": "!", "text": "!", "parent": 14, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 5}}, {"id": 16, "type": "preproc_defined", "text": "defined (ACE_LACKS_PRAGMA_ONCE)", "parent": 14, "children": [17, 18], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 36}}, {"id": 17, "type": "defined", "text": "defined", "parent": 16, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 12}}, {"id": 18, "type": "identifier", "text": "ACE_LACKS_PRAGMA_ONCE", "parent": 16, "children": [], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 35}}, {"id": 19, "type": "\n", "text": "\n", "parent": 12, "children": [], "start_point": {"row": 22, "column": 36}, "end_point": {"row": 23, "column": 0}}, {"id": 20, "type": "preproc_call", "text": "#pragma once\n", "parent": 12, "children": [21, 22], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 21, "type": "preproc_directive", "text": "#pragma", "parent": 20, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 22, "type": "preproc_arg", "text": "once", "parent": 20, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 12}}, {"id": 23, "type": "#endif", "text": "#endif", "parent": 12, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 24, "type": "preproc_include", "text": "#include \"tao/Versioned_Namespace.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"tao/Versioned_Namespace.h\"", "parent": 24, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 36}}, {"id": 27, "type": "preproc_include", "text": "#include \"tao/orbconf.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"tao/orbconf.h\"", "parent": 27, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 24}}, {"id": 30, "type": "preproc_include", "text": "#include \"ace/Message_Block.h\"\n", "parent": 0, "children": [31, 32], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"ace/Message_Block.h\"", "parent": 30, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 30}}, {"id": 33, "type": "preproc_include", "text": "#include \"ace/Containers_T.h\"\n", "parent": 0, "children": [34, 35], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"ace/Containers_T.h\"", "parent": 33, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 29}}, {"id": 36, "type": "function_definition", "text": "TAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nnamespace TAO_Notify\n{\n// Some forward declarations.\nclass Standard_Event_Persistence_Factory;\nclass Persistent_File_Allocator;\nclass Persistent_Storage_Block;\nclass Persistent_Callback;\n\n/**\n * \\brief Manage interaction between Routing_Slip and persistent storage.\n *\n * todo: to complete the strategization of event persistent storage this\n * should become an interface that is implemented differently by different\n * strategies. For now it interacts with Standard_Event_Persistence.\n */\nclass TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager\n{\npublic:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;\n /// The physical address of a block in persistent storage.\n typedef ACE_UINT32 Block_Number;\n /// The size of a block in persistent storage.\n typedef ACE_UINT16 Block_Size;\n /// A code to indicate the type of block in persistent storage.\n typedef ACE_UINT16 Block_Type;\n\n /// The constructor.\n Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);\n\n /// The destructor.\n ~Routing_Slip_Persistence_Manager();\n\n /// Set up callbacks\n void set_callback(Persistent_Callback* callback);\n\n /// Store an event + routing slip.\n bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n /// \\brief Update the routing slip.\n ///\n /// We must always overwrite the first block\n /// last, and it may not chance. Other blocks should be freed and\n /// reallocated.\n bool update(const ACE_Message_Block& routing_slip);\n\n /// \\brief Remove our associated event and routing slip from the\n /// Persistent_File_Allocator.\n bool remove();\n\n /////////////////////////////////////////\n // Methods to be used during reload only.\n\n /// \\brief Call this method to recover data during event reload.\n ///\n /// It should not fail under normal circumstances.\n /// Caller owns the resulting message blocks and is responsible\n /// for deleting them.\n /// Reload the event and routing_slip from the Persistent_File_Allocator.\n bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);\n\n /// \\brief Get next RSPM during reload.\n ///\n /// After using the data from the reload method, call this\n /// method to get the next RSPM. It returns a null pointer\n /// when all persistent events have been reloaded.\n Routing_Slip_Persistence_Manager * load_next ();\n\n /////////////////////////\n // Implementation methods.\n // Should not be called by Routing_Slip\n\n /// \\brief Commit root data to disk, which should only be done for a root node.\n bool store_root();\n\n /// \\brief Reload data into this RSPM from the given block/serial#\n ///\n /// \\return false if the reload is not successful.\n bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);\n\n /// \\brief Is this RSPM attached to the root block?\n bool is_root () const;\n\n /// \\brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \\brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n };\n\n /**\n * \\brief private: Storage for header information for Routing_Slip blocks.\n */\n class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n };\n\n /// \\brief An Event block header.\n ///\n /// is just a Block_Header with no extra data\n class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n };\n\n /// \\brief An overflow block header.\n ///\n /// is just a Block_Header with no extra data\n /// The same record type is used for both Routing_Slip\n /// and Event overflows.\n class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n };\n\n bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n bool update_i(const ACE_Message_Block& routing_slip);\n\n bool store_event(const ACE_Message_Block& event);\n\n /// Fill in a block with data, and return the number of bytes\n /// of data remaining to be written.\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);\n\n /// Build a chain of Persistent_Storage_Blocks\n bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);\n\n /// Reload a chain from persistent store.\n bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);\n\n /// Locked method to do the work of setting the next_manager_.\n bool update_next_manager(Routing_Slip_Persistence_Manager* next);\n\n /// Have we been persisted yet?\n bool persisted();\n\n /// Write out our first event block.\n size_t write_first_routing_slip_block(bool prepare_only = false);\n\n /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers\n void dllist_push_back();\n\n void insert_before (Routing_Slip_Persistence_Manager * node);\n\n /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers\n void remove_from_dllist();\n\nprivate:\n TAO_SYNCH_MUTEX lock_;\n bool removed_;\n ACE_UINT64 serial_number_;\n Persistent_File_Allocator* allocator_;\n Standard_Event_Persistence_Factory* factory_;\n Event_Header event_header_;\n Routing_Slip_Header routing_slip_header_;\n Persistent_Storage_Block* first_event_block_;\n Persistent_Storage_Block* first_routing_slip_block_;\n /// We are part of a doubly-linked list\n Routing_Slip_Persistence_Manager* prev_manager_;\n Routing_Slip_Persistence_Manager* next_manager_;\n ACE_Unbounded_Stack<size_t> allocated_event_blocks_;\n ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;\n Persistent_Callback* callback_;\n\n /// If these are non-zero we own 'em\n ACE_Message_Block * event_mb_;\n ACE_Message_Block * routing_slip_mb_;\n};\n\n}", "parent": 0, "children": [37, 38, 40], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 260, "column": 1}}, {"id": 37, "type": "type_identifier", "text": "TAO_BEGIN_VERSIONED_NAMESPACE_DECL", "parent": 36, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 34}}, {"id": 38, "type": "ERROR", "text": "namespace", "parent": 36, "children": [39], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 9}}, {"id": 39, "type": "identifier", "text": "namespace", "parent": 38, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 9}}, {"id": 40, "type": "identifier", "text": "TAO_Notify", "parent": 36, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 20}}, {"id": 41, "type": "declaration", "text": "class Standard_Event_Persistence_Factory;", "parent": 36, "children": [42], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 41}}, {"id": 42, "type": "identifier", "text": "Standard_Event_Persistence_Factory", "parent": 41, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 40}}, {"id": 43, "type": "declaration", "text": "class Persistent_File_Allocator;", "parent": 36, "children": [44], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 32}}, {"id": 44, "type": "identifier", "text": "Persistent_File_Allocator", "parent": 43, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 31}}, {"id": 45, "type": "declaration", "text": "class Persistent_Storage_Block;", "parent": 36, "children": [46], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 31}}, {"id": 46, "type": "identifier", "text": "Persistent_Storage_Block", "parent": 45, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 30}}, {"id": 47, "type": "declaration", "text": "class Persistent_Callback;", "parent": 36, "children": [48], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 26}}, {"id": 48, "type": "identifier", "text": "Persistent_Callback", "parent": 47, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 25}}, {"id": 49, "type": "function_definition", "text": "class TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager\n{\npublic:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;\n /// The physical address of a block in persistent storage.\n typedef ACE_UINT32 Block_Number;\n /// The size of a block in persistent storage.\n typedef ACE_UINT16 Block_Size;\n /// A code to indicate the type of block in persistent storage.\n typedef ACE_UINT16 Block_Type;\n\n /// The constructor.\n Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);\n\n /// The destructor.\n ~Routing_Slip_Persistence_Manager();\n\n /// Set up callbacks\n void set_callback(Persistent_Callback* callback);\n\n /// Store an event + routing slip.\n bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n /// \\brief Update the routing slip.\n ///\n /// We must always overwrite the first block\n /// last, and it may not chance. Other blocks should be freed and\n /// reallocated.\n bool update(const ACE_Message_Block& routing_slip);\n\n /// \\brief Remove our associated event and routing slip from the\n /// Persistent_File_Allocator.\n bool remove();\n\n /////////////////////////////////////////\n // Methods to be used during reload only.\n\n /// \\brief Call this method to recover data during event reload.\n ///\n /// It should not fail under normal circumstances.\n /// Caller owns the resulting message blocks and is responsible\n /// for deleting them.\n /// Reload the event and routing_slip from the Persistent_File_Allocator.\n bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);\n\n /// \\brief Get next RSPM during reload.\n ///\n /// After using the data from the reload method, call this\n /// method to get the next RSPM. It returns a null pointer\n /// when all persistent events have been reloaded.\n Routing_Slip_Persistence_Manager * load_next ();\n\n /////////////////////////\n // Implementation methods.\n // Should not be called by Routing_Slip\n\n /// \\brief Commit root data to disk, which should only be done for a root node.\n bool store_root();\n\n /// \\brief Reload data into this RSPM from the given block/serial#\n ///\n /// \\return false if the reload is not successful.\n bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);\n\n /// \\brief Is this RSPM attached to the root block?\n bool is_root () const;\n\n /// \\brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \\brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n };\n\n /**\n * \\brief private: Storage for header information for Routing_Slip blocks.\n */\n class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n };\n\n /// \\brief An Event block header.\n ///\n /// is just a Block_Header with no extra data\n class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n };\n\n /// \\brief An overflow block header.\n ///\n /// is just a Block_Header with no extra data\n /// The same record type is used for both Routing_Slip\n /// and Event overflows.\n class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n };\n\n bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n bool update_i(const ACE_Message_Block& routing_slip);\n\n bool store_event(const ACE_Message_Block& event);\n\n /// Fill in a block with data, and return the number of bytes\n /// of data remaining to be written.\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);\n\n /// Build a chain of Persistent_Storage_Blocks\n bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);\n\n /// Reload a chain from persistent store.\n bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);\n\n /// Locked method to do the work of setting the next_manager_.\n bool update_next_manager(Routing_Slip_Persistence_Manager* next);\n\n /// Have we been persisted yet?\n bool persisted();\n\n /// Write out our first event block.\n size_t write_first_routing_slip_block(bool prepare_only = false);\n\n /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers\n void dllist_push_back();\n\n void insert_before (Routing_Slip_Persistence_Manager * node);\n\n /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers\n void remove_from_dllist();\n\nprivate:\n TAO_SYNCH_MUTEX lock_;\n bool removed_;\n ACE_UINT64 serial_number_;\n Persistent_File_Allocator* allocator_;\n Standard_Event_Persistence_Factory* factory_;\n Event_Header event_header_;\n Routing_Slip_Header routing_slip_header_;\n Persistent_Storage_Block* first_event_block_;\n Persistent_Storage_Block* first_routing_slip_block_;\n /// We are part of a doubly-linked list\n Routing_Slip_Persistence_Manager* prev_manager_;\n Routing_Slip_Persistence_Manager* next_manager_;\n ACE_Unbounded_Stack<size_t> allocated_event_blocks_;\n ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;\n Persistent_Callback* callback_;\n\n /// If these are non-zero we own 'em\n ACE_Message_Block * event_mb_;\n ACE_Message_Block * routing_slip_mb_;\n}", "parent": 36, "children": [50, 52], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 258, "column": 1}}, {"id": 50, "type": "ERROR", "text": "TAO_Notify_Serv_Export", "parent": 49, "children": [51], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 28}}, {"id": 51, "type": "identifier", "text": "TAO_Notify_Serv_Export", "parent": 50, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 28}}, {"id": 52, "type": "identifier", "text": "Routing_Slip_Persistence_Manager", "parent": 49, "children": [], "start_point": {"row": 48, "column": 29}, "end_point": {"row": 48, "column": 61}}, {"id": 53, "type": "labeled_statement", "text": "public:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;", "parent": 49, "children": [54], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 52, "column": 41}}, {"id": 54, "type": "declaration", "text": "typedef ACE_UINT64 Block_Serial_Number;", "parent": 53, "children": [55, 56, 58], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 41}}, {"id": 55, "type": "type_identifier", "text": "typedef", "parent": 54, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 9}}, {"id": 56, "type": "ERROR", "text": "ACE_UINT64", "parent": 54, "children": [57], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 20}}, {"id": 57, "type": "identifier", "text": "ACE_UINT64", "parent": 56, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 20}}, {"id": 58, "type": "identifier", "text": "Block_Serial_Number", "parent": 54, "children": [], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 40}}, {"id": 59, "type": "type_definition", "text": "typedef ACE_UINT32 Block_Number;", "parent": 49, "children": [60, 61, 62], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 34}}, {"id": 60, "type": "typedef", "text": "typedef", "parent": 59, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 9}}, {"id": 61, "type": "type_identifier", "text": "ACE_UINT32", "parent": 59, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 20}}, {"id": 62, "type": "type_identifier", "text": "Block_Number", "parent": 59, "children": [], "start_point": {"row": 54, "column": 21}, "end_point": {"row": 54, "column": 33}}, {"id": 63, "type": "type_definition", "text": "typedef ACE_UINT16 Block_Size;", "parent": 49, "children": [64, 65, 66], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 32}}, {"id": 64, "type": "typedef", "text": "typedef", "parent": 63, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 9}}, {"id": 65, "type": "type_identifier", "text": "ACE_UINT16", "parent": 63, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 20}}, {"id": 66, "type": "type_identifier", "text": "Block_Size", "parent": 63, "children": [], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 56, "column": 31}}, {"id": 67, "type": "type_definition", "text": "typedef ACE_UINT16 Block_Type;", "parent": 49, "children": [68, 69, 70], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 32}}, {"id": 68, "type": "typedef", "text": "typedef", "parent": 67, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 9}}, {"id": 69, "type": "type_identifier", "text": "ACE_UINT16", "parent": 67, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 20}}, {"id": 70, "type": "type_identifier", "text": "Block_Type", "parent": 67, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 31}}, {"id": 71, "type": "call_expression", "text": "Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory)", "parent": 49, "children": [72, 73], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 79}}, {"id": 72, "type": "identifier", "text": "Routing_Slip_Persistence_Manager", "parent": 71, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 34}}, {"id": 73, "type": "argument_list", "text": "(Standard_Event_Persistence_Factory* factory)", "parent": 71, "children": [74], "start_point": {"row": 61, "column": 34}, "end_point": {"row": 61, "column": 79}}, {"id": 74, "type": "binary_expression", "text": "Standard_Event_Persistence_Factory* factory", "parent": 73, "children": [75, 76, 77], "start_point": {"row": 61, "column": 35}, "end_point": {"row": 61, "column": 78}}, {"id": 75, "type": "identifier", "text": "Standard_Event_Persistence_Factory", "parent": 74, "children": [], "start_point": {"row": 61, "column": 35}, "end_point": {"row": 61, "column": 69}}, {"id": 76, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 61, "column": 69}, "end_point": {"row": 61, "column": 70}}, {"id": 77, "type": "identifier", "text": "factory", "parent": 74, "children": [], "start_point": {"row": 61, "column": 71}, "end_point": {"row": 61, "column": 78}}, {"id": 78, "type": "unary_expression", "text": "~Routing_Slip_Persistence_Manager()", "parent": 49, "children": [79, 80], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 37}}, {"id": 79, "type": "~", "text": "~", "parent": 78, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 3}}, {"id": 80, "type": "call_expression", "text": "Routing_Slip_Persistence_Manager()", "parent": 78, "children": [81, 82], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 64, "column": 37}}, {"id": 81, "type": "identifier", "text": "Routing_Slip_Persistence_Manager", "parent": 80, "children": [], "start_point": {"row": 64, "column": 3}, "end_point": {"row": 64, "column": 35}}, {"id": 82, "type": "argument_list", "text": "()", "parent": 80, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 37}}, {"id": 83, "type": "declaration", "text": "void set_callback(Persistent_Callback* callback);", "parent": 49, "children": [84, 85], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 51}}, {"id": 84, "type": "primitive_type", "text": "void", "parent": 83, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 6}}, {"id": 85, "type": "function_declarator", "text": "set_callback(Persistent_Callback* callback)", "parent": 83, "children": [86, 87], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 50}}, {"id": 86, "type": "identifier", "text": "set_callback", "parent": 85, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 19}}, {"id": 87, "type": "parameter_list", "text": "(Persistent_Callback* callback)", "parent": 85, "children": [88], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 50}}, {"id": 88, "type": "parameter_declaration", "text": "Persistent_Callback* callback", "parent": 87, "children": [89, 90], "start_point": {"row": 67, "column": 20}, "end_point": {"row": 67, "column": 49}}, {"id": 89, "type": "type_identifier", "text": "Persistent_Callback", "parent": 88, "children": [], "start_point": {"row": 67, "column": 20}, "end_point": {"row": 67, "column": 39}}, {"id": 90, "type": "pointer_declarator", "text": "* callback", "parent": 88, "children": [91, 92], "start_point": {"row": 67, "column": 39}, "end_point": {"row": 67, "column": 49}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 67, "column": 39}, "end_point": {"row": 67, "column": 40}}, {"id": 92, "type": "identifier", "text": "callback", "parent": 90, "children": [], "start_point": {"row": 67, "column": 41}, "end_point": {"row": 67, "column": 49}}, {"id": 93, "type": "declaration", "text": "bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);", "parent": 49, "children": [94, 95], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 71, "column": 43}}, {"id": 94, "type": "primitive_type", "text": "bool", "parent": 93, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 6}}, {"id": 95, "type": "function_declarator", "text": "store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip)", "parent": 93, "children": [96, 97], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 71, "column": 42}}, {"id": 96, "type": "identifier", "text": "store", "parent": 95, "children": [], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 12}}, {"id": 97, "type": "parameter_list", "text": "(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip)", "parent": 95, "children": [98, 101], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 71, "column": 42}}, {"id": 98, "type": "parameter_declaration", "text": "const ACE_Message_Block& event", "parent": 97, "children": [99, 100], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 43}}, {"id": 99, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 98, "children": [], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 36}}, {"id": 100, "type": "identifier", "text": "event", "parent": 98, "children": [], "start_point": {"row": 70, "column": 38}, "end_point": {"row": 70, "column": 43}}, {"id": 101, "type": "parameter_declaration", "text": "const ACE_Message_Block& routing_slip", "parent": 97, "children": [102, 103], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 41}}, {"id": 102, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 101, "children": [], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 27}}, {"id": 103, "type": "identifier", "text": "routing_slip", "parent": 101, "children": [], "start_point": {"row": 71, "column": 29}, "end_point": {"row": 71, "column": 41}}, {"id": 104, "type": "declaration", "text": "bool update(const ACE_Message_Block& routing_slip);", "parent": 49, "children": [105, 106], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 53}}, {"id": 105, "type": "primitive_type", "text": "bool", "parent": 104, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 6}}, {"id": 106, "type": "function_declarator", "text": "update(const ACE_Message_Block& routing_slip)", "parent": 104, "children": [107, 108], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 52}}, {"id": 107, "type": "identifier", "text": "update", "parent": 106, "children": [], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 13}}, {"id": 108, "type": "parameter_list", "text": "(const ACE_Message_Block& routing_slip)", "parent": 106, "children": [109], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 52}}, {"id": 109, "type": "parameter_declaration", "text": "const ACE_Message_Block& routing_slip", "parent": 108, "children": [110, 111], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 51}}, {"id": 110, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 109, "children": [], "start_point": {"row": 78, "column": 20}, "end_point": {"row": 78, "column": 37}}, {"id": 111, "type": "identifier", "text": "routing_slip", "parent": 109, "children": [], "start_point": {"row": 78, "column": 39}, "end_point": {"row": 78, "column": 51}}, {"id": 112, "type": "declaration", "text": "bool remove();", "parent": 49, "children": [113, 114], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 16}}, {"id": 113, "type": "primitive_type", "text": "bool", "parent": 112, "children": [], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 6}}, {"id": 114, "type": "function_declarator", "text": "remove()", "parent": 112, "children": [115, 116], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 82, "column": 15}}, {"id": 115, "type": "identifier", "text": "remove", "parent": 114, "children": [], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 82, "column": 13}}, {"id": 116, "type": "parameter_list", "text": "()", "parent": 114, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 15}}, {"id": 117, "type": "declaration", "text": "bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);", "parent": 49, "children": [118, 119], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 74}}, {"id": 118, "type": "primitive_type", "text": "bool", "parent": 117, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 6}}, {"id": 119, "type": "function_declarator", "text": "reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip)", "parent": 117, "children": [120, 121], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 73}}, {"id": 120, "type": "identifier", "text": "reload", "parent": 119, "children": [], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 13}}, {"id": 121, "type": "parameter_list", "text": "(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip)", "parent": 119, "children": [122, 127], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 73}}, {"id": 122, "type": "parameter_declaration", "text": "ACE_Message_Block*& event", "parent": 121, "children": [123, 124], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 39}}, {"id": 123, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 122, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 31}}, {"id": 124, "type": "pointer_declarator", "text": "*& event", "parent": 122, "children": [125, 126], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 39}}, {"id": 125, "type": "*", "text": "*", "parent": 124, "children": [], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 32}}, {"id": 126, "type": "identifier", "text": "event", "parent": 124, "children": [], "start_point": {"row": 93, "column": 34}, "end_point": {"row": 93, "column": 39}}, {"id": 127, "type": "parameter_declaration", "text": "ACE_Message_Block*&routing_slip", "parent": 121, "children": [128, 129], "start_point": {"row": 93, "column": 41}, "end_point": {"row": 93, "column": 72}}, {"id": 128, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 127, "children": [], "start_point": {"row": 93, "column": 41}, "end_point": {"row": 93, "column": 58}}, {"id": 129, "type": "pointer_declarator", "text": "*&routing_slip", "parent": 127, "children": [130, 131], "start_point": {"row": 93, "column": 58}, "end_point": {"row": 93, "column": 72}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 93, "column": 58}, "end_point": {"row": 93, "column": 59}}, {"id": 131, "type": "identifier", "text": "routing_slip", "parent": 129, "children": [], "start_point": {"row": 93, "column": 60}, "end_point": {"row": 93, "column": 72}}, {"id": 132, "type": "declaration", "text": "Routing_Slip_Persistence_Manager * load_next ();", "parent": 49, "children": [133, 134], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 50}}, {"id": 133, "type": "type_identifier", "text": "Routing_Slip_Persistence_Manager", "parent": 132, "children": [], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 34}}, {"id": 134, "type": "pointer_declarator", "text": "* load_next ()", "parent": 132, "children": [135, 136], "start_point": {"row": 100, "column": 35}, "end_point": {"row": 100, "column": 49}}, {"id": 135, "type": "*", "text": "*", "parent": 134, "children": [], "start_point": {"row": 100, "column": 35}, "end_point": {"row": 100, "column": 36}}, {"id": 136, "type": "function_declarator", "text": "load_next ()", "parent": 134, "children": [137, 138], "start_point": {"row": 100, "column": 37}, "end_point": {"row": 100, "column": 49}}, {"id": 137, "type": "identifier", "text": "load_next", "parent": 136, "children": [], "start_point": {"row": 100, "column": 37}, "end_point": {"row": 100, "column": 46}}, {"id": 138, "type": "parameter_list", "text": "()", "parent": 136, "children": [], "start_point": {"row": 100, "column": 47}, "end_point": {"row": 100, "column": 49}}, {"id": 139, "type": "declaration", "text": "bool store_root();", "parent": 49, "children": [140, 141], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 20}}, {"id": 140, "type": "primitive_type", "text": "bool", "parent": 139, "children": [], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 6}}, {"id": 141, "type": "function_declarator", "text": "store_root()", "parent": 139, "children": [142, 143], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 19}}, {"id": 142, "type": "identifier", "text": "store_root", "parent": 141, "children": [], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 17}}, {"id": 143, "type": "parameter_list", "text": "()", "parent": 141, "children": [], "start_point": {"row": 107, "column": 17}, "end_point": {"row": 107, "column": 19}}, {"id": 144, "type": "declaration", "text": "bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);", "parent": 49, "children": [145, 146], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 112, "column": 83}}, {"id": 145, "type": "primitive_type", "text": "bool", "parent": 144, "children": [], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 112, "column": 6}}, {"id": 146, "type": "function_declarator", "text": "load(Block_Number block_number, Block_Serial_Number expected_serial_number)", "parent": 144, "children": [147, 148], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 82}}, {"id": 147, "type": "identifier", "text": "load", "parent": 146, "children": [], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 11}}, {"id": 148, "type": "parameter_list", "text": "(Block_Number block_number, Block_Serial_Number expected_serial_number)", "parent": 146, "children": [149, 152], "start_point": {"row": 112, "column": 11}, "end_point": {"row": 112, "column": 82}}, {"id": 149, "type": "parameter_declaration", "text": "Block_Number block_number", "parent": 148, "children": [150, 151], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 37}}, {"id": 150, "type": "type_identifier", "text": "Block_Number", "parent": 149, "children": [], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 24}}, {"id": 151, "type": "identifier", "text": "block_number", "parent": 149, "children": [], "start_point": {"row": 112, "column": 25}, "end_point": {"row": 112, "column": 37}}, {"id": 152, "type": "parameter_declaration", "text": "Block_Serial_Number expected_serial_number", "parent": 148, "children": [153, 154], "start_point": {"row": 112, "column": 39}, "end_point": {"row": 112, "column": 81}}, {"id": 153, "type": "type_identifier", "text": "Block_Serial_Number", "parent": 152, "children": [], "start_point": {"row": 112, "column": 39}, "end_point": {"row": 112, "column": 58}}, {"id": 154, "type": "identifier", "text": "expected_serial_number", "parent": 152, "children": [], "start_point": {"row": 112, "column": 59}, "end_point": {"row": 112, "column": 81}}, {"id": 155, "type": "function_definition", "text": "bool is_root () const;\n\n /// \\brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \\brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n }", "parent": 49, "children": [156, 157, 160, 165], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 149, "column": 3}}, {"id": 156, "type": "primitive_type", "text": "bool", "parent": 155, "children": [], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 6}}, {"id": 157, "type": "function_declarator", "text": "is_root ()", "parent": 155, "children": [158, 159], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 17}}, {"id": 158, "type": "identifier", "text": "is_root", "parent": 157, "children": [], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 14}}, {"id": 159, "type": "parameter_list", "text": "()", "parent": 157, "children": [], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 17}}, {"id": 160, "type": "declaration", "text": "const;\n\n /// \\brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();", "parent": 155, "children": [161, 162], "start_point": {"row": 115, "column": 18}, "end_point": {"row": 118, "column": 22}}, {"id": 161, "type": "primitive_type", "text": "void", "parent": 160, "children": [], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 6}}, {"id": 162, "type": "function_declarator", "text": "release_all ()", "parent": 160, "children": [163, 164], "start_point": {"row": 118, "column": 7}, "end_point": {"row": 118, "column": 21}}, {"id": 163, "type": "identifier", "text": "release_all", "parent": 162, "children": [], "start_point": {"row": 118, "column": 7}, "end_point": {"row": 118, "column": 18}}, {"id": 164, "type": "parameter_list", "text": "()", "parent": 162, "children": [], "start_point": {"row": 118, "column": 19}, "end_point": {"row": 118, "column": 21}}, {"id": 165, "type": "ERROR", "text": "private:\n /**\n * \\brief private: Storage for header information of all persistent block.\n */\n class Block_Header", "parent": 155, "children": [166], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 124, "column": 20}}, {"id": 166, "type": "identifier", "text": "Block_Header", "parent": 165, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 20}}, {"id": 167, "type": "labeled_statement", "text": "public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);", "parent": 155, "children": [168], "start_point": {"row": 126, "column": 2}, "end_point": {"row": 133, "column": 35}}, {"id": 168, "type": "declaration", "text": "enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);", "parent": 167, "children": [169, 179], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 133, "column": 35}}, {"id": 169, "type": "enum_specifier", "text": "enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n }", "parent": 168, "children": [170, 171, 172], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 131, "column": 7}}, {"id": 170, "type": "enum", "text": "enum", "parent": 169, "children": [], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 8}}, {"id": 171, "type": "type_identifier", "text": "Header_Type", "parent": 169, "children": [], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 20}}, {"id": 172, "type": "enumerator_list", "text": "{\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n }", "parent": 169, "children": [173, 175, 177], "start_point": {"row": 127, "column": 21}, "end_point": {"row": 131, "column": 7}}, {"id": 173, "type": "enumerator", "text": "BT_Routing_Slip", "parent": 172, "children": [174], "start_point": {"row": 128, "column": 6}, "end_point": {"row": 128, "column": 21}}, {"id": 174, "type": "identifier", "text": "BT_Routing_Slip", "parent": 173, "children": [], "start_point": {"row": 128, "column": 6}, "end_point": {"row": 128, "column": 21}}, {"id": 175, "type": "enumerator", "text": "BT_Event", "parent": 172, "children": [176], "start_point": {"row": 129, "column": 6}, "end_point": {"row": 129, "column": 14}}, {"id": 176, "type": "identifier", "text": "BT_Event", "parent": 175, "children": [], "start_point": {"row": 129, "column": 6}, "end_point": {"row": 129, "column": 14}}, {"id": 177, "type": "enumerator", "text": "BT_Overflow", "parent": 172, "children": [178], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 17}}, {"id": 178, "type": "identifier", "text": "BT_Overflow", "parent": 177, "children": [], "start_point": {"row": 130, "column": 6}, "end_point": {"row": 130, "column": 17}}, {"id": 179, "type": "function_declarator", "text": "Block_Header(Header_Type type)", "parent": 168, "children": [180, 181], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 34}}, {"id": 180, "type": "identifier", "text": "Block_Header", "parent": 179, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 16}}, {"id": 181, "type": "parameter_list", "text": "(Header_Type type)", "parent": 179, "children": [182], "start_point": {"row": 133, "column": 16}, "end_point": {"row": 133, "column": 34}}, {"id": 182, "type": "parameter_declaration", "text": "Header_Type type", "parent": 181, "children": [183, 184], "start_point": {"row": 133, "column": 17}, "end_point": {"row": 133, "column": 33}}, {"id": 183, "type": "type_identifier", "text": "Header_Type", "parent": 182, "children": [], "start_point": {"row": 133, "column": 17}, "end_point": {"row": 133, "column": 28}}, {"id": 184, "type": "identifier", "text": "type", "parent": 182, "children": [], "start_point": {"row": 133, "column": 29}, "end_point": {"row": 133, "column": 33}}, {"id": 185, "type": "declaration", "text": "virtual ~Block_Header (void);", "parent": 155, "children": [186, 187, 189], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 33}}, {"id": 186, "type": "type_identifier", "text": "virtual", "parent": 185, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 11}}, {"id": 187, "type": "ERROR", "text": "~", "parent": 185, "children": [188], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 134, "column": 13}}, {"id": 188, "type": "~", "text": "~", "parent": 187, "children": [], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 134, "column": 13}}, {"id": 189, "type": "function_declarator", "text": "Block_Header (void)", "parent": 185, "children": [190, 191], "start_point": {"row": 134, "column": 13}, "end_point": {"row": 134, "column": 32}}, {"id": 190, "type": "identifier", "text": "Block_Header", "parent": 189, "children": [], "start_point": {"row": 134, "column": 13}, "end_point": {"row": 134, "column": 25}}, {"id": 191, "type": "parameter_list", "text": "(void)", "parent": 189, "children": [192], "start_point": {"row": 134, "column": 26}, "end_point": {"row": 134, "column": 32}}, {"id": 192, "type": "parameter_declaration", "text": "void", "parent": 191, "children": [193], "start_point": {"row": 134, "column": 27}, "end_point": {"row": 134, "column": 31}}, {"id": 193, "type": "primitive_type", "text": "void", "parent": 192, "children": [], "start_point": {"row": 134, "column": 27}, "end_point": {"row": 134, "column": 31}}, {"id": 194, "type": "declaration", "text": "virtual size_t", "parent": 155, "children": [195, 196], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 18}}, {"id": 195, "type": "type_identifier", "text": "virtual", "parent": 194, "children": [], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 11}}, {"id": 196, "type": "identifier", "text": "size_t", "parent": 194, "children": [], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 18}}, {"id": 197, "type": "call_expression", "text": "extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0)", "parent": 155, "children": [198, 199], "start_point": {"row": 135, "column": 19}, "end_point": {"row": 136, "column": 24}}, {"id": 198, "type": "identifier", "text": "extract_header", "parent": 197, "children": [], "start_point": {"row": 135, "column": 19}, "end_point": {"row": 135, "column": 33}}, {"id": 199, "type": "argument_list", "text": "(Persistent_Storage_Block& psb,\n size_t offset = 0)", "parent": 197, "children": [200, 203, 205], "start_point": {"row": 135, "column": 33}, "end_point": {"row": 136, "column": 24}}, {"id": 200, "type": "binary_expression", "text": "Persistent_Storage_Block& psb", "parent": 199, "children": [201, 202], "start_point": {"row": 135, "column": 34}, "end_point": {"row": 135, "column": 63}}, {"id": 201, "type": "identifier", "text": "Persistent_Storage_Block", "parent": 200, "children": [], "start_point": {"row": 135, "column": 34}, "end_point": {"row": 135, "column": 58}}, {"id": 202, "type": "identifier", "text": "psb", "parent": 200, "children": [], "start_point": {"row": 135, "column": 60}, "end_point": {"row": 135, "column": 63}}, {"id": 203, "type": "ERROR", "text": "size_t", "parent": 199, "children": [204], "start_point": {"row": 136, "column": 6}, "end_point": {"row": 136, "column": 12}}, {"id": 204, "type": "identifier", "text": "size_t", "parent": 203, "children": [], "start_point": {"row": 136, "column": 6}, "end_point": {"row": 136, "column": 12}}, {"id": 205, "type": "assignment_expression", "text": "offset = 0", "parent": 199, "children": [206, 207, 208], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 23}}, {"id": 206, "type": "identifier", "text": "offset", "parent": 205, "children": [], "start_point": {"row": 136, "column": 13}, "end_point": {"row": 136, "column": 19}}, {"id": 207, "type": "=", "text": "=", "parent": 205, "children": [], "start_point": {"row": 136, "column": 20}, "end_point": {"row": 136, "column": 21}}, {"id": 208, "type": "number_literal", "text": "0", "parent": 205, "children": [], "start_point": {"row": 136, "column": 22}, "end_point": {"row": 136, "column": 23}}, {"id": 209, "type": "declaration", "text": "virtual size_t", "parent": 155, "children": [210, 211], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 18}}, {"id": 210, "type": "type_identifier", "text": "virtual", "parent": 209, "children": [], "start_point": {"row": 137, "column": 4}, "end_point": {"row": 137, "column": 11}}, {"id": 211, "type": "identifier", "text": "size_t", "parent": 209, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 18}}, {"id": 212, "type": "call_expression", "text": "put_header(Persistent_Storage_Block& psb,\n size_t offset = 0)", "parent": 155, "children": [213, 214], "start_point": {"row": 137, "column": 19}, "end_point": {"row": 138, "column": 24}}, {"id": 213, "type": "identifier", "text": "put_header", "parent": 212, "children": [], "start_point": {"row": 137, "column": 19}, "end_point": {"row": 137, "column": 29}}, {"id": 214, "type": "argument_list", "text": "(Persistent_Storage_Block& psb,\n size_t offset = 0)", "parent": 212, "children": [215, 218, 220], "start_point": {"row": 137, "column": 29}, "end_point": {"row": 138, "column": 24}}, {"id": 215, "type": "binary_expression", "text": "Persistent_Storage_Block& psb", "parent": 214, "children": [216, 217], "start_point": {"row": 137, "column": 30}, "end_point": {"row": 137, "column": 59}}, {"id": 216, "type": "identifier", "text": "Persistent_Storage_Block", "parent": 215, "children": [], "start_point": {"row": 137, "column": 30}, "end_point": {"row": 137, "column": 54}}, {"id": 217, "type": "identifier", "text": "psb", "parent": 215, "children": [], "start_point": {"row": 137, "column": 56}, "end_point": {"row": 137, "column": 59}}, {"id": 218, "type": "ERROR", "text": "size_t", "parent": 214, "children": [219], "start_point": {"row": 138, "column": 6}, "end_point": {"row": 138, "column": 12}}, {"id": 219, "type": "identifier", "text": "size_t", "parent": 218, "children": [], "start_point": {"row": 138, "column": 6}, "end_point": {"row": 138, "column": 12}}, {"id": 220, "type": "assignment_expression", "text": "offset = 0", "parent": 214, "children": [221, 222, 223], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 23}}, {"id": 221, "type": "identifier", "text": "offset", "parent": 220, "children": [], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 19}}, {"id": 222, "type": "=", "text": "=", "parent": 220, "children": [], "start_point": {"row": 138, "column": 20}, "end_point": {"row": 138, "column": 21}}, {"id": 223, "type": "number_literal", "text": "0", "parent": 220, "children": [], "start_point": {"row": 138, "column": 22}, "end_point": {"row": 138, "column": 23}}, {"id": 224, "type": "labeled_statement", "text": "public:\n /// Our serial number\n Block_Serial_Number serial_number;", "parent": 155, "children": [225], "start_point": {"row": 140, "column": 2}, "end_point": {"row": 142, "column": 38}}, {"id": 225, "type": "declaration", "text": "Block_Serial_Number serial_number;", "parent": 224, "children": [226, 227], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 38}}, {"id": 226, "type": "type_identifier", "text": "Block_Serial_Number", "parent": 225, "children": [], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 142, "column": 23}}, {"id": 227, "type": "identifier", "text": "serial_number", "parent": 225, "children": [], "start_point": {"row": 142, "column": 24}, "end_point": {"row": 142, "column": 37}}, {"id": 228, "type": "declaration", "text": "Block_Number next_overflow;", "parent": 155, "children": [229, 230], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 31}}, {"id": 229, "type": "type_identifier", "text": "Block_Number", "parent": 228, "children": [], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 16}}, {"id": 230, "type": "identifier", "text": "next_overflow", "parent": 228, "children": [], "start_point": {"row": 144, "column": 17}, "end_point": {"row": 144, "column": 30}}, {"id": 231, "type": "declaration", "text": "Block_Type header_type;", "parent": 155, "children": [232, 233], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 27}}, {"id": 232, "type": "type_identifier", "text": "Block_Type", "parent": 231, "children": [], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 14}}, {"id": 233, "type": "identifier", "text": "header_type", "parent": 231, "children": [], "start_point": {"row": 146, "column": 15}, "end_point": {"row": 146, "column": 26}}, {"id": 234, "type": "declaration", "text": "Block_Size data_size;", "parent": 155, "children": [235, 236], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 25}}, {"id": 235, "type": "type_identifier", "text": "Block_Size", "parent": 234, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 14}}, {"id": 236, "type": "identifier", "text": "data_size", "parent": 234, "children": [], "start_point": {"row": 148, "column": 15}, "end_point": {"row": 148, "column": 24}}, {"id": 237, "type": "function_definition", "text": "class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n }", "parent": 49, "children": [238, 239], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 169, "column": 3}}, {"id": 238, "type": "identifier", "text": "Routing_Slip_Header", "parent": 237, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 27}}, {"id": 239, "type": "ERROR", "text": ": public Block_Header", "parent": 237, "children": [240], "start_point": {"row": 154, "column": 28}, "end_point": {"row": 154, "column": 49}}, {"id": 240, "type": "identifier", "text": "Block_Header", "parent": 239, "children": [], "start_point": {"row": 154, "column": 37}, "end_point": {"row": 154, "column": 49}}, {"id": 241, "type": "labeled_statement", "text": "public:\n Routing_Slip_Header();", "parent": 237, "children": [], "start_point": {"row": 156, "column": 2}, "end_point": {"row": 157, "column": 26}}, {"id": 242, "type": "call_expression", "text": "Routing_Slip_Header()", "parent": 241, "children": [243, 244], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 25}}, {"id": 243, "type": "identifier", "text": "Routing_Slip_Header", "parent": 242, "children": [], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 23}}, {"id": 244, "type": "argument_list", "text": "()", "parent": 242, "children": [], "start_point": {"row": 157, "column": 23}, "end_point": {"row": 157, "column": 25}}, {"id": 245, "type": "declaration", "text": "virtual size_t", "parent": 237, "children": [246, 247], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 18}}, {"id": 246, "type": "type_identifier", "text": "virtual", "parent": 245, "children": [], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 11}}, {"id": 247, "type": "identifier", "text": "size_t", "parent": 245, "children": [], "start_point": {"row": 158, "column": 12}, "end_point": {"row": 158, "column": 18}}, {"id": 248, "type": "call_expression", "text": "extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0)", "parent": 237, "children": [249, 250], "start_point": {"row": 158, "column": 19}, "end_point": {"row": 159, "column": 24}}, {"id": 249, "type": "identifier", "text": "extract_header", "parent": 248, "children": [], "start_point": {"row": 158, "column": 19}, "end_point": {"row": 158, "column": 33}}, {"id": 250, "type": "argument_list", "text": "(Persistent_Storage_Block& psb,\n size_t offset = 0)", "parent": 248, "children": [251, 254, 256], "start_point": {"row": 158, "column": 33}, "end_point": {"row": 159, "column": 24}}, {"id": 251, "type": "binary_expression", "text": "Persistent_Storage_Block& psb", "parent": 250, "children": [252, 253], "start_point": {"row": 158, "column": 34}, "end_point": {"row": 158, "column": 63}}, {"id": 252, "type": "identifier", "text": "Persistent_Storage_Block", "parent": 251, "children": [], "start_point": {"row": 158, "column": 34}, "end_point": {"row": 158, "column": 58}}, {"id": 253, "type": "identifier", "text": "psb", "parent": 251, "children": [], "start_point": {"row": 158, "column": 60}, "end_point": {"row": 158, "column": 63}}, {"id": 254, "type": "ERROR", "text": "size_t", "parent": 250, "children": [255], "start_point": {"row": 159, "column": 6}, "end_point": {"row": 159, "column": 12}}, {"id": 255, "type": "identifier", "text": "size_t", "parent": 254, "children": [], "start_point": {"row": 159, "column": 6}, "end_point": {"row": 159, "column": 12}}, {"id": 256, "type": "assignment_expression", "text": "offset = 0", "parent": 250, "children": [257, 258, 259], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 23}}, {"id": 257, "type": "identifier", "text": "offset", "parent": 256, "children": [], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 19}}, {"id": 258, "type": "=", "text": "=", "parent": 256, "children": [], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 159, "column": 21}}, {"id": 259, "type": "number_literal", "text": "0", "parent": 256, "children": [], "start_point": {"row": 159, "column": 22}, "end_point": {"row": 159, "column": 23}}, {"id": 260, "type": "declaration", "text": "virtual size_t", "parent": 237, "children": [261, 262], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 18}}, {"id": 261, "type": "type_identifier", "text": "virtual", "parent": 260, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 11}}, {"id": 262, "type": "identifier", "text": "size_t", "parent": 260, "children": [], "start_point": {"row": 160, "column": 12}, "end_point": {"row": 160, "column": 18}}, {"id": 263, "type": "call_expression", "text": "put_header(Persistent_Storage_Block& psb,\n size_t offset = 0)", "parent": 237, "children": [264, 265], "start_point": {"row": 160, "column": 19}, "end_point": {"row": 161, "column": 24}}, {"id": 264, "type": "identifier", "text": "put_header", "parent": 263, "children": [], "start_point": {"row": 160, "column": 19}, "end_point": {"row": 160, "column": 29}}, {"id": 265, "type": "argument_list", "text": "(Persistent_Storage_Block& psb,\n size_t offset = 0)", "parent": 263, "children": [266, 269, 271], "start_point": {"row": 160, "column": 29}, "end_point": {"row": 161, "column": 24}}, {"id": 266, "type": "binary_expression", "text": "Persistent_Storage_Block& psb", "parent": 265, "children": [267, 268], "start_point": {"row": 160, "column": 30}, "end_point": {"row": 160, "column": 59}}, {"id": 267, "type": "identifier", "text": "Persistent_Storage_Block", "parent": 266, "children": [], "start_point": {"row": 160, "column": 30}, "end_point": {"row": 160, "column": 54}}, {"id": 268, "type": "identifier", "text": "psb", "parent": 266, "children": [], "start_point": {"row": 160, "column": 56}, "end_point": {"row": 160, "column": 59}}, {"id": 269, "type": "ERROR", "text": "size_t", "parent": 265, "children": [270], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 12}}, {"id": 270, "type": "identifier", "text": "size_t", "parent": 269, "children": [], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 12}}, {"id": 271, "type": "assignment_expression", "text": "offset = 0", "parent": 265, "children": [272, 273, 274], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 23}}, {"id": 272, "type": "identifier", "text": "offset", "parent": 271, "children": [], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 19}}, {"id": 273, "type": "=", "text": "=", "parent": 271, "children": [], "start_point": {"row": 161, "column": 20}, "end_point": {"row": 161, "column": 21}}, {"id": 274, "type": "number_literal", "text": "0", "parent": 271, "children": [], "start_point": {"row": 161, "column": 22}, "end_point": {"row": 161, "column": 23}}, {"id": 275, "type": "labeled_statement", "text": "public:\n /// The next event in the system\n Block_Number next_routing_slip_block;", "parent": 237, "children": [276], "start_point": {"row": 163, "column": 2}, "end_point": {"row": 165, "column": 41}}, {"id": 276, "type": "declaration", "text": "Block_Number next_routing_slip_block;", "parent": 275, "children": [277, 278], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 41}}, {"id": 277, "type": "type_identifier", "text": "Block_Number", "parent": 276, "children": [], "start_point": {"row": 165, "column": 4}, "end_point": {"row": 165, "column": 16}}, {"id": 278, "type": "identifier", "text": "next_routing_slip_block", "parent": 276, "children": [], "start_point": {"row": 165, "column": 17}, "end_point": {"row": 165, "column": 40}}, {"id": 279, "type": "declaration", "text": "Block_Serial_Number next_serial_number;", "parent": 237, "children": [280, 281], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 43}}, {"id": 280, "type": "type_identifier", "text": "Block_Serial_Number", "parent": 279, "children": [], "start_point": {"row": 167, "column": 4}, "end_point": {"row": 167, "column": 23}}, {"id": 281, "type": "identifier", "text": "next_serial_number", "parent": 279, "children": [], "start_point": {"row": 167, "column": 24}, "end_point": {"row": 167, "column": 42}}, {"id": 282, "type": "declaration", "text": "Block_Number event_block;", "parent": 237, "children": [283, 284], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 29}}, {"id": 283, "type": "type_identifier", "text": "Block_Number", "parent": 282, "children": [], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 16}}, {"id": 284, "type": "identifier", "text": "event_block", "parent": 282, "children": [], "start_point": {"row": 168, "column": 17}, "end_point": {"row": 168, "column": 28}}, {"id": 285, "type": "function_definition", "text": "class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n }", "parent": 49, "children": [286, 287], "start_point": {"row": 174, "column": 2}, "end_point": {"row": 178, "column": 3}}, {"id": 286, "type": "identifier", "text": "Event_Header", "parent": 285, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 20}}, {"id": 287, "type": "ERROR", "text": ": public Block_Header", "parent": 285, "children": [288], "start_point": {"row": 174, "column": 21}, "end_point": {"row": 174, "column": 42}}, {"id": 288, "type": "identifier", "text": "Block_Header", "parent": 287, "children": [], "start_point": {"row": 174, "column": 30}, "end_point": {"row": 174, "column": 42}}, {"id": 289, "type": "labeled_statement", "text": "public:\n Event_Header ();", "parent": 285, "children": [], "start_point": {"row": 176, "column": 2}, "end_point": {"row": 177, "column": 20}}, {"id": 290, "type": "call_expression", "text": "Event_Header ()", "parent": 289, "children": [291, 292], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 19}}, {"id": 291, "type": "identifier", "text": "Event_Header", "parent": 290, "children": [], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 16}}, {"id": 292, "type": "argument_list", "text": "()", "parent": 290, "children": [], "start_point": {"row": 177, "column": 17}, "end_point": {"row": 177, "column": 19}}, {"id": 293, "type": "function_definition", "text": "class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n }", "parent": 49, "children": [294, 295], "start_point": {"row": 185, "column": 2}, "end_point": {"row": 189, "column": 3}}, {"id": 294, "type": "identifier", "text": "Overflow_Header", "parent": 293, "children": [], "start_point": {"row": 185, "column": 8}, "end_point": {"row": 185, "column": 23}}, {"id": 295, "type": "ERROR", "text": ": public Block_Header", "parent": 293, "children": [296], "start_point": {"row": 185, "column": 24}, "end_point": {"row": 185, "column": 45}}, {"id": 296, "type": "identifier", "text": "Block_Header", "parent": 295, "children": [], "start_point": {"row": 185, "column": 33}, "end_point": {"row": 185, "column": 45}}, {"id": 297, "type": "labeled_statement", "text": "public:\n Overflow_Header ();", "parent": 293, "children": [], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 188, "column": 23}}, {"id": 298, "type": "call_expression", "text": "Overflow_Header ()", "parent": 297, "children": [299, 300], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 22}}, {"id": 299, "type": "identifier", "text": "Overflow_Header", "parent": 298, "children": [], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 19}}, {"id": 300, "type": "argument_list", "text": "()", "parent": 298, "children": [], "start_point": {"row": 188, "column": 20}, "end_point": {"row": 188, "column": 22}}, {"id": 301, "type": "declaration", "text": "bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);", "parent": 49, "children": [302, 303], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 192, "column": 43}}, {"id": 302, "type": "primitive_type", "text": "bool", "parent": 301, "children": [], "start_point": {"row": 191, "column": 2}, "end_point": {"row": 191, "column": 6}}, {"id": 303, "type": "function_declarator", "text": "store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip)", "parent": 301, "children": [304, 305], "start_point": {"row": 191, "column": 7}, "end_point": {"row": 192, "column": 42}}, {"id": 304, "type": "identifier", "text": "store_i", "parent": 303, "children": [], "start_point": {"row": 191, "column": 7}, "end_point": {"row": 191, "column": 14}}, {"id": 305, "type": "parameter_list", "text": "(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip)", "parent": 303, "children": [306, 309], "start_point": {"row": 191, "column": 14}, "end_point": {"row": 192, "column": 42}}, {"id": 306, "type": "parameter_declaration", "text": "const ACE_Message_Block& event", "parent": 305, "children": [307, 308], "start_point": {"row": 191, "column": 15}, "end_point": {"row": 191, "column": 45}}, {"id": 307, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 306, "children": [], "start_point": {"row": 191, "column": 21}, "end_point": {"row": 191, "column": 38}}, {"id": 308, "type": "identifier", "text": "event", "parent": 306, "children": [], "start_point": {"row": 191, "column": 40}, "end_point": {"row": 191, "column": 45}}, {"id": 309, "type": "parameter_declaration", "text": "const ACE_Message_Block& routing_slip", "parent": 305, "children": [310, 311], "start_point": {"row": 192, "column": 4}, "end_point": {"row": 192, "column": 41}}, {"id": 310, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 309, "children": [], "start_point": {"row": 192, "column": 10}, "end_point": {"row": 192, "column": 27}}, {"id": 311, "type": "identifier", "text": "routing_slip", "parent": 309, "children": [], "start_point": {"row": 192, "column": 29}, "end_point": {"row": 192, "column": 41}}, {"id": 312, "type": "declaration", "text": "bool update_i(const ACE_Message_Block& routing_slip);", "parent": 49, "children": [313, 314], "start_point": {"row": 194, "column": 2}, "end_point": {"row": 194, "column": 55}}, {"id": 313, "type": "primitive_type", "text": "bool", "parent": 312, "children": [], "start_point": {"row": 194, "column": 2}, "end_point": {"row": 194, "column": 6}}, {"id": 314, "type": "function_declarator", "text": "update_i(const ACE_Message_Block& routing_slip)", "parent": 312, "children": [315, 316], "start_point": {"row": 194, "column": 7}, "end_point": {"row": 194, "column": 54}}, {"id": 315, "type": "identifier", "text": "update_i", "parent": 314, "children": [], "start_point": {"row": 194, "column": 7}, "end_point": {"row": 194, "column": 15}}, {"id": 316, "type": "parameter_list", "text": "(const ACE_Message_Block& routing_slip)", "parent": 314, "children": [317], "start_point": {"row": 194, "column": 15}, "end_point": {"row": 194, "column": 54}}, {"id": 317, "type": "parameter_declaration", "text": "const ACE_Message_Block& routing_slip", "parent": 316, "children": [318, 319], "start_point": {"row": 194, "column": 16}, "end_point": {"row": 194, "column": 53}}, {"id": 318, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 317, "children": [], "start_point": {"row": 194, "column": 22}, "end_point": {"row": 194, "column": 39}}, {"id": 319, "type": "identifier", "text": "routing_slip", "parent": 317, "children": [], "start_point": {"row": 194, "column": 41}, "end_point": {"row": 194, "column": 53}}, {"id": 320, "type": "declaration", "text": "bool store_event(const ACE_Message_Block& event);", "parent": 49, "children": [321, 322], "start_point": {"row": 196, "column": 2}, "end_point": {"row": 196, "column": 51}}, {"id": 321, "type": "primitive_type", "text": "bool", "parent": 320, "children": [], "start_point": {"row": 196, "column": 2}, "end_point": {"row": 196, "column": 6}}, {"id": 322, "type": "function_declarator", "text": "store_event(const ACE_Message_Block& event)", "parent": 320, "children": [323, 324], "start_point": {"row": 196, "column": 7}, "end_point": {"row": 196, "column": 50}}, {"id": 323, "type": "identifier", "text": "store_event", "parent": 322, "children": [], "start_point": {"row": 196, "column": 7}, "end_point": {"row": 196, "column": 18}}, {"id": 324, "type": "parameter_list", "text": "(const ACE_Message_Block& event)", "parent": 322, "children": [325], "start_point": {"row": 196, "column": 18}, "end_point": {"row": 196, "column": 50}}, {"id": 325, "type": "parameter_declaration", "text": "const ACE_Message_Block& event", "parent": 324, "children": [326, 327], "start_point": {"row": 196, "column": 19}, "end_point": {"row": 196, "column": 49}}, {"id": 326, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 325, "children": [], "start_point": {"row": 196, "column": 25}, "end_point": {"row": 196, "column": 42}}, {"id": 327, "type": "identifier", "text": "event", "parent": 325, "children": [], "start_point": {"row": 196, "column": 44}, "end_point": {"row": 196, "column": 49}}, {"id": 328, "type": "declaration", "text": "size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);", "parent": 49, "children": [329, 330], "start_point": {"row": 200, "column": 2}, "end_point": {"row": 202, "column": 28}}, {"id": 329, "type": "primitive_type", "text": "size_t", "parent": 328, "children": [], "start_point": {"row": 200, "column": 2}, "end_point": {"row": 200, "column": 8}}, {"id": 330, "type": "function_declarator", "text": "fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg)", "parent": 328, "children": [331, 332], "start_point": {"row": 200, "column": 9}, "end_point": {"row": 202, "column": 27}}, {"id": 331, "type": "identifier", "text": "fill_block", "parent": 330, "children": [], "start_point": {"row": 200, "column": 9}, "end_point": {"row": 200, "column": 19}}, {"id": 332, "type": "parameter_list", "text": "(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg)", "parent": 330, "children": [333, 336, 339, 344], "start_point": {"row": 200, "column": 19}, "end_point": {"row": 202, "column": 27}}, {"id": 333, "type": "parameter_declaration", "text": "Persistent_Storage_Block& psb", "parent": 332, "children": [334, 335], "start_point": {"row": 200, "column": 20}, "end_point": {"row": 200, "column": 49}}, {"id": 334, "type": "type_identifier", "text": "Persistent_Storage_Block", "parent": 333, "children": [], "start_point": {"row": 200, "column": 20}, "end_point": {"row": 200, "column": 44}}, {"id": 335, "type": "identifier", "text": "psb", "parent": 333, "children": [], "start_point": {"row": 200, "column": 46}, "end_point": {"row": 200, "column": 49}}, {"id": 336, "type": "parameter_declaration", "text": "size_t offset_into_block", "parent": 332, "children": [337, 338], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 28}}, {"id": 337, "type": "primitive_type", "text": "size_t", "parent": 336, "children": [], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 10}}, {"id": 338, "type": "identifier", "text": "offset_into_block", "parent": 336, "children": [], "start_point": {"row": 201, "column": 11}, "end_point": {"row": 201, "column": 28}}, {"id": 339, "type": "parameter_declaration", "text": "const ACE_Message_Block* data", "parent": 332, "children": [340, 341], "start_point": {"row": 201, "column": 30}, "end_point": {"row": 201, "column": 59}}, {"id": 340, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 339, "children": [], "start_point": {"row": 201, "column": 36}, "end_point": {"row": 201, "column": 53}}, {"id": 341, "type": "pointer_declarator", "text": "* data", "parent": 339, "children": [342, 343], "start_point": {"row": 201, "column": 53}, "end_point": {"row": 201, "column": 59}}, {"id": 342, "type": "*", "text": "*", "parent": 341, "children": [], "start_point": {"row": 201, "column": 53}, "end_point": {"row": 201, "column": 54}}, {"id": 343, "type": "identifier", "text": "data", "parent": 341, "children": [], "start_point": {"row": 201, "column": 55}, "end_point": {"row": 201, "column": 59}}, {"id": 344, "type": "parameter_declaration", "text": "size_t offset_into_msg", "parent": 332, "children": [345, 346], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 26}}, {"id": 345, "type": "primitive_type", "text": "size_t", "parent": 344, "children": [], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 10}}, {"id": 346, "type": "identifier", "text": "offset_into_msg", "parent": 344, "children": [], "start_point": {"row": 202, "column": 11}, "end_point": {"row": 202, "column": 26}}, {"id": 347, "type": "declaration", "text": "size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);", "parent": 49, "children": [348, 349], "start_point": {"row": 203, "column": 2}, "end_point": {"row": 205, "column": 22}}, {"id": 348, "type": "primitive_type", "text": "size_t", "parent": 347, "children": [], "start_point": {"row": 203, "column": 2}, "end_point": {"row": 203, "column": 8}}, {"id": 349, "type": "function_declarator", "text": "fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size)", "parent": 347, "children": [350, 351], "start_point": {"row": 203, "column": 9}, "end_point": {"row": 205, "column": 21}}, {"id": 350, "type": "identifier", "text": "fill_block", "parent": 349, "children": [], "start_point": {"row": 203, "column": 9}, "end_point": {"row": 203, "column": 19}}, {"id": 351, "type": "parameter_list", "text": "(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size)", "parent": 349, "children": [352, 355, 358, 365], "start_point": {"row": 203, "column": 19}, "end_point": {"row": 205, "column": 21}}, {"id": 352, "type": "parameter_declaration", "text": "Persistent_Storage_Block& psb", "parent": 351, "children": [353, 354], "start_point": {"row": 203, "column": 20}, "end_point": {"row": 203, "column": 49}}, {"id": 353, "type": "type_identifier", "text": "Persistent_Storage_Block", "parent": 352, "children": [], "start_point": {"row": 203, "column": 20}, "end_point": {"row": 203, "column": 44}}, {"id": 354, "type": "identifier", "text": "psb", "parent": 352, "children": [], "start_point": {"row": 203, "column": 46}, "end_point": {"row": 203, "column": 49}}, {"id": 355, "type": "parameter_declaration", "text": "size_t offset_into_block", "parent": 351, "children": [356, 357], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 28}}, {"id": 356, "type": "primitive_type", "text": "size_t", "parent": 355, "children": [], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 10}}, {"id": 357, "type": "identifier", "text": "offset_into_block", "parent": 355, "children": [], "start_point": {"row": 204, "column": 11}, "end_point": {"row": 204, "column": 28}}, {"id": 358, "type": "parameter_declaration", "text": "unsigned char* data", "parent": 351, "children": [359, 362], "start_point": {"row": 204, "column": 30}, "end_point": {"row": 204, "column": 49}}, {"id": 359, "type": "sized_type_specifier", "text": "unsigned char", "parent": 358, "children": [360, 361], "start_point": {"row": 204, "column": 30}, "end_point": {"row": 204, "column": 43}}, {"id": 360, "type": "unsigned", "text": "unsigned", "parent": 359, "children": [], "start_point": {"row": 204, "column": 30}, "end_point": {"row": 204, "column": 38}}, {"id": 361, "type": "primitive_type", "text": "char", "parent": 359, "children": [], "start_point": {"row": 204, "column": 39}, "end_point": {"row": 204, "column": 43}}, {"id": 362, "type": "pointer_declarator", "text": "* data", "parent": 358, "children": [363, 364], "start_point": {"row": 204, "column": 43}, "end_point": {"row": 204, "column": 49}}, {"id": 363, "type": "*", "text": "*", "parent": 362, "children": [], "start_point": {"row": 204, "column": 43}, "end_point": {"row": 204, "column": 44}}, {"id": 364, "type": "identifier", "text": "data", "parent": 362, "children": [], "start_point": {"row": 204, "column": 45}, "end_point": {"row": 204, "column": 49}}, {"id": 365, "type": "parameter_declaration", "text": "size_t data_size", "parent": 351, "children": [366, 367], "start_point": {"row": 205, "column": 4}, "end_point": {"row": 205, "column": 20}}, {"id": 366, "type": "primitive_type", "text": "size_t", "parent": 365, "children": [], "start_point": {"row": 205, "column": 4}, "end_point": {"row": 205, "column": 10}}, {"id": 367, "type": "identifier", "text": "data_size", "parent": 365, "children": [], "start_point": {"row": 205, "column": 11}, "end_point": {"row": 205, "column": 20}}, {"id": 368, "type": "declaration", "text": "bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);", "parent": 49, "children": [369, 370], "start_point": {"row": 208, "column": 2}, "end_point": {"row": 212, "column": 35}}, {"id": 369, "type": "primitive_type", "text": "bool", "parent": 368, "children": [], "start_point": {"row": 208, "column": 2}, "end_point": {"row": 208, "column": 6}}, {"id": 370, "type": "function_declarator", "text": "build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data)", "parent": 368, "children": [371, 372], "start_point": {"row": 208, "column": 7}, "end_point": {"row": 212, "column": 34}}, {"id": 371, "type": "identifier", "text": "build_chain", "parent": 370, "children": [], "start_point": {"row": 208, "column": 7}, "end_point": {"row": 208, "column": 18}}, {"id": 372, "type": "parameter_list", "text": "(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data)", "parent": 370, "children": [373, 378, 381, 388], "start_point": {"row": 208, "column": 18}, "end_point": {"row": 212, "column": 34}}, {"id": 373, "type": "parameter_declaration", "text": "Persistent_Storage_Block* first_block", "parent": 372, "children": [374, 375], "start_point": {"row": 209, "column": 4}, "end_point": {"row": 209, "column": 41}}, {"id": 374, "type": "type_identifier", "text": "Persistent_Storage_Block", "parent": 373, "children": [], "start_point": {"row": 209, "column": 4}, "end_point": {"row": 209, "column": 28}}, {"id": 375, "type": "pointer_declarator", "text": "* first_block", "parent": 373, "children": [376, 377], "start_point": {"row": 209, "column": 28}, "end_point": {"row": 209, "column": 41}}, {"id": 376, "type": "*", "text": "*", "parent": 375, "children": [], "start_point": {"row": 209, "column": 28}, "end_point": {"row": 209, "column": 29}}, {"id": 377, "type": "identifier", "text": "first_block", "parent": 375, "children": [], "start_point": {"row": 209, "column": 30}, "end_point": {"row": 209, "column": 41}}, {"id": 378, "type": "parameter_declaration", "text": "Block_Header& first_header", "parent": 372, "children": [379, 380], "start_point": {"row": 210, "column": 4}, "end_point": {"row": 210, "column": 30}}, {"id": 379, "type": "type_identifier", "text": "Block_Header", "parent": 378, "children": [], "start_point": {"row": 210, "column": 4}, "end_point": {"row": 210, "column": 16}}, {"id": 380, "type": "identifier", "text": "first_header", "parent": 378, "children": [], "start_point": {"row": 210, "column": 18}, "end_point": {"row": 210, "column": 30}}, {"id": 381, "type": "parameter_declaration", "text": "ACE_Unbounded_Stack<size_t>& allocated_blocks", "parent": 372, "children": [382, 383, 387], "start_point": {"row": 211, "column": 4}, "end_point": {"row": 211, "column": 49}}, {"id": 382, "type": "type_identifier", "text": "ACE_Unbounded_Stack", "parent": 381, "children": [], "start_point": {"row": 211, "column": 4}, "end_point": {"row": 211, "column": 23}}, {"id": 383, "type": "ERROR", "text": "<size_t>&", "parent": 381, "children": [384, 385, 386], "start_point": {"row": 211, "column": 23}, "end_point": {"row": 211, "column": 32}}, {"id": 384, "type": "<", "text": "<", "parent": 383, "children": [], "start_point": {"row": 211, "column": 23}, "end_point": {"row": 211, "column": 24}}, {"id": 385, "type": "primitive_type", "text": "size_t", "parent": 383, "children": [], "start_point": {"row": 211, "column": 24}, "end_point": {"row": 211, "column": 30}}, {"id": 386, "type": ">", "text": ">", "parent": 383, "children": [], "start_point": {"row": 211, "column": 30}, "end_point": {"row": 211, "column": 31}}, {"id": 387, "type": "identifier", "text": "allocated_blocks", "parent": 381, "children": [], "start_point": {"row": 211, "column": 33}, "end_point": {"row": 211, "column": 49}}, {"id": 388, "type": "parameter_declaration", "text": "const ACE_Message_Block& data", "parent": 372, "children": [389, 390], "start_point": {"row": 212, "column": 4}, "end_point": {"row": 212, "column": 33}}, {"id": 389, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 388, "children": [], "start_point": {"row": 212, "column": 10}, "end_point": {"row": 212, "column": 27}}, {"id": 390, "type": "identifier", "text": "data", "parent": 388, "children": [], "start_point": {"row": 212, "column": 29}, "end_point": {"row": 212, "column": 33}}, {"id": 391, "type": "declaration", "text": "bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);", "parent": 49, "children": [392, 393], "start_point": {"row": 215, "column": 2}, "end_point": {"row": 219, "column": 39}}, {"id": 392, "type": "primitive_type", "text": "bool", "parent": 391, "children": [], "start_point": {"row": 215, "column": 2}, "end_point": {"row": 215, "column": 6}}, {"id": 393, "type": "function_declarator", "text": "reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number)", "parent": 391, "children": [394, 395], "start_point": {"row": 215, "column": 7}, "end_point": {"row": 219, "column": 38}}, {"id": 394, "type": "identifier", "text": "reload_chain", "parent": 393, "children": [], "start_point": {"row": 215, "column": 7}, "end_point": {"row": 215, "column": 19}}, {"id": 395, "type": "parameter_list", "text": "(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number)", "parent": 393, "children": [396, 401, 404, 411, 416], "start_point": {"row": 215, "column": 19}, "end_point": {"row": 219, "column": 38}}, {"id": 396, "type": "parameter_declaration", "text": "Persistent_Storage_Block* first_block", "parent": 395, "children": [397, 398], "start_point": {"row": 215, "column": 20}, "end_point": {"row": 215, "column": 57}}, {"id": 397, "type": "type_identifier", "text": "Persistent_Storage_Block", "parent": 396, "children": [], "start_point": {"row": 215, "column": 20}, "end_point": {"row": 215, "column": 44}}, {"id": 398, "type": "pointer_declarator", "text": "* first_block", "parent": 396, "children": [399, 400], "start_point": {"row": 215, "column": 44}, "end_point": {"row": 215, "column": 57}}, {"id": 399, "type": "*", "text": "*", "parent": 398, "children": [], "start_point": {"row": 215, "column": 44}, "end_point": {"row": 215, "column": 45}}, {"id": 400, "type": "identifier", "text": "first_block", "parent": 398, "children": [], "start_point": {"row": 215, "column": 46}, "end_point": {"row": 215, "column": 57}}, {"id": 401, "type": "parameter_declaration", "text": "Block_Header& first_header", "parent": 395, "children": [402, 403], "start_point": {"row": 216, "column": 4}, "end_point": {"row": 216, "column": 30}}, {"id": 402, "type": "type_identifier", "text": "Block_Header", "parent": 401, "children": [], "start_point": {"row": 216, "column": 4}, "end_point": {"row": 216, "column": 16}}, {"id": 403, "type": "identifier", "text": "first_header", "parent": 401, "children": [], "start_point": {"row": 216, "column": 18}, "end_point": {"row": 216, "column": 30}}, {"id": 404, "type": "parameter_declaration", "text": "ACE_Unbounded_Stack<size_t>& allocated_blocks", "parent": 395, "children": [405, 406, 410], "start_point": {"row": 217, "column": 4}, "end_point": {"row": 217, "column": 49}}, {"id": 405, "type": "type_identifier", "text": "ACE_Unbounded_Stack", "parent": 404, "children": [], "start_point": {"row": 217, "column": 4}, "end_point": {"row": 217, "column": 23}}, {"id": 406, "type": "ERROR", "text": "<size_t>&", "parent": 404, "children": [407, 408, 409], "start_point": {"row": 217, "column": 23}, "end_point": {"row": 217, "column": 32}}, {"id": 407, "type": "<", "text": "<", "parent": 406, "children": [], "start_point": {"row": 217, "column": 23}, "end_point": {"row": 217, "column": 24}}, {"id": 408, "type": "primitive_type", "text": "size_t", "parent": 406, "children": [], "start_point": {"row": 217, "column": 24}, "end_point": {"row": 217, "column": 30}}, {"id": 409, "type": ">", "text": ">", "parent": 406, "children": [], "start_point": {"row": 217, "column": 30}, "end_point": {"row": 217, "column": 31}}, {"id": 410, "type": "identifier", "text": "allocated_blocks", "parent": 404, "children": [], "start_point": {"row": 217, "column": 33}, "end_point": {"row": 217, "column": 49}}, {"id": 411, "type": "parameter_declaration", "text": "ACE_Message_Block* amb", "parent": 395, "children": [412, 413], "start_point": {"row": 218, "column": 4}, "end_point": {"row": 218, "column": 26}}, {"id": 412, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 411, "children": [], "start_point": {"row": 218, "column": 4}, "end_point": {"row": 218, "column": 21}}, {"id": 413, "type": "pointer_declarator", "text": "* amb", "parent": 411, "children": [414, 415], "start_point": {"row": 218, "column": 21}, "end_point": {"row": 218, "column": 26}}, {"id": 414, "type": "*", "text": "*", "parent": 413, "children": [], "start_point": {"row": 218, "column": 21}, "end_point": {"row": 218, "column": 22}}, {"id": 415, "type": "identifier", "text": "amb", "parent": 413, "children": [], "start_point": {"row": 218, "column": 23}, "end_point": {"row": 218, "column": 26}}, {"id": 416, "type": "parameter_declaration", "text": "ACE_UINT64 expected_serial_number", "parent": 395, "children": [417, 418], "start_point": {"row": 219, "column": 4}, "end_point": {"row": 219, "column": 37}}, {"id": 417, "type": "type_identifier", "text": "ACE_UINT64", "parent": 416, "children": [], "start_point": {"row": 219, "column": 4}, "end_point": {"row": 219, "column": 14}}, {"id": 418, "type": "identifier", "text": "expected_serial_number", "parent": 416, "children": [], "start_point": {"row": 219, "column": 15}, "end_point": {"row": 219, "column": 37}}, {"id": 419, "type": "declaration", "text": "bool update_next_manager(Routing_Slip_Persistence_Manager* next);", "parent": 49, "children": [420, 421], "start_point": {"row": 222, "column": 2}, "end_point": {"row": 222, "column": 67}}, {"id": 420, "type": "primitive_type", "text": "bool", "parent": 419, "children": [], "start_point": {"row": 222, "column": 2}, "end_point": {"row": 222, "column": 6}}, {"id": 421, "type": "function_declarator", "text": "update_next_manager(Routing_Slip_Persistence_Manager* next)", "parent": 419, "children": [422, 423], "start_point": {"row": 222, "column": 7}, "end_point": {"row": 222, "column": 66}}, {"id": 422, "type": "identifier", "text": "update_next_manager", "parent": 421, "children": [], "start_point": {"row": 222, "column": 7}, "end_point": {"row": 222, "column": 26}}, {"id": 423, "type": "parameter_list", "text": "(Routing_Slip_Persistence_Manager* next)", "parent": 421, "children": [424], "start_point": {"row": 222, "column": 26}, "end_point": {"row": 222, "column": 66}}, {"id": 424, "type": "parameter_declaration", "text": "Routing_Slip_Persistence_Manager* next", "parent": 423, "children": [425, 426], "start_point": {"row": 222, "column": 27}, "end_point": {"row": 222, "column": 65}}, {"id": 425, "type": "type_identifier", "text": "Routing_Slip_Persistence_Manager", "parent": 424, "children": [], "start_point": {"row": 222, "column": 27}, "end_point": {"row": 222, "column": 59}}, {"id": 426, "type": "pointer_declarator", "text": "* next", "parent": 424, "children": [427, 428], "start_point": {"row": 222, "column": 59}, "end_point": {"row": 222, "column": 65}}, {"id": 427, "type": "*", "text": "*", "parent": 426, "children": [], "start_point": {"row": 222, "column": 59}, "end_point": {"row": 222, "column": 60}}, {"id": 428, "type": "identifier", "text": "next", "parent": 426, "children": [], "start_point": {"row": 222, "column": 61}, "end_point": {"row": 222, "column": 65}}, {"id": 429, "type": "declaration", "text": "bool persisted();", "parent": 49, "children": [430, 431], "start_point": {"row": 225, "column": 2}, "end_point": {"row": 225, "column": 19}}, {"id": 430, "type": "primitive_type", "text": "bool", "parent": 429, "children": [], "start_point": {"row": 225, "column": 2}, "end_point": {"row": 225, "column": 6}}, {"id": 431, "type": "function_declarator", "text": "persisted()", "parent": 429, "children": [432, 433], "start_point": {"row": 225, "column": 7}, "end_point": {"row": 225, "column": 18}}, {"id": 432, "type": "identifier", "text": "persisted", "parent": 431, "children": [], "start_point": {"row": 225, "column": 7}, "end_point": {"row": 225, "column": 16}}, {"id": 433, "type": "parameter_list", "text": "()", "parent": 431, "children": [], "start_point": {"row": 225, "column": 16}, "end_point": {"row": 225, "column": 18}}, {"id": 434, "type": "declaration", "text": "size_t write_first_routing_slip_block(bool prepare_only = false);", "parent": 49, "children": [435, 436], "start_point": {"row": 228, "column": 2}, "end_point": {"row": 228, "column": 67}}, {"id": 435, "type": "primitive_type", "text": "size_t", "parent": 434, "children": [], "start_point": {"row": 228, "column": 2}, "end_point": {"row": 228, "column": 8}}, {"id": 436, "type": "init_declarator", "text": "write_first_routing_slip_block(bool prepare_only = false", "parent": 434, "children": [437, 443, 444], "start_point": {"row": 228, "column": 9}, "end_point": {"row": 228, "column": 65}}, {"id": 437, "type": "function_declarator", "text": "write_first_routing_slip_block(bool prepare_only", "parent": 436, "children": [438, 439], "start_point": {"row": 228, "column": 9}, "end_point": {"row": 228, "column": 57}}, {"id": 438, "type": "identifier", "text": "write_first_routing_slip_block", "parent": 437, "children": [], "start_point": {"row": 228, "column": 9}, "end_point": {"row": 228, "column": 39}}, {"id": 439, "type": "parameter_list", "text": "(bool prepare_only", "parent": 437, "children": [440], "start_point": {"row": 228, "column": 39}, "end_point": {"row": 228, "column": 57}}, {"id": 440, "type": "parameter_declaration", "text": "bool prepare_only", "parent": 439, "children": [441, 442], "start_point": {"row": 228, "column": 40}, "end_point": {"row": 228, "column": 57}}, {"id": 441, "type": "primitive_type", "text": "bool", "parent": 440, "children": [], "start_point": {"row": 228, "column": 40}, "end_point": {"row": 228, "column": 44}}, {"id": 442, "type": "identifier", "text": "prepare_only", "parent": 440, "children": [], "start_point": {"row": 228, "column": 45}, "end_point": {"row": 228, "column": 57}}, {"id": 443, "type": "=", "text": "=", "parent": 436, "children": [], "start_point": {"row": 228, "column": 58}, "end_point": {"row": 228, "column": 59}}, {"id": 444, "type": "false", "text": "false", "parent": 436, "children": [], "start_point": {"row": 228, "column": 60}, "end_point": {"row": 228, "column": 65}}, {"id": 445, "type": "declaration", "text": "void dllist_push_back();", "parent": 49, "children": [446, 447], "start_point": {"row": 231, "column": 2}, "end_point": {"row": 231, "column": 26}}, {"id": 446, "type": "primitive_type", "text": "void", "parent": 445, "children": [], "start_point": {"row": 231, "column": 2}, "end_point": {"row": 231, "column": 6}}, {"id": 447, "type": "function_declarator", "text": "dllist_push_back()", "parent": 445, "children": [448, 449], "start_point": {"row": 231, "column": 7}, "end_point": {"row": 231, "column": 25}}, {"id": 448, "type": "identifier", "text": "dllist_push_back", "parent": 447, "children": [], "start_point": {"row": 231, "column": 7}, "end_point": {"row": 231, "column": 23}}, {"id": 449, "type": "parameter_list", "text": "()", "parent": 447, "children": [], "start_point": {"row": 231, "column": 23}, "end_point": {"row": 231, "column": 25}}, {"id": 450, "type": "declaration", "text": "void insert_before (Routing_Slip_Persistence_Manager * node);", "parent": 49, "children": [451, 452], "start_point": {"row": 233, "column": 2}, "end_point": {"row": 233, "column": 63}}, {"id": 451, "type": "primitive_type", "text": "void", "parent": 450, "children": [], "start_point": {"row": 233, "column": 2}, "end_point": {"row": 233, "column": 6}}, {"id": 452, "type": "function_declarator", "text": "insert_before (Routing_Slip_Persistence_Manager * node)", "parent": 450, "children": [453, 454], "start_point": {"row": 233, "column": 7}, "end_point": {"row": 233, "column": 62}}, {"id": 453, "type": "identifier", "text": "insert_before", "parent": 452, "children": [], "start_point": {"row": 233, "column": 7}, "end_point": {"row": 233, "column": 20}}, {"id": 454, "type": "parameter_list", "text": "(Routing_Slip_Persistence_Manager * node)", "parent": 452, "children": [455], "start_point": {"row": 233, "column": 21}, "end_point": {"row": 233, "column": 62}}, {"id": 455, "type": "parameter_declaration", "text": "Routing_Slip_Persistence_Manager * node", "parent": 454, "children": [456, 457], "start_point": {"row": 233, "column": 22}, "end_point": {"row": 233, "column": 61}}, {"id": 456, "type": "type_identifier", "text": "Routing_Slip_Persistence_Manager", "parent": 455, "children": [], "start_point": {"row": 233, "column": 22}, "end_point": {"row": 233, "column": 54}}, {"id": 457, "type": "pointer_declarator", "text": "* node", "parent": 455, "children": [458, 459], "start_point": {"row": 233, "column": 55}, "end_point": {"row": 233, "column": 61}}, {"id": 458, "type": "*", "text": "*", "parent": 457, "children": [], "start_point": {"row": 233, "column": 55}, "end_point": {"row": 233, "column": 56}}, {"id": 459, "type": "identifier", "text": "node", "parent": 457, "children": [], "start_point": {"row": 233, "column": 57}, "end_point": {"row": 233, "column": 61}}, {"id": 460, "type": "declaration", "text": "void remove_from_dllist();", "parent": 49, "children": [461, 462], "start_point": {"row": 236, "column": 2}, "end_point": {"row": 236, "column": 28}}, {"id": 461, "type": "primitive_type", "text": "void", "parent": 460, "children": [], "start_point": {"row": 236, "column": 2}, "end_point": {"row": 236, "column": 6}}, {"id": 462, "type": "function_declarator", "text": "remove_from_dllist()", "parent": 460, "children": [463, 464], "start_point": {"row": 236, "column": 7}, "end_point": {"row": 236, "column": 27}}, {"id": 463, "type": "identifier", "text": "remove_from_dllist", "parent": 462, "children": [], "start_point": {"row": 236, "column": 7}, "end_point": {"row": 236, "column": 25}}, {"id": 464, "type": "parameter_list", "text": "()", "parent": 462, "children": [], "start_point": {"row": 236, "column": 25}, "end_point": {"row": 236, "column": 27}}, {"id": 465, "type": "labeled_statement", "text": "private:\n TAO_SYNCH_MUTEX lock_;", "parent": 49, "children": [466], "start_point": {"row": 238, "column": 0}, "end_point": {"row": 239, "column": 24}}, {"id": 466, "type": "declaration", "text": "TAO_SYNCH_MUTEX lock_;", "parent": 465, "children": [467, 468], "start_point": {"row": 239, "column": 2}, "end_point": {"row": 239, "column": 24}}, {"id": 467, "type": "type_identifier", "text": "TAO_SYNCH_MUTEX", "parent": 466, "children": [], "start_point": {"row": 239, "column": 2}, "end_point": {"row": 239, "column": 17}}, {"id": 468, "type": "identifier", "text": "lock_", "parent": 466, "children": [], "start_point": {"row": 239, "column": 18}, "end_point": {"row": 239, "column": 23}}, {"id": 469, "type": "declaration", "text": "bool removed_;", "parent": 49, "children": [470, 471], "start_point": {"row": 240, "column": 2}, "end_point": {"row": 240, "column": 16}}, {"id": 470, "type": "primitive_type", "text": "bool", "parent": 469, "children": [], "start_point": {"row": 240, "column": 2}, "end_point": {"row": 240, "column": 6}}, {"id": 471, "type": "identifier", "text": "removed_", "parent": 469, "children": [], "start_point": {"row": 240, "column": 7}, "end_point": {"row": 240, "column": 15}}, {"id": 472, "type": "declaration", "text": "ACE_UINT64 serial_number_;", "parent": 49, "children": [473, 474], "start_point": {"row": 241, "column": 2}, "end_point": {"row": 241, "column": 28}}, {"id": 473, "type": "type_identifier", "text": "ACE_UINT64", "parent": 472, "children": [], "start_point": {"row": 241, "column": 2}, "end_point": {"row": 241, "column": 12}}, {"id": 474, "type": "identifier", "text": "serial_number_", "parent": 472, "children": [], "start_point": {"row": 241, "column": 13}, "end_point": {"row": 241, "column": 27}}, {"id": 475, "type": "declaration", "text": "Persistent_File_Allocator* allocator_;", "parent": 49, "children": [476, 477], "start_point": {"row": 242, "column": 2}, "end_point": {"row": 242, "column": 40}}, {"id": 476, "type": "type_identifier", "text": "Persistent_File_Allocator", "parent": 475, "children": [], "start_point": {"row": 242, "column": 2}, "end_point": {"row": 242, "column": 27}}, {"id": 477, "type": "pointer_declarator", "text": "* allocator_", "parent": 475, "children": [478, 479], "start_point": {"row": 242, "column": 27}, "end_point": {"row": 242, "column": 39}}, {"id": 478, "type": "*", "text": "*", "parent": 477, "children": [], "start_point": {"row": 242, "column": 27}, "end_point": {"row": 242, "column": 28}}, {"id": 479, "type": "identifier", "text": "allocator_", "parent": 477, "children": [], "start_point": {"row": 242, "column": 29}, "end_point": {"row": 242, "column": 39}}, {"id": 480, "type": "declaration", "text": "Standard_Event_Persistence_Factory* factory_;", "parent": 49, "children": [481, 482], "start_point": {"row": 243, "column": 2}, "end_point": {"row": 243, "column": 47}}, {"id": 481, "type": "type_identifier", "text": "Standard_Event_Persistence_Factory", "parent": 480, "children": [], "start_point": {"row": 243, "column": 2}, "end_point": {"row": 243, "column": 36}}, {"id": 482, "type": "pointer_declarator", "text": "* factory_", "parent": 480, "children": [483, 484], "start_point": {"row": 243, "column": 36}, "end_point": {"row": 243, "column": 46}}, {"id": 483, "type": "*", "text": "*", "parent": 482, "children": [], "start_point": {"row": 243, "column": 36}, "end_point": {"row": 243, "column": 37}}, {"id": 484, "type": "identifier", "text": "factory_", "parent": 482, "children": [], "start_point": {"row": 243, "column": 38}, "end_point": {"row": 243, "column": 46}}, {"id": 485, "type": "declaration", "text": "Event_Header event_header_;", "parent": 49, "children": [486, 487], "start_point": {"row": 244, "column": 2}, "end_point": {"row": 244, "column": 29}}, {"id": 486, "type": "type_identifier", "text": "Event_Header", "parent": 485, "children": [], "start_point": {"row": 244, "column": 2}, "end_point": {"row": 244, "column": 14}}, {"id": 487, "type": "identifier", "text": "event_header_", "parent": 485, "children": [], "start_point": {"row": 244, "column": 15}, "end_point": {"row": 244, "column": 28}}, {"id": 488, "type": "declaration", "text": "Routing_Slip_Header routing_slip_header_;", "parent": 49, "children": [489, 490], "start_point": {"row": 245, "column": 2}, "end_point": {"row": 245, "column": 43}}, {"id": 489, "type": "type_identifier", "text": "Routing_Slip_Header", "parent": 488, "children": [], "start_point": {"row": 245, "column": 2}, "end_point": {"row": 245, "column": 21}}, {"id": 490, "type": "identifier", "text": "routing_slip_header_", "parent": 488, "children": [], "start_point": {"row": 245, "column": 22}, "end_point": {"row": 245, "column": 42}}, {"id": 491, "type": "declaration", "text": "Persistent_Storage_Block* first_event_block_;", "parent": 49, "children": [492, 493], "start_point": {"row": 246, "column": 2}, "end_point": {"row": 246, "column": 47}}, {"id": 492, "type": "type_identifier", "text": "Persistent_Storage_Block", "parent": 491, "children": [], "start_point": {"row": 246, "column": 2}, "end_point": {"row": 246, "column": 26}}, {"id": 493, "type": "pointer_declarator", "text": "* first_event_block_", "parent": 491, "children": [494, 495], "start_point": {"row": 246, "column": 26}, "end_point": {"row": 246, "column": 46}}, {"id": 494, "type": "*", "text": "*", "parent": 493, "children": [], "start_point": {"row": 246, "column": 26}, "end_point": {"row": 246, "column": 27}}, {"id": 495, "type": "identifier", "text": "first_event_block_", "parent": 493, "children": [], "start_point": {"row": 246, "column": 28}, "end_point": {"row": 246, "column": 46}}, {"id": 496, "type": "declaration", "text": "Persistent_Storage_Block* first_routing_slip_block_;", "parent": 49, "children": [497, 498], "start_point": {"row": 247, "column": 2}, "end_point": {"row": 247, "column": 54}}, {"id": 497, "type": "type_identifier", "text": "Persistent_Storage_Block", "parent": 496, "children": [], "start_point": {"row": 247, "column": 2}, "end_point": {"row": 247, "column": 26}}, {"id": 498, "type": "pointer_declarator", "text": "* first_routing_slip_block_", "parent": 496, "children": [499, 500], "start_point": {"row": 247, "column": 26}, "end_point": {"row": 247, "column": 53}}, {"id": 499, "type": "*", "text": "*", "parent": 498, "children": [], "start_point": {"row": 247, "column": 26}, "end_point": {"row": 247, "column": 27}}, {"id": 500, "type": "identifier", "text": "first_routing_slip_block_", "parent": 498, "children": [], "start_point": {"row": 247, "column": 28}, "end_point": {"row": 247, "column": 53}}, {"id": 501, "type": "declaration", "text": "Routing_Slip_Persistence_Manager* prev_manager_;", "parent": 49, "children": [502, 503], "start_point": {"row": 249, "column": 2}, "end_point": {"row": 249, "column": 50}}, {"id": 502, "type": "type_identifier", "text": "Routing_Slip_Persistence_Manager", "parent": 501, "children": [], "start_point": {"row": 249, "column": 2}, "end_point": {"row": 249, "column": 34}}, {"id": 503, "type": "pointer_declarator", "text": "* prev_manager_", "parent": 501, "children": [504, 505], "start_point": {"row": 249, "column": 34}, "end_point": {"row": 249, "column": 49}}, {"id": 504, "type": "*", "text": "*", "parent": 503, "children": [], "start_point": {"row": 249, "column": 34}, "end_point": {"row": 249, "column": 35}}, {"id": 505, "type": "identifier", "text": "prev_manager_", "parent": 503, "children": [], "start_point": {"row": 249, "column": 36}, "end_point": {"row": 249, "column": 49}}, {"id": 506, "type": "declaration", "text": "Routing_Slip_Persistence_Manager* next_manager_;", "parent": 49, "children": [507, 508], "start_point": {"row": 250, "column": 2}, "end_point": {"row": 250, "column": 50}}, {"id": 507, "type": "type_identifier", "text": "Routing_Slip_Persistence_Manager", "parent": 506, "children": [], "start_point": {"row": 250, "column": 2}, "end_point": {"row": 250, "column": 34}}, {"id": 508, "type": "pointer_declarator", "text": "* next_manager_", "parent": 506, "children": [509, 510], "start_point": {"row": 250, "column": 34}, "end_point": {"row": 250, "column": 49}}, {"id": 509, "type": "*", "text": "*", "parent": 508, "children": [], "start_point": {"row": 250, "column": 34}, "end_point": {"row": 250, "column": 35}}, {"id": 510, "type": "identifier", "text": "next_manager_", "parent": 508, "children": [], "start_point": {"row": 250, "column": 36}, "end_point": {"row": 250, "column": 49}}, {"id": 511, "type": "binary_expression", "text": "ACE_Unbounded_Stack<size_t> allocated_event_blocks_", "parent": 49, "children": [512, 516, 517], "start_point": {"row": 251, "column": 2}, "end_point": {"row": 251, "column": 53}}, {"id": 512, "type": "binary_expression", "text": "ACE_Unbounded_Stack<size_t", "parent": 511, "children": [513, 514, 515], "start_point": {"row": 251, "column": 2}, "end_point": {"row": 251, "column": 28}}, {"id": 513, "type": "identifier", "text": "ACE_Unbounded_Stack", "parent": 512, "children": [], "start_point": {"row": 251, "column": 2}, "end_point": {"row": 251, "column": 21}}, {"id": 514, "type": "<", "text": "<", "parent": 512, "children": [], "start_point": {"row": 251, "column": 21}, "end_point": {"row": 251, "column": 22}}, {"id": 515, "type": "identifier", "text": "size_t", "parent": 512, "children": [], "start_point": {"row": 251, "column": 22}, "end_point": {"row": 251, "column": 28}}, {"id": 516, "type": ">", "text": ">", "parent": 511, "children": [], "start_point": {"row": 251, "column": 28}, "end_point": {"row": 251, "column": 29}}, {"id": 517, "type": "identifier", "text": "allocated_event_blocks_", "parent": 511, "children": [], "start_point": {"row": 251, "column": 30}, "end_point": {"row": 251, "column": 53}}, {"id": 518, "type": "binary_expression", "text": "ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_", "parent": 49, "children": [519, 523, 524], "start_point": {"row": 252, "column": 2}, "end_point": {"row": 252, "column": 60}}, {"id": 519, "type": "binary_expression", "text": "ACE_Unbounded_Stack<size_t", "parent": 518, "children": [520, 521, 522], "start_point": {"row": 252, "column": 2}, "end_point": {"row": 252, "column": 28}}, {"id": 520, "type": "identifier", "text": "ACE_Unbounded_Stack", "parent": 519, "children": [], "start_point": {"row": 252, "column": 2}, "end_point": {"row": 252, "column": 21}}, {"id": 521, "type": "<", "text": "<", "parent": 519, "children": [], "start_point": {"row": 252, "column": 21}, "end_point": {"row": 252, "column": 22}}, {"id": 522, "type": "identifier", "text": "size_t", "parent": 519, "children": [], "start_point": {"row": 252, "column": 22}, "end_point": {"row": 252, "column": 28}}, {"id": 523, "type": ">", "text": ">", "parent": 518, "children": [], "start_point": {"row": 252, "column": 28}, "end_point": {"row": 252, "column": 29}}, {"id": 524, "type": "identifier", "text": "allocated_routing_slip_blocks_", "parent": 518, "children": [], "start_point": {"row": 252, "column": 30}, "end_point": {"row": 252, "column": 60}}, {"id": 525, "type": "declaration", "text": "Persistent_Callback* callback_;", "parent": 49, "children": [526, 527], "start_point": {"row": 253, "column": 2}, "end_point": {"row": 253, "column": 33}}, {"id": 526, "type": "type_identifier", "text": "Persistent_Callback", "parent": 525, "children": [], "start_point": {"row": 253, "column": 2}, "end_point": {"row": 253, "column": 21}}, {"id": 527, "type": "pointer_declarator", "text": "* callback_", "parent": 525, "children": [528, 529], "start_point": {"row": 253, "column": 21}, "end_point": {"row": 253, "column": 32}}, {"id": 528, "type": "*", "text": "*", "parent": 527, "children": [], "start_point": {"row": 253, "column": 21}, "end_point": {"row": 253, "column": 22}}, {"id": 529, "type": "identifier", "text": "callback_", "parent": 527, "children": [], "start_point": {"row": 253, "column": 23}, "end_point": {"row": 253, "column": 32}}, {"id": 530, "type": "declaration", "text": "ACE_Message_Block * event_mb_;", "parent": 49, "children": [531, 532], "start_point": {"row": 256, "column": 2}, "end_point": {"row": 256, "column": 32}}, {"id": 531, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 530, "children": [], "start_point": {"row": 256, "column": 2}, "end_point": {"row": 256, "column": 19}}, {"id": 532, "type": "pointer_declarator", "text": "* event_mb_", "parent": 530, "children": [533, 534], "start_point": {"row": 256, "column": 20}, "end_point": {"row": 256, "column": 31}}, {"id": 533, "type": "*", "text": "*", "parent": 532, "children": [], "start_point": {"row": 256, "column": 20}, "end_point": {"row": 256, "column": 21}}, {"id": 534, "type": "identifier", "text": "event_mb_", "parent": 532, "children": [], "start_point": {"row": 256, "column": 22}, "end_point": {"row": 256, "column": 31}}, {"id": 535, "type": "declaration", "text": "ACE_Message_Block * routing_slip_mb_;", "parent": 49, "children": [536, 537], "start_point": {"row": 257, "column": 2}, "end_point": {"row": 257, "column": 39}}, {"id": 536, "type": "type_identifier", "text": "ACE_Message_Block", "parent": 535, "children": [], "start_point": {"row": 257, "column": 2}, "end_point": {"row": 257, "column": 19}}, {"id": 537, "type": "pointer_declarator", "text": "* routing_slip_mb_", "parent": 535, "children": [538, 539], "start_point": {"row": 257, "column": 20}, "end_point": {"row": 257, "column": 38}}, {"id": 538, "type": "*", "text": "*", "parent": 537, "children": [], "start_point": {"row": 257, "column": 20}, "end_point": {"row": 257, "column": 21}}, {"id": 539, "type": "identifier", "text": "routing_slip_mb_", "parent": 537, "children": [], "start_point": {"row": 257, "column": 22}, "end_point": {"row": 257, "column": 38}}, {"id": 540, "type": "type_identifier", "text": "TAO_END_VERSIONED_NAMESPACE_DECL", "parent": 0, "children": [], "start_point": {"row": 262, "column": 0}, "end_point": {"row": 262, "column": 32}}, {"id": 541, "type": "preproc_include", "text": "#include /**/ \"ace/post.h\"\n", "parent": 0, "children": [542, 543], "start_point": {"row": 264, "column": 0}, "end_point": {"row": 265, "column": 0}}, {"id": 542, "type": "#include", "text": "#include", "parent": 541, "children": [], "start_point": {"row": 264, "column": 0}, "end_point": {"row": 264, "column": 8}}, {"id": 543, "type": "string_literal", "text": "\"ace/post.h\"", "parent": 541, "children": [], "start_point": {"row": 264, "column": 14}, "end_point": {"row": 264, "column": 26}}, {"id": 544, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 265, "column": 0}, "end_point": {"row": 265, "column": 6}}]}, "node_categories": {"declarations": {"functions": [36, 49, 85, 95, 106, 114, 119, 136, 141, 146, 155, 157, 162, 179, 189, 237, 285, 293, 303, 314, 322, 330, 349, 370, 393, 421, 431, 437, 447, 452, 462], "variables": [41, 43, 45, 47, 54, 59, 63, 67, 83, 88, 93, 98, 101, 104, 109, 112, 117, 122, 127, 132, 139, 144, 149, 152, 160, 168, 182, 185, 192, 194, 209, 225, 228, 231, 234, 245, 260, 276, 279, 282, 301, 306, 309, 312, 317, 320, 325, 328, 333, 336, 339, 344, 347, 352, 355, 358, 365, 368, 373, 378, 381, 388, 391, 396, 401, 404, 411, 416, 419, 424, 429, 434, 440, 445, 450, 455, 460, 466, 469, 472, 475, 480, 485, 488, 491, 496, 501, 506, 525, 530, 535], "classes": [], "imports": [6, 7, 9, 10, 24, 25, 27, 28, 30, 31, 33, 34, 541, 542], "modules": [], "enums": [169, 170, 172, 173, 175, 177]}, "statements": {"expressions": [14, 71, 74, 78, 80, 197, 200, 212, 215, 242, 248, 251, 263, 266, 290, 298, 511, 512, 518, 519], "assignments": [205, 220, 256, 271], "loops": [], "conditionals": [0, 1, 2, 5, 12, 13, 18, 23, 37, 39, 40, 42, 44, 46, 48, 51, 52, 55, 57, 58, 61, 62, 65, 66, 69, 70, 72, 75, 77, 81, 86, 89, 92, 96, 99, 100, 102, 103, 107, 110, 111, 115, 120, 123, 126, 128, 131, 133, 137, 142, 147, 150, 151, 153, 154, 158, 163, 166, 171, 174, 176, 178, 180, 183, 184, 186, 190, 195, 196, 198, 201, 202, 204, 206, 210, 211, 213, 216, 217, 219, 221, 226, 227, 229, 230, 232, 233, 235, 236, 238, 240, 243, 246, 247, 249, 252, 253, 255, 257, 261, 262, 264, 267, 268, 270, 272, 277, 278, 280, 281, 283, 284, 286, 288, 291, 294, 296, 299, 304, 307, 308, 310, 311, 315, 318, 319, 323, 326, 327, 331, 334, 335, 338, 340, 343, 346, 350, 353, 354, 357, 359, 364, 367, 371, 374, 377, 379, 380, 382, 387, 389, 390, 394, 397, 400, 402, 403, 405, 410, 412, 415, 417, 418, 422, 425, 428, 432, 438, 442, 448, 453, 456, 459, 463, 467, 468, 471, 473, 474, 476, 479, 481, 484, 486, 487, 489, 490, 492, 495, 497, 500, 502, 505, 507, 510, 513, 515, 517, 520, 522, 524, 526, 529, 531, 534, 536, 539, 540, 544], "returns": [], "exceptions": []}, "expressions": {"calls": [20], "literals": [8, 11, 26, 29, 32, 35, 208, 223, 259, 274, 543], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 36, "universal_type": "function", "name": "Standard_Event_Persistence_Factory;", "text_snippet": "TAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nnamespace TAO_Notify\n{\n// Some forward declarations.\nclass Stand"}, {"node_id": 49, "universal_type": "function", "name": "TAO_Notify_Serv_Export", "text_snippet": "class TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager\n{\npublic:\n /// A unique identifier fo"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "set_callback(Persistent_Callback* callback)"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip)"}, {"node_id": 106, "universal_type": "function", "name": "unknown", "text_snippet": "update(const ACE_Message_Block& routing_slip)"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "remove()"}, {"node_id": 119, "universal_type": "function", "name": "unknown", "text_snippet": "reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip)"}, {"node_id": 136, "universal_type": "function", "name": "unknown", "text_snippet": "load_next ()"}, {"node_id": 141, "universal_type": "function", "name": "unknown", "text_snippet": "store_root()"}, {"node_id": 146, "universal_type": "function", "name": "unknown", "text_snippet": "load(Block_Number block_number, Block_Serial_Number expected_serial_number)"}, {"node_id": 155, "universal_type": "function", "name": "is_root", "text_snippet": "bool is_root () const;\n\n /// \\brief During cleanup for shut down, release all chained RSPMs.\n void"}, {"node_id": 157, "universal_type": "function", "name": "unknown", "text_snippet": "is_root ()"}, {"node_id": 162, "universal_type": "function", "name": "unknown", "text_snippet": "release_all ()"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "Block_Header(Header_Type type)"}, {"node_id": 189, "universal_type": "function", "name": "unknown", "text_snippet": "Block_Header (void)"}, {"node_id": 237, "universal_type": "function", "name": "Routing_Slip_Header", "text_snippet": "class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual"}, {"node_id": 285, "universal_type": "function", "name": "Event_Header", "text_snippet": "class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n }"}, {"node_id": 293, "universal_type": "function", "name": "Overflow_Header", "text_snippet": "class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n }"}, {"node_id": 303, "universal_type": "function", "name": "unknown", "text_snippet": "store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip)"}, {"node_id": 314, "universal_type": "function", "name": "unknown", "text_snippet": "update_i(const ACE_Message_Block& routing_slip)"}, {"node_id": 322, "universal_type": "function", "name": "unknown", "text_snippet": "store_event(const ACE_Message_Block& event)"}, {"node_id": 330, "universal_type": "function", "name": "unknown", "text_snippet": "fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* dat"}, {"node_id": 349, "universal_type": "function", "name": "unknown", "text_snippet": "fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n siz"}, {"node_id": 370, "universal_type": "function", "name": "unknown", "text_snippet": "build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbo"}, {"node_id": 393, "universal_type": "function", "name": "unknown", "text_snippet": "reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounde"}, {"node_id": 421, "universal_type": "function", "name": "unknown", "text_snippet": "update_next_manager(Routing_Slip_Persistence_Manager* next)"}, {"node_id": 431, "universal_type": "function", "name": "unknown", "text_snippet": "persisted()"}, {"node_id": 437, "universal_type": "function", "name": "unknown", "text_snippet": "write_first_routing_slip_block(bool prepare_only"}, {"node_id": 447, "universal_type": "function", "name": "unknown", "text_snippet": "dllist_push_back()"}, {"node_id": 452, "universal_type": "function", "name": "unknown", "text_snippet": "insert_before (Routing_Slip_Persistence_Manager * node)"}, {"node_id": 462, "universal_type": "function", "name": "unknown", "text_snippet": "remove_from_dllist()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include /**/ \"ace/pre.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"orbsvcs/Notify/notify_serv_export.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 24, "text": "#include \"tao/Versioned_Namespace.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"tao/orbconf.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"ace/Message_Block.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"ace/Containers_T.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 541, "text": "#include /**/ \"ace/post.h\"\n"}, {"node_id": 542, "text": "#include"}]}, "original_source_code": "// -*- C++ -*-\n\n//=============================================================================\n/**\n * @file Routing_Slip_Persistence_Manager.h\n *\n * $Id: Routing_Slip_Persistence_Manager.h 91628 2010-09-07 11:11:12Z johnnyw $\n *\n * A Routing_Slip_Persistence manager controls the actual allocation of\n * blocks through a Persistent_Storage_Allocator and can persist an\n * event and its routing slip.\n *\n * @author <NAME> <<EMAIL>>\n */\n//=============================================================================\n\n#ifndef ROUTING_SLIP_PERSISTENCE_MANAGER_H\n#define ROUTING_SLIP_PERSISTENCE_MANAGER_H\n#include /**/ \"ace/pre.h\"\n\n#include \"orbsvcs/Notify/notify_serv_export.h\"\n\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\n#pragma once\n#endif /* ACE_LACKS_PRAGMA_ONCE */\n\n#include \"tao/Versioned_Namespace.h\"\n#include \"tao/orbconf.h\"\n#include \"ace/Message_Block.h\"\n#include \"ace/Containers_T.h\"\n\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\nnamespace TAO_Notify\n{\n// Some forward declarations.\nclass Standard_Event_Persistence_Factory;\nclass Persistent_File_Allocator;\nclass Persistent_Storage_Block;\nclass Persistent_Callback;\n\n/**\n * \\brief Manage interaction between Routing_Slip and persistent storage.\n *\n * todo: to complete the strategization of event persistent storage this\n * should become an interface that is implemented differently by different\n * strategies. For now it interacts with Standard_Event_Persistence.\n */\nclass TAO_Notify_Serv_Export Routing_Slip_Persistence_Manager\n{\npublic:\n /// A unique identifier for logical blocks in persistent storage.\n typedef ACE_UINT64 Block_Serial_Number;\n /// The physical address of a block in persistent storage.\n typedef ACE_UINT32 Block_Number;\n /// The size of a block in persistent storage.\n typedef ACE_UINT16 Block_Size;\n /// A code to indicate the type of block in persistent storage.\n typedef ACE_UINT16 Block_Type;\n\n /// The constructor.\n Routing_Slip_Persistence_Manager(Standard_Event_Persistence_Factory* factory);\n\n /// The destructor.\n ~Routing_Slip_Persistence_Manager();\n\n /// Set up callbacks\n void set_callback(Persistent_Callback* callback);\n\n /// Store an event + routing slip.\n bool store(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n /// \\brief Update the routing slip.\n ///\n /// We must always overwrite the first block\n /// last, and it may not chance. Other blocks should be freed and\n /// reallocated.\n bool update(const ACE_Message_Block& routing_slip);\n\n /// \\brief Remove our associated event and routing slip from the\n /// Persistent_File_Allocator.\n bool remove();\n\n /////////////////////////////////////////\n // Methods to be used during reload only.\n\n /// \\brief Call this method to recover data during event reload.\n ///\n /// It should not fail under normal circumstances.\n /// Caller owns the resulting message blocks and is responsible\n /// for deleting them.\n /// Reload the event and routing_slip from the Persistent_File_Allocator.\n bool reload(ACE_Message_Block*& event, ACE_Message_Block*&routing_slip);\n\n /// \\brief Get next RSPM during reload.\n ///\n /// After using the data from the reload method, call this\n /// method to get the next RSPM. It returns a null pointer\n /// when all persistent events have been reloaded.\n Routing_Slip_Persistence_Manager * load_next ();\n\n /////////////////////////\n // Implementation methods.\n // Should not be called by Routing_Slip\n\n /// \\brief Commit root data to disk, which should only be done for a root node.\n bool store_root();\n\n /// \\brief Reload data into this RSPM from the given block/serial#\n ///\n /// \\return false if the reload is not successful.\n bool load(Block_Number block_number, Block_Serial_Number expected_serial_number);\n\n /// \\brief Is this RSPM attached to the root block?\n bool is_root () const;\n\n /// \\brief During cleanup for shut down, release all chained RSPMs.\n void release_all ();\n\nprivate:\n /**\n * \\brief private: Storage for header information of all persistent block.\n */\n class Block_Header\n {\n public:\n enum Header_Type {\n BT_Routing_Slip,\n BT_Event,\n BT_Overflow\n };\n\n Block_Header(Header_Type type);\n virtual ~Block_Header (void);\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// Our serial number\n Block_Serial_Number serial_number;\n /// Address of the overflow record (if any)\n Block_Number next_overflow;\n /// How much extra header data is in this block (not including this header)\n Block_Type header_type;\n /// How much actual data is in this block? (not including headers)\n Block_Size data_size;\n };\n\n /**\n * \\brief private: Storage for header information for Routing_Slip blocks.\n */\n class Routing_Slip_Header : public Block_Header\n {\n public:\n Routing_Slip_Header();\n virtual size_t extract_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n virtual size_t put_header(Persistent_Storage_Block& psb,\n size_t offset = 0);\n\n public:\n /// The next event in the system\n Block_Number next_routing_slip_block;\n /// The next expected serial number\n Block_Serial_Number next_serial_number;\n Block_Number event_block;\n };\n\n /// \\brief An Event block header.\n ///\n /// is just a Block_Header with no extra data\n class Event_Header : public Block_Header\n {\n public:\n Event_Header ();\n };\n\n /// \\brief An overflow block header.\n ///\n /// is just a Block_Header with no extra data\n /// The same record type is used for both Routing_Slip\n /// and Event overflows.\n class Overflow_Header : public Block_Header\n {\n public:\n Overflow_Header ();\n };\n\n bool store_i(const ACE_Message_Block& event,\n const ACE_Message_Block& routing_slip);\n\n bool update_i(const ACE_Message_Block& routing_slip);\n\n bool store_event(const ACE_Message_Block& event);\n\n /// Fill in a block with data, and return the number of bytes\n /// of data remaining to be written.\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, const ACE_Message_Block* data,\n size_t offset_into_msg);\n size_t fill_block(Persistent_Storage_Block& psb,\n size_t offset_into_block, unsigned char* data,\n size_t data_size);\n\n /// Build a chain of Persistent_Storage_Blocks\n bool build_chain(\n Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n const ACE_Message_Block& data);\n\n /// Reload a chain from persistent store.\n bool reload_chain(Persistent_Storage_Block* first_block,\n Block_Header& first_header,\n ACE_Unbounded_Stack<size_t>& allocated_blocks,\n ACE_Message_Block* amb,\n ACE_UINT64 expected_serial_number);\n\n /// Locked method to do the work of setting the next_manager_.\n bool update_next_manager(Routing_Slip_Persistence_Manager* next);\n\n /// Have we been persisted yet?\n bool persisted();\n\n /// Write out our first event block.\n size_t write_first_routing_slip_block(bool prepare_only = false);\n\n /// Insert ourselves into a linked list of Routing_Slip_Persistnce_Managers\n void dllist_push_back();\n\n void insert_before (Routing_Slip_Persistence_Manager * node);\n\n /// Remove ourselves from a linked list of Routing_Slip_Persistence_Managers\n void remove_from_dllist();\n\nprivate:\n TAO_SYNCH_MUTEX lock_;\n bool removed_;\n ACE_UINT64 serial_number_;\n Persistent_File_Allocator* allocator_;\n Standard_Event_Persistence_Factory* factory_;\n Event_Header event_header_;\n Routing_Slip_Header routing_slip_header_;\n Persistent_Storage_Block* first_event_block_;\n Persistent_Storage_Block* first_routing_slip_block_;\n /// We are part of a doubly-linked list\n Routing_Slip_Persistence_Manager* prev_manager_;\n Routing_Slip_Persistence_Manager* next_manager_;\n ACE_Unbounded_Stack<size_t> allocated_event_blocks_;\n ACE_Unbounded_Stack<size_t> allocated_routing_slip_blocks_;\n Persistent_Callback* callback_;\n\n /// If these are non-zero we own 'em\n ACE_Message_Block * event_mb_;\n ACE_Message_Block * routing_slip_mb_;\n};\n\n} /* namespace TAO_Notify */\n\nTAO_END_VERSIONED_NAMESPACE_DECL\n\n#include /**/ \"ace/post.h\"\n#endif /* ROUTING_SLIP_PERSISTENCE_MANAGER_H */\n"}
80,971
c
#pragma once namespace gfx { class IComparable { public: virtual ~IComparable() {}; virtual int GetValue() const = 0; virtual int Compare( const IComparable& rhs ) const { return (this->GetValue() - rhs.GetValue()); } }; }
18.47
15
(translation_unit) "#pragma once\n\n\nnamespace gfx\n{\n class IComparable\n {\n public:\n virtual ~IComparable() {};\n\n virtual int GetValue() const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());\n }\n };\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (function_definition) "namespace gfx\n{\n class IComparable\n {\n public:\n virtual ~IComparable() {};\n\n virtual int GetValue() const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());\n }\n };\n}" (type_identifier) "namespace" (identifier) "gfx" (compound_statement) "{\n class IComparable\n {\n public:\n virtual ~IComparable() {};\n\n virtual int GetValue() const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());\n }\n };\n}" ({) "{" (function_definition) "class IComparable\n {\n public:\n virtual ~IComparable() {};\n\n virtual int GetValue() const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());\n }\n }" (type_identifier) "class" (identifier) "IComparable" (compound_statement) "{\n public:\n virtual ~IComparable() {};\n\n virtual int GetValue() const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());\n }\n }" ({) "{" (labeled_statement) "public:\n virtual ~IComparable() {}" (statement_identifier) "public" (:) ":" (ERROR) "virtual ~IComparable()" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "IComparable()" (identifier) "IComparable" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (ERROR) "virtual int GetValue() const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());\n }" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "GetValue()" (identifier) "GetValue" (parameter_list) "()" (() "(" ()) ")" (declaration) "const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());" (type_qualifier) "const" (const) "const" (ERROR) "= 0;" (=) "=" (number_literal) "0" (;) ";" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue())" (function_declarator) "Compare( const IComparable& rhs ) const" (identifier) "Compare" (parameter_list) "( const IComparable& rhs )" (() "(" (parameter_declaration) "const IComparable& rhs" (type_qualifier) "const" (const) "const" (type_identifier) "IComparable" (ERROR) "&" (&) "&" (identifier) "rhs" ()) ")" (identifier) "const" (ERROR) "{\n return" ({) "{" (return) "return" (parameter_list) "(this->GetValue() - rhs.GetValue())" (() "(" (parameter_declaration) "this->GetValue() - rhs.GetValue()" (type_identifier) "this" (ERROR) "->" (->) "->" (function_declarator) "GetValue() - rhs.GetValue()" (identifier) "GetValue" (parameter_list) "()" (() "(" ()) ")" (ERROR) "-" (-) "-" (identifier) "rhs" (ERROR) "." (.) "." (call_expression) "GetValue()" (identifier) "GetValue" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (}) "}"
95
11
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 18.47, "nodes": 50, "errors": 0, "source_hash": "e4f7b722bdc9ccba3e0b628fe71871dc73fd8c04a31550a8058a8fcb8e3591bc", "categorized_nodes": 30}, "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 gfx\n{\n class IComparable\n {\n public:\n virtual ~IComparable() {};\n\n virtual int GetValue() const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());\n }\n };\n}", "parent": null, "children": [4, 5], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "namespace", "parent": 3, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 9}}, {"id": 5, "type": "identifier", "text": "gfx", "parent": 3, "children": [], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 13}}, {"id": 6, "type": "function_definition", "text": "class IComparable\n {\n public:\n virtual ~IComparable() {};\n\n virtual int GetValue() const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());\n }\n }", "parent": 3, "children": [7], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 16, "column": 5}}, {"id": 7, "type": "identifier", "text": "IComparable", "parent": 6, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 21}}, {"id": 8, "type": "labeled_statement", "text": "public:\n virtual ~IComparable() {}", "parent": 6, "children": [9], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 8, "column": 33}}, {"id": 9, "type": "ERROR", "text": "virtual ~IComparable()", "parent": 8, "children": [10, 11, 13], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 30}}, {"id": 10, "type": "type_identifier", "text": "virtual", "parent": 9, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 15}}, {"id": 11, "type": "ERROR", "text": "~", "parent": 9, "children": [12], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 17}}, {"id": 12, "type": "~", "text": "~", "parent": 11, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 17}}, {"id": 13, "type": "function_declarator", "text": "IComparable()", "parent": 9, "children": [14, 15], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 30}}, {"id": 14, "type": "identifier", "text": "IComparable", "parent": 13, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 28}}, {"id": 15, "type": "parameter_list", "text": "()", "parent": 13, "children": [], "start_point": {"row": 8, "column": 28}, "end_point": {"row": 8, "column": 30}}, {"id": 16, "type": "ERROR", "text": "virtual int GetValue() const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());\n }", "parent": 6, "children": [17, 18, 20, 23], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 15, "column": 9}}, {"id": 17, "type": "type_identifier", "text": "virtual", "parent": 16, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 15}}, {"id": 18, "type": "ERROR", "text": "int", "parent": 16, "children": [19], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 19}}, {"id": 19, "type": "identifier", "text": "int", "parent": 18, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 19}}, {"id": 20, "type": "function_declarator", "text": "GetValue()", "parent": 16, "children": [21, 22], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 30}}, {"id": 21, "type": "identifier", "text": "GetValue", "parent": 20, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 28}}, {"id": 22, "type": "parameter_list", "text": "()", "parent": 20, "children": [], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 30}}, {"id": 23, "type": "declaration", "text": "const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());", "parent": 16, "children": [24, 27, 28, 30], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 14, "column": 55}}, {"id": 24, "type": "ERROR", "text": "= 0;", "parent": 23, "children": [25, 26], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 41}}, {"id": 25, "type": "=", "text": "=", "parent": 24, "children": [], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 38}}, {"id": 26, "type": "number_literal", "text": "0", "parent": 24, "children": [], "start_point": {"row": 10, "column": 39}, "end_point": {"row": 10, "column": 40}}, {"id": 27, "type": "type_identifier", "text": "virtual", "parent": 23, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 15}}, {"id": 28, "type": "ERROR", "text": "int", "parent": 23, "children": [29], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 19}}, {"id": 29, "type": "identifier", "text": "int", "parent": 28, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 19}}, {"id": 30, "type": "function_declarator", "text": "Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue())", "parent": 23, "children": [31, 37, 38], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 14, "column": 54}}, {"id": 31, "type": "function_declarator", "text": "Compare( const IComparable& rhs ) const", "parent": 30, "children": [32, 33], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 59}}, {"id": 32, "type": "identifier", "text": "Compare", "parent": 31, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 27}}, {"id": 33, "type": "parameter_list", "text": "( const IComparable& rhs )", "parent": 31, "children": [34], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 53}}, {"id": 34, "type": "parameter_declaration", "text": "const IComparable& rhs", "parent": 33, "children": [35, 36], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 51}}, {"id": 35, "type": "type_identifier", "text": "IComparable", "parent": 34, "children": [], "start_point": {"row": 12, "column": 35}, "end_point": {"row": 12, "column": 46}}, {"id": 36, "type": "identifier", "text": "rhs", "parent": 34, "children": [], "start_point": {"row": 12, "column": 48}, "end_point": {"row": 12, "column": 51}}, {"id": 37, "type": "ERROR", "text": "{\n return", "parent": 30, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 14, "column": 18}}, {"id": 38, "type": "parameter_list", "text": "(this->GetValue() - rhs.GetValue())", "parent": 30, "children": [39], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 54}}, {"id": 39, "type": "parameter_declaration", "text": "this->GetValue() - rhs.GetValue()", "parent": 38, "children": [40, 41], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 53}}, {"id": 40, "type": "type_identifier", "text": "this", "parent": 39, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 24}}, {"id": 41, "type": "function_declarator", "text": "GetValue() - rhs.GetValue()", "parent": 39, "children": [42, 43, 44, 46, 47], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 53}}, {"id": 42, "type": "identifier", "text": "GetValue", "parent": 41, "children": [], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 34}}, {"id": 43, "type": "parameter_list", "text": "()", "parent": 41, "children": [], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 36}}, {"id": 44, "type": "ERROR", "text": "-", "parent": 41, "children": [45], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 38}}, {"id": 45, "type": "-", "text": "-", "parent": 44, "children": [], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 38}}, {"id": 46, "type": "identifier", "text": "rhs", "parent": 41, "children": [], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 42}}, {"id": 47, "type": "call_expression", "text": "GetValue()", "parent": 41, "children": [48, 49], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 53}}, {"id": 48, "type": "identifier", "text": "GetValue", "parent": 47, "children": [], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 51}}, {"id": 49, "type": "argument_list", "text": "()", "parent": 47, "children": [], "start_point": {"row": 14, "column": 51}, "end_point": {"row": 14, "column": 53}}]}, "node_categories": {"declarations": {"functions": [3, 6, 13, 20, 30, 31, 41], "variables": [23, 34, 39], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [47], "assignments": [], "loops": [], "conditionals": [4, 5, 7, 10, 14, 17, 19, 21, 27, 29, 32, 35, 36, 40, 42, 46, 48], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [26], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "IComparable", "text_snippet": "namespace gfx\n{\n class IComparable\n {\n public:\n virtual ~IComparable() {};\n\n "}, {"node_id": 6, "universal_type": "function", "name": "IComparable", "text_snippet": "class IComparable\n {\n public:\n virtual ~IComparable() {};\n\n virtual int GetValue"}, {"node_id": 13, "universal_type": "function", "name": "unknown", "text_snippet": "IComparable()"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "GetValue()"}, {"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValu"}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "Compare( const IComparable& rhs ) const"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "GetValue() - rhs.GetValue()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "#pragma once\n\n\nnamespace gfx\n{\n class IComparable\n {\n public:\n virtual ~IComparable() {};\n\n virtual int GetValue() const = 0;\n\n virtual int Compare( const IComparable& rhs ) const\n {\n return (this->GetValue() - rhs.GetValue());\n }\n };\n}\n"}
80,972
c
#include "huffman.h" /** * freq_cmp - compare the frequency value stored in each data pointer * * @p1: pointer 1 * @p2: pointer 2 * * Return: the difference between the first and second frequency */ int freq_cmp(void *p1, void *p2) { binary_tree_node_t *n1, *n2; symbol_t *s1, *s2; n1 = (binary_tree_node_t *)p1; n2 = (binary_tree_node_t *)p2; s1 = (symbol_t *)n1->data; s2 = (symbol_t *)n2->data; return (s1->freq - s2->freq); } /** * huffman_priority_queue - create a priority queue out of arrays of * character data and their respective frequencies * * @data: array of character data * @freq: array of frequencies for each character * @size: size of the data and freq arrays * * Return: Min heapified version of the respective arrays */ heap_t *huffman_priority_queue(char *data, size_t *freq, size_t size) { heap_t *heap; symbol_t *symbol; binary_tree_node_t *node; size_t i; heap = heap_create(freq_cmp); for (i = 0; i < size; i++) { symbol = symbol_create(data[i], freq[i]); node = binary_tree_node(NULL, symbol); node = heap_insert(heap, node); } return (heap); }
24.2
44
(translation_unit) "#include "huffman.h"\n\n/**\n * freq_cmp - compare the frequency value stored in each data pointer\n *\n * @p1: pointer 1\n * @p2: pointer 2\n *\n * Return: the difference between the first and second frequency\n */\nint freq_cmp(void *p1, void *p2)\n{\n binary_tree_node_t *n1, *n2;\n symbol_t *s1, *s2;\n\n n1 = (binary_tree_node_t *)p1;\n n2 = (binary_tree_node_t *)p2;\n s1 = (symbol_t *)n1->data;\n s2 = (symbol_t *)n2->data;\n\n return (s1->freq - s2->freq);\n}\n\n/**\n * huffman_priority_queue - create a priority queue out of arrays of\n * character data and their respective frequencies\n *\n * @data: array of character data\n * @freq: array of frequencies for each character\n * @size: size of the data and freq arrays\n *\n * Return: Min heapified version of the respective arrays\n */\nheap_t *huffman_priority_queue(char *data, size_t *freq, size_t size)\n{\n heap_t *heap;\n symbol_t *symbol;\n binary_tree_node_t *node;\n size_t i;\n\n heap = heap_create(freq_cmp);\n for (i = 0; i < size; i++)\n {\n symbol = symbol_create(data[i], freq[i]);\n node = binary_tree_node(NULL, symbol);\n node = heap_insert(heap, node);\n }\n\n return (heap);\n}\n" (preproc_include) "#include "huffman.h"\n" (#include) "#include" (string_literal) ""huffman.h"" (") """ (string_content) "huffman.h" (") """ (comment) "/**\n * freq_cmp - compare the frequency value stored in each data pointer\n *\n * @p1: pointer 1\n * @p2: pointer 2\n *\n * Return: the difference between the first and second frequency\n */" (function_definition) "int freq_cmp(void *p1, void *p2)\n{\n binary_tree_node_t *n1, *n2;\n symbol_t *s1, *s2;\n\n n1 = (binary_tree_node_t *)p1;\n n2 = (binary_tree_node_t *)p2;\n s1 = (symbol_t *)n1->data;\n s2 = (symbol_t *)n2->data;\n\n return (s1->freq - s2->freq);\n}" (primitive_type) "int" (function_declarator) "freq_cmp(void *p1, void *p2)" (identifier) "freq_cmp" (parameter_list) "(void *p1, void *p2)" (() "(" (parameter_declaration) "void *p1" (primitive_type) "void" (pointer_declarator) "*p1" (*) "*" (identifier) "p1" (,) "," (parameter_declaration) "void *p2" (primitive_type) "void" (pointer_declarator) "*p2" (*) "*" (identifier) "p2" ()) ")" (compound_statement) "{\n binary_tree_node_t *n1, *n2;\n symbol_t *s1, *s2;\n\n n1 = (binary_tree_node_t *)p1;\n n2 = (binary_tree_node_t *)p2;\n s1 = (symbol_t *)n1->data;\n s2 = (symbol_t *)n2->data;\n\n return (s1->freq - s2->freq);\n}" ({) "{" (declaration) "binary_tree_node_t *n1, *n2;" (type_identifier) "binary_tree_node_t" (pointer_declarator) "*n1" (*) "*" (identifier) "n1" (,) "," (pointer_declarator) "*n2" (*) "*" (identifier) "n2" (;) ";" (declaration) "symbol_t *s1, *s2;" (type_identifier) "symbol_t" (pointer_declarator) "*s1" (*) "*" (identifier) "s1" (,) "," (pointer_declarator) "*s2" (*) "*" (identifier) "s2" (;) ";" (expression_statement) "n1 = (binary_tree_node_t *)p1;" (assignment_expression) "n1 = (binary_tree_node_t *)p1" (identifier) "n1" (=) "=" (cast_expression) "(binary_tree_node_t *)p1" (() "(" (type_descriptor) "binary_tree_node_t *" (type_identifier) "binary_tree_node_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "p1" (;) ";" (expression_statement) "n2 = (binary_tree_node_t *)p2;" (assignment_expression) "n2 = (binary_tree_node_t *)p2" (identifier) "n2" (=) "=" (cast_expression) "(binary_tree_node_t *)p2" (() "(" (type_descriptor) "binary_tree_node_t *" (type_identifier) "binary_tree_node_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "p2" (;) ";" (expression_statement) "s1 = (symbol_t *)n1->data;" (assignment_expression) "s1 = (symbol_t *)n1->data" (identifier) "s1" (=) "=" (cast_expression) "(symbol_t *)n1->data" (() "(" (type_descriptor) "symbol_t *" (type_identifier) "symbol_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "n1->data" (identifier) "n1" (->) "->" (field_identifier) "data" (;) ";" (expression_statement) "s2 = (symbol_t *)n2->data;" (assignment_expression) "s2 = (symbol_t *)n2->data" (identifier) "s2" (=) "=" (cast_expression) "(symbol_t *)n2->data" (() "(" (type_descriptor) "symbol_t *" (type_identifier) "symbol_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "n2->data" (identifier) "n2" (->) "->" (field_identifier) "data" (;) ";" (return_statement) "return (s1->freq - s2->freq);" (return) "return" (parenthesized_expression) "(s1->freq - s2->freq)" (() "(" (binary_expression) "s1->freq - s2->freq" (field_expression) "s1->freq" (identifier) "s1" (->) "->" (field_identifier) "freq" (-) "-" (field_expression) "s2->freq" (identifier) "s2" (->) "->" (field_identifier) "freq" ()) ")" (;) ";" (}) "}" (comment) "/**\n * huffman_priority_queue - create a priority queue out of arrays of\n * character data and their respective frequencies\n *\n * @data: array of character data\n * @freq: array of frequencies for each character\n * @size: size of the data and freq arrays\n *\n * Return: Min heapified version of the respective arrays\n */" (function_definition) "heap_t *huffman_priority_queue(char *data, size_t *freq, size_t size)\n{\n heap_t *heap;\n symbol_t *symbol;\n binary_tree_node_t *node;\n size_t i;\n\n heap = heap_create(freq_cmp);\n for (i = 0; i < size; i++)\n {\n symbol = symbol_create(data[i], freq[i]);\n node = binary_tree_node(NULL, symbol);\n node = heap_insert(heap, node);\n }\n\n return (heap);\n}" (type_identifier) "heap_t" (pointer_declarator) "*huffman_priority_queue(char *data, size_t *freq, size_t size)" (*) "*" (function_declarator) "huffman_priority_queue(char *data, size_t *freq, size_t size)" (identifier) "huffman_priority_queue" (parameter_list) "(char *data, size_t *freq, size_t size)" (() "(" (parameter_declaration) "char *data" (primitive_type) "char" (pointer_declarator) "*data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "size_t *freq" (primitive_type) "size_t" (pointer_declarator) "*freq" (*) "*" (identifier) "freq" (,) "," (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" ()) ")" (compound_statement) "{\n heap_t *heap;\n symbol_t *symbol;\n binary_tree_node_t *node;\n size_t i;\n\n heap = heap_create(freq_cmp);\n for (i = 0; i < size; i++)\n {\n symbol = symbol_create(data[i], freq[i]);\n node = binary_tree_node(NULL, symbol);\n node = heap_insert(heap, node);\n }\n\n return (heap);\n}" ({) "{" (declaration) "heap_t *heap;" (type_identifier) "heap_t" (pointer_declarator) "*heap" (*) "*" (identifier) "heap" (;) ";" (declaration) "symbol_t *symbol;" (type_identifier) "symbol_t" (pointer_declarator) "*symbol" (*) "*" (identifier) "symbol" (;) ";" (declaration) "binary_tree_node_t *node;" (type_identifier) "binary_tree_node_t" (pointer_declarator) "*node" (*) "*" (identifier) "node" (;) ";" (declaration) "size_t i;" (primitive_type) "size_t" (identifier) "i" (;) ";" (expression_statement) "heap = heap_create(freq_cmp);" (assignment_expression) "heap = heap_create(freq_cmp)" (identifier) "heap" (=) "=" (call_expression) "heap_create(freq_cmp)" (identifier) "heap_create" (argument_list) "(freq_cmp)" (() "(" (identifier) "freq_cmp" ()) ")" (;) ";" (for_statement) "for (i = 0; i < size; i++)\n {\n symbol = symbol_create(data[i], freq[i]);\n node = binary_tree_node(NULL, symbol);\n node = heap_insert(heap, node);\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 symbol = symbol_create(data[i], freq[i]);\n node = binary_tree_node(NULL, symbol);\n node = heap_insert(heap, node);\n }" ({) "{" (expression_statement) "symbol = symbol_create(data[i], freq[i]);" (assignment_expression) "symbol = symbol_create(data[i], freq[i])" (identifier) "symbol" (=) "=" (call_expression) "symbol_create(data[i], freq[i])" (identifier) "symbol_create" (argument_list) "(data[i], freq[i])" (() "(" (subscript_expression) "data[i]" (identifier) "data" ([) "[" (identifier) "i" (]) "]" (,) "," (subscript_expression) "freq[i]" (identifier) "freq" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (expression_statement) "node = binary_tree_node(NULL, symbol);" (assignment_expression) "node = binary_tree_node(NULL, symbol)" (identifier) "node" (=) "=" (call_expression) "binary_tree_node(NULL, symbol)" (identifier) "binary_tree_node" (argument_list) "(NULL, symbol)" (() "(" (null) "NULL" (NULL) "NULL" (,) "," (identifier) "symbol" ()) ")" (;) ";" (expression_statement) "node = heap_insert(heap, node);" (assignment_expression) "node = heap_insert(heap, node)" (identifier) "node" (=) "=" (call_expression) "heap_insert(heap, node)" (identifier) "heap_insert" (argument_list) "(heap, node)" (() "(" (identifier) "heap" (,) "," (identifier) "node" ()) ")" (;) ";" (}) "}" (return_statement) "return (heap);" (return) "return" (parenthesized_expression) "(heap)" (() "(" (identifier) "heap" ()) ")" (;) ";" (}) "}"
259
0
{"language": "c", "success": true, "metadata": {"lines": 44, "avg_line_length": 24.2, "nodes": 173, "errors": 0, "source_hash": "837d830df137e9abd9c81124dd8a4bfbfaa735f4a8e588406a34e8be1337ed69", "categorized_nodes": 110}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"huffman.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": "\"huffman.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "function_definition", "text": "int freq_cmp(void *p1, void *p2)\n{\n\tbinary_tree_node_t *n1, *n2;\n\tsymbol_t *s1, *s2;\n\n\tn1 = (binary_tree_node_t *)p1;\n\tn2 = (binary_tree_node_t *)p2;\n\ts1 = (symbol_t *)n1->data;\n\ts2 = (symbol_t *)n2->data;\n\n\treturn (s1->freq - s2->freq);\n}", "parent": null, "children": [4, 5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 3}}, {"id": 5, "type": "function_declarator", "text": "freq_cmp(void *p1, void *p2)", "parent": 3, "children": [6, 7], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 32}}, {"id": 6, "type": "identifier", "text": "freq_cmp", "parent": 5, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 12}}, {"id": 7, "type": "parameter_list", "text": "(void *p1, void *p2)", "parent": 5, "children": [8, 13], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 32}}, {"id": 8, "type": "parameter_declaration", "text": "void *p1", "parent": 7, "children": [9, 10], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 21}}, {"id": 9, "type": "primitive_type", "text": "void", "parent": 8, "children": [], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 17}}, {"id": 10, "type": "pointer_declarator", "text": "*p1", "parent": 8, "children": [11, 12], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 21}}, {"id": 11, "type": "*", "text": "*", "parent": 10, "children": [], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 19}}, {"id": 12, "type": "identifier", "text": "p1", "parent": 10, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 21}}, {"id": 13, "type": "parameter_declaration", "text": "void *p2", "parent": 7, "children": [14, 15], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 31}}, {"id": 14, "type": "primitive_type", "text": "void", "parent": 13, "children": [], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 27}}, {"id": 15, "type": "pointer_declarator", "text": "*p2", "parent": 13, "children": [16, 17], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 31}}, {"id": 16, "type": "*", "text": "*", "parent": 15, "children": [], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 29}}, {"id": 17, "type": "identifier", "text": "p2", "parent": 15, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 31}}, {"id": 18, "type": "declaration", "text": "binary_tree_node_t *n1, *n2;", "parent": 3, "children": [19, 20, 23], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 29}}, {"id": 19, "type": "type_identifier", "text": "binary_tree_node_t", "parent": 18, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 19}}, {"id": 20, "type": "pointer_declarator", "text": "*n1", "parent": 18, "children": [21, 22], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 23}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 21}}, {"id": 22, "type": "identifier", "text": "n1", "parent": 20, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 23}}, {"id": 23, "type": "pointer_declarator", "text": "*n2", "parent": 18, "children": [24, 25], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 28}}, {"id": 24, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 26}}, {"id": 25, "type": "identifier", "text": "n2", "parent": 23, "children": [], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 28}}, {"id": 26, "type": "declaration", "text": "symbol_t *s1, *s2;", "parent": 3, "children": [27, 28, 31], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 19}}, {"id": 27, "type": "type_identifier", "text": "symbol_t", "parent": 26, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 28, "type": "pointer_declarator", "text": "*s1", "parent": 26, "children": [29, 30], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 13}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 11}}, {"id": 30, "type": "identifier", "text": "s1", "parent": 28, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 13}}, {"id": 31, "type": "pointer_declarator", "text": "*s2", "parent": 26, "children": [32, 33], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 18}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 16}}, {"id": 33, "type": "identifier", "text": "s2", "parent": 31, "children": [], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 18}}, {"id": 34, "type": "assignment_expression", "text": "n1 = (binary_tree_node_t *)p1", "parent": 3, "children": [35, 36, 37], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 30}}, {"id": 35, "type": "identifier", "text": "n1", "parent": 34, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 3}}, {"id": 36, "type": "=", "text": "=", "parent": 34, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 5}}, {"id": 37, "type": "cast_expression", "text": "(binary_tree_node_t *)p1", "parent": 34, "children": [38, 42], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 30}}, {"id": 38, "type": "type_descriptor", "text": "binary_tree_node_t *", "parent": 37, "children": [39, 40], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 27}}, {"id": 39, "type": "type_identifier", "text": "binary_tree_node_t", "parent": 38, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 25}}, {"id": 40, "type": "abstract_pointer_declarator", "text": "*", "parent": 38, "children": [41], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 27}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 15, "column": 26}, "end_point": {"row": 15, "column": 27}}, {"id": 42, "type": "identifier", "text": "p1", "parent": 37, "children": [], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 30}}, {"id": 43, "type": "assignment_expression", "text": "n2 = (binary_tree_node_t *)p2", "parent": 3, "children": [44, 45, 46], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 30}}, {"id": 44, "type": "identifier", "text": "n2", "parent": 43, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 3}}, {"id": 45, "type": "=", "text": "=", "parent": 43, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 5}}, {"id": 46, "type": "cast_expression", "text": "(binary_tree_node_t *)p2", "parent": 43, "children": [47, 51], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 30}}, {"id": 47, "type": "type_descriptor", "text": "binary_tree_node_t *", "parent": 46, "children": [48, 49], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 27}}, {"id": 48, "type": "type_identifier", "text": "binary_tree_node_t", "parent": 47, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 25}}, {"id": 49, "type": "abstract_pointer_declarator", "text": "*", "parent": 47, "children": [50], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 27}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 27}}, {"id": 51, "type": "identifier", "text": "p2", "parent": 46, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 30}}, {"id": 52, "type": "assignment_expression", "text": "s1 = (symbol_t *)n1->data", "parent": 3, "children": [53, 54, 55], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 26}}, {"id": 53, "type": "identifier", "text": "s1", "parent": 52, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 3}}, {"id": 54, "type": "=", "text": "=", "parent": 52, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 5}}, {"id": 55, "type": "cast_expression", "text": "(symbol_t *)n1->data", "parent": 52, "children": [56, 60], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 26}}, {"id": 56, "type": "type_descriptor", "text": "symbol_t *", "parent": 55, "children": [57, 58], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 17}}, {"id": 57, "type": "type_identifier", "text": "symbol_t", "parent": 56, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 15}}, {"id": 58, "type": "abstract_pointer_declarator", "text": "*", "parent": 56, "children": [59], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 17}}, {"id": 59, "type": "*", "text": "*", "parent": 58, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 17}}, {"id": 60, "type": "field_expression", "text": "n1->data", "parent": 55, "children": [61, 62], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 26}}, {"id": 61, "type": "identifier", "text": "n1", "parent": 60, "children": [], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 20}}, {"id": 62, "type": "field_identifier", "text": "data", "parent": 60, "children": [], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 26}}, {"id": 63, "type": "assignment_expression", "text": "s2 = (symbol_t *)n2->data", "parent": 3, "children": [64, 65, 66], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 26}}, {"id": 64, "type": "identifier", "text": "s2", "parent": 63, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 3}}, {"id": 65, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 5}}, {"id": 66, "type": "cast_expression", "text": "(symbol_t *)n2->data", "parent": 63, "children": [67, 71], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 26}}, {"id": 67, "type": "type_descriptor", "text": "symbol_t *", "parent": 66, "children": [68, 69], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 17}}, {"id": 68, "type": "type_identifier", "text": "symbol_t", "parent": 67, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 15}}, {"id": 69, "type": "abstract_pointer_declarator", "text": "*", "parent": 67, "children": [70], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 17}}, {"id": 70, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 17}}, {"id": 71, "type": "field_expression", "text": "n2->data", "parent": 66, "children": [72, 73], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 26}}, {"id": 72, "type": "identifier", "text": "n2", "parent": 71, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 20}}, {"id": 73, "type": "field_identifier", "text": "data", "parent": 71, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 26}}, {"id": 74, "type": "return_statement", "text": "return (s1->freq - s2->freq);", "parent": 3, "children": [75], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 30}}, {"id": 75, "type": "parenthesized_expression", "text": "(s1->freq - s2->freq)", "parent": 74, "children": [76], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 29}}, {"id": 76, "type": "binary_expression", "text": "s1->freq - s2->freq", "parent": 75, "children": [77, 80, 81], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 28}}, {"id": 77, "type": "field_expression", "text": "s1->freq", "parent": 76, "children": [78, 79], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 17}}, {"id": 78, "type": "identifier", "text": "s1", "parent": 77, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 11}}, {"id": 79, "type": "field_identifier", "text": "freq", "parent": 77, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 17}}, {"id": 80, "type": "-", "text": "-", "parent": 76, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 19}}, {"id": 81, "type": "field_expression", "text": "s2->freq", "parent": 76, "children": [82, 83], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 28}}, {"id": 82, "type": "identifier", "text": "s2", "parent": 81, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 22}}, {"id": 83, "type": "field_identifier", "text": "freq", "parent": 81, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 28}}, {"id": 84, "type": "function_definition", "text": "heap_t *huffman_priority_queue(char *data, size_t *freq, size_t size)\n{\n\theap_t *heap;\n\tsymbol_t *symbol;\n\tbinary_tree_node_t *node;\n\tsize_t i;\n\n\theap = heap_create(freq_cmp);\n\tfor (i = 0; i < size; i++)\n\t{\n\t\tsymbol = symbol_create(data[i], freq[i]);\n\t\tnode = binary_tree_node(NULL, symbol);\n\t\tnode = heap_insert(heap, node);\n\t}\n\n\treturn (heap);\n}", "parent": null, "children": [85, 86], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 85, "type": "type_identifier", "text": "heap_t", "parent": 84, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 86, "type": "pointer_declarator", "text": "*huffman_priority_queue(char *data, size_t *freq, size_t size)", "parent": 84, "children": [87, 88], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 69}}, {"id": 87, "type": "*", "text": "*", "parent": 86, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 8}}, {"id": 88, "type": "function_declarator", "text": "huffman_priority_queue(char *data, size_t *freq, size_t size)", "parent": 86, "children": [89, 90], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 69}}, {"id": 89, "type": "identifier", "text": "huffman_priority_queue", "parent": 88, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 30}}, {"id": 90, "type": "parameter_list", "text": "(char *data, size_t *freq, size_t size)", "parent": 88, "children": [91, 96, 101], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 69}}, {"id": 91, "type": "parameter_declaration", "text": "char *data", "parent": 90, "children": [92, 93], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 41}}, {"id": 92, "type": "primitive_type", "text": "char", "parent": 91, "children": [], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 35}}, {"id": 93, "type": "pointer_declarator", "text": "*data", "parent": 91, "children": [94, 95], "start_point": {"row": 33, "column": 36}, "end_point": {"row": 33, "column": 41}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 33, "column": 36}, "end_point": {"row": 33, "column": 37}}, {"id": 95, "type": "identifier", "text": "data", "parent": 93, "children": [], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 41}}, {"id": 96, "type": "parameter_declaration", "text": "size_t *freq", "parent": 90, "children": [97, 98], "start_point": {"row": 33, "column": 43}, "end_point": {"row": 33, "column": 55}}, {"id": 97, "type": "primitive_type", "text": "size_t", "parent": 96, "children": [], "start_point": {"row": 33, "column": 43}, "end_point": {"row": 33, "column": 49}}, {"id": 98, "type": "pointer_declarator", "text": "*freq", "parent": 96, "children": [99, 100], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 55}}, {"id": 99, "type": "*", "text": "*", "parent": 98, "children": [], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 51}}, {"id": 100, "type": "identifier", "text": "freq", "parent": 98, "children": [], "start_point": {"row": 33, "column": 51}, "end_point": {"row": 33, "column": 55}}, {"id": 101, "type": "parameter_declaration", "text": "size_t size", "parent": 90, "children": [102, 103], "start_point": {"row": 33, "column": 57}, "end_point": {"row": 33, "column": 68}}, {"id": 102, "type": "primitive_type", "text": "size_t", "parent": 101, "children": [], "start_point": {"row": 33, "column": 57}, "end_point": {"row": 33, "column": 63}}, {"id": 103, "type": "identifier", "text": "size", "parent": 101, "children": [], "start_point": {"row": 33, "column": 64}, "end_point": {"row": 33, "column": 68}}, {"id": 104, "type": "declaration", "text": "heap_t *heap;", "parent": 84, "children": [105, 106], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 14}}, {"id": 105, "type": "type_identifier", "text": "heap_t", "parent": 104, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 7}}, {"id": 106, "type": "pointer_declarator", "text": "*heap", "parent": 104, "children": [107, 108], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 13}}, {"id": 107, "type": "*", "text": "*", "parent": 106, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 9}}, {"id": 108, "type": "identifier", "text": "heap", "parent": 106, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 13}}, {"id": 109, "type": "declaration", "text": "symbol_t *symbol;", "parent": 84, "children": [110, 111], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 18}}, {"id": 110, "type": "type_identifier", "text": "symbol_t", "parent": 109, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 9}}, {"id": 111, "type": "pointer_declarator", "text": "*symbol", "parent": 109, "children": [112, 113], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 17}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 11}}, {"id": 113, "type": "identifier", "text": "symbol", "parent": 111, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 17}}, {"id": 114, "type": "declaration", "text": "binary_tree_node_t *node;", "parent": 84, "children": [115, 116], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 26}}, {"id": 115, "type": "type_identifier", "text": "binary_tree_node_t", "parent": 114, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 19}}, {"id": 116, "type": "pointer_declarator", "text": "*node", "parent": 114, "children": [117, 118], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 25}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 21}}, {"id": 118, "type": "identifier", "text": "node", "parent": 116, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 25}}, {"id": 119, "type": "declaration", "text": "size_t i;", "parent": 84, "children": [120, 121], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 10}}, {"id": 120, "type": "primitive_type", "text": "size_t", "parent": 119, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 7}}, {"id": 121, "type": "identifier", "text": "i", "parent": 119, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 9}}, {"id": 122, "type": "assignment_expression", "text": "heap = heap_create(freq_cmp)", "parent": 84, "children": [123, 124, 125], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 29}}, {"id": 123, "type": "identifier", "text": "heap", "parent": 122, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 5}}, {"id": 124, "type": "=", "text": "=", "parent": 122, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 7}}, {"id": 125, "type": "call_expression", "text": "heap_create(freq_cmp)", "parent": 122, "children": [126, 127], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 29}}, {"id": 126, "type": "identifier", "text": "heap_create", "parent": 125, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 19}}, {"id": 127, "type": "argument_list", "text": "(freq_cmp)", "parent": 125, "children": [128], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 29}}, {"id": 128, "type": "identifier", "text": "freq_cmp", "parent": 127, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 28}}, {"id": 129, "type": "for_statement", "text": "for (i = 0; i < size; i++)\n\t{\n\t\tsymbol = symbol_create(data[i], freq[i]);\n\t\tnode = binary_tree_node(NULL, symbol);\n\t\tnode = heap_insert(heap, node);\n\t}", "parent": 84, "children": [130, 134, 138], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 46, "column": 2}}, {"id": 130, "type": "assignment_expression", "text": "i = 0", "parent": 129, "children": [131, 132, 133], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 11}}, {"id": 131, "type": "identifier", "text": "i", "parent": 130, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 7}}, {"id": 132, "type": "=", "text": "=", "parent": 130, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 9}}, {"id": 133, "type": "number_literal", "text": "0", "parent": 130, "children": [], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 11}}, {"id": 134, "type": "binary_expression", "text": "i < size", "parent": 129, "children": [135, 136, 137], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 21}}, {"id": 135, "type": "identifier", "text": "i", "parent": 134, "children": [], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 14}}, {"id": 136, "type": "<", "text": "<", "parent": 134, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 16}}, {"id": 137, "type": "identifier", "text": "size", "parent": 134, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 21}}, {"id": 138, "type": "update_expression", "text": "i++", "parent": 129, "children": [139, 140], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 26}}, {"id": 139, "type": "identifier", "text": "i", "parent": 138, "children": [], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 24}}, {"id": 140, "type": "++", "text": "++", "parent": 138, "children": [], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 26}}, {"id": 141, "type": "assignment_expression", "text": "symbol = symbol_create(data[i], freq[i])", "parent": 129, "children": [142, 143, 144], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 42}}, {"id": 142, "type": "identifier", "text": "symbol", "parent": 141, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 8}}, {"id": 143, "type": "=", "text": "=", "parent": 141, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 10}}, {"id": 144, "type": "call_expression", "text": "symbol_create(data[i], freq[i])", "parent": 141, "children": [145, 146], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 42}}, {"id": 145, "type": "identifier", "text": "symbol_create", "parent": 144, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 24}}, {"id": 146, "type": "argument_list", "text": "(data[i], freq[i])", "parent": 144, "children": [147, 150], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 42}}, {"id": 147, "type": "subscript_expression", "text": "data[i]", "parent": 146, "children": [148, 149], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 32}}, {"id": 148, "type": "identifier", "text": "data", "parent": 147, "children": [], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 29}}, {"id": 149, "type": "identifier", "text": "i", "parent": 147, "children": [], "start_point": {"row": 43, "column": 30}, "end_point": {"row": 43, "column": 31}}, {"id": 150, "type": "subscript_expression", "text": "freq[i]", "parent": 146, "children": [151, 152], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 41}}, {"id": 151, "type": "identifier", "text": "freq", "parent": 150, "children": [], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 38}}, {"id": 152, "type": "identifier", "text": "i", "parent": 150, "children": [], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 40}}, {"id": 153, "type": "assignment_expression", "text": "node = binary_tree_node(NULL, symbol)", "parent": 129, "children": [154, 155, 156], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 39}}, {"id": 154, "type": "identifier", "text": "node", "parent": 153, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 6}}, {"id": 155, "type": "=", "text": "=", "parent": 153, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 8}}, {"id": 156, "type": "call_expression", "text": "binary_tree_node(NULL, symbol)", "parent": 153, "children": [157, 158], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 39}}, {"id": 157, "type": "identifier", "text": "binary_tree_node", "parent": 156, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 25}}, {"id": 158, "type": "argument_list", "text": "(NULL, symbol)", "parent": 156, "children": [159, 161], "start_point": {"row": 44, "column": 25}, "end_point": {"row": 44, "column": 39}}, {"id": 159, "type": "null", "text": "NULL", "parent": 158, "children": [160], "start_point": {"row": 44, "column": 26}, "end_point": {"row": 44, "column": 30}}, {"id": 160, "type": "NULL", "text": "NULL", "parent": 159, "children": [], "start_point": {"row": 44, "column": 26}, "end_point": {"row": 44, "column": 30}}, {"id": 161, "type": "identifier", "text": "symbol", "parent": 158, "children": [], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 38}}, {"id": 162, "type": "assignment_expression", "text": "node = heap_insert(heap, node)", "parent": 129, "children": [163, 164, 165], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 32}}, {"id": 163, "type": "identifier", "text": "node", "parent": 162, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 6}}, {"id": 164, "type": "=", "text": "=", "parent": 162, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 8}}, {"id": 165, "type": "call_expression", "text": "heap_insert(heap, node)", "parent": 162, "children": [166, 167], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 32}}, {"id": 166, "type": "identifier", "text": "heap_insert", "parent": 165, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 20}}, {"id": 167, "type": "argument_list", "text": "(heap, node)", "parent": 165, "children": [168, 169], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 32}}, {"id": 168, "type": "identifier", "text": "heap", "parent": 167, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 25}}, {"id": 169, "type": "identifier", "text": "node", "parent": 167, "children": [], "start_point": {"row": 45, "column": 27}, "end_point": {"row": 45, "column": 31}}, {"id": 170, "type": "return_statement", "text": "return (heap);", "parent": 84, "children": [171], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 15}}, {"id": 171, "type": "parenthesized_expression", "text": "(heap)", "parent": 170, "children": [172], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 14}}, {"id": 172, "type": "identifier", "text": "heap", "parent": 171, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 13}}]}, "node_categories": {"declarations": {"functions": [3, 5, 84, 88], "variables": [8, 13, 18, 26, 91, 96, 101, 104, 109, 114, 119], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [37, 46, 55, 60, 66, 71, 75, 76, 77, 81, 125, 134, 138, 144, 147, 150, 156, 165, 171], "assignments": [34, 43, 52, 63, 122, 130, 141, 153, 162], "loops": [129], "conditionals": [6, 12, 17, 19, 22, 25, 27, 30, 33, 35, 39, 42, 44, 48, 51, 53, 57, 61, 62, 64, 68, 72, 73, 78, 79, 82, 83, 85, 89, 95, 100, 103, 105, 108, 110, 113, 115, 118, 121, 123, 126, 128, 131, 135, 137, 139, 142, 145, 148, 149, 151, 152, 154, 157, 161, 163, 166, 168, 169, 172], "returns": [74, 170], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 133], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "freq_cmp", "text_snippet": "int freq_cmp(void *p1, void *p2)\n{\n\tbinary_tree_node_t *n1, *n2;\n\tsymbol_t *s1, *s2;\n\n\tn1 = (binary_"}, {"node_id": 5, "universal_type": "function", "name": "*p2)", "text_snippet": "freq_cmp(void *p1, void *p2)"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "heap_t *huffman_priority_queue(char *data, size_t *freq, size_t size)\n{\n\theap_t *heap;\n\tsymbol_t *sy"}, {"node_id": 88, "universal_type": "function", "name": "unknown", "text_snippet": "huffman_priority_queue(char *data, size_t *freq, size_t size)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"huffman.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include \"huffman.h\"\n\n/**\n * freq_cmp - compare the frequency value stored in each data pointer\n *\n * @p1: pointer 1\n * @p2: pointer 2\n *\n * Return: the difference between the first and second frequency\n */\nint freq_cmp(void *p1, void *p2)\n{\n\tbinary_tree_node_t *n1, *n2;\n\tsymbol_t *s1, *s2;\n\n\tn1 = (binary_tree_node_t *)p1;\n\tn2 = (binary_tree_node_t *)p2;\n\ts1 = (symbol_t *)n1->data;\n\ts2 = (symbol_t *)n2->data;\n\n\treturn (s1->freq - s2->freq);\n}\n\n/**\n * huffman_priority_queue - create a priority queue out of arrays of\n * character data and their respective frequencies\n *\n * @data: array of character data\n * @freq: array of frequencies for each character\n * @size: size of the data and freq arrays\n *\n * Return: Min heapified version of the respective arrays\n */\nheap_t *huffman_priority_queue(char *data, size_t *freq, size_t size)\n{\n\theap_t *heap;\n\tsymbol_t *symbol;\n\tbinary_tree_node_t *node;\n\tsize_t i;\n\n\theap = heap_create(freq_cmp);\n\tfor (i = 0; i < size; i++)\n\t{\n\t\tsymbol = symbol_create(data[i], freq[i]);\n\t\tnode = binary_tree_node(NULL, symbol);\n\t\tnode = heap_insert(heap, node);\n\t}\n\n\treturn (heap);\n}\n"}
80,973
c
// Copyright (c) 2018 <NAME> #ifndef GRAPE_PLOTTABLE_H #define GRAPE_PLOTTABLE_H namespace grape { class Plottable { public: virtual ~Plottable(); }; } // namespace grape #endif // GRAPE_PLOTTABLE_H
15.92
12
(translation_unit) "// Copyright (c) 2018 <NAME>\n\n#ifndef GRAPE_PLOTTABLE_H\n#define GRAPE_PLOTTABLE_H\n\nnamespace grape\n{\nclass Plottable\n{\npublic:\n virtual ~Plottable();\n};\n\n} // namespace grape\n\n#endif // GRAPE_PLOTTABLE_H\n" (comment) "// Copyright (c) 2018 <NAME>" (preproc_ifdef) "#ifndef GRAPE_PLOTTABLE_H\n#define GRAPE_PLOTTABLE_H\n\nnamespace grape\n{\nclass Plottable\n{\npublic:\n virtual ~Plottable();\n};\n\n} // namespace grape\n\n#endif" (#ifndef) "#ifndef" (identifier) "GRAPE_PLOTTABLE_H" (preproc_def) "#define GRAPE_PLOTTABLE_H\n" (#define) "#define" (identifier) "GRAPE_PLOTTABLE_H" (function_definition) "namespace grape\n{\nclass Plottable\n{\npublic:\n virtual ~Plottable();\n};\n\n}" (type_identifier) "namespace" (identifier) "grape" (compound_statement) "{\nclass Plottable\n{\npublic:\n virtual ~Plottable();\n};\n\n}" ({) "{" (function_definition) "class Plottable\n{\npublic:\n virtual ~Plottable();\n}" (type_identifier) "class" (identifier) "Plottable" (compound_statement) "{\npublic:\n virtual ~Plottable();\n}" ({) "{" (labeled_statement) "public:\n virtual ~Plottable();" (statement_identifier) "public" (:) ":" (declaration) "virtual ~Plottable();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "Plottable()" (identifier) "Plottable" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace grape" (#endif) "#endif" (comment) "// GRAPE_PLOTTABLE_H"
38
1
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 15.92, "nodes": 20, "errors": 0, "source_hash": "3bc120ba071fe048e016b2f842fd23007dc891edb1eef448790b6856f5ca30c1", "categorized_nodes": 14}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef GRAPE_PLOTTABLE_H\n#define GRAPE_PLOTTABLE_H\n\nnamespace grape\n{\nclass Plottable\n{\npublic:\n virtual ~Plottable();\n};\n\n} // namespace grape\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 19], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 15, "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": "GRAPE_PLOTTABLE_H", "parent": 0, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define GRAPE_PLOTTABLE_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": "GRAPE_PLOTTABLE_H", "parent": 3, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 25}}, {"id": 6, "type": "function_definition", "text": "namespace grape\n{\nclass Plottable\n{\npublic:\n virtual ~Plottable();\n};\n\n}", "parent": 0, "children": [7, 8], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "namespace", "parent": 6, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 9}}, {"id": 8, "type": "identifier", "text": "grape", "parent": 6, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 15}}, {"id": 9, "type": "function_definition", "text": "class Plottable\n{\npublic:\n virtual ~Plottable();\n}", "parent": 6, "children": [10], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 10, "type": "identifier", "text": "Plottable", "parent": 9, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 15}}, {"id": 11, "type": "labeled_statement", "text": "public:\n virtual ~Plottable();", "parent": 9, "children": [12], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 23}}, {"id": 12, "type": "declaration", "text": "virtual ~Plottable();", "parent": 11, "children": [13, 14, 16], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 23}}, {"id": 13, "type": "type_identifier", "text": "virtual", "parent": 12, "children": [], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 9}}, {"id": 14, "type": "ERROR", "text": "~", "parent": 12, "children": [15], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 11}}, {"id": 15, "type": "~", "text": "~", "parent": 14, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 11}}, {"id": 16, "type": "function_declarator", "text": "Plottable()", "parent": 12, "children": [17, 18], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 22}}, {"id": 17, "type": "identifier", "text": "Plottable", "parent": 16, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 20}}, {"id": 18, "type": "parameter_list", "text": "()", "parent": 16, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 22}}, {"id": 19, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}]}, "node_categories": {"declarations": {"functions": [6, 9, 16], "variables": [12], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 7, 8, 10, 13, 17, 19], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "Plottable", "text_snippet": "namespace grape\n{\nclass Plottable\n{\npublic:\n virtual ~Plottable();\n};\n\n}"}, {"node_id": 9, "universal_type": "function", "name": "Plottable", "text_snippet": "class Plottable\n{\npublic:\n virtual ~Plottable();\n}"}, {"node_id": 16, "universal_type": "function", "name": "unknown", "text_snippet": "Plottable()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "// Copyright (c) 2018 <NAME>\n\n#ifndef GRAPE_PLOTTABLE_H\n#define GRAPE_PLOTTABLE_H\n\nnamespace grape\n{\nclass Plottable\n{\npublic:\n virtual ~Plottable();\n};\n\n} // namespace grape\n\n#endif // GRAPE_PLOTTABLE_H\n"}
80,974
c
/** * @file k_time.h * * @copyright Copyright (C) 2015-2019 Alibaba Group Holding Limited */ #ifndef K_TIME_H #define K_TIME_H /** @addtogroup aos_rhino time * Time management * * @{ */ /** * Systick routine handler. * * @param[in] NULL * * @return NULL */ void krhino_tick_proc(void); /** * Get the current time from system startup, in ms. * * @param[in] NULL * * @return system time */ sys_time_t krhino_sys_time_get(void); /** * Get the current time from system startup, in ticks. * * @param[in] NULL * * @return system ticks */ tick_t krhino_sys_tick_get(void); /** * Convert ms to ticks. * * @param[in] ms ms which will be converted to ticks * * @return the ticks of the ms */ tick_t krhino_ms_to_ticks(sys_time_t ms); /** * Convert ticks to ms. * * @param[in] ticks ticks which will be converted to ms * * @return the ms of the ticks */ sys_time_t krhino_ticks_to_ms(tick_t ticks); /** @} */ #endif /* K_TIME_H */
17
54
(translation_unit) "/**\n * @file k_time.h\n *\n * @copyright Copyright (C) 2015-2019 Alibaba Group Holding Limited\n */\n\n#ifndef K_TIME_H\n#define K_TIME_H\n\n/** @addtogroup aos_rhino time\n * Time management\n *\n * @{\n */\n\n/**\n * Systick routine handler.\n *\n * @param[in] NULL\n *\n * @return NULL\n */\nvoid krhino_tick_proc(void);\n\n/**\n * Get the current time from system startup, in ms.\n *\n * @param[in] NULL\n *\n * @return system time\n */\nsys_time_t krhino_sys_time_get(void);\n\n/**\n * Get the current time from system startup, in ticks.\n *\n * @param[in] NULL\n *\n * @return system ticks\n */\ntick_t krhino_sys_tick_get(void);\n\n/**\n * Convert ms to ticks.\n *\n * @param[in] ms ms which will be converted to ticks\n *\n * @return the ticks of the ms\n */\ntick_t krhino_ms_to_ticks(sys_time_t ms);\n\n/**\n * Convert ticks to ms.\n *\n * @param[in] ticks ticks which will be converted to ms\n *\n * @return the ms of the ticks\n */\nsys_time_t krhino_ticks_to_ms(tick_t ticks);\n\n/** @} */\n\n#endif /* K_TIME_H */\n\n" (comment) "/**\n * @file k_time.h\n *\n * @copyright Copyright (C) 2015-2019 Alibaba Group Holding Limited\n */" (preproc_ifdef) "#ifndef K_TIME_H\n#define K_TIME_H\n\n/** @addtogroup aos_rhino time\n * Time management\n *\n * @{\n */\n\n/**\n * Systick routine handler.\n *\n * @param[in] NULL\n *\n * @return NULL\n */\nvoid krhino_tick_proc(void);\n\n/**\n * Get the current time from system startup, in ms.\n *\n * @param[in] NULL\n *\n * @return system time\n */\nsys_time_t krhino_sys_time_get(void);\n\n/**\n * Get the current time from system startup, in ticks.\n *\n * @param[in] NULL\n *\n * @return system ticks\n */\ntick_t krhino_sys_tick_get(void);\n\n/**\n * Convert ms to ticks.\n *\n * @param[in] ms ms which will be converted to ticks\n *\n * @return the ticks of the ms\n */\ntick_t krhino_ms_to_ticks(sys_time_t ms);\n\n/**\n * Convert ticks to ms.\n *\n * @param[in] ticks ticks which will be converted to ms\n *\n * @return the ms of the ticks\n */\nsys_time_t krhino_ticks_to_ms(tick_t ticks);\n\n/** @} */\n\n#endif" (#ifndef) "#ifndef" (identifier) "K_TIME_H" (preproc_def) "#define K_TIME_H\n" (#define) "#define" (identifier) "K_TIME_H" (comment) "/** @addtogroup aos_rhino time\n * Time management\n *\n * @{\n */" (comment) "/**\n * Systick routine handler.\n *\n * @param[in] NULL\n *\n * @return NULL\n */" (declaration) "void krhino_tick_proc(void);" (primitive_type) "void" (function_declarator) "krhino_tick_proc(void)" (identifier) "krhino_tick_proc" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/**\n * Get the current time from system startup, in ms.\n *\n * @param[in] NULL\n *\n * @return system time\n */" (declaration) "sys_time_t krhino_sys_time_get(void);" (type_identifier) "sys_time_t" (function_declarator) "krhino_sys_time_get(void)" (identifier) "krhino_sys_time_get" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/**\n * Get the current time from system startup, in ticks.\n *\n * @param[in] NULL\n *\n * @return system ticks\n */" (declaration) "tick_t krhino_sys_tick_get(void);" (type_identifier) "tick_t" (function_declarator) "krhino_sys_tick_get(void)" (identifier) "krhino_sys_tick_get" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (comment) "/**\n * Convert ms to ticks.\n *\n * @param[in] ms ms which will be converted to ticks\n *\n * @return the ticks of the ms\n */" (declaration) "tick_t krhino_ms_to_ticks(sys_time_t ms);" (type_identifier) "tick_t" (function_declarator) "krhino_ms_to_ticks(sys_time_t ms)" (identifier) "krhino_ms_to_ticks" (parameter_list) "(sys_time_t ms)" (() "(" (parameter_declaration) "sys_time_t ms" (type_identifier) "sys_time_t" (identifier) "ms" ()) ")" (;) ";" (comment) "/**\n * Convert ticks to ms.\n *\n * @param[in] ticks ticks which will be converted to ms\n *\n * @return the ms of the ticks\n */" (declaration) "sys_time_t krhino_ticks_to_ms(tick_t ticks);" (type_identifier) "sys_time_t" (function_declarator) "krhino_ticks_to_ms(tick_t ticks)" (identifier) "krhino_ticks_to_ms" (parameter_list) "(tick_t ticks)" (() "(" (parameter_declaration) "tick_t ticks" (type_identifier) "tick_t" (identifier) "ticks" ()) ")" (;) ";" (comment) "/** @} */" (#endif) "#endif" (comment) "/* K_TIME_H */"
69
0
{"language": "c", "success": true, "metadata": {"lines": 54, "avg_line_length": 17.0, "nodes": 44, "errors": 0, "source_hash": "14826551d06ceac6a27d5d49effcee7a5ed45aab6ae1ba4f81b17283dfaba836", "categorized_nodes": 33}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef K_TIME_H\n#define K_TIME_H\n\n/** @addtogroup aos_rhino time\n * Time management\n *\n * @{\n */\n\n/**\n * Systick routine handler.\n *\n * @param[in] NULL\n *\n * @return NULL\n */\nvoid krhino_tick_proc(void);\n\n/**\n * Get the current time from system startup, in ms.\n *\n * @param[in] NULL\n *\n * @return system time\n */\nsys_time_t krhino_sys_time_get(void);\n\n/**\n * Get the current time from system startup, in ticks.\n *\n * @param[in] NULL\n *\n * @return system ticks\n */\ntick_t krhino_sys_tick_get(void);\n\n/**\n * Convert ms to ticks.\n *\n * @param[in] ms ms which will be converted to ticks\n *\n * @return the ticks of the ms\n */\ntick_t krhino_ms_to_ticks(sys_time_t ms);\n\n/**\n * Convert ticks to ms.\n *\n * @param[in] ticks ticks which will be converted to ms\n *\n * @return the ms of the ticks\n */\nsys_time_t krhino_ticks_to_ms(tick_t ticks);\n\n/** @} */\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 13, 20, 27, 35, 43], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 62, "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": "K_TIME_H", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 16}}, {"id": 3, "type": "preproc_def", "text": "#define K_TIME_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": "K_TIME_H", "parent": 3, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 16}}, {"id": 6, "type": "declaration", "text": "void krhino_tick_proc(void);", "parent": 0, "children": [7, 8], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 28}}, {"id": 7, "type": "primitive_type", "text": "void", "parent": 6, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 8, "type": "function_declarator", "text": "krhino_tick_proc(void)", "parent": 6, "children": [9, 10], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 27}}, {"id": 9, "type": "identifier", "text": "krhino_tick_proc", "parent": 8, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 21}}, {"id": 10, "type": "parameter_list", "text": "(void)", "parent": 8, "children": [11], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 27}}, {"id": 11, "type": "parameter_declaration", "text": "void", "parent": 10, "children": [12], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 26}}, {"id": 12, "type": "primitive_type", "text": "void", "parent": 11, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 26}}, {"id": 13, "type": "declaration", "text": "sys_time_t krhino_sys_time_get(void);", "parent": 0, "children": [14, 15], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 37}}, {"id": 14, "type": "type_identifier", "text": "sys_time_t", "parent": 13, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 10}}, {"id": 15, "type": "function_declarator", "text": "krhino_sys_time_get(void)", "parent": 13, "children": [16, 17], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 36}}, {"id": 16, "type": "identifier", "text": "krhino_sys_time_get", "parent": 15, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 30}}, {"id": 17, "type": "parameter_list", "text": "(void)", "parent": 15, "children": [18], "start_point": {"row": 31, "column": 30}, "end_point": {"row": 31, "column": 36}}, {"id": 18, "type": "parameter_declaration", "text": "void", "parent": 17, "children": [19], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 35}}, {"id": 19, "type": "primitive_type", "text": "void", "parent": 18, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 35}}, {"id": 20, "type": "declaration", "text": "tick_t krhino_sys_tick_get(void);", "parent": 0, "children": [21, 22], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 33}}, {"id": 21, "type": "type_identifier", "text": "tick_t", "parent": 20, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 22, "type": "function_declarator", "text": "krhino_sys_tick_get(void)", "parent": 20, "children": [23, 24], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 32}}, {"id": 23, "type": "identifier", "text": "krhino_sys_tick_get", "parent": 22, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 26}}, {"id": 24, "type": "parameter_list", "text": "(void)", "parent": 22, "children": [25], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 32}}, {"id": 25, "type": "parameter_declaration", "text": "void", "parent": 24, "children": [26], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 31}}, {"id": 26, "type": "primitive_type", "text": "void", "parent": 25, "children": [], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 31}}, {"id": 27, "type": "declaration", "text": "tick_t krhino_ms_to_ticks(sys_time_t ms);", "parent": 0, "children": [28, 29], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 41}}, {"id": 28, "type": "type_identifier", "text": "tick_t", "parent": 27, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 6}}, {"id": 29, "type": "function_declarator", "text": "krhino_ms_to_ticks(sys_time_t ms)", "parent": 27, "children": [30, 31], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 40}}, {"id": 30, "type": "identifier", "text": "krhino_ms_to_ticks", "parent": 29, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 25}}, {"id": 31, "type": "parameter_list", "text": "(sys_time_t ms)", "parent": 29, "children": [32], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 40}}, {"id": 32, "type": "parameter_declaration", "text": "sys_time_t ms", "parent": 31, "children": [33, 34], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 39}}, {"id": 33, "type": "type_identifier", "text": "sys_time_t", "parent": 32, "children": [], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 36}}, {"id": 34, "type": "identifier", "text": "ms", "parent": 32, "children": [], "start_point": {"row": 49, "column": 37}, "end_point": {"row": 49, "column": 39}}, {"id": 35, "type": "declaration", "text": "sys_time_t krhino_ticks_to_ms(tick_t ticks);", "parent": 0, "children": [36, 37], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 44}}, {"id": 36, "type": "type_identifier", "text": "sys_time_t", "parent": 35, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 10}}, {"id": 37, "type": "function_declarator", "text": "krhino_ticks_to_ms(tick_t ticks)", "parent": 35, "children": [38, 39], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 43}}, {"id": 38, "type": "identifier", "text": "krhino_ticks_to_ms", "parent": 37, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 29}}, {"id": 39, "type": "parameter_list", "text": "(tick_t ticks)", "parent": 37, "children": [40], "start_point": {"row": 58, "column": 29}, "end_point": {"row": 58, "column": 43}}, {"id": 40, "type": "parameter_declaration", "text": "tick_t ticks", "parent": 39, "children": [41, 42], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 42}}, {"id": 41, "type": "type_identifier", "text": "tick_t", "parent": 40, "children": [], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 36}}, {"id": 42, "type": "identifier", "text": "ticks", "parent": 40, "children": [], "start_point": {"row": 58, "column": 37}, "end_point": {"row": 58, "column": 42}}, {"id": 43, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 6}}]}, "node_categories": {"declarations": {"functions": [8, 15, 22, 29, 37], "variables": [6, 11, 13, 18, 20, 25, 27, 32, 35, 40], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 14, 16, 21, 23, 28, 30, 33, 34, 36, 38, 41, 42, 43], "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": "krhino_tick_proc(void)"}, {"node_id": 15, "universal_type": "function", "name": "unknown", "text_snippet": "krhino_sys_time_get(void)"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "krhino_sys_tick_get(void)"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "krhino_ms_to_ticks(sys_time_t ms)"}, {"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "krhino_ticks_to_ms(tick_t ticks)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/**\n * @file k_time.h\n *\n * @copyright Copyright (C) 2015-2019 Alibaba Group Holding Limited\n */\n\n#ifndef K_TIME_H\n#define K_TIME_H\n\n/** @addtogroup aos_rhino time\n * Time management\n *\n * @{\n */\n\n/**\n * Systick routine handler.\n *\n * @param[in] NULL\n *\n * @return NULL\n */\nvoid krhino_tick_proc(void);\n\n/**\n * Get the current time from system startup, in ms.\n *\n * @param[in] NULL\n *\n * @return system time\n */\nsys_time_t krhino_sys_time_get(void);\n\n/**\n * Get the current time from system startup, in ticks.\n *\n * @param[in] NULL\n *\n * @return system ticks\n */\ntick_t krhino_sys_tick_get(void);\n\n/**\n * Convert ms to ticks.\n *\n * @param[in] ms ms which will be converted to ticks\n *\n * @return the ticks of the ms\n */\ntick_t krhino_ms_to_ticks(sys_time_t ms);\n\n/**\n * Convert ticks to ms.\n *\n * @param[in] ticks ticks which will be converted to ms\n *\n * @return the ms of the ticks\n */\nsys_time_t krhino_ticks_to_ms(tick_t ticks);\n\n/** @} */\n\n#endif /* K_TIME_H */\n\n"}
80,975
c
/* * GiNaCRA - GiNaC Real Algebra package * Copyright (C) 2010-2012 <NAME>, <NAME>, <NAME> * * This file is part of GiNaCRA. * * GiNaCRA 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. * * GiNaCRA 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 GiNaCRA. If not, see <http://www.gnu.org/licenses/>. * */ /** * @file CriticalPairsEntry.h * @ingroup gb * @author <NAME> */ #pragma once #include "../../core/Monomial.h" #include "SPolPair.h" #include <list> namespace carl { /** * A list of SPol pairs which have to be checked by the Buchberger algorithm. * We keep the list sorted according the compare ordering on SPol Pairs. * @ingroup gb */ template<class Compare> class CriticalPairsEntry { public: /** * Saves the list of pairs and sorts them according the configured ordering. * @param pairs */ explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs)) { mPairs.sort(SPolPairCompare<Compare>()); } /** * Get the LCM of the first element. * @return */ const Monomial::Arg& getSortedFirstLCM() const { return mPairs.front().mLcm; } /** * Get the front of the list. * @return */ const SPolPair& getFirst() const { return mPairs.front(); } /** * Removes the first element. * @return empty() */ bool update() { mPairs.pop_front(); return mPairs.empty(); } /** * The const iterator to the begin * @return begin of list */ std::list<SPolPair>::const_iterator getPairsBegin() const noexcept { return mPairs.begin(); } /** * The const iterator to the end() * @return end of list */ std::list<SPolPair>::const_iterator getPairsEnd() const noexcept { return mPairs.end(); } /** * The iterator to the end() * @return begin of list */ std::list<SPolPair>::iterator getPairsBegin() noexcept { return mPairs.begin(); } /** * The iterator to the end() * @return end of list */ std::list<SPolPair>::iterator getPairsEnd() noexcept { return mPairs.end(); } /** * Removes the element at the iterator. * @param it The iterator to the element to be erased. * @return The next element. */ std::list<SPolPair>::iterator erase(std::list<SPolPair>::iterator it) { return mPairs.erase(it); } void print( std::ostream& os = std::cout ) { for (const auto& p: mPairs) { p.print(os); } } private: std::list<SPolPair> mPairs; }; }
24.59
118
(translation_unit) "/*\n * GiNaCRA - GiNaC Real Algebra package\n * Copyright (C) 2010-2012 <NAME>, <NAME>, <NAME>\n *\n * This file is part of GiNaCRA.\n *\n * GiNaCRA is free software: you can redistribute it and/or modify\n * it 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 * GiNaCRA is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with GiNaCRA. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n\n/**\n * @file CriticalPairsEntry.h\n * @ingroup gb\n * @author <NAME>\n */\n#pragma once\n\n#include "../../core/Monomial.h"\n#include "SPolPair.h"\n\n#include <list>\n\nnamespace carl\n{\n\n/**\n * A list of SPol pairs which have to be checked by the Buchberger algorithm. \n * We keep the list sorted according the compare ordering on SPol Pairs.\n * @ingroup gb\n */\ntemplate<class Compare>\nclass CriticalPairsEntry\n{\npublic:\n\n /**\n * Saves the list of pairs and sorts them according the configured ordering.\n * @param pairs\n */\n explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))\n {\n mPairs.sort(SPolPairCompare<Compare>());\n }\n\n /**\n * Get the LCM of the first element.\n * @return \n */\n const Monomial::Arg& getSortedFirstLCM() const\n {\n return mPairs.front().mLcm;\n }\n\n /**\n * Get the front of the list.\n * @return \n */\n const SPolPair& getFirst() const {\n return mPairs.front();\n }\n\n /**\n * Removes the first element.\n * @return empty()\n */\n bool update() {\n mPairs.pop_front();\n return mPairs.empty();\n }\n\n /**\n * The const iterator to the begin\n * @return begin of list\n */\n std::list<SPolPair>::const_iterator getPairsBegin() const noexcept {\n return mPairs.begin();\n }\n\n /**\n * The const iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::const_iterator getPairsEnd() const noexcept {\n return mPairs.end();\n }\n\n /**\n * The iterator to the end()\n * @return begin of list\n */\n std::list<SPolPair>::iterator getPairsBegin() noexcept {\n return mPairs.begin();\n }\n\n /**\n * The iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::iterator getPairsEnd() noexcept {\n return mPairs.end();\n }\n\n /**\n * Removes the element at the iterator.\n * @param it The iterator to the element to be erased.\n * @return The next element.\n */\n std::list<SPolPair>::iterator erase(std::list<SPolPair>::iterator it) {\n return mPairs.erase(it);\n }\n\n void print( std::ostream& os = std::cout )\n {\n for (const auto& p: mPairs) {\n p.print(os);\n }\n }\nprivate:\n std::list<SPolPair> mPairs;\n};\n}\n" (comment) "/*\n * GiNaCRA - GiNaC Real Algebra package\n * Copyright (C) 2010-2012 <NAME>, <NAME>, <NAME>\n *\n * This file is part of GiNaCRA.\n *\n * GiNaCRA is free software: you can redistribute it and/or modify\n * it 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 * GiNaCRA is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with GiNaCRA. If not, see <http://www.gnu.org/licenses/>.\n *\n */" (comment) "/**\n * @file CriticalPairsEntry.h\n * @ingroup gb\n * @author <NAME>\n */" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "../../core/Monomial.h"\n" (#include) "#include" (string_literal) ""../../core/Monomial.h"" (") """ (string_content) "../../core/Monomial.h" (") """ (preproc_include) "#include "SPolPair.h"\n" (#include) "#include" (string_literal) ""SPolPair.h"" (") """ (string_content) "SPolPair.h" (") """ (preproc_include) "#include <list>\n" (#include) "#include" (system_lib_string) "<list>" (function_definition) "namespace carl\n{\n\n/**\n * A list of SPol pairs which have to be checked by the Buchberger algorithm. \n * We keep the list sorted according the compare ordering on SPol Pairs.\n * @ingroup gb\n */\ntemplate<class Compare>\nclass CriticalPairsEntry\n{\npublic:\n\n /**\n * Saves the list of pairs and sorts them according the configured ordering.\n * @param pairs\n */\n explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))\n {\n mPairs.sort(SPolPairCompare<Compare>());\n }\n\n /**\n * Get the LCM of the first element.\n * @return \n */\n const Monomial::Arg& getSortedFirstLCM() const\n {\n return mPairs.front().mLcm;\n }\n\n /**\n * Get the front of the list.\n * @return \n */\n const SPolPair& getFirst() const {\n return mPairs.front();\n }\n\n /**\n * Removes the first element.\n * @return empty()\n */\n bool update() {\n mPairs.pop_front();\n return mPairs.empty();\n }\n\n /**\n * The const iterator to the begin\n * @return begin of list\n */\n std::list<SPolPair>::const_iterator getPairsBegin() const noexcept {\n return mPairs.begin();\n }\n\n /**\n * The const iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::const_iterator getPairsEnd() const noexcept {\n return mPairs.end();\n }\n\n /**\n * The iterator to the end()\n * @return begin of list\n */\n std::list<SPolPair>::iterator getPairsBegin() noexcept {\n return mPairs.begin();\n }\n\n /**\n * The iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::iterator getPairsEnd() noexcept {\n return mPairs.end();\n }\n\n /**\n * Removes the element at the iterator.\n * @param it The iterator to the element to be erased.\n * @return The next element.\n */\n std::list<SPolPair>::iterator erase(std::list<SPolPair>::iterator it) {\n return mPairs.erase(it);\n }\n\n void print( std::ostream& os = std::cout )\n {\n for (const auto& p: mPairs) {\n p.print(os);\n }\n }\nprivate:\n std::list<SPolPair> mPairs;\n}" (type_identifier) "namespace" (identifier) "carl" (compound_statement) "{\n\n/**\n * A list of SPol pairs which have to be checked by the Buchberger algorithm. \n * We keep the list sorted according the compare ordering on SPol Pairs.\n * @ingroup gb\n */\ntemplate<class Compare>\nclass CriticalPairsEntry\n{\npublic:\n\n /**\n * Saves the list of pairs and sorts them according the configured ordering.\n * @param pairs\n */\n explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))\n {\n mPairs.sort(SPolPairCompare<Compare>());\n }\n\n /**\n * Get the LCM of the first element.\n * @return \n */\n const Monomial::Arg& getSortedFirstLCM() const\n {\n return mPairs.front().mLcm;\n }\n\n /**\n * Get the front of the list.\n * @return \n */\n const SPolPair& getFirst() const {\n return mPairs.front();\n }\n\n /**\n * Removes the first element.\n * @return empty()\n */\n bool update() {\n mPairs.pop_front();\n return mPairs.empty();\n }\n\n /**\n * The const iterator to the begin\n * @return begin of list\n */\n std::list<SPolPair>::const_iterator getPairsBegin() const noexcept {\n return mPairs.begin();\n }\n\n /**\n * The const iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::const_iterator getPairsEnd() const noexcept {\n return mPairs.end();\n }\n\n /**\n * The iterator to the end()\n * @return begin of list\n */\n std::list<SPolPair>::iterator getPairsBegin() noexcept {\n return mPairs.begin();\n }\n\n /**\n * The iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::iterator getPairsEnd() noexcept {\n return mPairs.end();\n }\n\n /**\n * Removes the element at the iterator.\n * @param it The iterator to the element to be erased.\n * @return The next element.\n */\n std::list<SPolPair>::iterator erase(std::list<SPolPair>::iterator it) {\n return mPairs.erase(it);\n }\n\n void print( std::ostream& os = std::cout )\n {\n for (const auto& p: mPairs) {\n p.print(os);\n }\n }\nprivate:\n std::list<SPolPair> mPairs;\n}" ({) "{" (comment) "/**\n * A list of SPol pairs which have to be checked by the Buchberger algorithm. \n * We keep the list sorted according the compare ordering on SPol Pairs.\n * @ingroup gb\n */" (ERROR) "template<class Compare>\nclass CriticalPairsEntry" (binary_expression) "template<class Compare>\nclass" (binary_expression) "template<class Compare" (identifier) "template" (<) "<" (ERROR) "class" (identifier) "class" (identifier) "Compare" (>) ">" (identifier) "class" (identifier) "CriticalPairsEntry" (compound_statement) "{\npublic:\n\n /**\n * Saves the list of pairs and sorts them according the configured ordering.\n * @param pairs\n */\n explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))\n {\n mPairs.sort(SPolPairCompare<Compare>());\n }\n\n /**\n * Get the LCM of the first element.\n * @return \n */\n const Monomial::Arg& getSortedFirstLCM() const\n {\n return mPairs.front().mLcm;\n }\n\n /**\n * Get the front of the list.\n * @return \n */\n const SPolPair& getFirst() const {\n return mPairs.front();\n }\n\n /**\n * Removes the first element.\n * @return empty()\n */\n bool update() {\n mPairs.pop_front();\n return mPairs.empty();\n }\n\n /**\n * The const iterator to the begin\n * @return begin of list\n */\n std::list<SPolPair>::const_iterator getPairsBegin() const noexcept {\n return mPairs.begin();\n }\n\n /**\n * The const iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::const_iterator getPairsEnd() const noexcept {\n return mPairs.end();\n }\n\n /**\n * The iterator to the end()\n * @return begin of list\n */\n std::list<SPolPair>::iterator getPairsBegin() noexcept {\n return mPairs.begin();\n }\n\n /**\n * The iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::iterator getPairsEnd() noexcept {\n return mPairs.end();\n }\n\n /**\n * Removes the element at the iterator.\n * @param it The iterator to the element to be erased.\n * @return The next element.\n */\n std::list<SPolPair>::iterator erase(std::list<SPolPair>::iterator it) {\n return mPairs.erase(it);\n }\n\n void print( std::ostream& os = std::cout )\n {\n for (const auto& p: mPairs) {\n p.print(os);\n }\n }" ({) "{" (labeled_statement) "public:\n\n /**\n * Saves the list of pairs and sorts them according the configured ordering.\n * @param pairs\n */\n explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))\n {\n mPairs.sort(SPolPairCompare<Compare>());\n }" (statement_identifier) "public" (:) ":" (comment) "/**\n * Saves the list of pairs and sorts them according the configured ordering.\n * @param pairs\n */" (ERROR) "explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))" (type_identifier) "explicit" (function_declarator) "CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))" (identifier) "CriticalPairsEntry" (parameter_list) "(std::list<SPolPair>&& pairs)" (() "(" (parameter_declaration) "std::list<SPolPair>&& pairs" (type_identifier) "std" (ERROR) "::list<SPolPair>&&" (:) ":" (:) ":" (identifier) "list" (<) "<" (identifier) "SPolPair" (>) ">" (&&) "&&" (identifier) "pairs" ()) ")" (ERROR) ":" (:) ":" (call_expression) "mPairs(std::move(pairs))" (identifier) "mPairs" (argument_list) "(std::move(pairs))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (call_expression) "move(pairs)" (identifier) "move" (argument_list) "(pairs)" (() "(" (identifier) "pairs" ()) ")" ()) ")" (compound_statement) "{\n mPairs.sort(SPolPairCompare<Compare>());\n }" ({) "{" (expression_statement) "mPairs.sort(SPolPairCompare<Compare>());" (call_expression) "mPairs.sort(SPolPairCompare<Compare>())" (field_expression) "mPairs.sort" (identifier) "mPairs" (.) "." (field_identifier) "sort" (argument_list) "(SPolPairCompare<Compare>())" (() "(" (binary_expression) "SPolPairCompare<Compare>()" (binary_expression) "SPolPairCompare<Compare" (identifier) "SPolPairCompare" (<) "<" (identifier) "Compare" (>) ">" (parenthesized_expression) "()" (() "(" (identifier) "" ()) ")" ()) ")" (;) ";" (}) "}" (comment) "/**\n * Get the LCM of the first element.\n * @return \n */" (ERROR) "const Monomial::Arg& getSortedFirstLCM() const" (type_qualifier) "const" (const) "const" (type_identifier) "Monomial" (ERROR) "::Arg&" (:) ":" (:) ":" (identifier) "Arg" (&) "&" (function_declarator) "getSortedFirstLCM()" (identifier) "getSortedFirstLCM" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return mPairs.front().mLcm;\n }" ({) "{" (return_statement) "return mPairs.front().mLcm;" (return) "return" (field_expression) "mPairs.front().mLcm" (call_expression) "mPairs.front()" (field_expression) "mPairs.front" (identifier) "mPairs" (.) "." (field_identifier) "front" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "mLcm" (;) ";" (}) "}" (comment) "/**\n * Get the front of the list.\n * @return \n */" (ERROR) "const SPolPair& getFirst() const" (type_qualifier) "const" (const) "const" (type_identifier) "SPolPair" (ERROR) "&" (&) "&" (function_declarator) "getFirst()" (identifier) "getFirst" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return mPairs.front();\n }" ({) "{" (return_statement) "return mPairs.front();" (return) "return" (call_expression) "mPairs.front()" (field_expression) "mPairs.front" (identifier) "mPairs" (.) "." (field_identifier) "front" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "/**\n * Removes the first element.\n * @return empty()\n */" (function_definition) "bool update() {\n mPairs.pop_front();\n return mPairs.empty();\n }" (primitive_type) "bool" (function_declarator) "update()" (identifier) "update" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n mPairs.pop_front();\n return mPairs.empty();\n }" ({) "{" (expression_statement) "mPairs.pop_front();" (call_expression) "mPairs.pop_front()" (field_expression) "mPairs.pop_front" (identifier) "mPairs" (.) "." (field_identifier) "pop_front" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return mPairs.empty();" (return) "return" (call_expression) "mPairs.empty()" (field_expression) "mPairs.empty" (identifier) "mPairs" (.) "." (field_identifier) "empty" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "/**\n * The const iterator to the begin\n * @return begin of list\n */" (labeled_statement) "std::list<SPolPair>::const_iterator getPairsBegin() const noexcept {\n return mPairs.begin();\n }" (statement_identifier) "std" (ERROR) "::list<SPolPair>:" (:) ":" (:) ":" (binary_expression) "list<SPolPair" (identifier) "list" (<) "<" (identifier) "SPolPair" (>) ">" (:) ":" (:) ":" (ERROR) "const_iterator getPairsBegin() const noexcept" (type_identifier) "const_iterator" (function_declarator) "getPairsBegin() const noexcept" (identifier) "getPairsBegin" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (identifier) "noexcept" (compound_statement) "{\n return mPairs.begin();\n }" ({) "{" (return_statement) "return mPairs.begin();" (return) "return" (call_expression) "mPairs.begin()" (field_expression) "mPairs.begin" (identifier) "mPairs" (.) "." (field_identifier) "begin" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "/**\n * The const iterator to the end()\n * @return end of list\n */" (labeled_statement) "std::list<SPolPair>::const_iterator getPairsEnd() const noexcept {\n return mPairs.end();\n }" (statement_identifier) "std" (ERROR) "::list<SPolPair>:" (:) ":" (:) ":" (binary_expression) "list<SPolPair" (identifier) "list" (<) "<" (identifier) "SPolPair" (>) ">" (:) ":" (:) ":" (ERROR) "const_iterator getPairsEnd() const noexcept" (type_identifier) "const_iterator" (function_declarator) "getPairsEnd() const noexcept" (identifier) "getPairsEnd" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (identifier) "noexcept" (compound_statement) "{\n return mPairs.end();\n }" ({) "{" (return_statement) "return mPairs.end();" (return) "return" (call_expression) "mPairs.end()" (field_expression) "mPairs.end" (identifier) "mPairs" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "/**\n * The iterator to the end()\n * @return begin of list\n */" (labeled_statement) "std::list<SPolPair>::iterator getPairsBegin() noexcept {\n return mPairs.begin();\n }" (statement_identifier) "std" (ERROR) "::list<SPolPair>:" (:) ":" (:) ":" (binary_expression) "list<SPolPair" (identifier) "list" (<) "<" (identifier) "SPolPair" (>) ">" (:) ":" (:) ":" (ERROR) "iterator getPairsBegin() noexcept" (type_identifier) "iterator" (function_declarator) "getPairsBegin() noexcept" (identifier) "getPairsBegin" (parameter_list) "()" (() "(" ()) ")" (identifier) "noexcept" (compound_statement) "{\n return mPairs.begin();\n }" ({) "{" (return_statement) "return mPairs.begin();" (return) "return" (call_expression) "mPairs.begin()" (field_expression) "mPairs.begin" (identifier) "mPairs" (.) "." (field_identifier) "begin" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "/**\n * The iterator to the end()\n * @return end of list\n */" (labeled_statement) "std::list<SPolPair>::iterator getPairsEnd() noexcept {\n return mPairs.end();\n }" (statement_identifier) "std" (ERROR) "::list<SPolPair>:" (:) ":" (:) ":" (binary_expression) "list<SPolPair" (identifier) "list" (<) "<" (identifier) "SPolPair" (>) ">" (:) ":" (:) ":" (ERROR) "iterator getPairsEnd() noexcept" (type_identifier) "iterator" (function_declarator) "getPairsEnd() noexcept" (identifier) "getPairsEnd" (parameter_list) "()" (() "(" ()) ")" (identifier) "noexcept" (compound_statement) "{\n return mPairs.end();\n }" ({) "{" (return_statement) "return mPairs.end();" (return) "return" (call_expression) "mPairs.end()" (field_expression) "mPairs.end" (identifier) "mPairs" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (comment) "/**\n * Removes the element at the iterator.\n * @param it The iterator to the element to be erased.\n * @return The next element.\n */" (labeled_statement) "std::list<SPolPair>::iterator erase(std::list<SPolPair>::iterator it) {\n return mPairs.erase(it);\n }" (statement_identifier) "std" (ERROR) "::list<SPolPair>::iterator erase(std::list<SPolPair>:" (:) ":" (:) ":" (binary_expression) "list<SPolPair" (identifier) "list" (<) "<" (identifier) "SPolPair" (>) ">" (:) ":" (:) ":" (type_identifier) "iterator" (identifier) "erase" (() "(" (type_identifier) "std" (:) ":" (:) ":" (binary_expression) "list<SPolPair" (identifier) "list" (<) "<" (identifier) "SPolPair" (>) ">" (:) ":" (:) ":" (ERROR) "iterator it)" (type_identifier) "iterator" (identifier) "it" ()) ")" (compound_statement) "{\n return mPairs.erase(it);\n }" ({) "{" (return_statement) "return mPairs.erase(it);" (return) "return" (call_expression) "mPairs.erase(it)" (field_expression) "mPairs.erase" (identifier) "mPairs" (.) "." (field_identifier) "erase" (argument_list) "(it)" (() "(" (identifier) "it" ()) ")" (;) ";" (}) "}" (ERROR) "void print( std::ostream& os = std::cout )" (primitive_type) "void" (identifier) "print" (() "(" (parameter_declaration) "std::ostream" (type_identifier) "std" (ERROR) "::" (:) ":" (:) ":" (identifier) "ostream" (assignment_expression) "& os = std" (pointer_expression) "& os" (&) "&" (identifier) "os" (=) "=" (identifier) "std" (:) ":" (:) ":" (identifier) "cout" ()) ")" (compound_statement) "{\n for (const auto& p: mPairs) {\n p.print(os);\n }" ({) "{" (ERROR) "for (const auto& p: mPairs) {\n p.print(os);" (for) "for" (() "(" (declaration) "const auto& p: mPairs) {\n p.print(os);" (type_qualifier) "const" (const) "const" (storage_class_specifier) "auto" (auto) "auto" (ERROR) "&" (&) "&" (type_identifier) "p" (ERROR) ": mPairs) {\n p." (:) ":" (identifier) "mPairs" ()) ")" ({) "{" (identifier) "p" (.) "." (function_declarator) "print(os)" (identifier) "print" (parameter_list) "(os)" (() "(" (parameter_declaration) "os" (type_identifier) "os" ()) ")" (;) ";" (}) "}" (}) "}" (labeled_statement) "private:\n std::list<SPolPair> mPairs;" (statement_identifier) "private" (:) ":" (labeled_statement) "std::list<SPolPair> mPairs;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "list<SPolPair> mPairs;" (binary_expression) "list<SPolPair> mPairs" (binary_expression) "list<SPolPair" (identifier) "list" (<) "<" (identifier) "SPolPair" (>) ">" (identifier) "mPairs" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (ERROR) "}" (}) "}"
455
27
{"language": "c", "success": true, "metadata": {"lines": 118, "avg_line_length": 24.59, "nodes": 239, "errors": 0, "source_hash": "0bf937489adc7555c952c5f30f0b089d1cf5bdfe684a60a036ac8d72f5c19945", "categorized_nodes": 163}, "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 \"../../core/Monomial.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": "string_literal", "text": "\"../../core/Monomial.h\"", "parent": 3, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 32}}, {"id": 6, "type": "preproc_include", "text": "#include \"SPolPair.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": "string_literal", "text": "\"SPolPair.h\"", "parent": 6, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 21}}, {"id": 9, "type": "preproc_include", "text": "#include <list>\n", "parent": null, "children": [10, 11], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<list>", "parent": 9, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 15}}, {"id": 12, "type": "function_definition", "text": "namespace carl\n{\n\n/**\n * A list of SPol pairs which have to be checked by the Buchberger algorithm. \n * We keep the list sorted according the compare ordering on SPol Pairs.\n * @ingroup gb\n */\ntemplate<class Compare>\nclass CriticalPairsEntry\n{\npublic:\n\n\t/**\n\t * Saves the list of pairs and sorts them according the configured ordering.\n * @param pairs\n */\n explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))\n {\n mPairs.sort(SPolPairCompare<Compare>());\n }\n\n\t/**\n\t * Get the LCM of the first element.\n * @return \n */\n const Monomial::Arg& getSortedFirstLCM() const\n {\n return mPairs.front().mLcm;\n }\n\n\t/**\n\t * Get the front of the list.\n * @return \n */\n const SPolPair& getFirst() const {\n return mPairs.front();\n }\n\n /**\n * Removes the first element.\n * @return empty()\n */\n bool update() {\n mPairs.pop_front();\n return mPairs.empty();\n }\n\n\t/**\n\t * The const iterator to the begin\n * @return begin of list\n */\n std::list<SPolPair>::const_iterator getPairsBegin() const noexcept {\n return mPairs.begin();\n }\n\n\t/**\n\t * The const iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::const_iterator getPairsEnd() const noexcept {\n return mPairs.end();\n }\n\n /**\n\t * The iterator to the end()\n * @return begin of list\n */\n\tstd::list<SPolPair>::iterator getPairsBegin() noexcept {\n return mPairs.begin();\n }\n\n\t/**\n\t * The iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::iterator getPairsEnd() noexcept {\n return mPairs.end();\n }\n\n\t/**\n\t * Removes the element at the iterator.\n * @param it The iterator to the element to be erased.\n * @return The next element.\n */\n std::list<SPolPair>::iterator erase(std::list<SPolPair>::iterator it) {\n return mPairs.erase(it);\n }\n\n void print( std::ostream& os = std::cout )\n {\n\t\tfor (const auto& p: mPairs) {\n\t\t\tp.print(os);\n\t\t}\n }\nprivate:\n std::list<SPolPair> mPairs;\n}", "parent": null, "children": [13, 14], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 131, "column": 1}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 9}}, {"id": 14, "type": "identifier", "text": "carl", "parent": 12, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 14}}, {"id": 15, "type": "ERROR", "text": "template<class Compare>\nclass CriticalPairsEntry", "parent": 12, "children": [16, 22], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 24}}, {"id": 16, "type": "binary_expression", "text": "template<class Compare>\nclass", "parent": 15, "children": [17, 21], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 5}}, {"id": 17, "type": "binary_expression", "text": "template<class Compare", "parent": 16, "children": [18, 19, 20], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 22}}, {"id": 18, "type": "identifier", "text": "template", "parent": 17, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 8}}, {"id": 19, "type": "<", "text": "<", "parent": 17, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 9}}, {"id": 20, "type": "identifier", "text": "Compare", "parent": 17, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 22}}, {"id": 21, "type": ">", "text": ">", "parent": 16, "children": [], "start_point": {"row": 42, "column": 22}, "end_point": {"row": 42, "column": 23}}, {"id": 22, "type": "identifier", "text": "CriticalPairsEntry", "parent": 15, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 24}}, {"id": 23, "type": "labeled_statement", "text": "public:\n\n\t/**\n\t * Saves the list of pairs and sorts them according the configured ordering.\n * @param pairs\n */\n explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))\n {\n mPairs.sort(SPolPairCompare<Compare>());\n }", "parent": 12, "children": [24], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 54, "column": 5}}, {"id": 24, "type": "ERROR", "text": "explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))", "parent": 23, "children": [25, 26], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 87}}, {"id": 25, "type": "type_identifier", "text": "explicit", "parent": 24, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 12}}, {"id": 26, "type": "function_declarator", "text": "CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))", "parent": 24, "children": [27, 28, 38], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 87}}, {"id": 27, "type": "identifier", "text": "CriticalPairsEntry", "parent": 26, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 31}}, {"id": 28, "type": "parameter_list", "text": "(std::list<SPolPair>&& pairs)", "parent": 26, "children": [29], "start_point": {"row": 51, "column": 31}, "end_point": {"row": 51, "column": 60}}, {"id": 29, "type": "parameter_declaration", "text": "std::list<SPolPair>&& pairs", "parent": 28, "children": [30, 31, 37], "start_point": {"row": 51, "column": 32}, "end_point": {"row": 51, "column": 59}}, {"id": 30, "type": "type_identifier", "text": "std", "parent": 29, "children": [], "start_point": {"row": 51, "column": 32}, "end_point": {"row": 51, "column": 35}}, {"id": 31, "type": "ERROR", "text": "::list<SPolPair>&&", "parent": 29, "children": [32, 33, 34, 35, 36], "start_point": {"row": 51, "column": 35}, "end_point": {"row": 51, "column": 53}}, {"id": 32, "type": "identifier", "text": "list", "parent": 31, "children": [], "start_point": {"row": 51, "column": 37}, "end_point": {"row": 51, "column": 41}}, {"id": 33, "type": "<", "text": "<", "parent": 31, "children": [], "start_point": {"row": 51, "column": 41}, "end_point": {"row": 51, "column": 42}}, {"id": 34, "type": "identifier", "text": "SPolPair", "parent": 31, "children": [], "start_point": {"row": 51, "column": 42}, "end_point": {"row": 51, "column": 50}}, {"id": 35, "type": ">", "text": ">", "parent": 31, "children": [], "start_point": {"row": 51, "column": 50}, "end_point": {"row": 51, "column": 51}}, {"id": 36, "type": "&&", "text": "&&", "parent": 31, "children": [], "start_point": {"row": 51, "column": 51}, "end_point": {"row": 51, "column": 53}}, {"id": 37, "type": "identifier", "text": "pairs", "parent": 29, "children": [], "start_point": {"row": 51, "column": 54}, "end_point": {"row": 51, "column": 59}}, {"id": 38, "type": "call_expression", "text": "mPairs(std::move(pairs))", "parent": 26, "children": [39, 40], "start_point": {"row": 51, "column": 63}, "end_point": {"row": 51, "column": 87}}, {"id": 39, "type": "identifier", "text": "mPairs", "parent": 38, "children": [], "start_point": {"row": 51, "column": 63}, "end_point": {"row": 51, "column": 69}}, {"id": 40, "type": "argument_list", "text": "(std::move(pairs))", "parent": 38, "children": [41, 43], "start_point": {"row": 51, "column": 69}, "end_point": {"row": 51, "column": 87}}, {"id": 41, "type": "ERROR", "text": "std::", "parent": 40, "children": [42], "start_point": {"row": 51, "column": 70}, "end_point": {"row": 51, "column": 75}}, {"id": 42, "type": "identifier", "text": "std", "parent": 41, "children": [], "start_point": {"row": 51, "column": 70}, "end_point": {"row": 51, "column": 73}}, {"id": 43, "type": "call_expression", "text": "move(pairs)", "parent": 40, "children": [44, 45], "start_point": {"row": 51, "column": 75}, "end_point": {"row": 51, "column": 86}}, {"id": 44, "type": "identifier", "text": "move", "parent": 43, "children": [], "start_point": {"row": 51, "column": 75}, "end_point": {"row": 51, "column": 79}}, {"id": 45, "type": "argument_list", "text": "(pairs)", "parent": 43, "children": [46], "start_point": {"row": 51, "column": 79}, "end_point": {"row": 51, "column": 86}}, {"id": 46, "type": "identifier", "text": "pairs", "parent": 45, "children": [], "start_point": {"row": 51, "column": 80}, "end_point": {"row": 51, "column": 85}}, {"id": 47, "type": "call_expression", "text": "mPairs.sort(SPolPairCompare<Compare>())", "parent": 23, "children": [48, 51], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 47}}, {"id": 48, "type": "field_expression", "text": "mPairs.sort", "parent": 47, "children": [49, 50], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 19}}, {"id": 49, "type": "identifier", "text": "mPairs", "parent": 48, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 14}}, {"id": 50, "type": "field_identifier", "text": "sort", "parent": 48, "children": [], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 19}}, {"id": 51, "type": "argument_list", "text": "(SPolPairCompare<Compare>())", "parent": 47, "children": [52], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 47}}, {"id": 52, "type": "binary_expression", "text": "SPolPairCompare<Compare>()", "parent": 51, "children": [53, 57, 58], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 46}}, {"id": 53, "type": "binary_expression", "text": "SPolPairCompare<Compare", "parent": 52, "children": [54, 55, 56], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 43}}, {"id": 54, "type": "identifier", "text": "SPolPairCompare", "parent": 53, "children": [], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 35}}, {"id": 55, "type": "<", "text": "<", "parent": 53, "children": [], "start_point": {"row": 53, "column": 35}, "end_point": {"row": 53, "column": 36}}, {"id": 56, "type": "identifier", "text": "Compare", "parent": 53, "children": [], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 43}}, {"id": 57, "type": ">", "text": ">", "parent": 52, "children": [], "start_point": {"row": 53, "column": 43}, "end_point": {"row": 53, "column": 44}}, {"id": 58, "type": "parenthesized_expression", "text": "()", "parent": 52, "children": [59], "start_point": {"row": 53, "column": 44}, "end_point": {"row": 53, "column": 46}}, {"id": 59, "type": "identifier", "text": "", "parent": 58, "children": [], "start_point": {"row": 53, "column": 45}, "end_point": {"row": 53, "column": 45}}, {"id": 60, "type": "ERROR", "text": "const Monomial::Arg& getSortedFirstLCM() const", "parent": 12, "children": [61, 62, 64], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 50}}, {"id": 61, "type": "type_identifier", "text": "Monomial", "parent": 60, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 18}}, {"id": 62, "type": "ERROR", "text": "::Arg&", "parent": 60, "children": [63], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 24}}, {"id": 63, "type": "identifier", "text": "Arg", "parent": 62, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 23}}, {"id": 64, "type": "function_declarator", "text": "getSortedFirstLCM()", "parent": 60, "children": [65, 66], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 44}}, {"id": 65, "type": "identifier", "text": "getSortedFirstLCM", "parent": 64, "children": [], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 42}}, {"id": 66, "type": "parameter_list", "text": "()", "parent": 64, "children": [], "start_point": {"row": 60, "column": 42}, "end_point": {"row": 60, "column": 44}}, {"id": 67, "type": "return_statement", "text": "return mPairs.front().mLcm;", "parent": 12, "children": [68], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 35}}, {"id": 68, "type": "field_expression", "text": "mPairs.front().mLcm", "parent": 67, "children": [69, 74], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 34}}, {"id": 69, "type": "call_expression", "text": "mPairs.front()", "parent": 68, "children": [70, 73], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 29}}, {"id": 70, "type": "field_expression", "text": "mPairs.front", "parent": 69, "children": [71, 72], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 27}}, {"id": 71, "type": "identifier", "text": "mPairs", "parent": 70, "children": [], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 21}}, {"id": 72, "type": "field_identifier", "text": "front", "parent": 70, "children": [], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 27}}, {"id": 73, "type": "argument_list", "text": "()", "parent": 69, "children": [], "start_point": {"row": 62, "column": 27}, "end_point": {"row": 62, "column": 29}}, {"id": 74, "type": "field_identifier", "text": "mLcm", "parent": 68, "children": [], "start_point": {"row": 62, "column": 30}, "end_point": {"row": 62, "column": 34}}, {"id": 75, "type": "ERROR", "text": "const SPolPair& getFirst() const", "parent": 12, "children": [76, 77], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 36}}, {"id": 76, "type": "type_identifier", "text": "SPolPair", "parent": 75, "children": [], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 18}}, {"id": 77, "type": "function_declarator", "text": "getFirst()", "parent": 75, "children": [78, 79], "start_point": {"row": 69, "column": 20}, "end_point": {"row": 69, "column": 30}}, {"id": 78, "type": "identifier", "text": "getFirst", "parent": 77, "children": [], "start_point": {"row": 69, "column": 20}, "end_point": {"row": 69, "column": 28}}, {"id": 79, "type": "parameter_list", "text": "()", "parent": 77, "children": [], "start_point": {"row": 69, "column": 28}, "end_point": {"row": 69, "column": 30}}, {"id": 80, "type": "return_statement", "text": "return mPairs.front();", "parent": 12, "children": [81], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 30}}, {"id": 81, "type": "call_expression", "text": "mPairs.front()", "parent": 80, "children": [82, 85], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 29}}, {"id": 82, "type": "field_expression", "text": "mPairs.front", "parent": 81, "children": [83, 84], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 27}}, {"id": 83, "type": "identifier", "text": "mPairs", "parent": 82, "children": [], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 21}}, {"id": 84, "type": "field_identifier", "text": "front", "parent": 82, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 27}}, {"id": 85, "type": "argument_list", "text": "()", "parent": 81, "children": [], "start_point": {"row": 70, "column": 27}, "end_point": {"row": 70, "column": 29}}, {"id": 86, "type": "function_definition", "text": "bool update() {\n mPairs.pop_front();\n return mPairs.empty();\n }", "parent": 12, "children": [87, 88], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 80, "column": 5}}, {"id": 87, "type": "primitive_type", "text": "bool", "parent": 86, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 8}}, {"id": 88, "type": "function_declarator", "text": "update()", "parent": 86, "children": [89, 90], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 17}}, {"id": 89, "type": "identifier", "text": "update", "parent": 88, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 15}}, {"id": 90, "type": "parameter_list", "text": "()", "parent": 88, "children": [], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 17}}, {"id": 91, "type": "call_expression", "text": "mPairs.pop_front()", "parent": 86, "children": [92, 95], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 26}}, {"id": 92, "type": "field_expression", "text": "mPairs.pop_front", "parent": 91, "children": [93, 94], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 24}}, {"id": 93, "type": "identifier", "text": "mPairs", "parent": 92, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 14}}, {"id": 94, "type": "field_identifier", "text": "pop_front", "parent": 92, "children": [], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 24}}, {"id": 95, "type": "argument_list", "text": "()", "parent": 91, "children": [], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 26}}, {"id": 96, "type": "return_statement", "text": "return mPairs.empty();", "parent": 86, "children": [97], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 30}}, {"id": 97, "type": "call_expression", "text": "mPairs.empty()", "parent": 96, "children": [98, 101], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 29}}, {"id": 98, "type": "field_expression", "text": "mPairs.empty", "parent": 97, "children": [99, 100], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 27}}, {"id": 99, "type": "identifier", "text": "mPairs", "parent": 98, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 21}}, {"id": 100, "type": "field_identifier", "text": "empty", "parent": 98, "children": [], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 27}}, {"id": 101, "type": "argument_list", "text": "()", "parent": 97, "children": [], "start_point": {"row": 79, "column": 27}, "end_point": {"row": 79, "column": 29}}, {"id": 102, "type": "labeled_statement", "text": "std::list<SPolPair>::const_iterator getPairsBegin() const noexcept {\n return mPairs.begin();\n }", "parent": 12, "children": [103, 104, 110], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 88, "column": 5}}, {"id": 103, "type": "statement_identifier", "text": "std", "parent": 102, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 7}}, {"id": 104, "type": "ERROR", "text": "::list<SPolPair>:", "parent": 102, "children": [105, 109], "start_point": {"row": 86, "column": 7}, "end_point": {"row": 86, "column": 24}}, {"id": 105, "type": "binary_expression", "text": "list<SPolPair", "parent": 104, "children": [106, 107, 108], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 22}}, {"id": 106, "type": "identifier", "text": "list", "parent": 105, "children": [], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 13}}, {"id": 107, "type": "<", "text": "<", "parent": 105, "children": [], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 14}}, {"id": 108, "type": "identifier", "text": "SPolPair", "parent": 105, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 22}}, {"id": 109, "type": ">", "text": ">", "parent": 104, "children": [], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 23}}, {"id": 110, "type": "ERROR", "text": "const_iterator getPairsBegin() const noexcept", "parent": 102, "children": [111, 112], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 70}}, {"id": 111, "type": "type_identifier", "text": "const_iterator", "parent": 110, "children": [], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 39}}, {"id": 112, "type": "function_declarator", "text": "getPairsBegin() const noexcept", "parent": 110, "children": [113, 114, 115], "start_point": {"row": 86, "column": 40}, "end_point": {"row": 86, "column": 70}}, {"id": 113, "type": "identifier", "text": "getPairsBegin", "parent": 112, "children": [], "start_point": {"row": 86, "column": 40}, "end_point": {"row": 86, "column": 53}}, {"id": 114, "type": "parameter_list", "text": "()", "parent": 112, "children": [], "start_point": {"row": 86, "column": 53}, "end_point": {"row": 86, "column": 55}}, {"id": 115, "type": "identifier", "text": "noexcept", "parent": 112, "children": [], "start_point": {"row": 86, "column": 62}, "end_point": {"row": 86, "column": 70}}, {"id": 116, "type": "return_statement", "text": "return mPairs.begin();", "parent": 102, "children": [117], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 30}}, {"id": 117, "type": "call_expression", "text": "mPairs.begin()", "parent": 116, "children": [118, 120], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 29}}, {"id": 118, "type": "field_expression", "text": "mPairs.begin", "parent": 117, "children": [119], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 27}}, {"id": 119, "type": "identifier", "text": "mPairs", "parent": 118, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 21}}, {"id": 120, "type": "argument_list", "text": "()", "parent": 117, "children": [], "start_point": {"row": 87, "column": 27}, "end_point": {"row": 87, "column": 29}}, {"id": 121, "type": "labeled_statement", "text": "std::list<SPolPair>::const_iterator getPairsEnd() const noexcept {\n return mPairs.end();\n }", "parent": 12, "children": [122, 123, 129], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 96, "column": 5}}, {"id": 122, "type": "statement_identifier", "text": "std", "parent": 121, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 7}}, {"id": 123, "type": "ERROR", "text": "::list<SPolPair>:", "parent": 121, "children": [124, 128], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 24}}, {"id": 124, "type": "binary_expression", "text": "list<SPolPair", "parent": 123, "children": [125, 126, 127], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 22}}, {"id": 125, "type": "identifier", "text": "list", "parent": 124, "children": [], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 13}}, {"id": 126, "type": "<", "text": "<", "parent": 124, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 14}}, {"id": 127, "type": "identifier", "text": "SPolPair", "parent": 124, "children": [], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 22}}, {"id": 128, "type": ">", "text": ">", "parent": 123, "children": [], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 23}}, {"id": 129, "type": "ERROR", "text": "const_iterator getPairsEnd() const noexcept", "parent": 121, "children": [130, 131], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 68}}, {"id": 130, "type": "type_identifier", "text": "const_iterator", "parent": 129, "children": [], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 39}}, {"id": 131, "type": "function_declarator", "text": "getPairsEnd() const noexcept", "parent": 129, "children": [132, 133, 134], "start_point": {"row": 94, "column": 40}, "end_point": {"row": 94, "column": 68}}, {"id": 132, "type": "identifier", "text": "getPairsEnd", "parent": 131, "children": [], "start_point": {"row": 94, "column": 40}, "end_point": {"row": 94, "column": 51}}, {"id": 133, "type": "parameter_list", "text": "()", "parent": 131, "children": [], "start_point": {"row": 94, "column": 51}, "end_point": {"row": 94, "column": 53}}, {"id": 134, "type": "identifier", "text": "noexcept", "parent": 131, "children": [], "start_point": {"row": 94, "column": 60}, "end_point": {"row": 94, "column": 68}}, {"id": 135, "type": "return_statement", "text": "return mPairs.end();", "parent": 121, "children": [136], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 28}}, {"id": 136, "type": "call_expression", "text": "mPairs.end()", "parent": 135, "children": [137, 139], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 95, "column": 27}}, {"id": 137, "type": "field_expression", "text": "mPairs.end", "parent": 136, "children": [138], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 95, "column": 25}}, {"id": 138, "type": "identifier", "text": "mPairs", "parent": 137, "children": [], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 95, "column": 21}}, {"id": 139, "type": "argument_list", "text": "()", "parent": 136, "children": [], "start_point": {"row": 95, "column": 25}, "end_point": {"row": 95, "column": 27}}, {"id": 140, "type": "labeled_statement", "text": "std::list<SPolPair>::iterator getPairsBegin() noexcept {\n return mPairs.begin();\n }", "parent": 12, "children": [141, 142, 148], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 104, "column": 5}}, {"id": 141, "type": "statement_identifier", "text": "std", "parent": 140, "children": [], "start_point": {"row": 102, "column": 1}, "end_point": {"row": 102, "column": 4}}, {"id": 142, "type": "ERROR", "text": "::list<SPolPair>:", "parent": 140, "children": [143, 147], "start_point": {"row": 102, "column": 4}, "end_point": {"row": 102, "column": 21}}, {"id": 143, "type": "binary_expression", "text": "list<SPolPair", "parent": 142, "children": [144, 145, 146], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 19}}, {"id": 144, "type": "identifier", "text": "list", "parent": 143, "children": [], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 102, "column": 10}}, {"id": 145, "type": "<", "text": "<", "parent": 143, "children": [], "start_point": {"row": 102, "column": 10}, "end_point": {"row": 102, "column": 11}}, {"id": 146, "type": "identifier", "text": "SPolPair", "parent": 143, "children": [], "start_point": {"row": 102, "column": 11}, "end_point": {"row": 102, "column": 19}}, {"id": 147, "type": ">", "text": ">", "parent": 142, "children": [], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 20}}, {"id": 148, "type": "ERROR", "text": "iterator getPairsBegin() noexcept", "parent": 140, "children": [149, 150], "start_point": {"row": 102, "column": 22}, "end_point": {"row": 102, "column": 55}}, {"id": 149, "type": "type_identifier", "text": "iterator", "parent": 148, "children": [], "start_point": {"row": 102, "column": 22}, "end_point": {"row": 102, "column": 30}}, {"id": 150, "type": "function_declarator", "text": "getPairsBegin() noexcept", "parent": 148, "children": [151, 152, 153], "start_point": {"row": 102, "column": 31}, "end_point": {"row": 102, "column": 55}}, {"id": 151, "type": "identifier", "text": "getPairsBegin", "parent": 150, "children": [], "start_point": {"row": 102, "column": 31}, "end_point": {"row": 102, "column": 44}}, {"id": 152, "type": "parameter_list", "text": "()", "parent": 150, "children": [], "start_point": {"row": 102, "column": 44}, "end_point": {"row": 102, "column": 46}}, {"id": 153, "type": "identifier", "text": "noexcept", "parent": 150, "children": [], "start_point": {"row": 102, "column": 47}, "end_point": {"row": 102, "column": 55}}, {"id": 154, "type": "return_statement", "text": "return mPairs.begin();", "parent": 140, "children": [155], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 30}}, {"id": 155, "type": "call_expression", "text": "mPairs.begin()", "parent": 154, "children": [156, 158], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 29}}, {"id": 156, "type": "field_expression", "text": "mPairs.begin", "parent": 155, "children": [157], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 27}}, {"id": 157, "type": "identifier", "text": "mPairs", "parent": 156, "children": [], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 21}}, {"id": 158, "type": "argument_list", "text": "()", "parent": 155, "children": [], "start_point": {"row": 103, "column": 27}, "end_point": {"row": 103, "column": 29}}, {"id": 159, "type": "labeled_statement", "text": "std::list<SPolPair>::iterator getPairsEnd() noexcept {\n return mPairs.end();\n }", "parent": 12, "children": [160, 161, 167], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 112, "column": 5}}, {"id": 160, "type": "statement_identifier", "text": "std", "parent": 159, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 7}}, {"id": 161, "type": "ERROR", "text": "::list<SPolPair>:", "parent": 159, "children": [162, 166], "start_point": {"row": 110, "column": 7}, "end_point": {"row": 110, "column": 24}}, {"id": 162, "type": "binary_expression", "text": "list<SPolPair", "parent": 161, "children": [163, 164, 165], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 22}}, {"id": 163, "type": "identifier", "text": "list", "parent": 162, "children": [], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 13}}, {"id": 164, "type": "<", "text": "<", "parent": 162, "children": [], "start_point": {"row": 110, "column": 13}, "end_point": {"row": 110, "column": 14}}, {"id": 165, "type": "identifier", "text": "SPolPair", "parent": 162, "children": [], "start_point": {"row": 110, "column": 14}, "end_point": {"row": 110, "column": 22}}, {"id": 166, "type": ">", "text": ">", "parent": 161, "children": [], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 23}}, {"id": 167, "type": "ERROR", "text": "iterator getPairsEnd() noexcept", "parent": 159, "children": [168, 169], "start_point": {"row": 110, "column": 25}, "end_point": {"row": 110, "column": 56}}, {"id": 168, "type": "type_identifier", "text": "iterator", "parent": 167, "children": [], "start_point": {"row": 110, "column": 25}, "end_point": {"row": 110, "column": 33}}, {"id": 169, "type": "function_declarator", "text": "getPairsEnd() noexcept", "parent": 167, "children": [170, 171, 172], "start_point": {"row": 110, "column": 34}, "end_point": {"row": 110, "column": 56}}, {"id": 170, "type": "identifier", "text": "getPairsEnd", "parent": 169, "children": [], "start_point": {"row": 110, "column": 34}, "end_point": {"row": 110, "column": 45}}, {"id": 171, "type": "parameter_list", "text": "()", "parent": 169, "children": [], "start_point": {"row": 110, "column": 45}, "end_point": {"row": 110, "column": 47}}, {"id": 172, "type": "identifier", "text": "noexcept", "parent": 169, "children": [], "start_point": {"row": 110, "column": 48}, "end_point": {"row": 110, "column": 56}}, {"id": 173, "type": "return_statement", "text": "return mPairs.end();", "parent": 159, "children": [174], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 28}}, {"id": 174, "type": "call_expression", "text": "mPairs.end()", "parent": 173, "children": [175, 177], "start_point": {"row": 111, "column": 15}, "end_point": {"row": 111, "column": 27}}, {"id": 175, "type": "field_expression", "text": "mPairs.end", "parent": 174, "children": [176], "start_point": {"row": 111, "column": 15}, "end_point": {"row": 111, "column": 25}}, {"id": 176, "type": "identifier", "text": "mPairs", "parent": 175, "children": [], "start_point": {"row": 111, "column": 15}, "end_point": {"row": 111, "column": 21}}, {"id": 177, "type": "argument_list", "text": "()", "parent": 174, "children": [], "start_point": {"row": 111, "column": 25}, "end_point": {"row": 111, "column": 27}}, {"id": 178, "type": "labeled_statement", "text": "std::list<SPolPair>::iterator erase(std::list<SPolPair>::iterator it) {\n return mPairs.erase(it);\n }", "parent": 12, "children": [179, 180, 194], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 121, "column": 5}}, {"id": 179, "type": "statement_identifier", "text": "std", "parent": 178, "children": [], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 7}}, {"id": 180, "type": "ERROR", "text": "::list<SPolPair>::iterator erase(std::list<SPolPair>:", "parent": 178, "children": [181, 185, 186, 187, 188, 189, 193], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 119, "column": 60}}, {"id": 181, "type": "binary_expression", "text": "list<SPolPair", "parent": 180, "children": [182, 183, 184], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 22}}, {"id": 182, "type": "identifier", "text": "list", "parent": 181, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 13}}, {"id": 183, "type": "<", "text": "<", "parent": 181, "children": [], "start_point": {"row": 119, "column": 13}, "end_point": {"row": 119, "column": 14}}, {"id": 184, "type": "identifier", "text": "SPolPair", "parent": 181, "children": [], "start_point": {"row": 119, "column": 14}, "end_point": {"row": 119, "column": 22}}, {"id": 185, "type": ">", "text": ">", "parent": 180, "children": [], "start_point": {"row": 119, "column": 22}, "end_point": {"row": 119, "column": 23}}, {"id": 186, "type": "type_identifier", "text": "iterator", "parent": 180, "children": [], "start_point": {"row": 119, "column": 25}, "end_point": {"row": 119, "column": 33}}, {"id": 187, "type": "identifier", "text": "erase", "parent": 180, "children": [], "start_point": {"row": 119, "column": 34}, "end_point": {"row": 119, "column": 39}}, {"id": 188, "type": "type_identifier", "text": "std", "parent": 180, "children": [], "start_point": {"row": 119, "column": 40}, "end_point": {"row": 119, "column": 43}}, {"id": 189, "type": "binary_expression", "text": "list<SPolPair", "parent": 180, "children": [190, 191, 192], "start_point": {"row": 119, "column": 45}, "end_point": {"row": 119, "column": 58}}, {"id": 190, "type": "identifier", "text": "list", "parent": 189, "children": [], "start_point": {"row": 119, "column": 45}, "end_point": {"row": 119, "column": 49}}, {"id": 191, "type": "<", "text": "<", "parent": 189, "children": [], "start_point": {"row": 119, "column": 49}, "end_point": {"row": 119, "column": 50}}, {"id": 192, "type": "identifier", "text": "SPolPair", "parent": 189, "children": [], "start_point": {"row": 119, "column": 50}, "end_point": {"row": 119, "column": 58}}, {"id": 193, "type": ">", "text": ">", "parent": 180, "children": [], "start_point": {"row": 119, "column": 58}, "end_point": {"row": 119, "column": 59}}, {"id": 194, "type": "ERROR", "text": "iterator it)", "parent": 178, "children": [195, 196], "start_point": {"row": 119, "column": 61}, "end_point": {"row": 119, "column": 73}}, {"id": 195, "type": "type_identifier", "text": "iterator", "parent": 194, "children": [], "start_point": {"row": 119, "column": 61}, "end_point": {"row": 119, "column": 69}}, {"id": 196, "type": "identifier", "text": "it", "parent": 194, "children": [], "start_point": {"row": 119, "column": 70}, "end_point": {"row": 119, "column": 72}}, {"id": 197, "type": "return_statement", "text": "return mPairs.erase(it);", "parent": 178, "children": [198], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 120, "column": 32}}, {"id": 198, "type": "call_expression", "text": "mPairs.erase(it)", "parent": 197, "children": [199, 202], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 31}}, {"id": 199, "type": "field_expression", "text": "mPairs.erase", "parent": 198, "children": [200, 201], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 27}}, {"id": 200, "type": "identifier", "text": "mPairs", "parent": 199, "children": [], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 21}}, {"id": 201, "type": "field_identifier", "text": "erase", "parent": 199, "children": [], "start_point": {"row": 120, "column": 22}, "end_point": {"row": 120, "column": 27}}, {"id": 202, "type": "argument_list", "text": "(it)", "parent": 198, "children": [203], "start_point": {"row": 120, "column": 27}, "end_point": {"row": 120, "column": 31}}, {"id": 203, "type": "identifier", "text": "it", "parent": 202, "children": [], "start_point": {"row": 120, "column": 28}, "end_point": {"row": 120, "column": 30}}, {"id": 204, "type": "ERROR", "text": "void print( std::ostream& os = std::cout )", "parent": 12, "children": [205, 206, 207, 210, 215], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 46}}, {"id": 205, "type": "primitive_type", "text": "void", "parent": 204, "children": [], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 8}}, {"id": 206, "type": "identifier", "text": "print", "parent": 204, "children": [], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 14}}, {"id": 207, "type": "parameter_declaration", "text": "std::ostream", "parent": 204, "children": [208, 209], "start_point": {"row": 123, "column": 16}, "end_point": {"row": 123, "column": 28}}, {"id": 208, "type": "type_identifier", "text": "std", "parent": 207, "children": [], "start_point": {"row": 123, "column": 16}, "end_point": {"row": 123, "column": 19}}, {"id": 209, "type": "identifier", "text": "ostream", "parent": 207, "children": [], "start_point": {"row": 123, "column": 21}, "end_point": {"row": 123, "column": 28}}, {"id": 210, "type": "assignment_expression", "text": "& os = std", "parent": 204, "children": [211, 213, 214], "start_point": {"row": 123, "column": 28}, "end_point": {"row": 123, "column": 38}}, {"id": 211, "type": "pointer_expression", "text": "& os", "parent": 210, "children": [212], "start_point": {"row": 123, "column": 28}, "end_point": {"row": 123, "column": 32}}, {"id": 212, "type": "identifier", "text": "os", "parent": 211, "children": [], "start_point": {"row": 123, "column": 30}, "end_point": {"row": 123, "column": 32}}, {"id": 213, "type": "=", "text": "=", "parent": 210, "children": [], "start_point": {"row": 123, "column": 33}, "end_point": {"row": 123, "column": 34}}, {"id": 214, "type": "identifier", "text": "std", "parent": 210, "children": [], "start_point": {"row": 123, "column": 35}, "end_point": {"row": 123, "column": 38}}, {"id": 215, "type": "identifier", "text": "cout", "parent": 204, "children": [], "start_point": {"row": 123, "column": 40}, "end_point": {"row": 123, "column": 44}}, {"id": 216, "type": "ERROR", "text": "for (const auto& p: mPairs) {\n\t\t\tp.print(os);", "parent": 12, "children": [217], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 126, "column": 15}}, {"id": 217, "type": "declaration", "text": "const auto& p: mPairs) {\n\t\t\tp.print(os);", "parent": 216, "children": [218, 220, 221, 224], "start_point": {"row": 125, "column": 7}, "end_point": {"row": 126, "column": 15}}, {"id": 218, "type": "storage_class_specifier", "text": "auto", "parent": 217, "children": [219], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 17}}, {"id": 219, "type": "auto", "text": "auto", "parent": 218, "children": [], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 17}}, {"id": 220, "type": "type_identifier", "text": "p", "parent": 217, "children": [], "start_point": {"row": 125, "column": 19}, "end_point": {"row": 125, "column": 20}}, {"id": 221, "type": "ERROR", "text": ": mPairs) {\n\t\t\tp.", "parent": 217, "children": [222, 223], "start_point": {"row": 125, "column": 20}, "end_point": {"row": 126, "column": 5}}, {"id": 222, "type": "identifier", "text": "mPairs", "parent": 221, "children": [], "start_point": {"row": 125, "column": 22}, "end_point": {"row": 125, "column": 28}}, {"id": 223, "type": "identifier", "text": "p", "parent": 221, "children": [], "start_point": {"row": 126, "column": 3}, "end_point": {"row": 126, "column": 4}}, {"id": 224, "type": "function_declarator", "text": "print(os)", "parent": 217, "children": [225, 226], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 14}}, {"id": 225, "type": "identifier", "text": "print", "parent": 224, "children": [], "start_point": {"row": 126, "column": 5}, "end_point": {"row": 126, "column": 10}}, {"id": 226, "type": "parameter_list", "text": "(os)", "parent": 224, "children": [227], "start_point": {"row": 126, "column": 10}, "end_point": {"row": 126, "column": 14}}, {"id": 227, "type": "parameter_declaration", "text": "os", "parent": 226, "children": [228], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 13}}, {"id": 228, "type": "type_identifier", "text": "os", "parent": 227, "children": [], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 13}}, {"id": 229, "type": "labeled_statement", "text": "private:\n std::list<SPolPair> mPairs;", "parent": 12, "children": [230], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 130, "column": 31}}, {"id": 230, "type": "labeled_statement", "text": "std::list<SPolPair> mPairs;", "parent": 229, "children": [231], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 31}}, {"id": 231, "type": "statement_identifier", "text": "std", "parent": 230, "children": [], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 130, "column": 7}}, {"id": 232, "type": "binary_expression", "text": "list<SPolPair> mPairs", "parent": 230, "children": [233, 237, 238], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 30}}, {"id": 233, "type": "binary_expression", "text": "list<SPolPair", "parent": 232, "children": [234, 235, 236], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 22}}, {"id": 234, "type": "identifier", "text": "list", "parent": 233, "children": [], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 13}}, {"id": 235, "type": "<", "text": "<", "parent": 233, "children": [], "start_point": {"row": 130, "column": 13}, "end_point": {"row": 130, "column": 14}}, {"id": 236, "type": "identifier", "text": "SPolPair", "parent": 233, "children": [], "start_point": {"row": 130, "column": 14}, "end_point": {"row": 130, "column": 22}}, {"id": 237, "type": ">", "text": ">", "parent": 232, "children": [], "start_point": {"row": 130, "column": 22}, "end_point": {"row": 130, "column": 23}}, {"id": 238, "type": "identifier", "text": "mPairs", "parent": 232, "children": [], "start_point": {"row": 130, "column": 24}, "end_point": {"row": 130, "column": 30}}]}, "node_categories": {"declarations": {"functions": [12, 26, 64, 77, 86, 88, 112, 131, 150, 169, 224], "variables": [29, 207, 217, 227], "classes": [218], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [16, 17, 38, 43, 47, 48, 52, 53, 58, 68, 69, 70, 81, 82, 91, 92, 97, 98, 105, 117, 118, 124, 136, 137, 143, 155, 156, 162, 174, 175, 181, 189, 198, 199, 211, 232, 233], "assignments": [210], "loops": [], "conditionals": [13, 14, 18, 20, 22, 25, 27, 30, 32, 34, 37, 39, 42, 44, 46, 49, 50, 54, 56, 59, 61, 63, 65, 71, 72, 74, 76, 78, 83, 84, 89, 93, 94, 99, 100, 103, 106, 108, 111, 113, 115, 119, 122, 125, 127, 130, 132, 134, 138, 141, 144, 146, 149, 151, 153, 157, 160, 163, 165, 168, 170, 172, 176, 179, 182, 184, 186, 187, 188, 190, 192, 195, 196, 200, 201, 203, 206, 208, 209, 212, 214, 215, 220, 222, 223, 225, 228, 231, 234, 236, 238], "returns": [67, 80, 96, 116, 135, 154, 173, 197], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "CriticalPairsEntry", "text_snippet": "namespace carl\n{\n\n/**\n * A list of SPol pairs which have to be checked by the Buchberger algorithm. "}, {"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "getSortedFirstLCM()"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "getFirst()"}, {"node_id": 86, "universal_type": "function", "name": "update", "text_snippet": "bool update() {\n mPairs.pop_front();\n return mPairs.empty();\n }"}, {"node_id": 88, "universal_type": "function", "name": "unknown", "text_snippet": "update()"}, {"node_id": 112, "universal_type": "function", "name": "unknown", "text_snippet": "getPairsBegin() const noexcept"}, {"node_id": 131, "universal_type": "function", "name": "unknown", "text_snippet": "getPairsEnd() const noexcept"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "getPairsBegin() noexcept"}, {"node_id": 169, "universal_type": "function", "name": "unknown", "text_snippet": "getPairsEnd() noexcept"}, {"node_id": 224, "universal_type": "function", "name": "unknown", "text_snippet": "print(os)"}], "class_declarations": [{"node_id": 218, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}], "import_statements": [{"node_id": 3, "text": "#include \"../../core/Monomial.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"SPolPair.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <list>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/*\n * GiNaCRA - GiNaC Real Algebra package\n * Copyright (C) 2010-2012 <NAME>, <NAME>, <NAME>\n *\n * This file is part of GiNaCRA.\n *\n * GiNaCRA is free software: you can redistribute it and/or modify\n * it 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 * GiNaCRA is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with GiNaCRA. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n\n/**\n * @file CriticalPairsEntry.h\n * @ingroup gb\n * @author <NAME>\n */\n#pragma once\n\n#include \"../../core/Monomial.h\"\n#include \"SPolPair.h\"\n\n#include <list>\n\nnamespace carl\n{\n\n/**\n * A list of SPol pairs which have to be checked by the Buchberger algorithm. \n * We keep the list sorted according the compare ordering on SPol Pairs.\n * @ingroup gb\n */\ntemplate<class Compare>\nclass CriticalPairsEntry\n{\npublic:\n\n\t/**\n\t * Saves the list of pairs and sorts them according the configured ordering.\n * @param pairs\n */\n explicit CriticalPairsEntry(std::list<SPolPair>&& pairs) : mPairs(std::move(pairs))\n {\n mPairs.sort(SPolPairCompare<Compare>());\n }\n\n\t/**\n\t * Get the LCM of the first element.\n * @return \n */\n const Monomial::Arg& getSortedFirstLCM() const\n {\n return mPairs.front().mLcm;\n }\n\n\t/**\n\t * Get the front of the list.\n * @return \n */\n const SPolPair& getFirst() const {\n return mPairs.front();\n }\n\n /**\n * Removes the first element.\n * @return empty()\n */\n bool update() {\n mPairs.pop_front();\n return mPairs.empty();\n }\n\n\t/**\n\t * The const iterator to the begin\n * @return begin of list\n */\n std::list<SPolPair>::const_iterator getPairsBegin() const noexcept {\n return mPairs.begin();\n }\n\n\t/**\n\t * The const iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::const_iterator getPairsEnd() const noexcept {\n return mPairs.end();\n }\n\n /**\n\t * The iterator to the end()\n * @return begin of list\n */\n\tstd::list<SPolPair>::iterator getPairsBegin() noexcept {\n return mPairs.begin();\n }\n\n\t/**\n\t * The iterator to the end()\n * @return end of list\n */\n std::list<SPolPair>::iterator getPairsEnd() noexcept {\n return mPairs.end();\n }\n\n\t/**\n\t * Removes the element at the iterator.\n * @param it The iterator to the element to be erased.\n * @return The next element.\n */\n std::list<SPolPair>::iterator erase(std::list<SPolPair>::iterator it) {\n return mPairs.erase(it);\n }\n\n void print( std::ostream& os = std::cout )\n {\n\t\tfor (const auto& p: mPairs) {\n\t\t\tp.print(os);\n\t\t}\n }\nprivate:\n std::list<SPolPair> mPairs;\n};\n}\n"}
80,976
c
/* The MIT License (MIT) Copyright (c) 2015 chenqi 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 CRSYNC_ONEPIECE_H #define CRSYNC_ONEPIECE_H #if defined __cplusplus extern "C" { #endif #include "crsync.h" #define MAGNET_SUFFIX ".magnet" #define MAGNET_TPLMAP_FORMAT "sssA(ss)" typedef struct res_t { char *name; char *hash; uint32_t size; uint32_t diff_size; struct res_t *next; } res_t; void res_free(res_t *res); typedef struct oldmagnet_t { char *curr_id; /* current magnet info id */ char *next_id; /* next magnet info id */ res_t *app; /* android apk hash */ res_t *res_list; /* resource list */ } oldmagnet_t; oldmagnet_t* onepiece_magnet_malloc(); void onepiece_magnet_free(oldmagnet_t *m); CRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet); CRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet); typedef struct onepiece_t onepiece_t; typedef enum { ONEPIECEOPT_STARTID = 0, ONEPIECEOPT_BASEURL, ONEPIECEOPT_LOCALAPP, ONEPIECEOPT_LOCALRES, ONEPIECEOPT_NEVERUPDATE, ONEPIECEOPT_XFER, } ONEPIECEoption; typedef enum { ONEPIECEINFO_MAGNET = 0, } ONEPIECEinfo; CRSYNCcode onepiece_init(); CRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value); oldmagnet_t* onepiece_getinfo_magnet(); CRSYNCcode onepiece_perform_query(); CRSYNCcode onepiece_perform_MatchApp(); CRSYNCcode onepiece_perform_PatchApp(); CRSYNCcode onepiece_perform_MatchRes(); CRSYNCcode onepiece_perform_PatchRes(); //CRSYNCcode onepiece_perform_updateapp(); //CRSYNCcode onepiece_perform_updateres(); void onepiece_cleanup(); #if defined __cplusplus } #endif #endif // CRSYNC_ONEPIECE_H
36.75
72
(translation_unit) "/*\nThe MIT License (MIT)\n\nCopyright (c) 2015 chenqi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n#ifndef CRSYNC_ONEPIECE_H\n#define CRSYNC_ONEPIECE_H\n\n#if defined __cplusplus\nextern "C" {\n#endif\n\n#include "crsync.h"\n\n#define MAGNET_SUFFIX ".magnet"\n#define MAGNET_TPLMAP_FORMAT "sssA(ss)"\n\ntypedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;\n\nvoid res_free(res_t *res);\n\ntypedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;\n\noldmagnet_t* onepiece_magnet_malloc();\nvoid onepiece_magnet_free(oldmagnet_t *m);\n\nCRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);\nCRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);\n\ntypedef struct onepiece_t onepiece_t;\n\ntypedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;\n\ntypedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;\n\nCRSYNCcode onepiece_init();\nCRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);\noldmagnet_t* onepiece_getinfo_magnet();\nCRSYNCcode onepiece_perform_query();\nCRSYNCcode onepiece_perform_MatchApp();\nCRSYNCcode onepiece_perform_PatchApp();\nCRSYNCcode onepiece_perform_MatchRes();\nCRSYNCcode onepiece_perform_PatchRes();\n//CRSYNCcode onepiece_perform_updateapp();\n//CRSYNCcode onepiece_perform_updateres();\nvoid onepiece_cleanup();\n\n#if defined __cplusplus\n}\n#endif\n\n#endif // CRSYNC_ONEPIECE_H\n" (comment) "/*\nThe MIT License (MIT)\n\nCopyright (c) 2015 chenqi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/" (preproc_ifdef) "#ifndef CRSYNC_ONEPIECE_H\n#define CRSYNC_ONEPIECE_H\n\n#if defined __cplusplus\nextern "C" {\n#endif\n\n#include "crsync.h"\n\n#define MAGNET_SUFFIX ".magnet"\n#define MAGNET_TPLMAP_FORMAT "sssA(ss)"\n\ntypedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;\n\nvoid res_free(res_t *res);\n\ntypedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;\n\noldmagnet_t* onepiece_magnet_malloc();\nvoid onepiece_magnet_free(oldmagnet_t *m);\n\nCRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);\nCRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);\n\ntypedef struct onepiece_t onepiece_t;\n\ntypedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;\n\ntypedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;\n\nCRSYNCcode onepiece_init();\nCRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);\noldmagnet_t* onepiece_getinfo_magnet();\nCRSYNCcode onepiece_perform_query();\nCRSYNCcode onepiece_perform_MatchApp();\nCRSYNCcode onepiece_perform_PatchApp();\nCRSYNCcode onepiece_perform_MatchRes();\nCRSYNCcode onepiece_perform_PatchRes();\n//CRSYNCcode onepiece_perform_updateapp();\n//CRSYNCcode onepiece_perform_updateres();\nvoid onepiece_cleanup();\n\n#if defined __cplusplus\n}\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "CRSYNC_ONEPIECE_H" (preproc_def) "#define CRSYNC_ONEPIECE_H\n" (#define) "#define" (identifier) "CRSYNC_ONEPIECE_H" (preproc_if) "#if defined __cplusplus\nextern "C" {\n#endif\n\n#include "crsync.h"\n\n#define MAGNET_SUFFIX ".magnet"\n#define MAGNET_TPLMAP_FORMAT "sssA(ss)"\n\ntypedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;\n\nvoid res_free(res_t *res);\n\ntypedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;\n\noldmagnet_t* onepiece_magnet_malloc();\nvoid onepiece_magnet_free(oldmagnet_t *m);\n\nCRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);\nCRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);\n\ntypedef struct onepiece_t onepiece_t;\n\ntypedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;\n\ntypedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;\n\nCRSYNCcode onepiece_init();\nCRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);\noldmagnet_t* onepiece_getinfo_magnet();\nCRSYNCcode onepiece_perform_query();\nCRSYNCcode onepiece_perform_MatchApp();\nCRSYNCcode onepiece_perform_PatchApp();\nCRSYNCcode onepiece_perform_MatchRes();\nCRSYNCcode onepiece_perform_PatchRes();\n//CRSYNCcode onepiece_perform_updateapp();\n//CRSYNCcode onepiece_perform_updateres();\nvoid onepiece_cleanup();\n\n#if defined __cplusplus\n}\n#endif" (#if) "#if" (preproc_defined) "defined __cplusplus" (defined) "defined" (identifier) "__cplusplus" ( ) "\n" (linkage_specification) "extern "C" {\n#endif\n\n#include "crsync.h"\n\n#define MAGNET_SUFFIX ".magnet"\n#define MAGNET_TPLMAP_FORMAT "sssA(ss)"\n\ntypedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;\n\nvoid res_free(res_t *res);\n\ntypedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;\n\noldmagnet_t* onepiece_magnet_malloc();\nvoid onepiece_magnet_free(oldmagnet_t *m);\n\nCRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);\nCRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);\n\ntypedef struct onepiece_t onepiece_t;\n\ntypedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;\n\ntypedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;\n\nCRSYNCcode onepiece_init();\nCRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);\noldmagnet_t* onepiece_getinfo_magnet();\nCRSYNCcode onepiece_perform_query();\nCRSYNCcode onepiece_perform_MatchApp();\nCRSYNCcode onepiece_perform_PatchApp();\nCRSYNCcode onepiece_perform_MatchRes();\nCRSYNCcode onepiece_perform_PatchRes();\n//CRSYNCcode onepiece_perform_updateapp();\n//CRSYNCcode onepiece_perform_updateres();\nvoid onepiece_cleanup();\n\n#if defined __cplusplus\n}" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration_list) "{\n#endif\n\n#include "crsync.h"\n\n#define MAGNET_SUFFIX ".magnet"\n#define MAGNET_TPLMAP_FORMAT "sssA(ss)"\n\ntypedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;\n\nvoid res_free(res_t *res);\n\ntypedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;\n\noldmagnet_t* onepiece_magnet_malloc();\nvoid onepiece_magnet_free(oldmagnet_t *m);\n\nCRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);\nCRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);\n\ntypedef struct onepiece_t onepiece_t;\n\ntypedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;\n\ntypedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;\n\nCRSYNCcode onepiece_init();\nCRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);\noldmagnet_t* onepiece_getinfo_magnet();\nCRSYNCcode onepiece_perform_query();\nCRSYNCcode onepiece_perform_MatchApp();\nCRSYNCcode onepiece_perform_PatchApp();\nCRSYNCcode onepiece_perform_MatchRes();\nCRSYNCcode onepiece_perform_PatchRes();\n//CRSYNCcode onepiece_perform_updateapp();\n//CRSYNCcode onepiece_perform_updateres();\nvoid onepiece_cleanup();\n\n#if defined __cplusplus\n}" ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (preproc_include) "#include "crsync.h"\n" (#include) "#include" (string_literal) ""crsync.h"" (") """ (string_content) "crsync.h" (") """ (preproc_def) "#define MAGNET_SUFFIX ".magnet"\n" (#define) "#define" (identifier) "MAGNET_SUFFIX" (preproc_arg) "".magnet"" (preproc_def) "#define MAGNET_TPLMAP_FORMAT "sssA(ss)"\n" (#define) "#define" (identifier) "MAGNET_TPLMAP_FORMAT" (preproc_arg) ""sssA(ss)"" (type_definition) "typedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;" (typedef) "typedef" (struct_specifier) "struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n}" (struct) "struct" (type_identifier) "res_t" (field_declaration_list) "{\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n}" ({) "{" (field_declaration) "char *name;" (primitive_type) "char" (pointer_declarator) "*name" (*) "*" (field_identifier) "name" (;) ";" (field_declaration) "char *hash;" (primitive_type) "char" (pointer_declarator) "*hash" (*) "*" (field_identifier) "hash" (;) ";" (field_declaration) "uint32_t size;" (primitive_type) "uint32_t" (field_identifier) "size" (;) ";" (field_declaration) "uint32_t diff_size;" (primitive_type) "uint32_t" (field_identifier) "diff_size" (;) ";" (field_declaration) "struct res_t *next;" (struct_specifier) "struct res_t" (struct) "struct" (type_identifier) "res_t" (pointer_declarator) "*next" (*) "*" (field_identifier) "next" (;) ";" (}) "}" (type_identifier) "res_t" (;) ";" (declaration) "void res_free(res_t *res);" (primitive_type) "void" (function_declarator) "res_free(res_t *res)" (identifier) "res_free" (parameter_list) "(res_t *res)" (() "(" (parameter_declaration) "res_t *res" (type_identifier) "res_t" (pointer_declarator) "*res" (*) "*" (identifier) "res" ()) ")" (;) ";" (type_definition) "typedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;" (typedef) "typedef" (struct_specifier) "struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n}" (struct) "struct" (type_identifier) "oldmagnet_t" (field_declaration_list) "{\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n}" ({) "{" (field_declaration) "char *curr_id;" (primitive_type) "char" (pointer_declarator) "*curr_id" (*) "*" (field_identifier) "curr_id" (;) ";" (comment) "/* current magnet info id */" (field_declaration) "char *next_id;" (primitive_type) "char" (pointer_declarator) "*next_id" (*) "*" (field_identifier) "next_id" (;) ";" (comment) "/* next magnet info id */" (field_declaration) "res_t *app;" (type_identifier) "res_t" (pointer_declarator) "*app" (*) "*" (field_identifier) "app" (;) ";" (comment) "/* android apk hash */" (field_declaration) "res_t *res_list;" (type_identifier) "res_t" (pointer_declarator) "*res_list" (*) "*" (field_identifier) "res_list" (;) ";" (comment) "/* resource list */" (}) "}" (type_identifier) "oldmagnet_t" (;) ";" (declaration) "oldmagnet_t* onepiece_magnet_malloc();" (type_identifier) "oldmagnet_t" (pointer_declarator) "* onepiece_magnet_malloc()" (*) "*" (function_declarator) "onepiece_magnet_malloc()" (identifier) "onepiece_magnet_malloc" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void onepiece_magnet_free(oldmagnet_t *m);" (primitive_type) "void" (function_declarator) "onepiece_magnet_free(oldmagnet_t *m)" (identifier) "onepiece_magnet_free" (parameter_list) "(oldmagnet_t *m)" (() "(" (parameter_declaration) "oldmagnet_t *m" (type_identifier) "oldmagnet_t" (pointer_declarator) "*m" (*) "*" (identifier) "m" ()) ")" (;) ";" (declaration) "CRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);" (type_identifier) "CRSYNCcode" (function_declarator) "onepiece_magnet_load(const char *filename, oldmagnet_t *magnet)" (identifier) "onepiece_magnet_load" (parameter_list) "(const char *filename, oldmagnet_t *magnet)" (() "(" (parameter_declaration) "const char *filename" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*filename" (*) "*" (identifier) "filename" (,) "," (parameter_declaration) "oldmagnet_t *magnet" (type_identifier) "oldmagnet_t" (pointer_declarator) "*magnet" (*) "*" (identifier) "magnet" ()) ")" (;) ";" (declaration) "CRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);" (type_identifier) "CRSYNCcode" (function_declarator) "onepiece_magnet_save(const char *filename, oldmagnet_t *magnet)" (identifier) "onepiece_magnet_save" (parameter_list) "(const char *filename, oldmagnet_t *magnet)" (() "(" (parameter_declaration) "const char *filename" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*filename" (*) "*" (identifier) "filename" (,) "," (parameter_declaration) "oldmagnet_t *magnet" (type_identifier) "oldmagnet_t" (pointer_declarator) "*magnet" (*) "*" (identifier) "magnet" ()) ")" (;) ";" (type_definition) "typedef struct onepiece_t onepiece_t;" (typedef) "typedef" (struct_specifier) "struct onepiece_t" (struct) "struct" (type_identifier) "onepiece_t" (type_identifier) "onepiece_t" (;) ";" (type_definition) "typedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;" (typedef) "typedef" (enum_specifier) "enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n}" (enum) "enum" (enumerator_list) "{\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n}" ({) "{" (enumerator) "ONEPIECEOPT_STARTID = 0" (identifier) "ONEPIECEOPT_STARTID" (=) "=" (number_literal) "0" (,) "," (enumerator) "ONEPIECEOPT_BASEURL" (identifier) "ONEPIECEOPT_BASEURL" (,) "," (enumerator) "ONEPIECEOPT_LOCALAPP" (identifier) "ONEPIECEOPT_LOCALAPP" (,) "," (enumerator) "ONEPIECEOPT_LOCALRES" (identifier) "ONEPIECEOPT_LOCALRES" (,) "," (enumerator) "ONEPIECEOPT_NEVERUPDATE" (identifier) "ONEPIECEOPT_NEVERUPDATE" (,) "," (enumerator) "ONEPIECEOPT_XFER" (identifier) "ONEPIECEOPT_XFER" (,) "," (}) "}" (type_identifier) "ONEPIECEoption" (;) ";" (type_definition) "typedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;" (typedef) "typedef" (enum_specifier) "enum {\n ONEPIECEINFO_MAGNET = 0,\n}" (enum) "enum" (enumerator_list) "{\n ONEPIECEINFO_MAGNET = 0,\n}" ({) "{" (enumerator) "ONEPIECEINFO_MAGNET = 0" (identifier) "ONEPIECEINFO_MAGNET" (=) "=" (number_literal) "0" (,) "," (}) "}" (type_identifier) "ONEPIECEinfo" (;) ";" (declaration) "CRSYNCcode onepiece_init();" (type_identifier) "CRSYNCcode" (function_declarator) "onepiece_init()" (identifier) "onepiece_init" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "CRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);" (type_identifier) "CRSYNCcode" (function_declarator) "onepiece_setopt(ONEPIECEoption opt, void *value)" (identifier) "onepiece_setopt" (parameter_list) "(ONEPIECEoption opt, void *value)" (() "(" (parameter_declaration) "ONEPIECEoption opt" (type_identifier) "ONEPIECEoption" (identifier) "opt" (,) "," (parameter_declaration) "void *value" (primitive_type) "void" (pointer_declarator) "*value" (*) "*" (identifier) "value" ()) ")" (;) ";" (declaration) "oldmagnet_t* onepiece_getinfo_magnet();" (type_identifier) "oldmagnet_t" (pointer_declarator) "* onepiece_getinfo_magnet()" (*) "*" (function_declarator) "onepiece_getinfo_magnet()" (identifier) "onepiece_getinfo_magnet" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "CRSYNCcode onepiece_perform_query();" (type_identifier) "CRSYNCcode" (function_declarator) "onepiece_perform_query()" (identifier) "onepiece_perform_query" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "CRSYNCcode onepiece_perform_MatchApp();" (type_identifier) "CRSYNCcode" (function_declarator) "onepiece_perform_MatchApp()" (identifier) "onepiece_perform_MatchApp" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "CRSYNCcode onepiece_perform_PatchApp();" (type_identifier) "CRSYNCcode" (function_declarator) "onepiece_perform_PatchApp()" (identifier) "onepiece_perform_PatchApp" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "CRSYNCcode onepiece_perform_MatchRes();" (type_identifier) "CRSYNCcode" (function_declarator) "onepiece_perform_MatchRes()" (identifier) "onepiece_perform_MatchRes" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "CRSYNCcode onepiece_perform_PatchRes();" (type_identifier) "CRSYNCcode" (function_declarator) "onepiece_perform_PatchRes()" (identifier) "onepiece_perform_PatchRes" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//CRSYNCcode onepiece_perform_updateapp();" (comment) "//CRSYNCcode onepiece_perform_updateres();" (declaration) "void onepiece_cleanup();" (primitive_type) "void" (function_declarator) "onepiece_cleanup()" (identifier) "onepiece_cleanup" (parameter_list) "()" (() "(" ()) ")" (;) ";" (preproc_if) "#if defined __cplusplus\n" (#if) "#if" (preproc_defined) "defined __cplusplus" (defined) "defined" (identifier) "__cplusplus" ( ) "\n" (#endif) "" (}) "}" (#endif) "#endif" (#endif) "#endif" (comment) "// CRSYNC_ONEPIECE_H"
338
0
{"language": "c", "success": true, "metadata": {"lines": 72, "avg_line_length": 36.75, "nodes": 240, "errors": 0, "source_hash": "ebbfccaa89be0569e7e0967ad771b0ce4c0b0d4448b65a095f4bf1949306e925", "categorized_nodes": 159}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef CRSYNC_ONEPIECE_H\n#define CRSYNC_ONEPIECE_H\n\n#if defined __cplusplus\nextern \"C\" {\n#endif\n\n#include \"crsync.h\"\n\n#define MAGNET_SUFFIX \".magnet\"\n#define MAGNET_TPLMAP_FORMAT \"sssA(ss)\"\n\ntypedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;\n\nvoid res_free(res_t *res);\n\ntypedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;\n\noldmagnet_t* onepiece_magnet_malloc();\nvoid onepiece_magnet_free(oldmagnet_t *m);\n\nCRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);\nCRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);\n\ntypedef struct onepiece_t onepiece_t;\n\ntypedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;\n\ntypedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;\n\nCRSYNCcode onepiece_init();\nCRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);\noldmagnet_t* onepiece_getinfo_magnet();\nCRSYNCcode onepiece_perform_query();\nCRSYNCcode onepiece_perform_MatchApp();\nCRSYNCcode onepiece_perform_PatchApp();\nCRSYNCcode onepiece_perform_MatchRes();\nCRSYNCcode onepiece_perform_PatchRes();\n//CRSYNCcode onepiece_perform_updateapp();\n//CRSYNCcode onepiece_perform_updateres();\nvoid onepiece_cleanup();\n\n#if defined __cplusplus\n}\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 239], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 89, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 2, "type": "identifier", "text": "CRSYNC_ONEPIECE_H", "parent": 0, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define CRSYNC_ONEPIECE_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 5, "type": "identifier", "text": "CRSYNC_ONEPIECE_H", "parent": 3, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 25}}, {"id": 6, "type": "preproc_if", "text": "#if defined __cplusplus\nextern \"C\" {\n#endif\n\n#include \"crsync.h\"\n\n#define MAGNET_SUFFIX \".magnet\"\n#define MAGNET_TPLMAP_FORMAT \"sssA(ss)\"\n\ntypedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;\n\nvoid res_free(res_t *res);\n\ntypedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;\n\noldmagnet_t* onepiece_magnet_malloc();\nvoid onepiece_magnet_free(oldmagnet_t *m);\n\nCRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);\nCRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);\n\ntypedef struct onepiece_t onepiece_t;\n\ntypedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;\n\ntypedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;\n\nCRSYNCcode onepiece_init();\nCRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);\noldmagnet_t* onepiece_getinfo_magnet();\nCRSYNCcode onepiece_perform_query();\nCRSYNCcode onepiece_perform_MatchApp();\nCRSYNCcode onepiece_perform_PatchApp();\nCRSYNCcode onepiece_perform_MatchRes();\nCRSYNCcode onepiece_perform_PatchRes();\n//CRSYNCcode onepiece_perform_updateapp();\n//CRSYNCcode onepiece_perform_updateres();\nvoid onepiece_cleanup();\n\n#if defined __cplusplus\n}\n#endif", "parent": 0, "children": [7, 8, 11, 12, 238], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 87, "column": 6}}, {"id": 7, "type": "#if", "text": "#if", "parent": 6, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 3}}, {"id": 8, "type": "preproc_defined", "text": "defined __cplusplus", "parent": 6, "children": [9, 10], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 23}}, {"id": 9, "type": "defined", "text": "defined", "parent": 8, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 11}}, {"id": 10, "type": "identifier", "text": "__cplusplus", "parent": 8, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 23}}, {"id": 11, "type": "\n", "text": "\n", "parent": 6, "children": [], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 27, "column": 0}}, {"id": 12, "type": "linkage_specification", "text": "extern \"C\" {\n#endif\n\n#include \"crsync.h\"\n\n#define MAGNET_SUFFIX \".magnet\"\n#define MAGNET_TPLMAP_FORMAT \"sssA(ss)\"\n\ntypedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;\n\nvoid res_free(res_t *res);\n\ntypedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;\n\noldmagnet_t* onepiece_magnet_malloc();\nvoid onepiece_magnet_free(oldmagnet_t *m);\n\nCRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);\nCRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);\n\ntypedef struct onepiece_t onepiece_t;\n\ntypedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;\n\ntypedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;\n\nCRSYNCcode onepiece_init();\nCRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);\noldmagnet_t* onepiece_getinfo_magnet();\nCRSYNCcode onepiece_perform_query();\nCRSYNCcode onepiece_perform_MatchApp();\nCRSYNCcode onepiece_perform_PatchApp();\nCRSYNCcode onepiece_perform_MatchRes();\nCRSYNCcode onepiece_perform_PatchRes();\n//CRSYNCcode onepiece_perform_updateapp();\n//CRSYNCcode onepiece_perform_updateres();\nvoid onepiece_cleanup();\n\n#if defined __cplusplus\n}", "parent": 6, "children": [13, 14], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 86, "column": 1}}, {"id": 13, "type": "extern", "text": "extern", "parent": 12, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 14, "type": "string_literal", "text": "\"C\"", "parent": 12, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 10}}, {"id": 15, "type": "preproc_call", "text": "#endif\n", "parent": 12, "children": [16], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 16, "type": "preproc_directive", "text": "#endif", "parent": 15, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 17, "type": "preproc_include", "text": "#include \"crsync.h\"\n", "parent": 12, "children": [18, 19], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 18, "type": "#include", "text": "#include", "parent": 17, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 19, "type": "string_literal", "text": "\"crsync.h\"", "parent": 17, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 19}}, {"id": 20, "type": "preproc_def", "text": "#define MAGNET_SUFFIX \".magnet\"\n", "parent": 12, "children": [21, 22, 23], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 21, "type": "#define", "text": "#define", "parent": 20, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 22, "type": "identifier", "text": "MAGNET_SUFFIX", "parent": 20, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 21}}, {"id": 23, "type": "preproc_arg", "text": "\".magnet\"", "parent": 20, "children": [], "start_point": {"row": 32, "column": 22}, "end_point": {"row": 32, "column": 31}}, {"id": 24, "type": "preproc_def", "text": "#define MAGNET_TPLMAP_FORMAT \"sssA(ss)\"\n", "parent": 12, "children": [25, 26, 27], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 25, "type": "#define", "text": "#define", "parent": 24, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 26, "type": "identifier", "text": "MAGNET_TPLMAP_FORMAT", "parent": 24, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 28}}, {"id": 27, "type": "preproc_arg", "text": "\"sssA(ss)\"", "parent": 24, "children": [], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 39}}, {"id": 28, "type": "type_definition", "text": "typedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;", "parent": 12, "children": [29, 30, 56], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 41, "column": 8}}, {"id": 29, "type": "typedef", "text": "typedef", "parent": 28, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 30, "type": "struct_specifier", "text": "struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n}", "parent": 28, "children": [31, 32], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 41, "column": 1}}, {"id": 31, "type": "struct", "text": "struct", "parent": 30, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 14}}, {"id": 32, "type": "type_identifier", "text": "res_t", "parent": 30, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 20}}, {"id": 33, "type": "field_declaration", "text": "char *name;", "parent": 30, "children": [34, 35], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 26}}, {"id": 34, "type": "primitive_type", "text": "char", "parent": 33, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 35, "type": "pointer_declarator", "text": "*name", "parent": 33, "children": [36, 37], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 25}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 21}}, {"id": 37, "type": "field_identifier", "text": "name", "parent": 35, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 25}}, {"id": 38, "type": "field_declaration", "text": "char *hash;", "parent": 30, "children": [39, 40], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 26}}, {"id": 39, "type": "primitive_type", "text": "char", "parent": 38, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 8}}, {"id": 40, "type": "pointer_declarator", "text": "*hash", "parent": 38, "children": [41, 42], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 25}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 21}}, {"id": 42, "type": "field_identifier", "text": "hash", "parent": 40, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 25}}, {"id": 43, "type": "field_declaration", "text": "uint32_t size;", "parent": 30, "children": [44, 45], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 25}}, {"id": 44, "type": "primitive_type", "text": "uint32_t", "parent": 43, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 12}}, {"id": 45, "type": "field_identifier", "text": "size", "parent": 43, "children": [], "start_point": {"row": 38, "column": 20}, "end_point": {"row": 38, "column": 24}}, {"id": 46, "type": "field_declaration", "text": "uint32_t diff_size;", "parent": 30, "children": [47, 48], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 30}}, {"id": 47, "type": "primitive_type", "text": "uint32_t", "parent": 46, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 12}}, {"id": 48, "type": "field_identifier", "text": "diff_size", "parent": 46, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 29}}, {"id": 49, "type": "field_declaration", "text": "struct res_t *next;", "parent": 30, "children": [50, 53], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 26}}, {"id": 50, "type": "struct_specifier", "text": "struct res_t", "parent": 49, "children": [51, 52], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 16}}, {"id": 51, "type": "struct", "text": "struct", "parent": 50, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 10}}, {"id": 52, "type": "type_identifier", "text": "res_t", "parent": 50, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 16}}, {"id": 53, "type": "pointer_declarator", "text": "*next", "parent": 49, "children": [54, 55], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 25}}, {"id": 54, "type": "*", "text": "*", "parent": 53, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 21}}, {"id": 55, "type": "field_identifier", "text": "next", "parent": 53, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 25}}, {"id": 56, "type": "type_identifier", "text": "res_t", "parent": 28, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 7}}, {"id": 57, "type": "declaration", "text": "void res_free(res_t *res);", "parent": 12, "children": [58, 59], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 26}}, {"id": 58, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 4}}, {"id": 59, "type": "function_declarator", "text": "res_free(res_t *res)", "parent": 57, "children": [60, 61], "start_point": {"row": 43, "column": 5}, "end_point": {"row": 43, "column": 25}}, {"id": 60, "type": "identifier", "text": "res_free", "parent": 59, "children": [], "start_point": {"row": 43, "column": 5}, "end_point": {"row": 43, "column": 13}}, {"id": 61, "type": "parameter_list", "text": "(res_t *res)", "parent": 59, "children": [62], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 25}}, {"id": 62, "type": "parameter_declaration", "text": "res_t *res", "parent": 61, "children": [63, 64], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 24}}, {"id": 63, "type": "type_identifier", "text": "res_t", "parent": 62, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 19}}, {"id": 64, "type": "pointer_declarator", "text": "*res", "parent": 62, "children": [65, 66], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 24}}, {"id": 65, "type": "*", "text": "*", "parent": 64, "children": [], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 21}}, {"id": 66, "type": "identifier", "text": "res", "parent": 64, "children": [], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 24}}, {"id": 67, "type": "type_definition", "text": "typedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;", "parent": 12, "children": [68, 69, 92], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 50, "column": 14}}, {"id": 68, "type": "typedef", "text": "typedef", "parent": 67, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 7}}, {"id": 69, "type": "struct_specifier", "text": "struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n}", "parent": 67, "children": [70, 71], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 50, "column": 1}}, {"id": 70, "type": "struct", "text": "struct", "parent": 69, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 14}}, {"id": 71, "type": "type_identifier", "text": "oldmagnet_t", "parent": 69, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 26}}, {"id": 72, "type": "field_declaration", "text": "char *curr_id;", "parent": 69, "children": [73, 74], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 21}}, {"id": 73, "type": "primitive_type", "text": "char", "parent": 72, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 8}}, {"id": 74, "type": "pointer_declarator", "text": "*curr_id", "parent": 72, "children": [75, 76], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 20}}, {"id": 75, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 13}}, {"id": 76, "type": "field_identifier", "text": "curr_id", "parent": 74, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 20}}, {"id": 77, "type": "field_declaration", "text": "char *next_id;", "parent": 69, "children": [78, 79], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 21}}, {"id": 78, "type": "primitive_type", "text": "char", "parent": 77, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 8}}, {"id": 79, "type": "pointer_declarator", "text": "*next_id", "parent": 77, "children": [80, 81], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 20}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 13}}, {"id": 81, "type": "field_identifier", "text": "next_id", "parent": 79, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 20}}, {"id": 82, "type": "field_declaration", "text": "res_t *app;", "parent": 69, "children": [83, 84], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 17}}, {"id": 83, "type": "type_identifier", "text": "res_t", "parent": 82, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 9}}, {"id": 84, "type": "pointer_declarator", "text": "*app", "parent": 82, "children": [85, 86], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 16}}, {"id": 85, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 13}}, {"id": 86, "type": "field_identifier", "text": "app", "parent": 84, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 16}}, {"id": 87, "type": "field_declaration", "text": "res_t *res_list;", "parent": 69, "children": [88, 89], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 22}}, {"id": 88, "type": "type_identifier", "text": "res_t", "parent": 87, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 9}}, {"id": 89, "type": "pointer_declarator", "text": "*res_list", "parent": 87, "children": [90, 91], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 21}}, {"id": 90, "type": "*", "text": "*", "parent": 89, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 13}}, {"id": 91, "type": "field_identifier", "text": "res_list", "parent": 89, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 21}}, {"id": 92, "type": "type_identifier", "text": "oldmagnet_t", "parent": 67, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 13}}, {"id": 93, "type": "declaration", "text": "oldmagnet_t* onepiece_magnet_malloc();", "parent": 12, "children": [94, 95], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 38}}, {"id": 94, "type": "type_identifier", "text": "oldmagnet_t", "parent": 93, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 11}}, {"id": 95, "type": "pointer_declarator", "text": "* onepiece_magnet_malloc()", "parent": 93, "children": [96, 97], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 37}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 12}}, {"id": 97, "type": "function_declarator", "text": "onepiece_magnet_malloc()", "parent": 95, "children": [98, 99], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 37}}, {"id": 98, "type": "identifier", "text": "onepiece_magnet_malloc", "parent": 97, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 35}}, {"id": 99, "type": "parameter_list", "text": "()", "parent": 97, "children": [], "start_point": {"row": 52, "column": 35}, "end_point": {"row": 52, "column": 37}}, {"id": 100, "type": "declaration", "text": "void onepiece_magnet_free(oldmagnet_t *m);", "parent": 12, "children": [101, 102], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 42}}, {"id": 101, "type": "primitive_type", "text": "void", "parent": 100, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 4}}, {"id": 102, "type": "function_declarator", "text": "onepiece_magnet_free(oldmagnet_t *m)", "parent": 100, "children": [103, 104], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 41}}, {"id": 103, "type": "identifier", "text": "onepiece_magnet_free", "parent": 102, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 25}}, {"id": 104, "type": "parameter_list", "text": "(oldmagnet_t *m)", "parent": 102, "children": [105], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 41}}, {"id": 105, "type": "parameter_declaration", "text": "oldmagnet_t *m", "parent": 104, "children": [106, 107], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 40}}, {"id": 106, "type": "type_identifier", "text": "oldmagnet_t", "parent": 105, "children": [], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 37}}, {"id": 107, "type": "pointer_declarator", "text": "*m", "parent": 105, "children": [108, 109], "start_point": {"row": 53, "column": 38}, "end_point": {"row": 53, "column": 40}}, {"id": 108, "type": "*", "text": "*", "parent": 107, "children": [], "start_point": {"row": 53, "column": 38}, "end_point": {"row": 53, "column": 39}}, {"id": 109, "type": "identifier", "text": "m", "parent": 107, "children": [], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 40}}, {"id": 110, "type": "declaration", "text": "CRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);", "parent": 12, "children": [111, 112], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 75}}, {"id": 111, "type": "type_identifier", "text": "CRSYNCcode", "parent": 110, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 10}}, {"id": 112, "type": "function_declarator", "text": "onepiece_magnet_load(const char *filename, oldmagnet_t *magnet)", "parent": 110, "children": [113, 114], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 74}}, {"id": 113, "type": "identifier", "text": "onepiece_magnet_load", "parent": 112, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 31}}, {"id": 114, "type": "parameter_list", "text": "(const char *filename, oldmagnet_t *magnet)", "parent": 112, "children": [115, 120], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 74}}, {"id": 115, "type": "parameter_declaration", "text": "const char *filename", "parent": 114, "children": [116, 117], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 52}}, {"id": 116, "type": "primitive_type", "text": "char", "parent": 115, "children": [], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 42}}, {"id": 117, "type": "pointer_declarator", "text": "*filename", "parent": 115, "children": [118, 119], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 52}}, {"id": 118, "type": "*", "text": "*", "parent": 117, "children": [], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 44}}, {"id": 119, "type": "identifier", "text": "filename", "parent": 117, "children": [], "start_point": {"row": 55, "column": 44}, "end_point": {"row": 55, "column": 52}}, {"id": 120, "type": "parameter_declaration", "text": "oldmagnet_t *magnet", "parent": 114, "children": [121, 122], "start_point": {"row": 55, "column": 54}, "end_point": {"row": 55, "column": 73}}, {"id": 121, "type": "type_identifier", "text": "oldmagnet_t", "parent": 120, "children": [], "start_point": {"row": 55, "column": 54}, "end_point": {"row": 55, "column": 65}}, {"id": 122, "type": "pointer_declarator", "text": "*magnet", "parent": 120, "children": [123, 124], "start_point": {"row": 55, "column": 66}, "end_point": {"row": 55, "column": 73}}, {"id": 123, "type": "*", "text": "*", "parent": 122, "children": [], "start_point": {"row": 55, "column": 66}, "end_point": {"row": 55, "column": 67}}, {"id": 124, "type": "identifier", "text": "magnet", "parent": 122, "children": [], "start_point": {"row": 55, "column": 67}, "end_point": {"row": 55, "column": 73}}, {"id": 125, "type": "declaration", "text": "CRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);", "parent": 12, "children": [126, 127], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 75}}, {"id": 126, "type": "type_identifier", "text": "CRSYNCcode", "parent": 125, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 10}}, {"id": 127, "type": "function_declarator", "text": "onepiece_magnet_save(const char *filename, oldmagnet_t *magnet)", "parent": 125, "children": [128, 129], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 74}}, {"id": 128, "type": "identifier", "text": "onepiece_magnet_save", "parent": 127, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 31}}, {"id": 129, "type": "parameter_list", "text": "(const char *filename, oldmagnet_t *magnet)", "parent": 127, "children": [130, 135], "start_point": {"row": 56, "column": 31}, "end_point": {"row": 56, "column": 74}}, {"id": 130, "type": "parameter_declaration", "text": "const char *filename", "parent": 129, "children": [131, 132], "start_point": {"row": 56, "column": 32}, "end_point": {"row": 56, "column": 52}}, {"id": 131, "type": "primitive_type", "text": "char", "parent": 130, "children": [], "start_point": {"row": 56, "column": 38}, "end_point": {"row": 56, "column": 42}}, {"id": 132, "type": "pointer_declarator", "text": "*filename", "parent": 130, "children": [133, 134], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 52}}, {"id": 133, "type": "*", "text": "*", "parent": 132, "children": [], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 44}}, {"id": 134, "type": "identifier", "text": "filename", "parent": 132, "children": [], "start_point": {"row": 56, "column": 44}, "end_point": {"row": 56, "column": 52}}, {"id": 135, "type": "parameter_declaration", "text": "oldmagnet_t *magnet", "parent": 129, "children": [136, 137], "start_point": {"row": 56, "column": 54}, "end_point": {"row": 56, "column": 73}}, {"id": 136, "type": "type_identifier", "text": "oldmagnet_t", "parent": 135, "children": [], "start_point": {"row": 56, "column": 54}, "end_point": {"row": 56, "column": 65}}, {"id": 137, "type": "pointer_declarator", "text": "*magnet", "parent": 135, "children": [138, 139], "start_point": {"row": 56, "column": 66}, "end_point": {"row": 56, "column": 73}}, {"id": 138, "type": "*", "text": "*", "parent": 137, "children": [], "start_point": {"row": 56, "column": 66}, "end_point": {"row": 56, "column": 67}}, {"id": 139, "type": "identifier", "text": "magnet", "parent": 137, "children": [], "start_point": {"row": 56, "column": 67}, "end_point": {"row": 56, "column": 73}}, {"id": 140, "type": "type_definition", "text": "typedef struct onepiece_t onepiece_t;", "parent": 12, "children": [141, 142, 145], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 37}}, {"id": 141, "type": "typedef", "text": "typedef", "parent": 140, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 7}}, {"id": 142, "type": "struct_specifier", "text": "struct onepiece_t", "parent": 140, "children": [143, 144], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 25}}, {"id": 143, "type": "struct", "text": "struct", "parent": 142, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 14}}, {"id": 144, "type": "type_identifier", "text": "onepiece_t", "parent": 142, "children": [], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 25}}, {"id": 145, "type": "type_identifier", "text": "onepiece_t", "parent": 140, "children": [], "start_point": {"row": 58, "column": 26}, "end_point": {"row": 58, "column": 36}}, {"id": 146, "type": "type_definition", "text": "typedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;", "parent": 12, "children": [147, 148, 165], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 67, "column": 17}}, {"id": 147, "type": "typedef", "text": "typedef", "parent": 146, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 7}}, {"id": 148, "type": "enum_specifier", "text": "enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n}", "parent": 146, "children": [149, 150], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 67, "column": 1}}, {"id": 149, "type": "enum", "text": "enum", "parent": 148, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 12}}, {"id": 150, "type": "enumerator_list", "text": "{\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n}", "parent": 148, "children": [151, 155, 157, 159, 161, 163], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 67, "column": 1}}, {"id": 151, "type": "enumerator", "text": "ONEPIECEOPT_STARTID = 0", "parent": 150, "children": [152, 153, 154], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 27}}, {"id": 152, "type": "identifier", "text": "ONEPIECEOPT_STARTID", "parent": 151, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 23}}, {"id": 153, "type": "=", "text": "=", "parent": 151, "children": [], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 25}}, {"id": 154, "type": "number_literal", "text": "0", "parent": 151, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 27}}, {"id": 155, "type": "enumerator", "text": "ONEPIECEOPT_BASEURL", "parent": 150, "children": [156], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 23}}, {"id": 156, "type": "identifier", "text": "ONEPIECEOPT_BASEURL", "parent": 155, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 23}}, {"id": 157, "type": "enumerator", "text": "ONEPIECEOPT_LOCALAPP", "parent": 150, "children": [158], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 24}}, {"id": 158, "type": "identifier", "text": "ONEPIECEOPT_LOCALAPP", "parent": 157, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 24}}, {"id": 159, "type": "enumerator", "text": "ONEPIECEOPT_LOCALRES", "parent": 150, "children": [160], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 24}}, {"id": 160, "type": "identifier", "text": "ONEPIECEOPT_LOCALRES", "parent": 159, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 24}}, {"id": 161, "type": "enumerator", "text": "ONEPIECEOPT_NEVERUPDATE", "parent": 150, "children": [162], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 27}}, {"id": 162, "type": "identifier", "text": "ONEPIECEOPT_NEVERUPDATE", "parent": 161, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 27}}, {"id": 163, "type": "enumerator", "text": "ONEPIECEOPT_XFER", "parent": 150, "children": [164], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 20}}, {"id": 164, "type": "identifier", "text": "ONEPIECEOPT_XFER", "parent": 163, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 20}}, {"id": 165, "type": "type_identifier", "text": "ONEPIECEoption", "parent": 146, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 16}}, {"id": 166, "type": "type_definition", "text": "typedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;", "parent": 12, "children": [167, 168, 175], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 71, "column": 15}}, {"id": 167, "type": "typedef", "text": "typedef", "parent": 166, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 7}}, {"id": 168, "type": "enum_specifier", "text": "enum {\n ONEPIECEINFO_MAGNET = 0,\n}", "parent": 166, "children": [169, 170], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 71, "column": 1}}, {"id": 169, "type": "enum", "text": "enum", "parent": 168, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 12}}, {"id": 170, "type": "enumerator_list", "text": "{\n ONEPIECEINFO_MAGNET = 0,\n}", "parent": 168, "children": [171], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 71, "column": 1}}, {"id": 171, "type": "enumerator", "text": "ONEPIECEINFO_MAGNET = 0", "parent": 170, "children": [172, 173, 174], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 27}}, {"id": 172, "type": "identifier", "text": "ONEPIECEINFO_MAGNET", "parent": 171, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 23}}, {"id": 173, "type": "=", "text": "=", "parent": 171, "children": [], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 70, "column": 25}}, {"id": 174, "type": "number_literal", "text": "0", "parent": 171, "children": [], "start_point": {"row": 70, "column": 26}, "end_point": {"row": 70, "column": 27}}, {"id": 175, "type": "type_identifier", "text": "ONEPIECEinfo", "parent": 166, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 14}}, {"id": 176, "type": "declaration", "text": "CRSYNCcode onepiece_init();", "parent": 12, "children": [177, 178], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 27}}, {"id": 177, "type": "type_identifier", "text": "CRSYNCcode", "parent": 176, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 10}}, {"id": 178, "type": "function_declarator", "text": "onepiece_init()", "parent": 176, "children": [179, 180], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 26}}, {"id": 179, "type": "identifier", "text": "onepiece_init", "parent": 178, "children": [], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 24}}, {"id": 180, "type": "parameter_list", "text": "()", "parent": 178, "children": [], "start_point": {"row": 73, "column": 24}, "end_point": {"row": 73, "column": 26}}, {"id": 181, "type": "declaration", "text": "CRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);", "parent": 12, "children": [182, 183], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 60}}, {"id": 182, "type": "type_identifier", "text": "CRSYNCcode", "parent": 181, "children": [], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 10}}, {"id": 183, "type": "function_declarator", "text": "onepiece_setopt(ONEPIECEoption opt, void *value)", "parent": 181, "children": [184, 185], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 59}}, {"id": 184, "type": "identifier", "text": "onepiece_setopt", "parent": 183, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 26}}, {"id": 185, "type": "parameter_list", "text": "(ONEPIECEoption opt, void *value)", "parent": 183, "children": [186, 189], "start_point": {"row": 74, "column": 26}, "end_point": {"row": 74, "column": 59}}, {"id": 186, "type": "parameter_declaration", "text": "ONEPIECEoption opt", "parent": 185, "children": [187, 188], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 45}}, {"id": 187, "type": "type_identifier", "text": "ONEPIECEoption", "parent": 186, "children": [], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 41}}, {"id": 188, "type": "identifier", "text": "opt", "parent": 186, "children": [], "start_point": {"row": 74, "column": 42}, "end_point": {"row": 74, "column": 45}}, {"id": 189, "type": "parameter_declaration", "text": "void *value", "parent": 185, "children": [190, 191], "start_point": {"row": 74, "column": 47}, "end_point": {"row": 74, "column": 58}}, {"id": 190, "type": "primitive_type", "text": "void", "parent": 189, "children": [], "start_point": {"row": 74, "column": 47}, "end_point": {"row": 74, "column": 51}}, {"id": 191, "type": "pointer_declarator", "text": "*value", "parent": 189, "children": [192, 193], "start_point": {"row": 74, "column": 52}, "end_point": {"row": 74, "column": 58}}, {"id": 192, "type": "*", "text": "*", "parent": 191, "children": [], "start_point": {"row": 74, "column": 52}, "end_point": {"row": 74, "column": 53}}, {"id": 193, "type": "identifier", "text": "value", "parent": 191, "children": [], "start_point": {"row": 74, "column": 53}, "end_point": {"row": 74, "column": 58}}, {"id": 194, "type": "declaration", "text": "oldmagnet_t* onepiece_getinfo_magnet();", "parent": 12, "children": [195, 196], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 39}}, {"id": 195, "type": "type_identifier", "text": "oldmagnet_t", "parent": 194, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 11}}, {"id": 196, "type": "pointer_declarator", "text": "* onepiece_getinfo_magnet()", "parent": 194, "children": [197, 198], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 38}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 12}}, {"id": 198, "type": "function_declarator", "text": "onepiece_getinfo_magnet()", "parent": 196, "children": [199, 200], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 38}}, {"id": 199, "type": "identifier", "text": "onepiece_getinfo_magnet", "parent": 198, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 36}}, {"id": 200, "type": "parameter_list", "text": "()", "parent": 198, "children": [], "start_point": {"row": 75, "column": 36}, "end_point": {"row": 75, "column": 38}}, {"id": 201, "type": "declaration", "text": "CRSYNCcode onepiece_perform_query();", "parent": 12, "children": [202, 203], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 36}}, {"id": 202, "type": "type_identifier", "text": "CRSYNCcode", "parent": 201, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 10}}, {"id": 203, "type": "function_declarator", "text": "onepiece_perform_query()", "parent": 201, "children": [204, 205], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 35}}, {"id": 204, "type": "identifier", "text": "onepiece_perform_query", "parent": 203, "children": [], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 33}}, {"id": 205, "type": "parameter_list", "text": "()", "parent": 203, "children": [], "start_point": {"row": 76, "column": 33}, "end_point": {"row": 76, "column": 35}}, {"id": 206, "type": "declaration", "text": "CRSYNCcode onepiece_perform_MatchApp();", "parent": 12, "children": [207, 208], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 39}}, {"id": 207, "type": "type_identifier", "text": "CRSYNCcode", "parent": 206, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 10}}, {"id": 208, "type": "function_declarator", "text": "onepiece_perform_MatchApp()", "parent": 206, "children": [209, 210], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 38}}, {"id": 209, "type": "identifier", "text": "onepiece_perform_MatchApp", "parent": 208, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 36}}, {"id": 210, "type": "parameter_list", "text": "()", "parent": 208, "children": [], "start_point": {"row": 77, "column": 36}, "end_point": {"row": 77, "column": 38}}, {"id": 211, "type": "declaration", "text": "CRSYNCcode onepiece_perform_PatchApp();", "parent": 12, "children": [212, 213], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 39}}, {"id": 212, "type": "type_identifier", "text": "CRSYNCcode", "parent": 211, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 10}}, {"id": 213, "type": "function_declarator", "text": "onepiece_perform_PatchApp()", "parent": 211, "children": [214, 215], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 38}}, {"id": 214, "type": "identifier", "text": "onepiece_perform_PatchApp", "parent": 213, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 36}}, {"id": 215, "type": "parameter_list", "text": "()", "parent": 213, "children": [], "start_point": {"row": 78, "column": 36}, "end_point": {"row": 78, "column": 38}}, {"id": 216, "type": "declaration", "text": "CRSYNCcode onepiece_perform_MatchRes();", "parent": 12, "children": [217, 218], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 39}}, {"id": 217, "type": "type_identifier", "text": "CRSYNCcode", "parent": 216, "children": [], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 10}}, {"id": 218, "type": "function_declarator", "text": "onepiece_perform_MatchRes()", "parent": 216, "children": [219, 220], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 38}}, {"id": 219, "type": "identifier", "text": "onepiece_perform_MatchRes", "parent": 218, "children": [], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 36}}, {"id": 220, "type": "parameter_list", "text": "()", "parent": 218, "children": [], "start_point": {"row": 79, "column": 36}, "end_point": {"row": 79, "column": 38}}, {"id": 221, "type": "declaration", "text": "CRSYNCcode onepiece_perform_PatchRes();", "parent": 12, "children": [222, 223], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 39}}, {"id": 222, "type": "type_identifier", "text": "CRSYNCcode", "parent": 221, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 10}}, {"id": 223, "type": "function_declarator", "text": "onepiece_perform_PatchRes()", "parent": 221, "children": [224, 225], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 38}}, {"id": 224, "type": "identifier", "text": "onepiece_perform_PatchRes", "parent": 223, "children": [], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 36}}, {"id": 225, "type": "parameter_list", "text": "()", "parent": 223, "children": [], "start_point": {"row": 80, "column": 36}, "end_point": {"row": 80, "column": 38}}, {"id": 226, "type": "declaration", "text": "void onepiece_cleanup();", "parent": 12, "children": [227, 228], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 24}}, {"id": 227, "type": "primitive_type", "text": "void", "parent": 226, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 4}}, {"id": 228, "type": "function_declarator", "text": "onepiece_cleanup()", "parent": 226, "children": [229, 230], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 23}}, {"id": 229, "type": "identifier", "text": "onepiece_cleanup", "parent": 228, "children": [], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 21}}, {"id": 230, "type": "parameter_list", "text": "()", "parent": 228, "children": [], "start_point": {"row": 83, "column": 21}, "end_point": {"row": 83, "column": 23}}, {"id": 231, "type": "preproc_if", "text": "#if defined __cplusplus\n", "parent": 12, "children": [232, 233, 236, 237], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 86, "column": 0}}, {"id": 232, "type": "#if", "text": "#if", "parent": 231, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 3}}, {"id": 233, "type": "preproc_defined", "text": "defined __cplusplus", "parent": 231, "children": [234, 235], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 23}}, {"id": 234, "type": "defined", "text": "defined", "parent": 233, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 11}}, {"id": 235, "type": "identifier", "text": "__cplusplus", "parent": 233, "children": [], "start_point": {"row": 85, "column": 12}, "end_point": {"row": 85, "column": 23}}, {"id": 236, "type": "\n", "text": "\n", "parent": 231, "children": [], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 86, "column": 0}}, {"id": 237, "type": "#endif", "text": "", "parent": 231, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 0}}, {"id": 238, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 6}}, {"id": 239, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 6}}]}, "node_categories": {"declarations": {"functions": [59, 97, 102, 112, 127, 178, 183, 198, 203, 208, 213, 218, 223, 228], "variables": [28, 33, 38, 43, 46, 49, 57, 62, 67, 72, 77, 82, 87, 93, 100, 105, 110, 115, 120, 125, 130, 135, 140, 146, 166, 176, 181, 186, 189, 194, 201, 206, 211, 216, 221, 226], "classes": [30, 31, 50, 51, 69, 70, 142, 143], "imports": [17, 18], "modules": [], "enums": [148, 149, 150, 151, 155, 157, 159, 161, 163, 168, 169, 170, 171]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 10, 12, 22, 26, 32, 37, 42, 45, 48, 52, 55, 56, 60, 63, 66, 71, 76, 81, 83, 86, 88, 91, 92, 94, 98, 103, 106, 109, 111, 113, 119, 121, 124, 126, 128, 134, 136, 139, 144, 145, 152, 156, 158, 160, 162, 164, 165, 172, 175, 177, 179, 182, 184, 187, 188, 193, 195, 199, 202, 204, 207, 209, 212, 214, 217, 219, 222, 224, 229, 231, 232, 235, 237, 238, 239], "returns": [], "exceptions": []}, "expressions": {"calls": [15], "literals": [14, 19, 154, 174], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "res_free(res_t *res)"}, {"node_id": 97, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_magnet_malloc()"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_magnet_free(oldmagnet_t *m)"}, {"node_id": 112, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_magnet_load(const char *filename, oldmagnet_t *magnet)"}, {"node_id": 127, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_magnet_save(const char *filename, oldmagnet_t *magnet)"}, {"node_id": 178, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_init()"}, {"node_id": 183, "universal_type": "function", "name": "*value)", "text_snippet": "onepiece_setopt(ONEPIECEoption opt, void *value)"}, {"node_id": 198, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_getinfo_magnet()"}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_perform_query()"}, {"node_id": 208, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_perform_MatchApp()"}, {"node_id": 213, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_perform_PatchApp()"}, {"node_id": 218, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_perform_MatchRes()"}, {"node_id": 223, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_perform_PatchRes()"}, {"node_id": 228, "universal_type": "function", "name": "unknown", "text_snippet": "onepiece_cleanup()"}], "class_declarations": [{"node_id": 30, "universal_type": "class", "name": "res_t", "text_snippet": "struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n u"}, {"node_id": 31, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 50, "universal_type": "class", "name": "res_t", "text_snippet": "struct res_t"}, {"node_id": 51, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 69, "universal_type": "class", "name": "oldmagnet_t", "text_snippet": "struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /*"}, {"node_id": 70, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 142, "universal_type": "class", "name": "onepiece_t", "text_snippet": "struct onepiece_t"}, {"node_id": 143, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 17, "text": "#include \"crsync.h\"\n"}, {"node_id": 18, "text": "#include"}]}, "original_source_code": "/*\nThe MIT License (MIT)\n\nCopyright (c) 2015 chenqi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n#ifndef CRSYNC_ONEPIECE_H\n#define CRSYNC_ONEPIECE_H\n\n#if defined __cplusplus\nextern \"C\" {\n#endif\n\n#include \"crsync.h\"\n\n#define MAGNET_SUFFIX \".magnet\"\n#define MAGNET_TPLMAP_FORMAT \"sssA(ss)\"\n\ntypedef struct res_t {\n char *name;\n char *hash;\n uint32_t size;\n uint32_t diff_size;\n struct res_t *next;\n} res_t;\n\nvoid res_free(res_t *res);\n\ntypedef struct oldmagnet_t {\n char *curr_id; /* current magnet info id */\n char *next_id; /* next magnet info id */\n res_t *app; /* android apk hash */\n res_t *res_list; /* resource list */\n} oldmagnet_t;\n\noldmagnet_t* onepiece_magnet_malloc();\nvoid onepiece_magnet_free(oldmagnet_t *m);\n\nCRSYNCcode onepiece_magnet_load(const char *filename, oldmagnet_t *magnet);\nCRSYNCcode onepiece_magnet_save(const char *filename, oldmagnet_t *magnet);\n\ntypedef struct onepiece_t onepiece_t;\n\ntypedef enum {\n ONEPIECEOPT_STARTID = 0,\n ONEPIECEOPT_BASEURL,\n ONEPIECEOPT_LOCALAPP,\n ONEPIECEOPT_LOCALRES,\n ONEPIECEOPT_NEVERUPDATE,\n ONEPIECEOPT_XFER,\n} ONEPIECEoption;\n\ntypedef enum {\n ONEPIECEINFO_MAGNET = 0,\n} ONEPIECEinfo;\n\nCRSYNCcode onepiece_init();\nCRSYNCcode onepiece_setopt(ONEPIECEoption opt, void *value);\noldmagnet_t* onepiece_getinfo_magnet();\nCRSYNCcode onepiece_perform_query();\nCRSYNCcode onepiece_perform_MatchApp();\nCRSYNCcode onepiece_perform_PatchApp();\nCRSYNCcode onepiece_perform_MatchRes();\nCRSYNCcode onepiece_perform_PatchRes();\n//CRSYNCcode onepiece_perform_updateapp();\n//CRSYNCcode onepiece_perform_updateres();\nvoid onepiece_cleanup();\n\n#if defined __cplusplus\n}\n#endif\n\n#endif // CRSYNC_ONEPIECE_H\n"}
80,977
c
// // XYViewController.h // XYCategoryKit // // Created by <EMAIL> on 08/06/2019. // Copyright (c) 2019 <EMAIL>. All rights reserved. // @import UIKit; @interface XYViewController : UIViewController @end
19.8
10
(translation_unit) "//\n// XYViewController.h\n// XYCategoryKit\n//\n// Created by <EMAIL> on 08/06/2019.\n// Copyright (c) 2019 <EMAIL>. All rights reserved.\n//\n\n@import UIKit;\n\n@interface XYViewController : UIViewController\n\n@end\n" (comment) "//" (comment) "// XYViewController.h" (comment) "// XYCategoryKit" (comment) "//" (comment) "// Created by <EMAIL> on 08/06/2019." (comment) "// Copyright (c) 2019 <EMAIL>. All rights reserved." (comment) "//" (ERROR) "@" (ERROR) "@" (declaration) "import UIKit;" (type_identifier) "import" (identifier) "UIKit" (;) ";" (ERROR) "@interface XYViewController : UIViewController\n\n@end" (ERROR) "@" (type_identifier) "interface" (identifier) "XYViewController" (:) ":" (identifier) "UIViewController" (ERROR) "@" (identifier) "end"
22
5
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 19.8, "nodes": 10, "errors": 0, "source_hash": "c988c676f8aef4e1e0db41c46d3a8a9ec63c9ec7bcec45a3566e49ee6980e72a", "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 XYViewController : 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": "XYViewController", "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// XYViewController.h\n// XYCategoryKit\n//\n// Created by <EMAIL> on 08/06/2019.\n// Copyright (c) 2019 <EMAIL>. All rights reserved.\n//\n\n@import UIKit;\n\n@interface XYViewController : UIViewController\n\n@end\n"}
80,978
c
/* ----------------------------------------------------------------------------- This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems) For the latest info, see http://www.ostis.net Copyright (c) 2010-2014 OSTIS OSTIS 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. OSTIS 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 OSTIS. If not, see <http://www.gnu.org/licenses/>. ----------------------------------------------------------------------------- */ #ifndef UPDATEDOWNLOADER_H #define UPDATEDOWNLOADER_H #include <QObject> class QNetworkAccessManager; class QNetworkReply; class QFile; /*! Class that download update package and check it. */ class UpdateDownloader : public QObject { Q_OBJECT public: explicit UpdateDownloader(QObject *parent = 0); virtual ~UpdateDownloader(); /*! Download file from specified \p url * @param url Url to download file * @param filePath Path to save downloaded file */ void doDownload(const QString &url, const QString &filePath); private: //! Pointer to network manager QNetworkAccessManager *mNetworkManager; //! Pointer to used for download network reply QNetworkReply *mNetworkReply; //! Pointer to output file for download QFile *mFile; signals: //! Signal that emits on download start void started(); //! Signal on download finished void finished(); //! Signal on download failed void failed(); //! Signal that emits current donwload progress void downloadProgress(qint64 bytesRecieved, qint64 bytesTotal); public slots: void downloadReadyRead(); void downloadFinished(); void downloadFailed(); void downloadCanceled(); }; #endif // UPDATEDOWNLOADER_H
35.69
59
(translation_unit) "/*\n-----------------------------------------------------------------------------\nThis source file is part of OSTIS (Open Semantic Technology for Intelligent Systems)\nFor the latest info, see http://www.ostis.net\n\nCopyright (c) 2010-2014 OSTIS\n\nOSTIS is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nOSTIS is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with OSTIS. If not, see <http://www.gnu.org/licenses/>.\n-----------------------------------------------------------------------------\n*/\n\n#ifndef UPDATEDOWNLOADER_H\n#define UPDATEDOWNLOADER_H\n\n#include <QObject>\n\nclass QNetworkAccessManager;\nclass QNetworkReply;\nclass QFile;\n\n/*! Class that download update package and check it.\n */\nclass UpdateDownloader : public QObject\n{\n Q_OBJECT\npublic:\n explicit UpdateDownloader(QObject *parent = 0);\n virtual ~UpdateDownloader();\n\n /*! Download file from specified \p url\n * @param url Url to download file\n * @param filePath Path to save downloaded file\n */\n void doDownload(const QString &url, const QString &filePath);\n\nprivate:\n //! Pointer to network manager\n QNetworkAccessManager *mNetworkManager;\n //! Pointer to used for download network reply\n QNetworkReply *mNetworkReply;\n //! Pointer to output file for download\n QFile *mFile;\n\nsignals:\n //! Signal that emits on download start\n void started();\n //! Signal on download finished\n void finished();\n //! Signal on download failed\n void failed();\n //! Signal that emits current donwload progress\n void downloadProgress(qint64 bytesRecieved, qint64 bytesTotal);\n\npublic slots:\n\n void downloadReadyRead();\n void downloadFinished();\n void downloadFailed();\n void downloadCanceled();\n\n};\n\n#endif // UPDATEDOWNLOADER_H\n" (comment) "/*\n-----------------------------------------------------------------------------\nThis source file is part of OSTIS (Open Semantic Technology for Intelligent Systems)\nFor the latest info, see http://www.ostis.net\n\nCopyright (c) 2010-2014 OSTIS\n\nOSTIS is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nOSTIS is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with OSTIS. If not, see <http://www.gnu.org/licenses/>.\n-----------------------------------------------------------------------------\n*/" (preproc_ifdef) "#ifndef UPDATEDOWNLOADER_H\n#define UPDATEDOWNLOADER_H\n\n#include <QObject>\n\nclass QNetworkAccessManager;\nclass QNetworkReply;\nclass QFile;\n\n/*! Class that download update package and check it.\n */\nclass UpdateDownloader : public QObject\n{\n Q_OBJECT\npublic:\n explicit UpdateDownloader(QObject *parent = 0);\n virtual ~UpdateDownloader();\n\n /*! Download file from specified \p url\n * @param url Url to download file\n * @param filePath Path to save downloaded file\n */\n void doDownload(const QString &url, const QString &filePath);\n\nprivate:\n //! Pointer to network manager\n QNetworkAccessManager *mNetworkManager;\n //! Pointer to used for download network reply\n QNetworkReply *mNetworkReply;\n //! Pointer to output file for download\n QFile *mFile;\n\nsignals:\n //! Signal that emits on download start\n void started();\n //! Signal on download finished\n void finished();\n //! Signal on download failed\n void failed();\n //! Signal that emits current donwload progress\n void downloadProgress(qint64 bytesRecieved, qint64 bytesTotal);\n\npublic slots:\n\n void downloadReadyRead();\n void downloadFinished();\n void downloadFailed();\n void downloadCanceled();\n\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "UPDATEDOWNLOADER_H" (preproc_def) "#define UPDATEDOWNLOADER_H\n" (#define) "#define" (identifier) "UPDATEDOWNLOADER_H" (preproc_include) "#include <QObject>\n" (#include) "#include" (system_lib_string) "<QObject>" (declaration) "class QNetworkAccessManager;" (type_identifier) "class" (identifier) "QNetworkAccessManager" (;) ";" (declaration) "class QNetworkReply;" (type_identifier) "class" (identifier) "QNetworkReply" (;) ";" (declaration) "class QFile;" (type_identifier) "class" (identifier) "QFile" (;) ";" (comment) "/*! Class that download update package and check it.\n */" (function_definition) "class UpdateDownloader : public QObject\n{\n Q_OBJECT\npublic:\n explicit UpdateDownloader(QObject *parent = 0);\n virtual ~UpdateDownloader();\n\n /*! Download file from specified \p url\n * @param url Url to download file\n * @param filePath Path to save downloaded file\n */\n void doDownload(const QString &url, const QString &filePath);\n\nprivate:\n //! Pointer to network manager\n QNetworkAccessManager *mNetworkManager;\n //! Pointer to used for download network reply\n QNetworkReply *mNetworkReply;\n //! Pointer to output file for download\n QFile *mFile;\n\nsignals:\n //! Signal that emits on download start\n void started();\n //! Signal on download finished\n void finished();\n //! Signal on download failed\n void failed();\n //! Signal that emits current donwload progress\n void downloadProgress(qint64 bytesRecieved, qint64 bytesTotal);\n\npublic slots:\n\n void downloadReadyRead();\n void downloadFinished();\n void downloadFailed();\n void downloadCanceled();\n\n}" (type_identifier) "class" (identifier) "UpdateDownloader" (ERROR) ": public QObject" (:) ":" (identifier) "public" (identifier) "QObject" (compound_statement) "{\n Q_OBJECT\npublic:\n explicit UpdateDownloader(QObject *parent = 0);\n virtual ~UpdateDownloader();\n\n /*! Download file from specified \p url\n * @param url Url to download file\n * @param filePath Path to save downloaded file\n */\n void doDownload(const QString &url, const QString &filePath);\n\nprivate:\n //! Pointer to network manager\n QNetworkAccessManager *mNetworkManager;\n //! Pointer to used for download network reply\n QNetworkReply *mNetworkReply;\n //! Pointer to output file for download\n QFile *mFile;\n\nsignals:\n //! Signal that emits on download start\n void started();\n //! Signal on download finished\n void finished();\n //! Signal on download failed\n void failed();\n //! Signal that emits current donwload progress\n void downloadProgress(qint64 bytesRecieved, qint64 bytesTotal);\n\npublic slots:\n\n void downloadReadyRead();\n void downloadFinished();\n void downloadFailed();\n void downloadCanceled();\n\n}" ({) "{" (declaration) "Q_OBJECT\npublic:\n explicit UpdateDownloader(QObject *parent = 0);" (type_identifier) "Q_OBJECT" (ERROR) "public:\n explicit" (identifier) "public" (:) ":" (identifier) "explicit" (init_declarator) "UpdateDownloader(QObject *parent = 0" (function_declarator) "UpdateDownloader(QObject *parent" (identifier) "UpdateDownloader" (parameter_list) "(QObject *parent" (() "(" (parameter_declaration) "QObject *parent" (type_identifier) "QObject" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" ()) "" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (declaration) "virtual ~UpdateDownloader();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "UpdateDownloader()" (identifier) "UpdateDownloader" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/*! Download file from specified \p url\n * @param url Url to download file\n * @param filePath Path to save downloaded file\n */" (declaration) "void doDownload(const QString &url, const QString &filePath);" (primitive_type) "void" (function_declarator) "doDownload(const QString &url, const QString &filePath)" (identifier) "doDownload" (parameter_list) "(const QString &url, const QString &filePath)" (() "(" (parameter_declaration) "const QString &url" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "&" (&) "&" (identifier) "url" (,) "," (parameter_declaration) "const QString &filePath" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "&" (&) "&" (identifier) "filePath" ()) ")" (;) ";" (labeled_statement) "private:\n //! Pointer to network manager\n QNetworkAccessManager *mNetworkManager;" (statement_identifier) "private" (:) ":" (comment) "//! Pointer to network manager" (declaration) "QNetworkAccessManager *mNetworkManager;" (type_identifier) "QNetworkAccessManager" (pointer_declarator) "*mNetworkManager" (*) "*" (identifier) "mNetworkManager" (;) ";" (comment) "//! Pointer to used for download network reply" (declaration) "QNetworkReply *mNetworkReply;" (type_identifier) "QNetworkReply" (pointer_declarator) "*mNetworkReply" (*) "*" (identifier) "mNetworkReply" (;) ";" (comment) "//! Pointer to output file for download" (declaration) "QFile *mFile;" (type_identifier) "QFile" (pointer_declarator) "*mFile" (*) "*" (identifier) "mFile" (;) ";" (labeled_statement) "signals:\n //! Signal that emits on download start\n void started();" (statement_identifier) "signals" (:) ":" (comment) "//! Signal that emits on download start" (declaration) "void started();" (primitive_type) "void" (function_declarator) "started()" (identifier) "started" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//! Signal on download finished" (declaration) "void finished();" (primitive_type) "void" (function_declarator) "finished()" (identifier) "finished" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//! Signal on download failed" (declaration) "void failed();" (primitive_type) "void" (function_declarator) "failed()" (identifier) "failed" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//! Signal that emits current donwload progress" (declaration) "void downloadProgress(qint64 bytesRecieved, qint64 bytesTotal);" (primitive_type) "void" (function_declarator) "downloadProgress(qint64 bytesRecieved, qint64 bytesTotal)" (identifier) "downloadProgress" (parameter_list) "(qint64 bytesRecieved, qint64 bytesTotal)" (() "(" (parameter_declaration) "qint64 bytesRecieved" (type_identifier) "qint64" (identifier) "bytesRecieved" (,) "," (parameter_declaration) "qint64 bytesTotal" (type_identifier) "qint64" (identifier) "bytesTotal" ()) ")" (;) ";" (ERROR) "public slots:" (type_identifier) "public" (identifier) "slots" (:) ":" (declaration) "void downloadReadyRead();" (primitive_type) "void" (function_declarator) "downloadReadyRead()" (identifier) "downloadReadyRead" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void downloadFinished();" (primitive_type) "void" (function_declarator) "downloadFinished()" (identifier) "downloadFinished" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void downloadFailed();" (primitive_type) "void" (function_declarator) "downloadFailed()" (identifier) "downloadFailed" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void downloadCanceled();" (primitive_type) "void" (function_declarator) "downloadCanceled()" (identifier) "downloadCanceled" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// UPDATEDOWNLOADER_H"
200
7
{"language": "c", "success": true, "metadata": {"lines": 59, "avg_line_length": 35.69, "nodes": 119, "errors": 0, "source_hash": "418d7e5e660a5ac1fc3a7f38d48708e3d51db44557dc9c455e17b9c702de6699", "categorized_nodes": 80}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef UPDATEDOWNLOADER_H\n#define UPDATEDOWNLOADER_H\n\n#include <QObject>\n\nclass QNetworkAccessManager;\nclass QNetworkReply;\nclass QFile;\n\n/*! Class that download update package and check it.\n */\nclass UpdateDownloader : public QObject\n{\n Q_OBJECT\npublic:\n explicit UpdateDownloader(QObject *parent = 0);\n virtual ~UpdateDownloader();\n\n /*! Download file from specified \\p url\n * @param url Url to download file\n * @param filePath Path to save downloaded file\n */\n void doDownload(const QString &url, const QString &filePath);\n\nprivate:\n //! Pointer to network manager\n QNetworkAccessManager *mNetworkManager;\n //! Pointer to used for download network reply\n QNetworkReply *mNetworkReply;\n //! Pointer to output file for download\n QFile *mFile;\n\nsignals:\n //! Signal that emits on download start\n void started();\n //! Signal on download finished\n void finished();\n //! Signal on download failed\n void failed();\n //! Signal that emits current donwload progress\n void downloadProgress(qint64 bytesRecieved, qint64 bytesTotal);\n\npublic slots:\n\n void downloadReadyRead();\n void downloadFinished();\n void downloadFailed();\n void downloadCanceled();\n\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 11, 13, 15, 118], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 73, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 2, "type": "identifier", "text": "UPDATEDOWNLOADER_H", "parent": 0, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define UPDATEDOWNLOADER_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 5, "type": "identifier", "text": "UPDATEDOWNLOADER_H", "parent": 3, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 26}}, {"id": 6, "type": "preproc_include", "text": "#include <QObject>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<QObject>", "parent": 6, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 18}}, {"id": 9, "type": "declaration", "text": "class QNetworkAccessManager;", "parent": 0, "children": [10], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 28}}, {"id": 10, "type": "identifier", "text": "QNetworkAccessManager", "parent": 9, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 27}}, {"id": 11, "type": "declaration", "text": "class QNetworkReply;", "parent": 0, "children": [12], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 20}}, {"id": 12, "type": "identifier", "text": "QNetworkReply", "parent": 11, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 19}}, {"id": 13, "type": "declaration", "text": "class QFile;", "parent": 0, "children": [14], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 12}}, {"id": 14, "type": "identifier", "text": "QFile", "parent": 13, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 11}}, {"id": 15, "type": "function_definition", "text": "class UpdateDownloader : public QObject\n{\n Q_OBJECT\npublic:\n explicit UpdateDownloader(QObject *parent = 0);\n virtual ~UpdateDownloader();\n\n /*! Download file from specified \\p url\n * @param url Url to download file\n * @param filePath Path to save downloaded file\n */\n void doDownload(const QString &url, const QString &filePath);\n\nprivate:\n //! Pointer to network manager\n QNetworkAccessManager *mNetworkManager;\n //! Pointer to used for download network reply\n QNetworkReply *mNetworkReply;\n //! Pointer to output file for download\n QFile *mFile;\n\nsignals:\n //! Signal that emits on download start\n void started();\n //! Signal on download finished\n void finished();\n //! Signal on download failed\n void failed();\n //! Signal that emits current donwload progress\n void downloadProgress(qint64 bytesRecieved, qint64 bytesTotal);\n\npublic slots:\n\n void downloadReadyRead();\n void downloadFinished();\n void downloadFailed();\n void downloadCanceled();\n\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 16, "type": "identifier", "text": "UpdateDownloader", "parent": 15, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 22}}, {"id": 17, "type": "ERROR", "text": ": public QObject", "parent": 15, "children": [18], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 39}}, {"id": 18, "type": "identifier", "text": "QObject", "parent": 17, "children": [], "start_point": {"row": 33, "column": 32}, "end_point": {"row": 33, "column": 39}}, {"id": 19, "type": "declaration", "text": "Q_OBJECT\npublic:\n explicit UpdateDownloader(QObject *parent = 0);", "parent": 15, "children": [20, 21, 23], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 37, "column": 51}}, {"id": 20, "type": "type_identifier", "text": "Q_OBJECT", "parent": 19, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 12}}, {"id": 21, "type": "ERROR", "text": "public:\n explicit", "parent": 19, "children": [22], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 12}}, {"id": 22, "type": "identifier", "text": "explicit", "parent": 21, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 12}}, {"id": 23, "type": "init_declarator", "text": "UpdateDownloader(QObject *parent = 0", "parent": 19, "children": [24, 32, 33], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 49}}, {"id": 24, "type": "function_declarator", "text": "UpdateDownloader(QObject *parent", "parent": 23, "children": [25, 26], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 45}}, {"id": 25, "type": "identifier", "text": "UpdateDownloader", "parent": 24, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 29}}, {"id": 26, "type": "parameter_list", "text": "(QObject *parent", "parent": 24, "children": [27], "start_point": {"row": 37, "column": 29}, "end_point": {"row": 37, "column": 45}}, {"id": 27, "type": "parameter_declaration", "text": "QObject *parent", "parent": 26, "children": [28, 29], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 45}}, {"id": 28, "type": "type_identifier", "text": "QObject", "parent": 27, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 37}}, {"id": 29, "type": "pointer_declarator", "text": "*parent", "parent": 27, "children": [30, 31], "start_point": {"row": 37, "column": 38}, "end_point": {"row": 37, "column": 45}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 37, "column": 38}, "end_point": {"row": 37, "column": 39}}, {"id": 31, "type": "identifier", "text": "parent", "parent": 29, "children": [], "start_point": {"row": 37, "column": 39}, "end_point": {"row": 37, "column": 45}}, {"id": 32, "type": "=", "text": "=", "parent": 23, "children": [], "start_point": {"row": 37, "column": 46}, "end_point": {"row": 37, "column": 47}}, {"id": 33, "type": "number_literal", "text": "0", "parent": 23, "children": [], "start_point": {"row": 37, "column": 48}, "end_point": {"row": 37, "column": 49}}, {"id": 34, "type": "declaration", "text": "virtual ~UpdateDownloader();", "parent": 15, "children": [35, 36, 38], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 32}}, {"id": 35, "type": "type_identifier", "text": "virtual", "parent": 34, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 11}}, {"id": 36, "type": "ERROR", "text": "~", "parent": 34, "children": [37], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 13}}, {"id": 37, "type": "~", "text": "~", "parent": 36, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 13}}, {"id": 38, "type": "function_declarator", "text": "UpdateDownloader()", "parent": 34, "children": [39, 40], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 31}}, {"id": 39, "type": "identifier", "text": "UpdateDownloader", "parent": 38, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 29}}, {"id": 40, "type": "parameter_list", "text": "()", "parent": 38, "children": [], "start_point": {"row": 38, "column": 29}, "end_point": {"row": 38, "column": 31}}, {"id": 41, "type": "declaration", "text": "void doDownload(const QString &url, const QString &filePath);", "parent": 15, "children": [42, 43], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 65}}, {"id": 42, "type": "primitive_type", "text": "void", "parent": 41, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 8}}, {"id": 43, "type": "function_declarator", "text": "doDownload(const QString &url, const QString &filePath)", "parent": 41, "children": [44, 45], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 64}}, {"id": 44, "type": "identifier", "text": "doDownload", "parent": 43, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 19}}, {"id": 45, "type": "parameter_list", "text": "(const QString &url, const QString &filePath)", "parent": 43, "children": [46, 49], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 64}}, {"id": 46, "type": "parameter_declaration", "text": "const QString &url", "parent": 45, "children": [47, 48], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 38}}, {"id": 47, "type": "type_identifier", "text": "QString", "parent": 46, "children": [], "start_point": {"row": 44, "column": 26}, "end_point": {"row": 44, "column": 33}}, {"id": 48, "type": "identifier", "text": "url", "parent": 46, "children": [], "start_point": {"row": 44, "column": 35}, "end_point": {"row": 44, "column": 38}}, {"id": 49, "type": "parameter_declaration", "text": "const QString &filePath", "parent": 45, "children": [50, 51], "start_point": {"row": 44, "column": 40}, "end_point": {"row": 44, "column": 63}}, {"id": 50, "type": "type_identifier", "text": "QString", "parent": 49, "children": [], "start_point": {"row": 44, "column": 46}, "end_point": {"row": 44, "column": 53}}, {"id": 51, "type": "identifier", "text": "filePath", "parent": 49, "children": [], "start_point": {"row": 44, "column": 55}, "end_point": {"row": 44, "column": 63}}, {"id": 52, "type": "labeled_statement", "text": "private:\n //! Pointer to network manager\n QNetworkAccessManager *mNetworkManager;", "parent": 15, "children": [53], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 48, "column": 43}}, {"id": 53, "type": "declaration", "text": "QNetworkAccessManager *mNetworkManager;", "parent": 52, "children": [54, 55], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 43}}, {"id": 54, "type": "type_identifier", "text": "QNetworkAccessManager", "parent": 53, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 25}}, {"id": 55, "type": "pointer_declarator", "text": "*mNetworkManager", "parent": 53, "children": [56, 57], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 42}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 48, "column": 26}, "end_point": {"row": 48, "column": 27}}, {"id": 57, "type": "identifier", "text": "mNetworkManager", "parent": 55, "children": [], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 42}}, {"id": 58, "type": "declaration", "text": "QNetworkReply *mNetworkReply;", "parent": 15, "children": [59, 60], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 33}}, {"id": 59, "type": "type_identifier", "text": "QNetworkReply", "parent": 58, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 17}}, {"id": 60, "type": "pointer_declarator", "text": "*mNetworkReply", "parent": 58, "children": [61, 62], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 32}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 19}}, {"id": 62, "type": "identifier", "text": "mNetworkReply", "parent": 60, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 32}}, {"id": 63, "type": "declaration", "text": "QFile *mFile;", "parent": 15, "children": [64, 65], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 17}}, {"id": 64, "type": "type_identifier", "text": "QFile", "parent": 63, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 9}}, {"id": 65, "type": "pointer_declarator", "text": "*mFile", "parent": 63, "children": [66, 67], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 16}}, {"id": 66, "type": "*", "text": "*", "parent": 65, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 11}}, {"id": 67, "type": "identifier", "text": "mFile", "parent": 65, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 16}}, {"id": 68, "type": "labeled_statement", "text": "signals:\n //! Signal that emits on download start\n void started();", "parent": 15, "children": [69, 70], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 56, "column": 19}}, {"id": 69, "type": "statement_identifier", "text": "signals", "parent": 68, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 7}}, {"id": 70, "type": "declaration", "text": "void started();", "parent": 68, "children": [71, 72], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 19}}, {"id": 71, "type": "primitive_type", "text": "void", "parent": 70, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 8}}, {"id": 72, "type": "function_declarator", "text": "started()", "parent": 70, "children": [73, 74], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 18}}, {"id": 73, "type": "identifier", "text": "started", "parent": 72, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 16}}, {"id": 74, "type": "parameter_list", "text": "()", "parent": 72, "children": [], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 18}}, {"id": 75, "type": "declaration", "text": "void finished();", "parent": 15, "children": [76, 77], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 20}}, {"id": 76, "type": "primitive_type", "text": "void", "parent": 75, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 8}}, {"id": 77, "type": "function_declarator", "text": "finished()", "parent": 75, "children": [78, 79], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 19}}, {"id": 78, "type": "identifier", "text": "finished", "parent": 77, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 17}}, {"id": 79, "type": "parameter_list", "text": "()", "parent": 77, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 19}}, {"id": 80, "type": "declaration", "text": "void failed();", "parent": 15, "children": [81, 82], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 18}}, {"id": 81, "type": "primitive_type", "text": "void", "parent": 80, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 8}}, {"id": 82, "type": "function_declarator", "text": "failed()", "parent": 80, "children": [83, 84], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 17}}, {"id": 83, "type": "identifier", "text": "failed", "parent": 82, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 15}}, {"id": 84, "type": "parameter_list", "text": "()", "parent": 82, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 17}}, {"id": 85, "type": "declaration", "text": "void downloadProgress(qint64 bytesRecieved, qint64 bytesTotal);", "parent": 15, "children": [86, 87], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 67}}, {"id": 86, "type": "primitive_type", "text": "void", "parent": 85, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 8}}, {"id": 87, "type": "function_declarator", "text": "downloadProgress(qint64 bytesRecieved, qint64 bytesTotal)", "parent": 85, "children": [88, 89], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 66}}, {"id": 88, "type": "identifier", "text": "downloadProgress", "parent": 87, "children": [], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 25}}, {"id": 89, "type": "parameter_list", "text": "(qint64 bytesRecieved, qint64 bytesTotal)", "parent": 87, "children": [90, 93], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 66}}, {"id": 90, "type": "parameter_declaration", "text": "qint64 bytesRecieved", "parent": 89, "children": [91, 92], "start_point": {"row": 62, "column": 26}, "end_point": {"row": 62, "column": 46}}, {"id": 91, "type": "type_identifier", "text": "qint64", "parent": 90, "children": [], "start_point": {"row": 62, "column": 26}, "end_point": {"row": 62, "column": 32}}, {"id": 92, "type": "identifier", "text": "bytesRecieved", "parent": 90, "children": [], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 62, "column": 46}}, {"id": 93, "type": "parameter_declaration", "text": "qint64 bytesTotal", "parent": 89, "children": [94, 95], "start_point": {"row": 62, "column": 48}, "end_point": {"row": 62, "column": 65}}, {"id": 94, "type": "type_identifier", "text": "qint64", "parent": 93, "children": [], "start_point": {"row": 62, "column": 48}, "end_point": {"row": 62, "column": 54}}, {"id": 95, "type": "identifier", "text": "bytesTotal", "parent": 93, "children": [], "start_point": {"row": 62, "column": 55}, "end_point": {"row": 62, "column": 65}}, {"id": 96, "type": "ERROR", "text": "public slots:", "parent": 15, "children": [97], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 13}}, {"id": 97, "type": "identifier", "text": "slots", "parent": 96, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 12}}, {"id": 98, "type": "declaration", "text": "void downloadReadyRead();", "parent": 15, "children": [99, 100], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 29}}, {"id": 99, "type": "primitive_type", "text": "void", "parent": 98, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 8}}, {"id": 100, "type": "function_declarator", "text": "downloadReadyRead()", "parent": 98, "children": [101, 102], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 28}}, {"id": 101, "type": "identifier", "text": "downloadReadyRead", "parent": 100, "children": [], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 26}}, {"id": 102, "type": "parameter_list", "text": "()", "parent": 100, "children": [], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 28}}, {"id": 103, "type": "declaration", "text": "void downloadFinished();", "parent": 15, "children": [104, 105], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 28}}, {"id": 104, "type": "primitive_type", "text": "void", "parent": 103, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 8}}, {"id": 105, "type": "function_declarator", "text": "downloadFinished()", "parent": 103, "children": [106, 107], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 27}}, {"id": 106, "type": "identifier", "text": "downloadFinished", "parent": 105, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 25}}, {"id": 107, "type": "parameter_list", "text": "()", "parent": 105, "children": [], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 27}}, {"id": 108, "type": "declaration", "text": "void downloadFailed();", "parent": 15, "children": [109, 110], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 26}}, {"id": 109, "type": "primitive_type", "text": "void", "parent": 108, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 8}}, {"id": 110, "type": "function_declarator", "text": "downloadFailed()", "parent": 108, "children": [111, 112], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 25}}, {"id": 111, "type": "identifier", "text": "downloadFailed", "parent": 110, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 23}}, {"id": 112, "type": "parameter_list", "text": "()", "parent": 110, "children": [], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 25}}, {"id": 113, "type": "declaration", "text": "void downloadCanceled();", "parent": 15, "children": [114, 115], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 28}}, {"id": 114, "type": "primitive_type", "text": "void", "parent": 113, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 8}}, {"id": 115, "type": "function_declarator", "text": "downloadCanceled()", "parent": 113, "children": [116, 117], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 27}}, {"id": 116, "type": "identifier", "text": "downloadCanceled", "parent": 115, "children": [], "start_point": {"row": 69, "column": 9}, "end_point": {"row": 69, "column": 25}}, {"id": 117, "type": "parameter_list", "text": "()", "parent": 115, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 27}}, {"id": 118, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 24, 38, 43, 72, 77, 82, 87, 100, 105, 110, 115], "variables": [9, 11, 13, 19, 27, 34, 41, 46, 49, 53, 58, 63, 70, 75, 80, 85, 90, 93, 98, 103, 108, 113], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 12, 14, 16, 18, 20, 22, 25, 28, 31, 35, 39, 44, 47, 48, 50, 51, 54, 57, 59, 62, 64, 67, 69, 73, 78, 83, 88, 91, 92, 94, 95, 97, 101, 106, 111, 116, 118], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 33], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "UpdateDownloader", "text_snippet": "class UpdateDownloader : public QObject\n{\n Q_OBJECT\npublic:\n explicit UpdateDownloader(QObject"}, {"node_id": 24, "universal_type": "function", "name": "unknown", "text_snippet": "UpdateDownloader(QObject *parent"}, {"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "UpdateDownloader()"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "doDownload(const QString &url, const QString &filePath)"}, {"node_id": 72, "universal_type": "function", "name": "unknown", "text_snippet": "started()"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "finished()"}, {"node_id": 82, "universal_type": "function", "name": "unknown", "text_snippet": "failed()"}, {"node_id": 87, "universal_type": "function", "name": "unknown", "text_snippet": "downloadProgress(qint64 bytesRecieved, qint64 bytesTotal)"}, {"node_id": 100, "universal_type": "function", "name": "unknown", "text_snippet": "downloadReadyRead()"}, {"node_id": 105, "universal_type": "function", "name": "unknown", "text_snippet": "downloadFinished()"}, {"node_id": 110, "universal_type": "function", "name": "unknown", "text_snippet": "downloadFailed()"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "downloadCanceled()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <QObject>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n-----------------------------------------------------------------------------\nThis source file is part of OSTIS (Open Semantic Technology for Intelligent Systems)\nFor the latest info, see http://www.ostis.net\n\nCopyright (c) 2010-2014 OSTIS\n\nOSTIS is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nOSTIS is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with OSTIS. If not, see <http://www.gnu.org/licenses/>.\n-----------------------------------------------------------------------------\n*/\n\n#ifndef UPDATEDOWNLOADER_H\n#define UPDATEDOWNLOADER_H\n\n#include <QObject>\n\nclass QNetworkAccessManager;\nclass QNetworkReply;\nclass QFile;\n\n/*! Class that download update package and check it.\n */\nclass UpdateDownloader : public QObject\n{\n Q_OBJECT\npublic:\n explicit UpdateDownloader(QObject *parent = 0);\n virtual ~UpdateDownloader();\n\n /*! Download file from specified \\p url\n * @param url Url to download file\n * @param filePath Path to save downloaded file\n */\n void doDownload(const QString &url, const QString &filePath);\n\nprivate:\n //! Pointer to network manager\n QNetworkAccessManager *mNetworkManager;\n //! Pointer to used for download network reply\n QNetworkReply *mNetworkReply;\n //! Pointer to output file for download\n QFile *mFile;\n\nsignals:\n //! Signal that emits on download start\n void started();\n //! Signal on download finished\n void finished();\n //! Signal on download failed\n void failed();\n //! Signal that emits current donwload progress\n void downloadProgress(qint64 bytesRecieved, qint64 bytesTotal);\n\npublic slots:\n\n void downloadReadyRead();\n void downloadFinished();\n void downloadFailed();\n void downloadCanceled();\n\n};\n\n#endif // UPDATEDOWNLOADER_H\n"}
80,979
c
#pragma once #include "parsec.h" class KeyboardMap { public: static KeyboardMap defaultMap() { return KeyboardMap(); }; // Left Stick uint16_t LLeft = KEY_A; uint16_t LRight = KEY_D; uint16_t LUp = KEY_W; uint16_t LDown = KEY_S; // Right Stick uint16_t RLeft = KEY_LEFT; uint16_t RRight = KEY_RIGHT; uint16_t RUp = KEY_UP; uint16_t RDown = KEY_DOWN; // DPad uint16_t DLeft = KEY_KP_4; uint16_t DRight = KEY_KP_6; uint16_t DUp = KEY_KP_8; uint16_t DDown = KEY_KP_5; // Face Buttons uint16_t A = KEY_L; uint16_t B = KEY_O; uint16_t X = KEY_K; uint16_t Y = KEY_I; // Top uint16_t LB = KEY_Q; uint16_t RB = KEY_P; uint16_t LT = KEY_F; uint16_t RT = KEY_J; // Menu uint16_t Back = KEY_BACKSPACE; uint16_t Start = KEY_ENTER; // Stick Buttons uint16_t LThumb = KEY_E; uint16_t RThumb = KEY_U; }; //enum class KEY_TO_GAMEPAD { // // // Left Stick // LEFT = KEY_A, // RIGHT = KEY_D, // UP = KEY_W, // DOWN = KEY_S, // // // Right Stick // RLEFT = KEY_LEFT, // RRIGHT = KEY_RIGHT, // RUP = KEY_UP, // RDOWN = KEY_DOWN, // // // DPad // DLEFT = KEY_KP_4, // DRIGHT = KEY_KP_6, // DUP = KEY_KP_8, // DDOWN = KEY_KP_5, // // // Face Buttons // A = KEY_L, // B = KEY_O, // X = KEY_K, // Y = KEY_I, // // // Menu // BACK = KEY_BACKSPACE, // START = KEY_ENTER, // // // Top // LB = KEY_Q, // RB = KEY_P, // LT = KEY_F, // RT = KEY_J, // // // Stick buttons // LTHUMB = KEY_C, // RTHUMB = KEY_M // //}; //enum class KEY_TO_GAMEPAD2 //{ // LEFT = KEY_LEFT, // RIGHT = KEY_RIGHT, // UP = KEY_UP, // DOWN = KEY_DOWN, // A = KEY_KP_1, // B = KEY_KP_2, // X = KEY_KP_4, // Y = KEY_KP_5, // BACK = KEY_KP_MULTIPLY, // START = KEY_KP_MINUS, // LB = KEY_KP_7, // RB = KEY_KP_8, // LT = KEY_KP_6, // RT = KEY_KP_3, // LTHUMB = KEY_KP_0, // RTHUMB = KEY_KP_PERIOD //};
16.79
100
(translation_unit) "#pragma once\n\n#include "parsec.h"\n\nclass KeyboardMap\n{\npublic:\n static KeyboardMap defaultMap() {\n return KeyboardMap();\n };\n\n // Left Stick\n uint16_t LLeft = KEY_A;\n uint16_t LRight = KEY_D;\n uint16_t LUp = KEY_W;\n uint16_t LDown = KEY_S;\n\n // Right Stick\n uint16_t RLeft = KEY_LEFT;\n uint16_t RRight = KEY_RIGHT;\n uint16_t RUp = KEY_UP;\n uint16_t RDown = KEY_DOWN;\n\n // DPad\n uint16_t DLeft = KEY_KP_4;\n uint16_t DRight = KEY_KP_6;\n uint16_t DUp = KEY_KP_8;\n uint16_t DDown = KEY_KP_5;\n\n // Face Buttons\n uint16_t A = KEY_L;\n uint16_t B = KEY_O;\n uint16_t X = KEY_K;\n uint16_t Y = KEY_I;\n\n // Top\n uint16_t LB = KEY_Q;\n uint16_t RB = KEY_P;\n uint16_t LT = KEY_F;\n uint16_t RT = KEY_J;\n\n // Menu\n uint16_t Back = KEY_BACKSPACE;\n uint16_t Start = KEY_ENTER;\n\n // Stick Buttons\n uint16_t LThumb = KEY_E;\n uint16_t RThumb = KEY_U;\n};\n\n//enum class KEY_TO_GAMEPAD {\n// \n// // Left Stick\n// LEFT = KEY_A,\n// RIGHT = KEY_D,\n// UP = KEY_W,\n// DOWN = KEY_S,\n//\n// // Right Stick\n// RLEFT = KEY_LEFT,\n// RRIGHT = KEY_RIGHT,\n// RUP = KEY_UP,\n// RDOWN = KEY_DOWN,\n//\n// // DPad\n// DLEFT = KEY_KP_4,\n// DRIGHT = KEY_KP_6,\n// DUP = KEY_KP_8,\n// DDOWN = KEY_KP_5,\n// \n// // Face Buttons\n// A = KEY_L,\n// B = KEY_O,\n// X = KEY_K,\n// Y = KEY_I,\n//\n// // Menu\n// BACK = KEY_BACKSPACE,\n// START = KEY_ENTER,\n//\n// // Top\n// LB = KEY_Q,\n// RB = KEY_P,\n// LT = KEY_F,\n// RT = KEY_J,\n//\n// // Stick buttons\n// LTHUMB = KEY_C,\n// RTHUMB = KEY_M\n//\n//};\n\n//enum class KEY_TO_GAMEPAD2\n//{\n// LEFT = KEY_LEFT,\n// RIGHT = KEY_RIGHT,\n// UP = KEY_UP,\n// DOWN = KEY_DOWN,\n// A = KEY_KP_1,\n// B = KEY_KP_2,\n// X = KEY_KP_4,\n// Y = KEY_KP_5,\n// BACK = KEY_KP_MULTIPLY,\n// START = KEY_KP_MINUS,\n// LB = KEY_KP_7,\n// RB = KEY_KP_8,\n// LT = KEY_KP_6,\n// RT = KEY_KP_3,\n// LTHUMB = KEY_KP_0,\n// RTHUMB = KEY_KP_PERIOD\n//};\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "parsec.h"\n" (#include) "#include" (string_literal) ""parsec.h"" (") """ (string_content) "parsec.h" (") """ (function_definition) "class KeyboardMap\n{\npublic:\n static KeyboardMap defaultMap() {\n return KeyboardMap();\n };\n\n // Left Stick\n uint16_t LLeft = KEY_A;\n uint16_t LRight = KEY_D;\n uint16_t LUp = KEY_W;\n uint16_t LDown = KEY_S;\n\n // Right Stick\n uint16_t RLeft = KEY_LEFT;\n uint16_t RRight = KEY_RIGHT;\n uint16_t RUp = KEY_UP;\n uint16_t RDown = KEY_DOWN;\n\n // DPad\n uint16_t DLeft = KEY_KP_4;\n uint16_t DRight = KEY_KP_6;\n uint16_t DUp = KEY_KP_8;\n uint16_t DDown = KEY_KP_5;\n\n // Face Buttons\n uint16_t A = KEY_L;\n uint16_t B = KEY_O;\n uint16_t X = KEY_K;\n uint16_t Y = KEY_I;\n\n // Top\n uint16_t LB = KEY_Q;\n uint16_t RB = KEY_P;\n uint16_t LT = KEY_F;\n uint16_t RT = KEY_J;\n\n // Menu\n uint16_t Back = KEY_BACKSPACE;\n uint16_t Start = KEY_ENTER;\n\n // Stick Buttons\n uint16_t LThumb = KEY_E;\n uint16_t RThumb = KEY_U;\n}" (type_identifier) "class" (identifier) "KeyboardMap" (compound_statement) "{\npublic:\n static KeyboardMap defaultMap() {\n return KeyboardMap();\n };\n\n // Left Stick\n uint16_t LLeft = KEY_A;\n uint16_t LRight = KEY_D;\n uint16_t LUp = KEY_W;\n uint16_t LDown = KEY_S;\n\n // Right Stick\n uint16_t RLeft = KEY_LEFT;\n uint16_t RRight = KEY_RIGHT;\n uint16_t RUp = KEY_UP;\n uint16_t RDown = KEY_DOWN;\n\n // DPad\n uint16_t DLeft = KEY_KP_4;\n uint16_t DRight = KEY_KP_6;\n uint16_t DUp = KEY_KP_8;\n uint16_t DDown = KEY_KP_5;\n\n // Face Buttons\n uint16_t A = KEY_L;\n uint16_t B = KEY_O;\n uint16_t X = KEY_K;\n uint16_t Y = KEY_I;\n\n // Top\n uint16_t LB = KEY_Q;\n uint16_t RB = KEY_P;\n uint16_t LT = KEY_F;\n uint16_t RT = KEY_J;\n\n // Menu\n uint16_t Back = KEY_BACKSPACE;\n uint16_t Start = KEY_ENTER;\n\n // Stick Buttons\n uint16_t LThumb = KEY_E;\n uint16_t RThumb = KEY_U;\n}" ({) "{" (labeled_statement) "public:\n static KeyboardMap defaultMap() {\n return KeyboardMap();\n }" (statement_identifier) "public" (:) ":" (ERROR) "static KeyboardMap defaultMap()" (storage_class_specifier) "static" (static) "static" (type_identifier) "KeyboardMap" (function_declarator) "defaultMap()" (identifier) "defaultMap" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return KeyboardMap();\n }" ({) "{" (return_statement) "return KeyboardMap();" (return) "return" (call_expression) "KeyboardMap()" (identifier) "KeyboardMap" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "// Left Stick" (declaration) "uint16_t LLeft = KEY_A;" (primitive_type) "uint16_t" (init_declarator) "LLeft = KEY_A" (identifier) "LLeft" (=) "=" (identifier) "KEY_A" (;) ";" (declaration) "uint16_t LRight = KEY_D;" (primitive_type) "uint16_t" (init_declarator) "LRight = KEY_D" (identifier) "LRight" (=) "=" (identifier) "KEY_D" (;) ";" (declaration) "uint16_t LUp = KEY_W;" (primitive_type) "uint16_t" (init_declarator) "LUp = KEY_W" (identifier) "LUp" (=) "=" (identifier) "KEY_W" (;) ";" (declaration) "uint16_t LDown = KEY_S;" (primitive_type) "uint16_t" (init_declarator) "LDown = KEY_S" (identifier) "LDown" (=) "=" (identifier) "KEY_S" (;) ";" (comment) "// Right Stick" (declaration) "uint16_t RLeft = KEY_LEFT;" (primitive_type) "uint16_t" (init_declarator) "RLeft = KEY_LEFT" (identifier) "RLeft" (=) "=" (identifier) "KEY_LEFT" (;) ";" (declaration) "uint16_t RRight = KEY_RIGHT;" (primitive_type) "uint16_t" (init_declarator) "RRight = KEY_RIGHT" (identifier) "RRight" (=) "=" (identifier) "KEY_RIGHT" (;) ";" (declaration) "uint16_t RUp = KEY_UP;" (primitive_type) "uint16_t" (init_declarator) "RUp = KEY_UP" (identifier) "RUp" (=) "=" (identifier) "KEY_UP" (;) ";" (declaration) "uint16_t RDown = KEY_DOWN;" (primitive_type) "uint16_t" (init_declarator) "RDown = KEY_DOWN" (identifier) "RDown" (=) "=" (identifier) "KEY_DOWN" (;) ";" (comment) "// DPad" (declaration) "uint16_t DLeft = KEY_KP_4;" (primitive_type) "uint16_t" (init_declarator) "DLeft = KEY_KP_4" (identifier) "DLeft" (=) "=" (identifier) "KEY_KP_4" (;) ";" (declaration) "uint16_t DRight = KEY_KP_6;" (primitive_type) "uint16_t" (init_declarator) "DRight = KEY_KP_6" (identifier) "DRight" (=) "=" (identifier) "KEY_KP_6" (;) ";" (declaration) "uint16_t DUp = KEY_KP_8;" (primitive_type) "uint16_t" (init_declarator) "DUp = KEY_KP_8" (identifier) "DUp" (=) "=" (identifier) "KEY_KP_8" (;) ";" (declaration) "uint16_t DDown = KEY_KP_5;" (primitive_type) "uint16_t" (init_declarator) "DDown = KEY_KP_5" (identifier) "DDown" (=) "=" (identifier) "KEY_KP_5" (;) ";" (comment) "// Face Buttons" (declaration) "uint16_t A = KEY_L;" (primitive_type) "uint16_t" (init_declarator) "A = KEY_L" (identifier) "A" (=) "=" (identifier) "KEY_L" (;) ";" (declaration) "uint16_t B = KEY_O;" (primitive_type) "uint16_t" (init_declarator) "B = KEY_O" (identifier) "B" (=) "=" (identifier) "KEY_O" (;) ";" (declaration) "uint16_t X = KEY_K;" (primitive_type) "uint16_t" (init_declarator) "X = KEY_K" (identifier) "X" (=) "=" (identifier) "KEY_K" (;) ";" (declaration) "uint16_t Y = KEY_I;" (primitive_type) "uint16_t" (init_declarator) "Y = KEY_I" (identifier) "Y" (=) "=" (identifier) "KEY_I" (;) ";" (comment) "// Top" (declaration) "uint16_t LB = KEY_Q;" (primitive_type) "uint16_t" (init_declarator) "LB = KEY_Q" (identifier) "LB" (=) "=" (identifier) "KEY_Q" (;) ";" (declaration) "uint16_t RB = KEY_P;" (primitive_type) "uint16_t" (init_declarator) "RB = KEY_P" (identifier) "RB" (=) "=" (identifier) "KEY_P" (;) ";" (declaration) "uint16_t LT = KEY_F;" (primitive_type) "uint16_t" (init_declarator) "LT = KEY_F" (identifier) "LT" (=) "=" (identifier) "KEY_F" (;) ";" (declaration) "uint16_t RT = KEY_J;" (primitive_type) "uint16_t" (init_declarator) "RT = KEY_J" (identifier) "RT" (=) "=" (identifier) "KEY_J" (;) ";" (comment) "// Menu" (declaration) "uint16_t Back = KEY_BACKSPACE;" (primitive_type) "uint16_t" (init_declarator) "Back = KEY_BACKSPACE" (identifier) "Back" (=) "=" (identifier) "KEY_BACKSPACE" (;) ";" (declaration) "uint16_t Start = KEY_ENTER;" (primitive_type) "uint16_t" (init_declarator) "Start = KEY_ENTER" (identifier) "Start" (=) "=" (identifier) "KEY_ENTER" (;) ";" (comment) "// Stick Buttons" (declaration) "uint16_t LThumb = KEY_E;" (primitive_type) "uint16_t" (init_declarator) "LThumb = KEY_E" (identifier) "LThumb" (=) "=" (identifier) "KEY_E" (;) ";" (declaration) "uint16_t RThumb = KEY_U;" (primitive_type) "uint16_t" (init_declarator) "RThumb = KEY_U" (identifier) "RThumb" (=) "=" (identifier) "KEY_U" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "//enum class KEY_TO_GAMEPAD {" (comment) "// " (comment) "// // Left Stick" (comment) "// LEFT = KEY_A," (comment) "// RIGHT = KEY_D," (comment) "// UP = KEY_W," (comment) "// DOWN = KEY_S," (comment) "//" (comment) "// // Right Stick" (comment) "// RLEFT = KEY_LEFT," (comment) "// RRIGHT = KEY_RIGHT," (comment) "// RUP = KEY_UP," (comment) "// RDOWN = KEY_DOWN," (comment) "//" (comment) "// // DPad" (comment) "// DLEFT = KEY_KP_4," (comment) "// DRIGHT = KEY_KP_6," (comment) "// DUP = KEY_KP_8," (comment) "// DDOWN = KEY_KP_5," (comment) "// " (comment) "// // Face Buttons" (comment) "// A = KEY_L," (comment) "// B = KEY_O," (comment) "// X = KEY_K," (comment) "// Y = KEY_I," (comment) "//" (comment) "// // Menu" (comment) "// BACK = KEY_BACKSPACE," (comment) "// START = KEY_ENTER," (comment) "//" (comment) "// // Top" (comment) "// LB = KEY_Q," (comment) "// RB = KEY_P," (comment) "// LT = KEY_F," (comment) "// RT = KEY_J," (comment) "//" (comment) "// // Stick buttons" (comment) "// LTHUMB = KEY_C," (comment) "// RTHUMB = KEY_M" (comment) "//" (comment) "//};" (comment) "//enum class KEY_TO_GAMEPAD2" (comment) "//{" (comment) "// LEFT = KEY_LEFT," (comment) "// RIGHT = KEY_RIGHT," (comment) "// UP = KEY_UP," (comment) "// DOWN = KEY_DOWN," (comment) "// A = KEY_KP_1," (comment) "// B = KEY_KP_2," (comment) "// X = KEY_KP_4," (comment) "// Y = KEY_KP_5," (comment) "// BACK = KEY_KP_MULTIPLY," (comment) "// START = KEY_KP_MINUS," (comment) "// LB = KEY_KP_7," (comment) "// RB = KEY_KP_8," (comment) "// LT = KEY_KP_6," (comment) "// RT = KEY_KP_3," (comment) "// LTHUMB = KEY_KP_0," (comment) "// RTHUMB = KEY_KP_PERIOD" (comment) "//};"
278
1
{"language": "c", "success": true, "metadata": {"lines": 100, "avg_line_length": 16.79, "nodes": 162, "errors": 0, "source_hash": "f00b0c7f577c4f41f7d40f7e707c14f5ca4d59b0138e2fc2b2b5083965f296e2", "categorized_nodes": 84}, "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 \"parsec.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": "\"parsec.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 19}}, {"id": 6, "type": "function_definition", "text": "class KeyboardMap\n{\npublic:\n\tstatic KeyboardMap defaultMap() {\n\t\treturn KeyboardMap();\n\t};\n\n\t// Left Stick\n\tuint16_t LLeft = KEY_A;\n\tuint16_t LRight = KEY_D;\n\tuint16_t LUp = KEY_W;\n\tuint16_t LDown = KEY_S;\n\n\t// Right Stick\n\tuint16_t RLeft = KEY_LEFT;\n\tuint16_t RRight = KEY_RIGHT;\n\tuint16_t RUp = KEY_UP;\n\tuint16_t RDown = KEY_DOWN;\n\n\t// DPad\n\tuint16_t DLeft = KEY_KP_4;\n\tuint16_t DRight = KEY_KP_6;\n\tuint16_t DUp = KEY_KP_8;\n\tuint16_t DDown = KEY_KP_5;\n\n\t// Face Buttons\n\tuint16_t A = KEY_L;\n\tuint16_t B = KEY_O;\n\tuint16_t X = KEY_K;\n\tuint16_t Y = KEY_I;\n\n\t// Top\n\tuint16_t LB = KEY_Q;\n\tuint16_t RB = KEY_P;\n\tuint16_t LT = KEY_F;\n\tuint16_t RT = KEY_J;\n\n\t// Menu\n\tuint16_t Back = KEY_BACKSPACE;\n\tuint16_t Start = KEY_ENTER;\n\n\t// Stick Buttons\n\tuint16_t LThumb = KEY_E;\n\tuint16_t RThumb = KEY_U;\n}", "parent": null, "children": [7], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 7, "type": "identifier", "text": "KeyboardMap", "parent": 6, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 17}}, {"id": 8, "type": "labeled_statement", "text": "public:\n\tstatic KeyboardMap defaultMap() {\n\t\treturn KeyboardMap();\n\t}", "parent": 6, "children": [9], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 9, "column": 2}}, {"id": 9, "type": "ERROR", "text": "static KeyboardMap defaultMap()", "parent": 8, "children": [10, 11], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 32}}, {"id": 10, "type": "type_identifier", "text": "KeyboardMap", "parent": 9, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 19}}, {"id": 11, "type": "function_declarator", "text": "defaultMap()", "parent": 9, "children": [12, 13], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 32}}, {"id": 12, "type": "identifier", "text": "defaultMap", "parent": 11, "children": [], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 30}}, {"id": 13, "type": "parameter_list", "text": "()", "parent": 11, "children": [], "start_point": {"row": 7, "column": 30}, "end_point": {"row": 7, "column": 32}}, {"id": 14, "type": "return_statement", "text": "return KeyboardMap();", "parent": 8, "children": [15], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 23}}, {"id": 15, "type": "call_expression", "text": "KeyboardMap()", "parent": 14, "children": [16, 17], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 22}}, {"id": 16, "type": "identifier", "text": "KeyboardMap", "parent": 15, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 20}}, {"id": 17, "type": "argument_list", "text": "()", "parent": 15, "children": [], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 22}}, {"id": 18, "type": "declaration", "text": "uint16_t LLeft = KEY_A;", "parent": 6, "children": [19, 20], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 24}}, {"id": 19, "type": "primitive_type", "text": "uint16_t", "parent": 18, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 20, "type": "init_declarator", "text": "LLeft = KEY_A", "parent": 18, "children": [21, 22, 23], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 23}}, {"id": 21, "type": "identifier", "text": "LLeft", "parent": 20, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 15}}, {"id": 22, "type": "=", "text": "=", "parent": 20, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 17}}, {"id": 23, "type": "identifier", "text": "KEY_A", "parent": 20, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 23}}, {"id": 24, "type": "declaration", "text": "uint16_t LRight = KEY_D;", "parent": 6, "children": [25, 26], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 25}}, {"id": 25, "type": "primitive_type", "text": "uint16_t", "parent": 24, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 26, "type": "init_declarator", "text": "LRight = KEY_D", "parent": 24, "children": [27, 28, 29], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 24}}, {"id": 27, "type": "identifier", "text": "LRight", "parent": 26, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 16}}, {"id": 28, "type": "=", "text": "=", "parent": 26, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 18}}, {"id": 29, "type": "identifier", "text": "KEY_D", "parent": 26, "children": [], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 24}}, {"id": 30, "type": "declaration", "text": "uint16_t LUp = KEY_W;", "parent": 6, "children": [31, 32], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 22}}, {"id": 31, "type": "primitive_type", "text": "uint16_t", "parent": 30, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 32, "type": "init_declarator", "text": "LUp = KEY_W", "parent": 30, "children": [33, 34, 35], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 21}}, {"id": 33, "type": "identifier", "text": "LUp", "parent": 32, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 13}}, {"id": 34, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 15}}, {"id": 35, "type": "identifier", "text": "KEY_W", "parent": 32, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 21}}, {"id": 36, "type": "declaration", "text": "uint16_t LDown = KEY_S;", "parent": 6, "children": [37, 38], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 24}}, {"id": 37, "type": "primitive_type", "text": "uint16_t", "parent": 36, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 38, "type": "init_declarator", "text": "LDown = KEY_S", "parent": 36, "children": [39, 40, 41], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 23}}, {"id": 39, "type": "identifier", "text": "LDown", "parent": 38, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 15}}, {"id": 40, "type": "=", "text": "=", "parent": 38, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 17}}, {"id": 41, "type": "identifier", "text": "KEY_S", "parent": 38, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 23}}, {"id": 42, "type": "declaration", "text": "uint16_t RLeft = KEY_LEFT;", "parent": 6, "children": [43, 44], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 27}}, {"id": 43, "type": "primitive_type", "text": "uint16_t", "parent": 42, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 9}}, {"id": 44, "type": "init_declarator", "text": "RLeft = KEY_LEFT", "parent": 42, "children": [45, 46, 47], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 26}}, {"id": 45, "type": "identifier", "text": "RLeft", "parent": 44, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 15}}, {"id": 46, "type": "=", "text": "=", "parent": 44, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 17}}, {"id": 47, "type": "identifier", "text": "KEY_LEFT", "parent": 44, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 26}}, {"id": 48, "type": "declaration", "text": "uint16_t RRight = KEY_RIGHT;", "parent": 6, "children": [49, 50], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 29}}, {"id": 49, "type": "primitive_type", "text": "uint16_t", "parent": 48, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 9}}, {"id": 50, "type": "init_declarator", "text": "RRight = KEY_RIGHT", "parent": 48, "children": [51, 52, 53], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 28}}, {"id": 51, "type": "identifier", "text": "RRight", "parent": 50, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 16}}, {"id": 52, "type": "=", "text": "=", "parent": 50, "children": [], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 18}}, {"id": 53, "type": "identifier", "text": "KEY_RIGHT", "parent": 50, "children": [], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 28}}, {"id": 54, "type": "declaration", "text": "uint16_t RUp = KEY_UP;", "parent": 6, "children": [55, 56], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 23}}, {"id": 55, "type": "primitive_type", "text": "uint16_t", "parent": 54, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 56, "type": "init_declarator", "text": "RUp = KEY_UP", "parent": 54, "children": [57, 58, 59], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 22}}, {"id": 57, "type": "identifier", "text": "RUp", "parent": 56, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 13}}, {"id": 58, "type": "=", "text": "=", "parent": 56, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 15}}, {"id": 59, "type": "identifier", "text": "KEY_UP", "parent": 56, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 22}}, {"id": 60, "type": "declaration", "text": "uint16_t RDown = KEY_DOWN;", "parent": 6, "children": [61, 62], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 27}}, {"id": 61, "type": "primitive_type", "text": "uint16_t", "parent": 60, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 62, "type": "init_declarator", "text": "RDown = KEY_DOWN", "parent": 60, "children": [63, 64, 65], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 26}}, {"id": 63, "type": "identifier", "text": "RDown", "parent": 62, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 15}}, {"id": 64, "type": "=", "text": "=", "parent": 62, "children": [], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 17}}, {"id": 65, "type": "identifier", "text": "KEY_DOWN", "parent": 62, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 26}}, {"id": 66, "type": "declaration", "text": "uint16_t DLeft = KEY_KP_4;", "parent": 6, "children": [67, 68], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 27}}, {"id": 67, "type": "primitive_type", "text": "uint16_t", "parent": 66, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 9}}, {"id": 68, "type": "init_declarator", "text": "DLeft = KEY_KP_4", "parent": 66, "children": [69, 70, 71], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 26}}, {"id": 69, "type": "identifier", "text": "DLeft", "parent": 68, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 15}}, {"id": 70, "type": "=", "text": "=", "parent": 68, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 17}}, {"id": 71, "type": "identifier", "text": "KEY_KP_4", "parent": 68, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 26}}, {"id": 72, "type": "declaration", "text": "uint16_t DRight = KEY_KP_6;", "parent": 6, "children": [73, 74], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 28}}, {"id": 73, "type": "primitive_type", "text": "uint16_t", "parent": 72, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 9}}, {"id": 74, "type": "init_declarator", "text": "DRight = KEY_KP_6", "parent": 72, "children": [75, 76, 77], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 27}}, {"id": 75, "type": "identifier", "text": "DRight", "parent": 74, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 16}}, {"id": 76, "type": "=", "text": "=", "parent": 74, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 18}}, {"id": 77, "type": "identifier", "text": "KEY_KP_6", "parent": 74, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 27}}, {"id": 78, "type": "declaration", "text": "uint16_t DUp = KEY_KP_8;", "parent": 6, "children": [79, 80], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 25}}, {"id": 79, "type": "primitive_type", "text": "uint16_t", "parent": 78, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 9}}, {"id": 80, "type": "init_declarator", "text": "DUp = KEY_KP_8", "parent": 78, "children": [81, 82, 83], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 24}}, {"id": 81, "type": "identifier", "text": "DUp", "parent": 80, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 13}}, {"id": 82, "type": "=", "text": "=", "parent": 80, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 15}}, {"id": 83, "type": "identifier", "text": "KEY_KP_8", "parent": 80, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 24}}, {"id": 84, "type": "declaration", "text": "uint16_t DDown = KEY_KP_5;", "parent": 6, "children": [85, 86], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 27}}, {"id": 85, "type": "primitive_type", "text": "uint16_t", "parent": 84, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 9}}, {"id": 86, "type": "init_declarator", "text": "DDown = KEY_KP_5", "parent": 84, "children": [87, 88, 89], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 26}}, {"id": 87, "type": "identifier", "text": "DDown", "parent": 86, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 15}}, {"id": 88, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 89, "type": "identifier", "text": "KEY_KP_5", "parent": 86, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 26}}, {"id": 90, "type": "declaration", "text": "uint16_t A = KEY_L;", "parent": 6, "children": [91, 92], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 20}}, {"id": 91, "type": "primitive_type", "text": "uint16_t", "parent": 90, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 9}}, {"id": 92, "type": "init_declarator", "text": "A = KEY_L", "parent": 90, "children": [93, 94, 95], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 19}}, {"id": 93, "type": "identifier", "text": "A", "parent": 92, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 11}}, {"id": 94, "type": "=", "text": "=", "parent": 92, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 13}}, {"id": 95, "type": "identifier", "text": "KEY_L", "parent": 92, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 19}}, {"id": 96, "type": "declaration", "text": "uint16_t B = KEY_O;", "parent": 6, "children": [97, 98], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 20}}, {"id": 97, "type": "primitive_type", "text": "uint16_t", "parent": 96, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 9}}, {"id": 98, "type": "init_declarator", "text": "B = KEY_O", "parent": 96, "children": [99, 100, 101], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 19}}, {"id": 99, "type": "identifier", "text": "B", "parent": 98, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 11}}, {"id": 100, "type": "=", "text": "=", "parent": 98, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 13}}, {"id": 101, "type": "identifier", "text": "KEY_O", "parent": 98, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 19}}, {"id": 102, "type": "declaration", "text": "uint16_t X = KEY_K;", "parent": 6, "children": [103, 104], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 20}}, {"id": 103, "type": "primitive_type", "text": "uint16_t", "parent": 102, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 9}}, {"id": 104, "type": "init_declarator", "text": "X = KEY_K", "parent": 102, "children": [105, 106, 107], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 19}}, {"id": 105, "type": "identifier", "text": "X", "parent": 104, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 11}}, {"id": 106, "type": "=", "text": "=", "parent": 104, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 13}}, {"id": 107, "type": "identifier", "text": "KEY_K", "parent": 104, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 19}}, {"id": 108, "type": "declaration", "text": "uint16_t Y = KEY_I;", "parent": 6, "children": [109, 110], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 20}}, {"id": 109, "type": "primitive_type", "text": "uint16_t", "parent": 108, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 9}}, {"id": 110, "type": "init_declarator", "text": "Y = KEY_I", "parent": 108, "children": [111, 112, 113], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 19}}, {"id": 111, "type": "identifier", "text": "Y", "parent": 110, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 11}}, {"id": 112, "type": "=", "text": "=", "parent": 110, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 13}}, {"id": 113, "type": "identifier", "text": "KEY_I", "parent": 110, "children": [], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 19}}, {"id": 114, "type": "declaration", "text": "uint16_t LB = KEY_Q;", "parent": 6, "children": [115, 116], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 21}}, {"id": 115, "type": "primitive_type", "text": "uint16_t", "parent": 114, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 9}}, {"id": 116, "type": "init_declarator", "text": "LB = KEY_Q", "parent": 114, "children": [117, 118, 119], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 20}}, {"id": 117, "type": "identifier", "text": "LB", "parent": 116, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 12}}, {"id": 118, "type": "=", "text": "=", "parent": 116, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 14}}, {"id": 119, "type": "identifier", "text": "KEY_Q", "parent": 116, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 20}}, {"id": 120, "type": "declaration", "text": "uint16_t RB = KEY_P;", "parent": 6, "children": [121, 122], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 21}}, {"id": 121, "type": "primitive_type", "text": "uint16_t", "parent": 120, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 9}}, {"id": 122, "type": "init_declarator", "text": "RB = KEY_P", "parent": 120, "children": [123, 124, 125], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 20}}, {"id": 123, "type": "identifier", "text": "RB", "parent": 122, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 12}}, {"id": 124, "type": "=", "text": "=", "parent": 122, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 14}}, {"id": 125, "type": "identifier", "text": "KEY_P", "parent": 122, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 20}}, {"id": 126, "type": "declaration", "text": "uint16_t LT = KEY_F;", "parent": 6, "children": [127, 128], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 21}}, {"id": 127, "type": "primitive_type", "text": "uint16_t", "parent": 126, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 9}}, {"id": 128, "type": "init_declarator", "text": "LT = KEY_F", "parent": 126, "children": [129, 130, 131], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 20}}, {"id": 129, "type": "identifier", "text": "LT", "parent": 128, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 12}}, {"id": 130, "type": "=", "text": "=", "parent": 128, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 14}}, {"id": 131, "type": "identifier", "text": "KEY_F", "parent": 128, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 20}}, {"id": 132, "type": "declaration", "text": "uint16_t RT = KEY_J;", "parent": 6, "children": [133, 134], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 21}}, {"id": 133, "type": "primitive_type", "text": "uint16_t", "parent": 132, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 9}}, {"id": 134, "type": "init_declarator", "text": "RT = KEY_J", "parent": 132, "children": [135, 136, 137], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 20}}, {"id": 135, "type": "identifier", "text": "RT", "parent": 134, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 12}}, {"id": 136, "type": "=", "text": "=", "parent": 134, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 14}}, {"id": 137, "type": "identifier", "text": "KEY_J", "parent": 134, "children": [], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 20}}, {"id": 138, "type": "declaration", "text": "uint16_t Back = KEY_BACKSPACE;", "parent": 6, "children": [139, 140], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 31}}, {"id": 139, "type": "primitive_type", "text": "uint16_t", "parent": 138, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 9}}, {"id": 140, "type": "init_declarator", "text": "Back = KEY_BACKSPACE", "parent": 138, "children": [141, 142, 143], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 30}}, {"id": 141, "type": "identifier", "text": "Back", "parent": 140, "children": [], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 14}}, {"id": 142, "type": "=", "text": "=", "parent": 140, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 16}}, {"id": 143, "type": "identifier", "text": "KEY_BACKSPACE", "parent": 140, "children": [], "start_point": {"row": 42, "column": 17}, "end_point": {"row": 42, "column": 30}}, {"id": 144, "type": "declaration", "text": "uint16_t Start = KEY_ENTER;", "parent": 6, "children": [145, 146], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 28}}, {"id": 145, "type": "primitive_type", "text": "uint16_t", "parent": 144, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 9}}, {"id": 146, "type": "init_declarator", "text": "Start = KEY_ENTER", "parent": 144, "children": [147, 148, 149], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 27}}, {"id": 147, "type": "identifier", "text": "Start", "parent": 146, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 15}}, {"id": 148, "type": "=", "text": "=", "parent": 146, "children": [], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 17}}, {"id": 149, "type": "identifier", "text": "KEY_ENTER", "parent": 146, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 27}}, {"id": 150, "type": "declaration", "text": "uint16_t LThumb = KEY_E;", "parent": 6, "children": [151, 152], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 25}}, {"id": 151, "type": "primitive_type", "text": "uint16_t", "parent": 150, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 9}}, {"id": 152, "type": "init_declarator", "text": "LThumb = KEY_E", "parent": 150, "children": [153, 154, 155], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 24}}, {"id": 153, "type": "identifier", "text": "LThumb", "parent": 152, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 16}}, {"id": 154, "type": "=", "text": "=", "parent": 152, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 18}}, {"id": 155, "type": "identifier", "text": "KEY_E", "parent": 152, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 24}}, {"id": 156, "type": "declaration", "text": "uint16_t RThumb = KEY_U;", "parent": 6, "children": [157, 158], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 25}}, {"id": 157, "type": "primitive_type", "text": "uint16_t", "parent": 156, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 9}}, {"id": 158, "type": "init_declarator", "text": "RThumb = KEY_U", "parent": 156, "children": [159, 160, 161], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 24}}, {"id": 159, "type": "identifier", "text": "RThumb", "parent": 158, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 16}}, {"id": 160, "type": "=", "text": "=", "parent": 158, "children": [], "start_point": {"row": 47, "column": 17}, "end_point": {"row": 47, "column": 18}}, {"id": 161, "type": "identifier", "text": "KEY_U", "parent": 158, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 24}}]}, "node_categories": {"declarations": {"functions": [6, 11], "variables": [18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [15], "assignments": [], "loops": [], "conditionals": [7, 10, 12, 16, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, 57, 59, 63, 65, 69, 71, 75, 77, 81, 83, 87, 89, 93, 95, 99, 101, 105, 107, 111, 113, 117, 119, 123, 125, 129, 131, 135, 137, 141, 143, 147, 149, 153, 155, 159, 161], "returns": [14], "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": "KeyboardMap", "text_snippet": "class KeyboardMap\n{\npublic:\n\tstatic KeyboardMap defaultMap() {\n\t\treturn KeyboardMap();\n\t};\n\n\t// Left"}, {"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "defaultMap()"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"parsec.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"parsec.h\"\n\nclass KeyboardMap\n{\npublic:\n\tstatic KeyboardMap defaultMap() {\n\t\treturn KeyboardMap();\n\t};\n\n\t// Left Stick\n\tuint16_t LLeft = KEY_A;\n\tuint16_t LRight = KEY_D;\n\tuint16_t LUp = KEY_W;\n\tuint16_t LDown = KEY_S;\n\n\t// Right Stick\n\tuint16_t RLeft = KEY_LEFT;\n\tuint16_t RRight = KEY_RIGHT;\n\tuint16_t RUp = KEY_UP;\n\tuint16_t RDown = KEY_DOWN;\n\n\t// DPad\n\tuint16_t DLeft = KEY_KP_4;\n\tuint16_t DRight = KEY_KP_6;\n\tuint16_t DUp = KEY_KP_8;\n\tuint16_t DDown = KEY_KP_5;\n\n\t// Face Buttons\n\tuint16_t A = KEY_L;\n\tuint16_t B = KEY_O;\n\tuint16_t X = KEY_K;\n\tuint16_t Y = KEY_I;\n\n\t// Top\n\tuint16_t LB = KEY_Q;\n\tuint16_t RB = KEY_P;\n\tuint16_t LT = KEY_F;\n\tuint16_t RT = KEY_J;\n\n\t// Menu\n\tuint16_t Back = KEY_BACKSPACE;\n\tuint16_t Start = KEY_ENTER;\n\n\t// Stick Buttons\n\tuint16_t LThumb = KEY_E;\n\tuint16_t RThumb = KEY_U;\n};\n\n//enum class KEY_TO_GAMEPAD {\n//\t\n//\t// Left Stick\n//\tLEFT = KEY_A,\n//\tRIGHT = KEY_D,\n//\tUP = KEY_W,\n//\tDOWN = KEY_S,\n//\n//\t// Right Stick\n//\tRLEFT = KEY_LEFT,\n//\tRRIGHT = KEY_RIGHT,\n//\tRUP = KEY_UP,\n//\tRDOWN = KEY_DOWN,\n//\n//\t// DPad\n//\tDLEFT = KEY_KP_4,\n//\tDRIGHT = KEY_KP_6,\n//\tDUP = KEY_KP_8,\n//\tDDOWN = KEY_KP_5,\n//\t\n//\t// Face Buttons\n//\tA = KEY_L,\n//\tB = KEY_O,\n//\tX = KEY_K,\n//\tY = KEY_I,\n//\n//\t// Menu\n//\tBACK = KEY_BACKSPACE,\n//\tSTART = KEY_ENTER,\n//\n//\t// Top\n//\tLB = KEY_Q,\n//\tRB = KEY_P,\n//\tLT = KEY_F,\n//\tRT = KEY_J,\n//\n//\t// Stick buttons\n//\tLTHUMB = KEY_C,\n//\tRTHUMB = KEY_M\n//\n//};\n\n//enum class KEY_TO_GAMEPAD2\n//{\n//\tLEFT = KEY_LEFT,\n//\tRIGHT = KEY_RIGHT,\n//\tUP = KEY_UP,\n//\tDOWN = KEY_DOWN,\n//\tA = KEY_KP_1,\n//\tB = KEY_KP_2,\n//\tX = KEY_KP_4,\n//\tY = KEY_KP_5,\n//\tBACK = KEY_KP_MULTIPLY,\n//\tSTART = KEY_KP_MINUS,\n//\tLB = KEY_KP_7,\n//\tRB = KEY_KP_8,\n//\tLT = KEY_KP_6,\n//\tRT = KEY_KP_3,\n//\tLTHUMB = KEY_KP_0,\n//\tRTHUMB = KEY_KP_PERIOD\n//};\n"}
80,980
c
//add at any index of array #include<stdio.h> #define MAX 5 int main() { array[MAX] = {1,5,6,7}; int N = 4; int index = 3; int value = 9; printf("The array before assertion\n"); for (int i = 0; i < N; ++i) { printf("array[%d] = %d\n",i,array[i]); } N++; for (int i = N; i >= index ; i--) { array[i+1] = array[i]; } array[index] = value; printf("array after changed\n"); for (int i = 0; i < N; ++i) { printf("array[%d] = %d\n",i,array[i]); } return 0; }
17.63
27
(translation_unit) "//add at any index of array \n#include<stdio.h> \n#define MAX 5 \nint main() \n{ \n array[MAX] = {1,5,6,7}; \n int N = 4; \n int index = 3; \n int value = 9; \n printf("The array before assertion\n"); \n for (int i = 0; i < N; ++i) \n { \n printf("array[%d] = %d\n",i,array[i]); \n } \n N++; \n for (int i = N; i >= index ; i--) \n { \n array[i+1] = array[i]; \n } \n array[index] = value; \n printf("array after changed\n"); \n for (int i = 0; i < N; ++i) \n { \n printf("array[%d] = %d\n",i,array[i]); \n } \n return 0; \n}" (comment) "//add at any index of array " (preproc_include) "#include<stdio.h> \n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_def) "#define MAX 5 \n" (#define) "#define" (identifier) "MAX" (preproc_arg) "5 " (function_definition) "int main() \n{ \n array[MAX] = {1,5,6,7}; \n int N = 4; \n int index = 3; \n int value = 9; \n printf("The array before assertion\n"); \n for (int i = 0; i < N; ++i) \n { \n printf("array[%d] = %d\n",i,array[i]); \n } \n N++; \n for (int i = N; i >= index ; i--) \n { \n array[i+1] = array[i]; \n } \n array[index] = value; \n printf("array after changed\n"); \n for (int i = 0; i < N; ++i) \n { \n printf("array[%d] = %d\n",i,array[i]); \n } \n return 0; \n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n array[MAX] = {1,5,6,7}; \n int N = 4; \n int index = 3; \n int value = 9; \n printf("The array before assertion\n"); \n for (int i = 0; i < N; ++i) \n { \n printf("array[%d] = %d\n",i,array[i]); \n } \n N++; \n for (int i = N; i >= index ; i--) \n { \n array[i+1] = array[i]; \n } \n array[index] = value; \n printf("array after changed\n"); \n for (int i = 0; i < N; ++i) \n { \n printf("array[%d] = %d\n",i,array[i]); \n } \n return 0; \n}" ({) "{" (expression_statement) "array[MAX] = {1,5,6,7};" (comma_expression) "array[MAX] = {1,5,6,7" (assignment_expression) "array[MAX] = {1" (subscript_expression) "array[MAX]" (identifier) "array" ([) "[" (identifier) "MAX" (]) "]" (=) "=" (ERROR) "{" ({) "{" (number_literal) "1" (,) "," (comma_expression) "5,6,7" (number_literal) "5" (,) "," (comma_expression) "6,7" (number_literal) "6" (,) "," (number_literal) "7" (ERROR) "}" (}) "}" (;) ";" (declaration) "int N = 4;" (primitive_type) "int" (init_declarator) "N = 4" (identifier) "N" (=) "=" (number_literal) "4" (;) ";" (declaration) "int index = 3;" (primitive_type) "int" (init_declarator) "index = 3" (identifier) "index" (=) "=" (number_literal) "3" (;) ";" (declaration) "int value = 9;" (primitive_type) "int" (init_declarator) "value = 9" (identifier) "value" (=) "=" (number_literal) "9" (;) ";" (expression_statement) "printf("The array before assertion\n");" (call_expression) "printf("The array before assertion\n")" (identifier) "printf" (argument_list) "("The array before assertion\n")" (() "(" (string_literal) ""The array before assertion\n"" (") """ (string_content) "The array before assertion" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (for_statement) "for (int i = 0; i < N; ++i) \n { \n printf("array[%d] = %d\n",i,array[i]); \n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < N" (identifier) "i" (<) "<" (identifier) "N" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{ \n printf("array[%d] = %d\n",i,array[i]); \n }" ({) "{" (expression_statement) "printf("array[%d] = %d\n",i,array[i]);" (call_expression) "printf("array[%d] = %d\n",i,array[i])" (identifier) "printf" (argument_list) "("array[%d] = %d\n",i,array[i])" (() "(" (string_literal) ""array[%d] = %d\n"" (") """ (string_content) "array[%d] = %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "i" (,) "," (subscript_expression) "array[i]" (identifier) "array" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "N++;" (update_expression) "N++" (identifier) "N" (++) "++" (;) ";" (for_statement) "for (int i = N; i >= index ; i--) \n { \n array[i+1] = array[i]; \n }" (for) "for" (() "(" (declaration) "int i = N;" (primitive_type) "int" (init_declarator) "i = N" (identifier) "i" (=) "=" (identifier) "N" (;) ";" (binary_expression) "i >= index" (identifier) "i" (>=) ">=" (identifier) "index" (;) ";" (update_expression) "i--" (identifier) "i" (--) "--" ()) ")" (compound_statement) "{ \n array[i+1] = array[i]; \n }" ({) "{" (expression_statement) "array[i+1] = array[i];" (assignment_expression) "array[i+1] = array[i]" (subscript_expression) "array[i+1]" (identifier) "array" ([) "[" (binary_expression) "i+1" (identifier) "i" (+) "+" (number_literal) "1" (]) "]" (=) "=" (subscript_expression) "array[i]" (identifier) "array" ([) "[" (identifier) "i" (]) "]" (;) ";" (}) "}" (expression_statement) "array[index] = value;" (assignment_expression) "array[index] = value" (subscript_expression) "array[index]" (identifier) "array" ([) "[" (identifier) "index" (]) "]" (=) "=" (identifier) "value" (;) ";" (expression_statement) "printf("array after changed\n");" (call_expression) "printf("array after changed\n")" (identifier) "printf" (argument_list) "("array after changed\n")" (() "(" (string_literal) ""array after changed\n"" (") """ (string_content) "array after changed" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (for_statement) "for (int i = 0; i < N; ++i) \n { \n printf("array[%d] = %d\n",i,array[i]); \n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < N" (identifier) "i" (<) "<" (identifier) "N" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{ \n printf("array[%d] = %d\n",i,array[i]); \n }" ({) "{" (expression_statement) "printf("array[%d] = %d\n",i,array[i]);" (call_expression) "printf("array[%d] = %d\n",i,array[i])" (identifier) "printf" (argument_list) "("array[%d] = %d\n",i,array[i])" (() "(" (string_literal) ""array[%d] = %d\n"" (") """ (string_content) "array[%d] = %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "i" (,) "," (subscript_expression) "array[i]" (identifier) "array" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
229
2
{"language": "c", "success": true, "metadata": {"lines": 27, "avg_line_length": 17.63, "nodes": 134, "errors": 0, "source_hash": "f5fd695f23d980be9806b4a7dcadef29e4f2ccf8cf44a0afa8d6541955cf466b", "categorized_nodes": 92}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include<stdio.h>\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 17}}, {"id": 3, "type": "preproc_def", "text": "#define MAX 5\r\n", "parent": null, "children": [4, 5, 6], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 5, "type": "identifier", "text": "MAX", "parent": 3, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 11}}, {"id": 6, "type": "preproc_arg", "text": "5\r", "parent": 3, "children": [], "start_point": {"row": 2, "column": 12}, "end_point": {"row": 2, "column": 14}}, {"id": 7, "type": "function_definition", "text": "int main()\r\n{\r\n\tarray[MAX] = {1,5,6,7};\r\n\tint N = 4;\r\n\tint index = 3;\r\n\tint value = 9;\r\n\tprintf(\"The array before assertion\\n\");\r\n\tfor (int i = 0; i < N; ++i)\r\n\t{\r\n\t\tprintf(\"array[%d] = %d\\n\",i,array[i]);\r\n\t}\r\n\tN++;\r\n\tfor (int i = N; i >= index ; i--)\r\n\t{\r\n\t\tarray[i+1] = array[i];\r\n\t}\r\n\tarray[index] = value;\r\n\tprintf(\"array after changed\\n\");\r\n\tfor (int i = 0; i < N; ++i)\r\n\t{\r\n\t\tprintf(\"array[%d] = %d\\n\",i,array[i]);\r\n\t}\r\n\treturn 0;\r\n}", "parent": null, "children": [8, 9], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 8, "type": "primitive_type", "text": "int", "parent": 7, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 3}}, {"id": 9, "type": "function_declarator", "text": "main()", "parent": 7, "children": [10, 11], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 10}}, {"id": 10, "type": "identifier", "text": "main", "parent": 9, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 8}}, {"id": 11, "type": "parameter_list", "text": "()", "parent": 9, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 10}}, {"id": 12, "type": "comma_expression", "text": "array[MAX] = {1,5,6,7", "parent": 7, "children": [13, 19], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 22}}, {"id": 13, "type": "assignment_expression", "text": "array[MAX] = {1", "parent": 12, "children": [14, 17, 18], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 16}}, {"id": 14, "type": "subscript_expression", "text": "array[MAX]", "parent": 13, "children": [15, 16], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 11}}, {"id": 15, "type": "identifier", "text": "array", "parent": 14, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 6}}, {"id": 16, "type": "identifier", "text": "MAX", "parent": 14, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 10}}, {"id": 17, "type": "=", "text": "=", "parent": 13, "children": [], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 13}}, {"id": 18, "type": "number_literal", "text": "1", "parent": 13, "children": [], "start_point": {"row": 5, "column": 15}, "end_point": {"row": 5, "column": 16}}, {"id": 19, "type": "comma_expression", "text": "5,6,7", "parent": 12, "children": [20, 21], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 22}}, {"id": 20, "type": "number_literal", "text": "5", "parent": 19, "children": [], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 18}}, {"id": 21, "type": "comma_expression", "text": "6,7", "parent": 19, "children": [22, 23], "start_point": {"row": 5, "column": 19}, "end_point": {"row": 5, "column": 22}}, {"id": 22, "type": "number_literal", "text": "6", "parent": 21, "children": [], "start_point": {"row": 5, "column": 19}, "end_point": {"row": 5, "column": 20}}, {"id": 23, "type": "number_literal", "text": "7", "parent": 21, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 22}}, {"id": 24, "type": "declaration", "text": "int N = 4;", "parent": 7, "children": [25, 26], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 11}}, {"id": 25, "type": "primitive_type", "text": "int", "parent": 24, "children": [], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 4}}, {"id": 26, "type": "init_declarator", "text": "N = 4", "parent": 24, "children": [27, 28, 29], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 10}}, {"id": 27, "type": "identifier", "text": "N", "parent": 26, "children": [], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 6}}, {"id": 28, "type": "=", "text": "=", "parent": 26, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 8}}, {"id": 29, "type": "number_literal", "text": "4", "parent": 26, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 10}}, {"id": 30, "type": "declaration", "text": "int index = 3;", "parent": 7, "children": [31, 32], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 15}}, {"id": 31, "type": "primitive_type", "text": "int", "parent": 30, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 4}}, {"id": 32, "type": "init_declarator", "text": "index = 3", "parent": 30, "children": [33, 34, 35], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 14}}, {"id": 33, "type": "identifier", "text": "index", "parent": 32, "children": [], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 10}}, {"id": 34, "type": "=", "text": "=", "parent": 32, "children": [], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 12}}, {"id": 35, "type": "number_literal", "text": "3", "parent": 32, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 14}}, {"id": 36, "type": "declaration", "text": "int value = 9;", "parent": 7, "children": [37, 38], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 15}}, {"id": 37, "type": "primitive_type", "text": "int", "parent": 36, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 4}}, {"id": 38, "type": "init_declarator", "text": "value = 9", "parent": 36, "children": [39, 40, 41], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 14}}, {"id": 39, "type": "identifier", "text": "value", "parent": 38, "children": [], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 10}}, {"id": 40, "type": "=", "text": "=", "parent": 38, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 12}}, {"id": 41, "type": "number_literal", "text": "9", "parent": 38, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 14}}, {"id": 42, "type": "call_expression", "text": "printf(\"The array before assertion\\n\")", "parent": 7, "children": [43, 44], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 39}}, {"id": 43, "type": "identifier", "text": "printf", "parent": 42, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 7}}, {"id": 44, "type": "argument_list", "text": "(\"The array before assertion\\n\")", "parent": 42, "children": [45], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 39}}, {"id": 45, "type": "string_literal", "text": "\"The array before assertion\\n\"", "parent": 44, "children": [46], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 38}}, {"id": 46, "type": "escape_sequence", "text": "\\n", "parent": 45, "children": [], "start_point": {"row": 9, "column": 35}, "end_point": {"row": 9, "column": 37}}, {"id": 47, "type": "for_statement", "text": "for (int i = 0; i < N; ++i)\r\n\t{\r\n\t\tprintf(\"array[%d] = %d\\n\",i,array[i]);\r\n\t}", "parent": 7, "children": [48, 54, 58], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 13, "column": 2}}, {"id": 48, "type": "declaration", "text": "int i = 0;", "parent": 47, "children": [49, 50], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 16}}, {"id": 49, "type": "primitive_type", "text": "int", "parent": 48, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 9}}, {"id": 50, "type": "init_declarator", "text": "i = 0", "parent": 48, "children": [51, 52, 53], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 15}}, {"id": 51, "type": "identifier", "text": "i", "parent": 50, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 11}}, {"id": 52, "type": "=", "text": "=", "parent": 50, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 13}}, {"id": 53, "type": "number_literal", "text": "0", "parent": 50, "children": [], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 15}}, {"id": 54, "type": "binary_expression", "text": "i < N", "parent": 47, "children": [55, 56, 57], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 22}}, {"id": 55, "type": "identifier", "text": "i", "parent": 54, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 18}}, {"id": 56, "type": "<", "text": "<", "parent": 54, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 20}}, {"id": 57, "type": "identifier", "text": "N", "parent": 54, "children": [], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 22}}, {"id": 58, "type": "update_expression", "text": "++i", "parent": 47, "children": [59, 60], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 27}}, {"id": 59, "type": "++", "text": "++", "parent": 58, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 26}}, {"id": 60, "type": "identifier", "text": "i", "parent": 58, "children": [], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 27}}, {"id": 61, "type": "call_expression", "text": "printf(\"array[%d] = %d\\n\",i,array[i])", "parent": 47, "children": [62, 63], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 39}}, {"id": 62, "type": "identifier", "text": "printf", "parent": 61, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 8}}, {"id": 63, "type": "argument_list", "text": "(\"array[%d] = %d\\n\",i,array[i])", "parent": 61, "children": [64, 66, 67], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 39}}, {"id": 64, "type": "string_literal", "text": "\"array[%d] = %d\\n\"", "parent": 63, "children": [65], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 27}}, {"id": 65, "type": "escape_sequence", "text": "\\n", "parent": 64, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 26}}, {"id": 66, "type": "identifier", "text": "i", "parent": 63, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 29}}, {"id": 67, "type": "subscript_expression", "text": "array[i]", "parent": 63, "children": [68, 69], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 38}}, {"id": 68, "type": "identifier", "text": "array", "parent": 67, "children": [], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 12, "column": 35}}, {"id": 69, "type": "identifier", "text": "i", "parent": 67, "children": [], "start_point": {"row": 12, "column": 36}, "end_point": {"row": 12, "column": 37}}, {"id": 70, "type": "update_expression", "text": "N++", "parent": 7, "children": [71, 72], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 4}}, {"id": 71, "type": "identifier", "text": "N", "parent": 70, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 2}}, {"id": 72, "type": "++", "text": "++", "parent": 70, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 4}}, {"id": 73, "type": "for_statement", "text": "for (int i = N; i >= index ; i--)\r\n\t{\r\n\t\tarray[i+1] = array[i];\r\n\t}", "parent": 7, "children": [74, 80, 84], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 18, "column": 2}}, {"id": 74, "type": "declaration", "text": "int i = N;", "parent": 73, "children": [75, 76], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 16}}, {"id": 75, "type": "primitive_type", "text": "int", "parent": 74, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 9}}, {"id": 76, "type": "init_declarator", "text": "i = N", "parent": 74, "children": [77, 78, 79], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 15}}, {"id": 77, "type": "identifier", "text": "i", "parent": 76, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 11}}, {"id": 78, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 13}}, {"id": 79, "type": "identifier", "text": "N", "parent": 76, "children": [], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 15}}, {"id": 80, "type": "binary_expression", "text": "i >= index", "parent": 73, "children": [81, 82, 83], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 27}}, {"id": 81, "type": "identifier", "text": "i", "parent": 80, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 18}}, {"id": 82, "type": ">=", "text": ">=", "parent": 80, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 21}}, {"id": 83, "type": "identifier", "text": "index", "parent": 80, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 27}}, {"id": 84, "type": "update_expression", "text": "i--", "parent": 73, "children": [85, 86], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 33}}, {"id": 85, "type": "identifier", "text": "i", "parent": 84, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 31}}, {"id": 86, "type": "--", "text": "--", "parent": 84, "children": [], "start_point": {"row": 15, "column": 31}, "end_point": {"row": 15, "column": 33}}, {"id": 87, "type": "assignment_expression", "text": "array[i+1] = array[i]", "parent": 73, "children": [88, 94, 95], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 23}}, {"id": 88, "type": "subscript_expression", "text": "array[i+1]", "parent": 87, "children": [89, 90], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 12}}, {"id": 89, "type": "identifier", "text": "array", "parent": 88, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 7}}, {"id": 90, "type": "binary_expression", "text": "i+1", "parent": 88, "children": [91, 92, 93], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 11}}, {"id": 91, "type": "identifier", "text": "i", "parent": 90, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 9}}, {"id": 92, "type": "+", "text": "+", "parent": 90, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 10}}, {"id": 93, "type": "number_literal", "text": "1", "parent": 90, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 11}}, {"id": 94, "type": "=", "text": "=", "parent": 87, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 14}}, {"id": 95, "type": "subscript_expression", "text": "array[i]", "parent": 87, "children": [96, 97], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 23}}, {"id": 96, "type": "identifier", "text": "array", "parent": 95, "children": [], "start_point": {"row": 17, "column": 15}, "end_point": {"row": 17, "column": 20}}, {"id": 97, "type": "identifier", "text": "i", "parent": 95, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 22}}, {"id": 98, "type": "assignment_expression", "text": "array[index] = value", "parent": 7, "children": [99, 102, 103], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 21}}, {"id": 99, "type": "subscript_expression", "text": "array[index]", "parent": 98, "children": [100, 101], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 13}}, {"id": 100, "type": "identifier", "text": "array", "parent": 99, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 6}}, {"id": 101, "type": "identifier", "text": "index", "parent": 99, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 12}}, {"id": 102, "type": "=", "text": "=", "parent": 98, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 15}}, {"id": 103, "type": "identifier", "text": "value", "parent": 98, "children": [], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 21}}, {"id": 104, "type": "call_expression", "text": "printf(\"array after changed\\n\")", "parent": 7, "children": [105, 106], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 32}}, {"id": 105, "type": "identifier", "text": "printf", "parent": 104, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 7}}, {"id": 106, "type": "argument_list", "text": "(\"array after changed\\n\")", "parent": 104, "children": [107], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 32}}, {"id": 107, "type": "string_literal", "text": "\"array after changed\\n\"", "parent": 106, "children": [108], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 31}}, {"id": 108, "type": "escape_sequence", "text": "\\n", "parent": 107, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 30}}, {"id": 109, "type": "for_statement", "text": "for (int i = 0; i < N; ++i)\r\n\t{\r\n\t\tprintf(\"array[%d] = %d\\n\",i,array[i]);\r\n\t}", "parent": 7, "children": [110, 116, 120], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 24, "column": 2}}, {"id": 110, "type": "declaration", "text": "int i = 0;", "parent": 109, "children": [111, 112], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 16}}, {"id": 111, "type": "primitive_type", "text": "int", "parent": 110, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 9}}, {"id": 112, "type": "init_declarator", "text": "i = 0", "parent": 110, "children": [113, 114, 115], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 15}}, {"id": 113, "type": "identifier", "text": "i", "parent": 112, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 11}}, {"id": 114, "type": "=", "text": "=", "parent": 112, "children": [], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 13}}, {"id": 115, "type": "number_literal", "text": "0", "parent": 112, "children": [], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 15}}, {"id": 116, "type": "binary_expression", "text": "i < N", "parent": 109, "children": [117, 118, 119], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 22}}, {"id": 117, "type": "identifier", "text": "i", "parent": 116, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 18}}, {"id": 118, "type": "<", "text": "<", "parent": 116, "children": [], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 20}}, {"id": 119, "type": "identifier", "text": "N", "parent": 116, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 22}}, {"id": 120, "type": "update_expression", "text": "++i", "parent": 109, "children": [121, 122], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 27}}, {"id": 121, "type": "++", "text": "++", "parent": 120, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 26}}, {"id": 122, "type": "identifier", "text": "i", "parent": 120, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 27}}, {"id": 123, "type": "call_expression", "text": "printf(\"array[%d] = %d\\n\",i,array[i])", "parent": 109, "children": [124, 125], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 39}}, {"id": 124, "type": "identifier", "text": "printf", "parent": 123, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 8}}, {"id": 125, "type": "argument_list", "text": "(\"array[%d] = %d\\n\",i,array[i])", "parent": 123, "children": [126, 128, 129], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 39}}, {"id": 126, "type": "string_literal", "text": "\"array[%d] = %d\\n\"", "parent": 125, "children": [127], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 27}}, {"id": 127, "type": "escape_sequence", "text": "\\n", "parent": 126, "children": [], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 26}}, {"id": 128, "type": "identifier", "text": "i", "parent": 125, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 29}}, {"id": 129, "type": "subscript_expression", "text": "array[i]", "parent": 125, "children": [130, 131], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 38}}, {"id": 130, "type": "identifier", "text": "array", "parent": 129, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 35}}, {"id": 131, "type": "identifier", "text": "i", "parent": 129, "children": [], "start_point": {"row": 23, "column": 36}, "end_point": {"row": 23, "column": 37}}, {"id": 132, "type": "return_statement", "text": "return 0;", "parent": 7, "children": [133], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 10}}, {"id": 133, "type": "number_literal", "text": "0", "parent": 132, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 9}}]}, "node_categories": {"declarations": {"functions": [7, 9], "variables": [24, 30, 36, 48, 74, 110], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [12, 14, 19, 21, 42, 54, 58, 61, 67, 70, 80, 84, 88, 90, 95, 99, 104, 116, 120, 123, 129], "assignments": [13, 87, 98], "loops": [47, 73, 109], "conditionals": [5, 10, 15, 16, 27, 33, 39, 43, 51, 55, 57, 60, 62, 66, 68, 69, 71, 77, 79, 81, 83, 85, 89, 91, 96, 97, 100, 101, 103, 105, 113, 117, 119, 122, 124, 128, 130, 131], "returns": [132], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 18, 20, 22, 23, 29, 35, 41, 45, 53, 64, 93, 107, 115, 126, 133], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 7, "universal_type": "function", "name": "main", "text_snippet": "int main()\r\n{\r\n\tarray[MAX] = {1,5,6,7};\r\n\tint N = 4;\r\n\tint index = 3;\r\n\tint value = 9;\r\n\tprintf(\"The"}, {"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include<stdio.h>\r\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "//add at any index of array\r\n#include<stdio.h>\r\n#define MAX 5\r\nint main()\r\n{\r\n\tarray[MAX] = {1,5,6,7};\r\n\tint N = 4;\r\n\tint index = 3;\r\n\tint value = 9;\r\n\tprintf(\"The array before assertion\\n\");\r\n\tfor (int i = 0; i < N; ++i)\r\n\t{\r\n\t\tprintf(\"array[%d] = %d\\n\",i,array[i]);\r\n\t}\r\n\tN++;\r\n\tfor (int i = N; i >= index ; i--)\r\n\t{\r\n\t\tarray[i+1] = array[i];\r\n\t}\r\n\tarray[index] = value;\r\n\tprintf(\"array after changed\\n\");\r\n\tfor (int i = 0; i < N; ++i)\r\n\t{\r\n\t\tprintf(\"array[%d] = %d\\n\",i,array[i]);\r\n\t}\r\n\treturn 0;\r\n}"}
80,981
c
/* ============================================================================= * * * * Copyright 2006,2013 Vizrt Austria GmbH * * All Rights Reserved. * * * * This is PROPRIETARY SOURCE CODE ofVizrt Austria GmbH; * * the contents of this file may not be disclosed to third parties, copied or * * duplicated in any form, in whole or in part, without the prior written * * permission of Vizrt Austria GmbH * * * * ============================================================================= */ /* CAUTION: * -------- * This file contains no user-modifiable data * Under no circumstances change anything in this file without an * explicit order from Vizrt Austria GmbH * */ #if ! defined( EVPLUGIN_DYNINTERFACE_H ) #define EVPLUGIN_DYNINTERFACE_H #undef PLUGINFUNC #undef PLUGIN_EXTERN #undef PLUGIN_EXTERN_DEPRECATE_TEXT #if defined( _WIN32 ) #if defined( VIZENGINE_EXPORTS ) #define VIZENGINE_API __declspec(dllexport) #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text)) #else // #if defined( VIZENGINE_EXPORTS ) #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT ) #define VIZENGINE_API __declspec(dllimport) #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text)) #else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT ) #define VIZENGINE_API #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text)) #endif // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT ) #endif // #if defined( VIZENGINE_EXPORTS ) #else // #if defined( _WIN32 ) #if defined( VIZENGINE_EXPORTS ) #define VIZENGINE_API extern #define VIZENGINE_API_DEPRECATE_TEXT extern #else // #if defined( VIZENGINE_EXPORTS ) #define VIZENGINE_API #define VIZENGINE_API_DEPRECATE_TEXT #endif // #if defined( VIZENGINE_EXPORTS ) #endif // #if defined( _WIN32 ) #if defined( _WIN32 ) #if defined( VIZPLUGIN_EXPORTS ) #define VIZPLUGIN_API __declspec(dllexport) #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text)) #else // #if defined( VIZPLUGIN_EXPORTS ) #define VIZPLUGIN_API __declspec(dllimport) #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text)) #endif // #if defined( VIZPLUGIN_EXPORTS ) #else // #if defined( _WIN32 ) #if defined( VIZPLUGIN_EXPORTS ) #define VIZPLUGIN_API extern #define VIZPLUGIN_API_DEPRECATE_TEXT extern #else // #if defined( VIZPLUGIN_EXPORTS ) #define VIZPLUGIN_API #define VIZPLUGIN_API_DEPRECATE_TEXT #endif // #if defined( VIZPLUGIN_EXPORTS ) #endif // #if defined( _WIN32 ) #endif // EVPLUGIN_DYNINTERFACE_H
42.15
72
(translation_unit) "/* ============================================================================= *\n * *\n * Copyright 2006,2013 Vizrt Austria GmbH *\n * All Rights Reserved. *\n * *\n * This is PROPRIETARY SOURCE CODE ofVizrt Austria GmbH; *\n * the contents of this file may not be disclosed to third parties, copied or *\n * duplicated in any form, in whole or in part, without the prior written *\n * permission of Vizrt Austria GmbH *\n * *\n * ============================================================================= */\n\n/* CAUTION:\n * --------\n * This file contains no user-modifiable data\n * Under no circumstances change anything in this file without an\n * explicit order from Vizrt Austria GmbH\n *\n */\n\n#if ! defined( EVPLUGIN_DYNINTERFACE_H )\n#define EVPLUGIN_DYNINTERFACE_H\n\n#undef PLUGINFUNC\n#undef PLUGIN_EXTERN\n#undef PLUGIN_EXTERN_DEPRECATE_TEXT\n\n\n#if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API __declspec(dllexport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZENGINE_EXPORTS )\n#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API extern\n #define VIZENGINE_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#endif // #if defined( _WIN32 )\n\n\n\n#if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllexport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllimport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API extern\n #define VIZPLUGIN_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#endif // #if defined( _WIN32 )\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#endif // EVPLUGIN_DYNINTERFACE_H\n" (comment) "/* ============================================================================= *\n * *\n * Copyright 2006,2013 Vizrt Austria GmbH *\n * All Rights Reserved. *\n * *\n * This is PROPRIETARY SOURCE CODE ofVizrt Austria GmbH; *\n * the contents of this file may not be disclosed to third parties, copied or *\n * duplicated in any form, in whole or in part, without the prior written *\n * permission of Vizrt Austria GmbH *\n * *\n * ============================================================================= */" (comment) "/* CAUTION:\n * --------\n * This file contains no user-modifiable data\n * Under no circumstances change anything in this file without an\n * explicit order from Vizrt Austria GmbH\n *\n */" (preproc_if) "#if ! defined( EVPLUGIN_DYNINTERFACE_H )\n#define EVPLUGIN_DYNINTERFACE_H\n\n#undef PLUGINFUNC\n#undef PLUGIN_EXTERN\n#undef PLUGIN_EXTERN_DEPRECATE_TEXT\n\n\n#if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API __declspec(dllexport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZENGINE_EXPORTS )\n#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API extern\n #define VIZENGINE_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#endif // #if defined( _WIN32 )\n\n\n\n#if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllexport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllimport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API extern\n #define VIZPLUGIN_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#endif // #if defined( _WIN32 )\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#endif" (#if) "#if" (unary_expression) "! defined( EVPLUGIN_DYNINTERFACE_H )" (!) "!" (preproc_defined) "defined( EVPLUGIN_DYNINTERFACE_H )" (defined) "defined" (() "(" (identifier) "EVPLUGIN_DYNINTERFACE_H" ()) ")" ( ) "\n" (preproc_def) "#define EVPLUGIN_DYNINTERFACE_H\n" (#define) "#define" (identifier) "EVPLUGIN_DYNINTERFACE_H" (preproc_call) "#undef PLUGINFUNC\n" (preproc_directive) "#undef" (preproc_arg) "PLUGINFUNC" (preproc_call) "#undef PLUGIN_EXTERN\n" (preproc_directive) "#undef" (preproc_arg) "PLUGIN_EXTERN" (preproc_call) "#undef PLUGIN_EXTERN_DEPRECATE_TEXT\n" (preproc_directive) "#undef" (preproc_arg) "PLUGIN_EXTERN_DEPRECATE_TEXT" (preproc_if) "#if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API __declspec(dllexport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZENGINE_EXPORTS )\n#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API extern\n #define VIZENGINE_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#endif" (#if) "#if" (preproc_defined) "defined( _WIN32 )" (defined) "defined" (() "(" (identifier) "_WIN32" ()) ")" ( ) "\n\n" (preproc_if) "#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API __declspec(dllexport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZENGINE_EXPORTS )\n#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n#endif" (#if) "#if" (preproc_defined) "defined( VIZENGINE_EXPORTS )" (defined) "defined" (() "(" (identifier) "VIZENGINE_EXPORTS" ()) ")" ( ) "\n" (preproc_def) "#define VIZENGINE_API __declspec(dllexport)\n" (#define) "#define" (identifier) "VIZENGINE_API" (preproc_arg) "__declspec(dllexport)" (preproc_function_def) "#define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n" (#define) "#define" (identifier) "VIZENGINE_API_DEPRECATE_TEXT" (preproc_params) "(_Text)" (() "(" (identifier) "_Text" ()) ")" (preproc_arg) "__declspec(dllexport,deprecated(_Text))" (preproc_else) "#else // #if defined( VIZENGINE_EXPORTS )\n#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif" (#else) "#else" (comment) "// #if defined( VIZENGINE_EXPORTS )" (preproc_if) "#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif" (#if) "#if" (unary_expression) "! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )" (!) "!" (preproc_defined) "defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )" (defined) "defined" (() "(" (identifier) "DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT" ()) ")" ( ) "\n" (preproc_def) "#define VIZENGINE_API __declspec(dllimport)\n" (#define) "#define" (identifier) "VIZENGINE_API" (preproc_arg) "__declspec(dllimport)" (preproc_function_def) "#define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n" (#define) "#define" (identifier) "VIZENGINE_API_DEPRECATE_TEXT" (preproc_params) "(_Text)" (() "(" (identifier) "_Text" ()) ")" (preproc_arg) "__declspec(dllimport,deprecated(_Text))" (preproc_else) "#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n" (#else) "#else" (comment) "// #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )" (preproc_def) "#define VIZENGINE_API\n" (#define) "#define" (identifier) "VIZENGINE_API" (preproc_function_def) "#define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n" (#define) "#define" (identifier) "VIZENGINE_API_DEPRECATE_TEXT" (preproc_params) "(_Text)" (() "(" (identifier) "_Text" ()) ")" (preproc_arg) "__declspec(deprecated(_Text))" (#endif) "#endif" (comment) "// #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )" (#endif) "#endif" (comment) "// #if defined( VIZENGINE_EXPORTS )" (preproc_else) "#else // #if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API extern\n #define VIZENGINE_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n#endif" (#else) "#else" (comment) "// #if defined( _WIN32 )" (preproc_if) "#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API extern\n #define VIZENGINE_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n#endif" (#if) "#if" (preproc_defined) "defined( VIZENGINE_EXPORTS )" (defined) "defined" (() "(" (identifier) "VIZENGINE_EXPORTS" ()) ")" ( ) "\n" (preproc_def) "#define VIZENGINE_API extern\n" (#define) "#define" (identifier) "VIZENGINE_API" (preproc_arg) "extern" (preproc_def) "#define VIZENGINE_API_DEPRECATE_TEXT extern\n" (#define) "#define" (identifier) "VIZENGINE_API_DEPRECATE_TEXT" (preproc_arg) "extern" (preproc_else) "#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n" (#else) "#else" (comment) "// #if defined( VIZENGINE_EXPORTS )" (preproc_def) "#define VIZENGINE_API\n" (#define) "#define" (identifier) "VIZENGINE_API" (preproc_def) "#define VIZENGINE_API_DEPRECATE_TEXT\n" (#define) "#define" (identifier) "VIZENGINE_API_DEPRECATE_TEXT" (#endif) "#endif" (comment) "// #if defined( VIZENGINE_EXPORTS )" (#endif) "#endif" (comment) "// #if defined( _WIN32 )" (preproc_if) "#if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllexport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllimport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API extern\n #define VIZPLUGIN_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#endif" (#if) "#if" (preproc_defined) "defined( _WIN32 )" (defined) "defined" (() "(" (identifier) "_WIN32" ()) ")" ( ) "\n\n" (preproc_if) "#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllexport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllimport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#endif" (#if) "#if" (preproc_defined) "defined( VIZPLUGIN_EXPORTS )" (defined) "defined" (() "(" (identifier) "VIZPLUGIN_EXPORTS" ()) ")" ( ) "\n" (preproc_def) "#define VIZPLUGIN_API __declspec(dllexport)\n" (#define) "#define" (identifier) "VIZPLUGIN_API" (preproc_arg) "__declspec(dllexport)" (preproc_function_def) "#define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n" (#define) "#define" (identifier) "VIZPLUGIN_API_DEPRECATE_TEXT" (preproc_params) "(_Text)" (() "(" (identifier) "_Text" ()) ")" (preproc_arg) "__declspec(dllexport,deprecated(_Text))" (preproc_else) "#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllimport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n" (#else) "#else" (comment) "// #if defined( VIZPLUGIN_EXPORTS )" (preproc_def) "#define VIZPLUGIN_API __declspec(dllimport)\n" (#define) "#define" (identifier) "VIZPLUGIN_API" (preproc_arg) "__declspec(dllimport)" (preproc_function_def) "#define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n" (#define) "#define" (identifier) "VIZPLUGIN_API_DEPRECATE_TEXT" (preproc_params) "(_Text)" (() "(" (identifier) "_Text" ()) ")" (preproc_arg) "__declspec(dllimport,deprecated(_Text))" (#endif) "#endif" (comment) "// #if defined( VIZPLUGIN_EXPORTS )" (preproc_else) "#else // #if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API extern\n #define VIZPLUGIN_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n#endif" (#else) "#else" (comment) "// #if defined( _WIN32 )" (preproc_if) "#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API extern\n #define VIZPLUGIN_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n#endif" (#if) "#if" (preproc_defined) "defined( VIZPLUGIN_EXPORTS )" (defined) "defined" (() "(" (identifier) "VIZPLUGIN_EXPORTS" ()) ")" ( ) "\n" (preproc_def) "#define VIZPLUGIN_API extern\n" (#define) "#define" (identifier) "VIZPLUGIN_API" (preproc_arg) "extern" (preproc_def) "#define VIZPLUGIN_API_DEPRECATE_TEXT extern\n" (#define) "#define" (identifier) "VIZPLUGIN_API_DEPRECATE_TEXT" (preproc_arg) "extern" (preproc_else) "#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n" (#else) "#else" (comment) "// #if defined( VIZPLUGIN_EXPORTS )" (preproc_def) "#define VIZPLUGIN_API\n" (#define) "#define" (identifier) "VIZPLUGIN_API" (preproc_def) "#define VIZPLUGIN_API_DEPRECATE_TEXT\n" (#define) "#define" (identifier) "VIZPLUGIN_API_DEPRECATE_TEXT" (#endif) "#endif" (comment) "// #if defined( VIZPLUGIN_EXPORTS )" (#endif) "#endif" (comment) "// #if defined( _WIN32 )" (#endif) "#endif" (comment) "// EVPLUGIN_DYNINTERFACE_H"
207
0
{"language": "c", "success": true, "metadata": {"lines": 72, "avg_line_length": 42.15, "nodes": 163, "errors": 0, "source_hash": "50fd1247f57ce1625dfddf8c699eb6fa0e3ab7e595d88e6bd2e31a9251bc642c", "categorized_nodes": 66}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_if", "text": "#if ! defined( EVPLUGIN_DYNINTERFACE_H )\n#define EVPLUGIN_DYNINTERFACE_H\n\n#undef PLUGINFUNC\n#undef PLUGIN_EXTERN\n#undef PLUGIN_EXTERN_DEPRECATE_TEXT\n\n\n#if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API __declspec(dllexport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZENGINE_EXPORTS )\n#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API extern\n #define VIZENGINE_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#endif // #if defined( _WIN32 )\n\n\n\n#if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllexport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllimport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API extern\n #define VIZPLUGIN_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#endif // #if defined( _WIN32 )\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#endif", "parent": null, "children": [1, 2, 7, 8, 11, 14, 17, 20, 101, 162], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 1, "type": "#if", "text": "#if", "parent": 0, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 3}}, {"id": 2, "type": "unary_expression", "text": "! defined( EVPLUGIN_DYNINTERFACE_H )", "parent": 0, "children": [3, 4], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 40}}, {"id": 3, "type": "!", "text": "!", "parent": 2, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 5}}, {"id": 4, "type": "preproc_defined", "text": "defined( EVPLUGIN_DYNINTERFACE_H )", "parent": 2, "children": [5, 6], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 40}}, {"id": 5, "type": "defined", "text": "defined", "parent": 4, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 13}}, {"id": 6, "type": "identifier", "text": "EVPLUGIN_DYNINTERFACE_H", "parent": 4, "children": [], "start_point": {"row": 20, "column": 15}, "end_point": {"row": 20, "column": 38}}, {"id": 7, "type": "\n", "text": "\n", "parent": 0, "children": [], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 21, "column": 0}}, {"id": 8, "type": "preproc_def", "text": "#define EVPLUGIN_DYNINTERFACE_H\n", "parent": 0, "children": [9, 10], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 9, "type": "#define", "text": "#define", "parent": 8, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 10, "type": "identifier", "text": "EVPLUGIN_DYNINTERFACE_H", "parent": 8, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 31}}, {"id": 11, "type": "preproc_call", "text": "#undef PLUGINFUNC\n", "parent": 0, "children": [12, 13], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 12, "type": "preproc_directive", "text": "#undef", "parent": 11, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 13, "type": "preproc_arg", "text": "PLUGINFUNC", "parent": 11, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 17}}, {"id": 14, "type": "preproc_call", "text": "#undef PLUGIN_EXTERN\n", "parent": 0, "children": [15, 16], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 15, "type": "preproc_directive", "text": "#undef", "parent": 14, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 6}}, {"id": 16, "type": "preproc_arg", "text": "PLUGIN_EXTERN", "parent": 14, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 20}}, {"id": 17, "type": "preproc_call", "text": "#undef PLUGIN_EXTERN_DEPRECATE_TEXT\n", "parent": 0, "children": [18, 19], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 18, "type": "preproc_directive", "text": "#undef", "parent": 17, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 19, "type": "preproc_arg", "text": "PLUGIN_EXTERN_DEPRECATE_TEXT", "parent": 17, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 35}}, {"id": 20, "type": "preproc_if", "text": "#if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API __declspec(dllexport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZENGINE_EXPORTS )\n#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API extern\n #define VIZENGINE_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#endif", "parent": 0, "children": [21, 22, 25, 26, 75, 100], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 53, "column": 6}}, {"id": 21, "type": "#if", "text": "#if", "parent": 20, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 3}}, {"id": 22, "type": "preproc_defined", "text": "defined( _WIN32 )", "parent": 20, "children": [23, 24], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 21}}, {"id": 23, "type": "defined", "text": "defined", "parent": 22, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 11}}, {"id": 24, "type": "identifier", "text": "_WIN32", "parent": 22, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 19}}, {"id": 25, "type": "\n", "text": "\n\n", "parent": 20, "children": [], "start_point": {"row": 28, "column": 21}, "end_point": {"row": 30, "column": 0}}, {"id": 26, "type": "preproc_if", "text": "#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API __declspec(dllexport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZENGINE_EXPORTS )\n#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n#endif", "parent": 20, "children": [27, 28, 31, 32, 36, 42, 74], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 27, "type": "#if", "text": "#if", "parent": 26, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 3}}, {"id": 28, "type": "preproc_defined", "text": "defined( VIZENGINE_EXPORTS )", "parent": 26, "children": [29, 30], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 32}}, {"id": 29, "type": "defined", "text": "defined", "parent": 28, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 11}}, {"id": 30, "type": "identifier", "text": "VIZENGINE_EXPORTS", "parent": 28, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 30}}, {"id": 31, "type": "\n", "text": "\n", "parent": 26, "children": [], "start_point": {"row": 30, "column": 32}, "end_point": {"row": 31, "column": 0}}, {"id": 32, "type": "preproc_def", "text": "#define VIZENGINE_API __declspec(dllexport)\n", "parent": 26, "children": [33, 34, 35], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 32, "column": 0}}, {"id": 33, "type": "#define", "text": "#define", "parent": 32, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 11}}, {"id": 34, "type": "identifier", "text": "VIZENGINE_API", "parent": 32, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 25}}, {"id": 35, "type": "preproc_arg", "text": "__declspec(dllexport)", "parent": 32, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 52}}, {"id": 36, "type": "preproc_function_def", "text": "#define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n", "parent": 26, "children": [37, 38, 39, 41], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 33, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 11}}, {"id": 38, "type": "identifier", "text": "VIZENGINE_API_DEPRECATE_TEXT", "parent": 36, "children": [], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 40}}, {"id": 39, "type": "preproc_params", "text": "(_Text)", "parent": 36, "children": [40], "start_point": {"row": 32, "column": 40}, "end_point": {"row": 32, "column": 47}}, {"id": 40, "type": "identifier", "text": "_Text", "parent": 39, "children": [], "start_point": {"row": 32, "column": 41}, "end_point": {"row": 32, "column": 46}}, {"id": 41, "type": "preproc_arg", "text": "__declspec(dllexport,deprecated(_Text))", "parent": 36, "children": [], "start_point": {"row": 32, "column": 48}, "end_point": {"row": 32, "column": 87}}, {"id": 42, "type": "preproc_else", "text": "#else // #if defined( VIZENGINE_EXPORTS )\n#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif", "parent": 26, "children": [43, 44], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 43, "type": "#else", "text": "#else", "parent": 42, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 5}}, {"id": 44, "type": "preproc_if", "text": "#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif", "parent": 42, "children": [45, 46, 51, 52, 56, 62, 73], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 45, "type": "#if", "text": "#if", "parent": 44, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 3}}, {"id": 46, "type": "unary_expression", "text": "! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )", "parent": 44, "children": [47, 48], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 56}}, {"id": 47, "type": "!", "text": "!", "parent": 46, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 5}}, {"id": 48, "type": "preproc_defined", "text": "defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )", "parent": 46, "children": [49, 50], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 56}}, {"id": 49, "type": "defined", "text": "defined", "parent": 48, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 13}}, {"id": 50, "type": "identifier", "text": "DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT", "parent": 48, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 54}}, {"id": 51, "type": "\n", "text": "\n", "parent": 44, "children": [], "start_point": {"row": 34, "column": 56}, "end_point": {"row": 35, "column": 0}}, {"id": 52, "type": "preproc_def", "text": "#define VIZENGINE_API __declspec(dllimport)\n", "parent": 44, "children": [53, 54, 55], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 36, "column": 0}}, {"id": 53, "type": "#define", "text": "#define", "parent": 52, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 11}}, {"id": 54, "type": "identifier", "text": "VIZENGINE_API", "parent": 52, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 25}}, {"id": 55, "type": "preproc_arg", "text": "__declspec(dllimport)", "parent": 52, "children": [], "start_point": {"row": 35, "column": 31}, "end_point": {"row": 35, "column": 52}}, {"id": 56, "type": "preproc_function_def", "text": "#define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n", "parent": 44, "children": [57, 58, 59, 61], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 37, "column": 0}}, {"id": 57, "type": "#define", "text": "#define", "parent": 56, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 11}}, {"id": 58, "type": "identifier", "text": "VIZENGINE_API_DEPRECATE_TEXT", "parent": 56, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 40}}, {"id": 59, "type": "preproc_params", "text": "(_Text)", "parent": 56, "children": [60], "start_point": {"row": 36, "column": 40}, "end_point": {"row": 36, "column": 47}}, {"id": 60, "type": "identifier", "text": "_Text", "parent": 59, "children": [], "start_point": {"row": 36, "column": 41}, "end_point": {"row": 36, "column": 46}}, {"id": 61, "type": "preproc_arg", "text": "__declspec(dllimport,deprecated(_Text))", "parent": 56, "children": [], "start_point": {"row": 36, "column": 48}, "end_point": {"row": 36, "column": 87}}, {"id": 62, "type": "preproc_else", "text": "#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n", "parent": 44, "children": [63, 64, 67], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 63, "type": "#else", "text": "#else", "parent": 62, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 5}}, {"id": 64, "type": "preproc_def", "text": "#define VIZENGINE_API\n", "parent": 62, "children": [65, 66], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 39, "column": 0}}, {"id": 65, "type": "#define", "text": "#define", "parent": 64, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 11}}, {"id": 66, "type": "identifier", "text": "VIZENGINE_API", "parent": 64, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 25}}, {"id": 67, "type": "preproc_function_def", "text": "#define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n", "parent": 62, "children": [68, 69, 70, 72], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 40, "column": 0}}, {"id": 68, "type": "#define", "text": "#define", "parent": 67, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 11}}, {"id": 69, "type": "identifier", "text": "VIZENGINE_API_DEPRECATE_TEXT", "parent": 67, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 40}}, {"id": 70, "type": "preproc_params", "text": "(_Text)", "parent": 67, "children": [71], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 47}}, {"id": 71, "type": "identifier", "text": "_Text", "parent": 70, "children": [], "start_point": {"row": 39, "column": 41}, "end_point": {"row": 39, "column": 46}}, {"id": 72, "type": "preproc_arg", "text": "__declspec(deprecated(_Text))", "parent": 67, "children": [], "start_point": {"row": 39, "column": 48}, "end_point": {"row": 39, "column": 77}}, {"id": 73, "type": "#endif", "text": "#endif", "parent": 44, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 6}}, {"id": 74, "type": "#endif", "text": "#endif", "parent": 26, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 75, "type": "preproc_else", "text": "#else // #if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API extern\n #define VIZENGINE_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n#endif", "parent": 20, "children": [76, 77], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 76, "type": "#else", "text": "#else", "parent": 75, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 5}}, {"id": 77, "type": "preproc_if", "text": "#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API extern\n #define VIZENGINE_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n#endif", "parent": 75, "children": [78, 79, 82, 83, 87, 91, 99], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 78, "type": "#if", "text": "#if", "parent": 77, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 3}}, {"id": 79, "type": "preproc_defined", "text": "defined( VIZENGINE_EXPORTS )", "parent": 77, "children": [80, 81], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 32}}, {"id": 80, "type": "defined", "text": "defined", "parent": 79, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 11}}, {"id": 81, "type": "identifier", "text": "VIZENGINE_EXPORTS", "parent": 79, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 30}}, {"id": 82, "type": "\n", "text": "\n", "parent": 77, "children": [], "start_point": {"row": 45, "column": 32}, "end_point": {"row": 46, "column": 0}}, {"id": 83, "type": "preproc_def", "text": "#define VIZENGINE_API extern\n", "parent": 77, "children": [84, 85, 86], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 47, "column": 0}}, {"id": 84, "type": "#define", "text": "#define", "parent": 83, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 11}}, {"id": 85, "type": "identifier", "text": "VIZENGINE_API", "parent": 83, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 25}}, {"id": 86, "type": "preproc_arg", "text": "extern", "parent": 83, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 37}}, {"id": 87, "type": "preproc_def", "text": "#define VIZENGINE_API_DEPRECATE_TEXT extern\n", "parent": 77, "children": [88, 89, 90], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 48, "column": 0}}, {"id": 88, "type": "#define", "text": "#define", "parent": 87, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 11}}, {"id": 89, "type": "identifier", "text": "VIZENGINE_API_DEPRECATE_TEXT", "parent": 87, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 40}}, {"id": 90, "type": "preproc_arg", "text": "extern", "parent": 87, "children": [], "start_point": {"row": 47, "column": 44}, "end_point": {"row": 47, "column": 50}}, {"id": 91, "type": "preproc_else", "text": "#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n", "parent": 77, "children": [92, 93, 96], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 51, "column": 0}}, {"id": 92, "type": "#else", "text": "#else", "parent": 91, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 5}}, {"id": 93, "type": "preproc_def", "text": "#define VIZENGINE_API\n", "parent": 91, "children": [94, 95], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 50, "column": 0}}, {"id": 94, "type": "#define", "text": "#define", "parent": 93, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 11}}, {"id": 95, "type": "identifier", "text": "VIZENGINE_API", "parent": 93, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 25}}, {"id": 96, "type": "preproc_def", "text": "#define VIZENGINE_API_DEPRECATE_TEXT\n", "parent": 91, "children": [97, 98], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 51, "column": 0}}, {"id": 97, "type": "#define", "text": "#define", "parent": 96, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 11}}, {"id": 98, "type": "identifier", "text": "VIZENGINE_API_DEPRECATE_TEXT", "parent": 96, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 40}}, {"id": 99, "type": "#endif", "text": "#endif", "parent": 77, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 100, "type": "#endif", "text": "#endif", "parent": 20, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 6}}, {"id": 101, "type": "preproc_if", "text": "#if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllexport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllimport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API extern\n #define VIZPLUGIN_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#endif", "parent": 0, "children": [102, 103, 106, 107, 136, 161], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 77, "column": 6}}, {"id": 102, "type": "#if", "text": "#if", "parent": 101, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 3}}, {"id": 103, "type": "preproc_defined", "text": "defined( _WIN32 )", "parent": 101, "children": [104, 105], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 21}}, {"id": 104, "type": "defined", "text": "defined", "parent": 103, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 11}}, {"id": 105, "type": "identifier", "text": "_WIN32", "parent": 103, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 19}}, {"id": 106, "type": "\n", "text": "\n\n", "parent": 101, "children": [], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 59, "column": 0}}, {"id": 107, "type": "preproc_if", "text": "#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllexport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllimport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#endif", "parent": 101, "children": [108, 109, 112, 113, 117, 123, 135], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 65, "column": 6}}, {"id": 108, "type": "#if", "text": "#if", "parent": 107, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 3}}, {"id": 109, "type": "preproc_defined", "text": "defined( VIZPLUGIN_EXPORTS )", "parent": 107, "children": [110, 111], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 32}}, {"id": 110, "type": "defined", "text": "defined", "parent": 109, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 11}}, {"id": 111, "type": "identifier", "text": "VIZPLUGIN_EXPORTS", "parent": 109, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 30}}, {"id": 112, "type": "\n", "text": "\n", "parent": 107, "children": [], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 60, "column": 0}}, {"id": 113, "type": "preproc_def", "text": "#define VIZPLUGIN_API __declspec(dllexport)\n", "parent": 107, "children": [114, 115, 116], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 61, "column": 0}}, {"id": 114, "type": "#define", "text": "#define", "parent": 113, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 11}}, {"id": 115, "type": "identifier", "text": "VIZPLUGIN_API", "parent": 113, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 25}}, {"id": 116, "type": "preproc_arg", "text": "__declspec(dllexport)", "parent": 113, "children": [], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 52}}, {"id": 117, "type": "preproc_function_def", "text": "#define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n", "parent": 107, "children": [118, 119, 120, 122], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 62, "column": 0}}, {"id": 118, "type": "#define", "text": "#define", "parent": 117, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 11}}, {"id": 119, "type": "identifier", "text": "VIZPLUGIN_API_DEPRECATE_TEXT", "parent": 117, "children": [], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 40}}, {"id": 120, "type": "preproc_params", "text": "(_Text)", "parent": 117, "children": [121], "start_point": {"row": 61, "column": 40}, "end_point": {"row": 61, "column": 47}}, {"id": 121, "type": "identifier", "text": "_Text", "parent": 120, "children": [], "start_point": {"row": 61, "column": 41}, "end_point": {"row": 61, "column": 46}}, {"id": 122, "type": "preproc_arg", "text": "__declspec(dllexport,deprecated(_Text))", "parent": 117, "children": [], "start_point": {"row": 61, "column": 48}, "end_point": {"row": 61, "column": 87}}, {"id": 123, "type": "preproc_else", "text": "#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllimport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n", "parent": 107, "children": [124, 125, 129], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 65, "column": 0}}, {"id": 124, "type": "#else", "text": "#else", "parent": 123, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 5}}, {"id": 125, "type": "preproc_def", "text": "#define VIZPLUGIN_API __declspec(dllimport)\n", "parent": 123, "children": [126, 127, 128], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 64, "column": 0}}, {"id": 126, "type": "#define", "text": "#define", "parent": 125, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 11}}, {"id": 127, "type": "identifier", "text": "VIZPLUGIN_API", "parent": 125, "children": [], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 25}}, {"id": 128, "type": "preproc_arg", "text": "__declspec(dllimport)", "parent": 125, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 52}}, {"id": 129, "type": "preproc_function_def", "text": "#define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n", "parent": 123, "children": [130, 131, 132, 134], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 65, "column": 0}}, {"id": 130, "type": "#define", "text": "#define", "parent": 129, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 11}}, {"id": 131, "type": "identifier", "text": "VIZPLUGIN_API_DEPRECATE_TEXT", "parent": 129, "children": [], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 40}}, {"id": 132, "type": "preproc_params", "text": "(_Text)", "parent": 129, "children": [133], "start_point": {"row": 64, "column": 40}, "end_point": {"row": 64, "column": 47}}, {"id": 133, "type": "identifier", "text": "_Text", "parent": 132, "children": [], "start_point": {"row": 64, "column": 41}, "end_point": {"row": 64, "column": 46}}, {"id": 134, "type": "preproc_arg", "text": "__declspec(dllimport,deprecated(_Text))", "parent": 129, "children": [], "start_point": {"row": 64, "column": 48}, "end_point": {"row": 64, "column": 87}}, {"id": 135, "type": "#endif", "text": "#endif", "parent": 107, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 6}}, {"id": 136, "type": "preproc_else", "text": "#else // #if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API extern\n #define VIZPLUGIN_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n#endif", "parent": 101, "children": [137, 138], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 75, "column": 6}}, {"id": 137, "type": "#else", "text": "#else", "parent": 136, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 5}}, {"id": 138, "type": "preproc_if", "text": "#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API extern\n #define VIZPLUGIN_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n#endif", "parent": 136, "children": [139, 140, 143, 144, 148, 152, 160], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 75, "column": 6}}, {"id": 139, "type": "#if", "text": "#if", "parent": 138, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 3}}, {"id": 140, "type": "preproc_defined", "text": "defined( VIZPLUGIN_EXPORTS )", "parent": 138, "children": [141, 142], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 32}}, {"id": 141, "type": "defined", "text": "defined", "parent": 140, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 11}}, {"id": 142, "type": "identifier", "text": "VIZPLUGIN_EXPORTS", "parent": 140, "children": [], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 30}}, {"id": 143, "type": "\n", "text": "\n", "parent": 138, "children": [], "start_point": {"row": 69, "column": 32}, "end_point": {"row": 70, "column": 0}}, {"id": 144, "type": "preproc_def", "text": "#define VIZPLUGIN_API extern\n", "parent": 138, "children": [145, 146, 147], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 71, "column": 0}}, {"id": 145, "type": "#define", "text": "#define", "parent": 144, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 11}}, {"id": 146, "type": "identifier", "text": "VIZPLUGIN_API", "parent": 144, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 25}}, {"id": 147, "type": "preproc_arg", "text": "extern", "parent": 144, "children": [], "start_point": {"row": 70, "column": 31}, "end_point": {"row": 70, "column": 37}}, {"id": 148, "type": "preproc_def", "text": "#define VIZPLUGIN_API_DEPRECATE_TEXT extern\n", "parent": 138, "children": [149, 150, 151], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 72, "column": 0}}, {"id": 149, "type": "#define", "text": "#define", "parent": 148, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 11}}, {"id": 150, "type": "identifier", "text": "VIZPLUGIN_API_DEPRECATE_TEXT", "parent": 148, "children": [], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 40}}, {"id": 151, "type": "preproc_arg", "text": "extern", "parent": 148, "children": [], "start_point": {"row": 71, "column": 44}, "end_point": {"row": 71, "column": 50}}, {"id": 152, "type": "preproc_else", "text": "#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n", "parent": 138, "children": [153, 154, 157], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 75, "column": 0}}, {"id": 153, "type": "#else", "text": "#else", "parent": 152, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 5}}, {"id": 154, "type": "preproc_def", "text": "#define VIZPLUGIN_API\n", "parent": 152, "children": [155, 156], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 74, "column": 0}}, {"id": 155, "type": "#define", "text": "#define", "parent": 154, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 11}}, {"id": 156, "type": "identifier", "text": "VIZPLUGIN_API", "parent": 154, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 25}}, {"id": 157, "type": "preproc_def", "text": "#define VIZPLUGIN_API_DEPRECATE_TEXT\n", "parent": 152, "children": [158, 159], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 75, "column": 0}}, {"id": 158, "type": "#define", "text": "#define", "parent": 157, "children": [], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 11}}, {"id": 159, "type": "identifier", "text": "VIZPLUGIN_API_DEPRECATE_TEXT", "parent": 157, "children": [], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 40}}, {"id": 160, "type": "#endif", "text": "#endif", "parent": 138, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 6}}, {"id": 161, "type": "#endif", "text": "#endif", "parent": 101, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 6}}, {"id": 162, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}]}, "node_categories": {"declarations": {"functions": [36, 56, 67, 117, 129], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [2, 46], "assignments": [], "loops": [], "conditionals": [0, 1, 6, 10, 20, 21, 24, 26, 27, 30, 34, 38, 40, 44, 45, 50, 54, 58, 60, 66, 69, 71, 73, 74, 77, 78, 81, 85, 89, 95, 98, 99, 100, 101, 102, 105, 107, 108, 111, 115, 119, 121, 127, 131, 133, 135, 138, 139, 142, 146, 150, 156, 159, 160, 161, 162], "returns": [], "exceptions": []}, "expressions": {"calls": [11, 14, 17], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "#define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "#define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "#define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n"}, {"node_id": 117, "universal_type": "function", "name": "unknown", "text_snippet": "#define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "#define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/* ============================================================================= *\n * *\n * Copyright 2006,2013 Vizrt Austria GmbH *\n * All Rights Reserved. *\n * *\n * This is PROPRIETARY SOURCE CODE ofVizrt Austria GmbH; *\n * the contents of this file may not be disclosed to third parties, copied or *\n * duplicated in any form, in whole or in part, without the prior written *\n * permission of Vizrt Austria GmbH *\n * *\n * ============================================================================= */\n\n/* CAUTION:\n * --------\n * This file contains no user-modifiable data\n * Under no circumstances change anything in this file without an\n * explicit order from Vizrt Austria GmbH\n *\n */\n\n#if ! defined( EVPLUGIN_DYNINTERFACE_H )\n#define EVPLUGIN_DYNINTERFACE_H\n\n#undef PLUGINFUNC\n#undef PLUGIN_EXTERN\n#undef PLUGIN_EXTERN_DEPRECATE_TEXT\n\n\n#if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API __declspec(dllexport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZENGINE_EXPORTS )\n#if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API __declspec(dllimport)\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#else // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))\n#endif // #if ! defined( DONT_DECLARE_PLUGIN_EXTERN_AS_DLLIMPORT )\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API extern\n #define VIZENGINE_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZENGINE_EXPORTS )\n #define VIZENGINE_API\n #define VIZENGINE_API_DEPRECATE_TEXT\n#endif // #if defined( VIZENGINE_EXPORTS )\n\n#endif // #if defined( _WIN32 )\n\n\n\n#if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllexport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllexport,deprecated(_Text))\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API __declspec(dllimport)\n #define VIZPLUGIN_API_DEPRECATE_TEXT(_Text) __declspec(dllimport,deprecated(_Text))\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#else // #if defined( _WIN32 )\n\n#if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API extern\n #define VIZPLUGIN_API_DEPRECATE_TEXT extern\n#else // #if defined( VIZPLUGIN_EXPORTS )\n #define VIZPLUGIN_API\n #define VIZPLUGIN_API_DEPRECATE_TEXT\n#endif // #if defined( VIZPLUGIN_EXPORTS )\n\n#endif // #if defined( _WIN32 )\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#endif // EVPLUGIN_DYNINTERFACE_H\n"}
80,982
c
#pragma once #include "gles3/gl3.h" #include "glm/glm.hpp" class CGfxIndexBuffer; class CGfxVertexBuffer; class CGfxInstanceBuffer; class CGfxVertexArrayObject; class CGfxMesh { friend class CGfxRenderer; friend class CGfxMeshManager; private: CGfxMesh(GLuint name); virtual ~CGfxMesh(void); public: GLuint GetName(void) const; public: void Lock(void); void Unlock(bool bFree); private: void Bind(void) const; private: bool Load(const char *szFileName); void Free(void); void CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type); void CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format); void CreateInstanceBuffer(GLuint format); public: void SetInstance(const glm::mat4 &mtxTransform); void AddInstance(const glm::mat4 &mtxTransform); void ClearInstance(void); public: GLenum GetIndexType(void) const; GLuint GetIndexCount(void) const; GLuint GetVertexFormat(void) const; GLuint GetVertexCount(void) const; GLuint GetInstanceCount(void) const; private: GLuint m_name; private: CGfxIndexBuffer *m_pIndexBuffer; CGfxVertexBuffer *m_pVertexBuffer; CGfxInstanceBuffer *m_pInstanceBuffer; CGfxVertexArrayObject *m_pVertexArrayObject; private: GLuint refCount; };
23.47
51
(translation_unit) "#pragma once\n#include "gles3/gl3.h"\n#include "glm/glm.hpp"\n\n\nclass CGfxIndexBuffer;\nclass CGfxVertexBuffer;\nclass CGfxInstanceBuffer;\nclass CGfxVertexArrayObject;\nclass CGfxMesh\n{\n friend class CGfxRenderer;\n friend class CGfxMeshManager;\n\n\nprivate:\n CGfxMesh(GLuint name);\n virtual ~CGfxMesh(void);\n\n\npublic:\n GLuint GetName(void) const;\n\npublic:\n void Lock(void);\n void Unlock(bool bFree);\n\nprivate:\n void Bind(void) const;\n\nprivate:\n bool Load(const char *szFileName);\n void Free(void);\n\n void CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type);\n void CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format);\n void CreateInstanceBuffer(GLuint format);\n\npublic:\n void SetInstance(const glm::mat4 &mtxTransform);\n void AddInstance(const glm::mat4 &mtxTransform);\n void ClearInstance(void);\n\npublic:\n GLenum GetIndexType(void) const;\n GLuint GetIndexCount(void) const;\n\n GLuint GetVertexFormat(void) const;\n GLuint GetVertexCount(void) const;\n\n GLuint GetInstanceCount(void) const;\n\n\nprivate:\n GLuint m_name;\n\nprivate:\n CGfxIndexBuffer *m_pIndexBuffer;\n CGfxVertexBuffer *m_pVertexBuffer;\n CGfxInstanceBuffer *m_pInstanceBuffer;\n CGfxVertexArrayObject *m_pVertexArrayObject;\n\nprivate:\n GLuint refCount;\n};\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "gles3/gl3.h"\n" (#include) "#include" (string_literal) ""gles3/gl3.h"" (") """ (string_content) "gles3/gl3.h" (") """ (preproc_include) "#include "glm/glm.hpp"\n" (#include) "#include" (string_literal) ""glm/glm.hpp"" (") """ (string_content) "glm/glm.hpp" (") """ (declaration) "class CGfxIndexBuffer;" (type_identifier) "class" (identifier) "CGfxIndexBuffer" (;) ";" (declaration) "class CGfxVertexBuffer;" (type_identifier) "class" (identifier) "CGfxVertexBuffer" (;) ";" (declaration) "class CGfxInstanceBuffer;" (type_identifier) "class" (identifier) "CGfxInstanceBuffer" (;) ";" (declaration) "class CGfxVertexArrayObject;" (type_identifier) "class" (identifier) "CGfxVertexArrayObject" (;) ";" (function_definition) "class CGfxMesh\n{\n friend class CGfxRenderer;\n friend class CGfxMeshManager;\n\n\nprivate:\n CGfxMesh(GLuint name);\n virtual ~CGfxMesh(void);\n\n\npublic:\n GLuint GetName(void) const;\n\npublic:\n void Lock(void);\n void Unlock(bool bFree);\n\nprivate:\n void Bind(void) const;\n\nprivate:\n bool Load(const char *szFileName);\n void Free(void);\n\n void CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type);\n void CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format);\n void CreateInstanceBuffer(GLuint format);\n\npublic:\n void SetInstance(const glm::mat4 &mtxTransform);\n void AddInstance(const glm::mat4 &mtxTransform);\n void ClearInstance(void);\n\npublic:\n GLenum GetIndexType(void) const;\n GLuint GetIndexCount(void) const;\n\n GLuint GetVertexFormat(void) const;\n GLuint GetVertexCount(void) const;\n\n GLuint GetInstanceCount(void) const;\n\n\nprivate:\n GLuint m_name;\n\nprivate:\n CGfxIndexBuffer *m_pIndexBuffer;\n CGfxVertexBuffer *m_pVertexBuffer;\n CGfxInstanceBuffer *m_pInstanceBuffer;\n CGfxVertexArrayObject *m_pVertexArrayObject;\n\nprivate:\n GLuint refCount;\n}" (type_identifier) "class" (identifier) "CGfxMesh" (compound_statement) "{\n friend class CGfxRenderer;\n friend class CGfxMeshManager;\n\n\nprivate:\n CGfxMesh(GLuint name);\n virtual ~CGfxMesh(void);\n\n\npublic:\n GLuint GetName(void) const;\n\npublic:\n void Lock(void);\n void Unlock(bool bFree);\n\nprivate:\n void Bind(void) const;\n\nprivate:\n bool Load(const char *szFileName);\n void Free(void);\n\n void CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type);\n void CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format);\n void CreateInstanceBuffer(GLuint format);\n\npublic:\n void SetInstance(const glm::mat4 &mtxTransform);\n void AddInstance(const glm::mat4 &mtxTransform);\n void ClearInstance(void);\n\npublic:\n GLenum GetIndexType(void) const;\n GLuint GetIndexCount(void) const;\n\n GLuint GetVertexFormat(void) const;\n GLuint GetVertexCount(void) const;\n\n GLuint GetInstanceCount(void) const;\n\n\nprivate:\n GLuint m_name;\n\nprivate:\n CGfxIndexBuffer *m_pIndexBuffer;\n CGfxVertexBuffer *m_pVertexBuffer;\n CGfxInstanceBuffer *m_pInstanceBuffer;\n CGfxVertexArrayObject *m_pVertexArrayObject;\n\nprivate:\n GLuint refCount;\n}" ({) "{" (declaration) "friend class CGfxRenderer;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "CGfxRenderer" (;) ";" (declaration) "friend class CGfxMeshManager;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "CGfxMeshManager" (;) ";" (labeled_statement) "private:\n CGfxMesh(GLuint name);\n virtual ~CGfxMesh(void);" (statement_identifier) "private" (:) ":" (declaration) "CGfxMesh(GLuint name);\n virtual ~CGfxMesh(void);" (macro_type_specifier) "CGfxMesh(GLuint name)" (identifier) "CGfxMesh" (() "(" (ERROR) "GLuint" (type_identifier) "GLuint" (type_descriptor) "name" (type_identifier) "name" ()) ")" (ERROR) ";\n virtual ~" (;) ";" (identifier) "virtual" (~) "~" (function_declarator) "CGfxMesh(void)" (identifier) "CGfxMesh" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (labeled_statement) "public:\n GLuint GetName(void) const;" (statement_identifier) "public" (:) ":" (ERROR) "GLuint GetName(void) const" (type_identifier) "GLuint" (function_declarator) "GetName(void) const" (identifier) "GetName" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (labeled_statement) "public:\n void Lock(void);" (statement_identifier) "public" (:) ":" (declaration) "void Lock(void);" (primitive_type) "void" (function_declarator) "Lock(void)" (identifier) "Lock" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void Unlock(bool bFree);" (primitive_type) "void" (function_declarator) "Unlock(bool bFree)" (identifier) "Unlock" (parameter_list) "(bool bFree)" (() "(" (parameter_declaration) "bool bFree" (primitive_type) "bool" (identifier) "bFree" ()) ")" (;) ";" (labeled_statement) "private:\n void Bind(void) const;" (statement_identifier) "private" (:) ":" (ERROR) "void Bind(void) const" (primitive_type) "void" (function_declarator) "Bind(void) const" (identifier) "Bind" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (labeled_statement) "private:\n bool Load(const char *szFileName);" (statement_identifier) "private" (:) ":" (declaration) "bool Load(const char *szFileName);" (primitive_type) "bool" (function_declarator) "Load(const char *szFileName)" (identifier) "Load" (parameter_list) "(const char *szFileName)" (() "(" (parameter_declaration) "const char *szFileName" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*szFileName" (*) "*" (identifier) "szFileName" ()) ")" (;) ";" (declaration) "void Free(void);" (primitive_type) "void" (function_declarator) "Free(void)" (identifier) "Free" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type);" (primitive_type) "void" (function_declarator) "CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type)" (identifier) "CreateIndexBuffer" (parameter_list) "(size_t size, const void *pBuffer, bool bDynamic, GLenum type)" (() "(" (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" (,) "," (parameter_declaration) "const void *pBuffer" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*pBuffer" (*) "*" (identifier) "pBuffer" (,) "," (parameter_declaration) "bool bDynamic" (primitive_type) "bool" (identifier) "bDynamic" (,) "," (parameter_declaration) "GLenum type" (type_identifier) "GLenum" (identifier) "type" ()) ")" (;) ";" (declaration) "void CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format);" (primitive_type) "void" (function_declarator) "CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format)" (identifier) "CreateVertexBuffer" (parameter_list) "(size_t size, const void *pBuffer, bool bDynamic, GLuint format)" (() "(" (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" (,) "," (parameter_declaration) "const void *pBuffer" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*pBuffer" (*) "*" (identifier) "pBuffer" (,) "," (parameter_declaration) "bool bDynamic" (primitive_type) "bool" (identifier) "bDynamic" (,) "," (parameter_declaration) "GLuint format" (type_identifier) "GLuint" (identifier) "format" ()) ")" (;) ";" (declaration) "void CreateInstanceBuffer(GLuint format);" (primitive_type) "void" (function_declarator) "CreateInstanceBuffer(GLuint format)" (identifier) "CreateInstanceBuffer" (parameter_list) "(GLuint format)" (() "(" (parameter_declaration) "GLuint format" (type_identifier) "GLuint" (identifier) "format" ()) ")" (;) ";" (labeled_statement) "public:\n void SetInstance(const glm::mat4 &mtxTransform);" (statement_identifier) "public" (:) ":" (declaration) "void SetInstance(const glm::mat4 &mtxTransform);" (primitive_type) "void" (function_declarator) "SetInstance(const glm::mat4 &mtxTransform)" (identifier) "SetInstance" (parameter_list) "(const glm::mat4 &mtxTransform)" (() "(" (parameter_declaration) "const glm::mat4 &mtxTransform" (type_qualifier) "const" (const) "const" (type_identifier) "glm" (ERROR) "::mat4 &" (:) ":" (:) ":" (identifier) "mat4" (&) "&" (identifier) "mtxTransform" ()) ")" (;) ";" (declaration) "void AddInstance(const glm::mat4 &mtxTransform);" (primitive_type) "void" (function_declarator) "AddInstance(const glm::mat4 &mtxTransform)" (identifier) "AddInstance" (parameter_list) "(const glm::mat4 &mtxTransform)" (() "(" (parameter_declaration) "const glm::mat4 &mtxTransform" (type_qualifier) "const" (const) "const" (type_identifier) "glm" (ERROR) "::mat4 &" (:) ":" (:) ":" (identifier) "mat4" (&) "&" (identifier) "mtxTransform" ()) ")" (;) ";" (declaration) "void ClearInstance(void);" (primitive_type) "void" (function_declarator) "ClearInstance(void)" (identifier) "ClearInstance" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (labeled_statement) "public:\n GLenum GetIndexType(void) const;" (statement_identifier) "public" (:) ":" (ERROR) "GLenum GetIndexType(void) const" (type_identifier) "GLenum" (function_declarator) "GetIndexType(void) const" (identifier) "GetIndexType" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "GLuint GetIndexCount(void) const" (type_identifier) "GLuint" (function_declarator) "GetIndexCount(void) const" (identifier) "GetIndexCount" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "GLuint GetVertexFormat(void) const" (type_identifier) "GLuint" (function_declarator) "GetVertexFormat(void) const" (identifier) "GetVertexFormat" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "GLuint GetVertexCount(void) const" (type_identifier) "GLuint" (function_declarator) "GetVertexCount(void) const" (identifier) "GetVertexCount" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "GLuint GetInstanceCount(void) const" (type_identifier) "GLuint" (function_declarator) "GetInstanceCount(void) const" (identifier) "GetInstanceCount" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (labeled_statement) "private:\n GLuint m_name;" (statement_identifier) "private" (:) ":" (declaration) "GLuint m_name;" (type_identifier) "GLuint" (identifier) "m_name" (;) ";" (labeled_statement) "private:\n CGfxIndexBuffer *m_pIndexBuffer;" (statement_identifier) "private" (:) ":" (declaration) "CGfxIndexBuffer *m_pIndexBuffer;" (type_identifier) "CGfxIndexBuffer" (pointer_declarator) "*m_pIndexBuffer" (*) "*" (identifier) "m_pIndexBuffer" (;) ";" (declaration) "CGfxVertexBuffer *m_pVertexBuffer;" (type_identifier) "CGfxVertexBuffer" (pointer_declarator) "*m_pVertexBuffer" (*) "*" (identifier) "m_pVertexBuffer" (;) ";" (declaration) "CGfxInstanceBuffer *m_pInstanceBuffer;" (type_identifier) "CGfxInstanceBuffer" (pointer_declarator) "*m_pInstanceBuffer" (*) "*" (identifier) "m_pInstanceBuffer" (;) ";" (declaration) "CGfxVertexArrayObject *m_pVertexArrayObject;" (type_identifier) "CGfxVertexArrayObject" (pointer_declarator) "*m_pVertexArrayObject" (*) "*" (identifier) "m_pVertexArrayObject" (;) ";" (labeled_statement) "private:\n GLuint refCount;" (statement_identifier) "private" (:) ":" (declaration) "GLuint refCount;" (type_identifier) "GLuint" (identifier) "refCount" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
376
13
{"language": "c", "success": true, "metadata": {"lines": 51, "avg_line_length": 23.47, "nodes": 230, "errors": 0, "source_hash": "803d6623ae53b07481690c6fe7cee9220fac1a3ef9c739fa2678d861bc52757e", "categorized_nodes": 143}, "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 \"gles3/gl3.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": "\"gles3/gl3.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include \"glm/glm.hpp\"\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": "\"glm/glm.hpp\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 22}}, {"id": 9, "type": "declaration", "text": "class CGfxIndexBuffer;", "parent": null, "children": [10], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 22}}, {"id": 10, "type": "identifier", "text": "CGfxIndexBuffer", "parent": 9, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 21}}, {"id": 11, "type": "declaration", "text": "class CGfxVertexBuffer;", "parent": null, "children": [12], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 23}}, {"id": 12, "type": "identifier", "text": "CGfxVertexBuffer", "parent": 11, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 22}}, {"id": 13, "type": "declaration", "text": "class CGfxInstanceBuffer;", "parent": null, "children": [14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 25}}, {"id": 14, "type": "identifier", "text": "CGfxInstanceBuffer", "parent": 13, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 24}}, {"id": 15, "type": "declaration", "text": "class CGfxVertexArrayObject;", "parent": null, "children": [16], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 28}}, {"id": 16, "type": "identifier", "text": "CGfxVertexArrayObject", "parent": 15, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 27}}, {"id": 17, "type": "function_definition", "text": "class CGfxMesh\n{\n\tfriend class CGfxRenderer;\n\tfriend class CGfxMeshManager;\n\n\nprivate:\n\tCGfxMesh(GLuint name);\n\tvirtual ~CGfxMesh(void);\n\n\npublic:\n\tGLuint GetName(void) const;\n\npublic:\n\tvoid Lock(void);\n\tvoid Unlock(bool bFree);\n\nprivate:\n\tvoid Bind(void) const;\n\nprivate:\n\tbool Load(const char *szFileName);\n\tvoid Free(void);\n\n\tvoid CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type);\n\tvoid CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format);\n\tvoid CreateInstanceBuffer(GLuint format);\n\npublic:\n\tvoid SetInstance(const glm::mat4 &mtxTransform);\n\tvoid AddInstance(const glm::mat4 &mtxTransform);\n\tvoid ClearInstance(void);\n\npublic:\n\tGLenum GetIndexType(void) const;\n\tGLuint GetIndexCount(void) const;\n\n\tGLuint GetVertexFormat(void) const;\n\tGLuint GetVertexCount(void) const;\n\n\tGLuint GetInstanceCount(void) const;\n\n\nprivate:\n\tGLuint m_name;\n\nprivate:\n\tCGfxIndexBuffer *m_pIndexBuffer;\n\tCGfxVertexBuffer *m_pVertexBuffer;\n\tCGfxInstanceBuffer *m_pInstanceBuffer;\n\tCGfxVertexArrayObject *m_pVertexArrayObject;\n\nprivate:\n\tGLuint refCount;\n}", "parent": null, "children": [18], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 18, "type": "identifier", "text": "CGfxMesh", "parent": 17, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 14}}, {"id": 19, "type": "declaration", "text": "friend class CGfxRenderer;", "parent": 17, "children": [20, 21], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 27}}, {"id": 20, "type": "type_identifier", "text": "friend", "parent": 19, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 7}}, {"id": 21, "type": "identifier", "text": "CGfxRenderer", "parent": 19, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 26}}, {"id": 22, "type": "declaration", "text": "friend class CGfxMeshManager;", "parent": 17, "children": [23, 24], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 30}}, {"id": 23, "type": "type_identifier", "text": "friend", "parent": 22, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 7}}, {"id": 24, "type": "identifier", "text": "CGfxMeshManager", "parent": 22, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 29}}, {"id": 25, "type": "labeled_statement", "text": "private:\n\tCGfxMesh(GLuint name);\n\tvirtual ~CGfxMesh(void);", "parent": 17, "children": [26], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 17, "column": 25}}, {"id": 26, "type": "declaration", "text": "CGfxMesh(GLuint name);\n\tvirtual ~CGfxMesh(void);", "parent": 25, "children": [27, 33, 36], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 17, "column": 25}}, {"id": 27, "type": "macro_type_specifier", "text": "CGfxMesh(GLuint name)", "parent": 26, "children": [28, 29, 31], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 22}}, {"id": 28, "type": "identifier", "text": "CGfxMesh", "parent": 27, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 9}}, {"id": 29, "type": "ERROR", "text": "GLuint", "parent": 27, "children": [30], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 16}}, {"id": 30, "type": "type_identifier", "text": "GLuint", "parent": 29, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 16}}, {"id": 31, "type": "type_descriptor", "text": "name", "parent": 27, "children": [32], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 21}}, {"id": 32, "type": "type_identifier", "text": "name", "parent": 31, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 21}}, {"id": 33, "type": "ERROR", "text": ";\n\tvirtual ~", "parent": 26, "children": [34, 35], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 17, "column": 10}}, {"id": 34, "type": "identifier", "text": "virtual", "parent": 33, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 8}}, {"id": 35, "type": "~", "text": "~", "parent": 33, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 10}}, {"id": 36, "type": "function_declarator", "text": "CGfxMesh(void)", "parent": 26, "children": [37, 38], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 24}}, {"id": 37, "type": "identifier", "text": "CGfxMesh", "parent": 36, "children": [], "start_point": {"row": 17, "column": 10}, "end_point": {"row": 17, "column": 18}}, {"id": 38, "type": "parameter_list", "text": "(void)", "parent": 36, "children": [39], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 24}}, {"id": 39, "type": "parameter_declaration", "text": "void", "parent": 38, "children": [40], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 23}}, {"id": 40, "type": "primitive_type", "text": "void", "parent": 39, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 23}}, {"id": 41, "type": "labeled_statement", "text": "public:\n\tGLuint GetName(void) const;", "parent": 17, "children": [42], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 28}}, {"id": 42, "type": "ERROR", "text": "GLuint GetName(void) const", "parent": 41, "children": [43, 44], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 27}}, {"id": 43, "type": "type_identifier", "text": "GLuint", "parent": 42, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 7}}, {"id": 44, "type": "function_declarator", "text": "GetName(void) const", "parent": 42, "children": [45, 46], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 27}}, {"id": 45, "type": "identifier", "text": "GetName", "parent": 44, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 15}}, {"id": 46, "type": "parameter_list", "text": "(void)", "parent": 44, "children": [47], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 21}}, {"id": 47, "type": "parameter_declaration", "text": "void", "parent": 46, "children": [48], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 20}}, {"id": 48, "type": "primitive_type", "text": "void", "parent": 47, "children": [], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 20}}, {"id": 49, "type": "labeled_statement", "text": "public:\n\tvoid Lock(void);", "parent": 17, "children": [50], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 17}}, {"id": 50, "type": "declaration", "text": "void Lock(void);", "parent": 49, "children": [51, 52], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 17}}, {"id": 51, "type": "primitive_type", "text": "void", "parent": 50, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 5}}, {"id": 52, "type": "function_declarator", "text": "Lock(void)", "parent": 50, "children": [53, 54], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 16}}, {"id": 53, "type": "identifier", "text": "Lock", "parent": 52, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 10}}, {"id": 54, "type": "parameter_list", "text": "(void)", "parent": 52, "children": [55], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 16}}, {"id": 55, "type": "parameter_declaration", "text": "void", "parent": 54, "children": [56], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 15}}, {"id": 56, "type": "primitive_type", "text": "void", "parent": 55, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 15}}, {"id": 57, "type": "declaration", "text": "void Unlock(bool bFree);", "parent": 17, "children": [58, 59], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 25}}, {"id": 58, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 5}}, {"id": 59, "type": "function_declarator", "text": "Unlock(bool bFree)", "parent": 57, "children": [60, 61], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 24}}, {"id": 60, "type": "identifier", "text": "Unlock", "parent": 59, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 12}}, {"id": 61, "type": "parameter_list", "text": "(bool bFree)", "parent": 59, "children": [62], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 24}}, {"id": 62, "type": "parameter_declaration", "text": "bool bFree", "parent": 61, "children": [63, 64], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 23}}, {"id": 63, "type": "primitive_type", "text": "bool", "parent": 62, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 17}}, {"id": 64, "type": "identifier", "text": "bFree", "parent": 62, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 23}}, {"id": 65, "type": "labeled_statement", "text": "private:\n\tvoid Bind(void) const;", "parent": 17, "children": [66], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 23}}, {"id": 66, "type": "ERROR", "text": "void Bind(void) const", "parent": 65, "children": [67, 68], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 22}}, {"id": 67, "type": "primitive_type", "text": "void", "parent": 66, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 5}}, {"id": 68, "type": "function_declarator", "text": "Bind(void) const", "parent": 66, "children": [69, 70], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 22}}, {"id": 69, "type": "identifier", "text": "Bind", "parent": 68, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 10}}, {"id": 70, "type": "parameter_list", "text": "(void)", "parent": 68, "children": [71], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 16}}, {"id": 71, "type": "parameter_declaration", "text": "void", "parent": 70, "children": [72], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 15}}, {"id": 72, "type": "primitive_type", "text": "void", "parent": 71, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 15}}, {"id": 73, "type": "labeled_statement", "text": "private:\n\tbool Load(const char *szFileName);", "parent": 17, "children": [74], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 35}}, {"id": 74, "type": "declaration", "text": "bool Load(const char *szFileName);", "parent": 73, "children": [75, 76], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 35}}, {"id": 75, "type": "primitive_type", "text": "bool", "parent": 74, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 5}}, {"id": 76, "type": "function_declarator", "text": "Load(const char *szFileName)", "parent": 74, "children": [77, 78], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 34}}, {"id": 77, "type": "identifier", "text": "Load", "parent": 76, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 10}}, {"id": 78, "type": "parameter_list", "text": "(const char *szFileName)", "parent": 76, "children": [79], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 34}}, {"id": 79, "type": "parameter_declaration", "text": "const char *szFileName", "parent": 78, "children": [80, 81], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 33}}, {"id": 80, "type": "primitive_type", "text": "char", "parent": 79, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 21}}, {"id": 81, "type": "pointer_declarator", "text": "*szFileName", "parent": 79, "children": [82, 83], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 33}}, {"id": 82, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 23}}, {"id": 83, "type": "identifier", "text": "szFileName", "parent": 81, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 33}}, {"id": 84, "type": "declaration", "text": "void Free(void);", "parent": 17, "children": [85, 86], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 17}}, {"id": 85, "type": "primitive_type", "text": "void", "parent": 84, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 5}}, {"id": 86, "type": "function_declarator", "text": "Free(void)", "parent": 84, "children": [87, 88], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 16}}, {"id": 87, "type": "identifier", "text": "Free", "parent": 86, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 10}}, {"id": 88, "type": "parameter_list", "text": "(void)", "parent": 86, "children": [89], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 16}}, {"id": 89, "type": "parameter_declaration", "text": "void", "parent": 88, "children": [90], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 15}}, {"id": 90, "type": "primitive_type", "text": "void", "parent": 89, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 15}}, {"id": 91, "type": "declaration", "text": "void CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type);", "parent": 17, "children": [92, 93], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 86}}, {"id": 92, "type": "primitive_type", "text": "void", "parent": 91, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 5}}, {"id": 93, "type": "function_declarator", "text": "CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type)", "parent": 91, "children": [94, 95], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 85}}, {"id": 94, "type": "identifier", "text": "CreateIndexBuffer", "parent": 93, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 23}}, {"id": 95, "type": "parameter_list", "text": "(size_t size, const void *pBuffer, bool bDynamic, GLenum type)", "parent": 93, "children": [96, 99, 104, 107], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 85}}, {"id": 96, "type": "parameter_declaration", "text": "size_t size", "parent": 95, "children": [97, 98], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 35}}, {"id": 97, "type": "primitive_type", "text": "size_t", "parent": 96, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 30}}, {"id": 98, "type": "identifier", "text": "size", "parent": 96, "children": [], "start_point": {"row": 34, "column": 31}, "end_point": {"row": 34, "column": 35}}, {"id": 99, "type": "parameter_declaration", "text": "const void *pBuffer", "parent": 95, "children": [100, 101], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 56}}, {"id": 100, "type": "primitive_type", "text": "void", "parent": 99, "children": [], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 47}}, {"id": 101, "type": "pointer_declarator", "text": "*pBuffer", "parent": 99, "children": [102, 103], "start_point": {"row": 34, "column": 48}, "end_point": {"row": 34, "column": 56}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 34, "column": 48}, "end_point": {"row": 34, "column": 49}}, {"id": 103, "type": "identifier", "text": "pBuffer", "parent": 101, "children": [], "start_point": {"row": 34, "column": 49}, "end_point": {"row": 34, "column": 56}}, {"id": 104, "type": "parameter_declaration", "text": "bool bDynamic", "parent": 95, "children": [105, 106], "start_point": {"row": 34, "column": 58}, "end_point": {"row": 34, "column": 71}}, {"id": 105, "type": "primitive_type", "text": "bool", "parent": 104, "children": [], "start_point": {"row": 34, "column": 58}, "end_point": {"row": 34, "column": 62}}, {"id": 106, "type": "identifier", "text": "bDynamic", "parent": 104, "children": [], "start_point": {"row": 34, "column": 63}, "end_point": {"row": 34, "column": 71}}, {"id": 107, "type": "parameter_declaration", "text": "GLenum type", "parent": 95, "children": [108, 109], "start_point": {"row": 34, "column": 73}, "end_point": {"row": 34, "column": 84}}, {"id": 108, "type": "type_identifier", "text": "GLenum", "parent": 107, "children": [], "start_point": {"row": 34, "column": 73}, "end_point": {"row": 34, "column": 79}}, {"id": 109, "type": "identifier", "text": "type", "parent": 107, "children": [], "start_point": {"row": 34, "column": 80}, "end_point": {"row": 34, "column": 84}}, {"id": 110, "type": "declaration", "text": "void CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format);", "parent": 17, "children": [111, 112], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 89}}, {"id": 111, "type": "primitive_type", "text": "void", "parent": 110, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 5}}, {"id": 112, "type": "function_declarator", "text": "CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format)", "parent": 110, "children": [113, 114], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 88}}, {"id": 113, "type": "identifier", "text": "CreateVertexBuffer", "parent": 112, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 24}}, {"id": 114, "type": "parameter_list", "text": "(size_t size, const void *pBuffer, bool bDynamic, GLuint format)", "parent": 112, "children": [115, 118, 123, 126], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 88}}, {"id": 115, "type": "parameter_declaration", "text": "size_t size", "parent": 114, "children": [116, 117], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 36}}, {"id": 116, "type": "primitive_type", "text": "size_t", "parent": 115, "children": [], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 31}}, {"id": 117, "type": "identifier", "text": "size", "parent": 115, "children": [], "start_point": {"row": 35, "column": 32}, "end_point": {"row": 35, "column": 36}}, {"id": 118, "type": "parameter_declaration", "text": "const void *pBuffer", "parent": 114, "children": [119, 120], "start_point": {"row": 35, "column": 38}, "end_point": {"row": 35, "column": 57}}, {"id": 119, "type": "primitive_type", "text": "void", "parent": 118, "children": [], "start_point": {"row": 35, "column": 44}, "end_point": {"row": 35, "column": 48}}, {"id": 120, "type": "pointer_declarator", "text": "*pBuffer", "parent": 118, "children": [121, 122], "start_point": {"row": 35, "column": 49}, "end_point": {"row": 35, "column": 57}}, {"id": 121, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 35, "column": 49}, "end_point": {"row": 35, "column": 50}}, {"id": 122, "type": "identifier", "text": "pBuffer", "parent": 120, "children": [], "start_point": {"row": 35, "column": 50}, "end_point": {"row": 35, "column": 57}}, {"id": 123, "type": "parameter_declaration", "text": "bool bDynamic", "parent": 114, "children": [124, 125], "start_point": {"row": 35, "column": 59}, "end_point": {"row": 35, "column": 72}}, {"id": 124, "type": "primitive_type", "text": "bool", "parent": 123, "children": [], "start_point": {"row": 35, "column": 59}, "end_point": {"row": 35, "column": 63}}, {"id": 125, "type": "identifier", "text": "bDynamic", "parent": 123, "children": [], "start_point": {"row": 35, "column": 64}, "end_point": {"row": 35, "column": 72}}, {"id": 126, "type": "parameter_declaration", "text": "GLuint format", "parent": 114, "children": [127, 128], "start_point": {"row": 35, "column": 74}, "end_point": {"row": 35, "column": 87}}, {"id": 127, "type": "type_identifier", "text": "GLuint", "parent": 126, "children": [], "start_point": {"row": 35, "column": 74}, "end_point": {"row": 35, "column": 80}}, {"id": 128, "type": "identifier", "text": "format", "parent": 126, "children": [], "start_point": {"row": 35, "column": 81}, "end_point": {"row": 35, "column": 87}}, {"id": 129, "type": "declaration", "text": "void CreateInstanceBuffer(GLuint format);", "parent": 17, "children": [130, 131], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 42}}, {"id": 130, "type": "primitive_type", "text": "void", "parent": 129, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 5}}, {"id": 131, "type": "function_declarator", "text": "CreateInstanceBuffer(GLuint format)", "parent": 129, "children": [132, 133], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 41}}, {"id": 132, "type": "identifier", "text": "CreateInstanceBuffer", "parent": 131, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 26}}, {"id": 133, "type": "parameter_list", "text": "(GLuint format)", "parent": 131, "children": [134], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 41}}, {"id": 134, "type": "parameter_declaration", "text": "GLuint format", "parent": 133, "children": [135, 136], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 40}}, {"id": 135, "type": "type_identifier", "text": "GLuint", "parent": 134, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 33}}, {"id": 136, "type": "identifier", "text": "format", "parent": 134, "children": [], "start_point": {"row": 36, "column": 34}, "end_point": {"row": 36, "column": 40}}, {"id": 137, "type": "labeled_statement", "text": "public:\n\tvoid SetInstance(const glm::mat4 &mtxTransform);", "parent": 17, "children": [138], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 49}}, {"id": 138, "type": "declaration", "text": "void SetInstance(const glm::mat4 &mtxTransform);", "parent": 137, "children": [139, 140], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 49}}, {"id": 139, "type": "primitive_type", "text": "void", "parent": 138, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 5}}, {"id": 140, "type": "function_declarator", "text": "SetInstance(const glm::mat4 &mtxTransform)", "parent": 138, "children": [141, 142], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 48}}, {"id": 141, "type": "identifier", "text": "SetInstance", "parent": 140, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 17}}, {"id": 142, "type": "parameter_list", "text": "(const glm::mat4 &mtxTransform)", "parent": 140, "children": [143], "start_point": {"row": 39, "column": 17}, "end_point": {"row": 39, "column": 48}}, {"id": 143, "type": "parameter_declaration", "text": "const glm::mat4 &mtxTransform", "parent": 142, "children": [144, 145, 147], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 47}}, {"id": 144, "type": "type_identifier", "text": "glm", "parent": 143, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 27}}, {"id": 145, "type": "ERROR", "text": "::mat4 &", "parent": 143, "children": [146], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 35}}, {"id": 146, "type": "identifier", "text": "mat4", "parent": 145, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 33}}, {"id": 147, "type": "identifier", "text": "mtxTransform", "parent": 143, "children": [], "start_point": {"row": 39, "column": 35}, "end_point": {"row": 39, "column": 47}}, {"id": 148, "type": "declaration", "text": "void AddInstance(const glm::mat4 &mtxTransform);", "parent": 17, "children": [149, 150], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 49}}, {"id": 149, "type": "primitive_type", "text": "void", "parent": 148, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 5}}, {"id": 150, "type": "function_declarator", "text": "AddInstance(const glm::mat4 &mtxTransform)", "parent": 148, "children": [151, 152], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 48}}, {"id": 151, "type": "identifier", "text": "AddInstance", "parent": 150, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 17}}, {"id": 152, "type": "parameter_list", "text": "(const glm::mat4 &mtxTransform)", "parent": 150, "children": [153], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 48}}, {"id": 153, "type": "parameter_declaration", "text": "const glm::mat4 &mtxTransform", "parent": 152, "children": [154, 155, 157], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 47}}, {"id": 154, "type": "type_identifier", "text": "glm", "parent": 153, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 27}}, {"id": 155, "type": "ERROR", "text": "::mat4 &", "parent": 153, "children": [156], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 35}}, {"id": 156, "type": "identifier", "text": "mat4", "parent": 155, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 33}}, {"id": 157, "type": "identifier", "text": "mtxTransform", "parent": 153, "children": [], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 47}}, {"id": 158, "type": "declaration", "text": "void ClearInstance(void);", "parent": 17, "children": [159, 160], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 26}}, {"id": 159, "type": "primitive_type", "text": "void", "parent": 158, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 5}}, {"id": 160, "type": "function_declarator", "text": "ClearInstance(void)", "parent": 158, "children": [161, 162], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 25}}, {"id": 161, "type": "identifier", "text": "ClearInstance", "parent": 160, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 19}}, {"id": 162, "type": "parameter_list", "text": "(void)", "parent": 160, "children": [163], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 25}}, {"id": 163, "type": "parameter_declaration", "text": "void", "parent": 162, "children": [164], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 24}}, {"id": 164, "type": "primitive_type", "text": "void", "parent": 163, "children": [], "start_point": {"row": 41, "column": 20}, "end_point": {"row": 41, "column": 24}}, {"id": 165, "type": "labeled_statement", "text": "public:\n\tGLenum GetIndexType(void) const;", "parent": 17, "children": [166], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 33}}, {"id": 166, "type": "ERROR", "text": "GLenum GetIndexType(void) const", "parent": 165, "children": [167, 168], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 32}}, {"id": 167, "type": "type_identifier", "text": "GLenum", "parent": 166, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 7}}, {"id": 168, "type": "function_declarator", "text": "GetIndexType(void) const", "parent": 166, "children": [169, 170], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 32}}, {"id": 169, "type": "identifier", "text": "GetIndexType", "parent": 168, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 20}}, {"id": 170, "type": "parameter_list", "text": "(void)", "parent": 168, "children": [171], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 26}}, {"id": 171, "type": "parameter_declaration", "text": "void", "parent": 170, "children": [172], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 25}}, {"id": 172, "type": "primitive_type", "text": "void", "parent": 171, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 25}}, {"id": 173, "type": "ERROR", "text": "GLuint GetIndexCount(void) const", "parent": 17, "children": [174, 175], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 33}}, {"id": 174, "type": "type_identifier", "text": "GLuint", "parent": 173, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 7}}, {"id": 175, "type": "function_declarator", "text": "GetIndexCount(void) const", "parent": 173, "children": [176, 177], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 33}}, {"id": 176, "type": "identifier", "text": "GetIndexCount", "parent": 175, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 21}}, {"id": 177, "type": "parameter_list", "text": "(void)", "parent": 175, "children": [178], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 27}}, {"id": 178, "type": "parameter_declaration", "text": "void", "parent": 177, "children": [179], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 26}}, {"id": 179, "type": "primitive_type", "text": "void", "parent": 178, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 26}}, {"id": 180, "type": "ERROR", "text": "GLuint GetVertexFormat(void) const", "parent": 17, "children": [181, 182], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 35}}, {"id": 181, "type": "type_identifier", "text": "GLuint", "parent": 180, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 7}}, {"id": 182, "type": "function_declarator", "text": "GetVertexFormat(void) const", "parent": 180, "children": [183, 184], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 35}}, {"id": 183, "type": "identifier", "text": "GetVertexFormat", "parent": 182, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 23}}, {"id": 184, "type": "parameter_list", "text": "(void)", "parent": 182, "children": [185], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 29}}, {"id": 185, "type": "parameter_declaration", "text": "void", "parent": 184, "children": [186], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 28}}, {"id": 186, "type": "primitive_type", "text": "void", "parent": 185, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 28}}, {"id": 187, "type": "ERROR", "text": "GLuint GetVertexCount(void) const", "parent": 17, "children": [188, 189], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 34}}, {"id": 188, "type": "type_identifier", "text": "GLuint", "parent": 187, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 7}}, {"id": 189, "type": "function_declarator", "text": "GetVertexCount(void) const", "parent": 187, "children": [190, 191], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 34}}, {"id": 190, "type": "identifier", "text": "GetVertexCount", "parent": 189, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 22}}, {"id": 191, "type": "parameter_list", "text": "(void)", "parent": 189, "children": [192], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 28}}, {"id": 192, "type": "parameter_declaration", "text": "void", "parent": 191, "children": [193], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 27}}, {"id": 193, "type": "primitive_type", "text": "void", "parent": 192, "children": [], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 27}}, {"id": 194, "type": "ERROR", "text": "GLuint GetInstanceCount(void) const", "parent": 17, "children": [195, 196], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 36}}, {"id": 195, "type": "type_identifier", "text": "GLuint", "parent": 194, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 7}}, {"id": 196, "type": "function_declarator", "text": "GetInstanceCount(void) const", "parent": 194, "children": [197, 198], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 36}}, {"id": 197, "type": "identifier", "text": "GetInstanceCount", "parent": 196, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 24}}, {"id": 198, "type": "parameter_list", "text": "(void)", "parent": 196, "children": [199], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 30}}, {"id": 199, "type": "parameter_declaration", "text": "void", "parent": 198, "children": [200], "start_point": {"row": 50, "column": 25}, "end_point": {"row": 50, "column": 29}}, {"id": 200, "type": "primitive_type", "text": "void", "parent": 199, "children": [], "start_point": {"row": 50, "column": 25}, "end_point": {"row": 50, "column": 29}}, {"id": 201, "type": "labeled_statement", "text": "private:\n\tGLuint m_name;", "parent": 17, "children": [202], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 54, "column": 15}}, {"id": 202, "type": "declaration", "text": "GLuint m_name;", "parent": 201, "children": [203, 204], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 15}}, {"id": 203, "type": "type_identifier", "text": "GLuint", "parent": 202, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 7}}, {"id": 204, "type": "identifier", "text": "m_name", "parent": 202, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 14}}, {"id": 205, "type": "labeled_statement", "text": "private:\n\tCGfxIndexBuffer *m_pIndexBuffer;", "parent": 17, "children": [206], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 57, "column": 33}}, {"id": 206, "type": "declaration", "text": "CGfxIndexBuffer *m_pIndexBuffer;", "parent": 205, "children": [207, 208], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 33}}, {"id": 207, "type": "type_identifier", "text": "CGfxIndexBuffer", "parent": 206, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 16}}, {"id": 208, "type": "pointer_declarator", "text": "*m_pIndexBuffer", "parent": 206, "children": [209, 210], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 32}}, {"id": 209, "type": "*", "text": "*", "parent": 208, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 18}}, {"id": 210, "type": "identifier", "text": "m_pIndexBuffer", "parent": 208, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 32}}, {"id": 211, "type": "declaration", "text": "CGfxVertexBuffer *m_pVertexBuffer;", "parent": 17, "children": [212, 213], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 35}}, {"id": 212, "type": "type_identifier", "text": "CGfxVertexBuffer", "parent": 211, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 17}}, {"id": 213, "type": "pointer_declarator", "text": "*m_pVertexBuffer", "parent": 211, "children": [214, 215], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 34}}, {"id": 214, "type": "*", "text": "*", "parent": 213, "children": [], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 19}}, {"id": 215, "type": "identifier", "text": "m_pVertexBuffer", "parent": 213, "children": [], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 34}}, {"id": 216, "type": "declaration", "text": "CGfxInstanceBuffer *m_pInstanceBuffer;", "parent": 17, "children": [217, 218], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 39}}, {"id": 217, "type": "type_identifier", "text": "CGfxInstanceBuffer", "parent": 216, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 19}}, {"id": 218, "type": "pointer_declarator", "text": "*m_pInstanceBuffer", "parent": 216, "children": [219, 220], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 38}}, {"id": 219, "type": "*", "text": "*", "parent": 218, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 21}}, {"id": 220, "type": "identifier", "text": "m_pInstanceBuffer", "parent": 218, "children": [], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 38}}, {"id": 221, "type": "declaration", "text": "CGfxVertexArrayObject *m_pVertexArrayObject;", "parent": 17, "children": [222, 223], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 45}}, {"id": 222, "type": "type_identifier", "text": "CGfxVertexArrayObject", "parent": 221, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 22}}, {"id": 223, "type": "pointer_declarator", "text": "*m_pVertexArrayObject", "parent": 221, "children": [224, 225], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 44}}, {"id": 224, "type": "*", "text": "*", "parent": 223, "children": [], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 24}}, {"id": 225, "type": "identifier", "text": "m_pVertexArrayObject", "parent": 223, "children": [], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 44}}, {"id": 226, "type": "labeled_statement", "text": "private:\n\tGLuint refCount;", "parent": 17, "children": [227], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 63, "column": 17}}, {"id": 227, "type": "declaration", "text": "GLuint refCount;", "parent": 226, "children": [228, 229], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 17}}, {"id": 228, "type": "type_identifier", "text": "GLuint", "parent": 227, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 7}}, {"id": 229, "type": "identifier", "text": "refCount", "parent": 227, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 16}}]}, "node_categories": {"declarations": {"functions": [17, 36, 44, 52, 59, 68, 76, 86, 93, 112, 131, 140, 150, 160, 168, 175, 182, 189, 196], "variables": [9, 11, 13, 15, 19, 22, 26, 39, 47, 50, 55, 57, 62, 71, 74, 79, 84, 89, 91, 96, 99, 104, 107, 110, 115, 118, 123, 126, 129, 134, 138, 143, 148, 153, 158, 163, 171, 178, 185, 192, 199, 202, 206, 211, 216, 221, 227], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [10, 12, 14, 16, 18, 20, 21, 23, 24, 27, 28, 30, 32, 34, 37, 43, 45, 53, 60, 64, 69, 77, 83, 87, 94, 98, 103, 106, 108, 109, 113, 117, 122, 125, 127, 128, 132, 135, 136, 141, 144, 146, 147, 151, 154, 156, 157, 161, 167, 169, 174, 176, 181, 183, 188, 190, 195, 197, 203, 204, 207, 210, 212, 215, 217, 220, 222, 225, 228, 229], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 17, "universal_type": "function", "name": "CGfxMesh", "text_snippet": "class CGfxMesh\n{\n\tfriend class CGfxRenderer;\n\tfriend class CGfxMeshManager;\n\n\nprivate:\n\tCGfxMesh(GLu"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "CGfxMesh(void)"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "GetName(void) const"}, {"node_id": 52, "universal_type": "function", "name": "unknown", "text_snippet": "Lock(void)"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "Unlock(bool bFree)"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "Bind(void) const"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "Load(const char *szFileName)"}, {"node_id": 86, "universal_type": "function", "name": "unknown", "text_snippet": "Free(void)"}, {"node_id": 93, "universal_type": "function", "name": "*pBuffer,", "text_snippet": "CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type)"}, {"node_id": 112, "universal_type": "function", "name": "*pBuffer,", "text_snippet": "CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format)"}, {"node_id": 131, "universal_type": "function", "name": "unknown", "text_snippet": "CreateInstanceBuffer(GLuint format)"}, {"node_id": 140, "universal_type": "function", "name": "unknown", "text_snippet": "SetInstance(const glm::mat4 &mtxTransform)"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "AddInstance(const glm::mat4 &mtxTransform)"}, {"node_id": 160, "universal_type": "function", "name": "unknown", "text_snippet": "ClearInstance(void)"}, {"node_id": 168, "universal_type": "function", "name": "unknown", "text_snippet": "GetIndexType(void) const"}, {"node_id": 175, "universal_type": "function", "name": "unknown", "text_snippet": "GetIndexCount(void) const"}, {"node_id": 182, "universal_type": "function", "name": "unknown", "text_snippet": "GetVertexFormat(void) const"}, {"node_id": 189, "universal_type": "function", "name": "unknown", "text_snippet": "GetVertexCount(void) const"}, {"node_id": 196, "universal_type": "function", "name": "unknown", "text_snippet": "GetInstanceCount(void) const"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"gles3/gl3.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"glm/glm.hpp\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n#include \"gles3/gl3.h\"\n#include \"glm/glm.hpp\"\n\n\nclass CGfxIndexBuffer;\nclass CGfxVertexBuffer;\nclass CGfxInstanceBuffer;\nclass CGfxVertexArrayObject;\nclass CGfxMesh\n{\n\tfriend class CGfxRenderer;\n\tfriend class CGfxMeshManager;\n\n\nprivate:\n\tCGfxMesh(GLuint name);\n\tvirtual ~CGfxMesh(void);\n\n\npublic:\n\tGLuint GetName(void) const;\n\npublic:\n\tvoid Lock(void);\n\tvoid Unlock(bool bFree);\n\nprivate:\n\tvoid Bind(void) const;\n\nprivate:\n\tbool Load(const char *szFileName);\n\tvoid Free(void);\n\n\tvoid CreateIndexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLenum type);\n\tvoid CreateVertexBuffer(size_t size, const void *pBuffer, bool bDynamic, GLuint format);\n\tvoid CreateInstanceBuffer(GLuint format);\n\npublic:\n\tvoid SetInstance(const glm::mat4 &mtxTransform);\n\tvoid AddInstance(const glm::mat4 &mtxTransform);\n\tvoid ClearInstance(void);\n\npublic:\n\tGLenum GetIndexType(void) const;\n\tGLuint GetIndexCount(void) const;\n\n\tGLuint GetVertexFormat(void) const;\n\tGLuint GetVertexCount(void) const;\n\n\tGLuint GetInstanceCount(void) const;\n\n\nprivate:\n\tGLuint m_name;\n\nprivate:\n\tCGfxIndexBuffer *m_pIndexBuffer;\n\tCGfxVertexBuffer *m_pVertexBuffer;\n\tCGfxInstanceBuffer *m_pInstanceBuffer;\n\tCGfxVertexArrayObject *m_pVertexArrayObject;\n\nprivate:\n\tGLuint refCount;\n};\n"}
80,983
c
#ifndef H56BA330C_3488_4252_9784_B705C2E4D6F3 #define H56BA330C_3488_4252_9784_B705C2E4D6F3 #include "mcl/role.h" #include <stdint.h> #include <stdbool.h> MCL_STDC_BEGIN DEFINE_ROLE(Energy) { void (*consume)(Energy*, uint8_t); bool (*exhausted)(const Energy*); }; MCL_STDC_END #endif
22.83
12
(translation_unit) "#ifndef H56BA330C_3488_4252_9784_B705C2E4D6F3\n#define H56BA330C_3488_4252_9784_B705C2E4D6F3\n\n#include "mcl/role.h"\n#include <stdint.h>\n#include <stdbool.h>\n\nMCL_STDC_BEGIN\n\nDEFINE_ROLE(Energy) {\n void (*consume)(Energy*, uint8_t);\n bool (*exhausted)(const Energy*);\n};\n\nMCL_STDC_END\n\n#endif\n" (preproc_ifdef) "#ifndef H56BA330C_3488_4252_9784_B705C2E4D6F3\n#define H56BA330C_3488_4252_9784_B705C2E4D6F3\n\n#include "mcl/role.h"\n#include <stdint.h>\n#include <stdbool.h>\n\nMCL_STDC_BEGIN\n\nDEFINE_ROLE(Energy) {\n void (*consume)(Energy*, uint8_t);\n bool (*exhausted)(const Energy*);\n};\n\nMCL_STDC_END\n\n#endif" (#ifndef) "#ifndef" (identifier) "H56BA330C_3488_4252_9784_B705C2E4D6F3" (preproc_def) "#define H56BA330C_3488_4252_9784_B705C2E4D6F3\n" (#define) "#define" (identifier) "H56BA330C_3488_4252_9784_B705C2E4D6F3" (preproc_include) "#include "mcl/role.h"\n" (#include) "#include" (string_literal) ""mcl/role.h"" (") """ (string_content) "mcl/role.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>" (function_definition) "MCL_STDC_BEGIN\n\nDEFINE_ROLE(Energy) {\n void (*consume)(Energy*, uint8_t);\n bool (*exhausted)(const Energy*);\n}" (type_identifier) "MCL_STDC_BEGIN" (function_declarator) "DEFINE_ROLE(Energy)" (identifier) "DEFINE_ROLE" (parameter_list) "(Energy)" (() "(" (parameter_declaration) "Energy" (type_identifier) "Energy" ()) ")" (compound_statement) "{\n void (*consume)(Energy*, uint8_t);\n bool (*exhausted)(const Energy*);\n}" ({) "{" (declaration) "void (*consume)(Energy*, uint8_t);" (primitive_type) "void" (function_declarator) "(*consume)(Energy*, uint8_t)" (parenthesized_declarator) "(*consume)" (() "(" (pointer_declarator) "*consume" (*) "*" (identifier) "consume" ()) ")" (parameter_list) "(Energy*, uint8_t)" (() "(" (parameter_declaration) "Energy*" (type_identifier) "Energy" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "uint8_t" (primitive_type) "uint8_t" ()) ")" (;) ";" (declaration) "bool (*exhausted)(const Energy*);" (primitive_type) "bool" (function_declarator) "(*exhausted)(const Energy*)" (parenthesized_declarator) "(*exhausted)" (() "(" (pointer_declarator) "*exhausted" (*) "*" (identifier) "exhausted" ()) ")" (parameter_list) "(const Energy*)" (() "(" (parameter_declaration) "const Energy*" (type_qualifier) "const" (const) "const" (type_identifier) "Energy" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (type_identifier) "MCL_STDC_END" (;) "" (#endif) "#endif"
75
0
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 22.83, "nodes": 50, "errors": 0, "source_hash": "3586c46e5a9253b9c5b8b37e2c4d600d001b7b9208aebd80fe522ac71264f103", "categorized_nodes": 32}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef H56BA330C_3488_4252_9784_B705C2E4D6F3\n#define H56BA330C_3488_4252_9784_B705C2E4D6F3\n\n#include \"mcl/role.h\"\n#include <stdint.h>\n#include <stdbool.h>\n\nMCL_STDC_BEGIN\n\nDEFINE_ROLE(Energy) {\n\tvoid (*consume)(Energy*, uint8_t);\n\tbool (*exhausted)(const Energy*);\n};\n\nMCL_STDC_END\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 48, 49], "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": "H56BA330C_3488_4252_9784_B705C2E4D6F3", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 45}}, {"id": 3, "type": "preproc_def", "text": "#define H56BA330C_3488_4252_9784_B705C2E4D6F3\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": "H56BA330C_3488_4252_9784_B705C2E4D6F3", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 45}}, {"id": 6, "type": "preproc_include", "text": "#include \"mcl/role.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": "\"mcl/role.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 21}}, {"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": "preproc_include", "text": "#include <stdbool.h>\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": "<stdbool.h>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 20}}, {"id": 15, "type": "function_definition", "text": "MCL_STDC_BEGIN\n\nDEFINE_ROLE(Energy) {\n\tvoid (*consume)(Energy*, uint8_t);\n\tbool (*exhausted)(const Energy*);\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "MCL_STDC_BEGIN", "parent": 15, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 14}}, {"id": 17, "type": "function_declarator", "text": "DEFINE_ROLE(Energy)", "parent": 15, "children": [18, 19], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 19}}, {"id": 18, "type": "identifier", "text": "DEFINE_ROLE", "parent": 17, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 11}}, {"id": 19, "type": "parameter_list", "text": "(Energy)", "parent": 17, "children": [20], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 19}}, {"id": 20, "type": "parameter_declaration", "text": "Energy", "parent": 19, "children": [21], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 18}}, {"id": 21, "type": "type_identifier", "text": "Energy", "parent": 20, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 18}}, {"id": 22, "type": "declaration", "text": "void (*consume)(Energy*, uint8_t);", "parent": 15, "children": [23, 24], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 35}}, {"id": 23, "type": "primitive_type", "text": "void", "parent": 22, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 5}}, {"id": 24, "type": "function_declarator", "text": "(*consume)(Energy*, uint8_t)", "parent": 22, "children": [25, 29], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 34}}, {"id": 25, "type": "parenthesized_declarator", "text": "(*consume)", "parent": 24, "children": [26], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 16}}, {"id": 26, "type": "pointer_declarator", "text": "*consume", "parent": 25, "children": [27, 28], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 15}}, {"id": 27, "type": "*", "text": "*", "parent": 26, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 8}}, {"id": 28, "type": "identifier", "text": "consume", "parent": 26, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 15}}, {"id": 29, "type": "parameter_list", "text": "(Energy*, uint8_t)", "parent": 24, "children": [30, 34], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 34}}, {"id": 30, "type": "parameter_declaration", "text": "Energy*", "parent": 29, "children": [31, 32], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 24}}, {"id": 31, "type": "type_identifier", "text": "Energy", "parent": 30, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 23}}, {"id": 32, "type": "abstract_pointer_declarator", "text": "*", "parent": 30, "children": [33], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 24}}, {"id": 33, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 24}}, {"id": 34, "type": "parameter_declaration", "text": "uint8_t", "parent": 29, "children": [35], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 33}}, {"id": 35, "type": "primitive_type", "text": "uint8_t", "parent": 34, "children": [], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 33}}, {"id": 36, "type": "declaration", "text": "bool (*exhausted)(const Energy*);", "parent": 15, "children": [37, 38], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 34}}, {"id": 37, "type": "primitive_type", "text": "bool", "parent": 36, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 5}}, {"id": 38, "type": "function_declarator", "text": "(*exhausted)(const Energy*)", "parent": 36, "children": [39, 43], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 33}}, {"id": 39, "type": "parenthesized_declarator", "text": "(*exhausted)", "parent": 38, "children": [40], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 18}}, {"id": 40, "type": "pointer_declarator", "text": "*exhausted", "parent": 39, "children": [41, 42], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 17}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 8}}, {"id": 42, "type": "identifier", "text": "exhausted", "parent": 40, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 17}}, {"id": 43, "type": "parameter_list", "text": "(const Energy*)", "parent": 38, "children": [44], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 33}}, {"id": 44, "type": "parameter_declaration", "text": "const Energy*", "parent": 43, "children": [45, 46], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 32}}, {"id": 45, "type": "type_identifier", "text": "Energy", "parent": 44, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 31}}, {"id": 46, "type": "abstract_pointer_declarator", "text": "*", "parent": 44, "children": [47], "start_point": {"row": 11, "column": 31}, "end_point": {"row": 11, "column": 32}}, {"id": 47, "type": "*", "text": "*", "parent": 46, "children": [], "start_point": {"row": 11, "column": 31}, "end_point": {"row": 11, "column": 32}}, {"id": 48, "type": "type_identifier", "text": "MCL_STDC_END", "parent": 0, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 12}}, {"id": 49, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 17, 24, 38], "variables": [20, 22, 30, 34, 36, 44], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 16, 18, 21, 28, 31, 42, 45, 48, 49], "returns": [], "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": "", "text_snippet": "MCL_STDC_BEGIN\n\nDEFINE_ROLE(Energy) {\n\tvoid (*consume)(Energy*, uint8_t);\n\tbool (*exhausted)(const E"}, {"node_id": 17, "universal_type": "function", "name": "unknown", "text_snippet": "DEFINE_ROLE(Energy)"}, {"node_id": 24, "universal_type": "function", "name": "unknown", "text_snippet": "(*consume)(Energy*, uint8_t)"}, {"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "(*exhausted)(const Energy*)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"mcl/role.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": "#ifndef H56BA330C_3488_4252_9784_B705C2E4D6F3\n#define H56BA330C_3488_4252_9784_B705C2E4D6F3\n\n#include \"mcl/role.h\"\n#include <stdint.h>\n#include <stdbool.h>\n\nMCL_STDC_BEGIN\n\nDEFINE_ROLE(Energy) {\n\tvoid (*consume)(Energy*, uint8_t);\n\tbool (*exhausted)(const Energy*);\n};\n\nMCL_STDC_END\n\n#endif\n"}
80,984
c
#pragma once #include <glm/glm.hpp> class Camera { public: Camera(glm::vec2 size, float zoom); // Setter functions. void setPosition(glm::vec2 position); void setSize(glm::vec2 size); void setZoom(float zoom); // Getter functions. glm::vec2 getPosition() const; glm::mat4 getView() const; float getZoom() const; // Get projection matrices. glm::mat4 getUIProjection() const; glm::mat4 getSceneProjection() const; private: // Update the canera's matrices. void updateView(); void updateProjection(); // The center position of the camera in pixels. glm::vec2 m_position{ 0.f }; // The width and height of the camera. glm::vec2 m_size{ 0.f }; // The scale value for how zoomed in the camera is. float m_zoom{ 1.f }; // Hold the view matrix to avoid recalculating. glm::mat4 m_view{ 1.f }; // Hold the projection matrices to avoid recalculating. glm::mat4 m_uiProj{ 1.f }; glm::mat4 m_sceneProj{ 1.f }; };
27.12
33
(ERROR) "#pragma once\n\n#include <glm/glm.hpp>\n\nclass Camera\n{\npublic:\n Camera(glm::vec2 size, float zoom);\n\n // Setter functions.\n void setPosition(glm::vec2 position);\n void setSize(glm::vec2 size);\n void setZoom(float zoom);\n\n // Getter functions.\n glm::vec2 getPosition() const;\n glm::mat4 getView() const;\n float getZoom() const;\n\n // Get projection matrices.\n glm::mat4 getUIProjection() const;\n glm::mat4 getSceneProjection() const;\n\nprivate:\n // Update the canera's matrices.\n void updateView();\n void updateProjection();\n\n // The center position of the camera in pixels.\n glm::vec2 m_position{ 0.f };\n\n // The width and height of the camera.\n glm::vec2 m_size{ 0.f };\n\n // The scale value for how zoomed in the camera is.\n float m_zoom{ 1.f };\n\n // Hold the view matrix to avoid recalculating.\n glm::mat4 m_view{ 1.f };\n\n // Hold the projection matrices to avoid recalculating.\n glm::mat4 m_uiProj{ 1.f };\n glm::mat4 m_sceneProj{ 1.f };\n};" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <glm/glm.hpp>\n" (#include) "#include" (system_lib_string) "<glm/glm.hpp>" (type_identifier) "class" (identifier) "Camera" ({) "{" (labeled_statement) "public:\n Camera(glm::vec2 size, float zoom);" (statement_identifier) "public" (:) ":" (labeled_statement) "Camera(glm::vec2 size, float zoom);" (statement_identifier) "Camera" (ERROR) "(glm:" (() "(" (type_descriptor) "glm" (type_identifier) "glm" (:) ":" (:) ":" (declaration) "vec2 size, float zoom);" (type_identifier) "vec2" (identifier) "size" (,) "," (identifier) "float" (ERROR) "zoom)" (identifier) "zoom" ()) ")" (;) ";" (comment) "// Setter functions." (declaration) "void setPosition(glm::vec2 position);" (primitive_type) "void" (function_declarator) "setPosition(glm::vec2 position)" (identifier) "setPosition" (parameter_list) "(glm::vec2 position)" (() "(" (parameter_declaration) "glm::vec2 position" (type_identifier) "glm" (ERROR) "::vec2" (:) ":" (:) ":" (identifier) "vec2" (identifier) "position" ()) ")" (;) ";" (declaration) "void setSize(glm::vec2 size);" (primitive_type) "void" (function_declarator) "setSize(glm::vec2 size)" (identifier) "setSize" (parameter_list) "(glm::vec2 size)" (() "(" (parameter_declaration) "glm::vec2 size" (type_identifier) "glm" (ERROR) "::vec2" (:) ":" (:) ":" (identifier) "vec2" (identifier) "size" ()) ")" (;) ";" (declaration) "void setZoom(float zoom);" (primitive_type) "void" (function_declarator) "setZoom(float zoom)" (identifier) "setZoom" (parameter_list) "(float zoom)" (() "(" (parameter_declaration) "float zoom" (primitive_type) "float" (identifier) "zoom" ()) ")" (;) ";" (comment) "// Getter functions." (labeled_statement) "glm::vec2 getPosition() const;" (statement_identifier) "glm" (:) ":" (ERROR) ":vec2 getPosition() const" (:) ":" (type_identifier) "vec2" (function_declarator) "getPosition() const" (identifier) "getPosition" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (labeled_statement) "glm::mat4 getView() const;" (statement_identifier) "glm" (:) ":" (ERROR) ":mat4 getView() const" (:) ":" (type_identifier) "mat4" (function_declarator) "getView() const" (identifier) "getView" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "float getZoom() const" (primitive_type) "float" (function_declarator) "getZoom()" (identifier) "getZoom" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (expression_statement) ";" (;) ";" (comment) "// Get projection matrices." (labeled_statement) "glm::mat4 getUIProjection() const;" (statement_identifier) "glm" (:) ":" (ERROR) ":mat4 getUIProjection() const" (:) ":" (type_identifier) "mat4" (function_declarator) "getUIProjection() const" (identifier) "getUIProjection" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (labeled_statement) "glm::mat4 getSceneProjection() const;" (statement_identifier) "glm" (:) ":" (ERROR) ":mat4 getSceneProjection() const" (:) ":" (type_identifier) "mat4" (function_declarator) "getSceneProjection() const" (identifier) "getSceneProjection" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (labeled_statement) "private:\n // Update the canera's matrices.\n void updateView();" (statement_identifier) "private" (:) ":" (comment) "// Update the canera's matrices." (declaration) "void updateView();" (primitive_type) "void" (function_declarator) "updateView()" (identifier) "updateView" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void updateProjection();" (primitive_type) "void" (function_declarator) "updateProjection()" (identifier) "updateProjection" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// The center position of the camera in pixels." (identifier) "glm" (:) ":" (ERROR) ":vec2 m_position" (:) ":" (type_identifier) "vec2" (identifier) "m_position" ({) "{" (expression_statement) "0.f };" (number_literal) "0.f" (ERROR) "}" (}) "}" (;) ";" (comment) "// The width and height of the camera." (identifier) "glm" (:) ":" (ERROR) ":vec2 m_size" (:) ":" (type_identifier) "vec2" (identifier) "m_size" ({) "{" (expression_statement) "0.f };" (number_literal) "0.f" (ERROR) "}" (}) "}" (;) ";" (comment) "// The scale value for how zoomed in the camera is." (primitive_type) "float" (identifier) "m_zoom" ({) "{" (expression_statement) "1.f };" (number_literal) "1.f" (ERROR) "}" (}) "}" (;) ";" (comment) "// Hold the view matrix to avoid recalculating." (identifier) "glm" (:) ":" (ERROR) ":mat4 m_view" (:) ":" (type_identifier) "mat4" (identifier) "m_view" ({) "{" (expression_statement) "1.f };" (number_literal) "1.f" (ERROR) "}" (}) "}" (;) ";" (comment) "// Hold the projection matrices to avoid recalculating." (identifier) "glm" (:) ":" (ERROR) ":mat4 m_uiProj" (:) ":" (type_identifier) "mat4" (identifier) "m_uiProj" ({) "{" (expression_statement) "1.f };" (number_literal) "1.f" (ERROR) "}" (}) "}" (;) ";" (labeled_statement) "glm::mat4 m_sceneProj{ 1.f };\n}" (statement_identifier) "glm" (:) ":" (ERROR) ":mat4 m_sceneProj" (:) ":" (type_identifier) "mat4" (identifier) "m_sceneProj" (compound_statement) "{ 1.f };\n}" ({) "{" (expression_statement) "1.f };" (number_literal) "1.f" (ERROR) "}" (}) "}" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
239
21
{"language": "c", "success": true, "metadata": {"lines": 33, "avg_line_length": 27.12, "nodes": 121, "errors": 0, "source_hash": "ea7f5718b9d3beaf5e7ac03f9c8be2f34be7956abb1ba4d87cb8ff59de57be47", "categorized_nodes": 77}, "ast": {"root": "ERROR", "nodes": [{"id": 0, "type": "ERROR", "text": "#pragma once\n\n#include <glm/glm.hpp>\n\nclass Camera\n{\npublic:\n\tCamera(glm::vec2 size, float zoom);\n\n\t// Setter functions.\n\tvoid setPosition(glm::vec2 position);\n\tvoid setSize(glm::vec2 size);\n\tvoid setZoom(float zoom);\n\n\t// Getter functions.\n\tglm::vec2 getPosition() const;\n\tglm::mat4 getView() const;\n\tfloat getZoom() const;\n\n\t// Get projection matrices.\n\tglm::mat4 getUIProjection() const;\n\tglm::mat4 getSceneProjection() const;\n\nprivate:\n\t// Update the canera's matrices.\n\tvoid updateView();\n\tvoid updateProjection();\n\n\t// The center position of the camera in pixels.\n\tglm::vec2 m_position{ 0.f };\n\n\t// The width and height of the camera.\n\tglm::vec2 m_size{ 0.f };\n\n\t// The scale value for how zoomed in the camera is.\n\tfloat m_zoom{ 1.f };\n\n\t// Hold the view matrix to avoid recalculating.\n\tglm::mat4 m_view{ 1.f };\n\n\t// Hold the projection matrices to avoid recalculating.\n\tglm::mat4 m_uiProj{ 1.f };\n\tglm::mat4 m_sceneProj{ 1.f };\n};", "parent": null, "children": [1, 4, 7, 8, 20, 30, 40, 48, 55, 62, 67, 74, 81, 87, 92, 93, 97, 98, 102, 103, 105, 106, 110, 111, 115], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 43, "column": 2}}, {"id": 1, "type": "preproc_call", "text": "#pragma once\n", "parent": 0, "children": [2, 3], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 2, "type": "preproc_directive", "text": "#pragma", "parent": 1, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 3, "type": "preproc_arg", "text": "once", "parent": 1, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 4, "type": "preproc_include", "text": "#include <glm/glm.hpp>\n", "parent": 0, "children": [5, 6], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 5, "type": "#include", "text": "#include", "parent": 4, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 6, "type": "system_lib_string", "text": "<glm/glm.hpp>", "parent": 4, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 22}}, {"id": 7, "type": "identifier", "text": "Camera", "parent": 0, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 12}}, {"id": 8, "type": "labeled_statement", "text": "public:\n\tCamera(glm::vec2 size, float zoom);", "parent": 0, "children": [9], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 36}}, {"id": 9, "type": "labeled_statement", "text": "Camera(glm::vec2 size, float zoom);", "parent": 8, "children": [10, 11, 14], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 36}}, {"id": 10, "type": "statement_identifier", "text": "Camera", "parent": 9, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 7}}, {"id": 11, "type": "ERROR", "text": "(glm:", "parent": 9, "children": [12], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 12}}, {"id": 12, "type": "type_descriptor", "text": "glm", "parent": 11, "children": [13], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 11}}, {"id": 13, "type": "type_identifier", "text": "glm", "parent": 12, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 11}}, {"id": 14, "type": "declaration", "text": "vec2 size, float zoom);", "parent": 9, "children": [15, 16, 17, 18], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 36}}, {"id": 15, "type": "type_identifier", "text": "vec2", "parent": 14, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 17}}, {"id": 16, "type": "identifier", "text": "size", "parent": 14, "children": [], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 22}}, {"id": 17, "type": "identifier", "text": "float", "parent": 14, "children": [], "start_point": {"row": 7, "column": 24}, "end_point": {"row": 7, "column": 29}}, {"id": 18, "type": "ERROR", "text": "zoom)", "parent": 14, "children": [19], "start_point": {"row": 7, "column": 30}, "end_point": {"row": 7, "column": 35}}, {"id": 19, "type": "identifier", "text": "zoom", "parent": 18, "children": [], "start_point": {"row": 7, "column": 30}, "end_point": {"row": 7, "column": 34}}, {"id": 20, "type": "declaration", "text": "void setPosition(glm::vec2 position);", "parent": 0, "children": [21, 22], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 38}}, {"id": 21, "type": "primitive_type", "text": "void", "parent": 20, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 5}}, {"id": 22, "type": "function_declarator", "text": "setPosition(glm::vec2 position)", "parent": 20, "children": [23, 24], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 37}}, {"id": 23, "type": "identifier", "text": "setPosition", "parent": 22, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 17}}, {"id": 24, "type": "parameter_list", "text": "(glm::vec2 position)", "parent": 22, "children": [25], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 37}}, {"id": 25, "type": "parameter_declaration", "text": "glm::vec2 position", "parent": 24, "children": [26, 27, 29], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 36}}, {"id": 26, "type": "type_identifier", "text": "glm", "parent": 25, "children": [], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 21}}, {"id": 27, "type": "ERROR", "text": "::vec2", "parent": 25, "children": [28], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 27}}, {"id": 28, "type": "identifier", "text": "vec2", "parent": 27, "children": [], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 27}}, {"id": 29, "type": "identifier", "text": "position", "parent": 25, "children": [], "start_point": {"row": 10, "column": 28}, "end_point": {"row": 10, "column": 36}}, {"id": 30, "type": "declaration", "text": "void setSize(glm::vec2 size);", "parent": 0, "children": [31, 32], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 30}}, {"id": 31, "type": "primitive_type", "text": "void", "parent": 30, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 5}}, {"id": 32, "type": "function_declarator", "text": "setSize(glm::vec2 size)", "parent": 30, "children": [33, 34], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 29}}, {"id": 33, "type": "identifier", "text": "setSize", "parent": 32, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 13}}, {"id": 34, "type": "parameter_list", "text": "(glm::vec2 size)", "parent": 32, "children": [35], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 29}}, {"id": 35, "type": "parameter_declaration", "text": "glm::vec2 size", "parent": 34, "children": [36, 37, 39], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 28}}, {"id": 36, "type": "type_identifier", "text": "glm", "parent": 35, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 17}}, {"id": 37, "type": "ERROR", "text": "::vec2", "parent": 35, "children": [38], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 23}}, {"id": 38, "type": "identifier", "text": "vec2", "parent": 37, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 23}}, {"id": 39, "type": "identifier", "text": "size", "parent": 35, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 28}}, {"id": 40, "type": "declaration", "text": "void setZoom(float zoom);", "parent": 0, "children": [41, 42], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 26}}, {"id": 41, "type": "primitive_type", "text": "void", "parent": 40, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 5}}, {"id": 42, "type": "function_declarator", "text": "setZoom(float zoom)", "parent": 40, "children": [43, 44], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 25}}, {"id": 43, "type": "identifier", "text": "setZoom", "parent": 42, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 13}}, {"id": 44, "type": "parameter_list", "text": "(float zoom)", "parent": 42, "children": [45], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 25}}, {"id": 45, "type": "parameter_declaration", "text": "float zoom", "parent": 44, "children": [46, 47], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 24}}, {"id": 46, "type": "primitive_type", "text": "float", "parent": 45, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 19}}, {"id": 47, "type": "identifier", "text": "zoom", "parent": 45, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 24}}, {"id": 48, "type": "labeled_statement", "text": "glm::vec2 getPosition() const;", "parent": 0, "children": [49, 50], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 31}}, {"id": 49, "type": "statement_identifier", "text": "glm", "parent": 48, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 4}}, {"id": 50, "type": "ERROR", "text": ":vec2 getPosition() const", "parent": 48, "children": [51, 52], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 30}}, {"id": 51, "type": "type_identifier", "text": "vec2", "parent": 50, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 10}}, {"id": 52, "type": "function_declarator", "text": "getPosition() const", "parent": 50, "children": [53, 54], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 30}}, {"id": 53, "type": "identifier", "text": "getPosition", "parent": 52, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 22}}, {"id": 54, "type": "parameter_list", "text": "()", "parent": 52, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 24}}, {"id": 55, "type": "labeled_statement", "text": "glm::mat4 getView() const;", "parent": 0, "children": [56, 57], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 27}}, {"id": 56, "type": "statement_identifier", "text": "glm", "parent": 55, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 4}}, {"id": 57, "type": "ERROR", "text": ":mat4 getView() const", "parent": 55, "children": [58, 59], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 26}}, {"id": 58, "type": "type_identifier", "text": "mat4", "parent": 57, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 10}}, {"id": 59, "type": "function_declarator", "text": "getView() const", "parent": 57, "children": [60, 61], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 26}}, {"id": 60, "type": "identifier", "text": "getView", "parent": 59, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 18}}, {"id": 61, "type": "parameter_list", "text": "()", "parent": 59, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 20}}, {"id": 62, "type": "ERROR", "text": "float getZoom() const", "parent": 0, "children": [63, 64], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 22}}, {"id": 63, "type": "primitive_type", "text": "float", "parent": 62, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 6}}, {"id": 64, "type": "function_declarator", "text": "getZoom()", "parent": 62, "children": [65, 66], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 16}}, {"id": 65, "type": "identifier", "text": "getZoom", "parent": 64, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 14}}, {"id": 66, "type": "parameter_list", "text": "()", "parent": 64, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 16}}, {"id": 67, "type": "labeled_statement", "text": "glm::mat4 getUIProjection() const;", "parent": 0, "children": [68, 69], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 35}}, {"id": 68, "type": "statement_identifier", "text": "glm", "parent": 67, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 4}}, {"id": 69, "type": "ERROR", "text": ":mat4 getUIProjection() const", "parent": 67, "children": [70, 71], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 34}}, {"id": 70, "type": "type_identifier", "text": "mat4", "parent": 69, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 10}}, {"id": 71, "type": "function_declarator", "text": "getUIProjection() const", "parent": 69, "children": [72, 73], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 34}}, {"id": 72, "type": "identifier", "text": "getUIProjection", "parent": 71, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 26}}, {"id": 73, "type": "parameter_list", "text": "()", "parent": 71, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 28}}, {"id": 74, "type": "labeled_statement", "text": "glm::mat4 getSceneProjection() const;", "parent": 0, "children": [75, 76], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 38}}, {"id": 75, "type": "statement_identifier", "text": "glm", "parent": 74, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 4}}, {"id": 76, "type": "ERROR", "text": ":mat4 getSceneProjection() const", "parent": 74, "children": [77, 78], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 37}}, {"id": 77, "type": "type_identifier", "text": "mat4", "parent": 76, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 10}}, {"id": 78, "type": "function_declarator", "text": "getSceneProjection() const", "parent": 76, "children": [79, 80], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 37}}, {"id": 79, "type": "identifier", "text": "getSceneProjection", "parent": 78, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 29}}, {"id": 80, "type": "parameter_list", "text": "()", "parent": 78, "children": [], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 31}}, {"id": 81, "type": "labeled_statement", "text": "private:\n\t// Update the canera's matrices.\n\tvoid updateView();", "parent": 0, "children": [82], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 25, "column": 19}}, {"id": 82, "type": "declaration", "text": "void updateView();", "parent": 81, "children": [83, 84], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 19}}, {"id": 83, "type": "primitive_type", "text": "void", "parent": 82, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 5}}, {"id": 84, "type": "function_declarator", "text": "updateView()", "parent": 82, "children": [85, 86], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 18}}, {"id": 85, "type": "identifier", "text": "updateView", "parent": 84, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 16}}, {"id": 86, "type": "parameter_list", "text": "()", "parent": 84, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 18}}, {"id": 87, "type": "declaration", "text": "void updateProjection();", "parent": 0, "children": [88, 89], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 25}}, {"id": 88, "type": "primitive_type", "text": "void", "parent": 87, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 5}}, {"id": 89, "type": "function_declarator", "text": "updateProjection()", "parent": 87, "children": [90, 91], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 24}}, {"id": 90, "type": "identifier", "text": "updateProjection", "parent": 89, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 22}}, {"id": 91, "type": "parameter_list", "text": "()", "parent": 89, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 24}}, {"id": 92, "type": "identifier", "text": "glm", "parent": 0, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 4}}, {"id": 93, "type": "ERROR", "text": ":vec2 m_position", "parent": 0, "children": [94, 95], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 21}}, {"id": 94, "type": "type_identifier", "text": "vec2", "parent": 93, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 10}}, {"id": 95, "type": "identifier", "text": "m_position", "parent": 93, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 21}}, {"id": 96, "type": "number_literal", "text": "0.f", "parent": 0, "children": [], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 26}}, {"id": 97, "type": "identifier", "text": "glm", "parent": 0, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 4}}, {"id": 98, "type": "ERROR", "text": ":vec2 m_size", "parent": 0, "children": [99, 100], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 17}}, {"id": 99, "type": "type_identifier", "text": "vec2", "parent": 98, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 10}}, {"id": 100, "type": "identifier", "text": "m_size", "parent": 98, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 17}}, {"id": 101, "type": "number_literal", "text": "0.f", "parent": 0, "children": [], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 22}}, {"id": 102, "type": "primitive_type", "text": "float", "parent": 0, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 6}}, {"id": 103, "type": "identifier", "text": "m_zoom", "parent": 0, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 13}}, {"id": 104, "type": "number_literal", "text": "1.f", "parent": 0, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 18}}, {"id": 105, "type": "identifier", "text": "glm", "parent": 0, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 4}}, {"id": 106, "type": "ERROR", "text": ":mat4 m_view", "parent": 0, "children": [107, 108], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 17}}, {"id": 107, "type": "type_identifier", "text": "mat4", "parent": 106, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 10}}, {"id": 108, "type": "identifier", "text": "m_view", "parent": 106, "children": [], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 17}}, {"id": 109, "type": "number_literal", "text": "1.f", "parent": 0, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 22}}, {"id": 110, "type": "identifier", "text": "glm", "parent": 0, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 4}}, {"id": 111, "type": "ERROR", "text": ":mat4 m_uiProj", "parent": 0, "children": [112, 113], "start_point": {"row": 41, "column": 5}, "end_point": {"row": 41, "column": 19}}, {"id": 112, "type": "type_identifier", "text": "mat4", "parent": 111, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 10}}, {"id": 113, "type": "identifier", "text": "m_uiProj", "parent": 111, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 19}}, {"id": 114, "type": "number_literal", "text": "1.f", "parent": 0, "children": [], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 24}}, {"id": 115, "type": "labeled_statement", "text": "glm::mat4 m_sceneProj{ 1.f };\n}", "parent": 0, "children": [116, 117], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 43, "column": 1}}, {"id": 116, "type": "statement_identifier", "text": "glm", "parent": 115, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 4}}, {"id": 117, "type": "ERROR", "text": ":mat4 m_sceneProj", "parent": 115, "children": [118, 119], "start_point": {"row": 42, "column": 5}, "end_point": {"row": 42, "column": 22}}, {"id": 118, "type": "type_identifier", "text": "mat4", "parent": 117, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 10}}, {"id": 119, "type": "identifier", "text": "m_sceneProj", "parent": 117, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 22}}, {"id": 120, "type": "number_literal", "text": "1.f", "parent": 115, "children": [], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 27}}]}, "node_categories": {"declarations": {"functions": [22, 32, 42, 52, 59, 64, 71, 78, 84, 89], "variables": [14, 20, 25, 30, 35, 40, 45, 82, 87], "classes": [], "imports": [4, 5], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [7, 10, 13, 15, 16, 17, 19, 23, 26, 28, 29, 33, 36, 38, 39, 43, 47, 49, 51, 53, 56, 58, 60, 65, 68, 70, 72, 75, 77, 79, 85, 90, 92, 94, 95, 97, 99, 100, 103, 105, 107, 108, 110, 112, 113, 116, 118, 119], "returns": [], "exceptions": []}, "expressions": {"calls": [1], "literals": [6, 96, 101, 104, 109, 114, 120], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "setPosition(glm::vec2 position)"}, {"node_id": 32, "universal_type": "function", "name": "unknown", "text_snippet": "setSize(glm::vec2 size)"}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "setZoom(float zoom)"}, {"node_id": 52, "universal_type": "function", "name": "unknown", "text_snippet": "getPosition() const"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "getView() const"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "getZoom()"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "getUIProjection() const"}, {"node_id": 78, "universal_type": "function", "name": "unknown", "text_snippet": "getSceneProjection() const"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "updateView()"}, {"node_id": 89, "universal_type": "function", "name": "unknown", "text_snippet": "updateProjection()"}], "class_declarations": [], "import_statements": [{"node_id": 4, "text": "#include <glm/glm.hpp>\n"}, {"node_id": 5, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <glm/glm.hpp>\n\nclass Camera\n{\npublic:\n\tCamera(glm::vec2 size, float zoom);\n\n\t// Setter functions.\n\tvoid setPosition(glm::vec2 position);\n\tvoid setSize(glm::vec2 size);\n\tvoid setZoom(float zoom);\n\n\t// Getter functions.\n\tglm::vec2 getPosition() const;\n\tglm::mat4 getView() const;\n\tfloat getZoom() const;\n\n\t// Get projection matrices.\n\tglm::mat4 getUIProjection() const;\n\tglm::mat4 getSceneProjection() const;\n\nprivate:\n\t// Update the canera's matrices.\n\tvoid updateView();\n\tvoid updateProjection();\n\n\t// The center position of the camera in pixels.\n\tglm::vec2 m_position{ 0.f };\n\n\t// The width and height of the camera.\n\tglm::vec2 m_size{ 0.f };\n\n\t// The scale value for how zoomed in the camera is.\n\tfloat m_zoom{ 1.f };\n\n\t// Hold the view matrix to avoid recalculating.\n\tglm::mat4 m_view{ 1.f };\n\n\t// Hold the projection matrices to avoid recalculating.\n\tglm::mat4 m_uiProj{ 1.f };\n\tglm::mat4 m_sceneProj{ 1.f };\n};"}
80,985
c
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | <EMAIL> so we can mail you a copy immediately. | +----------------------------------------------------------------------+ */ #ifndef incl_HPHP_RINGBUFFER_H_ #define incl_HPHP_RINGBUFFER_H_ #include <cstdlib> #include <cstdarg> #include <cinttypes> namespace HPHP { namespace Trace { #define RBTYPES \ RBTYPE(Uninit) \ RBTYPE(Msg) \ RBTYPE(SideExit) \ RBTYPE(TraceletBody) \ RBTYPE(TraceletGuards) \ RBTYPE(FuncEntry) \ RBTYPE(FuncExit) \ RBTYPE(FuncPrologueTry) enum RingBufferType { #define RBTYPE(x) RBType ## x, RBTYPES #undef RBTYPE }; void vtraceRingbuffer(const char* fmt, va_list ap); void ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg); void ringbufferEntry(RingBufferType t, uint64_t funcId, int offset); } } #endif
41.95
38
(translation_unit) "/*\n +----------------------------------------------------------------------+\n | HipHop for PHP |\n +----------------------------------------------------------------------+\n | Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |\n +----------------------------------------------------------------------+\n | This source file is subject to version 3.01 of the PHP license, |\n | that is bundled with this package in the file LICENSE, and is |\n | available through the world-wide-web at the following url: |\n | http://www.php.net/license/3_01.txt |\n | If you did not receive a copy of the PHP license and are unable to |\n | obtain it through the world-wide-web, please send a note to |\n | <EMAIL> so we can mail you a copy immediately. |\n +----------------------------------------------------------------------+\n*/\n#ifndef incl_HPHP_RINGBUFFER_H_\n#define incl_HPHP_RINGBUFFER_H_\n\n#include <cstdlib>\n#include <cstdarg>\n#include <cinttypes>\n\nnamespace HPHP {\nnamespace Trace {\n\n#define RBTYPES \\n RBTYPE(Uninit) \\n RBTYPE(Msg) \\n RBTYPE(SideExit) \\n RBTYPE(TraceletBody) \\n RBTYPE(TraceletGuards) \\n RBTYPE(FuncEntry) \\n RBTYPE(FuncExit) \\n RBTYPE(FuncPrologueTry)\n\nenum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n};\n\nvoid vtraceRingbuffer(const char* fmt, va_list ap);\nvoid ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);\nvoid ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);\n\n}\n}\n\n#endif\n" (comment) "/*\n +----------------------------------------------------------------------+\n | HipHop for PHP |\n +----------------------------------------------------------------------+\n | Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |\n +----------------------------------------------------------------------+\n | This source file is subject to version 3.01 of the PHP license, |\n | that is bundled with this package in the file LICENSE, and is |\n | available through the world-wide-web at the following url: |\n | http://www.php.net/license/3_01.txt |\n | If you did not receive a copy of the PHP license and are unable to |\n | obtain it through the world-wide-web, please send a note to |\n | <EMAIL> so we can mail you a copy immediately. |\n +----------------------------------------------------------------------+\n*/" (preproc_ifdef) "#ifndef incl_HPHP_RINGBUFFER_H_\n#define incl_HPHP_RINGBUFFER_H_\n\n#include <cstdlib>\n#include <cstdarg>\n#include <cinttypes>\n\nnamespace HPHP {\nnamespace Trace {\n\n#define RBTYPES \\n RBTYPE(Uninit) \\n RBTYPE(Msg) \\n RBTYPE(SideExit) \\n RBTYPE(TraceletBody) \\n RBTYPE(TraceletGuards) \\n RBTYPE(FuncEntry) \\n RBTYPE(FuncExit) \\n RBTYPE(FuncPrologueTry)\n\nenum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n};\n\nvoid vtraceRingbuffer(const char* fmt, va_list ap);\nvoid ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);\nvoid ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);\n\n}\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "incl_HPHP_RINGBUFFER_H_" (preproc_def) "#define incl_HPHP_RINGBUFFER_H_\n" (#define) "#define" (identifier) "incl_HPHP_RINGBUFFER_H_" (preproc_include) "#include <cstdlib>\n" (#include) "#include" (system_lib_string) "<cstdlib>" (preproc_include) "#include <cstdarg>\n" (#include) "#include" (system_lib_string) "<cstdarg>" (preproc_include) "#include <cinttypes>\n" (#include) "#include" (system_lib_string) "<cinttypes>" (function_definition) "namespace HPHP {\nnamespace Trace {\n\n#define RBTYPES \\n RBTYPE(Uninit) \\n RBTYPE(Msg) \\n RBTYPE(SideExit) \\n RBTYPE(TraceletBody) \\n RBTYPE(TraceletGuards) \\n RBTYPE(FuncEntry) \\n RBTYPE(FuncExit) \\n RBTYPE(FuncPrologueTry)\n\nenum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n};\n\nvoid vtraceRingbuffer(const char* fmt, va_list ap);\nvoid ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);\nvoid ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);\n\n}\n}" (type_identifier) "namespace" (identifier) "HPHP" (compound_statement) "{\nnamespace Trace {\n\n#define RBTYPES \\n RBTYPE(Uninit) \\n RBTYPE(Msg) \\n RBTYPE(SideExit) \\n RBTYPE(TraceletBody) \\n RBTYPE(TraceletGuards) \\n RBTYPE(FuncEntry) \\n RBTYPE(FuncExit) \\n RBTYPE(FuncPrologueTry)\n\nenum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n};\n\nvoid vtraceRingbuffer(const char* fmt, va_list ap);\nvoid ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);\nvoid ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);\n\n}\n}" ({) "{" (function_definition) "namespace Trace {\n\n#define RBTYPES \\n RBTYPE(Uninit) \\n RBTYPE(Msg) \\n RBTYPE(SideExit) \\n RBTYPE(TraceletBody) \\n RBTYPE(TraceletGuards) \\n RBTYPE(FuncEntry) \\n RBTYPE(FuncExit) \\n RBTYPE(FuncPrologueTry)\n\nenum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n};\n\nvoid vtraceRingbuffer(const char* fmt, va_list ap);\nvoid ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);\nvoid ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);\n\n}" (type_identifier) "namespace" (identifier) "Trace" (compound_statement) "{\n\n#define RBTYPES \\n RBTYPE(Uninit) \\n RBTYPE(Msg) \\n RBTYPE(SideExit) \\n RBTYPE(TraceletBody) \\n RBTYPE(TraceletGuards) \\n RBTYPE(FuncEntry) \\n RBTYPE(FuncExit) \\n RBTYPE(FuncPrologueTry)\n\nenum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n};\n\nvoid vtraceRingbuffer(const char* fmt, va_list ap);\nvoid ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);\nvoid ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);\n\n}" ({) "{" (preproc_def) "#define RBTYPES \\n RBTYPE(Uninit) \\n RBTYPE(Msg) \\n RBTYPE(SideExit) \\n RBTYPE(TraceletBody) \\n RBTYPE(TraceletGuards) \\n RBTYPE(FuncEntry) \\n RBTYPE(FuncExit) \\n RBTYPE(FuncPrologueTry)\n" (#define) "#define" (identifier) "RBTYPES" (preproc_arg) "RBTYPE(Uninit) \\n RBTYPE(Msg) \\n RBTYPE(SideExit) \\n RBTYPE(TraceletBody) \\n RBTYPE(TraceletGuards) \\n RBTYPE(FuncEntry) \\n RBTYPE(FuncExit) \\n RBTYPE(FuncPrologueTry)" (enum_specifier) "enum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n}" (enum) "enum" (type_identifier) "RingBufferType" (enumerator_list) "{\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n}" ({) "{" (ERROR) "#define RBTYPE(x) RBType ## x,\n RBTYPES" (preproc_call) "#define RBTYPE(x) RBType ## x,\n" (preproc_directive) "#define" (preproc_arg) "RBTYPE(x) RBType ## x," (identifier) "RBTYPES" (preproc_call) "#undef RBTYPE\n" (preproc_directive) "#undef" (preproc_arg) "RBTYPE" (}) "}" (;) ";" (declaration) "void vtraceRingbuffer(const char* fmt, va_list ap);" (primitive_type) "void" (function_declarator) "vtraceRingbuffer(const char* fmt, va_list ap)" (identifier) "vtraceRingbuffer" (parameter_list) "(const char* fmt, va_list ap)" (() "(" (parameter_declaration) "const char* fmt" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* fmt" (*) "*" (identifier) "fmt" (,) "," (parameter_declaration) "va_list ap" (type_identifier) "va_list" (identifier) "ap" ()) ")" (;) ";" (declaration) "void ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);" (primitive_type) "void" (function_declarator) "ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg)" (identifier) "ringbufferMsg" (parameter_list) "(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg)" (() "(" (parameter_declaration) "const char* msg" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* msg" (*) "*" (identifier) "msg" (,) "," (parameter_declaration) "size_t msgLen" (primitive_type) "size_t" (identifier) "msgLen" (,) "," (parameter_declaration) "RingBufferType t = RBTypeMsg" (type_identifier) "RingBufferType" (ERROR) "t =" (identifier) "t" (=) "=" (identifier) "RBTypeMsg" ()) ")" (;) ";" (declaration) "void ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);" (primitive_type) "void" (function_declarator) "ringbufferEntry(RingBufferType t, uint64_t funcId, int offset)" (identifier) "ringbufferEntry" (parameter_list) "(RingBufferType t, uint64_t funcId, int offset)" (() "(" (parameter_declaration) "RingBufferType t" (type_identifier) "RingBufferType" (identifier) "t" (,) "," (parameter_declaration) "uint64_t funcId" (primitive_type) "uint64_t" (identifier) "funcId" (,) "," (parameter_declaration) "int offset" (primitive_type) "int" (identifier) "offset" ()) ")" (;) ";" (}) "}" (}) "}" (#endif) "#endif"
113
2
{"language": "c", "success": true, "metadata": {"lines": 38, "avg_line_length": 41.95, "nodes": 84, "errors": 0, "source_hash": "02d37b584b7c619485cdff181136f85b28ab6cfc86a64e51481fe8746139a85c", "categorized_nodes": 57}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef incl_HPHP_RINGBUFFER_H_\n#define incl_HPHP_RINGBUFFER_H_\n\n#include <cstdlib>\n#include <cstdarg>\n#include <cinttypes>\n\nnamespace HPHP {\nnamespace Trace {\n\n#define RBTYPES \\\n RBTYPE(Uninit) \\\n RBTYPE(Msg) \\\n RBTYPE(SideExit) \\\n RBTYPE(TraceletBody) \\\n RBTYPE(TraceletGuards) \\\n RBTYPE(FuncEntry) \\\n RBTYPE(FuncExit) \\\n RBTYPE(FuncPrologueTry)\n\nenum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n};\n\nvoid vtraceRingbuffer(const char* fmt, va_list ap);\nvoid ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);\nvoid ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);\n\n}\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 83], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 48, "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": "incl_HPHP_RINGBUFFER_H_", "parent": 0, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 31}}, {"id": 3, "type": "preproc_def", "text": "#define incl_HPHP_RINGBUFFER_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": "incl_HPHP_RINGBUFFER_H_", "parent": 3, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 31}}, {"id": 6, "type": "preproc_include", "text": "#include <cstdlib>\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": "<cstdlib>", "parent": 6, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <cstdarg>\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": "<cstdarg>", "parent": 9, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include <cinttypes>\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": "<cinttypes>", "parent": 12, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 20}}, {"id": 15, "type": "function_definition", "text": "namespace HPHP {\nnamespace Trace {\n\n#define RBTYPES \\\n RBTYPE(Uninit) \\\n RBTYPE(Msg) \\\n RBTYPE(SideExit) \\\n RBTYPE(TraceletBody) \\\n RBTYPE(TraceletGuards) \\\n RBTYPE(FuncEntry) \\\n RBTYPE(FuncExit) \\\n RBTYPE(FuncPrologueTry)\n\nenum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n};\n\nvoid vtraceRingbuffer(const char* fmt, va_list ap);\nvoid ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);\nvoid ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);\n\n}\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 46, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 9}}, {"id": 17, "type": "identifier", "text": "HPHP", "parent": 15, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 14}}, {"id": 18, "type": "function_definition", "text": "namespace Trace {\n\n#define RBTYPES \\\n RBTYPE(Uninit) \\\n RBTYPE(Msg) \\\n RBTYPE(SideExit) \\\n RBTYPE(TraceletBody) \\\n RBTYPE(TraceletGuards) \\\n RBTYPE(FuncEntry) \\\n RBTYPE(FuncExit) \\\n RBTYPE(FuncPrologueTry)\n\nenum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n};\n\nvoid vtraceRingbuffer(const char* fmt, va_list ap);\nvoid ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);\nvoid ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);\n\n}", "parent": 15, "children": [19, 20], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 19, "type": "type_identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 9}}, {"id": 20, "type": "identifier", "text": "Trace", "parent": 18, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 15}}, {"id": 21, "type": "preproc_def", "text": "#define RBTYPES \\\n RBTYPE(Uninit) \\\n RBTYPE(Msg) \\\n RBTYPE(SideExit) \\\n RBTYPE(TraceletBody) \\\n RBTYPE(TraceletGuards) \\\n RBTYPE(FuncEntry) \\\n RBTYPE(FuncExit) \\\n RBTYPE(FuncPrologueTry)\n", "parent": 18, "children": [22, 23, 24], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 23, "type": "identifier", "text": "RBTYPES", "parent": 21, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 15}}, {"id": 24, "type": "preproc_arg", "text": "RBTYPE(Uninit) \\\n RBTYPE(Msg) \\\n RBTYPE(SideExit) \\\n RBTYPE(TraceletBody) \\\n RBTYPE(TraceletGuards) \\\n RBTYPE(FuncEntry) \\\n RBTYPE(FuncExit) \\\n RBTYPE(FuncPrologueTry)", "parent": 21, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 33, "column": 25}}, {"id": 25, "type": "enum_specifier", "text": "enum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n}", "parent": 18, "children": [26, 27, 28], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 26, "type": "enum", "text": "enum", "parent": 25, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 4}}, {"id": 27, "type": "type_identifier", "text": "RingBufferType", "parent": 25, "children": [], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 19}}, {"id": 28, "type": "enumerator_list", "text": "{\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n}", "parent": 25, "children": [29, 34], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 39, "column": 1}}, {"id": 29, "type": "ERROR", "text": "#define RBTYPE(x) RBType ## x,\n RBTYPES", "parent": 28, "children": [30, 33], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 9}}, {"id": 30, "type": "preproc_call", "text": "#define RBTYPE(x) RBType ## x,\n", "parent": 29, "children": [31, 32], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 31, "type": "preproc_directive", "text": "#define", "parent": 30, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 32, "type": "preproc_arg", "text": "RBTYPE(x) RBType ## x,", "parent": 30, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 30}}, {"id": 33, "type": "identifier", "text": "RBTYPES", "parent": 29, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 9}}, {"id": 34, "type": "preproc_call", "text": "#undef RBTYPE\n", "parent": 28, "children": [35, 36], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 35, "type": "preproc_directive", "text": "#undef", "parent": 34, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 6}}, {"id": 36, "type": "preproc_arg", "text": "RBTYPE", "parent": 34, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 13}}, {"id": 37, "type": "declaration", "text": "void vtraceRingbuffer(const char* fmt, va_list ap);", "parent": 18, "children": [38, 39], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 51}}, {"id": 38, "type": "primitive_type", "text": "void", "parent": 37, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 4}}, {"id": 39, "type": "function_declarator", "text": "vtraceRingbuffer(const char* fmt, va_list ap)", "parent": 37, "children": [40, 41], "start_point": {"row": 41, "column": 5}, "end_point": {"row": 41, "column": 50}}, {"id": 40, "type": "identifier", "text": "vtraceRingbuffer", "parent": 39, "children": [], "start_point": {"row": 41, "column": 5}, "end_point": {"row": 41, "column": 21}}, {"id": 41, "type": "parameter_list", "text": "(const char* fmt, va_list ap)", "parent": 39, "children": [42, 47], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 50}}, {"id": 42, "type": "parameter_declaration", "text": "const char* fmt", "parent": 41, "children": [43, 44], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 37}}, {"id": 43, "type": "primitive_type", "text": "char", "parent": 42, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 32}}, {"id": 44, "type": "pointer_declarator", "text": "* fmt", "parent": 42, "children": [45, 46], "start_point": {"row": 41, "column": 32}, "end_point": {"row": 41, "column": 37}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 41, "column": 32}, "end_point": {"row": 41, "column": 33}}, {"id": 46, "type": "identifier", "text": "fmt", "parent": 44, "children": [], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 37}}, {"id": 47, "type": "parameter_declaration", "text": "va_list ap", "parent": 41, "children": [48, 49], "start_point": {"row": 41, "column": 39}, "end_point": {"row": 41, "column": 49}}, {"id": 48, "type": "type_identifier", "text": "va_list", "parent": 47, "children": [], "start_point": {"row": 41, "column": 39}, "end_point": {"row": 41, "column": 46}}, {"id": 49, "type": "identifier", "text": "ap", "parent": 47, "children": [], "start_point": {"row": 41, "column": 47}, "end_point": {"row": 41, "column": 49}}, {"id": 50, "type": "declaration", "text": "void ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);", "parent": 18, "children": [51, 52], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 81}}, {"id": 51, "type": "primitive_type", "text": "void", "parent": 50, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 4}}, {"id": 52, "type": "function_declarator", "text": "ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg)", "parent": 50, "children": [53, 54], "start_point": {"row": 42, "column": 5}, "end_point": {"row": 42, "column": 80}}, {"id": 53, "type": "identifier", "text": "ringbufferMsg", "parent": 52, "children": [], "start_point": {"row": 42, "column": 5}, "end_point": {"row": 42, "column": 18}}, {"id": 54, "type": "parameter_list", "text": "(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg)", "parent": 52, "children": [55, 60, 63], "start_point": {"row": 42, "column": 18}, "end_point": {"row": 42, "column": 80}}, {"id": 55, "type": "parameter_declaration", "text": "const char* msg", "parent": 54, "children": [56, 57], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 34}}, {"id": 56, "type": "primitive_type", "text": "char", "parent": 55, "children": [], "start_point": {"row": 42, "column": 25}, "end_point": {"row": 42, "column": 29}}, {"id": 57, "type": "pointer_declarator", "text": "* msg", "parent": 55, "children": [58, 59], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 34}}, {"id": 58, "type": "*", "text": "*", "parent": 57, "children": [], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 30}}, {"id": 59, "type": "identifier", "text": "msg", "parent": 57, "children": [], "start_point": {"row": 42, "column": 31}, "end_point": {"row": 42, "column": 34}}, {"id": 60, "type": "parameter_declaration", "text": "size_t msgLen", "parent": 54, "children": [61, 62], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 49}}, {"id": 61, "type": "primitive_type", "text": "size_t", "parent": 60, "children": [], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 42}}, {"id": 62, "type": "identifier", "text": "msgLen", "parent": 60, "children": [], "start_point": {"row": 42, "column": 43}, "end_point": {"row": 42, "column": 49}}, {"id": 63, "type": "parameter_declaration", "text": "RingBufferType t = RBTypeMsg", "parent": 54, "children": [64, 65, 68], "start_point": {"row": 42, "column": 51}, "end_point": {"row": 42, "column": 79}}, {"id": 64, "type": "type_identifier", "text": "RingBufferType", "parent": 63, "children": [], "start_point": {"row": 42, "column": 51}, "end_point": {"row": 42, "column": 65}}, {"id": 65, "type": "ERROR", "text": "t =", "parent": 63, "children": [66, 67], "start_point": {"row": 42, "column": 66}, "end_point": {"row": 42, "column": 69}}, {"id": 66, "type": "identifier", "text": "t", "parent": 65, "children": [], "start_point": {"row": 42, "column": 66}, "end_point": {"row": 42, "column": 67}}, {"id": 67, "type": "=", "text": "=", "parent": 65, "children": [], "start_point": {"row": 42, "column": 68}, "end_point": {"row": 42, "column": 69}}, {"id": 68, "type": "identifier", "text": "RBTypeMsg", "parent": 63, "children": [], "start_point": {"row": 42, "column": 70}, "end_point": {"row": 42, "column": 79}}, {"id": 69, "type": "declaration", "text": "void ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);", "parent": 18, "children": [70, 71], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 68}}, {"id": 70, "type": "primitive_type", "text": "void", "parent": 69, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 4}}, {"id": 71, "type": "function_declarator", "text": "ringbufferEntry(RingBufferType t, uint64_t funcId, int offset)", "parent": 69, "children": [72, 73], "start_point": {"row": 43, "column": 5}, "end_point": {"row": 43, "column": 67}}, {"id": 72, "type": "identifier", "text": "ringbufferEntry", "parent": 71, "children": [], "start_point": {"row": 43, "column": 5}, "end_point": {"row": 43, "column": 20}}, {"id": 73, "type": "parameter_list", "text": "(RingBufferType t, uint64_t funcId, int offset)", "parent": 71, "children": [74, 77, 80], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 67}}, {"id": 74, "type": "parameter_declaration", "text": "RingBufferType t", "parent": 73, "children": [75, 76], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 37}}, {"id": 75, "type": "type_identifier", "text": "RingBufferType", "parent": 74, "children": [], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 35}}, {"id": 76, "type": "identifier", "text": "t", "parent": 74, "children": [], "start_point": {"row": 43, "column": 36}, "end_point": {"row": 43, "column": 37}}, {"id": 77, "type": "parameter_declaration", "text": "uint64_t funcId", "parent": 73, "children": [78, 79], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 54}}, {"id": 78, "type": "primitive_type", "text": "uint64_t", "parent": 77, "children": [], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 47}}, {"id": 79, "type": "identifier", "text": "funcId", "parent": 77, "children": [], "start_point": {"row": 43, "column": 48}, "end_point": {"row": 43, "column": 54}}, {"id": 80, "type": "parameter_declaration", "text": "int offset", "parent": 73, "children": [81, 82], "start_point": {"row": 43, "column": 56}, "end_point": {"row": 43, "column": 66}}, {"id": 81, "type": "primitive_type", "text": "int", "parent": 80, "children": [], "start_point": {"row": 43, "column": 56}, "end_point": {"row": 43, "column": 59}}, {"id": 82, "type": "identifier", "text": "offset", "parent": 80, "children": [], "start_point": {"row": 43, "column": 60}, "end_point": {"row": 43, "column": 66}}, {"id": 83, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 18, 39, 52, 71], "variables": [37, 42, 47, 50, 55, 60, 63, 69, 74, 77, 80], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": [25, 26, 28]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 16, 17, 19, 20, 23, 27, 33, 40, 46, 48, 49, 53, 59, 62, 64, 66, 68, 72, 75, 76, 79, 82, 83], "returns": [], "exceptions": []}, "expressions": {"calls": [30, 34], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "vtraceRingbuffer", "text_snippet": "namespace HPHP {\nnamespace Trace {\n\n#define RBTYPES \\\n RBTYPE(Uninit) \\\n RBTYPE(Msg) \\\n RBTYPE(Si"}, {"node_id": 18, "universal_type": "function", "name": "vtraceRingbuffer", "text_snippet": "namespace Trace {\n\n#define RBTYPES \\\n RBTYPE(Uninit) \\\n RBTYPE(Msg) \\\n RBTYPE(SideExit) \\\n RBTYP"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "vtraceRingbuffer(const char* fmt, va_list ap)"}, {"node_id": 52, "universal_type": "function", "name": "unknown", "text_snippet": "ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg)"}, {"node_id": 71, "universal_type": "function", "name": "offset)", "text_snippet": "ringbufferEntry(RingBufferType t, uint64_t funcId, int offset)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <cstdlib>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <cstdarg>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <cinttypes>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "/*\n +----------------------------------------------------------------------+\n | HipHop for PHP |\n +----------------------------------------------------------------------+\n | Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |\n +----------------------------------------------------------------------+\n | This source file is subject to version 3.01 of the PHP license, |\n | that is bundled with this package in the file LICENSE, and is |\n | available through the world-wide-web at the following url: |\n | http://www.php.net/license/3_01.txt |\n | If you did not receive a copy of the PHP license and are unable to |\n | obtain it through the world-wide-web, please send a note to |\n | <EMAIL> so we can mail you a copy immediately. |\n +----------------------------------------------------------------------+\n*/\n#ifndef incl_HPHP_RINGBUFFER_H_\n#define incl_HPHP_RINGBUFFER_H_\n\n#include <cstdlib>\n#include <cstdarg>\n#include <cinttypes>\n\nnamespace HPHP {\nnamespace Trace {\n\n#define RBTYPES \\\n RBTYPE(Uninit) \\\n RBTYPE(Msg) \\\n RBTYPE(SideExit) \\\n RBTYPE(TraceletBody) \\\n RBTYPE(TraceletGuards) \\\n RBTYPE(FuncEntry) \\\n RBTYPE(FuncExit) \\\n RBTYPE(FuncPrologueTry)\n\nenum RingBufferType {\n#define RBTYPE(x) RBType ## x,\n RBTYPES\n#undef RBTYPE\n};\n\nvoid vtraceRingbuffer(const char* fmt, va_list ap);\nvoid ringbufferMsg(const char* msg, size_t msgLen, RingBufferType t = RBTypeMsg);\nvoid ringbufferEntry(RingBufferType t, uint64_t funcId, int offset);\n\n}\n}\n\n#endif\n"}
80,986
c
/** # Tempeature-gradient sharpening in a canopy. The evolution of a temperature profile is studied with the minimal(?) ingredients for stable layer formation. This is the [flux version of related axample](canopy.c). Consider a canopy (top at $z = z_c$) with a fixed temperature flux `Flx`. The evolution of the temperature ($T$) profile is described with an effective diffusivity $K$, $$\frac{\partial T}{\partial t} = \frac{\partial}{\partial z}K\frac{\partial T}{\partial z }.$$ $K$ is *modelled* by considering 3 effects: * A constant Background diffusivity due to shear, top down mixing etc ($K_b$). * A Height-dependend diffusivity correction for the canopy details. * A stability correction. In a dimenonless setting, we choose $z_c = 1, \Delta T = 1$ and $K_b = 1$. The canopy correction defines $K_c$: $$K_c = K_b \left( 1 + 4\frac{C_k}{z_c^2} \left(z\left(z - z_c\right)\right)\right),$$ */ #define Kc (Kb*(1 + 4*Ck*(x*(x - 1)))) /** Which gives a maximum of $K_b$ at top and bottom and a minimum of $(1-C_k)K_b$ halfway the canopy. This is to model the effects of the turbulent air induced by the surface of the Earth and the canopy crown. The stability correction gives $K_s$, $$K_s = K_c e^{-a\frac{\partial T}{\partial z}},$$ with $a$ an inverse temperature-gradient scale. Finally, to omit the most prominent issue with this description, there is an minimum value for $K$; $K_{\mathrm{min}}$. $$K = \mathrm{max} \left(K_s, K_{\mathrm{min}}\right).$$ */ #define K(grad) (max(Kc*exp(-a*(grad)), Kmin)) /** ## Numerical set-up The system is set up and solved for */ #include "grid/multigrid1D.h" // a 1D grid #include "diffusion.h" #include "run.h" // Timeloop /** The values of the physical parameters are chosen to be *just* collapse. */ double Kb = 1, Kmin = 0.025, Ck = 0.4, a = 0.6; double Flx = 0.368; // > (1 - Ck)/(exp(1)*a) double tend = 15; scalar T[], Th[]; T[left] = neumann (-Flx/K(face_gradient_x(Th,0))); //bottom T[right] = neumann ( Flx/K(face_gradient_x(Th,0))); //top int main() { N = 512; TOLERANCE = 1e-4; DT = 0.001; run(); } event init (t = 0) { foreach() T[] = x; // Linearly stratified boundary ({T}); } event diff (i++) { dt = dtnext (DT); face vector D[]; foreach_cell_all() Th[] = T[]; foreach_face() D.x[] = K (face_gradient_x (T, 0)); boundary ({D.x}); diffusion (T, dt, D); } /** ## Output ![A layer emerges](canopyflx/mov.mp4) The movie is generated with `gnuplot` and `ffmpeg`. */ FILE * gnuplotPipe; event init (t = 0) { gnuplotPipe = popen ("gnuplot", "w"); fprintf(gnuplotPipe, "set term pngcairo\n" "set xr [0: 1]\n" "set yr [0: 1]\n" "set key top left\n" "set grid\n" "set title 'Temperature and its Diffusivity'\n" "set xlabel 'T/ΔT, K/K_b'\n" "set ylabel 'z/z_c'\n"); } int frame = 0; event movie (t += 0.1) { fprintf (gnuplotPipe, "set output 'plot%d.png'\n" "plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', ", frame); fprintf (gnuplotPipe, "'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\n"); foreach() fprintf (gnuplotPipe, "%g %g\n", T[], x); fprintf (gnuplotPipe, "e\n"); foreach_face() fprintf (gnuplotPipe, "%g %g\n", K (face_gradient_x(T, 0)), x); fprintf (gnuplotPipe, "e\n"); frame++; } event stop (t = tend) { system ("rm mov.mp4"); system ("ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \ -vf format=yuv420p -y mov.mp4"); system ("rm plot*"); return 1; } /** ## A criterion for layer formation A steady state solution is characterized by a constant flux: $$K\frac{\partial T}{\partial z} = H$$ For convinience we write, $$y = \frac{\partial T}{\partial z}$$ then, $$K_c e^{-\alpha y}y = H,$$ There exists a maximum for H when $y = \alpha^{-1}$. At this value for $y$ the flux decreases with increasing gradients. It is well known that such systems Collapse (van de Wiel et al., van de Wiel et al.). Thus we have a constraint $y < \frac{1}{\alpha}$. $$H_{\mathrm{max}} = \frac{K_c}{e\alpha},$$ $$H_{\mathrm{max}} = \frac{K_b \left(1-4C_k(z^2 - z)\right)}{e\alpha}.$$ The most sustainable heatflux is the minimal value of $H_{\mathrm{max}}(z)$, which is at height $z = 0.5z_c$, $$\frac{H_{\mathrm{max, s}}}{K_b} = \frac{1 - C_k}{e\nalpha}.$$ */
34.12
123
(translation_unit) "/**\n# Tempeature-gradient sharpening in a canopy.\n \nThe evolution of a temperature profile is studied with the minimal(?)\ningredients for stable layer formation. This is the [flux version of related axample](canopy.c). Consider a canopy (top at $z = z_c$) with a fixed temperature flux `Flx`. The evolution of the temperature ($T$) profile is described with an effective diffusivity $K$,\n\n$$\frac{\partial T}{\partial t} = \frac{\partial}{\partial z}K\frac{\partial T}{\partial z }.$$\n\n$K$ is *modelled* by considering 3 effects: \n\n* A constant Background diffusivity due to shear, top down mixing etc ($K_b$). \n* A Height-dependend diffusivity correction for the canopy details. \n* A stability correction. \n\nIn a dimenonless setting, we choose $z_c = 1, \Delta T = 1$ and $K_b =\n1$. The canopy correction defines $K_c$:\n\n$$K_c = K_b \left( 1 + 4\frac{C_k}{z_c^2} \left(z\left(z - z_c\right)\right)\right),$$ \n*/\n#define Kc (Kb*(1 + 4*Ck*(x*(x - 1)))) \n/**\nWhich gives a maximum of $K_b$ at top and bottom and a minimum of\n$(1-C_k)K_b$ halfway the canopy. This is to model the effects of the\nturbulent air induced by the surface of the Earth and the canopy\ncrown.\n\nThe stability correction gives $K_s$,\n\n$$K_s = K_c e^{-a\frac{\partial T}{\partial z}},$$\n\nwith $a$ an inverse temperature-gradient scale.\n\nFinally, to omit the most prominent issue with this description,\nthere is an minimum value for $K$; $K_{\mathrm{min}}$.\n\n$$K = \mathrm{max} \left(K_s, K_{\mathrm{min}}\right).$$\n*/\n#define K(grad) (max(Kc*exp(-a*(grad)), Kmin))\n/**\n## Numerical set-up\n\nThe system is set up and solved for \n */\n#include "grid/multigrid1D.h" // a 1D grid\n#include "diffusion.h" \n#include "run.h" // Timeloop\n/**\nThe values of the physical parameters are chosen to be *just*\ncollapse.\n */\ndouble Kb = 1, Kmin = 0.025, Ck = 0.4, a = 0.6;\ndouble Flx = 0.368; // > (1 - Ck)/(exp(1)*a) \ndouble tend = 15;\n\nscalar T[], Th[];\nT[left] = neumann (-Flx/K(face_gradient_x(Th,0))); //bottom\nT[right] = neumann ( Flx/K(face_gradient_x(Th,0))); //top\n\nint main() {\n N = 512;\n TOLERANCE = 1e-4;\n DT = 0.001;\n run();\n}\n\nevent init (t = 0) {\n foreach()\n T[] = x; // Linearly stratified\n boundary ({T});\n}\n\nevent diff (i++) {\n dt = dtnext (DT);\n face vector D[];\n foreach_cell_all()\n Th[] = T[];\n foreach_face() \n D.x[] = K (face_gradient_x (T, 0));\n boundary ({D.x});\n diffusion (T, dt, D);\n}\n/**\n## Output\n\n![A layer emerges](canopyflx/mov.mp4)\n\nThe movie is generated with `gnuplot` and `ffmpeg`.\n*/\nFILE * gnuplotPipe;\n\nevent init (t = 0) {\n gnuplotPipe = popen ("gnuplot", "w");\n fprintf(gnuplotPipe,\n "set term pngcairo\n"\n "set xr [0: 1]\n"\n "set yr [0: 1]\n"\n "set key top left\n"\n "set grid\n"\n "set title 'Temperature and its Diffusivity'\n"\n "set xlabel 'T/ΔT, K/K_b'\n"\n "set ylabel 'z/z_c'\n");\n}\n\nint frame = 0;\nevent movie (t += 0.1) {\n fprintf (gnuplotPipe,\n "set output 'plot%d.png'\n"\n "plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', ",\n frame);\n fprintf (gnuplotPipe, "'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\n");\n foreach()\n fprintf (gnuplotPipe, "%g %g\n", T[], x);\n fprintf (gnuplotPipe, "e\n");\n foreach_face()\n fprintf (gnuplotPipe, "%g %g\n", K (face_gradient_x(T, 0)), x);\n fprintf (gnuplotPipe, "e\n");\n frame++;\n}\n\nevent stop (t = tend) {\n system ("rm mov.mp4");\n system ("ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\n -vf format=yuv420p -y mov.mp4");\n system ("rm plot*");\n return 1;\n}\n\n/**\n## A criterion for layer formation\n\nA steady state solution is characterized by a constant flux:\n\n$$K\frac{\partial T}{\partial z} = H$$\n\nFor convinience we write,\n\n$$y = \frac{\partial T}{\partial z}$$\n\nthen, \n\n$$K_c e^{-\alpha y}y = H,$$\n\nThere exists a maximum for H when $y = \alpha^{-1}$. At this value for\n$y$ the flux decreases with increasing gradients. It is well known\nthat such systems Collapse (van de Wiel et al., van de Wiel et\nal.). Thus we have a constraint $y < \frac{1}{\alpha}$.\n\n$$H_{\mathrm{max}} = \frac{K_c}{e\alpha},$$\n\n$$H_{\mathrm{max}} = \frac{K_b \left(1-4C_k(z^2 - z)\right)}{e\alpha}.$$\n\nThe most sustainable heatflux is the minimal value of\n$H_{\mathrm{max}}(z)$, which is at height $z = 0.5z_c$,\n\n$$\frac{H_{\mathrm{max, s}}}{K_b} = \frac{1 - C_k}{e\nalpha}.$$\n*/\n" (comment) "/**\n# Tempeature-gradient sharpening in a canopy.\n \nThe evolution of a temperature profile is studied with the minimal(?)\ningredients for stable layer formation. This is the [flux version of related axample](canopy.c). Consider a canopy (top at $z = z_c$) with a fixed temperature flux `Flx`. The evolution of the temperature ($T$) profile is described with an effective diffusivity $K$,\n\n$$\frac{\partial T}{\partial t} = \frac{\partial}{\partial z}K\frac{\partial T}{\partial z }.$$\n\n$K$ is *modelled* by considering 3 effects: \n\n* A constant Background diffusivity due to shear, top down mixing etc ($K_b$). \n* A Height-dependend diffusivity correction for the canopy details. \n* A stability correction. \n\nIn a dimenonless setting, we choose $z_c = 1, \Delta T = 1$ and $K_b =\n1$. The canopy correction defines $K_c$:\n\n$$K_c = K_b \left( 1 + 4\frac{C_k}{z_c^2} \left(z\left(z - z_c\right)\right)\right),$$ \n*/" (preproc_def) "#define Kc (Kb*(1 + 4*Ck*(x*(x - 1)))) \n" (#define) "#define" (identifier) "Kc" (preproc_arg) "(Kb*(1 + 4*Ck*(x*(x - 1)))) " (comment) "/**\nWhich gives a maximum of $K_b$ at top and bottom and a minimum of\n$(1-C_k)K_b$ halfway the canopy. This is to model the effects of the\nturbulent air induced by the surface of the Earth and the canopy\ncrown.\n\nThe stability correction gives $K_s$,\n\n$$K_s = K_c e^{-a\frac{\partial T}{\partial z}},$$\n\nwith $a$ an inverse temperature-gradient scale.\n\nFinally, to omit the most prominent issue with this description,\nthere is an minimum value for $K$; $K_{\mathrm{min}}$.\n\n$$K = \mathrm{max} \left(K_s, K_{\mathrm{min}}\right).$$\n*/" (preproc_function_def) "#define K(grad) (max(Kc*exp(-a*(grad)), Kmin))\n" (#define) "#define" (identifier) "K" (preproc_params) "(grad)" (() "(" (identifier) "grad" ()) ")" (preproc_arg) "(max(Kc*exp(-a*(grad)), Kmin))" (comment) "/**\n## Numerical set-up\n\nThe system is set up and solved for \n */" (preproc_include) "#include "grid/multigrid1D.h" // a 1D grid\n" (#include) "#include" (string_literal) ""grid/multigrid1D.h"" (") """ (string_content) "grid/multigrid1D.h" (") """ (comment) "// a 1D grid" (preproc_include) "#include "diffusion.h"" (#include) "#include" (string_literal) ""diffusion.h"" (") """ (string_content) "diffusion.h" (") """ (preproc_include) "#include "run.h" // Timeloop\n" (#include) "#include" (string_literal) ""run.h"" (") """ (string_content) "run.h" (") """ (comment) "// Timeloop" (comment) "/**\nThe values of the physical parameters are chosen to be *just*\ncollapse.\n */" (declaration) "double Kb = 1, Kmin = 0.025, Ck = 0.4, a = 0.6;" (primitive_type) "double" (init_declarator) "Kb = 1" (identifier) "Kb" (=) "=" (number_literal) "1" (,) "," (init_declarator) "Kmin = 0.025" (identifier) "Kmin" (=) "=" (number_literal) "0.025" (,) "," (init_declarator) "Ck = 0.4" (identifier) "Ck" (=) "=" (number_literal) "0.4" (,) "," (init_declarator) "a = 0.6" (identifier) "a" (=) "=" (number_literal) "0.6" (;) ";" (declaration) "double Flx = 0.368;" (primitive_type) "double" (init_declarator) "Flx = 0.368" (identifier) "Flx" (=) "=" (number_literal) "0.368" (;) ";" (comment) "// > (1 - Ck)/(exp(1)*a) " (declaration) "double tend = 15;" (primitive_type) "double" (init_declarator) "tend = 15" (identifier) "tend" (=) "=" (number_literal) "15" (;) ";" (declaration) "scalar T[], Th[];" (type_identifier) "scalar" (array_declarator) "T[]" (identifier) "T" ([) "[" (]) "]" (,) "," (array_declarator) "Th[]" (identifier) "Th" ([) "[" (]) "]" (;) ";" (expression_statement) "T[left] = neumann (-Flx/K(face_gradient_x(Th,0)));" (assignment_expression) "T[left] = neumann (-Flx/K(face_gradient_x(Th,0)))" (subscript_expression) "T[left]" (identifier) "T" ([) "[" (identifier) "left" (]) "]" (=) "=" (call_expression) "neumann (-Flx/K(face_gradient_x(Th,0)))" (identifier) "neumann" (argument_list) "(-Flx/K(face_gradient_x(Th,0)))" (() "(" (binary_expression) "-Flx/K(face_gradient_x(Th,0))" (unary_expression) "-Flx" (-) "-" (identifier) "Flx" (/) "/" (call_expression) "K(face_gradient_x(Th,0))" (identifier) "K" (argument_list) "(face_gradient_x(Th,0))" (() "(" (call_expression) "face_gradient_x(Th,0)" (identifier) "face_gradient_x" (argument_list) "(Th,0)" (() "(" (identifier) "Th" (,) "," (number_literal) "0" ()) ")" ()) ")" ()) ")" (;) ";" (comment) "//bottom" (expression_statement) "T[right] = neumann ( Flx/K(face_gradient_x(Th,0)));" (assignment_expression) "T[right] = neumann ( Flx/K(face_gradient_x(Th,0)))" (subscript_expression) "T[right]" (identifier) "T" ([) "[" (identifier) "right" (]) "]" (=) "=" (call_expression) "neumann ( Flx/K(face_gradient_x(Th,0)))" (identifier) "neumann" (argument_list) "( Flx/K(face_gradient_x(Th,0)))" (() "(" (binary_expression) "Flx/K(face_gradient_x(Th,0))" (identifier) "Flx" (/) "/" (call_expression) "K(face_gradient_x(Th,0))" (identifier) "K" (argument_list) "(face_gradient_x(Th,0))" (() "(" (call_expression) "face_gradient_x(Th,0)" (identifier) "face_gradient_x" (argument_list) "(Th,0)" (() "(" (identifier) "Th" (,) "," (number_literal) "0" ()) ")" ()) ")" ()) ")" (;) ";" (comment) "//top" (function_definition) "int main() {\n N = 512;\n TOLERANCE = 1e-4;\n DT = 0.001;\n run();\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n N = 512;\n TOLERANCE = 1e-4;\n DT = 0.001;\n run();\n}" ({) "{" (expression_statement) "N = 512;" (assignment_expression) "N = 512" (identifier) "N" (=) "=" (number_literal) "512" (;) ";" (expression_statement) "TOLERANCE = 1e-4;" (assignment_expression) "TOLERANCE = 1e-4" (identifier) "TOLERANCE" (=) "=" (number_literal) "1e-4" (;) ";" (expression_statement) "DT = 0.001;" (assignment_expression) "DT = 0.001" (identifier) "DT" (=) "=" (number_literal) "0.001" (;) ";" (expression_statement) "run();" (call_expression) "run()" (identifier) "run" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (declaration) "event init (t = 0) {\n foreach()\n T[] = x;" (type_identifier) "event" (init_declarator) "init (t = 0) {\n foreach()\n T[] = x" (function_declarator) "init (t" (identifier) "init" (parameter_list) "(t" (() "(" (parameter_declaration) "t" (type_identifier) "t" ()) "" (=) "=" (ERROR) "0)" (number_literal) "0" ()) ")" (initializer_list) "{\n foreach()\n T[] = x" ({) "{" (assignment_expression) "foreach()\n T[] = x" (subscript_expression) "foreach()\n T[]" (call_expression) "foreach()" (identifier) "foreach" (argument_list) "()" (() "(" ()) ")" (ERROR) "T" (identifier) "T" ([) "[" (identifier) "" (]) "]" (=) "=" (identifier) "x" (}) "" (;) ";" (comment) "// Linearly stratified" (expression_statement) "boundary ({T});" (call_expression) "boundary ({T})" (identifier) "boundary" (argument_list) "({T})" (() "(" (compound_statement) "{T}" ({) "{" (ERROR) "T" (identifier) "T" (}) "}" ()) ")" (;) ";" (ERROR) "}" (}) "}" (function_definition) "event diff (i++) {\n dt = dtnext (DT);\n face vector D[];\n foreach_cell_all()\n Th[] = T[];\n foreach_face() \n D.x[] = K (face_gradient_x (T, 0));\n boundary ({D.x});\n diffusion (T, dt, D);\n}" (type_identifier) "event" (function_declarator) "diff (i++)" (identifier) "diff" (parameter_list) "(i++)" (() "(" (parameter_declaration) "i" (type_identifier) "i" (ERROR) "++" (++) "++" ()) ")" (compound_statement) "{\n dt = dtnext (DT);\n face vector D[];\n foreach_cell_all()\n Th[] = T[];\n foreach_face() \n D.x[] = K (face_gradient_x (T, 0));\n boundary ({D.x});\n diffusion (T, dt, D);\n}" ({) "{" (expression_statement) "dt = dtnext (DT);" (assignment_expression) "dt = dtnext (DT)" (identifier) "dt" (=) "=" (call_expression) "dtnext (DT)" (identifier) "dtnext" (argument_list) "(DT)" (() "(" (identifier) "DT" ()) ")" (;) ";" (declaration) "face vector D[];" (type_identifier) "face" (array_declarator) "vector D[]" (identifier) "vector" (ERROR) "D" (identifier) "D" ([) "[" (]) "]" (;) ";" (expression_statement) "foreach_cell_all()\n Th[] = T[];" (assignment_expression) "foreach_cell_all()\n Th[] = T[]" (subscript_expression) "foreach_cell_all()\n Th[]" (call_expression) "foreach_cell_all()" (identifier) "foreach_cell_all" (argument_list) "()" (() "(" ()) ")" (ERROR) "Th" (identifier) "Th" ([) "[" (identifier) "" (]) "]" (=) "=" (subscript_expression) "T[]" (identifier) "T" ([) "[" (identifier) "" (]) "]" (;) ";" (expression_statement) "foreach_face() \n D.x[] = K (face_gradient_x (T, 0));" (assignment_expression) "foreach_face() \n D.x[] = K (face_gradient_x (T, 0))" (subscript_expression) "foreach_face() \n D.x[]" (field_expression) "foreach_face() \n D.x" (call_expression) "foreach_face()" (identifier) "foreach_face" (argument_list) "()" (() "(" ()) ")" (ERROR) "D" (identifier) "D" (.) "." (field_identifier) "x" ([) "[" (identifier) "" (]) "]" (=) "=" (call_expression) "K (face_gradient_x (T, 0))" (identifier) "K" (argument_list) "(face_gradient_x (T, 0))" (() "(" (call_expression) "face_gradient_x (T, 0)" (identifier) "face_gradient_x" (argument_list) "(T, 0)" (() "(" (identifier) "T" (,) "," (number_literal) "0" ()) ")" ()) ")" (;) ";" (expression_statement) "boundary ({D.x});" (call_expression) "boundary ({D.x})" (identifier) "boundary" (argument_list) "({D.x})" (() "(" (compound_statement) "{D.x}" ({) "{" (ERROR) "D.x" (field_expression) "D.x" (identifier) "D" (.) "." (field_identifier) "x" (}) "}" ()) ")" (;) ";" (expression_statement) "diffusion (T, dt, D);" (call_expression) "diffusion (T, dt, D)" (identifier) "diffusion" (argument_list) "(T, dt, D)" (() "(" (identifier) "T" (,) "," (identifier) "dt" (,) "," (identifier) "D" ()) ")" (;) ";" (}) "}" (comment) "/**\n## Output\n\n![A layer emerges](canopyflx/mov.mp4)\n\nThe movie is generated with `gnuplot` and `ffmpeg`.\n*/" (declaration) "FILE * gnuplotPipe;" (type_identifier) "FILE" (pointer_declarator) "* gnuplotPipe" (*) "*" (identifier) "gnuplotPipe" (;) ";" (declaration) "event init (t = 0) {\n gnuplotPipe = popen ("gnuplot", "w");" (type_identifier) "event" (init_declarator) "init (t = 0) {\n gnuplotPipe = popen ("gnuplot", "w")" (function_declarator) "init (t" (identifier) "init" (parameter_list) "(t" (() "(" (parameter_declaration) "t" (type_identifier) "t" ()) "" (=) "=" (ERROR) "0)" (number_literal) "0" ()) ")" (initializer_list) "{\n gnuplotPipe = popen ("gnuplot", "w")" ({) "{" (assignment_expression) "gnuplotPipe = popen ("gnuplot", "w")" (identifier) "gnuplotPipe" (=) "=" (call_expression) "popen ("gnuplot", "w")" (identifier) "popen" (argument_list) "("gnuplot", "w")" (() "(" (string_literal) ""gnuplot"" (") """ (string_content) "gnuplot" (") """ (,) "," (string_literal) ""w"" (") """ (string_content) "w" (") """ ()) ")" (}) "" (;) ";" (expression_statement) "fprintf(gnuplotPipe,\n "set term pngcairo\n"\n "set xr [0: 1]\n"\n "set yr [0: 1]\n"\n "set key top left\n"\n "set grid\n"\n "set title 'Temperature and its Diffusivity'\n"\n "set xlabel 'T/ΔT, K/K_b'\n"\n "set ylabel 'z/z_c'\n");\n" (call_expression) "fprintf(gnuplotPipe,\n "set term pngcairo\n"\n "set xr [0: 1]\n"\n "set yr [0: 1]\n"\n "set key top left\n"\n "set grid\n"\n "set title 'Temperature and its Diffusivity'\n"\n "set xlabel 'T/ΔT, K/K_b'\n"\n "set ylabel 'z/z_c'\n");" (identifier) "fprintf" (argument_list) "(gnuplotPipe,\n "set term pngcairo\n"\n "set xr [0: 1]\n"\n "set yr [0: 1]\n"\n "set key top left\n"\n "set grid\n"\n "set title 'Temperature and its Diffusivity'\n"\n "set xlabel 'T/ΔT, K/K_b'\n"\n "set ylabel 'z/z_c'\n");" (() "(" (identifier) "gnuplotPipe" (,) "," (concatenated_string) ""set term pngcairo\n"\n "set xr [0: 1]\n"\n "set yr [0: 1]\n"\n "set key top left\n"\n "set grid\n"\n "set title 'Temperature and its Diffusivity'\n"\n "set xlabel 'T/ΔT, K/K_b'\n"\n "set ylabel 'z/z_c'\n")" (string_literal) ""set term pngcairo\n"" (") """ (string_content) "set term pngcairo" (escape_sequence) "\n" (") """ (string_literal) ""set xr [0: 1]\n"" (") """ (string_content) "set xr [0: 1]" (escape_sequence) "\n" (") """ (string_literal) ""set yr [0: 1]\n"" (") """ (string_content) "set yr [0: 1]" (escape_sequence) "\n" (") """ (string_literal) ""set key top left\n"" (") """ (string_content) "set key top left" (escape_sequence) "\n" (") """ (string_literal) ""set grid\n"" (") """ (string_content) "set grid" (escape_sequence) "\n" (") """ (string_literal) ""set title 'Temperature and its Diffusivity'\n"" (") """ (string_content) "set title 'Temperature and its Diffusivity'" (escape_sequence) "\n" (") """ (string_literal) ""set xlabel 'T/ΔT, K/K_b'\n"\n" (") """ (string_content) "set xlabel 'T/ΔT, K/K_b'\" (escape_sequence) "n"" (") "\n" (string_literal) "set ylabel 'z/z_c'\n")" (") "s" (string_content) "et ylabel 'z/z_c'\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (ERROR) "\n" (}) "\n" (declaration) "nt frame = 0;\n" (primitive_type) "nt " (init_declarator) "rame = 0;" (identifier) "rame " (=) " " (number_literal) ";" (;) "\n" (function_definition) "vent movie (t += 0.1) {\n fprintf (gnuplotPipe,\n "set output 'plot%d.png'\n"\n "plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', ",\n frame);\n fprintf (gnuplotPipe, "'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\n");\n foreach()\n fprintf (gnuplotPipe, "%g %g\n", T[], x);\n fprintf (gnuplotPipe, "e\n");\n foreach_face()\n fprintf (gnuplotPipe, "%g %g\n", K (face_gradient_x(T, 0)), x);\n fprintf (gnuplotPipe, "e\n");\n frame++;\n}\n" (type_identifier) "vent " (function_declarator) "ovie (t += 0.1) " (identifier) "ovie " (parameter_list) "t += 0.1) " (() "t" (parameter_declaration) " " (type_identifier) " " (ERROR) "= 0.1)" (+=) "= " (number_literal) ".1)" ()) " " (compound_statement) "\n fprintf (gnuplotPipe,\n "set output 'plot%d.png'\n"\n "plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', ",\n frame);\n fprintf (gnuplotPipe, "'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\n");\n foreach()\n fprintf (gnuplotPipe, "%g %g\n", T[], x);\n fprintf (gnuplotPipe, "e\n");\n foreach_face()\n fprintf (gnuplotPipe, "%g %g\n", K (face_gradient_x(T, 0)), x);\n fprintf (gnuplotPipe, "e\n");\n frame++;\n}\n" ({) "\n" (expression_statement) "printf (gnuplotPipe,\n "set output 'plot%d.png'\n"\n "plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', ",\n frame);\n" (call_expression) "printf (gnuplotPipe,\n "set output 'plot%d.png'\n"\n "plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', ",\n frame);" (identifier) "printf " (argument_list) "gnuplotPipe,\n "set output 'plot%d.png'\n"\n "plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', ",\n frame);" (() "g" (identifier) "nuplotPipe," (,) "\n" (concatenated_string) "set output 'plot%d.png'\n"\n "plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', "," (string_literal) "set output 'plot%d.png'\n"\n" (") "s" (string_content) "et output 'plot%d.png'\" (escape_sequence) "n"" (") "\n" (string_literal) "plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', "," (") "p" (string_content) "lot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', "" (") "," (,) "\n" (identifier) "rame)" ()) ";" (;) "\n" (expression_statement) "printf (gnuplotPipe, "'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\n");\n" (call_expression) "printf (gnuplotPipe, "'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\n");" (identifier) "printf " (argument_list) "gnuplotPipe, "'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\n");" (() "g" (identifier) "nuplotPipe," (,) " " (string_literal) "'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\n")" (") "'" (string_content) "-' w l lw 5 t 'T', '' w l lw 4 t 'K'\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (expression_statement) "oreach()\n fprintf (gnuplotPipe, "%g %g\n", T[], x);\n" (call_expression) "oreach()\n fprintf (gnuplotPipe, "%g %g\n", T[], x);" (call_expression) "oreach()\n" (identifier) "oreach(" (argument_list) ")\n" (() ")" ()) "\n" (ERROR) "printf " (identifier) "printf " (argument_list) "gnuplotPipe, "%g %g\n", T[], x);" (() "g" (identifier) "nuplotPipe," (,) " " (string_literal) "%g %g\n"," (") "%" (string_content) "g %g\" (escape_sequence) "n"" (") "," (,) " " (subscript_expression) "[]," (identifier) "[" ([) "]" (identifier) "" (]) "," (,) " " (identifier) ")" ()) ";" (;) "\n" (expression_statement) "printf (gnuplotPipe, "e\n");\n" (call_expression) "printf (gnuplotPipe, "e\n");" (identifier) "printf " (argument_list) "gnuplotPipe, "e\n");" (() "g" (identifier) "nuplotPipe," (,) " " (string_literal) "e\n")" (") "e" (string_content) "\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (expression_statement) "oreach_face()\n fprintf (gnuplotPipe, "%g %g\n", K (face_gradient_x(T, 0)), x);\n" (call_expression) "oreach_face()\n fprintf (gnuplotPipe, "%g %g\n", K (face_gradient_x(T, 0)), x);" (call_expression) "oreach_face()\n" (identifier) "oreach_face(" (argument_list) ")\n" (() ")" ()) "\n" (ERROR) "printf " (identifier) "printf " (argument_list) "gnuplotPipe, "%g %g\n", K (face_gradient_x(T, 0)), x);" (() "g" (identifier) "nuplotPipe," (,) " " (string_literal) "%g %g\n"," (") "%" (string_content) "g %g\" (escape_sequence) "n"" (") "," (,) " " (call_expression) " (face_gradient_x(T, 0))," (identifier) " " (argument_list) "face_gradient_x(T, 0))," (() "f" (call_expression) "ace_gradient_x(T, 0))" (identifier) "ace_gradient_x(" (argument_list) "T, 0))" (() "T" (identifier) "," (,) " " (number_literal) ")" ()) ")" ()) "," (,) " " (identifier) ")" ()) ";" (;) "\n" (expression_statement) "printf (gnuplotPipe, "e\n");\n" (call_expression) "printf (gnuplotPipe, "e\n");" (identifier) "printf " (argument_list) "gnuplotPipe, "e\n");" (() "g" (identifier) "nuplotPipe," (,) " " (string_literal) "e\n")" (") "e" (string_content) "\" (escape_sequence) "n"" (") ")" ()) ";" (;) "\n" (expression_statement) "rame++;\n" (update_expression) "rame++;" (identifier) "rame+" (++) "+;" (;) "\n" (}) "\n" (function_definition) "vent stop (t = tend) {\n system ("rm mov.mp4");\n system ("ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\n -vf format=yuv420p -y mov.mp4");\n system ("rm plot*");\n return 1;\n}\n" (type_identifier) "vent " (function_declarator) "top (t = tend) " (identifier) "top " (parameter_list) "t = tend) " (() "t" (parameter_declaration) " = tend)" (type_identifier) " " (ERROR) " " (=) " " (identifier) "end)" ()) " " (compound_statement) "\n system ("rm mov.mp4");\n system ("ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\n -vf format=yuv420p -y mov.mp4");\n system ("rm plot*");\n return 1;\n}\n" ({) "\n" (expression_statement) "ystem ("rm mov.mp4");\n" (call_expression) "ystem ("rm mov.mp4");" (identifier) "ystem " (argument_list) ""rm mov.mp4");" (() """ (string_literal) "rm mov.mp4")" (") "r" (string_content) "m mov.mp4"" (") ")" ()) ";" (;) "\n" (expression_statement) "ystem ("ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\n -vf format=yuv420p -y mov.mp4");\n" (call_expression) "ystem ("ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\n -vf format=yuv420p -y mov.mp4");" (identifier) "ystem " (argument_list) ""ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\n -vf format=yuv420p -y mov.mp4");" (() """ (string_literal) "ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\n -vf format=yuv420p -y mov.mp4")" (") "f" (string_content) "fmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \" (escape_sequence) "\n " (string_content) " -vf format=yuv420p -y mov.mp4"" (") ")" ()) ";" (;) "\n" (expression_statement) "ystem ("rm plot*");\n" (call_expression) "ystem ("rm plot*");" (identifier) "ystem " (argument_list) ""rm plot*");" (() """ (string_literal) "rm plot*")" (") "r" (string_content) "m plot*"" (") ")" ()) ";" (;) "\n" (return_statement) "eturn 1;\n" (return) "eturn " (number_literal) ";" (;) "\n" (}) "\n" (comment) "**\n## A criterion for layer formation\n\nA steady state solution is characterized by a constant flux:\n\n$$K\frac{\partial T}{\partial z} = H$$\n\nFor convinience we write,\n\n$$y = \frac{\partial T}{\partial z}$$\n\nthen, \n\n$$K_c e^{-\alpha y}y = H,$$\n\nThere exists a maximum for H when $y = \alpha^{-1}$. At this value for\n$y$ the flux decreases with increasing gradients. It is well known\nthat such systems Collapse (van de Wiel et al., van de Wiel et\nal.). Thus we have a constraint $y < \frac{1}{\alpha}$.\n\n$$H_{\mathrm{max}} = \frac{K_c}{e\alpha},$$\n\n$$H_{\mathrm{max}} = \frac{K_b \left(1-4C_k(z^2 - z)\right)}{e\alpha}.$$\n\nThe most sustainable heatflux is the minimal value of\n$H_{\mathrm{max}}(z)$, which is at height $z = 0.5z_c$,\n\n$$\frac{H_{\mathrm{max, s}}}{K_b} = \frac{1 - C_k}{e\nalpha}.$$\n*/\n"
647
15
{"language": "c", "success": true, "metadata": {"lines": 123, "avg_line_length": 34.12, "nodes": 350, "errors": 0, "source_hash": "7393fd53098c96ac0dd9859a880cbd874596a9e4a7efa6ab0414332237515c35", "categorized_nodes": 233}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_def", "text": "#define Kc (Kb*(1 + 4*Ck*(x*(x - 1)))) \n", "parent": null, "children": [1, 2, 3], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 1, "type": "#define", "text": "#define", "parent": 0, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 2, "type": "identifier", "text": "Kc", "parent": 0, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 10}}, {"id": 3, "type": "preproc_arg", "text": "(Kb*(1 + 4*Ck*(x*(x - 1)))) ", "parent": 0, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 39}}, {"id": 4, "type": "preproc_function_def", "text": "#define K(grad) (max(Kc*exp(-a*(grad)), Kmin))\n", "parent": null, "children": [5, 6, 7, 9], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 5, "type": "#define", "text": "#define", "parent": 4, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 6, "type": "identifier", "text": "K", "parent": 4, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 9}}, {"id": 7, "type": "preproc_params", "text": "(grad)", "parent": 4, "children": [8], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 15}}, {"id": 8, "type": "identifier", "text": "grad", "parent": 7, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 14}}, {"id": 9, "type": "preproc_arg", "text": "(max(Kc*exp(-a*(grad)), Kmin))", "parent": 4, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 46}}, {"id": 10, "type": "preproc_include", "text": "#include \"grid/multigrid1D.h\" // a 1D grid\n", "parent": null, "children": [11, 12], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 11, "type": "#include", "text": "#include", "parent": 10, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 8}}, {"id": 12, "type": "string_literal", "text": "\"grid/multigrid1D.h\"", "parent": 10, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 29}}, {"id": 13, "type": "preproc_include", "text": "#include \"diffusion.h\"", "parent": null, "children": [14, 15], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 22}}, {"id": 14, "type": "#include", "text": "#include", "parent": 13, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 8}}, {"id": 15, "type": "string_literal", "text": "\"diffusion.h\"", "parent": 13, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 22}}, {"id": 16, "type": "preproc_include", "text": "#include \"run.h\" // Timeloop\n", "parent": null, "children": [17, 18], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 0}}, {"id": 17, "type": "#include", "text": "#include", "parent": 16, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 8}}, {"id": 18, "type": "string_literal", "text": "\"run.h\"", "parent": 16, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 16}}, {"id": 19, "type": "declaration", "text": "double Kb = 1, Kmin = 0.025, Ck = 0.4, a = 0.6;", "parent": null, "children": [20, 21, 25, 29, 33], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 47}}, {"id": 20, "type": "primitive_type", "text": "double", "parent": 19, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 21, "type": "init_declarator", "text": "Kb = 1", "parent": 19, "children": [22, 23, 24], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 13}}, {"id": 22, "type": "identifier", "text": "Kb", "parent": 21, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 9}}, {"id": 23, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 11}}, {"id": 24, "type": "number_literal", "text": "1", "parent": 21, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 13}}, {"id": 25, "type": "init_declarator", "text": "Kmin = 0.025", "parent": 19, "children": [26, 27, 28], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 27}}, {"id": 26, "type": "identifier", "text": "Kmin", "parent": 25, "children": [], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 19}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 21}}, {"id": 28, "type": "number_literal", "text": "0.025", "parent": 25, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 27}}, {"id": 29, "type": "init_declarator", "text": "Ck = 0.4", "parent": 19, "children": [30, 31, 32], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 37}}, {"id": 30, "type": "identifier", "text": "Ck", "parent": 29, "children": [], "start_point": {"row": 50, "column": 29}, "end_point": {"row": 50, "column": 31}}, {"id": 31, "type": "=", "text": "=", "parent": 29, "children": [], "start_point": {"row": 50, "column": 32}, "end_point": {"row": 50, "column": 33}}, {"id": 32, "type": "number_literal", "text": "0.4", "parent": 29, "children": [], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 37}}, {"id": 33, "type": "init_declarator", "text": "a = 0.6", "parent": 19, "children": [34, 35, 36], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 46}}, {"id": 34, "type": "identifier", "text": "a", "parent": 33, "children": [], "start_point": {"row": 50, "column": 39}, "end_point": {"row": 50, "column": 40}}, {"id": 35, "type": "=", "text": "=", "parent": 33, "children": [], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 42}}, {"id": 36, "type": "number_literal", "text": "0.6", "parent": 33, "children": [], "start_point": {"row": 50, "column": 43}, "end_point": {"row": 50, "column": 46}}, {"id": 37, "type": "declaration", "text": "double Flx = 0.368;", "parent": null, "children": [38, 39], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 19}}, {"id": 38, "type": "primitive_type", "text": "double", "parent": 37, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 6}}, {"id": 39, "type": "init_declarator", "text": "Flx = 0.368", "parent": 37, "children": [40, 41, 42], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 18}}, {"id": 40, "type": "identifier", "text": "Flx", "parent": 39, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 10}}, {"id": 41, "type": "=", "text": "=", "parent": 39, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 12}}, {"id": 42, "type": "number_literal", "text": "0.368", "parent": 39, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 18}}, {"id": 43, "type": "declaration", "text": "double tend = 15;", "parent": null, "children": [44, 45], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 17}}, {"id": 44, "type": "primitive_type", "text": "double", "parent": 43, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 6}}, {"id": 45, "type": "init_declarator", "text": "tend = 15", "parent": 43, "children": [46, 47, 48], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 16}}, {"id": 46, "type": "identifier", "text": "tend", "parent": 45, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 11}}, {"id": 47, "type": "=", "text": "=", "parent": 45, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 13}}, {"id": 48, "type": "number_literal", "text": "15", "parent": 45, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 16}}, {"id": 49, "type": "declaration", "text": "scalar T[], Th[];", "parent": null, "children": [50, 51, 53], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 17}}, {"id": 50, "type": "type_identifier", "text": "scalar", "parent": 49, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 6}}, {"id": 51, "type": "array_declarator", "text": "T[]", "parent": 49, "children": [52], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 10}}, {"id": 52, "type": "identifier", "text": "T", "parent": 51, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 8}}, {"id": 53, "type": "array_declarator", "text": "Th[]", "parent": 49, "children": [54], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 16}}, {"id": 54, "type": "identifier", "text": "Th", "parent": 53, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 14}}, {"id": 55, "type": "assignment_expression", "text": "T[left] = neumann (-Flx/K(face_gradient_x(Th,0)))", "parent": null, "children": [56, 59, 60], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 50}}, {"id": 56, "type": "subscript_expression", "text": "T[left]", "parent": 55, "children": [57, 58], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 7}}, {"id": 57, "type": "identifier", "text": "T", "parent": 56, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 1}}, {"id": 58, "type": "identifier", "text": "left", "parent": 56, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 6}}, {"id": 59, "type": "=", "text": "=", "parent": 55, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 10}}, {"id": 60, "type": "call_expression", "text": "neumann (-Flx/K(face_gradient_x(Th,0)))", "parent": 55, "children": [61, 62], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 50}}, {"id": 61, "type": "identifier", "text": "neumann", "parent": 60, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 18}}, {"id": 62, "type": "argument_list", "text": "(-Flx/K(face_gradient_x(Th,0)))", "parent": 60, "children": [63], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 50}}, {"id": 63, "type": "binary_expression", "text": "-Flx/K(face_gradient_x(Th,0))", "parent": 62, "children": [64, 67, 68], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 49}}, {"id": 64, "type": "unary_expression", "text": "-Flx", "parent": 63, "children": [65, 66], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 24}}, {"id": 65, "type": "-", "text": "-", "parent": 64, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 21}}, {"id": 66, "type": "identifier", "text": "Flx", "parent": 64, "children": [], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 24}}, {"id": 67, "type": "/", "text": "/", "parent": 63, "children": [], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 25}}, {"id": 68, "type": "call_expression", "text": "K(face_gradient_x(Th,0))", "parent": 63, "children": [69, 70], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 49}}, {"id": 69, "type": "identifier", "text": "K", "parent": 68, "children": [], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 26}}, {"id": 70, "type": "argument_list", "text": "(face_gradient_x(Th,0))", "parent": 68, "children": [71], "start_point": {"row": 55, "column": 26}, "end_point": {"row": 55, "column": 49}}, {"id": 71, "type": "call_expression", "text": "face_gradient_x(Th,0)", "parent": 70, "children": [72, 73], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 48}}, {"id": 72, "type": "identifier", "text": "face_gradient_x", "parent": 71, "children": [], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 42}}, {"id": 73, "type": "argument_list", "text": "(Th,0)", "parent": 71, "children": [74, 75], "start_point": {"row": 55, "column": 42}, "end_point": {"row": 55, "column": 48}}, {"id": 74, "type": "identifier", "text": "Th", "parent": 73, "children": [], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 45}}, {"id": 75, "type": "number_literal", "text": "0", "parent": 73, "children": [], "start_point": {"row": 55, "column": 46}, "end_point": {"row": 55, "column": 47}}, {"id": 76, "type": "assignment_expression", "text": "T[right] = neumann ( Flx/K(face_gradient_x(Th,0)))", "parent": null, "children": [77, 80, 81], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 50}}, {"id": 77, "type": "subscript_expression", "text": "T[right]", "parent": 76, "children": [78, 79], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 8}}, {"id": 78, "type": "identifier", "text": "T", "parent": 77, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 1}}, {"id": 79, "type": "identifier", "text": "right", "parent": 77, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 7}}, {"id": 80, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 10}}, {"id": 81, "type": "call_expression", "text": "neumann ( Flx/K(face_gradient_x(Th,0)))", "parent": 76, "children": [82, 83], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 50}}, {"id": 82, "type": "identifier", "text": "neumann", "parent": 81, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 18}}, {"id": 83, "type": "argument_list", "text": "( Flx/K(face_gradient_x(Th,0)))", "parent": 81, "children": [84], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 50}}, {"id": 84, "type": "binary_expression", "text": "Flx/K(face_gradient_x(Th,0))", "parent": 83, "children": [85, 86, 87], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 56, "column": 49}}, {"id": 85, "type": "identifier", "text": "Flx", "parent": 84, "children": [], "start_point": {"row": 56, "column": 21}, "end_point": {"row": 56, "column": 24}}, {"id": 86, "type": "/", "text": "/", "parent": 84, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 25}}, {"id": 87, "type": "call_expression", "text": "K(face_gradient_x(Th,0))", "parent": 84, "children": [88, 89], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 49}}, {"id": 88, "type": "identifier", "text": "K", "parent": 87, "children": [], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 26}}, {"id": 89, "type": "argument_list", "text": "(face_gradient_x(Th,0))", "parent": 87, "children": [90], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 49}}, {"id": 90, "type": "call_expression", "text": "face_gradient_x(Th,0)", "parent": 89, "children": [91, 92], "start_point": {"row": 56, "column": 27}, "end_point": {"row": 56, "column": 48}}, {"id": 91, "type": "identifier", "text": "face_gradient_x", "parent": 90, "children": [], "start_point": {"row": 56, "column": 27}, "end_point": {"row": 56, "column": 42}}, {"id": 92, "type": "argument_list", "text": "(Th,0)", "parent": 90, "children": [93, 94], "start_point": {"row": 56, "column": 42}, "end_point": {"row": 56, "column": 48}}, {"id": 93, "type": "identifier", "text": "Th", "parent": 92, "children": [], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 45}}, {"id": 94, "type": "number_literal", "text": "0", "parent": 92, "children": [], "start_point": {"row": 56, "column": 46}, "end_point": {"row": 56, "column": 47}}, {"id": 95, "type": "function_definition", "text": "int main() {\n N = 512;\n TOLERANCE = 1e-4;\n DT = 0.001;\n run();\n}", "parent": null, "children": [96, 97], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 63, "column": 1}}, {"id": 96, "type": "primitive_type", "text": "int", "parent": 95, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 3}}, {"id": 97, "type": "function_declarator", "text": "main()", "parent": 95, "children": [98, 99], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 10}}, {"id": 98, "type": "identifier", "text": "main", "parent": 97, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 8}}, {"id": 99, "type": "parameter_list", "text": "()", "parent": 97, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 10}}, {"id": 100, "type": "assignment_expression", "text": "N = 512", "parent": 95, "children": [101, 102, 103], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 10}}, {"id": 101, "type": "identifier", "text": "N", "parent": 100, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 3}}, {"id": 102, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 6}}, {"id": 103, "type": "number_literal", "text": "512", "parent": 100, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 10}}, {"id": 104, "type": "assignment_expression", "text": "TOLERANCE = 1e-4", "parent": 95, "children": [105, 106, 107], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 18}}, {"id": 105, "type": "identifier", "text": "TOLERANCE", "parent": 104, "children": [], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 11}}, {"id": 106, "type": "=", "text": "=", "parent": 104, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 13}}, {"id": 107, "type": "number_literal", "text": "1e-4", "parent": 104, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 18}}, {"id": 108, "type": "assignment_expression", "text": "DT = 0.001", "parent": 95, "children": [109, 110, 111], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 12}}, {"id": 109, "type": "identifier", "text": "DT", "parent": 108, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 4}}, {"id": 110, "type": "=", "text": "=", "parent": 108, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 6}}, {"id": 111, "type": "number_literal", "text": "0.001", "parent": 108, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 12}}, {"id": 112, "type": "call_expression", "text": "run()", "parent": 95, "children": [113, 114], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 7}}, {"id": 113, "type": "identifier", "text": "run", "parent": 112, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 5}}, {"id": 114, "type": "argument_list", "text": "()", "parent": 112, "children": [], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 7}}, {"id": 115, "type": "declaration", "text": "event init (t = 0) {\n foreach()\n T[] = x;", "parent": null, "children": [116, 117], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 67, "column": 12}}, {"id": 116, "type": "type_identifier", "text": "event", "parent": 115, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 5}}, {"id": 117, "type": "init_declarator", "text": "init (t = 0) {\n foreach()\n T[] = x", "parent": 115, "children": [118, 123, 124, 126], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 67, "column": 11}}, {"id": 118, "type": "function_declarator", "text": "init (t", "parent": 117, "children": [119, 120], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 13}}, {"id": 119, "type": "identifier", "text": "init", "parent": 118, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 10}}, {"id": 120, "type": "parameter_list", "text": "(t", "parent": 118, "children": [121], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 13}}, {"id": 121, "type": "parameter_declaration", "text": "t", "parent": 120, "children": [122], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 13}}, {"id": 122, "type": "type_identifier", "text": "t", "parent": 121, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 13}}, {"id": 123, "type": "=", "text": "=", "parent": 117, "children": [], "start_point": {"row": 65, "column": 14}, "end_point": {"row": 65, "column": 15}}, {"id": 124, "type": "ERROR", "text": "0)", "parent": 117, "children": [125], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 18}}, {"id": 125, "type": "number_literal", "text": "0", "parent": 124, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 17}}, {"id": 126, "type": "initializer_list", "text": "{\n foreach()\n T[] = x", "parent": 117, "children": [127], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 67, "column": 11}}, {"id": 127, "type": "assignment_expression", "text": "foreach()\n T[] = x", "parent": 126, "children": [128, 135, 136], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 67, "column": 11}}, {"id": 128, "type": "subscript_expression", "text": "foreach()\n T[]", "parent": 127, "children": [129, 132, 134], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 67, "column": 7}}, {"id": 129, "type": "call_expression", "text": "foreach()", "parent": 128, "children": [130, 131], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 11}}, {"id": 130, "type": "identifier", "text": "foreach", "parent": 129, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 9}}, {"id": 131, "type": "argument_list", "text": "()", "parent": 129, "children": [], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 11}}, {"id": 132, "type": "ERROR", "text": "T", "parent": 128, "children": [133], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 5}}, {"id": 133, "type": "identifier", "text": "T", "parent": 132, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 5}}, {"id": 134, "type": "identifier", "text": "", "parent": 128, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 6}}, {"id": 135, "type": "=", "text": "=", "parent": 127, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 9}}, {"id": 136, "type": "identifier", "text": "x", "parent": 127, "children": [], "start_point": {"row": 67, "column": 10}, "end_point": {"row": 67, "column": 11}}, {"id": 137, "type": "call_expression", "text": "boundary ({T})", "parent": null, "children": [138, 139], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 16}}, {"id": 138, "type": "identifier", "text": "boundary", "parent": 137, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 10}}, {"id": 139, "type": "argument_list", "text": "({T})", "parent": 137, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 16}}, {"id": 140, "type": "ERROR", "text": "T", "parent": 139, "children": [141], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 14}}, {"id": 141, "type": "identifier", "text": "T", "parent": 140, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 14}}, {"id": 142, "type": "function_definition", "text": "event diff (i++) {\n dt = dtnext (DT);\n face vector D[];\n foreach_cell_all()\n Th[] = T[];\n foreach_face() \n D.x[] = K (face_gradient_x (T, 0));\n boundary ({D.x});\n diffusion (T, dt, D);\n}", "parent": null, "children": [143, 144], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 143, "type": "type_identifier", "text": "event", "parent": 142, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 5}}, {"id": 144, "type": "function_declarator", "text": "diff (i++)", "parent": 142, "children": [145, 146], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 16}}, {"id": 145, "type": "identifier", "text": "diff", "parent": 144, "children": [], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 10}}, {"id": 146, "type": "parameter_list", "text": "(i++)", "parent": 144, "children": [147, 149], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 16}}, {"id": 147, "type": "parameter_declaration", "text": "i", "parent": 146, "children": [148], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 13}}, {"id": 148, "type": "type_identifier", "text": "i", "parent": 147, "children": [], "start_point": {"row": 71, "column": 12}, "end_point": {"row": 71, "column": 13}}, {"id": 149, "type": "ERROR", "text": "++", "parent": 146, "children": [150], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 15}}, {"id": 150, "type": "++", "text": "++", "parent": 149, "children": [], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 15}}, {"id": 151, "type": "assignment_expression", "text": "dt = dtnext (DT)", "parent": 142, "children": [152, 153, 154], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 18}}, {"id": 152, "type": "identifier", "text": "dt", "parent": 151, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 4}}, {"id": 153, "type": "=", "text": "=", "parent": 151, "children": [], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 6}}, {"id": 154, "type": "call_expression", "text": "dtnext (DT)", "parent": 151, "children": [155, 156], "start_point": {"row": 72, "column": 7}, "end_point": {"row": 72, "column": 18}}, {"id": 155, "type": "identifier", "text": "dtnext", "parent": 154, "children": [], "start_point": {"row": 72, "column": 7}, "end_point": {"row": 72, "column": 13}}, {"id": 156, "type": "argument_list", "text": "(DT)", "parent": 154, "children": [157], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 18}}, {"id": 157, "type": "identifier", "text": "DT", "parent": 156, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 17}}, {"id": 158, "type": "declaration", "text": "face vector D[];", "parent": 142, "children": [159, 160], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 18}}, {"id": 159, "type": "type_identifier", "text": "face", "parent": 158, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 6}}, {"id": 160, "type": "array_declarator", "text": "vector D[]", "parent": 158, "children": [161, 162], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 17}}, {"id": 161, "type": "identifier", "text": "vector", "parent": 160, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 13}}, {"id": 162, "type": "ERROR", "text": "D", "parent": 160, "children": [163], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 15}}, {"id": 163, "type": "identifier", "text": "D", "parent": 162, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 15}}, {"id": 164, "type": "assignment_expression", "text": "foreach_cell_all()\n Th[] = T[]", "parent": 142, "children": [165, 172, 173], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 75, "column": 14}}, {"id": 165, "type": "subscript_expression", "text": "foreach_cell_all()\n Th[]", "parent": 164, "children": [166, 169, 171], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 75, "column": 8}}, {"id": 166, "type": "call_expression", "text": "foreach_cell_all()", "parent": 165, "children": [167, 168], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 20}}, {"id": 167, "type": "identifier", "text": "foreach_cell_all", "parent": 166, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 18}}, {"id": 168, "type": "argument_list", "text": "()", "parent": 166, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 20}}, {"id": 169, "type": "ERROR", "text": "Th", "parent": 165, "children": [170], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 6}}, {"id": 170, "type": "identifier", "text": "Th", "parent": 169, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 6}}, {"id": 171, "type": "identifier", "text": "", "parent": 165, "children": [], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 7}}, {"id": 172, "type": "=", "text": "=", "parent": 164, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 10}}, {"id": 173, "type": "subscript_expression", "text": "T[]", "parent": 164, "children": [174, 175], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 14}}, {"id": 174, "type": "identifier", "text": "T", "parent": 173, "children": [], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 12}}, {"id": 175, "type": "identifier", "text": "", "parent": 173, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 13}}, {"id": 176, "type": "assignment_expression", "text": "foreach_face() \n D.x[] = K (face_gradient_x (T, 0))", "parent": 142, "children": [177, 186, 187], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 77, "column": 38}}, {"id": 177, "type": "subscript_expression", "text": "foreach_face() \n D.x[]", "parent": 176, "children": [178, 185], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 77, "column": 9}}, {"id": 178, "type": "field_expression", "text": "foreach_face() \n D.x", "parent": 177, "children": [179, 182, 184], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 77, "column": 7}}, {"id": 179, "type": "call_expression", "text": "foreach_face()", "parent": 178, "children": [180, 181], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 16}}, {"id": 180, "type": "identifier", "text": "foreach_face", "parent": 179, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 14}}, {"id": 181, "type": "argument_list", "text": "()", "parent": 179, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 16}}, {"id": 182, "type": "ERROR", "text": "D", "parent": 178, "children": [183], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 5}}, {"id": 183, "type": "identifier", "text": "D", "parent": 182, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 5}}, {"id": 184, "type": "field_identifier", "text": "x", "parent": 178, "children": [], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 7}}, {"id": 185, "type": "identifier", "text": "", "parent": 177, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 8}}, {"id": 186, "type": "=", "text": "=", "parent": 176, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 11}}, {"id": 187, "type": "call_expression", "text": "K (face_gradient_x (T, 0))", "parent": 176, "children": [188, 189], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 38}}, {"id": 188, "type": "identifier", "text": "K", "parent": 187, "children": [], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 13}}, {"id": 189, "type": "argument_list", "text": "(face_gradient_x (T, 0))", "parent": 187, "children": [190], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 38}}, {"id": 190, "type": "call_expression", "text": "face_gradient_x (T, 0)", "parent": 189, "children": [191, 192], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 37}}, {"id": 191, "type": "identifier", "text": "face_gradient_x", "parent": 190, "children": [], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 30}}, {"id": 192, "type": "argument_list", "text": "(T, 0)", "parent": 190, "children": [193, 194], "start_point": {"row": 77, "column": 31}, "end_point": {"row": 77, "column": 37}}, {"id": 193, "type": "identifier", "text": "T", "parent": 192, "children": [], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 33}}, {"id": 194, "type": "number_literal", "text": "0", "parent": 192, "children": [], "start_point": {"row": 77, "column": 35}, "end_point": {"row": 77, "column": 36}}, {"id": 195, "type": "call_expression", "text": "boundary ({D.x})", "parent": 142, "children": [196, 197], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 18}}, {"id": 196, "type": "identifier", "text": "boundary", "parent": 195, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 10}}, {"id": 197, "type": "argument_list", "text": "({D.x})", "parent": 195, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 18}}, {"id": 198, "type": "ERROR", "text": "D.x", "parent": 197, "children": [199], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 16}}, {"id": 199, "type": "field_expression", "text": "D.x", "parent": 198, "children": [200, 201], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 16}}, {"id": 200, "type": "identifier", "text": "D", "parent": 199, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 14}}, {"id": 201, "type": "field_identifier", "text": "x", "parent": 199, "children": [], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 16}}, {"id": 202, "type": "call_expression", "text": "diffusion (T, dt, D)", "parent": 142, "children": [203, 204], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 22}}, {"id": 203, "type": "identifier", "text": "diffusion", "parent": 202, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 11}}, {"id": 204, "type": "argument_list", "text": "(T, dt, D)", "parent": 202, "children": [205, 206, 207], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 22}}, {"id": 205, "type": "identifier", "text": "T", "parent": 204, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 14}}, {"id": 206, "type": "identifier", "text": "dt", "parent": 204, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 18}}, {"id": 207, "type": "identifier", "text": "D", "parent": 204, "children": [], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 21}}, {"id": 208, "type": "declaration", "text": "FILE * gnuplotPipe;", "parent": null, "children": [209, 210], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 19}}, {"id": 209, "type": "type_identifier", "text": "FILE", "parent": 208, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 4}}, {"id": 210, "type": "pointer_declarator", "text": "* gnuplotPipe", "parent": 208, "children": [211, 212], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 18}}, {"id": 211, "type": "*", "text": "*", "parent": 210, "children": [], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 6}}, {"id": 212, "type": "identifier", "text": "gnuplotPipe", "parent": 210, "children": [], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 18}}, {"id": 213, "type": "declaration", "text": "event init (t = 0) {\n gnuplotPipe = popen (\"gnuplot\", \"w\");", "parent": null, "children": [214, 215], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 91, "column": 39}}, {"id": 214, "type": "type_identifier", "text": "event", "parent": 213, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 5}}, {"id": 215, "type": "init_declarator", "text": "init (t = 0) {\n gnuplotPipe = popen (\"gnuplot\", \"w\")", "parent": 213, "children": [216, 221, 222, 224], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 91, "column": 38}}, {"id": 216, "type": "function_declarator", "text": "init (t", "parent": 215, "children": [217, 218], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 13}}, {"id": 217, "type": "identifier", "text": "init", "parent": 216, "children": [], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 10}}, {"id": 218, "type": "parameter_list", "text": "(t", "parent": 216, "children": [219], "start_point": {"row": 90, "column": 11}, "end_point": {"row": 90, "column": 13}}, {"id": 219, "type": "parameter_declaration", "text": "t", "parent": 218, "children": [220], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 13}}, {"id": 220, "type": "type_identifier", "text": "t", "parent": 219, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 13}}, {"id": 221, "type": "=", "text": "=", "parent": 215, "children": [], "start_point": {"row": 90, "column": 14}, "end_point": {"row": 90, "column": 15}}, {"id": 222, "type": "ERROR", "text": "0)", "parent": 215, "children": [223], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 18}}, {"id": 223, "type": "number_literal", "text": "0", "parent": 222, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 17}}, {"id": 224, "type": "initializer_list", "text": "{\n gnuplotPipe = popen (\"gnuplot\", \"w\")", "parent": 215, "children": [225], "start_point": {"row": 90, "column": 19}, "end_point": {"row": 91, "column": 38}}, {"id": 225, "type": "assignment_expression", "text": "gnuplotPipe = popen (\"gnuplot\", \"w\")", "parent": 224, "children": [226, 227, 228], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 38}}, {"id": 226, "type": "identifier", "text": "gnuplotPipe", "parent": 225, "children": [], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 13}}, {"id": 227, "type": "=", "text": "=", "parent": 225, "children": [], "start_point": {"row": 91, "column": 14}, "end_point": {"row": 91, "column": 15}}, {"id": 228, "type": "call_expression", "text": "popen (\"gnuplot\", \"w\")", "parent": 225, "children": [229, 230], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 38}}, {"id": 229, "type": "identifier", "text": "popen", "parent": 228, "children": [], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 21}}, {"id": 230, "type": "argument_list", "text": "(\"gnuplot\", \"w\")", "parent": 228, "children": [231, 232], "start_point": {"row": 91, "column": 22}, "end_point": {"row": 91, "column": 38}}, {"id": 231, "type": "string_literal", "text": "\"gnuplot\"", "parent": 230, "children": [], "start_point": {"row": 91, "column": 23}, "end_point": {"row": 91, "column": 32}}, {"id": 232, "type": "string_literal", "text": "\"w\"", "parent": 230, "children": [], "start_point": {"row": 91, "column": 34}, "end_point": {"row": 91, "column": 37}}, {"id": 233, "type": "call_expression", "text": "fprintf(gnuplotPipe,\n\t \"set term pngcairo\\n\"\n\t \"set xr [0: 1]\\n\"\n\t \"set yr [0: 1]\\n\"\n\t \"set key top left\\n\"\n\t \"set grid\\n\"\n\t \"set title 'Temperature and its Diffusivity'\\n\"\n\t \"set xlabel 'T/\u0394T, K/K_b'\\n\"\n\t \"set ylabel 'z/z_c'\\n\");", "parent": null, "children": [234, 235], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 100, "column": 26}}, {"id": 234, "type": "identifier", "text": "fprintf", "parent": 233, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 9}}, {"id": 235, "type": "argument_list", "text": "(gnuplotPipe,\n\t \"set term pngcairo\\n\"\n\t \"set xr [0: 1]\\n\"\n\t \"set yr [0: 1]\\n\"\n\t \"set key top left\\n\"\n\t \"set grid\\n\"\n\t \"set title 'Temperature and its Diffusivity'\\n\"\n\t \"set xlabel 'T/\u0394T, K/K_b'\\n\"\n\t \"set ylabel 'z/z_c'\\n\");", "parent": 233, "children": [236, 237], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 100, "column": 26}}, {"id": 236, "type": "identifier", "text": "gnuplotPipe", "parent": 235, "children": [], "start_point": {"row": 92, "column": 10}, "end_point": {"row": 92, "column": 21}}, {"id": 237, "type": "concatenated_string", "text": "\"set term pngcairo\\n\"\n\t \"set xr [0: 1]\\n\"\n\t \"set yr [0: 1]\\n\"\n\t \"set key top left\\n\"\n\t \"set grid\\n\"\n\t \"set title 'Temperature and its Diffusivity'\\n\"\n\t \"set xlabel 'T/\u0394T, K/K_b'\\n\"\n\t \"set ylabel 'z/z_c'\\n\")", "parent": 235, "children": [238, 240, 242, 244, 246, 248, 250, 252], "start_point": {"row": 93, "column": 3}, "end_point": {"row": 100, "column": 25}}, {"id": 238, "type": "string_literal", "text": "\"set term pngcairo\\n\"", "parent": 237, "children": [239], "start_point": {"row": 93, "column": 3}, "end_point": {"row": 93, "column": 24}}, {"id": 239, "type": "escape_sequence", "text": "\\n", "parent": 238, "children": [], "start_point": {"row": 93, "column": 21}, "end_point": {"row": 93, "column": 23}}, {"id": 240, "type": "string_literal", "text": "\"set xr [0: 1]\\n\"", "parent": 237, "children": [241], "start_point": {"row": 94, "column": 3}, "end_point": {"row": 94, "column": 20}}, {"id": 241, "type": "escape_sequence", "text": "\\n", "parent": 240, "children": [], "start_point": {"row": 94, "column": 17}, "end_point": {"row": 94, "column": 19}}, {"id": 242, "type": "string_literal", "text": "\"set yr [0: 1]\\n\"", "parent": 237, "children": [243], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 20}}, {"id": 243, "type": "escape_sequence", "text": "\\n", "parent": 242, "children": [], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 19}}, {"id": 244, "type": "string_literal", "text": "\"set key top left\\n\"", "parent": 237, "children": [245], "start_point": {"row": 96, "column": 3}, "end_point": {"row": 96, "column": 23}}, {"id": 245, "type": "escape_sequence", "text": "\\n", "parent": 244, "children": [], "start_point": {"row": 96, "column": 20}, "end_point": {"row": 96, "column": 22}}, {"id": 246, "type": "string_literal", "text": "\"set grid\\n\"", "parent": 237, "children": [247], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 15}}, {"id": 247, "type": "escape_sequence", "text": "\\n", "parent": 246, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 14}}, {"id": 248, "type": "string_literal", "text": "\"set title 'Temperature and its Diffusivity'\\n\"", "parent": 237, "children": [249], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 98, "column": 50}}, {"id": 249, "type": "escape_sequence", "text": "\\n", "parent": 248, "children": [], "start_point": {"row": 98, "column": 47}, "end_point": {"row": 98, "column": 49}}, {"id": 250, "type": "string_literal", "text": "\"set xlabel 'T/\u0394T, K/K_b'\\n\"\n", "parent": 237, "children": [251], "start_point": {"row": 99, "column": 3}, "end_point": {"row": 99, "column": 32}}, {"id": 251, "type": "escape_sequence", "text": "n\"", "parent": 250, "children": [], "start_point": {"row": 99, "column": 29}, "end_point": {"row": 99, "column": 31}}, {"id": 252, "type": "string_literal", "text": "set ylabel 'z/z_c'\\n\")", "parent": 237, "children": [253], "start_point": {"row": 100, "column": 3}, "end_point": {"row": 100, "column": 25}}, {"id": 253, "type": "escape_sequence", "text": "n\"", "parent": 252, "children": [], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 24}}, {"id": 254, "type": "ERROR", "text": "\n", "parent": null, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 1}}, {"id": 255, "type": "declaration", "text": "nt frame = 0;\n", "parent": null, "children": [256, 257], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 14}}, {"id": 256, "type": "primitive_type", "text": "nt ", "parent": 255, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 3}}, {"id": 257, "type": "init_declarator", "text": "rame = 0;", "parent": 255, "children": [258, 259], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 13}}, {"id": 258, "type": "identifier", "text": "rame ", "parent": 257, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 9}}, {"id": 259, "type": "=", "text": " ", "parent": 257, "children": [], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 11}}, {"id": 260, "type": "function_definition", "text": "vent movie (t += 0.1) {\n fprintf (gnuplotPipe,\n\t \"set output 'plot%d.png'\\n\"\n\t \"plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', \",\n\t frame);\n fprintf (gnuplotPipe, \"'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\\n\");\n foreach()\n fprintf (gnuplotPipe, \"%g %g\\n\", T[], x);\n fprintf (gnuplotPipe, \"e\\n\");\n foreach_face()\n fprintf (gnuplotPipe, \"%g %g\\n\", K (face_gradient_x(T, 0)), x);\n fprintf (gnuplotPipe, \"e\\n\");\n frame++;\n}\n", "parent": null, "children": [261, 262], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 117, "column": 1}}, {"id": 261, "type": "type_identifier", "text": "vent ", "parent": 260, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 5}}, {"id": 262, "type": "function_declarator", "text": "ovie (t += 0.1) ", "parent": 260, "children": [263, 264], "start_point": {"row": 104, "column": 6}, "end_point": {"row": 104, "column": 22}}, {"id": 263, "type": "identifier", "text": "ovie ", "parent": 262, "children": [], "start_point": {"row": 104, "column": 6}, "end_point": {"row": 104, "column": 11}}, {"id": 264, "type": "parameter_list", "text": "t += 0.1) ", "parent": 262, "children": [265, 267], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 22}}, {"id": 265, "type": "parameter_declaration", "text": " ", "parent": 264, "children": [266], "start_point": {"row": 104, "column": 13}, "end_point": {"row": 104, "column": 14}}, {"id": 266, "type": "type_identifier", "text": " ", "parent": 265, "children": [], "start_point": {"row": 104, "column": 13}, "end_point": {"row": 104, "column": 14}}, {"id": 267, "type": "ERROR", "text": "= 0.1)", "parent": 264, "children": [268, 269], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 21}}, {"id": 268, "type": "+=", "text": "= ", "parent": 267, "children": [], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 17}}, {"id": 269, "type": "number_literal", "text": ".1)", "parent": 267, "children": [], "start_point": {"row": 104, "column": 18}, "end_point": {"row": 104, "column": 21}}, {"id": 270, "type": "call_expression", "text": "printf (gnuplotPipe,\n\t \"set output 'plot%d.png'\\n\"\n\t \"plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', \",\n\t frame);", "parent": 260, "children": [271, 272], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 108, "column": 10}}, {"id": 271, "type": "identifier", "text": "printf ", "parent": 270, "children": [], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 9}}, {"id": 272, "type": "argument_list", "text": "gnuplotPipe,\n\t \"set output 'plot%d.png'\\n\"\n\t \"plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', \",\n\t frame);", "parent": 270, "children": [273, 274, 278], "start_point": {"row": 105, "column": 10}, "end_point": {"row": 108, "column": 10}}, {"id": 273, "type": "identifier", "text": "nuplotPipe,", "parent": 272, "children": [], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 22}}, {"id": 274, "type": "concatenated_string", "text": "set output 'plot%d.png'\\n\"\n\t \"plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', \",", "parent": 272, "children": [275, 277], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 107, "column": 57}}, {"id": 275, "type": "string_literal", "text": "set output 'plot%d.png'\\n\"\n", "parent": 274, "children": [276], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 31}}, {"id": 276, "type": "escape_sequence", "text": "n\"", "parent": 275, "children": [], "start_point": {"row": 106, "column": 28}, "end_point": {"row": 106, "column": 30}}, {"id": 277, "type": "string_literal", "text": "plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', \",", "parent": 274, "children": [], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 57}}, {"id": 278, "type": "identifier", "text": "rame)", "parent": 272, "children": [], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 9}}, {"id": 279, "type": "call_expression", "text": "printf (gnuplotPipe, \"'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\\n\");", "parent": 260, "children": [280, 281], "start_point": {"row": 109, "column": 2}, "end_point": {"row": 109, "column": 66}}, {"id": 280, "type": "identifier", "text": "printf ", "parent": 279, "children": [], "start_point": {"row": 109, "column": 2}, "end_point": {"row": 109, "column": 9}}, {"id": 281, "type": "argument_list", "text": "gnuplotPipe, \"'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\\n\");", "parent": 279, "children": [282, 283], "start_point": {"row": 109, "column": 10}, "end_point": {"row": 109, "column": 66}}, {"id": 282, "type": "identifier", "text": "nuplotPipe,", "parent": 281, "children": [], "start_point": {"row": 109, "column": 11}, "end_point": {"row": 109, "column": 22}}, {"id": 283, "type": "string_literal", "text": "'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\\n\")", "parent": 281, "children": [284], "start_point": {"row": 109, "column": 24}, "end_point": {"row": 109, "column": 65}}, {"id": 284, "type": "escape_sequence", "text": "n\"", "parent": 283, "children": [], "start_point": {"row": 109, "column": 62}, "end_point": {"row": 109, "column": 64}}, {"id": 285, "type": "call_expression", "text": "oreach()\n fprintf (gnuplotPipe, \"%g %g\\n\", T[], x);", "parent": 260, "children": [286, 288, 290], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 111, "column": 44}}, {"id": 286, "type": "call_expression", "text": "oreach()\n", "parent": 285, "children": [287], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 11}}, {"id": 287, "type": "identifier", "text": "oreach(", "parent": 286, "children": [], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 9}}, {"id": 288, "type": "ERROR", "text": "printf ", "parent": 285, "children": [289], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 11}}, {"id": 289, "type": "identifier", "text": "printf ", "parent": 288, "children": [], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 11}}, {"id": 290, "type": "argument_list", "text": "gnuplotPipe, \"%g %g\\n\", T[], x);", "parent": 285, "children": [291, 292, 294], "start_point": {"row": 111, "column": 12}, "end_point": {"row": 111, "column": 44}}, {"id": 291, "type": "identifier", "text": "nuplotPipe,", "parent": 290, "children": [], "start_point": {"row": 111, "column": 13}, "end_point": {"row": 111, "column": 24}}, {"id": 292, "type": "string_literal", "text": "%g %g\\n\",", "parent": 290, "children": [293], "start_point": {"row": 111, "column": 26}, "end_point": {"row": 111, "column": 35}}, {"id": 293, "type": "escape_sequence", "text": "n\"", "parent": 292, "children": [], "start_point": {"row": 111, "column": 32}, "end_point": {"row": 111, "column": 34}}, {"id": 294, "type": "subscript_expression", "text": "[],", "parent": 290, "children": [295], "start_point": {"row": 111, "column": 37}, "end_point": {"row": 111, "column": 40}}, {"id": 295, "type": "identifier", "text": "", "parent": 294, "children": [], "start_point": {"row": 111, "column": 39}, "end_point": {"row": 111, "column": 39}}, {"id": 296, "type": "call_expression", "text": "printf (gnuplotPipe, \"e\\n\");", "parent": 260, "children": [297, 298], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 112, "column": 30}}, {"id": 297, "type": "identifier", "text": "printf ", "parent": 296, "children": [], "start_point": {"row": 112, "column": 2}, "end_point": {"row": 112, "column": 9}}, {"id": 298, "type": "argument_list", "text": "gnuplotPipe, \"e\\n\");", "parent": 296, "children": [299, 300], "start_point": {"row": 112, "column": 10}, "end_point": {"row": 112, "column": 30}}, {"id": 299, "type": "identifier", "text": "nuplotPipe,", "parent": 298, "children": [], "start_point": {"row": 112, "column": 11}, "end_point": {"row": 112, "column": 22}}, {"id": 300, "type": "string_literal", "text": "e\\n\")", "parent": 298, "children": [301], "start_point": {"row": 112, "column": 24}, "end_point": {"row": 112, "column": 29}}, {"id": 301, "type": "escape_sequence", "text": "n\"", "parent": 300, "children": [], "start_point": {"row": 112, "column": 26}, "end_point": {"row": 112, "column": 28}}, {"id": 302, "type": "call_expression", "text": "oreach_face()\n fprintf (gnuplotPipe, \"%g %g\\n\", K (face_gradient_x(T, 0)), x);", "parent": 260, "children": [303, 305, 307], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 114, "column": 66}}, {"id": 303, "type": "call_expression", "text": "oreach_face()\n", "parent": 302, "children": [304], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 16}}, {"id": 304, "type": "identifier", "text": "oreach_face(", "parent": 303, "children": [], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 14}}, {"id": 305, "type": "ERROR", "text": "printf ", "parent": 302, "children": [306], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 11}}, {"id": 306, "type": "identifier", "text": "printf ", "parent": 305, "children": [], "start_point": {"row": 114, "column": 4}, "end_point": {"row": 114, "column": 11}}, {"id": 307, "type": "argument_list", "text": "gnuplotPipe, \"%g %g\\n\", K (face_gradient_x(T, 0)), x);", "parent": 302, "children": [308, 309, 311], "start_point": {"row": 114, "column": 12}, "end_point": {"row": 114, "column": 66}}, {"id": 308, "type": "identifier", "text": "nuplotPipe,", "parent": 307, "children": [], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 24}}, {"id": 309, "type": "string_literal", "text": "%g %g\\n\",", "parent": 307, "children": [310], "start_point": {"row": 114, "column": 26}, "end_point": {"row": 114, "column": 35}}, {"id": 310, "type": "escape_sequence", "text": "n\"", "parent": 309, "children": [], "start_point": {"row": 114, "column": 32}, "end_point": {"row": 114, "column": 34}}, {"id": 311, "type": "call_expression", "text": " (face_gradient_x(T, 0)),", "parent": 307, "children": [312, 313], "start_point": {"row": 114, "column": 37}, "end_point": {"row": 114, "column": 62}}, {"id": 312, "type": "identifier", "text": " ", "parent": 311, "children": [], "start_point": {"row": 114, "column": 37}, "end_point": {"row": 114, "column": 38}}, {"id": 313, "type": "argument_list", "text": "face_gradient_x(T, 0)),", "parent": 311, "children": [314], "start_point": {"row": 114, "column": 39}, "end_point": {"row": 114, "column": 62}}, {"id": 314, "type": "call_expression", "text": "ace_gradient_x(T, 0))", "parent": 313, "children": [315, 316], "start_point": {"row": 114, "column": 40}, "end_point": {"row": 114, "column": 61}}, {"id": 315, "type": "identifier", "text": "ace_gradient_x(", "parent": 314, "children": [], "start_point": {"row": 114, "column": 40}, "end_point": {"row": 114, "column": 55}}, {"id": 316, "type": "argument_list", "text": "T, 0))", "parent": 314, "children": [], "start_point": {"row": 114, "column": 55}, "end_point": {"row": 114, "column": 61}}, {"id": 317, "type": "call_expression", "text": "printf (gnuplotPipe, \"e\\n\");", "parent": 260, "children": [318, 319], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 30}}, {"id": 318, "type": "identifier", "text": "printf ", "parent": 317, "children": [], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 9}}, {"id": 319, "type": "argument_list", "text": "gnuplotPipe, \"e\\n\");", "parent": 317, "children": [320, 321], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 30}}, {"id": 320, "type": "identifier", "text": "nuplotPipe,", "parent": 319, "children": [], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 22}}, {"id": 321, "type": "string_literal", "text": "e\\n\")", "parent": 319, "children": [322], "start_point": {"row": 115, "column": 24}, "end_point": {"row": 115, "column": 29}}, {"id": 322, "type": "escape_sequence", "text": "n\"", "parent": 321, "children": [], "start_point": {"row": 115, "column": 26}, "end_point": {"row": 115, "column": 28}}, {"id": 323, "type": "update_expression", "text": "rame++;", "parent": 260, "children": [324, 325], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 116, "column": 9}}, {"id": 324, "type": "identifier", "text": "rame+", "parent": 323, "children": [], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 116, "column": 7}}, {"id": 325, "type": "++", "text": "+;", "parent": 323, "children": [], "start_point": {"row": 116, "column": 7}, "end_point": {"row": 116, "column": 9}}, {"id": 326, "type": "function_definition", "text": "vent stop (t = tend) {\n system (\"rm mov.mp4\");\n system (\"ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\\n -vf format=yuv420p -y mov.mp4\");\n system (\"rm plot*\");\n return 1;\n}\n", "parent": null, "children": [327, 328], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 125, "column": 1}}, {"id": 327, "type": "type_identifier", "text": "vent ", "parent": 326, "children": [], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 119, "column": 5}}, {"id": 328, "type": "function_declarator", "text": "top (t = tend) ", "parent": 326, "children": [329, 330], "start_point": {"row": 119, "column": 6}, "end_point": {"row": 119, "column": 21}}, {"id": 329, "type": "identifier", "text": "top ", "parent": 328, "children": [], "start_point": {"row": 119, "column": 6}, "end_point": {"row": 119, "column": 10}}, {"id": 330, "type": "parameter_list", "text": "t = tend) ", "parent": 328, "children": [331], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 21}}, {"id": 331, "type": "parameter_declaration", "text": " = tend)", "parent": 330, "children": [332, 333, 335], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 20}}, {"id": 332, "type": "type_identifier", "text": " ", "parent": 331, "children": [], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 13}}, {"id": 333, "type": "ERROR", "text": " ", "parent": 331, "children": [334], "start_point": {"row": 119, "column": 14}, "end_point": {"row": 119, "column": 15}}, {"id": 334, "type": "=", "text": " ", "parent": 333, "children": [], "start_point": {"row": 119, "column": 14}, "end_point": {"row": 119, "column": 15}}, {"id": 335, "type": "identifier", "text": "end)", "parent": 331, "children": [], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 20}}, {"id": 336, "type": "call_expression", "text": "ystem (\"rm mov.mp4\");", "parent": 326, "children": [337, 338], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 23}}, {"id": 337, "type": "identifier", "text": "ystem ", "parent": 336, "children": [], "start_point": {"row": 120, "column": 2}, "end_point": {"row": 120, "column": 8}}, {"id": 338, "type": "argument_list", "text": "\"rm mov.mp4\");", "parent": 336, "children": [339], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 23}}, {"id": 339, "type": "string_literal", "text": "rm mov.mp4\")", "parent": 338, "children": [], "start_point": {"row": 120, "column": 10}, "end_point": {"row": 120, "column": 22}}, {"id": 340, "type": "call_expression", "text": "ystem (\"ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\\n -vf format=yuv420p -y mov.mp4\");", "parent": 326, "children": [341, 342], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 122, "column": 41}}, {"id": 341, "type": "identifier", "text": "ystem ", "parent": 340, "children": [], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 8}}, {"id": 342, "type": "argument_list", "text": "\"ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\\n -vf format=yuv420p -y mov.mp4\");", "parent": 340, "children": [343], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 122, "column": 41}}, {"id": 343, "type": "string_literal", "text": "ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\\n -vf format=yuv420p -y mov.mp4\")", "parent": 342, "children": [344], "start_point": {"row": 121, "column": 10}, "end_point": {"row": 122, "column": 40}}, {"id": 344, "type": "escape_sequence", "text": "\n ", "parent": 343, "children": [], "start_point": {"row": 121, "column": 61}, "end_point": {"row": 122, "column": 0}}, {"id": 345, "type": "call_expression", "text": "ystem (\"rm plot*\");", "parent": 326, "children": [346, 347], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 21}}, {"id": 346, "type": "identifier", "text": "ystem ", "parent": 345, "children": [], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 8}}, {"id": 347, "type": "argument_list", "text": "\"rm plot*\");", "parent": 345, "children": [348], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 21}}, {"id": 348, "type": "string_literal", "text": "rm plot*\")", "parent": 347, "children": [], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 20}}, {"id": 349, "type": "return_statement", "text": "eturn 1;\n", "parent": 326, "children": [], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 11}}]}, "node_categories": {"declarations": {"functions": [4, 95, 97, 118, 142, 144, 216, 260, 262, 326, 328], "variables": [19, 37, 43, 49, 115, 121, 147, 158, 208, 213, 219, 255, 265, 331], "classes": [], "imports": [10, 11, 13, 14, 16, 17], "modules": [], "enums": []}, "statements": {"expressions": [56, 60, 63, 64, 68, 71, 77, 81, 84, 87, 90, 112, 128, 129, 137, 154, 165, 166, 173, 177, 178, 179, 187, 190, 195, 199, 202, 228, 233, 270, 279, 285, 286, 294, 296, 302, 303, 311, 314, 317, 323, 336, 340, 345], "assignments": [55, 76, 100, 104, 108, 127, 151, 164, 176, 225], "loops": [], "conditionals": [2, 6, 8, 22, 26, 30, 34, 40, 46, 50, 52, 54, 57, 58, 61, 66, 69, 72, 74, 78, 79, 82, 85, 88, 91, 93, 98, 101, 105, 109, 113, 116, 119, 122, 130, 133, 134, 136, 138, 141, 143, 145, 148, 152, 155, 157, 159, 161, 163, 167, 170, 171, 174, 175, 180, 183, 184, 185, 188, 191, 193, 196, 200, 201, 203, 205, 206, 207, 209, 212, 214, 217, 220, 226, 229, 234, 236, 258, 261, 263, 266, 271, 273, 278, 280, 282, 287, 289, 291, 295, 297, 299, 304, 306, 308, 312, 315, 318, 320, 324, 327, 329, 332, 335, 337, 341, 346], "returns": [349], "exceptions": []}, "expressions": {"calls": [], "literals": [12, 15, 18, 24, 28, 32, 36, 42, 48, 75, 94, 103, 107, 111, 125, 194, 223, 231, 232, 237, 238, 240, 242, 244, 246, 248, 250, 252, 269, 274, 275, 277, 283, 292, 300, 309, 321, 339, 343, 348], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 4, "universal_type": "function", "name": "unknown", "text_snippet": "#define K(grad) (max(Kc*exp(-a*(grad)), Kmin))\n"}, {"node_id": 95, "universal_type": "function", "name": "main", "text_snippet": "int main() {\n N = 512;\n TOLERANCE = 1e-4;\n DT = 0.001;\n run();\n}"}, {"node_id": 97, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}, {"node_id": 118, "universal_type": "function", "name": "unknown", "text_snippet": "init (t"}, {"node_id": 142, "universal_type": "function", "name": "unknown", "text_snippet": "event diff (i++) {\n dt = dtnext (DT);\n face vector D[];\n foreach_cell_all()\n Th[] = T[];\n for"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "diff (i++)"}, {"node_id": 216, "universal_type": "function", "name": "unknown", "text_snippet": "init (t"}, {"node_id": 260, "universal_type": "function", "name": "unknown", "text_snippet": "vent movie (t += 0.1) {\n fprintf (gnuplotPipe,\n\t \"set output 'plot%d.png'\\n\"\n\t \"plot 0.6*(x-0.5"}, {"node_id": 262, "universal_type": "function", "name": "unknown", "text_snippet": "ovie (t += 0.1) "}, {"node_id": 326, "universal_type": "function", "name": "unknown", "text_snippet": "vent stop (t = tend) {\n system (\"rm mov.mp4\");\n system (\"ffmpeg -r 25 -f image2 -i plot%d.png -c:v"}, {"node_id": 328, "universal_type": "function", "name": "unknown", "text_snippet": "top (t = tend) "}], "class_declarations": [], "import_statements": [{"node_id": 10, "text": "#include \"grid/multigrid1D.h\" // a 1D grid\n"}, {"node_id": 11, "text": "#include"}, {"node_id": 13, "text": "#include \"diffusion.h\""}, {"node_id": 14, "text": "#include"}, {"node_id": 16, "text": "#include \"run.h\" // Timeloop\n"}, {"node_id": 17, "text": "#include"}]}, "original_source_code": "/**\n# Tempeature-gradient sharpening in a canopy.\n \nThe evolution of a temperature profile is studied with the minimal(?)\ningredients for stable layer formation. This is the [flux version of related axample](canopy.c). Consider a canopy (top at $z = z_c$) with a fixed temperature flux `Flx`. The evolution of the temperature ($T$) profile is described with an effective diffusivity $K$,\n\n$$\\frac{\\partial T}{\\partial t} = \\frac{\\partial}{\\partial z}K\\frac{\\partial T}{\\partial z }.$$\n\n$K$ is *modelled* by considering 3 effects: \n\n* A constant Background diffusivity due to shear, top down mixing etc ($K_b$). \n* A Height-dependend diffusivity correction for the canopy details. \n* A stability correction. \n\nIn a dimenonless setting, we choose $z_c = 1, \\Delta T = 1$ and $K_b =\n1$. The canopy correction defines $K_c$:\n\n$$K_c = K_b \\left( 1 + 4\\frac{C_k}{z_c^2} \\left(z\\left(z - z_c\\right)\\right)\\right),$$ \n*/\n#define Kc (Kb*(1 + 4*Ck*(x*(x - 1)))) \n/**\nWhich gives a maximum of $K_b$ at top and bottom and a minimum of\n$(1-C_k)K_b$ halfway the canopy. This is to model the effects of the\nturbulent air induced by the surface of the Earth and the canopy\ncrown.\n\nThe stability correction gives $K_s$,\n\n$$K_s = K_c e^{-a\\frac{\\partial T}{\\partial z}},$$\n\nwith $a$ an inverse temperature-gradient scale.\n\nFinally, to omit the most prominent issue with this description,\nthere is an minimum value for $K$; $K_{\\mathrm{min}}$.\n\n$$K = \\mathrm{max} \\left(K_s, K_{\\mathrm{min}}\\right).$$\n*/\n#define K(grad) (max(Kc*exp(-a*(grad)), Kmin))\n/**\n## Numerical set-up\n\nThe system is set up and solved for \n */\n#include \"grid/multigrid1D.h\" // a 1D grid\n#include \"diffusion.h\" \n#include \"run.h\" // Timeloop\n/**\nThe values of the physical parameters are chosen to be *just*\ncollapse.\n */\ndouble Kb = 1, Kmin = 0.025, Ck = 0.4, a = 0.6;\ndouble Flx = 0.368; // > (1 - Ck)/(exp(1)*a) \ndouble tend = 15;\n\nscalar T[], Th[];\nT[left] = neumann (-Flx/K(face_gradient_x(Th,0))); //bottom\nT[right] = neumann ( Flx/K(face_gradient_x(Th,0))); //top\n\nint main() {\n N = 512;\n TOLERANCE = 1e-4;\n DT = 0.001;\n run();\n}\n\nevent init (t = 0) {\n foreach()\n T[] = x; // Linearly stratified\n boundary ({T});\n}\n\nevent diff (i++) {\n dt = dtnext (DT);\n face vector D[];\n foreach_cell_all()\n Th[] = T[];\n foreach_face() \n D.x[] = K (face_gradient_x (T, 0));\n boundary ({D.x});\n diffusion (T, dt, D);\n}\n/**\n## Output\n\n![A layer emerges](canopyflx/mov.mp4)\n\nThe movie is generated with `gnuplot` and `ffmpeg`.\n*/\nFILE * gnuplotPipe;\n\nevent init (t = 0) {\n gnuplotPipe = popen (\"gnuplot\", \"w\");\n fprintf(gnuplotPipe,\n\t \"set term pngcairo\\n\"\n\t \"set xr [0: 1]\\n\"\n\t \"set yr [0: 1]\\n\"\n\t \"set key top left\\n\"\n\t \"set grid\\n\"\n\t \"set title 'Temperature and its Diffusivity'\\n\"\n\t \"set xlabel 'T/\u0394T, K/K_b'\\n\"\n\t \"set ylabel 'z/z_c'\\n\");\n}\n\nint frame = 0;\nevent movie (t += 0.1) {\n fprintf (gnuplotPipe,\n\t \"set output 'plot%d.png'\\n\"\n\t \"plot 0.6*(x-0.5) + 0.5 w l lw 1 t 'Max. gradient', \",\n\t frame);\n fprintf (gnuplotPipe, \"'-' w l lw 5 t 'T', '' w l lw 4 t 'K'\\n\");\n foreach()\n fprintf (gnuplotPipe, \"%g %g\\n\", T[], x);\n fprintf (gnuplotPipe, \"e\\n\");\n foreach_face()\n fprintf (gnuplotPipe, \"%g %g\\n\", K (face_gradient_x(T, 0)), x);\n fprintf (gnuplotPipe, \"e\\n\");\n frame++;\n}\n\nevent stop (t = tend) {\n system (\"rm mov.mp4\");\n system (\"ffmpeg -r 25 -f image2 -i plot%d.png -c:v libx264 \\\n -vf format=yuv420p -y mov.mp4\");\n system (\"rm plot*\");\n return 1;\n}\n\n/**\n## A criterion for layer formation\n\nA steady state solution is characterized by a constant flux:\n\n$$K\\frac{\\partial T}{\\partial z} = H$$\n\nFor convinience we write,\n\n$$y = \\frac{\\partial T}{\\partial z}$$\n\nthen, \n\n$$K_c e^{-\\alpha y}y = H,$$\n\nThere exists a maximum for H when $y = \\alpha^{-1}$. At this value for\n$y$ the flux decreases with increasing gradients. It is well known\nthat such systems Collapse (van de Wiel et al., van de Wiel et\nal.). Thus we have a constraint $y < \\frac{1}{\\alpha}$.\n\n$$H_{\\mathrm{max}} = \\frac{K_c}{e\\alpha},$$\n\n$$H_{\\mathrm{max}} = \\frac{K_b \\left(1-4C_k(z^2 - z)\\right)}{e\\alpha}.$$\n\nThe most sustainable heatflux is the minimal value of\n$H_{\\mathrm{max}}(z)$, which is at height $z = 0.5z_c$,\n\n$$\\frac{H_{\\mathrm{max, s}}}{K_b} = \\frac{1 - C_k}{e\\nalpha}.$$\n*/\n"}
80,987
c
// // MovieModel.h // Mtime // // Created by <NAME> on 20/7/15. // Copyright (c) 2015年 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> @interface MovieModel : NSObject @property (nonatomic,copy) NSString* title; @property (nonatomic,copy) NSString* original_title; @property (nonatomic,copy) NSString* year; @property (nonatomic,strong) NSDictionary* image; @property (nonatomic,copy) NSString* stars; @property (nonatomic,assign)float average; @property (nonatomic,assign)NSInteger type; @end
27.47
19
(translation_unit) "//\n// MovieModel.h\n// Mtime\n//\n// Created by <NAME> on 20/7/15.\n// Copyright (c) 2015年 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n@interface MovieModel : NSObject\n\n@property (nonatomic,copy) NSString* title;\n@property (nonatomic,copy) NSString* original_title;\n@property (nonatomic,copy) NSString* year;\n@property (nonatomic,strong) NSDictionary* image;\n@property (nonatomic,copy) NSString* stars;\n@property (nonatomic,assign)float average;\n@property (nonatomic,assign)NSInteger type;\n\n\n@end\n" (comment) "//" (comment) "// MovieModel.h" (comment) "// Mtime" (comment) "//" (comment) "// Created by <NAME> on 20/7/15." (comment) "// Copyright (c) 2015年 <NAME>. All rights reserved.\n/" (comment) "\n\n" (preproc_call) "mport <Foundation/Foundation.h>\n#i" (preproc_directive) "mport <" (preproc_arg) "oundation/Foundation.h>\n#" (preproc_call) "mport <UIKit/UIKit.h>\n\n@" (preproc_directive) "mport <" (preproc_arg) "IKit/UIKit.h>\n\n" (ERROR) "nterface MovieModel : NSObject\n\n@property (nonatomic,copy) NSString* title;\n@property (nonatomic,copy) NSString* original_title;\n@property (nonatomic,copy) NSString* year;\n@property (nonatomic,strong) NSDictionary* image;\n@property (nonatomic,copy) NSString* stars;\n@property (nonatomic,assign)float average;\n@property (nonatomic,assign)NSInteger type;\n\n\n@end\n" (ERROR) "n" (type_identifier) "terface M" (function_declarator) "vieModel : NSObject\n\n@property (nonatomic,copy) N" (identifier) "vieModel :" (ERROR) "NSObject\n\n@property (" (:) "N" (identifier) "Object\n\n" (ERROR) "r" (identifier) "operty (" (parameter_list) "onatomic,copy) N" (() "o" (identifier) "natomic,c" (,) "o" (identifier) "py) " ()) "N" (declaration) "String* title;\n@" (type_identifier) "String* " (pointer_declarator) "title;\n" (*) "t" (identifier) "tle;\n" (;) "@" (ERROR) "r" (ERROR) "r" (declaration) "operty (nonatomic,copy) NSString* original_title;\n@" (macro_type_specifier) "operty (nonatomic,copy) N" (identifier) "operty (" (() "o" (type_descriptor) "natomic,c" (type_identifier) "natomic,c" (ERROR) "opy) " (,) "o" (identifier) "py) " ()) "N" (ERROR) "String* " (identifier) "String* " (pointer_declarator) "original_title;\n" (*) "o" (identifier) "iginal_title;\n" (;) "@" (ERROR) "r" (ERROR) "r" (declaration) "operty (nonatomic,copy) NSString* year;\n@" (macro_type_specifier) "operty (nonatomic,copy) N" (identifier) "operty (" (() "o" (type_descriptor) "natomic,c" (type_identifier) "natomic,c" (ERROR) "opy) " (,) "o" (identifier) "py) " ()) "N" (ERROR) "String* " (identifier) "String* " (pointer_declarator) "year;\n" (*) "y" (identifier) "ar;\n" (;) "@" (ERROR) "r" (ERROR) "r" (declaration) "operty (nonatomic,strong) NSDictionary* image;\n@" (macro_type_specifier) "operty (nonatomic,strong) N" (identifier) "operty (" (() "o" (type_descriptor) "natomic,s" (type_identifier) "natomic,s" (ERROR) "trong) " (,) "t" (identifier) "rong) " ()) "N" (ERROR) "Dictionary* " (identifier) "Dictionary* " (pointer_declarator) "image;\n" (*) "i" (identifier) "age;\n" (;) "@" (ERROR) "r" (ERROR) "r" (declaration) "operty (nonatomic,copy) NSString* stars;\n@" (macro_type_specifier) "operty (nonatomic,copy) N" (identifier) "operty (" (() "o" (type_descriptor) "natomic,c" (type_identifier) "natomic,c" (ERROR) "opy) " (,) "o" (identifier) "py) " ()) "N" (ERROR) "String* " (identifier) "String* " (pointer_declarator) "stars;\n" (*) "s" (identifier) "ars;\n" (;) "@" (ERROR) "r" (ERROR) "r" (declaration) "operty (nonatomic,assign)float average;\n@" (macro_type_specifier) "operty (nonatomic,assign)fl" (identifier) "operty (" (() "o" (type_descriptor) "natomic,a" (type_identifier) "natomic,a" (ERROR) "ssign)f" (,) "s" (identifier) "sign)f" ()) "l" (ERROR) "oat a" (identifier) "oat a" (identifier) "erage;\n" (;) "@" (ERROR) "r" (ERROR) "r" (declaration) "operty (nonatomic,assign)NSInteger type;\n\n" (macro_type_specifier) "operty (nonatomic,assign)NS" (identifier) "operty (" (() "o" (type_descriptor) "natomic,a" (type_identifier) "natomic,a" (ERROR) "ssign)N" (,) "s" (identifier) "sign)N" ()) "S" (identifier) "Integer t" (ERROR) "pe;\n" (identifier) "pe;\n" (;) "\n" (ERROR) "n" (ERROR) "n" (identifier) "d\n"
143
30
{"language": "c", "success": true, "metadata": {"lines": 19, "avg_line_length": 27.47, "nodes": 106, "errors": 0, "source_hash": "2226e0f7e3c8b0d1c81fbaaa7865fc314044e415c157f9f85a40c682f90c449d", "categorized_nodes": 55}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "mport <Foundation/Foundation.h>\n#i", "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#", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "preproc_call", "text": "mport <UIKit/UIKit.h>\n\n@", "parent": null, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "mport <", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "IKit/UIKit.h>\n\n", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 23}}, {"id": 6, "type": "ERROR", "text": "nterface MovieModel : NSObject\n\n@property (nonatomic,copy) NSString* title;\n@property (nonatomic,copy) NSString* original_title;\n@property (nonatomic,copy) NSString* year;\n@property (nonatomic,strong) NSDictionary* image;\n@property (nonatomic,copy) NSString* stars;\n@property (nonatomic,assign)float average;\n@property (nonatomic,assign)NSInteger type;\n\n\n@end\n", "parent": null, "children": [7, 8, 9, 18, 23, 25, 37, 39, 51, 53, 65, 67, 79, 81, 91, 93, 103, 105], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 7, "type": "ERROR", "text": "n", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 8, "type": "type_identifier", "text": "terface M", "parent": 6, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 9, "type": "function_declarator", "text": "vieModel : NSObject\n\n@property (nonatomic,copy) N", "parent": 6, "children": [10, 11, 15], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 13, "column": 26}}, {"id": 10, "type": "identifier", "text": "vieModel :", "parent": 9, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 21}}, {"id": 11, "type": "ERROR", "text": "NSObject\n\n@property (", "parent": 9, "children": [12, 13, 14], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 13, "column": 9}}, {"id": 12, "type": "identifier", "text": "Object\n\n", "parent": 11, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 32}}, {"id": 13, "type": "ERROR", "text": "r", "parent": 11, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 14, "type": "identifier", "text": "operty (", "parent": 11, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 15, "type": "parameter_list", "text": "onatomic,copy) N", "parent": 9, "children": [16, 17], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 26}}, {"id": 16, "type": "identifier", "text": "natomic,c", "parent": 15, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 20}}, {"id": 17, "type": "identifier", "text": "py) ", "parent": 15, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 25}}, {"id": 18, "type": "declaration", "text": "String* title;\n@", "parent": 6, "children": [19, 20], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 43}}, {"id": 19, "type": "type_identifier", "text": "String* ", "parent": 18, "children": [], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 35}}, {"id": 20, "type": "pointer_declarator", "text": "title;\n", "parent": 18, "children": [21, 22], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 42}}, {"id": 21, "type": "*", "text": "t", "parent": 20, "children": [], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 36}}, {"id": 22, "type": "identifier", "text": "tle;\n", "parent": 20, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 42}}, {"id": 23, "type": "ERROR", "text": "r", "parent": 6, "children": [24], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 24, "type": "ERROR", "text": "r", "parent": 23, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 25, "type": "declaration", "text": "operty (nonatomic,copy) NSString* original_title;\n@", "parent": 6, "children": [26, 32, 34], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 52}}, {"id": 26, "type": "macro_type_specifier", "text": "operty (nonatomic,copy) N", "parent": 25, "children": [27, 28, 30], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 26}}, {"id": 27, "type": "identifier", "text": "operty (", "parent": 26, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 28, "type": "type_descriptor", "text": "natomic,c", "parent": 26, "children": [29], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 20}}, {"id": 29, "type": "type_identifier", "text": "natomic,c", "parent": 28, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 20}}, {"id": 30, "type": "ERROR", "text": "opy) ", "parent": 26, "children": [31], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 25}}, {"id": 31, "type": "identifier", "text": "py) ", "parent": 30, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 25}}, {"id": 32, "type": "ERROR", "text": "String* ", "parent": 25, "children": [33], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 35}}, {"id": 33, "type": "identifier", "text": "String* ", "parent": 32, "children": [], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 35}}, {"id": 34, "type": "pointer_declarator", "text": "original_title;\n", "parent": 25, "children": [35, 36], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 14, "column": 51}}, {"id": 35, "type": "*", "text": "o", "parent": 34, "children": [], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 14, "column": 36}}, {"id": 36, "type": "identifier", "text": "iginal_title;\n", "parent": 34, "children": [], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 51}}, {"id": 37, "type": "ERROR", "text": "r", "parent": 6, "children": [38], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 38, "type": "ERROR", "text": "r", "parent": 37, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 39, "type": "declaration", "text": "operty (nonatomic,copy) NSString* year;\n@", "parent": 6, "children": [40, 46, 48], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 42}}, {"id": 40, "type": "macro_type_specifier", "text": "operty (nonatomic,copy) N", "parent": 39, "children": [41, 42, 44], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 26}}, {"id": 41, "type": "identifier", "text": "operty (", "parent": 40, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 42, "type": "type_descriptor", "text": "natomic,c", "parent": 40, "children": [43], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 43, "type": "type_identifier", "text": "natomic,c", "parent": 42, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 44, "type": "ERROR", "text": "opy) ", "parent": 40, "children": [45], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 25}}, {"id": 45, "type": "identifier", "text": "py) ", "parent": 44, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 25}}, {"id": 46, "type": "ERROR", "text": "String* ", "parent": 39, "children": [47], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 35}}, {"id": 47, "type": "identifier", "text": "String* ", "parent": 46, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 35}}, {"id": 48, "type": "pointer_declarator", "text": "year;\n", "parent": 39, "children": [49, 50], "start_point": {"row": 15, "column": 35}, "end_point": {"row": 15, "column": 41}}, {"id": 49, "type": "*", "text": "y", "parent": 48, "children": [], "start_point": {"row": 15, "column": 35}, "end_point": {"row": 15, "column": 36}}, {"id": 50, "type": "identifier", "text": "ar;\n", "parent": 48, "children": [], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 41}}, {"id": 51, "type": "ERROR", "text": "r", "parent": 6, "children": [52], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 52, "type": "ERROR", "text": "r", "parent": 51, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 53, "type": "declaration", "text": "operty (nonatomic,strong) NSDictionary* image;\n@", "parent": 6, "children": [54, 60, 62], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 49}}, {"id": 54, "type": "macro_type_specifier", "text": "operty (nonatomic,strong) N", "parent": 53, "children": [55, 56, 58], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 28}}, {"id": 55, "type": "identifier", "text": "operty (", "parent": 54, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 9}}, {"id": 56, "type": "type_descriptor", "text": "natomic,s", "parent": 54, "children": [57], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 20}}, {"id": 57, "type": "type_identifier", "text": "natomic,s", "parent": 56, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 20}}, {"id": 58, "type": "ERROR", "text": "trong) ", "parent": 54, "children": [59], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 27}}, {"id": 59, "type": "identifier", "text": "rong) ", "parent": 58, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 27}}, {"id": 60, "type": "ERROR", "text": "Dictionary* ", "parent": 53, "children": [61], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 41}}, {"id": 61, "type": "identifier", "text": "Dictionary* ", "parent": 60, "children": [], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 41}}, {"id": 62, "type": "pointer_declarator", "text": "image;\n", "parent": 53, "children": [63, 64], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 48}}, {"id": 63, "type": "*", "text": "i", "parent": 62, "children": [], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 42}}, {"id": 64, "type": "identifier", "text": "age;\n", "parent": 62, "children": [], "start_point": {"row": 16, "column": 43}, "end_point": {"row": 16, "column": 48}}, {"id": 65, "type": "ERROR", "text": "r", "parent": 6, "children": [66], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 66, "type": "ERROR", "text": "r", "parent": 65, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 67, "type": "declaration", "text": "operty (nonatomic,copy) NSString* stars;\n@", "parent": 6, "children": [68, 74, 76], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 43}}, {"id": 68, "type": "macro_type_specifier", "text": "operty (nonatomic,copy) N", "parent": 67, "children": [69, 70, 72], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 26}}, {"id": 69, "type": "identifier", "text": "operty (", "parent": 68, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 9}}, {"id": 70, "type": "type_descriptor", "text": "natomic,c", "parent": 68, "children": [71], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 71, "type": "type_identifier", "text": "natomic,c", "parent": 70, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 20}}, {"id": 72, "type": "ERROR", "text": "opy) ", "parent": 68, "children": [73], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 25}}, {"id": 73, "type": "identifier", "text": "py) ", "parent": 72, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 25}}, {"id": 74, "type": "ERROR", "text": "String* ", "parent": 67, "children": [75], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 35}}, {"id": 75, "type": "identifier", "text": "String* ", "parent": 74, "children": [], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 35}}, {"id": 76, "type": "pointer_declarator", "text": "stars;\n", "parent": 67, "children": [77, 78], "start_point": {"row": 17, "column": 35}, "end_point": {"row": 17, "column": 42}}, {"id": 77, "type": "*", "text": "s", "parent": 76, "children": [], "start_point": {"row": 17, "column": 35}, "end_point": {"row": 17, "column": 36}}, {"id": 78, "type": "identifier", "text": "ars;\n", "parent": 76, "children": [], "start_point": {"row": 17, "column": 37}, "end_point": {"row": 17, "column": 42}}, {"id": 79, "type": "ERROR", "text": "r", "parent": 6, "children": [80], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 80, "type": "ERROR", "text": "r", "parent": 79, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 81, "type": "declaration", "text": "operty (nonatomic,assign)float average;\n@", "parent": 6, "children": [82, 88, 90], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 42}}, {"id": 82, "type": "macro_type_specifier", "text": "operty (nonatomic,assign)fl", "parent": 81, "children": [83, 84, 86], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 28}}, {"id": 83, "type": "identifier", "text": "operty (", "parent": 82, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 9}}, {"id": 84, "type": "type_descriptor", "text": "natomic,a", "parent": 82, "children": [85], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 20}}, {"id": 85, "type": "type_identifier", "text": "natomic,a", "parent": 84, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 20}}, {"id": 86, "type": "ERROR", "text": "ssign)f", "parent": 82, "children": [87], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 27}}, {"id": 87, "type": "identifier", "text": "sign)f", "parent": 86, "children": [], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 27}}, {"id": 88, "type": "ERROR", "text": "oat a", "parent": 81, "children": [89], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 33}}, {"id": 89, "type": "identifier", "text": "oat a", "parent": 88, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 33}}, {"id": 90, "type": "identifier", "text": "erage;\n", "parent": 81, "children": [], "start_point": {"row": 18, "column": 34}, "end_point": {"row": 18, "column": 41}}, {"id": 91, "type": "ERROR", "text": "r", "parent": 6, "children": [92], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 92, "type": "ERROR", "text": "r", "parent": 91, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 93, "type": "declaration", "text": "operty (nonatomic,assign)NSInteger type;\n\n", "parent": 6, "children": [94, 100, 101], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 43}}, {"id": 94, "type": "macro_type_specifier", "text": "operty (nonatomic,assign)NS", "parent": 93, "children": [95, 96, 98], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 28}}, {"id": 95, "type": "identifier", "text": "operty (", "parent": 94, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 9}}, {"id": 96, "type": "type_descriptor", "text": "natomic,a", "parent": 94, "children": [97], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 20}}, {"id": 97, "type": "type_identifier", "text": "natomic,a", "parent": 96, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 20}}, {"id": 98, "type": "ERROR", "text": "ssign)N", "parent": 94, "children": [99], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 27}}, {"id": 99, "type": "identifier", "text": "sign)N", "parent": 98, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 27}}, {"id": 100, "type": "identifier", "text": "Integer t", "parent": 93, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 37}}, {"id": 101, "type": "ERROR", "text": "pe;\n", "parent": 93, "children": [102], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 42}}, {"id": 102, "type": "identifier", "text": "pe;\n", "parent": 101, "children": [], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 42}}, {"id": 103, "type": "ERROR", "text": "n", "parent": 6, "children": [104], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 104, "type": "ERROR", "text": "n", "parent": 103, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 105, "type": "identifier", "text": "d\n", "parent": 6, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 4}}]}, "node_categories": {"declarations": {"functions": [9], "variables": [18, 25, 39, 53, 67, 81, 93], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [8, 10, 12, 14, 16, 17, 19, 22, 26, 27, 29, 31, 33, 36, 40, 41, 43, 45, 47, 50, 54, 55, 57, 59, 61, 64, 68, 69, 71, 73, 75, 78, 82, 83, 85, 87, 89, 90, 94, 95, 97, 99, 100, 102, 105], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "vieModel : NSObject\n\n@property (nonatomic,copy) N"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// MovieModel.h\n// Mtime\n//\n// Created by <NAME> on 20/7/15.\n// Copyright (c) 2015\u5e74 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n@interface MovieModel : NSObject\n\n@property (nonatomic,copy) NSString* title;\n@property (nonatomic,copy) NSString* original_title;\n@property (nonatomic,copy) NSString* year;\n@property (nonatomic,strong) NSDictionary* image;\n@property (nonatomic,copy) NSString* stars;\n@property (nonatomic,assign)float average;\n@property (nonatomic,assign)NSInteger type;\n\n\n@end\n"}
80,988
c
#pragma once #include "oxygine_include.h" #include "math/Color.h" #include <string> namespace oxygine { class Font; class TextStyle { public: enum HorizontalAlign { HALIGN_DEFAULT, HALIGN_LEFT, HALIGN_CENTER, HALIGN_RIGHT }; enum VerticalAlign { VALIGN_DEFAULT, VALIGN_BASELINE, VALIGN_TOP, VALIGN_MIDDLE, VALIGN_BOTTOM }; TextStyle():font(0), hAlign(HALIGN_DEFAULT), vAlign(VALIGN_DEFAULT), linesOffset(0), kerning(0), multiline(false), fontSize2Scale(0){} Font *font; HorizontalAlign hAlign; VerticalAlign vAlign; int linesOffset;//distance offset between lines int kerning; bool multiline; Color color; int fontSize2Scale; }; std::string dumpStyle(const TextStyle &s, bool onlydiff); }
16.89
44
(translation_unit) "#pragma once\n#include "oxygine_include.h"\n#include "math/Color.h"\n#include <string>\n\nnamespace oxygine\n{\n class Font;\n class TextStyle\n {\n public:\n enum HorizontalAlign\n {\n HALIGN_DEFAULT,\n HALIGN_LEFT, \n HALIGN_CENTER, \n HALIGN_RIGHT\n };\n\n enum VerticalAlign\n {\n VALIGN_DEFAULT,\n VALIGN_BASELINE,\n VALIGN_TOP,\n VALIGN_MIDDLE, \n VALIGN_BOTTOM\n };\n\n\n TextStyle():font(0), \n hAlign(HALIGN_DEFAULT),\n vAlign(VALIGN_DEFAULT), \n linesOffset(0), \n kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font;\n\n HorizontalAlign hAlign;\n VerticalAlign vAlign;\n\n int linesOffset;//distance offset between lines \n int kerning;\n bool multiline;\n Color color;\n int fontSize2Scale;\n };\n\n std::string dumpStyle(const TextStyle &s, bool onlydiff);\n}" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "oxygine_include.h"\n" (#include) "#include" (string_literal) ""oxygine_include.h"" (") """ (string_content) "oxygine_include.h" (") """ (preproc_include) "#include "math/Color.h"\n" (#include) "#include" (string_literal) ""math/Color.h"" (") """ (string_content) "math/Color.h" (") """ (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (function_definition) "namespace oxygine\n{\n class Font;\n class TextStyle\n {\n public:\n enum HorizontalAlign\n {\n HALIGN_DEFAULT,\n HALIGN_LEFT, \n HALIGN_CENTER, \n HALIGN_RIGHT\n };\n\n enum VerticalAlign\n {\n VALIGN_DEFAULT,\n VALIGN_BASELINE,\n VALIGN_TOP,\n VALIGN_MIDDLE, \n VALIGN_BOTTOM\n };\n\n\n TextStyle():font(0), \n hAlign(HALIGN_DEFAULT),\n vAlign(VALIGN_DEFAULT), \n linesOffset(0), \n kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font;\n\n HorizontalAlign hAlign;\n VerticalAlign vAlign;\n\n int linesOffset;//distance offset between lines \n int kerning;\n bool multiline;\n Color color;\n int fontSize2Scale;\n };\n\n std::string dumpStyle(const TextStyle &s, bool onlydiff);\n}" (type_identifier) "namespace" (identifier) "oxygine" (compound_statement) "{\n class Font;\n class TextStyle\n {\n public:\n enum HorizontalAlign\n {\n HALIGN_DEFAULT,\n HALIGN_LEFT, \n HALIGN_CENTER, \n HALIGN_RIGHT\n };\n\n enum VerticalAlign\n {\n VALIGN_DEFAULT,\n VALIGN_BASELINE,\n VALIGN_TOP,\n VALIGN_MIDDLE, \n VALIGN_BOTTOM\n };\n\n\n TextStyle():font(0), \n hAlign(HALIGN_DEFAULT),\n vAlign(VALIGN_DEFAULT), \n linesOffset(0), \n kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font;\n\n HorizontalAlign hAlign;\n VerticalAlign vAlign;\n\n int linesOffset;//distance offset between lines \n int kerning;\n bool multiline;\n Color color;\n int fontSize2Scale;\n };\n\n std::string dumpStyle(const TextStyle &s, bool onlydiff);\n}" ({) "{" (declaration) "class Font;" (type_identifier) "class" (identifier) "Font" (;) ";" (function_definition) "class TextStyle\n {\n public:\n enum HorizontalAlign\n {\n HALIGN_DEFAULT,\n HALIGN_LEFT, \n HALIGN_CENTER, \n HALIGN_RIGHT\n };\n\n enum VerticalAlign\n {\n VALIGN_DEFAULT,\n VALIGN_BASELINE,\n VALIGN_TOP,\n VALIGN_MIDDLE, \n VALIGN_BOTTOM\n };\n\n\n TextStyle():font(0), \n hAlign(HALIGN_DEFAULT),\n vAlign(VALIGN_DEFAULT), \n linesOffset(0), \n kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font;\n\n HorizontalAlign hAlign;\n VerticalAlign vAlign;\n\n int linesOffset;//distance offset between lines \n int kerning;\n bool multiline;\n Color color;\n int fontSize2Scale;\n }" (type_identifier) "class" (identifier) "TextStyle" (compound_statement) "{\n public:\n enum HorizontalAlign\n {\n HALIGN_DEFAULT,\n HALIGN_LEFT, \n HALIGN_CENTER, \n HALIGN_RIGHT\n };\n\n enum VerticalAlign\n {\n VALIGN_DEFAULT,\n VALIGN_BASELINE,\n VALIGN_TOP,\n VALIGN_MIDDLE, \n VALIGN_BOTTOM\n };\n\n\n TextStyle():font(0), \n hAlign(HALIGN_DEFAULT),\n vAlign(VALIGN_DEFAULT), \n linesOffset(0), \n kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font;\n\n HorizontalAlign hAlign;\n VerticalAlign vAlign;\n\n int linesOffset;//distance offset between lines \n int kerning;\n bool multiline;\n Color color;\n int fontSize2Scale;\n }" ({) "{" (labeled_statement) "public:\n enum HorizontalAlign\n {\n HALIGN_DEFAULT,\n HALIGN_LEFT, \n HALIGN_CENTER, \n HALIGN_RIGHT\n };" (statement_identifier) "public" (:) ":" (declaration) "enum HorizontalAlign\n {\n HALIGN_DEFAULT,\n HALIGN_LEFT, \n HALIGN_CENTER, \n HALIGN_RIGHT\n };" (enum_specifier) "enum HorizontalAlign\n {\n HALIGN_DEFAULT,\n HALIGN_LEFT, \n HALIGN_CENTER, \n HALIGN_RIGHT\n }" (enum) "enum" (type_identifier) "HorizontalAlign" (enumerator_list) "{\n HALIGN_DEFAULT,\n HALIGN_LEFT, \n HALIGN_CENTER, \n HALIGN_RIGHT\n }" ({) "{" (enumerator) "HALIGN_DEFAULT" (identifier) "HALIGN_DEFAULT" (,) "," (enumerator) "HALIGN_LEFT" (identifier) "HALIGN_LEFT" (,) "," (enumerator) "HALIGN_CENTER" (identifier) "HALIGN_CENTER" (,) "," (enumerator) "HALIGN_RIGHT" (identifier) "HALIGN_RIGHT" (}) "}" (identifier) "" (;) ";" (enum_specifier) "enum VerticalAlign\n {\n VALIGN_DEFAULT,\n VALIGN_BASELINE,\n VALIGN_TOP,\n VALIGN_MIDDLE, \n VALIGN_BOTTOM\n }" (enum) "enum" (type_identifier) "VerticalAlign" (enumerator_list) "{\n VALIGN_DEFAULT,\n VALIGN_BASELINE,\n VALIGN_TOP,\n VALIGN_MIDDLE, \n VALIGN_BOTTOM\n }" ({) "{" (enumerator) "VALIGN_DEFAULT" (identifier) "VALIGN_DEFAULT" (,) "," (enumerator) "VALIGN_BASELINE" (identifier) "VALIGN_BASELINE" (,) "," (enumerator) "VALIGN_TOP" (identifier) "VALIGN_TOP" (,) "," (enumerator) "VALIGN_MIDDLE" (identifier) "VALIGN_MIDDLE" (,) "," (enumerator) "VALIGN_BOTTOM" (identifier) "VALIGN_BOTTOM" (}) "}" (;) ";" (ERROR) "TextStyle():" (call_expression) "TextStyle()" (identifier) "TextStyle" (argument_list) "()" (() "(" ()) ")" (:) ":" (expression_statement) "font(0), \n hAlign(HALIGN_DEFAULT),\n vAlign(VALIGN_DEFAULT), \n linesOffset(0), \n kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font;" (comma_expression) "font(0), \n hAlign(HALIGN_DEFAULT),\n vAlign(VALIGN_DEFAULT), \n linesOffset(0), \n kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font" (call_expression) "font(0)" (identifier) "font" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (,) "," (comma_expression) "hAlign(HALIGN_DEFAULT),\n vAlign(VALIGN_DEFAULT), \n linesOffset(0), \n kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font" (call_expression) "hAlign(HALIGN_DEFAULT)" (identifier) "hAlign" (argument_list) "(HALIGN_DEFAULT)" (() "(" (identifier) "HALIGN_DEFAULT" ()) ")" (,) "," (comma_expression) "vAlign(VALIGN_DEFAULT), \n linesOffset(0), \n kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font" (call_expression) "vAlign(VALIGN_DEFAULT)" (identifier) "vAlign" (argument_list) "(VALIGN_DEFAULT)" (() "(" (identifier) "VALIGN_DEFAULT" ()) ")" (,) "," (comma_expression) "linesOffset(0), \n kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font" (call_expression) "linesOffset(0)" (identifier) "linesOffset" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (,) "," (comma_expression) "kerning(0),\n multiline(false),\n fontSize2Scale(0){}\n\n Font *font" (call_expression) "kerning(0)" (identifier) "kerning" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (,) "," (comma_expression) "multiline(false),\n fontSize2Scale(0){}\n\n Font *font" (call_expression) "multiline(false)" (identifier) "multiline" (argument_list) "(false)" (() "(" (false) "false" ()) ")" (,) "," (ERROR) "fontSize2Scale(0){}" (call_expression) "fontSize2Scale(0)" (identifier) "fontSize2Scale" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" ({) "{" (}) "}" (binary_expression) "Font *font" (identifier) "Font" (*) "*" (identifier) "font" (;) ";" (declaration) "HorizontalAlign hAlign;" (type_identifier) "HorizontalAlign" (identifier) "hAlign" (;) ";" (declaration) "VerticalAlign vAlign;" (type_identifier) "VerticalAlign" (identifier) "vAlign" (;) ";" (declaration) "int linesOffset;" (primitive_type) "int" (identifier) "linesOffset" (;) ";" (comment) "//distance offset between lines " (declaration) "int kerning;" (primitive_type) "int" (identifier) "kerning" (;) ";" (declaration) "bool multiline;" (primitive_type) "bool" (identifier) "multiline" (;) ";" (declaration) "Color color;" (type_identifier) "Color" (identifier) "color" (;) ";" (declaration) "int fontSize2Scale;" (primitive_type) "int" (identifier) "fontSize2Scale" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (labeled_statement) "std::string dumpStyle(const TextStyle &s, bool onlydiff);" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string dumpStyle(const TextStyle &s, bool onlydiff);" (type_identifier) "string" (function_declarator) "dumpStyle(const TextStyle &s, bool onlydiff)" (identifier) "dumpStyle" (parameter_list) "(const TextStyle &s, bool onlydiff)" (() "(" (parameter_declaration) "const TextStyle &s" (type_qualifier) "const" (const) "const" (type_identifier) "TextStyle" (ERROR) "&" (&) "&" (identifier) "s" (,) "," (parameter_declaration) "bool onlydiff" (primitive_type) "bool" (identifier) "onlydiff" ()) ")" (;) ";" (}) "}"
204
4
{"language": "c", "success": true, "metadata": {"lines": 44, "avg_line_length": 16.89, "nodes": 125, "errors": 0, "source_hash": "2f3e465f6f98adeef7cb64f89d68259ddc551e82e9340276805ec7a18e2dd67a", "categorized_nodes": 103}, "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 \"oxygine_include.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": "\"oxygine_include.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 28}}, {"id": 6, "type": "preproc_include", "text": "#include \"math/Color.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": "\"math/Color.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "#include <string>\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": "<string>", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 12, "type": "function_definition", "text": "namespace oxygine\n{\n\tclass Font;\n\tclass TextStyle\n\t{\n\tpublic:\n\t\tenum HorizontalAlign\n\t\t{\n\t\t\tHALIGN_DEFAULT,\n\t\t\tHALIGN_LEFT, \n\t\t\tHALIGN_CENTER, \n\t\t\tHALIGN_RIGHT\n\t\t};\n\n\t\tenum VerticalAlign\n\t\t{\n\t\t\tVALIGN_DEFAULT,\n\t\t\tVALIGN_BASELINE,\n\t\t\tVALIGN_TOP,\n\t\t\tVALIGN_MIDDLE, \n\t\t\tVALIGN_BOTTOM\n\t\t};\n\n\n\t\tTextStyle():font(0), \n\t\t\thAlign(HALIGN_DEFAULT),\n\t\t\tvAlign(VALIGN_DEFAULT), \n\t\t\tlinesOffset(0), \n\t\t\tkerning(0),\n multiline(false),\n\t\t\tfontSize2Scale(0){}\n\n\t\tFont *font;\n\n\t\tHorizontalAlign hAlign;\n\t\tVerticalAlign vAlign;\n\n\t\tint linesOffset;//distance offset between lines \n\t\tint kerning;\n\t\tbool multiline;\n\t\tColor color;\n\t\tint fontSize2Scale;\n\t};\n\n\tstd::string dumpStyle(const TextStyle &s, bool onlydiff);\n}", "parent": null, "children": [13, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 9}}, {"id": 14, "type": "identifier", "text": "oxygine", "parent": 12, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 17}}, {"id": 15, "type": "declaration", "text": "class Font;", "parent": 12, "children": [16], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 12}}, {"id": 16, "type": "identifier", "text": "Font", "parent": 15, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 11}}, {"id": 17, "type": "function_definition", "text": "class TextStyle\n\t{\n\tpublic:\n\t\tenum HorizontalAlign\n\t\t{\n\t\t\tHALIGN_DEFAULT,\n\t\t\tHALIGN_LEFT, \n\t\t\tHALIGN_CENTER, \n\t\t\tHALIGN_RIGHT\n\t\t};\n\n\t\tenum VerticalAlign\n\t\t{\n\t\t\tVALIGN_DEFAULT,\n\t\t\tVALIGN_BASELINE,\n\t\t\tVALIGN_TOP,\n\t\t\tVALIGN_MIDDLE, \n\t\t\tVALIGN_BOTTOM\n\t\t};\n\n\n\t\tTextStyle():font(0), \n\t\t\thAlign(HALIGN_DEFAULT),\n\t\t\tvAlign(VALIGN_DEFAULT), \n\t\t\tlinesOffset(0), \n\t\t\tkerning(0),\n multiline(false),\n\t\t\tfontSize2Scale(0){}\n\n\t\tFont *font;\n\n\t\tHorizontalAlign hAlign;\n\t\tVerticalAlign vAlign;\n\n\t\tint linesOffset;//distance offset between lines \n\t\tint kerning;\n\t\tbool multiline;\n\t\tColor color;\n\t\tint fontSize2Scale;\n\t}", "parent": 12, "children": [18], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 47, "column": 2}}, {"id": 18, "type": "identifier", "text": "TextStyle", "parent": 17, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 16}}, {"id": 19, "type": "labeled_statement", "text": "public:\n\t\tenum HorizontalAlign\n\t\t{\n\t\t\tHALIGN_DEFAULT,\n\t\t\tHALIGN_LEFT, \n\t\t\tHALIGN_CENTER, \n\t\t\tHALIGN_RIGHT\n\t\t};", "parent": 17, "children": [20], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 17, "column": 4}}, {"id": 20, "type": "declaration", "text": "enum HorizontalAlign\n\t\t{\n\t\t\tHALIGN_DEFAULT,\n\t\t\tHALIGN_LEFT, \n\t\t\tHALIGN_CENTER, \n\t\t\tHALIGN_RIGHT\n\t\t};", "parent": 19, "children": [21, 33], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 17, "column": 4}}, {"id": 21, "type": "enum_specifier", "text": "enum HorizontalAlign\n\t\t{\n\t\t\tHALIGN_DEFAULT,\n\t\t\tHALIGN_LEFT, \n\t\t\tHALIGN_CENTER, \n\t\t\tHALIGN_RIGHT\n\t\t}", "parent": 20, "children": [22, 23, 24], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 17, "column": 3}}, {"id": 22, "type": "enum", "text": "enum", "parent": 21, "children": [], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 6}}, {"id": 23, "type": "type_identifier", "text": "HorizontalAlign", "parent": 21, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 22}}, {"id": 24, "type": "enumerator_list", "text": "{\n\t\t\tHALIGN_DEFAULT,\n\t\t\tHALIGN_LEFT, \n\t\t\tHALIGN_CENTER, \n\t\t\tHALIGN_RIGHT\n\t\t}", "parent": 21, "children": [25, 27, 29, 31], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 17, "column": 3}}, {"id": 25, "type": "enumerator", "text": "HALIGN_DEFAULT", "parent": 24, "children": [26], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 17}}, {"id": 26, "type": "identifier", "text": "HALIGN_DEFAULT", "parent": 25, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 17}}, {"id": 27, "type": "enumerator", "text": "HALIGN_LEFT", "parent": 24, "children": [28], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 14}}, {"id": 28, "type": "identifier", "text": "HALIGN_LEFT", "parent": 27, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 14}}, {"id": 29, "type": "enumerator", "text": "HALIGN_CENTER", "parent": 24, "children": [30], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 16}}, {"id": 30, "type": "identifier", "text": "HALIGN_CENTER", "parent": 29, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 16}}, {"id": 31, "type": "enumerator", "text": "HALIGN_RIGHT", "parent": 24, "children": [32], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 15}}, {"id": 32, "type": "identifier", "text": "HALIGN_RIGHT", "parent": 31, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 15}}, {"id": 33, "type": "identifier", "text": "", "parent": 20, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 3}}, {"id": 34, "type": "enum_specifier", "text": "enum VerticalAlign\n\t\t{\n\t\t\tVALIGN_DEFAULT,\n\t\t\tVALIGN_BASELINE,\n\t\t\tVALIGN_TOP,\n\t\t\tVALIGN_MIDDLE, \n\t\t\tVALIGN_BOTTOM\n\t\t}", "parent": 17, "children": [35, 36, 37], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 26, "column": 3}}, {"id": 35, "type": "enum", "text": "enum", "parent": 34, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 6}}, {"id": 36, "type": "type_identifier", "text": "VerticalAlign", "parent": 34, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 20}}, {"id": 37, "type": "enumerator_list", "text": "{\n\t\t\tVALIGN_DEFAULT,\n\t\t\tVALIGN_BASELINE,\n\t\t\tVALIGN_TOP,\n\t\t\tVALIGN_MIDDLE, \n\t\t\tVALIGN_BOTTOM\n\t\t}", "parent": 34, "children": [38, 40, 42, 44, 46], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 26, "column": 3}}, {"id": 38, "type": "enumerator", "text": "VALIGN_DEFAULT", "parent": 37, "children": [39], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 17}}, {"id": 39, "type": "identifier", "text": "VALIGN_DEFAULT", "parent": 38, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 17}}, {"id": 40, "type": "enumerator", "text": "VALIGN_BASELINE", "parent": 37, "children": [41], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 18}}, {"id": 41, "type": "identifier", "text": "VALIGN_BASELINE", "parent": 40, "children": [], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 18}}, {"id": 42, "type": "enumerator", "text": "VALIGN_TOP", "parent": 37, "children": [43], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 13}}, {"id": 43, "type": "identifier", "text": "VALIGN_TOP", "parent": 42, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 13}}, {"id": 44, "type": "enumerator", "text": "VALIGN_MIDDLE", "parent": 37, "children": [45], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 16}}, {"id": 45, "type": "identifier", "text": "VALIGN_MIDDLE", "parent": 44, "children": [], "start_point": {"row": 24, "column": 3}, "end_point": {"row": 24, "column": 16}}, {"id": 46, "type": "enumerator", "text": "VALIGN_BOTTOM", "parent": 37, "children": [47], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 16}}, {"id": 47, "type": "identifier", "text": "VALIGN_BOTTOM", "parent": 46, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 16}}, {"id": 48, "type": "ERROR", "text": "TextStyle():", "parent": 17, "children": [49], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 14}}, {"id": 49, "type": "call_expression", "text": "TextStyle()", "parent": 48, "children": [50, 51], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 13}}, {"id": 50, "type": "identifier", "text": "TextStyle", "parent": 49, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 11}}, {"id": 51, "type": "argument_list", "text": "()", "parent": 49, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 13}}, {"id": 52, "type": "comma_expression", "text": "font(0), \n\t\t\thAlign(HALIGN_DEFAULT),\n\t\t\tvAlign(VALIGN_DEFAULT), \n\t\t\tlinesOffset(0), \n\t\t\tkerning(0),\n multiline(false),\n\t\t\tfontSize2Scale(0){}\n\n\t\tFont *font", "parent": 17, "children": [53, 57], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 37, "column": 12}}, {"id": 53, "type": "call_expression", "text": "font(0)", "parent": 52, "children": [54, 55], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 21}}, {"id": 54, "type": "identifier", "text": "font", "parent": 53, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 18}}, {"id": 55, "type": "argument_list", "text": "(0)", "parent": 53, "children": [56], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 21}}, {"id": 56, "type": "number_literal", "text": "0", "parent": 55, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 20}}, {"id": 57, "type": "comma_expression", "text": "hAlign(HALIGN_DEFAULT),\n\t\t\tvAlign(VALIGN_DEFAULT), \n\t\t\tlinesOffset(0), \n\t\t\tkerning(0),\n multiline(false),\n\t\t\tfontSize2Scale(0){}\n\n\t\tFont *font", "parent": 52, "children": [58, 62], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 37, "column": 12}}, {"id": 58, "type": "call_expression", "text": "hAlign(HALIGN_DEFAULT)", "parent": 57, "children": [59, 60], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 25}}, {"id": 59, "type": "identifier", "text": "hAlign", "parent": 58, "children": [], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 9}}, {"id": 60, "type": "argument_list", "text": "(HALIGN_DEFAULT)", "parent": 58, "children": [61], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 25}}, {"id": 61, "type": "identifier", "text": "HALIGN_DEFAULT", "parent": 60, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 24}}, {"id": 62, "type": "comma_expression", "text": "vAlign(VALIGN_DEFAULT), \n\t\t\tlinesOffset(0), \n\t\t\tkerning(0),\n multiline(false),\n\t\t\tfontSize2Scale(0){}\n\n\t\tFont *font", "parent": 57, "children": [63, 67], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 37, "column": 12}}, {"id": 63, "type": "call_expression", "text": "vAlign(VALIGN_DEFAULT)", "parent": 62, "children": [64, 65], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 25}}, {"id": 64, "type": "identifier", "text": "vAlign", "parent": 63, "children": [], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 9}}, {"id": 65, "type": "argument_list", "text": "(VALIGN_DEFAULT)", "parent": 63, "children": [66], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 25}}, {"id": 66, "type": "identifier", "text": "VALIGN_DEFAULT", "parent": 65, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 24}}, {"id": 67, "type": "comma_expression", "text": "linesOffset(0), \n\t\t\tkerning(0),\n multiline(false),\n\t\t\tfontSize2Scale(0){}\n\n\t\tFont *font", "parent": 62, "children": [68, 72], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 37, "column": 12}}, {"id": 68, "type": "call_expression", "text": "linesOffset(0)", "parent": 67, "children": [69, 70], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 32, "column": 17}}, {"id": 69, "type": "identifier", "text": "linesOffset", "parent": 68, "children": [], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 32, "column": 14}}, {"id": 70, "type": "argument_list", "text": "(0)", "parent": 68, "children": [71], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 17}}, {"id": 71, "type": "number_literal", "text": "0", "parent": 70, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 16}}, {"id": 72, "type": "comma_expression", "text": "kerning(0),\n multiline(false),\n\t\t\tfontSize2Scale(0){}\n\n\t\tFont *font", "parent": 67, "children": [73, 77], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 37, "column": 12}}, {"id": 73, "type": "call_expression", "text": "kerning(0)", "parent": 72, "children": [74, 75], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 13}}, {"id": 74, "type": "identifier", "text": "kerning", "parent": 73, "children": [], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 10}}, {"id": 75, "type": "argument_list", "text": "(0)", "parent": 73, "children": [76], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 13}}, {"id": 76, "type": "number_literal", "text": "0", "parent": 75, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 12}}, {"id": 77, "type": "comma_expression", "text": "multiline(false),\n\t\t\tfontSize2Scale(0){}\n\n\t\tFont *font", "parent": 72, "children": [78, 82, 87], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 37, "column": 12}}, {"id": 78, "type": "call_expression", "text": "multiline(false)", "parent": 77, "children": [79, 80], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 28}}, {"id": 79, "type": "identifier", "text": "multiline", "parent": 78, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 21}}, {"id": 80, "type": "argument_list", "text": "(false)", "parent": 78, "children": [81], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 28}}, {"id": 81, "type": "false", "text": "false", "parent": 80, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 27}}, {"id": 82, "type": "ERROR", "text": "fontSize2Scale(0){}", "parent": 77, "children": [83], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 22}}, {"id": 83, "type": "call_expression", "text": "fontSize2Scale(0)", "parent": 82, "children": [84, 85], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 20}}, {"id": 84, "type": "identifier", "text": "fontSize2Scale", "parent": 83, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 17}}, {"id": 85, "type": "argument_list", "text": "(0)", "parent": 83, "children": [86], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 20}}, {"id": 86, "type": "number_literal", "text": "0", "parent": 85, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 19}}, {"id": 87, "type": "binary_expression", "text": "Font *font", "parent": 77, "children": [88, 89, 90], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 12}}, {"id": 88, "type": "identifier", "text": "Font", "parent": 87, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 89, "type": "*", "text": "*", "parent": 87, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 8}}, {"id": 90, "type": "identifier", "text": "font", "parent": 87, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 12}}, {"id": 91, "type": "declaration", "text": "HorizontalAlign hAlign;", "parent": 17, "children": [92, 93], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 25}}, {"id": 92, "type": "type_identifier", "text": "HorizontalAlign", "parent": 91, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 17}}, {"id": 93, "type": "identifier", "text": "hAlign", "parent": 91, "children": [], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 24}}, {"id": 94, "type": "declaration", "text": "VerticalAlign vAlign;", "parent": 17, "children": [95, 96], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 23}}, {"id": 95, "type": "type_identifier", "text": "VerticalAlign", "parent": 94, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 15}}, {"id": 96, "type": "identifier", "text": "vAlign", "parent": 94, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 22}}, {"id": 97, "type": "declaration", "text": "int linesOffset;", "parent": 17, "children": [98, 99], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 18}}, {"id": 98, "type": "primitive_type", "text": "int", "parent": 97, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 5}}, {"id": 99, "type": "identifier", "text": "linesOffset", "parent": 97, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 17}}, {"id": 100, "type": "declaration", "text": "int kerning;", "parent": 17, "children": [101, 102], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 14}}, {"id": 101, "type": "primitive_type", "text": "int", "parent": 100, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 5}}, {"id": 102, "type": "identifier", "text": "kerning", "parent": 100, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 13}}, {"id": 103, "type": "declaration", "text": "bool multiline;", "parent": 17, "children": [104, 105], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 17}}, {"id": 104, "type": "primitive_type", "text": "bool", "parent": 103, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 6}}, {"id": 105, "type": "identifier", "text": "multiline", "parent": 103, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 16}}, {"id": 106, "type": "declaration", "text": "Color color;", "parent": 17, "children": [107, 108], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 14}}, {"id": 107, "type": "type_identifier", "text": "Color", "parent": 106, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 7}}, {"id": 108, "type": "identifier", "text": "color", "parent": 106, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 13}}, {"id": 109, "type": "declaration", "text": "int fontSize2Scale;", "parent": 17, "children": [110, 111], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 21}}, {"id": 110, "type": "primitive_type", "text": "int", "parent": 109, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 5}}, {"id": 111, "type": "identifier", "text": "fontSize2Scale", "parent": 109, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 20}}, {"id": 112, "type": "labeled_statement", "text": "std::string dumpStyle(const TextStyle &s, bool onlydiff);", "parent": 12, "children": [113, 114], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 58}}, {"id": 113, "type": "statement_identifier", "text": "std", "parent": 112, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 4}}, {"id": 114, "type": "declaration", "text": "string dumpStyle(const TextStyle &s, bool onlydiff);", "parent": 112, "children": [115, 116], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 58}}, {"id": 115, "type": "type_identifier", "text": "string", "parent": 114, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 12}}, {"id": 116, "type": "function_declarator", "text": "dumpStyle(const TextStyle &s, bool onlydiff)", "parent": 114, "children": [117, 118], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 57}}, {"id": 117, "type": "identifier", "text": "dumpStyle", "parent": 116, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 22}}, {"id": 118, "type": "parameter_list", "text": "(const TextStyle &s, bool onlydiff)", "parent": 116, "children": [119, 122], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 57}}, {"id": 119, "type": "parameter_declaration", "text": "const TextStyle &s", "parent": 118, "children": [120, 121], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 41}}, {"id": 120, "type": "type_identifier", "text": "TextStyle", "parent": 119, "children": [], "start_point": {"row": 49, "column": 29}, "end_point": {"row": 49, "column": 38}}, {"id": 121, "type": "identifier", "text": "s", "parent": 119, "children": [], "start_point": {"row": 49, "column": 40}, "end_point": {"row": 49, "column": 41}}, {"id": 122, "type": "parameter_declaration", "text": "bool onlydiff", "parent": 118, "children": [123, 124], "start_point": {"row": 49, "column": 43}, "end_point": {"row": 49, "column": 56}}, {"id": 123, "type": "primitive_type", "text": "bool", "parent": 122, "children": [], "start_point": {"row": 49, "column": 43}, "end_point": {"row": 49, "column": 47}}, {"id": 124, "type": "identifier", "text": "onlydiff", "parent": 122, "children": [], "start_point": {"row": 49, "column": 48}, "end_point": {"row": 49, "column": 56}}]}, "node_categories": {"declarations": {"functions": [12, 17, 116], "variables": [15, 20, 91, 94, 97, 100, 103, 106, 109, 114, 119, 122], "classes": [], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": [21, 22, 24, 25, 27, 29, 31, 34, 35, 37, 38, 40, 42, 44, 46]}, "statements": {"expressions": [49, 52, 53, 57, 58, 62, 63, 67, 68, 72, 73, 77, 78, 83, 87], "assignments": [], "loops": [], "conditionals": [13, 14, 16, 18, 23, 26, 28, 30, 32, 33, 36, 39, 41, 43, 45, 47, 50, 54, 59, 61, 64, 66, 69, 74, 79, 84, 88, 90, 92, 93, 95, 96, 99, 102, 105, 107, 108, 111, 113, 115, 117, 120, 121, 124], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 56, 71, 76, 86], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "Font;", "text_snippet": "namespace oxygine\n{\n\tclass Font;\n\tclass TextStyle\n\t{\n\tpublic:\n\t\tenum HorizontalAlign\n\t\t{\n\t\t\tHALIGN_D"}, {"node_id": 17, "universal_type": "function", "name": "TextStyle", "text_snippet": "class TextStyle\n\t{\n\tpublic:\n\t\tenum HorizontalAlign\n\t\t{\n\t\t\tHALIGN_DEFAULT,\n\t\t\tHALIGN_LEFT, \n\t\t\tHALIGN"}, {"node_id": 116, "universal_type": "function", "name": "onlydiff)", "text_snippet": "dumpStyle(const TextStyle &s, bool onlydiff)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"oxygine_include.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"math/Color.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <string>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#pragma once\n#include \"oxygine_include.h\"\n#include \"math/Color.h\"\n#include <string>\n\nnamespace oxygine\n{\n\tclass Font;\n\tclass TextStyle\n\t{\n\tpublic:\n\t\tenum HorizontalAlign\n\t\t{\n\t\t\tHALIGN_DEFAULT,\n\t\t\tHALIGN_LEFT, \n\t\t\tHALIGN_CENTER, \n\t\t\tHALIGN_RIGHT\n\t\t};\n\n\t\tenum VerticalAlign\n\t\t{\n\t\t\tVALIGN_DEFAULT,\n\t\t\tVALIGN_BASELINE,\n\t\t\tVALIGN_TOP,\n\t\t\tVALIGN_MIDDLE, \n\t\t\tVALIGN_BOTTOM\n\t\t};\n\n\n\t\tTextStyle():font(0), \n\t\t\thAlign(HALIGN_DEFAULT),\n\t\t\tvAlign(VALIGN_DEFAULT), \n\t\t\tlinesOffset(0), \n\t\t\tkerning(0),\n multiline(false),\n\t\t\tfontSize2Scale(0){}\n\n\t\tFont *font;\n\n\t\tHorizontalAlign hAlign;\n\t\tVerticalAlign vAlign;\n\n\t\tint linesOffset;//distance offset between lines \n\t\tint kerning;\n\t\tbool multiline;\n\t\tColor color;\n\t\tint fontSize2Scale;\n\t};\n\n\tstd::string dumpStyle(const TextStyle &s, bool onlydiff);\n}"}
80,989
c
// // WFShareWechatView.h // WFKit // // Created by 王宇 on 2019/10/22. // Copyright © 2019 王宇. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface WFShareWechatView : UIView <UIGestureRecognizerDelegate> /// 商品信息 @property (nonatomic, strong) NSDictionary *dict; /// 初始化 + (WFShareWechatView *)shareInstace; @end NS_ASSUME_NONNULL_END
20.76
17
(translation_unit) "//\n// WFShareWechatView.h\n// WFKit\n//\n// Created by 王宇 on 2019/10/22.\n// Copyright © 2019 王宇. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface WFShareWechatView : UIView <UIGestureRecognizerDelegate>\n/// 商品信息\n@property (nonatomic, strong) NSDictionary *dict;\n/// 初始化\n+ (WFShareWechatView *)shareInstace;\n\n\n@end\n\nNS_ASSUME_NONNULL_END\n" (comment) "//" (comment) "// WFShareWechatView.h" (comment) "// WFKit" (comment) "//" (comment) "// Created by 王宇 on 2019/10/22.\n// " (comment) "Copyright © 2019 王宇. All rights reserved.\n//\n\n#imp" (comment) "rt" (preproc_call) "UIKit/UIKit.h>\n\nNS_ASSUM" (preproc_directive) "UIKit/U" (preproc_arg) "Kit.h>\n\nNS_ASSU" (declaration) "_NONNULL_BEGIN\n\n@interface WFShareW" (type_identifier) "_NONNULL_BEGIN\n\n@interf" (ERROR) "e" (ERROR) "e" (identifier) " WFShareW" (;) "" (labeled_statement) "chatView : UIView <UIGestureRecognizerDelegate>\n/// 商品信息\n@property (nonatomic, strong) NSDictionary *dict;\n/// 初始化\n+ (WFSha" (statement_identifier) "chatView : UIView" (:) "<" (expression_statement) "IGestureRecognizerDelegate>\n/// 商品信息\n@property (nonatomic, strong) NSDictionary *dict;\n/// 初始化\n+ (WFSha" (binary_expression) "IGestureRecognizerDelegate>\n/// 商品信息\n@property (nonatomic, strong) NSDictionary *dict;\n/// 初始化\n+ (WFSh" (binary_expression) "IGestureRecognizerDelegate>\n/// 商品信" (identifier) "IGestu" (<) "e" (identifier) "RecognizerDelegate>\n/// 商品信" (>) "息" (comment) "@property (nonat" (ERROR) "mic, strong) NSDictionary *di" (ERROR) "m" (call_expression) "ic, strong) NSDictionary *di" (identifier) "ic, stro" (argument_list) "g) NSDictionary *di" (() "g" (identifier) ") NSDicti" (,) "o" (identifier) "ary *d" ()) "i" (binary_expression) "t;\n/// 初始化\n+ (WFSh" (identifier) "t;\n/// 初始化\n+" (*) "(" (identifier) "WFSh" (;) "a" (comment) "eWechatView *" (expression_statement) "shareInstace;\n\n\n@end\n\nNS_ASSUME_NONN" (unary_expression) "shareInstace;\n\n\n@end\n\nNS_ASSUME_NON" (+) "s" (cast_expression) "areInstace;\n\n\n@end\n\nNS_ASSUME_NON" (() "a" (type_descriptor) "reInstace;\n\n\n@end\n\n" (type_identifier) "reInstace;\n\n\n@end" (abstract_pointer_declarator) "\n" (*) "\n" ()) "N" (identifier) "S_ASSUME_NON" (;) "N" (ERROR) "_" (ERROR) "_" (declaration) "END\n" (type_identifier) "END" (identifier) "" (;) ""
62
6
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 20.76, "nodes": 39, "errors": 0, "source_hash": "1d4658b05a5c7faf7b0904fb413e032d760d1a1222f2410882c30a25caeb6624", "categorized_nodes": 23}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "UIKit/UIKit.h>\n\nNS_ASSUM", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "UIKit/U", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "Kit.h>\n\nNS_ASSU", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "declaration", "text": "_NONNULL_BEGIN\n\n@interface WFShareW", "parent": null, "children": [4, 5, 7], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 10}}, {"id": 4, "type": "type_identifier", "text": "_NONNULL_BEGIN\n\n@interf", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 23}}, {"id": 5, "type": "ERROR", "text": "e", "parent": 3, "children": [6], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 6, "type": "ERROR", "text": "e", "parent": 5, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 7, "type": "identifier", "text": " WFShareW", "parent": 3, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 10}}, {"id": 8, "type": "labeled_statement", "text": "chatView : UIView <UIGestureRecognizerDelegate>\n/// \u5546\u54c1\u4fe1\u606f\n@property (nonatomic, strong) NSDictionary *dict;\n/// \u521d\u59cb\u5316\n+ (WFSha", "parent": null, "children": [9], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 14, "column": 49}}, {"id": 9, "type": "statement_identifier", "text": "chatView : UIView", "parent": 8, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 28}}, {"id": 10, "type": "binary_expression", "text": "IGestureRecognizerDelegate>\n/// \u5546\u54c1\u4fe1\u606f\n@property (nonatomic, strong) NSDictionary *dict;\n/// \u521d\u59cb\u5316\n+ (WFSh", "parent": 8, "children": [11, 15, 16, 23], "start_point": {"row": 12, "column": 31}, "end_point": {"row": 14, "column": 48}}, {"id": 11, "type": "binary_expression", "text": "IGestureRecognizerDelegate>\n/// \u5546\u54c1\u4fe1", "parent": 10, "children": [12, 13, 14], "start_point": {"row": 12, "column": 31}, "end_point": {"row": 12, "column": 66}}, {"id": 12, "type": "identifier", "text": "IGestu", "parent": 11, "children": [], "start_point": {"row": 12, "column": 31}, "end_point": {"row": 12, "column": 37}}, {"id": 13, "type": "<", "text": "e", "parent": 11, "children": [], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 12, "column": 39}}, {"id": 14, "type": "identifier", "text": "RecognizerDelegate>\n/// \u5546\u54c1\u4fe1", "parent": 11, "children": [], "start_point": {"row": 12, "column": 39}, "end_point": {"row": 12, "column": 66}}, {"id": 15, "type": ">", "text": "\u606f", "parent": 10, "children": [], "start_point": {"row": 12, "column": 66}, "end_point": {"row": 12, "column": 67}}, {"id": 16, "type": "ERROR", "text": "mic, strong) NSDictionary *di", "parent": 10, "children": [17, 18], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 29}}, {"id": 17, "type": "ERROR", "text": "m", "parent": 16, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 18, "type": "call_expression", "text": "ic, strong) NSDictionary *di", "parent": 16, "children": [19, 20], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 29}}, {"id": 19, "type": "identifier", "text": "ic, stro", "parent": 18, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 20, "type": "argument_list", "text": "g) NSDictionary *di", "parent": 18, "children": [21, 22], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 29}}, {"id": 21, "type": "identifier", "text": ") NSDicti", "parent": 20, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 20}}, {"id": 22, "type": "identifier", "text": "ary *d", "parent": 20, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 28}}, {"id": 23, "type": "binary_expression", "text": "t;\n/// \u521d\u59cb\u5316\n+ (WFSh", "parent": 10, "children": [24, 25], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 48}}, {"id": 24, "type": "identifier", "text": "t;\n/// \u521d\u59cb\u5316\n+", "parent": 23, "children": [], "start_point": {"row": 14, "column": 30}, "end_point": {"row": 14, "column": 42}}, {"id": 25, "type": "identifier", "text": "WFSh", "parent": 23, "children": [], "start_point": {"row": 14, "column": 44}, "end_point": {"row": 14, "column": 48}}, {"id": 26, "type": "unary_expression", "text": "shareInstace;\n\n\n@end\n\nNS_ASSUME_NON", "parent": null, "children": [27, 28], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 35}}, {"id": 27, "type": "+", "text": "s", "parent": 26, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 28, "type": "cast_expression", "text": "areInstace;\n\n\n@end\n\nNS_ASSUME_NON", "parent": 26, "children": [29, 33], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 35}}, {"id": 29, "type": "type_descriptor", "text": "reInstace;\n\n\n@end\n\n", "parent": 28, "children": [30, 31], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 22}}, {"id": 30, "type": "type_identifier", "text": "reInstace;\n\n\n@end", "parent": 29, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 20}}, {"id": 31, "type": "abstract_pointer_declarator", "text": "\n", "parent": 29, "children": [32], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 22}}, {"id": 32, "type": "*", "text": "\n", "parent": 31, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 22}}, {"id": 33, "type": "identifier", "text": "S_ASSUME_NON", "parent": 28, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 35}}, {"id": 34, "type": "ERROR", "text": "_", "parent": null, "children": [35], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 35, "type": "ERROR", "text": "_", "parent": 34, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 36, "type": "declaration", "text": "END\n", "parent": null, "children": [37, 38], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 21, "column": 21}}, {"id": 37, "type": "type_identifier", "text": "END", "parent": 36, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 4}}, {"id": 38, "type": "identifier", "text": "", "parent": 36, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 21}}]}, "node_categories": {"declarations": {"functions": [], "variables": [3, 36], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 11, 18, 23, 26, 28], "assignments": [], "loops": [], "conditionals": [4, 7, 9, 12, 14, 19, 21, 22, 24, 25, 30, 33, 37, 38], "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// WFShareWechatView.h\n// WFKit\n//\n// Created by \u738b\u5b87 on 2019/10/22.\n// Copyright \u00a9 2019 \u738b\u5b87. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface WFShareWechatView : UIView <UIGestureRecognizerDelegate>\n/// \u5546\u54c1\u4fe1\u606f\n@property (nonatomic, strong) NSDictionary *dict;\n/// \u521d\u59cb\u5316\n+ (WFShareWechatView *)shareInstace;\n\n\n@end\n\nNS_ASSUME_NONNULL_END\n"}
80,990
c
#import <UIKit/UIKit.h> #import "GHRepository.h" @interface NetworkCell : UITableViewCell { GHRepository *repository; @private IBOutlet UILabel *name; IBOutlet UILabel *userName; IBOutlet UIImageView *iconView; } @property(nonatomic,retain)GHRepository *repository; @end
22.92
12
(translation_unit) "#import <UIKit/UIKit.h>\n#import "GHRepository.h"\n\n\n@interface NetworkCell : UITableViewCell {\n GHRepository *repository;\n @private \n IBOutlet UILabel *name;\n IBOutlet UILabel *userName;\n IBOutlet UIImageView *iconView;\n}\n\n@property(nonatomic,retain)GHRepository *repository;\n\n@end\n\n" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (preproc_call) "#import "GHRepository.h"\n" (preproc_directive) "#import" (preproc_arg) ""GHRepository.h"" (ERROR) "@" (ERROR) "@" (function_definition) "interface NetworkCell : UITableViewCell {\n GHRepository *repository;\n @private \n IBOutlet UILabel *name;\n IBOutlet UILabel *userName;\n IBOutlet UIImageView *iconView;\n}" (type_identifier) "interface" (ERROR) "NetworkCell :" (identifier) "NetworkCell" (:) ":" (identifier) "UITableViewCell" (compound_statement) "{\n GHRepository *repository;\n @private \n IBOutlet UILabel *name;\n IBOutlet UILabel *userName;\n IBOutlet UIImageView *iconView;\n}" ({) "{" (declaration) "GHRepository *repository;" (type_identifier) "GHRepository" (pointer_declarator) "*repository" (*) "*" (identifier) "repository" (;) ";" (ERROR) "@" (ERROR) "@" (declaration) "private \n IBOutlet" (type_identifier) "private" (identifier) "IBOutlet" (;) "" (declaration) "UILabel *name;" (type_identifier) "UILabel" (pointer_declarator) "*name" (*) "*" (identifier) "name" (;) ";" (declaration) "IBOutlet UILabel *userName;" (type_identifier) "IBOutlet" (ERROR) "UILabel" (identifier) "UILabel" (pointer_declarator) "*userName" (*) "*" (identifier) "userName" (;) ";" (declaration) "IBOutlet UIImageView" (type_identifier) "IBOutlet" (identifier) "UIImageView" (;) "" (expression_statement) "*iconView;" (pointer_expression) "*iconView" (*) "*" (identifier) "iconView" (;) ";" (}) "}" (ERROR) "@" (ERROR) "@" (expression_statement) "property(nonatomic,retain)" (call_expression) "property(nonatomic,retain)" (identifier) "property" (argument_list) "(nonatomic,retain)" (() "(" (identifier) "nonatomic" (,) "," (identifier) "retain" ()) ")" (;) "" (declaration) "GHRepository *repository;" (type_identifier) "GHRepository" (pointer_declarator) "*repository" (*) "*" (identifier) "repository" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
76
10
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 22.92, "nodes": 54, "errors": 0, "source_hash": "a89e121e3988e2c59e5f78bf838647bf711c367d0d1568940b3b406c0ad0facb", "categorized_nodes": 30}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <UIKit/UIKit.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "<UIKit/UIKit.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 23}}, {"id": 3, "type": "preproc_call", "text": "#import \"GHRepository.h\"\n", "parent": null, "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": "\"GHRepository.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 24}}, {"id": 6, "type": "ERROR", "text": "@", "parent": null, "children": [7], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 1}}, {"id": 7, "type": "ERROR", "text": "@", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 1}}, {"id": 8, "type": "function_definition", "text": "interface NetworkCell : UITableViewCell {\n\tGHRepository *repository;\n @private \n IBOutlet UILabel *name;\n IBOutlet UILabel *userName;\n \tIBOutlet UIImageView *iconView;\n}", "parent": null, "children": [9, 10, 12], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 10, "column": 1}}, {"id": 9, "type": "type_identifier", "text": "interface", "parent": 8, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 10}}, {"id": 10, "type": "ERROR", "text": "NetworkCell :", "parent": 8, "children": [11], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 24}}, {"id": 11, "type": "identifier", "text": "NetworkCell", "parent": 10, "children": [], "start_point": {"row": 4, "column": 11}, "end_point": {"row": 4, "column": 22}}, {"id": 12, "type": "identifier", "text": "UITableViewCell", "parent": 8, "children": [], "start_point": {"row": 4, "column": 25}, "end_point": {"row": 4, "column": 40}}, {"id": 13, "type": "declaration", "text": "GHRepository *repository;", "parent": 8, "children": [14, 15], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 26}}, {"id": 14, "type": "type_identifier", "text": "GHRepository", "parent": 13, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 13}}, {"id": 15, "type": "pointer_declarator", "text": "*repository", "parent": 13, "children": [16, 17], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 25}}, {"id": 16, "type": "*", "text": "*", "parent": 15, "children": [], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 15}}, {"id": 17, "type": "identifier", "text": "repository", "parent": 15, "children": [], "start_point": {"row": 5, "column": 15}, "end_point": {"row": 5, "column": 25}}, {"id": 18, "type": "ERROR", "text": "@", "parent": 8, "children": [19], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 3}}, {"id": 19, "type": "ERROR", "text": "@", "parent": 18, "children": [], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 3}}, {"id": 20, "type": "declaration", "text": "private \n IBOutlet", "parent": 8, "children": [21], "start_point": {"row": 6, "column": 3}, "end_point": {"row": 7, "column": 12}}, {"id": 21, "type": "identifier", "text": "IBOutlet", "parent": 20, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 12}}, {"id": 22, "type": "declaration", "text": "UILabel *name;", "parent": 8, "children": [23, 24], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 27}}, {"id": 23, "type": "type_identifier", "text": "UILabel", "parent": 22, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 20}}, {"id": 24, "type": "pointer_declarator", "text": "*name", "parent": 22, "children": [25, 26], "start_point": {"row": 7, "column": 21}, "end_point": {"row": 7, "column": 26}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 7, "column": 21}, "end_point": {"row": 7, "column": 22}}, {"id": 26, "type": "identifier", "text": "name", "parent": 24, "children": [], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 26}}, {"id": 27, "type": "declaration", "text": "IBOutlet UILabel *userName;", "parent": 8, "children": [28, 29, 31], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 31}}, {"id": 28, "type": "type_identifier", "text": "IBOutlet", "parent": 27, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 12}}, {"id": 29, "type": "ERROR", "text": "UILabel", "parent": 27, "children": [30], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 20}}, {"id": 30, "type": "identifier", "text": "UILabel", "parent": 29, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 20}}, {"id": 31, "type": "pointer_declarator", "text": "*userName", "parent": 27, "children": [32, 33], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 30}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 22}}, {"id": 33, "type": "identifier", "text": "userName", "parent": 31, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 30}}, {"id": 34, "type": "declaration", "text": "IBOutlet UIImageView", "parent": 8, "children": [35, 36], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 23}}, {"id": 35, "type": "type_identifier", "text": "IBOutlet", "parent": 34, "children": [], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 11}}, {"id": 36, "type": "identifier", "text": "UIImageView", "parent": 34, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 23}}, {"id": 37, "type": "pointer_expression", "text": "*iconView", "parent": 8, "children": [38, 39], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 33}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 25}}, {"id": 39, "type": "identifier", "text": "iconView", "parent": 37, "children": [], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 33}}, {"id": 40, "type": "ERROR", "text": "@", "parent": null, "children": [41], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 41, "type": "ERROR", "text": "@", "parent": 40, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 42, "type": "call_expression", "text": "property(nonatomic,retain)", "parent": null, "children": [43, 44], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 27}}, {"id": 43, "type": "identifier", "text": "property", "parent": 42, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 44, "type": "argument_list", "text": "(nonatomic,retain)", "parent": 42, "children": [45, 46], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 27}}, {"id": 45, "type": "identifier", "text": "nonatomic", "parent": 44, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 19}}, {"id": 46, "type": "identifier", "text": "retain", "parent": 44, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 26}}, {"id": 47, "type": "declaration", "text": "GHRepository *repository;", "parent": null, "children": [48, 49], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 52}}, {"id": 48, "type": "type_identifier", "text": "GHRepository", "parent": 47, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 39}}, {"id": 49, "type": "pointer_declarator", "text": "*repository", "parent": 47, "children": [50, 51], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 51}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 12, "column": 40}, "end_point": {"row": 12, "column": 41}}, {"id": 51, "type": "identifier", "text": "repository", "parent": 49, "children": [], "start_point": {"row": 12, "column": 41}, "end_point": {"row": 12, "column": 51}}, {"id": 52, "type": "ERROR", "text": "@", "parent": null, "children": [53], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 53, "type": "ERROR", "text": "@", "parent": 52, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}]}, "node_categories": {"declarations": {"functions": [8], "variables": [13, 20, 22, 27, 34, 47], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [37, 42], "assignments": [], "loops": [], "conditionals": [9, 11, 12, 14, 17, 21, 23, 26, 28, 30, 33, 35, 36, 39, 43, 45, 46, 48, 51], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 8, "universal_type": "function", "name": "NetworkCell", "text_snippet": "interface NetworkCell : UITableViewCell {\n\tGHRepository *repository;\n @private \n IBOutlet UILabe"}], "class_declarations": [], "import_statements": []}, "original_source_code": "#import <UIKit/UIKit.h>\n#import \"GHRepository.h\"\n\n\n@interface NetworkCell : UITableViewCell {\n\tGHRepository *repository;\n @private \n IBOutlet UILabel *name;\n IBOutlet UILabel *userName;\n \tIBOutlet UIImageView *iconView;\n}\n\n@property(nonatomic,retain)GHRepository *repository;\n\n@end\n\n"}
80,991
c
// // NSUserDefaults+Extension.h // ECEJ // // Created by jia on 16/4/14. // Copyright © 2016年 ECEJ. All rights reserved. // #import <Foundation/Foundation.h> @interface NSUserDefaults (Extension) + (BOOL)haveDataForKey:(NSString *)key; + (void)setStringObject:(NSString *)string forKey:(NSString *)key; + (NSString *)stringObjectForKey:(NSString *)key; + (void)setIntegerValue:(NSInteger)integerValue forKey:(NSString *)key; + (NSInteger)integerValueForKey:(NSString *)key; + (void)setBoolValue:(BOOL)boolValue forKey:(NSString *)key; + (BOOL)boolValueForKey:(NSString *)key; @end
33.47
17
(ERROR) "//\n// NSUserDefaults+Extension.h\n// ECEJ\n//\n// Created by jia on 16/4/14.\n// Copyright © 2016年 ECEJ. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface NSUserDefaults (Extension)\n\n+ (BOOL)haveDataForKey:(NSString *)key;\n\n+ (void)setStringObject:(NSString *)string forKey:(NSString *)key;\n+ (NSString *)stringObjectForKey:(NSString *)key;\n\n+ (void)setIntegerValue:(NSInteger)integerValue forKey:(NSString *)key;\n+ (NSInteger)integerValueForKey:(NSString *)key;\n\n+ (void)setBoolValue:(BOOL)boolValue forKey:(NSString *)key;\n+ (BOOL)boolValueForKey:(NSString *)key;\n\n@end\n" (comment) "//" (comment) "// NSUserDefaults+Extension.h" (comment) "// ECEJ" (comment) "//" (comment) "// Created by jia on 16/4/14." (comment) "// Copyright © 2016年 ECEJ. All rights reserved.\n//" (comment) "\n#" (preproc_call) "port <Foundation/Foundation.h>\n\n@i" (preproc_directive) "port <F" (preproc_arg) "undation/Foundation.h>\n\n@" (ERROR) "terface NSUserDefaults (Extension)\n\n+ (BOOL)haveDataForKey:(NSString *)key;\n\n" (ERROR) "t" (type_identifier) "erface NS" (function_declarator) "serDefaults (Extension)\n\n+" (identifier) "serDefaults (E" (parameter_list) "tension)\n\n+" (() "t" (identifier) "ension)\n\n" ()) "+" (unary_expression) "BOOL)haveDataForKey:(N" (+) "B" (cast_expression) "OL)haveDataForKey:(N" (() "O" (type_descriptor) "L)ha" (type_identifier) "L)ha" ()) "v" (identifier) "eDataForKey:(N" (:) "S" (() "S" (binary_expression) "tring *)key;\n\n" (identifier) "tring *)" (*) "e" (ERROR) "y" ()) "y" (identifier) ";\n\n" (expression_statement) "+" (;) "+" (binary_expression) "void)setStringObject:(NSString *)string fo" (unary_expression) "void)setStringObject:(N" (+) "v" (cast_expression) "id)setStringObject:(N" (() "i" (type_descriptor) "d)se" (primitive_type) "d)se" ()) "t" (identifier) "StringObject:(N" (ERROR) "SString *)" (:) "S" (() "S" (identifier) "tring *)" (*) "t" (ERROR) "r" ()) "r" (identifier) "ing fo" (identifier) "Key:(N" (:) "S" (() "S" (identifier) "tring *)" (*) "e" ()) "y" (identifier) ";\n+" (;) " " (+) "N" (() "S" (identifier) "tring *)" (*) "t" ()) "r" (identifier) "ingObjectForKey:(N" (:) "S" (() "S" (identifier) "tring *)" (*) "e" ()) "y" (identifier) ";\n\n" (;) "+" (+) "v" (() "i" (primitive_type) "d)se" ()) "t" (identifier) "IntegerValue:(N" (:) "S" (() "I" (identifier) "nteger)in" ()) "t" (identifier) "egerValue fo" (identifier) "Key:(N" (:) "S" (() "S" (identifier) "tring *)" (*) "e" ()) "y" (identifier) ";\n+" (;) " " (+) "N" (() "I" (identifier) "nteger)in" ()) "t" (identifier) "egerValueForKey:(N" (:) "S" (() "S" (identifier) "tring *)" (*) "e" ()) "y" (identifier) ";\n\n" (;) "+" (+) "v" (() "i" (primitive_type) "d)se" ()) "t" (identifier) "BoolValue:(B" (:) "O" (() "O" (identifier) "L)bo" ()) "o" (identifier) "lValue fo" (identifier) "Key:(N" (:) "S" (() "S" (identifier) "tring *)" (*) "e" ()) "y" (identifier) ";\n+" (;) " " (+) "B" (() "O" (identifier) "L)bo" ()) "o" (identifier) "lValueForKey:(N" (:) "S" (() "S" (identifier) "tring *)" (*) "e" ()) "y" (identifier) ";\n\n" (;) "@" (ERROR) "d" (identifier) "\n"
138
7
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 33.47, "nodes": 73, "errors": 0, "source_hash": "12e6c1d9a7cc06b12a0797e8ebf26d8fc4a983f74ec4d5f9a96a7b4163d7a05c", "categorized_nodes": 42}, "ast": {"root": "ERROR", "nodes": [{"id": 0, "type": "ERROR", "text": "//\n// NSUserDefaults+Extension.h\n// ECEJ\n//\n// Created by jia on 16/4/14.\n// Copyright \u00a9 2016\u5e74 ECEJ. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface NSUserDefaults (Extension)\n\n+ (BOOL)haveDataForKey:(NSString *)key;\n\n+ (void)setStringObject:(NSString *)string forKey:(NSString *)key;\n+ (NSString *)stringObjectForKey:(NSString *)key;\n\n+ (void)setIntegerValue:(NSInteger)integerValue forKey:(NSString *)key;\n+ (NSInteger)integerValueForKey:(NSString *)key;\n\n+ (void)setBoolValue:(BOOL)boolValue forKey:(NSString *)key;\n+ (BOOL)boolValueForKey:(NSString *)key;\n\n@end\n", "parent": null, "children": [1, 4, 21, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 1, "type": "preproc_call", "text": "port <Foundation/Foundation.h>\n\n@i", "parent": 0, "children": [2, 3], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 2, "type": "preproc_directive", "text": "port <F", "parent": 1, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 3, "type": "preproc_arg", "text": "undation/Foundation.h>\n\n@", "parent": 1, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 4, "type": "ERROR", "text": "terface NSUserDefaults (Extension)\n\n+ (BOOL)haveDataForKey:(NSString *)key;\n\n", "parent": 0, "children": [5, 6, 7, 11, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 38}}, {"id": 5, "type": "ERROR", "text": "t", "parent": 4, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 6, "type": "type_identifier", "text": "erface NS", "parent": 4, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 7, "type": "function_declarator", "text": "serDefaults (Extension)\n\n+", "parent": 4, "children": [8, 9], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 37}}, {"id": 8, "type": "identifier", "text": "serDefaults (E", "parent": 7, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 25}}, {"id": 9, "type": "parameter_list", "text": "tension)\n\n+", "parent": 7, "children": [10], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 37}}, {"id": 10, "type": "identifier", "text": "ension)\n\n", "parent": 9, "children": [], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 36}}, {"id": 11, "type": "unary_expression", "text": "BOOL)haveDataForKey:(N", "parent": 4, "children": [12, 13], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 22}}, {"id": 12, "type": "+", "text": "B", "parent": 11, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 13, "type": "cast_expression", "text": "OL)haveDataForKey:(N", "parent": 11, "children": [14, 16], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 22}}, {"id": 14, "type": "type_descriptor", "text": "L)ha", "parent": 13, "children": [15], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 15, "type": "type_identifier", "text": "L)ha", "parent": 14, "children": [], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 16, "type": "identifier", "text": "eDataForKey:(N", "parent": 13, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 22}}, {"id": 17, "type": "binary_expression", "text": "tring *)key;\n\n", "parent": 4, "children": [18, 19, 20], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 38}}, {"id": 18, "type": "identifier", "text": "tring *)", "parent": 17, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 32}}, {"id": 19, "type": "*", "text": "e", "parent": 17, "children": [], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 34}}, {"id": 20, "type": "ERROR", "text": "y", "parent": 17, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 35}}, {"id": 21, "type": "binary_expression", "text": "void)setStringObject:(NSString *)string fo", "parent": 0, "children": [22, 28, 30, 31, 32], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 42}}, {"id": 22, "type": "unary_expression", "text": "void)setStringObject:(N", "parent": 21, "children": [23, 24], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 23}}, {"id": 23, "type": "+", "text": "v", "parent": 22, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 24, "type": "cast_expression", "text": "id)setStringObject:(N", "parent": 22, "children": [25, 27], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 23}}, {"id": 25, "type": "type_descriptor", "text": "d)se", "parent": 24, "children": [26], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 7}}, {"id": 26, "type": "primitive_type", "text": "d)se", "parent": 25, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 7}}, {"id": 27, "type": "identifier", "text": "StringObject:(N", "parent": 24, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 23}}, {"id": 28, "type": "ERROR", "text": "SString *)", "parent": 21, "children": [29], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 33}}, {"id": 29, "type": "identifier", "text": "tring *)", "parent": 28, "children": [], "start_point": {"row": 14, "column": 25}, "end_point": {"row": 14, "column": 33}}, {"id": 30, "type": "*", "text": "t", "parent": 21, "children": [], "start_point": {"row": 14, "column": 34}, "end_point": {"row": 14, "column": 35}}, {"id": 31, "type": "ERROR", "text": "r", "parent": 21, "children": [], "start_point": {"row": 14, "column": 35}, "end_point": {"row": 14, "column": 36}}, {"id": 32, "type": "identifier", "text": "ing fo", "parent": 21, "children": [], "start_point": {"row": 14, "column": 36}, "end_point": {"row": 14, "column": 42}}, {"id": 33, "type": "identifier", "text": "Key:(N", "parent": 0, "children": [], "start_point": {"row": 14, "column": 43}, "end_point": {"row": 14, "column": 49}}, {"id": 34, "type": "identifier", "text": "tring *)", "parent": 0, "children": [], "start_point": {"row": 14, "column": 51}, "end_point": {"row": 14, "column": 59}}, {"id": 35, "type": "*", "text": "e", "parent": 0, "children": [], "start_point": {"row": 14, "column": 60}, "end_point": {"row": 14, "column": 61}}, {"id": 36, "type": "identifier", "text": ";\n+", "parent": 0, "children": [], "start_point": {"row": 14, "column": 62}, "end_point": {"row": 14, "column": 65}}, {"id": 37, "type": "+", "text": "N", "parent": 0, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 38, "type": "identifier", "text": "tring *)", "parent": 0, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 11}}, {"id": 39, "type": "*", "text": "t", "parent": 0, "children": [], "start_point": {"row": 15, "column": 12}, "end_point": {"row": 15, "column": 13}}, {"id": 40, "type": "identifier", "text": "ingObjectForKey:(N", "parent": 0, "children": [], "start_point": {"row": 15, "column": 14}, "end_point": {"row": 15, "column": 32}}, {"id": 41, "type": "identifier", "text": "tring *)", "parent": 0, "children": [], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 42}}, {"id": 42, "type": "*", "text": "e", "parent": 0, "children": [], "start_point": {"row": 15, "column": 43}, "end_point": {"row": 15, "column": 44}}, {"id": 43, "type": "+", "text": "v", "parent": 0, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 44, "type": "primitive_type", "text": "d)se", "parent": 0, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 45, "type": "identifier", "text": "IntegerValue:(N", "parent": 0, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 23}}, {"id": 46, "type": "identifier", "text": "nteger)in", "parent": 0, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 34}}, {"id": 47, "type": "identifier", "text": "egerValue fo", "parent": 0, "children": [], "start_point": {"row": 17, "column": 35}, "end_point": {"row": 17, "column": 47}}, {"id": 48, "type": "identifier", "text": "Key:(N", "parent": 0, "children": [], "start_point": {"row": 17, "column": 48}, "end_point": {"row": 17, "column": 54}}, {"id": 49, "type": "identifier", "text": "tring *)", "parent": 0, "children": [], "start_point": {"row": 17, "column": 56}, "end_point": {"row": 17, "column": 64}}, {"id": 50, "type": "*", "text": "e", "parent": 0, "children": [], "start_point": {"row": 17, "column": 65}, "end_point": {"row": 17, "column": 66}}, {"id": 51, "type": "identifier", "text": ";\n+", "parent": 0, "children": [], "start_point": {"row": 17, "column": 67}, "end_point": {"row": 17, "column": 70}}, {"id": 52, "type": "+", "text": "N", "parent": 0, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 53, "type": "identifier", "text": "nteger)in", "parent": 0, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 12}}, {"id": 54, "type": "identifier", "text": "egerValueForKey:(N", "parent": 0, "children": [], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 31}}, {"id": 55, "type": "identifier", "text": "tring *)", "parent": 0, "children": [], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 41}}, {"id": 56, "type": "*", "text": "e", "parent": 0, "children": [], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 43}}, {"id": 57, "type": "+", "text": "v", "parent": 0, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 58, "type": "primitive_type", "text": "d)se", "parent": 0, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 7}}, {"id": 59, "type": "identifier", "text": "BoolValue:(B", "parent": 0, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 20}}, {"id": 60, "type": "identifier", "text": "L)bo", "parent": 0, "children": [], "start_point": {"row": 20, "column": 22}, "end_point": {"row": 20, "column": 26}}, {"id": 61, "type": "identifier", "text": "lValue fo", "parent": 0, "children": [], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 36}}, {"id": 62, "type": "identifier", "text": "Key:(N", "parent": 0, "children": [], "start_point": {"row": 20, "column": 37}, "end_point": {"row": 20, "column": 43}}, {"id": 63, "type": "identifier", "text": "tring *)", "parent": 0, "children": [], "start_point": {"row": 20, "column": 45}, "end_point": {"row": 20, "column": 53}}, {"id": 64, "type": "*", "text": "e", "parent": 0, "children": [], "start_point": {"row": 20, "column": 54}, "end_point": {"row": 20, "column": 55}}, {"id": 65, "type": "identifier", "text": ";\n+", "parent": 0, "children": [], "start_point": {"row": 20, "column": 56}, "end_point": {"row": 20, "column": 59}}, {"id": 66, "type": "+", "text": "B", "parent": 0, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 67, "type": "identifier", "text": "L)bo", "parent": 0, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 7}}, {"id": 68, "type": "identifier", "text": "lValueForKey:(N", "parent": 0, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 23}}, {"id": 69, "type": "identifier", "text": "tring *)", "parent": 0, "children": [], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 33}}, {"id": 70, "type": "*", "text": "e", "parent": 0, "children": [], "start_point": {"row": 21, "column": 34}, "end_point": {"row": 21, "column": 35}}, {"id": 71, "type": "ERROR", "text": "d", "parent": 0, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 72, "type": "identifier", "text": "\n", "parent": 0, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 4}}]}, "node_categories": {"declarations": {"functions": [7], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [11, 13, 17, 21, 22, 24], "assignments": [], "loops": [], "conditionals": [6, 8, 10, 15, 16, 18, 27, 29, 32, 33, 34, 36, 38, 40, 41, 45, 46, 47, 48, 49, 51, 53, 54, 55, 59, 60, 61, 62, 63, 65, 67, 68, 69, 72], "returns": [], "exceptions": []}, "expressions": {"calls": [1], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 7, "universal_type": "function", "name": "unknown", "text_snippet": "serDefaults (Extension)\n\n+"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// NSUserDefaults+Extension.h\n// ECEJ\n//\n// Created by jia on 16/4/14.\n// Copyright \u00a9 2016\u5e74 ECEJ. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface NSUserDefaults (Extension)\n\n+ (BOOL)haveDataForKey:(NSString *)key;\n\n+ (void)setStringObject:(NSString *)string forKey:(NSString *)key;\n+ (NSString *)stringObjectForKey:(NSString *)key;\n\n+ (void)setIntegerValue:(NSInteger)integerValue forKey:(NSString *)key;\n+ (NSInteger)integerValueForKey:(NSString *)key;\n\n+ (void)setBoolValue:(BOOL)boolValue forKey:(NSString *)key;\n+ (BOOL)boolValueForKey:(NSString *)key;\n\n@end\n"}
80,992
c
/* Generated by RuntimeBrowser. */ @protocol FCChannelProviding <FCTagProviding> @required - (NSString *)defaultSectionID; - (bool)isWhitelisted; - (NSArray *)sectionIDs; - (bool)supportsNotifications; @end
22.11
9
(translation_unit) "/* Generated by RuntimeBrowser.\n */\n\n@protocol FCChannelProviding <FCTagProviding>\n\n@required\n\n- (NSString *)defaultSectionID;\n- (bool)isWhitelisted;\n- (NSArray *)sectionIDs;\n- (bool)supportsNotifications;\n\n@end\n" (comment) "/* Generated by RuntimeBrowser.\n */" (ERROR) "@protocol FCChannelProviding <FCTagProviding>\n\n@required" (ERROR) "@" (type_identifier) "protocol" (identifier) "FCChannelProviding" (<) "<" (identifier) "FCTagProviding" (>) ">" (ERROR) "@" (identifier) "required" (expression_statement) "- (NSString *)defaultSectionID;" (unary_expression) "- (NSString *)defaultSectionID" (-) "-" (cast_expression) "(NSString *)defaultSectionID" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "defaultSectionID" (;) ";" (expression_statement) "- (bool)isWhitelisted;" (unary_expression) "- (bool)isWhitelisted" (-) "-" (cast_expression) "(bool)isWhitelisted" (() "(" (type_descriptor) "bool" (primitive_type) "bool" ()) ")" (identifier) "isWhitelisted" (;) ";" (expression_statement) "- (NSArray *)sectionIDs;" (unary_expression) "- (NSArray *)sectionIDs" (-) "-" (cast_expression) "(NSArray *)sectionIDs" (() "(" (type_descriptor) "NSArray *" (type_identifier) "NSArray" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "sectionIDs" (;) ";" (expression_statement) "- (bool)supportsNotifications;" (unary_expression) "- (bool)supportsNotifications" (-) "-" (cast_expression) "(bool)supportsNotifications" (() "(" (type_descriptor) "bool" (primitive_type) "bool" ()) ")" (identifier) "supportsNotifications" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
60
5
{"language": "c", "success": true, "metadata": {"lines": 9, "avg_line_length": 22.11, "nodes": 39, "errors": 0, "source_hash": "017b6981b0eb1040104556200576d4db8dc38fac0c291b2a2bc1949ff7d510f2", "categorized_nodes": 18}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "ERROR", "text": "@protocol FCChannelProviding <FCTagProviding>\n\n@required", "parent": null, "children": [1, 2, 3, 4, 5, 6, 7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 5, "column": 9}}, {"id": 1, "type": "ERROR", "text": "@", "parent": 0, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 1}}, {"id": 2, "type": "type_identifier", "text": "protocol", "parent": 0, "children": [], "start_point": {"row": 3, "column": 1}, "end_point": {"row": 3, "column": 9}}, {"id": 3, "type": "identifier", "text": "FCChannelProviding", "parent": 0, "children": [], "start_point": {"row": 3, "column": 10}, "end_point": {"row": 3, "column": 28}}, {"id": 4, "type": "<", "text": "<", "parent": 0, "children": [], "start_point": {"row": 3, "column": 29}, "end_point": {"row": 3, "column": 30}}, {"id": 5, "type": "identifier", "text": "FCTagProviding", "parent": 0, "children": [], "start_point": {"row": 3, "column": 30}, "end_point": {"row": 3, "column": 44}}, {"id": 6, "type": ">", "text": ">", "parent": 0, "children": [], "start_point": {"row": 3, "column": 44}, "end_point": {"row": 3, "column": 45}}, {"id": 7, "type": "ERROR", "text": "@", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 1}}, {"id": 8, "type": "identifier", "text": "required", "parent": 0, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 9}}, {"id": 9, "type": "unary_expression", "text": "- (NSString *)defaultSectionID", "parent": null, "children": [10, 11], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 30}}, {"id": 10, "type": "-", "text": "-", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 1}}, {"id": 11, "type": "cast_expression", "text": "(NSString *)defaultSectionID", "parent": 9, "children": [12, 16], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 30}}, {"id": 12, "type": "type_descriptor", "text": "NSString *", "parent": 11, "children": [13, 14], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 7, "column": 13}}, {"id": 13, "type": "type_identifier", "text": "NSString", "parent": 12, "children": [], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 7, "column": 11}}, {"id": 14, "type": "abstract_pointer_declarator", "text": "*", "parent": 12, "children": [15], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 13}}, {"id": 15, "type": "*", "text": "*", "parent": 14, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 13}}, {"id": 16, "type": "identifier", "text": "defaultSectionID", "parent": 11, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 30}}, {"id": 17, "type": "unary_expression", "text": "- (bool)isWhitelisted", "parent": null, "children": [18, 19], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 21}}, {"id": 18, "type": "-", "text": "-", "parent": 17, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 19, "type": "cast_expression", "text": "(bool)isWhitelisted", "parent": 17, "children": [20, 22], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 21}}, {"id": 20, "type": "type_descriptor", "text": "bool", "parent": 19, "children": [21], "start_point": {"row": 8, "column": 3}, "end_point": {"row": 8, "column": 7}}, {"id": 21, "type": "primitive_type", "text": "bool", "parent": 20, "children": [], "start_point": {"row": 8, "column": 3}, "end_point": {"row": 8, "column": 7}}, {"id": 22, "type": "identifier", "text": "isWhitelisted", "parent": 19, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 21}}, {"id": 23, "type": "unary_expression", "text": "- (NSArray *)sectionIDs", "parent": null, "children": [24, 25], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 23}}, {"id": 24, "type": "-", "text": "-", "parent": 23, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 25, "type": "cast_expression", "text": "(NSArray *)sectionIDs", "parent": 23, "children": [26, 30], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 23}}, {"id": 26, "type": "type_descriptor", "text": "NSArray *", "parent": 25, "children": [27, 28], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 12}}, {"id": 27, "type": "type_identifier", "text": "NSArray", "parent": 26, "children": [], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 10}}, {"id": 28, "type": "abstract_pointer_declarator", "text": "*", "parent": 26, "children": [29], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 12}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 12}}, {"id": 30, "type": "identifier", "text": "sectionIDs", "parent": 25, "children": [], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 23}}, {"id": 31, "type": "unary_expression", "text": "- (bool)supportsNotifications", "parent": null, "children": [32, 33], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 29}}, {"id": 32, "type": "-", "text": "-", "parent": 31, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 33, "type": "cast_expression", "text": "(bool)supportsNotifications", "parent": 31, "children": [34, 36], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 29}}, {"id": 34, "type": "type_descriptor", "text": "bool", "parent": 33, "children": [35], "start_point": {"row": 10, "column": 3}, "end_point": {"row": 10, "column": 7}}, {"id": 35, "type": "primitive_type", "text": "bool", "parent": 34, "children": [], "start_point": {"row": 10, "column": 3}, "end_point": {"row": 10, "column": 7}}, {"id": 36, "type": "identifier", "text": "supportsNotifications", "parent": 33, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 29}}, {"id": 37, "type": "ERROR", "text": "@", "parent": null, "children": [38], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 38, "type": "ERROR", "text": "@", "parent": 37, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [9, 11, 17, 19, 23, 25, 31, 33], "assignments": [], "loops": [], "conditionals": [2, 3, 5, 8, 13, 16, 22, 27, 30, 36], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "/* Generated by RuntimeBrowser.\n */\n\n@protocol FCChannelProviding <FCTagProviding>\n\n@required\n\n- (NSString *)defaultSectionID;\n- (bool)isWhitelisted;\n- (NSArray *)sectionIDs;\n- (bool)supportsNotifications;\n\n@end\n"}
80,993
c
/* FIXME: dummy stub for now. */ #include <errno.h> #include <unistd.h> char * getlogin (void) { errno = ENOSYS; return NULL; }
13.78
9
(translation_unit) "/* FIXME: dummy stub for now. */\n#include <errno.h>\n#include <unistd.h>\n\nchar *\ngetlogin (void)\n{\n errno = ENOSYS;\n return NULL;\n}\n\n" (comment) "/* FIXME: dummy stub for now. */" (preproc_include) "#include <errno.h>\n" (#include) "#include" (system_lib_string) "<errno.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (function_definition) "char *\ngetlogin (void)\n{\n errno = ENOSYS;\n return NULL;\n}" (primitive_type) "char" (pointer_declarator) "*\ngetlogin (void)" (*) "*" (function_declarator) "getlogin (void)" (identifier) "getlogin" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n errno = ENOSYS;\n return NULL;\n}" ({) "{" (expression_statement) "errno = ENOSYS;" (assignment_expression) "errno = ENOSYS" (identifier) "errno" (=) "=" (identifier) "ENOSYS" (;) ";" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}"
33
0
{"language": "c", "success": true, "metadata": {"lines": 9, "avg_line_length": 13.78, "nodes": 22, "errors": 0, "source_hash": "064e5282fd043989572eb00e57516fefa723195132bb82486affb0e603b188ac", "categorized_nodes": 14}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <errno.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<errno.h>", "parent": 0, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <unistd.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": "<unistd.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 19}}, {"id": 6, "type": "function_definition", "text": "char *\ngetlogin (void)\n{\n errno = ENOSYS;\n return NULL;\n}", "parent": null, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "char", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 4}}, {"id": 8, "type": "pointer_declarator", "text": "*\ngetlogin (void)", "parent": 6, "children": [9, 10], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 5, "column": 15}}, {"id": 9, "type": "*", "text": "*", "parent": 8, "children": [], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 6}}, {"id": 10, "type": "function_declarator", "text": "getlogin (void)", "parent": 8, "children": [11, 12], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 15}}, {"id": 11, "type": "identifier", "text": "getlogin", "parent": 10, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 12, "type": "parameter_list", "text": "(void)", "parent": 10, "children": [13], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 15}}, {"id": 13, "type": "parameter_declaration", "text": "void", "parent": 12, "children": [14], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 14}}, {"id": 14, "type": "primitive_type", "text": "void", "parent": 13, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 14}}, {"id": 15, "type": "assignment_expression", "text": "errno = ENOSYS", "parent": 6, "children": [16, 17, 18], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 16}}, {"id": 16, "type": "identifier", "text": "errno", "parent": 15, "children": [], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 7}}, {"id": 17, "type": "=", "text": "=", "parent": 15, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 9}}, {"id": 18, "type": "identifier", "text": "ENOSYS", "parent": 15, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 16}}, {"id": 19, "type": "return_statement", "text": "return NULL;", "parent": 6, "children": [20], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 14}}, {"id": 20, "type": "null", "text": "NULL", "parent": 19, "children": [21], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 13}}, {"id": 21, "type": "NULL", "text": "NULL", "parent": 20, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 13}}]}, "node_categories": {"declarations": {"functions": [6, 10], "variables": [13], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [15], "loops": [], "conditionals": [11, 16, 18], "returns": [19], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "unknown", "text_snippet": "char *\ngetlogin (void)\n{\n errno = ENOSYS;\n return NULL;\n}"}, {"node_id": 10, "universal_type": "function", "name": "unknown", "text_snippet": "getlogin (void)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <errno.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <unistd.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "/* FIXME: dummy stub for now. */\n#include <errno.h>\n#include <unistd.h>\n\nchar *\ngetlogin (void)\n{\n errno = ENOSYS;\n return NULL;\n}\n\n"}
80,994
c
/* * Copyright (c) 2016 PrivatBank IT <<EMAIL>>. All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H #define CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H #include <stdbool.h> #include "pkix_structs.h" #include "byte_array.h" #ifdef __cplusplus extern "C" { #endif struct VerifyAdapter_st; /* Вказівник на функцію перевірки ЕЦП */ typedef int (va_verify_data_f)(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign); /* Вказівник на функцію перевірки ЕЦП */ typedef int (va_verify_hash_f)(const struct VerifyAdapter_st *va, const ByteArray *hash, const ByteArray *sign); /* Вказівник на функцію отримання SubjectPublicKeyInfo */ typedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo_t **pub_key); /* Індикатор наявності сертифікату */ typedef int (va_has_cert_f)(const struct VerifyAdapter_st *va, bool *has_cert); /* Вказівник на функцію установки сертифікату */ typedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, const Certificate_t *cert); /* Вказівник на функцію отримання сертифікату */ typedef int (va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert); /* Вказівник на функцію отримання алгоритму гешування */ typedef int (va_get_digest_alg_f)(const struct VerifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id); /* Вказівник на функцію встановляння алгоритму гешування */ typedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *va, const DigestAlgorithmIdentifier_t *alg); /* Вказівник на функцію отримання алгоритму підпису */ typedef int (va_get_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id); /* Вказівник на функцію очистки контексту */ typedef void (verify_free_f)(struct VerifyAdapter_st *va); typedef struct VerifyAdapter_st { va_verify_data_f *verify_data; va_verify_hash_f *verify_hash; va_get_pub_key_f *get_pub_key; va_has_cert_f *has_cert; va_get_cert_f *get_cert; va_set_cert_f *set_cert; va_get_digest_alg_f *get_digest_alg; va_set_digest_alg_f *set_digest_alg; va_get_sign_alg_f *get_sign_alg; verify_free_f *free; const void *const ctx; } VerifyAdapter; #ifdef __cplusplus } #endif #endif
44.92
50
(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 CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H\n#define CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H\n\n#include <stdbool.h>\n\n#include "pkix_structs.h"\n#include "byte_array.h"\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\nstruct VerifyAdapter_st;\n\n/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_data_f)(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_hash_f)(const struct VerifyAdapter_st *va, const ByteArray *hash, const ByteArray *sign);\n\n/* Вказівник на функцію отримання SubjectPublicKeyInfo */\ntypedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo_t **pub_key);\n\n/* Індикатор наявності сертифікату */\ntypedef int (va_has_cert_f)(const struct VerifyAdapter_st *va, bool *has_cert);\n\n/* Вказівник на функцію установки сертифікату */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, const Certificate_t *cert);\n\n/* Вказівник на функцію отримання сертифікату */\ntypedef int (va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* Вказівник на функцію отримання алгоритму гешування */\ntypedef int (va_get_digest_alg_f)(const struct VerifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* Вказівник на функцію встановляння алгоритму гешування */\ntypedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *va, const DigestAlgorithmIdentifier_t *alg);\n\n/* Вказівник на функцію отримання алгоритму підпису */\ntypedef int (va_get_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id);\n\n/* Вказівник на функцію очистки контексту */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef struct VerifyAdapter_st {\n va_verify_data_f *verify_data;\n va_verify_hash_f *verify_hash;\n va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_cert;\n va_get_digest_alg_f *get_digest_alg;\n va_set_digest_alg_f *set_digest_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free_f *free;\n const void *const ctx;\n} VerifyAdapter;\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 CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H\n#define CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H\n\n#include <stdbool.h>\n\n#include "pkix_structs.h"\n#include "byte_array.h"\n\n#ifdef __cplusplus\nextern "C" {\n#endif\n\nstruct VerifyAdapter_st;\n\n/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_data_f)(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_hash_f)(const struct VerifyAdapter_st *va, const ByteArray *hash, const ByteArray *sign);\n\n/* Вказівник на функцію отримання SubjectPublicKeyInfo */\ntypedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo_t **pub_key);\n\n/* Індикатор наявності сертифікату */\ntypedef int (va_has_cert_f)(const struct VerifyAdapter_st *va, bool *has_cert);\n\n/* Вказівник на функцію установки сертифікату */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, const Certificate_t *cert);\n\n/* Вказівник на функцію отримання сертифікату */\ntypedef int (va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* Вказівник на функцію отримання алгоритму гешування */\ntypedef int (va_get_digest_alg_f)(const struct VerifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* Вказівник на функцію встановляння алгоритму гешування */\ntypedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *va, const DigestAlgorithmIdentifier_t *alg);\n\n/* Вказівник на функцію отримання алгоритму підпису */\ntypedef int (va_get_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id);\n\n/* Вказівник на функцію очистки контексту */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef struct VerifyAdapter_st {\n va_verify_data_f *verify_data;\n va_verify_hash_f *verify_hash;\n va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_cert;\n va_get_digest_alg_f *get_digest_alg;\n va_set_digest_alg_f *set_digest_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free_f *free;\n const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n" (#ifndef) "#ifndef" (identifier) "CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H" (preproc_def) "#define CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H\n" (#define) "#define" (identifier) "CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H" (preproc_include) "#include <stdbool.h>\n" (#include) "#include" (system_lib_string) "<stdbool.h>" (preproc_include) "#include "pkix_structs.h"\n" (#include) "#include" (string_literal) ""pkix_structs.h"" (") """ (string_content) "pkix_structs.h" (") """ (preproc_include) "#include "byte_array.h"\n" (#include) "#include" (string_literal) ""byte_array.h"" (") """ (string_content) "byte_array.h" (") """ (preproc_ifdef) "#ifdef __cplusplus\nextern "C" {\n#endif\n\nstruct VerifyAdapter_st;\n\n/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_data_f)(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_hash_f)(const struct VerifyAdapter_st *va, const ByteArray *hash, const ByteArray *sign);\n\n/* Вказівник на функцію отримання SubjectPublicKeyInfo */\ntypedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo_t **pub_key);\n\n/* Індикатор наявності сертифікату */\ntypedef int (va_has_cert_f)(const struct VerifyAdapter_st *va, bool *has_cert);\n\n/* Вказівник на функцію установки сертифікату */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, const Certificate_t *cert);\n\n/* Вказівник на функцію отримання сертифікату */\ntypedef int (va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* Вказівник на функцію отримання алгоритму гешування */\ntypedef int (va_get_digest_alg_f)(const struct VerifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* Вказівник на функцію встановляння алгоритму гешування */\ntypedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *va, const DigestAlgorithmIdentifier_t *alg);\n\n/* Вказівник на функцію отримання алгоритму підпису */\ntypedef int (va_get_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id);\n\n/* Вказівник на функцію очистки контексту */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef struct VerifyAdapter_st {\n va_verify_data_f *verify_data;\n va_verify_hash_f *verify_hash;\n va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_cert;\n va_get_digest_alg_f *get_digest_alg;\n va_set_digest_alg_f *set_digest_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free_f *free;\n const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n" (#ifdef) "#ifdef" (identifier) "__cplusplus" (linkage_specification) "extern "C" {\n#endif\n\nstruct VerifyAdapter_st;\n\n/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_data_f)(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_hash_f)(const struct VerifyAdapter_st *va, const ByteArray *hash, const ByteArray *sign);\n\n/* Вказівник на функцію отримання SubjectPublicKeyInfo */\ntypedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo_t **pub_key);\n\n/* Індикатор наявності сертифікату */\ntypedef int (va_has_cert_f)(const struct VerifyAdapter_st *va, bool *has_cert);\n\n/* Вказівник на функцію установки сертифікату */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, const Certificate_t *cert);\n\n/* Вказівник на функцію отримання сертифікату */\ntypedef int (va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* Вказівник на функцію отримання алгоритму гешування */\ntypedef int (va_get_digest_alg_f)(const struct VerifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* Вказівник на функцію встановляння алгоритму гешування */\ntypedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *va, const DigestAlgorithmIdentifier_t *alg);\n\n/* Вказівник на функцію отримання алгоритму підпису */\ntypedef int (va_get_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id);\n\n/* Вказівник на функцію очистки контексту */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef struct VerifyAdapter_st {\n va_verify_data_f *verify_data;\n va_verify_hash_f *verify_hash;\n va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_cert;\n va_get_digest_alg_f *get_digest_alg;\n va_set_digest_alg_f *set_digest_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free_f *free;\n const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n" (extern) "extern" (string_literal) ""C"" (") """ (string_content) "C" (") """ (declaration_list) "{\n#endif\n\nstruct VerifyAdapter_st;\n\n/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_data_f)(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_hash_f)(const struct VerifyAdapter_st *va, const ByteArray *hash, const ByteArray *sign);\n\n/* Вказівник на функцію отримання SubjectPublicKeyInfo */\ntypedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo_t **pub_key);\n\n/* Індикатор наявності сертифікату */\ntypedef int (va_has_cert_f)(const struct VerifyAdapter_st *va, bool *has_cert);\n\n/* Вказівник на функцію установки сертифікату */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, const Certificate_t *cert);\n\n/* Вказівник на функцію отримання сертифікату */\ntypedef int (va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* Вказівник на функцію отримання алгоритму гешування */\ntypedef int (va_get_digest_alg_f)(const struct VerifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* Вказівник на функцію встановляння алгоритму гешування */\ntypedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *va, const DigestAlgorithmIdentifier_t *alg);\n\n/* Вказівник на функцію отримання алгоритму підпису */\ntypedef int (va_get_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id);\n\n/* Вказівник на функцію очистки контексту */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef struct VerifyAdapter_st {\n va_verify_data_f *verify_data;\n va_verify_hash_f *verify_hash;\n va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_cert;\n va_get_digest_alg_f *get_digest_alg;\n va_set_digest_alg_f *set_digest_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free_f *free;\n const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n" ({) "{" (preproc_call) "#endif\n" (preproc_directive) "#endif" (struct_specifier) "struct VerifyAdapter_st" (struct) "struct" (type_identifier) "VerifyAdapter_st" (;) ";" (comment) "/* Вказівник на функцію перевірки ЕЦП */\ntypedef int (va_verify_data_f" (type_definition) "(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* Вказівник на функцію пере" (typedef) "(const " (primitive_type) "tru" (function_declarator) "t VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* Вказівник на функцію пер" (parenthesized_declarator) "t VerifyAdapter_st" (() "t" (type_identifier) " VerifyAdapter_s" ()) "t" (parameter_list) " *va, const ByteArray *data, const ByteArray *sign);\n\n/* Вказівник на функцію пер" (() " " (parameter_declaration) "*va, const ByteArray *data, const" (type_qualifier) "*va, " (const) "*va, " (struct_specifier) "onst ByteArray *data, c" (struct) "onst B" (type_identifier) "teArray *data, c" (pointer_declarator) "nst" (*) "n" (identifier) "st" (,) " " (parameter_declaration) "yteArray *sign);\n\n/* " (type_qualifier) "yteAr" (const) "yteAr" (type_identifier) "ay *sign)" (pointer_declarator) "\n\n/* " (*) "\n" (identifier) "\n/* " (,) "В" (parameter_declaration) "азівник на функцію пе" (type_qualifier) "азівн" (const) "азівн" (type_identifier) "к на функ" (pointer_declarator) "ію пе" (*) "і" (identifier) "ю пе" ()) "р" (;) "е" (comment) "рки ЕЦП */\ntypedef int (va_verify_hash_f)(const struct VerifyAdapter_s" (type_definition) " *va, const ByteArray *hash, const ByteArray *sign);\n\n/* Вказівник на функцію отримання SubjectPublicKeyInfo */\n" (typedef) " *va, c" (primitive_type) "nst" (function_declarator) "ByteArray *hash, const ByteArray *sign);\n\n/* Вказівник на функцію отримання SubjectPublicKeyInfo */" (parenthesized_declarator) "ByteArray *hash, c" (() "B" (type_identifier) "yteArray *hash, " ()) "c" (parameter_list) "onst ByteArray *sign);\n\n/* Вказівник на функцію отримання SubjectPublicKeyInfo */" (() "o" (parameter_declaration) "nst ByteArray *sign);\n\n/* Вказівн" (type_qualifier) "nst B" (const) "nst B" (struct_specifier) "teArray *sign);\n\n/* Вка" (struct) "teArra" (type_identifier) " *sign);\n\n/* Вка" (pointer_declarator) "івн" (*) "і" (identifier) "вн" (,) "и" (parameter_declaration) " на функцію отримання" (type_qualifier) " на ф" (const) " на ф" (type_identifier) "нкцію отр" (pointer_declarator) "мання" (*) "м" (identifier) "ання" (,) " " (parameter_declaration) "ubjectPublicKeyInfo *" (type_qualifier) "ubjec" (const) "ubjec" (type_identifier) "PublicKey" (pointer_declarator) "nfo *" (*) "n" (identifier) "fo *" ()) "/" (;) "\n" (comment) "pedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo" (type_definition) "t **pub_key);\n\n/* Індикатор наявності сертифікату */\ntypedef int (va_has_cert_f)(const struct Verify" (typedef) "t **pub" (primitive_type) "key" (function_declarator) ";\n\n/* Індикатор наявності сертифікату */\ntypedef int (va_has_cert_f)(const struct Verif" (parenthesized_declarator) ";\n\n/* Індикатор на" (() ";" (type_identifier) "\n\n/* Індикатор н" ()) "а" (parameter_list) "явності сертифікату */\ntypedef int (va_has_cert_f)(const struct Verif" (() "я" (parameter_declaration) "вності сертифікату */\ntypedef int" (type_qualifier) "вност" (const) "вност" (struct_specifier) " сертифікату */\ntypedef" (struct) " серти" (type_identifier) "ікату */\ntypedef" (pointer_declarator) "int" (*) "i" (identifier) "nt" (,) " " (parameter_declaration) "va_has_cert_f)(const struct Veri" (type_identifier) "va_has_cert_f)(const s" (pointer_declarator) "ruct Veri" (*) "r" (pointer_declarator) "uct Veri" (*) "u" (identifier) "ct Veri" ()) "f" (;) "y" (comment) "apter_st *va, bool *has_cert);\n\n/* Вказівник на функцію установки " (type_definition) "ертифікату */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, co" (typedef) "ертифік" (primitive_type) "ту " (function_declarator) "/\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, c" (parenthesized_declarator) "/\ntypedef int (" (() "/" (type_identifier) "\ntypedef int " ()) "(" (parameter_list) "va_set_cert_f)(const struct VerifyAdapter_st *va, c" (() "v" (parameter_declaration) "a_set_cert_f)(const struct Verify" (type_qualifier) "a_set" (const) "a_set" (struct_specifier) "cert_f)(const struct Ve" (struct) "cert_f" (type_identifier) "(const struct Ve" (pointer_declarator) "ify" (*) "i" (identifier) "fy" (,) "A" (parameter_declaration) "apter_st *va, " (primitive_type) "apte" (pointer_declarator) "_st *va, " (*) "_" (identifier) "st *va, " ()) "c" (;) "o" (comment) "t Certificate_t *cert);\n\n/* Вказівник на функцію отримання сертифікату */\ntypedef int " (type_definition) "va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* Вказівник на " (typedef) "va_get_" (primitive_type) "ert" (function_declarator) "f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* Вказівник на" (parenthesized_declarator) "f)(const struct" (() "f" (type_identifier) ")(const struc" ()) "t" (parameter_list) " VerifyAdapter_st *va, Certificate_t **cert);\n\n/* Вказівник на" (() " " (parameter_declaration) "VerifyAdapter_st *va, Certificate" (type_qualifier) "Verif" (const) "Verif" (struct_specifier) "Adapter_st *va, Certifi" (struct) "Adapte" (type_identifier) "_st *va, Certifi" (pointer_declarator) "ate" (*) "a" (identifier) "te" (,) "_" (parameter_declaration) " **cert);\n\n/* Вказівник н" (type_qualifier) " **ce" (const) " **ce" (type_identifier) "t);\n\n/* Вказі" (pointer_declarator) "ник н" (*) "н" (identifier) "ик н" ()) "а" (;) " " (comment) "нкцію отримання алгоритму гешування */\ntypedef int (va_get_digest_alg_f)(const struct " (type_definition) "erifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* Вказівник на ф" (typedef) "erifyAd" (primitive_type) "pte" (function_declarator) "_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* Вказівник на " (parenthesized_declarator) "_st *va, Digest" (() "_" (type_identifier) "st *va, Diges" ()) "t" (parameter_list) "AlgorithmIdentifier_t **digest_alg_id);\n\n/* Вказівник на " (() "A" (parameter_declaration) "lgorithmIdentifier_t **digest_alg" (type_qualifier) "lgori" (const) "lgori" (struct_specifier) "hmIdentifier_t **digest" (struct) "hmIden" (type_identifier) "ifier_t **digest" (pointer_declarator) "alg" (*) "a" (identifier) "lg" (,) "_" (parameter_declaration) "d);\n\n/* Вказівник на" (type_identifier) "d);\n\n/* Вказі" (pointer_declarator) "ник на" (*) "н" (pointer_declarator) "ик на" (*) "и" (identifier) "к на" ()) " " (;) "ф" (comment) "кцію встановляння алгоритму гешування */\ntypedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *v" (type_definition) ", const DigestAlgorithmIdentifier_t *alg);\n\n/* Вказівник на функцію отримання алгоритму підпису */\ntypedef int (va" (typedef) ", const" (primitive_type) "Dig" (function_declarator) "stAlgorithmIdentifier_t *alg);\n\n/* Вказівник на функцію отримання алгоритму підпису */\ntypedef int (v" (parenthesized_declarator) "stAlgorithmIdentifier" (() "s" (type_identifier) "tAlgorithmIdentifie" ()) "r" (parameter_list) "_t *alg);\n\n/* Вказівник на функцію отримання алгоритму підпису */\ntypedef int (v" (() "_" (parameter_declaration) "t *alg);\n\n/* Вказівник на функцію" (type_qualifier) "t *al" (const) "t *al" (struct_specifier) ");\n\n/* Вказівник на фун" (struct) ");\n\n/*" (type_identifier) "Вказівник на фун" (pointer_declarator) "цію" (*) "ц" (identifier) "ію" (,) " " (parameter_declaration) "тримання алгоритму підпису */\ntypedef int (" (type_identifier) "тримання алгоритму підпису " (pointer_declarator) "/\ntypedef int (" (*) "/" (pointer_declarator) "\ntypedef int (" (*) "\n" (identifier) "typedef int (" ()) "v" (;) "a" (comment) "et_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id);\n\n/* Вказів" (type_definition) "ик на функцію очистки контексту */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef " (typedef) "ик на ф" (primitive_type) "нкц" (function_declarator) "ю очистки контексту */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef" (parenthesized_declarator) "ю очистки контексту *" (() "ю" (type_identifier) " очистки контексту " ()) "*" (parameter_list) "/\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef" (() "/" (parameter_declaration) "\ntypedef void (verify_free_" (struct_specifier) "\ntypedef void (verify_f" (struct) "\ntyped" (type_identifier) "f void (verify_f" (pointer_declarator) "ee_" (*) "e" (identifier) "e_" (,) "f" (parameter_declaration) "(struct VerifyAdapter_st *va);\n\ntypede" (type_qualifier) "(stru" (const) "(stru" (type_identifier) "t VerifyAdapter_st *va);\n\nt" (pointer_declarator) "pede" (*) "p" (identifier) "ede" ()) "f" (;) " " (comment) "ruct VerifyAdapter_st {\n va_verify_data_f *verify_data;\n va_verify_hash_f *verify_hash;\n " (type_definition) "va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_c" (typedef) "va_get_" (primitive_type) "ub_" (function_declarator) "ey_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_" (parenthesized_declarator) "ey_f *get_pub_key;\n" (() "e" (type_identifier) "y_f *get_pub_key;" ()) "\n" (parameter_list) " va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_" (() " " (parameter_declaration) " va_has_cert_f *has_cert;\n v" (type_qualifier) " va" (const) " va" (struct_specifier) "has_cert_f *has_cert;\n " (struct) "has_ce" (type_identifier) "t_f *has_cert;\n " (pointer_declarator) " v" (*) " " (identifier) " v" (,) "a" (parameter_declaration) "get_cert_f *get_cert;\n va_set_cert_f *set" (type_identifier) "get_cert_f *get_cert;\n va_s" (pointer_declarator) "t_cert_f *set" (*) "t" (pointer_declarator) "_cert_f *set" (*) "_" (identifier) "cert_f *set" ()) "_" (;) "c" (comment) "t;\n va_get_digest_alg_f *get_digest_alg;\n va_set_digest_alg_f *set_diges" (type_definition) "_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free" (typedef) "_alg;\n " (primitive_type) " va" (function_declarator) "get_sign_alg_f *get_sign_alg;\n verify_fre" (parenthesized_declarator) "get_sign_alg_f " (() "g" (type_identifier) "et_sign_alg_f" ()) " " (parameter_list) "*get_sign_alg;\n verify_fre" (() "*" (parameter_declaration) "get_sign_alg;\n verify_fr" (struct_specifier) "get_sign_alg;\n verif" (struct) "get_si" (type_identifier) "n_alg;\n verif" (pointer_declarator) "_fr" (*) "_" (identifier) "fr" ()) "e" (;) "e" (type_definition) " *free;\n const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n" (typedef) " *free;" (struct_specifier) " const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n" (struct) " co" (type_identifier) "st void *const c" (field_declaration_list) "x;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n" ({) "x" (field_declaration) "erifyAdapter;\n\n#ifdef __cplusp" (type_identifier) "erifyAdapter;\n\n#" (pointer_declarator) "fdef __cplus" (*) "f" (field_identifier) "def __cplus" (;) "p" (field_declaration) "\n#endif\n\n#endif\n" (type_identifier) "\n#endif\n\n#endif\n" (pointer_declarator) "" (*) "" (field_identifier) "" (;) "" (field_declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (field_identifier) "" (;) "" (field_declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (field_identifier) "" (;) "" (field_declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (field_identifier) "" (;) "" (field_declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (field_identifier) "" (;) "" (field_declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (field_identifier) "" (;) "" (field_declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (field_identifier) "" (;) "" (field_declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (field_identifier) "" (;) "" (field_declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (field_identifier) "" (;) "" (field_declaration) "" (type_qualifier) "" (const) "" (primitive_type) "" (pointer_declarator) "" (*) "" (type_qualifier) "" (const) "" (field_identifier) "" (;) "" (}) "" (type_identifier) "" (;) "" (preproc_ifdef) "" (#ifdef) "" (identifier) "" (#endif) "" (}) "" (#endif) "" (#endif) ""
429
0
{"language": "c", "success": true, "metadata": {"lines": 50, "avg_line_length": 44.92, "nodes": 312, "errors": 0, "source_hash": "38e6a7144e8a9f1c3d2f2459e386cbcc99e12e9db9bcfdf4d90cf37ae4e90d8d", "categorized_nodes": 193}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H\n#define CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H\n\n#include <stdbool.h>\n\n#include \"pkix_structs.h\"\n#include \"byte_array.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct VerifyAdapter_st;\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0415\u0426\u041f */\ntypedef int (va_verify_data_f)(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0415\u0426\u041f */\ntypedef int (va_verify_hash_f)(const struct VerifyAdapter_st *va, const ByteArray *hash, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f SubjectPublicKeyInfo */\ntypedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo_t **pub_key);\n\n/* \u0406\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_has_cert_f)(const struct VerifyAdapter_st *va, bool *has_cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, const Certificate_t *cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0433\u0435\u0448\u0443\u0432\u0430\u043d\u043d\u044f */\ntypedef int (va_get_digest_alg_f)(const struct VerifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044f\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0433\u0435\u0448\u0443\u0432\u0430\u043d\u043d\u044f */\ntypedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *va, const DigestAlgorithmIdentifier_t *alg);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u0456\u0434\u043f\u0438\u0441\u0443 */\ntypedef int (va_get_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef struct VerifyAdapter_st {\n va_verify_data_f *verify_data;\n va_verify_hash_f *verify_hash;\n va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_cert;\n va_get_digest_alg_f *get_digest_alg;\n va_set_digest_alg_f *set_digest_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free_f *free;\n const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 311], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 67, "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": "CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 46}}, {"id": 3, "type": "preproc_def", "text": "#define CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_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": "CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H", "parent": 3, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 46}}, {"id": 6, "type": "preproc_include", "text": "#include <stdbool.h>\n", "parent": 0, "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": "system_lib_string", "text": "<stdbool.h>", "parent": 6, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 20}}, {"id": 9, "type": "preproc_include", "text": "#include \"pkix_structs.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": "\"pkix_structs.h\"", "parent": 9, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 25}}, {"id": 12, "type": "preproc_include", "text": "#include \"byte_array.h\"\n", "parent": 0, "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": "\"byte_array.h\"", "parent": 12, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 23}}, {"id": 15, "type": "preproc_ifdef", "text": "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct VerifyAdapter_st;\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0415\u0426\u041f */\ntypedef int (va_verify_data_f)(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0415\u0426\u041f */\ntypedef int (va_verify_hash_f)(const struct VerifyAdapter_st *va, const ByteArray *hash, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f SubjectPublicKeyInfo */\ntypedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo_t **pub_key);\n\n/* \u0406\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_has_cert_f)(const struct VerifyAdapter_st *va, bool *has_cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, const Certificate_t *cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0433\u0435\u0448\u0443\u0432\u0430\u043d\u043d\u044f */\ntypedef int (va_get_digest_alg_f)(const struct VerifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044f\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0433\u0435\u0448\u0443\u0432\u0430\u043d\u043d\u044f */\ntypedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *va, const DigestAlgorithmIdentifier_t *alg);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u0456\u0434\u043f\u0438\u0441\u0443 */\ntypedef int (va_get_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef struct VerifyAdapter_st {\n va_verify_data_f *verify_data;\n va_verify_hash_f *verify_hash;\n va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_cert;\n va_get_digest_alg_f *get_digest_alg;\n va_set_digest_alg_f *set_digest_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free_f *free;\n const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n", "parent": 0, "children": [16, 17, 18, 310], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 65, "column": 6}}, {"id": 16, "type": "#ifdef", "text": "#ifdef", "parent": 15, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 17, "type": "identifier", "text": "__cplusplus", "parent": 15, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 18}}, {"id": 18, "type": "linkage_specification", "text": "extern \"C\" {\n#endif\n\nstruct VerifyAdapter_st;\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0415\u0426\u041f */\ntypedef int (va_verify_data_f)(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0415\u0426\u041f */\ntypedef int (va_verify_hash_f)(const struct VerifyAdapter_st *va, const ByteArray *hash, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f SubjectPublicKeyInfo */\ntypedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo_t **pub_key);\n\n/* \u0406\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_has_cert_f)(const struct VerifyAdapter_st *va, bool *has_cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, const Certificate_t *cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0433\u0435\u0448\u0443\u0432\u0430\u043d\u043d\u044f */\ntypedef int (va_get_digest_alg_f)(const struct VerifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044f\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0433\u0435\u0448\u0443\u0432\u0430\u043d\u043d\u044f */\ntypedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *va, const DigestAlgorithmIdentifier_t *alg);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u0456\u0434\u043f\u0438\u0441\u0443 */\ntypedef int (va_get_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef struct VerifyAdapter_st {\n va_verify_data_f *verify_data;\n va_verify_hash_f *verify_hash;\n va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_cert;\n va_get_digest_alg_f *get_digest_alg;\n va_set_digest_alg_f *set_digest_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free_f *free;\n const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n", "parent": 15, "children": [19, 20], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 64, "column": 1}}, {"id": 19, "type": "extern", "text": "extern", "parent": 18, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 20, "type": "string_literal", "text": "\"C\"", "parent": 18, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 10}}, {"id": 21, "type": "preproc_call", "text": "#endif\n", "parent": 18, "children": [22], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 22, "type": "preproc_directive", "text": "#endif", "parent": 21, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 23, "type": "struct_specifier", "text": "struct VerifyAdapter_st", "parent": 18, "children": [24, 25], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 23}}, {"id": 24, "type": "struct", "text": "struct", "parent": 23, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 6}}, {"id": 25, "type": "type_identifier", "text": "VerifyAdapter_st", "parent": 23, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 23}}, {"id": 26, "type": "type_definition", "text": "(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440\u0435", "parent": 18, "children": [27, 28, 29], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 112}}, {"id": 27, "type": "typedef", "text": "(const ", "parent": 26, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 28, "type": "primitive_type", "text": "tru", "parent": 26, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 11}}, {"id": 29, "type": "function_declarator", "text": "t VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440", "parent": 26, "children": [30, 32], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 111}}, {"id": 30, "type": "parenthesized_declarator", "text": "t VerifyAdapter_st", "parent": 29, "children": [31], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 30}}, {"id": 31, "type": "type_identifier", "text": " VerifyAdapter_s", "parent": 30, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 29}}, {"id": 32, "type": "parameter_list", "text": " *va, const ByteArray *data, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440", "parent": 29, "children": [33, 41, 47], "start_point": {"row": 20, "column": 30}, "end_point": {"row": 20, "column": 111}}, {"id": 33, "type": "parameter_declaration", "text": "*va, const ByteArray *data, const", "parent": 32, "children": [34, 35, 38], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 64}}, {"id": 34, "type": "type_qualifier", "text": "*va, ", "parent": 33, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 36}}, {"id": 35, "type": "struct_specifier", "text": "onst ByteArray *data, c", "parent": 33, "children": [36, 37], "start_point": {"row": 20, "column": 37}, "end_point": {"row": 20, "column": 60}}, {"id": 36, "type": "struct", "text": "onst B", "parent": 35, "children": [], "start_point": {"row": 20, "column": 37}, "end_point": {"row": 20, "column": 43}}, {"id": 37, "type": "type_identifier", "text": "teArray *data, c", "parent": 35, "children": [], "start_point": {"row": 20, "column": 44}, "end_point": {"row": 20, "column": 60}}, {"id": 38, "type": "pointer_declarator", "text": "nst", "parent": 33, "children": [39, 40], "start_point": {"row": 20, "column": 61}, "end_point": {"row": 20, "column": 64}}, {"id": 39, "type": "*", "text": "n", "parent": 38, "children": [], "start_point": {"row": 20, "column": 61}, "end_point": {"row": 20, "column": 62}}, {"id": 40, "type": "identifier", "text": "st", "parent": 38, "children": [], "start_point": {"row": 20, "column": 62}, "end_point": {"row": 20, "column": 64}}, {"id": 41, "type": "parameter_declaration", "text": "yteArray *sign);\n\n/* ", "parent": 32, "children": [42, 43, 44], "start_point": {"row": 20, "column": 66}, "end_point": {"row": 20, "column": 87}}, {"id": 42, "type": "type_qualifier", "text": "yteAr", "parent": 41, "children": [], "start_point": {"row": 20, "column": 66}, "end_point": {"row": 20, "column": 71}}, {"id": 43, "type": "type_identifier", "text": "ay *sign)", "parent": 41, "children": [], "start_point": {"row": 20, "column": 72}, "end_point": {"row": 20, "column": 81}}, {"id": 44, "type": "pointer_declarator", "text": "\n\n/* ", "parent": 41, "children": [45, 46], "start_point": {"row": 20, "column": 82}, "end_point": {"row": 20, "column": 87}}, {"id": 45, "type": "*", "text": "\n", "parent": 44, "children": [], "start_point": {"row": 20, "column": 82}, "end_point": {"row": 20, "column": 83}}, {"id": 46, "type": "identifier", "text": "\n/* ", "parent": 44, "children": [], "start_point": {"row": 20, "column": 83}, "end_point": {"row": 20, "column": 87}}, {"id": 47, "type": "parameter_declaration", "text": "\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435", "parent": 32, "children": [48, 49, 50], "start_point": {"row": 20, "column": 89}, "end_point": {"row": 20, "column": 110}}, {"id": 48, "type": "type_qualifier", "text": "\u0430\u0437\u0456\u0432\u043d", "parent": 47, "children": [], "start_point": {"row": 20, "column": 89}, "end_point": {"row": 20, "column": 94}}, {"id": 49, "type": "type_identifier", "text": "\u043a \u043d\u0430 \u0444\u0443\u043d\u043a", "parent": 47, "children": [], "start_point": {"row": 20, "column": 95}, "end_point": {"row": 20, "column": 104}}, {"id": 50, "type": "pointer_declarator", "text": "\u0456\u044e \u043f\u0435", "parent": 47, "children": [51, 52], "start_point": {"row": 20, "column": 105}, "end_point": {"row": 20, "column": 110}}, {"id": 51, "type": "*", "text": "\u0456", "parent": 50, "children": [], "start_point": {"row": 20, "column": 105}, "end_point": {"row": 20, "column": 106}}, {"id": 52, "type": "identifier", "text": "\u044e \u043f\u0435", "parent": 50, "children": [], "start_point": {"row": 20, "column": 106}, "end_point": {"row": 20, "column": 110}}, {"id": 53, "type": "type_definition", "text": " *va, const ByteArray *hash, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f SubjectPublicKeyInfo */\n", "parent": 18, "children": [54, 55, 56], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 112}}, {"id": 54, "type": "typedef", "text": " *va, c", "parent": 53, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 55, "type": "primitive_type", "text": "nst", "parent": 53, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 11}}, {"id": 56, "type": "function_declarator", "text": "ByteArray *hash, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f SubjectPublicKeyInfo */", "parent": 53, "children": [57, 59], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 111}}, {"id": 57, "type": "parenthesized_declarator", "text": "ByteArray *hash, c", "parent": 56, "children": [58], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 30}}, {"id": 58, "type": "type_identifier", "text": "yteArray *hash, ", "parent": 57, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 29}}, {"id": 59, "type": "parameter_list", "text": "onst ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f SubjectPublicKeyInfo */", "parent": 56, "children": [60, 68, 74], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 111}}, {"id": 60, "type": "parameter_declaration", "text": "nst ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d", "parent": 59, "children": [61, 62, 65], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 64}}, {"id": 61, "type": "type_qualifier", "text": "nst B", "parent": 60, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 36}}, {"id": 62, "type": "struct_specifier", "text": "teArray *sign);\n\n/* \u0412\u043a\u0430", "parent": 60, "children": [63, 64], "start_point": {"row": 23, "column": 37}, "end_point": {"row": 23, "column": 60}}, {"id": 63, "type": "struct", "text": "teArra", "parent": 62, "children": [], "start_point": {"row": 23, "column": 37}, "end_point": {"row": 23, "column": 43}}, {"id": 64, "type": "type_identifier", "text": " *sign);\n\n/* \u0412\u043a\u0430", "parent": 62, "children": [], "start_point": {"row": 23, "column": 44}, "end_point": {"row": 23, "column": 60}}, {"id": 65, "type": "pointer_declarator", "text": "\u0456\u0432\u043d", "parent": 60, "children": [66, 67], "start_point": {"row": 23, "column": 61}, "end_point": {"row": 23, "column": 64}}, {"id": 66, "type": "*", "text": "\u0456", "parent": 65, "children": [], "start_point": {"row": 23, "column": 61}, "end_point": {"row": 23, "column": 62}}, {"id": 67, "type": "identifier", "text": "\u0432\u043d", "parent": 65, "children": [], "start_point": {"row": 23, "column": 62}, "end_point": {"row": 23, "column": 64}}, {"id": 68, "type": "parameter_declaration", "text": " \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f", "parent": 59, "children": [69, 70, 71], "start_point": {"row": 23, "column": 66}, "end_point": {"row": 23, "column": 87}}, {"id": 69, "type": "type_qualifier", "text": " \u043d\u0430 \u0444", "parent": 68, "children": [], "start_point": {"row": 23, "column": 66}, "end_point": {"row": 23, "column": 71}}, {"id": 70, "type": "type_identifier", "text": "\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440", "parent": 68, "children": [], "start_point": {"row": 23, "column": 72}, "end_point": {"row": 23, "column": 81}}, {"id": 71, "type": "pointer_declarator", "text": "\u043c\u0430\u043d\u043d\u044f", "parent": 68, "children": [72, 73], "start_point": {"row": 23, "column": 82}, "end_point": {"row": 23, "column": 87}}, {"id": 72, "type": "*", "text": "\u043c", "parent": 71, "children": [], "start_point": {"row": 23, "column": 82}, "end_point": {"row": 23, "column": 83}}, {"id": 73, "type": "identifier", "text": "\u0430\u043d\u043d\u044f", "parent": 71, "children": [], "start_point": {"row": 23, "column": 83}, "end_point": {"row": 23, "column": 87}}, {"id": 74, "type": "parameter_declaration", "text": "ubjectPublicKeyInfo *", "parent": 59, "children": [75, 76, 77], "start_point": {"row": 23, "column": 89}, "end_point": {"row": 23, "column": 110}}, {"id": 75, "type": "type_qualifier", "text": "ubjec", "parent": 74, "children": [], "start_point": {"row": 23, "column": 89}, "end_point": {"row": 23, "column": 94}}, {"id": 76, "type": "type_identifier", "text": "PublicKey", "parent": 74, "children": [], "start_point": {"row": 23, "column": 95}, "end_point": {"row": 23, "column": 104}}, {"id": 77, "type": "pointer_declarator", "text": "nfo *", "parent": 74, "children": [78, 79], "start_point": {"row": 23, "column": 105}, "end_point": {"row": 23, "column": 110}}, {"id": 78, "type": "*", "text": "n", "parent": 77, "children": [], "start_point": {"row": 23, "column": 105}, "end_point": {"row": 23, "column": 106}}, {"id": 79, "type": "identifier", "text": "fo *", "parent": 77, "children": [], "start_point": {"row": 23, "column": 106}, "end_point": {"row": 23, "column": 110}}, {"id": 80, "type": "type_definition", "text": "t **pub_key);\n\n/* \u0406\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_has_cert_f)(const struct Verify", "parent": 18, "children": [81, 82, 83], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 100}}, {"id": 81, "type": "typedef", "text": "t **pub", "parent": 80, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 82, "type": "primitive_type", "text": "key", "parent": 80, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 11}}, {"id": 83, "type": "function_declarator", "text": ";\n\n/* \u0406\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_has_cert_f)(const struct Verif", "parent": 80, "children": [84, 86], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 99}}, {"id": 84, "type": "parenthesized_declarator", "text": ";\n\n/* \u0406\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430", "parent": 83, "children": [85], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 30}}, {"id": 85, "type": "type_identifier", "text": "\n\n/* \u0406\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043d", "parent": 84, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 29}}, {"id": 86, "type": "parameter_list", "text": "\u044f\u0432\u043d\u043e\u0441\u0442\u0456 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_has_cert_f)(const struct Verif", "parent": 83, "children": [87, 95], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 99}}, {"id": 87, "type": "parameter_declaration", "text": "\u0432\u043d\u043e\u0441\u0442\u0456 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int", "parent": 86, "children": [88, 89, 92], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 64}}, {"id": 88, "type": "type_qualifier", "text": "\u0432\u043d\u043e\u0441\u0442", "parent": 87, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 36}}, {"id": 89, "type": "struct_specifier", "text": " \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef", "parent": 87, "children": [90, 91], "start_point": {"row": 26, "column": 37}, "end_point": {"row": 26, "column": 60}}, {"id": 90, "type": "struct", "text": " \u0441\u0435\u0440\u0442\u0438", "parent": 89, "children": [], "start_point": {"row": 26, "column": 37}, "end_point": {"row": 26, "column": 43}}, {"id": 91, "type": "type_identifier", "text": "\u0456\u043a\u0430\u0442\u0443 */\ntypedef", "parent": 89, "children": [], "start_point": {"row": 26, "column": 44}, "end_point": {"row": 26, "column": 60}}, {"id": 92, "type": "pointer_declarator", "text": "int", "parent": 87, "children": [93, 94], "start_point": {"row": 26, "column": 61}, "end_point": {"row": 26, "column": 64}}, {"id": 93, "type": "*", "text": "i", "parent": 92, "children": [], "start_point": {"row": 26, "column": 61}, "end_point": {"row": 26, "column": 62}}, {"id": 94, "type": "identifier", "text": "nt", "parent": 92, "children": [], "start_point": {"row": 26, "column": 62}, "end_point": {"row": 26, "column": 64}}, {"id": 95, "type": "parameter_declaration", "text": "va_has_cert_f)(const struct Veri", "parent": 86, "children": [96, 97], "start_point": {"row": 26, "column": 66}, "end_point": {"row": 26, "column": 98}}, {"id": 96, "type": "type_identifier", "text": "va_has_cert_f)(const s", "parent": 95, "children": [], "start_point": {"row": 26, "column": 66}, "end_point": {"row": 26, "column": 88}}, {"id": 97, "type": "pointer_declarator", "text": "ruct Veri", "parent": 95, "children": [98, 99], "start_point": {"row": 26, "column": 89}, "end_point": {"row": 26, "column": 98}}, {"id": 98, "type": "*", "text": "r", "parent": 97, "children": [], "start_point": {"row": 26, "column": 89}, "end_point": {"row": 26, "column": 90}}, {"id": 99, "type": "pointer_declarator", "text": "uct Veri", "parent": 97, "children": [100, 101], "start_point": {"row": 26, "column": 90}, "end_point": {"row": 26, "column": 98}}, {"id": 100, "type": "*", "text": "u", "parent": 99, "children": [], "start_point": {"row": 26, "column": 90}, "end_point": {"row": 26, "column": 91}}, {"id": 101, "type": "identifier", "text": "ct Veri", "parent": 99, "children": [], "start_point": {"row": 26, "column": 91}, "end_point": {"row": 26, "column": 98}}, {"id": 102, "type": "type_definition", "text": "\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, co", "parent": 18, "children": [103, 104, 105], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 79}}, {"id": 103, "type": "typedef", "text": "\u0435\u0440\u0442\u0438\u0444\u0456\u043a", "parent": 102, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 104, "type": "primitive_type", "text": "\u0442\u0443 ", "parent": 102, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 11}}, {"id": 105, "type": "function_declarator", "text": "/\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, c", "parent": 102, "children": [106, 108], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 78}}, {"id": 106, "type": "parenthesized_declarator", "text": "/\ntypedef int (", "parent": 105, "children": [107], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 27}}, {"id": 107, "type": "type_identifier", "text": "\ntypedef int ", "parent": 106, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 26}}, {"id": 108, "type": "parameter_list", "text": "va_set_cert_f)(const struct VerifyAdapter_st *va, c", "parent": 105, "children": [109, 117], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 78}}, {"id": 109, "type": "parameter_declaration", "text": "a_set_cert_f)(const struct Verify", "parent": 108, "children": [110, 111, 114], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 61}}, {"id": 110, "type": "type_qualifier", "text": "a_set", "parent": 109, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 33}}, {"id": 111, "type": "struct_specifier", "text": "cert_f)(const struct Ve", "parent": 109, "children": [112, 113], "start_point": {"row": 29, "column": 34}, "end_point": {"row": 29, "column": 57}}, {"id": 112, "type": "struct", "text": "cert_f", "parent": 111, "children": [], "start_point": {"row": 29, "column": 34}, "end_point": {"row": 29, "column": 40}}, {"id": 113, "type": "type_identifier", "text": "(const struct Ve", "parent": 111, "children": [], "start_point": {"row": 29, "column": 41}, "end_point": {"row": 29, "column": 57}}, {"id": 114, "type": "pointer_declarator", "text": "ify", "parent": 109, "children": [115, 116], "start_point": {"row": 29, "column": 58}, "end_point": {"row": 29, "column": 61}}, {"id": 115, "type": "*", "text": "i", "parent": 114, "children": [], "start_point": {"row": 29, "column": 58}, "end_point": {"row": 29, "column": 59}}, {"id": 116, "type": "identifier", "text": "fy", "parent": 114, "children": [], "start_point": {"row": 29, "column": 59}, "end_point": {"row": 29, "column": 61}}, {"id": 117, "type": "parameter_declaration", "text": "apter_st *va, ", "parent": 108, "children": [118, 119], "start_point": {"row": 29, "column": 63}, "end_point": {"row": 29, "column": 77}}, {"id": 118, "type": "primitive_type", "text": "apte", "parent": 117, "children": [], "start_point": {"row": 29, "column": 63}, "end_point": {"row": 29, "column": 67}}, {"id": 119, "type": "pointer_declarator", "text": "_st *va, ", "parent": 117, "children": [120, 121], "start_point": {"row": 29, "column": 68}, "end_point": {"row": 29, "column": 77}}, {"id": 120, "type": "*", "text": "_", "parent": 119, "children": [], "start_point": {"row": 29, "column": 68}, "end_point": {"row": 29, "column": 69}}, {"id": 121, "type": "identifier", "text": "st *va, ", "parent": 119, "children": [], "start_point": {"row": 29, "column": 69}, "end_point": {"row": 29, "column": 77}}, {"id": 122, "type": "type_definition", "text": "va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 ", "parent": 18, "children": [123, 124, 125], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 90}}, {"id": 123, "type": "typedef", "text": "va_get_", "parent": 122, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 124, "type": "primitive_type", "text": "ert", "parent": 122, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 11}}, {"id": 125, "type": "function_declarator", "text": "f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430", "parent": 122, "children": [126, 128], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 89}}, {"id": 126, "type": "parenthesized_declarator", "text": "f)(const struct", "parent": 125, "children": [127], "start_point": {"row": 32, "column": 12}, "end_point": {"row": 32, "column": 27}}, {"id": 127, "type": "type_identifier", "text": ")(const struc", "parent": 126, "children": [], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 26}}, {"id": 128, "type": "parameter_list", "text": " VerifyAdapter_st *va, Certificate_t **cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430", "parent": 125, "children": [129, 137], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 89}}, {"id": 129, "type": "parameter_declaration", "text": "VerifyAdapter_st *va, Certificate", "parent": 128, "children": [130, 131, 134], "start_point": {"row": 32, "column": 28}, "end_point": {"row": 32, "column": 61}}, {"id": 130, "type": "type_qualifier", "text": "Verif", "parent": 129, "children": [], "start_point": {"row": 32, "column": 28}, "end_point": {"row": 32, "column": 33}}, {"id": 131, "type": "struct_specifier", "text": "Adapter_st *va, Certifi", "parent": 129, "children": [132, 133], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 57}}, {"id": 132, "type": "struct", "text": "Adapte", "parent": 131, "children": [], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 40}}, {"id": 133, "type": "type_identifier", "text": "_st *va, Certifi", "parent": 131, "children": [], "start_point": {"row": 32, "column": 41}, "end_point": {"row": 32, "column": 57}}, {"id": 134, "type": "pointer_declarator", "text": "ate", "parent": 129, "children": [135, 136], "start_point": {"row": 32, "column": 58}, "end_point": {"row": 32, "column": 61}}, {"id": 135, "type": "*", "text": "a", "parent": 134, "children": [], "start_point": {"row": 32, "column": 58}, "end_point": {"row": 32, "column": 59}}, {"id": 136, "type": "identifier", "text": "te", "parent": 134, "children": [], "start_point": {"row": 32, "column": 59}, "end_point": {"row": 32, "column": 61}}, {"id": 137, "type": "parameter_declaration", "text": " **cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d", "parent": 128, "children": [138, 139, 140], "start_point": {"row": 32, "column": 63}, "end_point": {"row": 32, "column": 88}}, {"id": 138, "type": "type_qualifier", "text": " **ce", "parent": 137, "children": [], "start_point": {"row": 32, "column": 63}, "end_point": {"row": 32, "column": 68}}, {"id": 139, "type": "type_identifier", "text": "t);\n\n/* \u0412\u043a\u0430\u0437\u0456", "parent": 137, "children": [], "start_point": {"row": 32, "column": 69}, "end_point": {"row": 32, "column": 82}}, {"id": 140, "type": "pointer_declarator", "text": "\u043d\u0438\u043a \u043d", "parent": 137, "children": [141, 142], "start_point": {"row": 32, "column": 83}, "end_point": {"row": 32, "column": 88}}, {"id": 141, "type": "*", "text": "\u043d", "parent": 140, "children": [], "start_point": {"row": 32, "column": 83}, "end_point": {"row": 32, "column": 84}}, {"id": 142, "type": "identifier", "text": "\u0438\u043a \u043d", "parent": 140, "children": [], "start_point": {"row": 32, "column": 84}, "end_point": {"row": 32, "column": 88}}, {"id": 143, "type": "type_definition", "text": "erifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444", "parent": 18, "children": [144, 145, 146], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 85}}, {"id": 144, "type": "typedef", "text": "erifyAd", "parent": 143, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 145, "type": "primitive_type", "text": "pte", "parent": 143, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 11}}, {"id": 146, "type": "function_declarator", "text": "_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 ", "parent": 143, "children": [147, 149], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 84}}, {"id": 147, "type": "parenthesized_declarator", "text": "_st *va, Digest", "parent": 146, "children": [148], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 27}}, {"id": 148, "type": "type_identifier", "text": "st *va, Diges", "parent": 147, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 26}}, {"id": 149, "type": "parameter_list", "text": "AlgorithmIdentifier_t **digest_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 ", "parent": 146, "children": [150, 158], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 84}}, {"id": 150, "type": "parameter_declaration", "text": "lgorithmIdentifier_t **digest_alg", "parent": 149, "children": [151, 152, 155], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 61}}, {"id": 151, "type": "type_qualifier", "text": "lgori", "parent": 150, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 33}}, {"id": 152, "type": "struct_specifier", "text": "hmIdentifier_t **digest", "parent": 150, "children": [153, 154], "start_point": {"row": 35, "column": 34}, "end_point": {"row": 35, "column": 57}}, {"id": 153, "type": "struct", "text": "hmIden", "parent": 152, "children": [], "start_point": {"row": 35, "column": 34}, "end_point": {"row": 35, "column": 40}}, {"id": 154, "type": "type_identifier", "text": "ifier_t **digest", "parent": 152, "children": [], "start_point": {"row": 35, "column": 41}, "end_point": {"row": 35, "column": 57}}, {"id": 155, "type": "pointer_declarator", "text": "alg", "parent": 150, "children": [156, 157], "start_point": {"row": 35, "column": 58}, "end_point": {"row": 35, "column": 61}}, {"id": 156, "type": "*", "text": "a", "parent": 155, "children": [], "start_point": {"row": 35, "column": 58}, "end_point": {"row": 35, "column": 59}}, {"id": 157, "type": "identifier", "text": "lg", "parent": 155, "children": [], "start_point": {"row": 35, "column": 59}, "end_point": {"row": 35, "column": 61}}, {"id": 158, "type": "parameter_declaration", "text": "d);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430", "parent": 149, "children": [159, 160], "start_point": {"row": 35, "column": 63}, "end_point": {"row": 35, "column": 83}}, {"id": 159, "type": "type_identifier", "text": "d);\n\n/* \u0412\u043a\u0430\u0437\u0456", "parent": 158, "children": [], "start_point": {"row": 35, "column": 63}, "end_point": {"row": 35, "column": 76}}, {"id": 160, "type": "pointer_declarator", "text": "\u043d\u0438\u043a \u043d\u0430", "parent": 158, "children": [161, 162], "start_point": {"row": 35, "column": 77}, "end_point": {"row": 35, "column": 83}}, {"id": 161, "type": "*", "text": "\u043d", "parent": 160, "children": [], "start_point": {"row": 35, "column": 77}, "end_point": {"row": 35, "column": 78}}, {"id": 162, "type": "pointer_declarator", "text": "\u0438\u043a \u043d\u0430", "parent": 160, "children": [163, 164], "start_point": {"row": 35, "column": 78}, "end_point": {"row": 35, "column": 83}}, {"id": 163, "type": "*", "text": "\u0438", "parent": 162, "children": [], "start_point": {"row": 35, "column": 78}, "end_point": {"row": 35, "column": 79}}, {"id": 164, "type": "identifier", "text": "\u043a \u043d\u0430", "parent": 162, "children": [], "start_point": {"row": 35, "column": 79}, "end_point": {"row": 35, "column": 83}}, {"id": 165, "type": "type_definition", "text": ", const DigestAlgorithmIdentifier_t *alg);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u0456\u0434\u043f\u0438\u0441\u0443 */\ntypedef int (va", "parent": 18, "children": [166, 167, 168], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 114}}, {"id": 166, "type": "typedef", "text": ", const", "parent": 165, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 167, "type": "primitive_type", "text": "Dig", "parent": 165, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 11}}, {"id": 168, "type": "function_declarator", "text": "stAlgorithmIdentifier_t *alg);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u0456\u0434\u043f\u0438\u0441\u0443 */\ntypedef int (v", "parent": 165, "children": [169, 171], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 113}}, {"id": 169, "type": "parenthesized_declarator", "text": "stAlgorithmIdentifier", "parent": 168, "children": [170], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 33}}, {"id": 170, "type": "type_identifier", "text": "tAlgorithmIdentifie", "parent": 169, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 32}}, {"id": 171, "type": "parameter_list", "text": "_t *alg);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u0456\u0434\u043f\u0438\u0441\u0443 */\ntypedef int (v", "parent": 168, "children": [172, 180], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 113}}, {"id": 172, "type": "parameter_declaration", "text": "t *alg);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e", "parent": 171, "children": [173, 174, 177], "start_point": {"row": 38, "column": 34}, "end_point": {"row": 38, "column": 67}}, {"id": 173, "type": "type_qualifier", "text": "t *al", "parent": 172, "children": [], "start_point": {"row": 38, "column": 34}, "end_point": {"row": 38, "column": 39}}, {"id": 174, "type": "struct_specifier", "text": ");\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d", "parent": 172, "children": [175, 176], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 63}}, {"id": 175, "type": "struct", "text": ");\n\n/*", "parent": 174, "children": [], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 46}}, {"id": 176, "type": "type_identifier", "text": "\u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d", "parent": 174, "children": [], "start_point": {"row": 38, "column": 47}, "end_point": {"row": 38, "column": 63}}, {"id": 177, "type": "pointer_declarator", "text": "\u0446\u0456\u044e", "parent": 172, "children": [178, 179], "start_point": {"row": 38, "column": 64}, "end_point": {"row": 38, "column": 67}}, {"id": 178, "type": "*", "text": "\u0446", "parent": 177, "children": [], "start_point": {"row": 38, "column": 64}, "end_point": {"row": 38, "column": 65}}, {"id": 179, "type": "identifier", "text": "\u0456\u044e", "parent": 177, "children": [], "start_point": {"row": 38, "column": 65}, "end_point": {"row": 38, "column": 67}}, {"id": 180, "type": "parameter_declaration", "text": "\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u0456\u0434\u043f\u0438\u0441\u0443 */\ntypedef int (", "parent": 171, "children": [181, 182], "start_point": {"row": 38, "column": 69}, "end_point": {"row": 38, "column": 112}}, {"id": 181, "type": "type_identifier", "text": "\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u0456\u0434\u043f\u0438\u0441\u0443 ", "parent": 180, "children": [], "start_point": {"row": 38, "column": 69}, "end_point": {"row": 38, "column": 96}}, {"id": 182, "type": "pointer_declarator", "text": "/\ntypedef int (", "parent": 180, "children": [183, 184], "start_point": {"row": 38, "column": 97}, "end_point": {"row": 38, "column": 112}}, {"id": 183, "type": "*", "text": "/", "parent": 182, "children": [], "start_point": {"row": 38, "column": 97}, "end_point": {"row": 38, "column": 98}}, {"id": 184, "type": "pointer_declarator", "text": "\ntypedef int (", "parent": 182, "children": [185, 186], "start_point": {"row": 38, "column": 98}, "end_point": {"row": 38, "column": 112}}, {"id": 185, "type": "*", "text": "\n", "parent": 184, "children": [], "start_point": {"row": 38, "column": 98}, "end_point": {"row": 38, "column": 99}}, {"id": 186, "type": "identifier", "text": "typedef int (", "parent": 184, "children": [], "start_point": {"row": 38, "column": 99}, "end_point": {"row": 38, "column": 112}}, {"id": 187, "type": "type_definition", "text": "\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef ", "parent": 18, "children": [188, 189, 190], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 103}}, {"id": 188, "type": "typedef", "text": "\u0438\u043a \u043d\u0430 \u0444", "parent": 187, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 7}}, {"id": 189, "type": "primitive_type", "text": "\u043d\u043a\u0446", "parent": 187, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 11}}, {"id": 190, "type": "function_declarator", "text": "\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef", "parent": 187, "children": [191, 193], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 102}}, {"id": 191, "type": "parenthesized_declarator", "text": "\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 *", "parent": 190, "children": [192], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 33}}, {"id": 192, "type": "type_identifier", "text": " \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 ", "parent": 191, "children": [], "start_point": {"row": 41, "column": 13}, "end_point": {"row": 41, "column": 32}}, {"id": 193, "type": "parameter_list", "text": "/\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef", "parent": 190, "children": [194, 201], "start_point": {"row": 41, "column": 33}, "end_point": {"row": 41, "column": 102}}, {"id": 194, "type": "parameter_declaration", "text": "\ntypedef void (verify_free_", "parent": 193, "children": [195, 198], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 61}}, {"id": 195, "type": "struct_specifier", "text": "\ntypedef void (verify_f", "parent": 194, "children": [196, 197], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 57}}, {"id": 196, "type": "struct", "text": "\ntyped", "parent": 195, "children": [], "start_point": {"row": 41, "column": 34}, "end_point": {"row": 41, "column": 40}}, {"id": 197, "type": "type_identifier", "text": "f void (verify_f", "parent": 195, "children": [], "start_point": {"row": 41, "column": 41}, "end_point": {"row": 41, "column": 57}}, {"id": 198, "type": "pointer_declarator", "text": "ee_", "parent": 194, "children": [199, 200], "start_point": {"row": 41, "column": 58}, "end_point": {"row": 41, "column": 61}}, {"id": 199, "type": "*", "text": "e", "parent": 198, "children": [], "start_point": {"row": 41, "column": 58}, "end_point": {"row": 41, "column": 59}}, {"id": 200, "type": "identifier", "text": "e_", "parent": 198, "children": [], "start_point": {"row": 41, "column": 59}, "end_point": {"row": 41, "column": 61}}, {"id": 201, "type": "parameter_declaration", "text": "(struct VerifyAdapter_st *va);\n\ntypede", "parent": 193, "children": [202, 203, 204], "start_point": {"row": 41, "column": 63}, "end_point": {"row": 41, "column": 101}}, {"id": 202, "type": "type_qualifier", "text": "(stru", "parent": 201, "children": [], "start_point": {"row": 41, "column": 63}, "end_point": {"row": 41, "column": 68}}, {"id": 203, "type": "type_identifier", "text": "t VerifyAdapter_st *va);\n\nt", "parent": 201, "children": [], "start_point": {"row": 41, "column": 69}, "end_point": {"row": 41, "column": 96}}, {"id": 204, "type": "pointer_declarator", "text": "pede", "parent": 201, "children": [205, 206], "start_point": {"row": 41, "column": 97}, "end_point": {"row": 41, "column": 101}}, {"id": 205, "type": "*", "text": "p", "parent": 204, "children": [], "start_point": {"row": 41, "column": 97}, "end_point": {"row": 41, "column": 98}}, {"id": 206, "type": "identifier", "text": "ede", "parent": 204, "children": [], "start_point": {"row": 41, "column": 98}, "end_point": {"row": 41, "column": 101}}, {"id": 207, "type": "type_definition", "text": "va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_c", "parent": 18, "children": [208, 209, 210], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 113}}, {"id": 208, "type": "typedef", "text": "va_get_", "parent": 207, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 209, "type": "primitive_type", "text": "ub_", "parent": 207, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 11}}, {"id": 210, "type": "function_declarator", "text": "ey_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_", "parent": 207, "children": [211, 213], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 112}}, {"id": 211, "type": "parenthesized_declarator", "text": "ey_f *get_pub_key;\n", "parent": 210, "children": [212], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 31}}, {"id": 212, "type": "type_identifier", "text": "y_f *get_pub_key;", "parent": 211, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 30}}, {"id": 213, "type": "parameter_list", "text": " va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_", "parent": 210, "children": [214, 222], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 112}}, {"id": 214, "type": "parameter_declaration", "text": " va_has_cert_f *has_cert;\n v", "parent": 213, "children": [215, 216, 219], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 65}}, {"id": 215, "type": "type_qualifier", "text": " va", "parent": 214, "children": [], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 37}}, {"id": 216, "type": "struct_specifier", "text": "has_cert_f *has_cert;\n ", "parent": 214, "children": [217, 218], "start_point": {"row": 44, "column": 38}, "end_point": {"row": 44, "column": 61}}, {"id": 217, "type": "struct", "text": "has_ce", "parent": 216, "children": [], "start_point": {"row": 44, "column": 38}, "end_point": {"row": 44, "column": 44}}, {"id": 218, "type": "type_identifier", "text": "t_f *has_cert;\n ", "parent": 216, "children": [], "start_point": {"row": 44, "column": 45}, "end_point": {"row": 44, "column": 61}}, {"id": 219, "type": "pointer_declarator", "text": " v", "parent": 214, "children": [220, 221], "start_point": {"row": 44, "column": 62}, "end_point": {"row": 44, "column": 65}}, {"id": 220, "type": "*", "text": " ", "parent": 219, "children": [], "start_point": {"row": 44, "column": 62}, "end_point": {"row": 44, "column": 63}}, {"id": 221, "type": "identifier", "text": " v", "parent": 219, "children": [], "start_point": {"row": 44, "column": 63}, "end_point": {"row": 44, "column": 65}}, {"id": 222, "type": "parameter_declaration", "text": "get_cert_f *get_cert;\n va_set_cert_f *set", "parent": 213, "children": [223, 224], "start_point": {"row": 44, "column": 67}, "end_point": {"row": 44, "column": 111}}, {"id": 223, "type": "type_identifier", "text": "get_cert_f *get_cert;\n va_s", "parent": 222, "children": [], "start_point": {"row": 44, "column": 67}, "end_point": {"row": 44, "column": 97}}, {"id": 224, "type": "pointer_declarator", "text": "t_cert_f *set", "parent": 222, "children": [225, 226], "start_point": {"row": 44, "column": 98}, "end_point": {"row": 44, "column": 111}}, {"id": 225, "type": "*", "text": "t", "parent": 224, "children": [], "start_point": {"row": 44, "column": 98}, "end_point": {"row": 44, "column": 99}}, {"id": 226, "type": "pointer_declarator", "text": "_cert_f *set", "parent": 224, "children": [227, 228], "start_point": {"row": 44, "column": 99}, "end_point": {"row": 44, "column": 111}}, {"id": 227, "type": "*", "text": "_", "parent": 226, "children": [], "start_point": {"row": 44, "column": 99}, "end_point": {"row": 44, "column": 100}}, {"id": 228, "type": "identifier", "text": "cert_f *set", "parent": 226, "children": [], "start_point": {"row": 44, "column": 100}, "end_point": {"row": 44, "column": 111}}, {"id": 229, "type": "type_definition", "text": "_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free", "parent": 18, "children": [230, 231, 232], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 58}}, {"id": 230, "type": "typedef", "text": "_alg;\n ", "parent": 229, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 7}}, {"id": 231, "type": "primitive_type", "text": " va", "parent": 229, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 12}}, {"id": 232, "type": "function_declarator", "text": "get_sign_alg_f *get_sign_alg;\n verify_fre", "parent": 229, "children": [233, 235], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 57}}, {"id": 233, "type": "parenthesized_declarator", "text": "get_sign_alg_f ", "parent": 232, "children": [234], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 28}}, {"id": 234, "type": "type_identifier", "text": "et_sign_alg_f", "parent": 233, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 27}}, {"id": 235, "type": "parameter_list", "text": "*get_sign_alg;\n verify_fre", "parent": 232, "children": [236], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 57}}, {"id": 236, "type": "parameter_declaration", "text": "get_sign_alg;\n verify_fr", "parent": 235, "children": [237, 240], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 56}}, {"id": 237, "type": "struct_specifier", "text": "get_sign_alg;\n verif", "parent": 236, "children": [238, 239], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 52}}, {"id": 238, "type": "struct", "text": "get_si", "parent": 237, "children": [], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 35}}, {"id": 239, "type": "type_identifier", "text": "n_alg;\n verif", "parent": 237, "children": [], "start_point": {"row": 47, "column": 36}, "end_point": {"row": 47, "column": 52}}, {"id": 240, "type": "pointer_declarator", "text": "_fr", "parent": 236, "children": [241, 242], "start_point": {"row": 47, "column": 53}, "end_point": {"row": 47, "column": 56}}, {"id": 241, "type": "*", "text": "_", "parent": 240, "children": [], "start_point": {"row": 47, "column": 53}, "end_point": {"row": 47, "column": 54}}, {"id": 242, "type": "identifier", "text": "fr", "parent": 240, "children": [], "start_point": {"row": 47, "column": 54}, "end_point": {"row": 47, "column": 56}}, {"id": 243, "type": "type_definition", "text": " *free;\n const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n", "parent": 18, "children": [244, 245, 305], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 61, "column": 16}}, {"id": 244, "type": "typedef", "text": " *free;", "parent": 243, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 7}}, {"id": 245, "type": "struct_specifier", "text": " const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n", "parent": 243, "children": [246, 247], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 61, "column": 1}}, {"id": 246, "type": "struct", "text": " co", "parent": 245, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 14}}, {"id": 247, "type": "type_identifier", "text": "st void *const c", "parent": 245, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 31}}, {"id": 248, "type": "field_declaration", "text": "erifyAdapter;\n\n#ifdef __cplusp", "parent": 245, "children": [249, 250], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 34}}, {"id": 249, "type": "type_identifier", "text": "erifyAdapter;\n\n#", "parent": 248, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 20}}, {"id": 250, "type": "pointer_declarator", "text": "fdef __cplus", "parent": 248, "children": [251, 252], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 33}}, {"id": 251, "type": "*", "text": "f", "parent": 250, "children": [], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 22}}, {"id": 252, "type": "field_identifier", "text": "def __cplus", "parent": 250, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 33}}, {"id": 253, "type": "field_declaration", "text": "\n#endif\n\n#endif\n", "parent": 245, "children": [254, 255], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 34}}, {"id": 254, "type": "type_identifier", "text": "\n#endif\n\n#endif\n", "parent": 253, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 20}}, {"id": 255, "type": "pointer_declarator", "text": "", "parent": 253, "children": [256, 257], "start_point": {"row": 51, "column": 21}, "end_point": {"row": 51, "column": 33}}, {"id": 256, "type": "*", "text": "", "parent": 255, "children": [], "start_point": {"row": 51, "column": 21}, "end_point": {"row": 51, "column": 22}}, {"id": 257, "type": "field_identifier", "text": "", "parent": 255, "children": [], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 33}}, {"id": 258, "type": "field_declaration", "text": "", "parent": 245, "children": [259, 260], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 34}}, {"id": 259, "type": "type_identifier", "text": "", "parent": 258, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 20}}, {"id": 260, "type": "pointer_declarator", "text": "", "parent": 258, "children": [261, 262], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 33}}, {"id": 261, "type": "*", "text": "", "parent": 260, "children": [], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 22}}, {"id": 262, "type": "field_identifier", "text": "", "parent": 260, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 33}}, {"id": 263, "type": "field_declaration", "text": "", "parent": 245, "children": [264, 265], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 28}}, {"id": 264, "type": "type_identifier", "text": "", "parent": 263, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 17}}, {"id": 265, "type": "pointer_declarator", "text": "", "parent": 263, "children": [266, 267], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 27}}, {"id": 266, "type": "*", "text": "", "parent": 265, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 19}}, {"id": 267, "type": "field_identifier", "text": "", "parent": 265, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 27}}, {"id": 268, "type": "field_declaration", "text": "", "parent": 245, "children": [269, 270], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 28}}, {"id": 269, "type": "type_identifier", "text": "", "parent": 268, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 17}}, {"id": 270, "type": "pointer_declarator", "text": "", "parent": 268, "children": [271, 272], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 27}}, {"id": 271, "type": "*", "text": "", "parent": 270, "children": [], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 19}}, {"id": 272, "type": "field_identifier", "text": "", "parent": 270, "children": [], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 27}}, {"id": 273, "type": "field_declaration", "text": "", "parent": 245, "children": [274, 275], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 28}}, {"id": 274, "type": "type_identifier", "text": "", "parent": 273, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 17}}, {"id": 275, "type": "pointer_declarator", "text": "", "parent": 273, "children": [276, 277], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 27}}, {"id": 276, "type": "*", "text": "", "parent": 275, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 19}}, {"id": 277, "type": "field_identifier", "text": "", "parent": 275, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 27}}, {"id": 278, "type": "field_declaration", "text": "", "parent": 245, "children": [279, 280], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 40}}, {"id": 279, "type": "type_identifier", "text": "", "parent": 278, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 23}}, {"id": 280, "type": "pointer_declarator", "text": "", "parent": 278, "children": [281, 282], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 39}}, {"id": 281, "type": "*", "text": "", "parent": 280, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 25}}, {"id": 282, "type": "field_identifier", "text": "", "parent": 280, "children": [], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 39}}, {"id": 283, "type": "field_declaration", "text": "", "parent": 245, "children": [284, 285], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 40}}, {"id": 284, "type": "type_identifier", "text": "", "parent": 283, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 23}}, {"id": 285, "type": "pointer_declarator", "text": "", "parent": 283, "children": [286, 287], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 39}}, {"id": 286, "type": "*", "text": "", "parent": 285, "children": [], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 25}}, {"id": 287, "type": "field_identifier", "text": "", "parent": 285, "children": [], "start_point": {"row": 57, "column": 25}, "end_point": {"row": 57, "column": 39}}, {"id": 288, "type": "field_declaration", "text": "", "parent": 245, "children": [289, 290], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 36}}, {"id": 289, "type": "type_identifier", "text": "", "parent": 288, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 21}}, {"id": 290, "type": "pointer_declarator", "text": "", "parent": 288, "children": [291, 292], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 35}}, {"id": 291, "type": "*", "text": "", "parent": 290, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 23}}, {"id": 292, "type": "field_identifier", "text": "", "parent": 290, "children": [], "start_point": {"row": 58, "column": 23}, "end_point": {"row": 58, "column": 35}}, {"id": 293, "type": "field_declaration", "text": "", "parent": 245, "children": [294, 295], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 24}}, {"id": 294, "type": "type_identifier", "text": "", "parent": 293, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 17}}, {"id": 295, "type": "pointer_declarator", "text": "", "parent": 293, "children": [296, 297], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 23}}, {"id": 296, "type": "*", "text": "", "parent": 295, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 19}}, {"id": 297, "type": "field_identifier", "text": "", "parent": 295, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 23}}, {"id": 298, "type": "field_declaration", "text": "", "parent": 245, "children": [299, 300, 301], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 26}}, {"id": 299, "type": "type_qualifier", "text": "", "parent": 298, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 9}}, {"id": 300, "type": "primitive_type", "text": "", "parent": 298, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 14}}, {"id": 301, "type": "pointer_declarator", "text": "", "parent": 298, "children": [302, 303, 304], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 25}}, {"id": 302, "type": "*", "text": "", "parent": 301, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 16}}, {"id": 303, "type": "type_qualifier", "text": "", "parent": 301, "children": [], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 21}}, {"id": 304, "type": "field_identifier", "text": "", "parent": 301, "children": [], "start_point": {"row": 60, "column": 22}, "end_point": {"row": 60, "column": 25}}, {"id": 305, "type": "type_identifier", "text": "", "parent": 243, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 15}}, {"id": 306, "type": "preproc_ifdef", "text": "", "parent": 18, "children": [307, 308, 309], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 18}}, {"id": 307, "type": "#ifdef", "text": "", "parent": 306, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 6}}, {"id": 308, "type": "identifier", "text": "", "parent": 306, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 18}}, {"id": 309, "type": "#endif", "text": "", "parent": 306, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 18}}, {"id": 310, "type": "#endif", "text": "", "parent": 15, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 6}}, {"id": 311, "type": "#endif", "text": "", "parent": 0, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 6}}]}, "node_categories": {"declarations": {"functions": [29, 56, 83, 105, 125, 146, 168, 190, 210, 232], "variables": [26, 33, 41, 47, 53, 60, 68, 74, 80, 87, 95, 102, 109, 117, 122, 129, 137, 143, 150, 158, 165, 172, 180, 187, 194, 201, 207, 214, 222, 229, 236, 243, 248, 253, 258, 263, 268, 273, 278, 283, 288, 293, 298], "classes": [23, 24, 35, 36, 62, 63, 89, 90, 111, 112, 131, 132, 152, 153, 174, 175, 195, 196, 216, 217, 237, 238, 245, 246], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 15, 16, 17, 18, 25, 31, 34, 37, 40, 42, 43, 46, 48, 49, 52, 58, 61, 64, 67, 69, 70, 73, 75, 76, 79, 85, 88, 91, 94, 96, 101, 107, 110, 113, 116, 121, 127, 130, 133, 136, 138, 139, 142, 148, 151, 154, 157, 159, 164, 170, 173, 176, 179, 181, 186, 192, 197, 200, 202, 203, 206, 212, 215, 218, 221, 223, 228, 234, 239, 242, 247, 249, 252, 254, 257, 259, 262, 264, 267, 269, 272, 274, 277, 279, 282, 284, 287, 289, 292, 294, 297, 299, 303, 304, 305, 306, 307, 308, 309, 310, 311], "returns": [], "exceptions": []}, "expressions": {"calls": [21], "literals": [8, 11, 14, 20], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "t VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "ByteArray *hash, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f SubjectPublicKeyInfo */"}, {"node_id": 83, "universal_type": "function", "name": "", "text_snippet": ";\n\n/* \u0406\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_has_cert_f)(const struct Verif"}, {"node_id": 105, "universal_type": "function", "name": "", "text_snippet": "/\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, c"}, {"node_id": 125, "universal_type": "function", "name": "VerifyAdapter_st", "text_snippet": "f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430"}, {"node_id": 146, "universal_type": "function", "name": "unknown", "text_snippet": "_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 "}, {"node_id": 168, "universal_type": "function", "name": "", "text_snippet": "stAlgorithmIdentifier_t *alg);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u0456\u0434\u043f\u0438\u0441\u0443 */\ntypedef int ("}, {"node_id": 190, "universal_type": "function", "name": "", "text_snippet": "\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef"}, {"node_id": 210, "universal_type": "function", "name": "unknown", "text_snippet": "ey_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_"}, {"node_id": 232, "universal_type": "function", "name": "unknown", "text_snippet": "get_sign_alg_f *get_sign_alg;\n verify_fre"}], "class_declarations": [{"node_id": 23, "universal_type": "class", "name": "VerifyAdapter_st", "text_snippet": "struct VerifyAdapter_st"}, {"node_id": 24, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 35, "universal_type": "class", "name": "unknown", "text_snippet": "onst ByteArray *data, c"}, {"node_id": 36, "universal_type": "class", "name": "unknown", "text_snippet": "onst B"}, {"node_id": 62, "universal_type": "class", "name": "unknown", "text_snippet": "teArray *sign);\n\n/* \u0412\u043a\u0430"}, {"node_id": 63, "universal_type": "class", "name": "unknown", "text_snippet": "teArra"}, {"node_id": 89, "universal_type": "class", "name": "unknown", "text_snippet": " \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef"}, {"node_id": 90, "universal_type": "class", "name": "unknown", "text_snippet": " \u0441\u0435\u0440\u0442\u0438"}, {"node_id": 111, "universal_type": "class", "name": "Ve", "text_snippet": "cert_f)(const struct Ve"}, {"node_id": 112, "universal_type": "class", "name": "unknown", "text_snippet": "cert_f"}, {"node_id": 131, "universal_type": "class", "name": "unknown", "text_snippet": "Adapter_st *va, Certifi"}, {"node_id": 132, "universal_type": "class", "name": "unknown", "text_snippet": "Adapte"}, {"node_id": 152, "universal_type": "class", "name": "unknown", "text_snippet": "hmIdentifier_t **digest"}, {"node_id": 153, "universal_type": "class", "name": "unknown", "text_snippet": "hmIden"}, {"node_id": 174, "universal_type": "class", "name": "unknown", "text_snippet": ");\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d"}, {"node_id": 175, "universal_type": "class", "name": "unknown", "text_snippet": ");\n\n/*"}, {"node_id": 195, "universal_type": "class", "name": "", "text_snippet": "\ntypedef void (verify_f"}, {"node_id": 196, "universal_type": "class", "name": "unknown", "text_snippet": "\ntyped"}, {"node_id": 216, "universal_type": "class", "name": "unknown", "text_snippet": "has_cert_f *has_cert;\n "}, {"node_id": 217, "universal_type": "class", "name": "unknown", "text_snippet": "has_ce"}, {"node_id": 237, "universal_type": "class", "name": "unknown", "text_snippet": "get_sign_alg;\n verif"}, {"node_id": 238, "universal_type": "class", "name": "unknown", "text_snippet": "get_si"}, {"node_id": 245, "universal_type": "class", "name": "*const", "text_snippet": " const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"}, {"node_id": 246, "universal_type": "class", "name": "unknown", "text_snippet": " co"}], "import_statements": [{"node_id": 6, "text": "#include <stdbool.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"pkix_structs.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"byte_array.h\"\n"}, {"node_id": 13, "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 CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H\n#define CRYPTONITE_PKI_CRYPTO_VERIFY_ADAPTER_H\n\n#include <stdbool.h>\n\n#include \"pkix_structs.h\"\n#include \"byte_array.h\"\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nstruct VerifyAdapter_st;\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0415\u0426\u041f */\ntypedef int (va_verify_data_f)(const struct VerifyAdapter_st *va, const ByteArray *data, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0415\u0426\u041f */\ntypedef int (va_verify_hash_f)(const struct VerifyAdapter_st *va, const ByteArray *hash, const ByteArray *sign);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f SubjectPublicKeyInfo */\ntypedef int (va_get_pub_key_f)(const struct VerifyAdapter_st *va, SubjectPublicKeyInfo_t **pub_key);\n\n/* \u0406\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u044f\u0432\u043d\u043e\u0441\u0442\u0456 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_has_cert_f)(const struct VerifyAdapter_st *va, bool *has_cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_set_cert_f)(const struct VerifyAdapter_st *va, const Certificate_t *cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u0443 */\ntypedef int (va_get_cert_f)(const struct VerifyAdapter_st *va, Certificate_t **cert);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0433\u0435\u0448\u0443\u0432\u0430\u043d\u043d\u044f */\ntypedef int (va_get_digest_alg_f)(const struct VerifyAdapter_st *va, DigestAlgorithmIdentifier_t **digest_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044f\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0433\u0435\u0448\u0443\u0432\u0430\u043d\u043d\u044f */\ntypedef int (va_set_digest_alg_f)(struct VerifyAdapter_st *va, const DigestAlgorithmIdentifier_t *alg);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043f\u0456\u0434\u043f\u0438\u0441\u0443 */\ntypedef int (va_get_sign_alg_f)(const struct VerifyAdapter_st *va, SignatureAlgorithmIdentifier_t **sign_alg_id);\n\n/* \u0412\u043a\u0430\u0437\u0456\u0432\u043d\u0438\u043a \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 */\ntypedef void (verify_free_f)(struct VerifyAdapter_st *va);\n\ntypedef struct VerifyAdapter_st {\n va_verify_data_f *verify_data;\n va_verify_hash_f *verify_hash;\n va_get_pub_key_f *get_pub_key;\n va_has_cert_f *has_cert;\n va_get_cert_f *get_cert;\n va_set_cert_f *set_cert;\n va_get_digest_alg_f *get_digest_alg;\n va_set_digest_alg_f *set_digest_alg;\n va_get_sign_alg_f *get_sign_alg;\n verify_free_f *free;\n const void *const ctx;\n} VerifyAdapter;\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"}
80,995
c
#ifndef __NATASHA_STATICCASCADINGREELS3X5_H__ #define __NATASHA_STATICCASCADINGREELS3X5_H__ #include <assert.h> #include <map> #include "../protoc/base.pb.h" #include "reels.h" namespace natasha { class StaticCascadingReels3X5 { public: typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData; typedef std::vector<SymbolBlockData*> SymbolBlockDataList; public: StaticCascadingReels3X5() : m_maxDownNums(-1) {} ~StaticCascadingReels3X5() {} public: void random(::natashapb::RandomResult* pRandomResult, const ::natashapb::UserGameModInfo* pUGMI); void clear(); bool isEmpty() const { return m_lst.empty(); } public: void newRow() { m_lst.push_back(new SymbolBlockData()); } void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb); int getLength() const { return m_lst.size(); } void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; } int getMaxDownNums() const { return m_maxDownNums; } SymbolBlockData* getRow(int row) { assert(row >= 0 && row < m_lst.size()); return m_lst[row]; } ::natashapb::SymbolBlock3X5* getNode(int x, int y) { assert(y >= 0 && y < m_lst.size()); assert(x >= 0 && x < m_maxDownNums); return m_lst[y]->at(x); } protected: void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR); void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR, const ::natashapb::SymbolBlock3X5* pLastSB); protected: int m_maxDownNums; SymbolBlockDataList m_lst; }; } // namespace natasha #endif // __NATASHA_STATICCASCADINGREELS3X5_H__
34.84
44
(translation_unit) "#ifndef __NATASHA_STATICCASCADINGREELS3X5_H__\n#define __NATASHA_STATICCASCADINGREELS3X5_H__\n\n#include <assert.h>\n#include <map>\n#include "../protoc/base.pb.h"\n#include "reels.h"\n\nnamespace natasha {\n\nclass StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;\n typedef std::vector<SymbolBlockData*> SymbolBlockDataList;\n\n public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}\n ~StaticCascadingReels3X5() {}\n\n public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);\n\n void clear();\n\n bool isEmpty() const { return m_lst.empty(); }\n\n public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }\n\n void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);\n\n int getLength() const { return m_lst.size(); }\n\n void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }\n\n int getMaxDownNums() const { return m_maxDownNums; }\n\n SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }\n\n ::natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }\n\n protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);\n\n void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);\n\n protected:\n int m_maxDownNums;\n SymbolBlockDataList m_lst;\n};\n\n} // namespace natasha\n\n#endif // __NATASHA_STATICCASCADINGREELS3X5_H__" (preproc_ifdef) "#ifndef __NATASHA_STATICCASCADINGREELS3X5_H__\n#define __NATASHA_STATICCASCADINGREELS3X5_H__\n\n#include <assert.h>\n#include <map>\n#include "../protoc/base.pb.h"\n#include "reels.h"\n\nnamespace natasha {\n\nclass StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;\n typedef std::vector<SymbolBlockData*> SymbolBlockDataList;\n\n public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}\n ~StaticCascadingReels3X5() {}\n\n public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);\n\n void clear();\n\n bool isEmpty() const { return m_lst.empty(); }\n\n public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }\n\n void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);\n\n int getLength() const { return m_lst.size(); }\n\n void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }\n\n int getMaxDownNums() const { return m_maxDownNums; }\n\n SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }\n\n ::natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }\n\n protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);\n\n void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);\n\n protected:\n int m_maxDownNums;\n SymbolBlockDataList m_lst;\n};\n\n} // namespace natasha\n\n#endif" (#ifndef) "#ifndef" (identifier) "__NATASHA_STATICCASCADINGREELS3X5_H__" (preproc_def) "#define __NATASHA_STATICCASCADINGREELS3X5_H__\n" (#define) "#define" (identifier) "__NATASHA_STATICCASCADINGREELS3X5_H__" (preproc_include) "#include <assert.h>\n" (#include) "#include" (system_lib_string) "<assert.h>" (preproc_include) "#include <map>\n" (#include) "#include" (system_lib_string) "<map>" (preproc_include) "#include "../protoc/base.pb.h"\n" (#include) "#include" (string_literal) ""../protoc/base.pb.h"" (") """ (string_content) "../protoc/base.pb.h" (") """ (preproc_include) "#include "reels.h"\n" (#include) "#include" (string_literal) ""reels.h"" (") """ (string_content) "reels.h" (") """ (function_definition) "namespace natasha {\n\nclass StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;\n typedef std::vector<SymbolBlockData*> SymbolBlockDataList;\n\n public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}\n ~StaticCascadingReels3X5() {}\n\n public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);\n\n void clear();\n\n bool isEmpty() const { return m_lst.empty(); }\n\n public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }\n\n void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);\n\n int getLength() const { return m_lst.size(); }\n\n void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }\n\n int getMaxDownNums() const { return m_maxDownNums; }\n\n SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }\n\n ::natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }\n\n protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);\n\n void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);\n\n protected:\n int m_maxDownNums;\n SymbolBlockDataList m_lst;\n};\n\n}" (type_identifier) "namespace" (identifier) "natasha" (compound_statement) "{\n\nclass StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;\n typedef std::vector<SymbolBlockData*> SymbolBlockDataList;\n\n public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}\n ~StaticCascadingReels3X5() {}\n\n public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);\n\n void clear();\n\n bool isEmpty() const { return m_lst.empty(); }\n\n public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }\n\n void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);\n\n int getLength() const { return m_lst.size(); }\n\n void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }\n\n int getMaxDownNums() const { return m_maxDownNums; }\n\n SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }\n\n ::natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }\n\n protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);\n\n void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);\n\n protected:\n int m_maxDownNums;\n SymbolBlockDataList m_lst;\n};\n\n}" ({) "{" (function_definition) "class StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;\n typedef std::vector<SymbolBlockData*> SymbolBlockDataList;\n\n public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}\n ~StaticCascadingReels3X5() {}\n\n public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);\n\n void clear();\n\n bool isEmpty() const { return m_lst.empty(); }\n\n public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }\n\n void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);\n\n int getLength() const { return m_lst.size(); }\n\n void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }\n\n int getMaxDownNums() const { return m_maxDownNums; }\n\n SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }\n\n ::natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }\n\n protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);\n\n void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);\n\n protected:\n int m_maxDownNums;\n SymbolBlockDataList m_lst;\n}" (type_identifier) "class" (identifier) "StaticCascadingReels3X5" (compound_statement) "{\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;\n typedef std::vector<SymbolBlockData*> SymbolBlockDataList;\n\n public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}\n ~StaticCascadingReels3X5() {}\n\n public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);\n\n void clear();\n\n bool isEmpty() const { return m_lst.empty(); }\n\n public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }\n\n void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);\n\n int getLength() const { return m_lst.size(); }\n\n void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }\n\n int getMaxDownNums() const { return m_maxDownNums; }\n\n SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }\n\n ::natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }\n\n protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);\n\n void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);\n\n protected:\n int m_maxDownNums;\n SymbolBlockDataList m_lst;\n}" ({) "{" (labeled_statement) "public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;" (statement_identifier) "public" (ERROR) ":\n typedef std::vector< :" (:) ":" (type_identifier) "typedef" (identifier) "std" (:) ":" (:) ":" (identifier) "vector" (<) "<" (:) ":" (:) ":" (expression_statement) "natashapb::SymbolBlock3X5*> SymbolBlockData;" (binary_expression) "natashapb::SymbolBlock3X5*> SymbolBlockData" (identifier) "natashapb" (ERROR) "::SymbolBlock3X5*" (:) ":" (:) ":" (identifier) "SymbolBlock3X5" (*) "*" (>) ">" (identifier) "SymbolBlockData" (;) ";" (type_definition) "typedef std::vector<SymbolBlockData*> SymbolBlockDataList;" (typedef) "typedef" (type_identifier) "std" (ERROR) "::vector<SymbolBlockData*>" (:) ":" (:) ":" (type_identifier) "vector" (<) "<" (type_identifier) "SymbolBlockData" (*) "*" (>) ">" (type_identifier) "SymbolBlockDataList" (;) ";" (labeled_statement) "public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}" (statement_identifier) "public" (:) ":" (ERROR) "StaticCascadingReels3X5() : m_maxDownNums(-1)" (call_expression) "StaticCascadingReels3X5()" (identifier) "StaticCascadingReels3X5" (argument_list) "()" (() "(" ()) ")" (:) ":" (call_expression) "m_maxDownNums(-1)" (identifier) "m_maxDownNums" (argument_list) "(-1)" (() "(" (number_literal) "-1" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) "~StaticCascadingReels3X5()" (unary_expression) "~StaticCascadingReels3X5()" (~) "~" (call_expression) "StaticCascadingReels3X5()" (identifier) "StaticCascadingReels3X5" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{}" ({) "{" (}) "}" (labeled_statement) "public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);" (statement_identifier) "public" (:) ":" (declaration) "void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);" (primitive_type) "void" (function_declarator) "random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI)" (identifier) "random" (parameter_list) "(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI)" (() "(" (ERROR) "::" (:) ":" (:) ":" (parameter_declaration) "natashapb::RandomResult* pRandomResult" (type_identifier) "natashapb" (ERROR) "::RandomResult" (:) ":" (:) ":" (identifier) "RandomResult" (pointer_declarator) "* pRandomResult" (*) "*" (identifier) "pRandomResult" (,) "," (parameter_declaration) "const ::natashapb::UserGameModInfo* pUGMI" (type_qualifier) "const" (const) "const" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "natashapb" (ERROR) "::UserGameModInfo" (:) ":" (:) ":" (identifier) "UserGameModInfo" (pointer_declarator) "* pUGMI" (*) "*" (identifier) "pUGMI" ()) ")" (;) ";" (declaration) "void clear();" (primitive_type) "void" (function_declarator) "clear()" (identifier) "clear" (parameter_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "bool isEmpty() const" (primitive_type) "bool" (function_declarator) "isEmpty()" (identifier) "isEmpty" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_lst.empty(); }" ({) "{" (return_statement) "return m_lst.empty();" (return) "return" (call_expression) "m_lst.empty()" (field_expression) "m_lst.empty" (identifier) "m_lst" (.) "." (field_identifier) "empty" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (labeled_statement) "public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }" (statement_identifier) "public" (:) ":" (ERROR) "void newRow()" (primitive_type) "void" (function_declarator) "newRow()" (identifier) "newRow" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ m_lst.push_back(new SymbolBlockData()); }" ({) "{" (expression_statement) "m_lst.push_back(new SymbolBlockData());" (call_expression) "m_lst.push_back(new SymbolBlockData())" (field_expression) "m_lst.push_back" (identifier) "m_lst" (.) "." (field_identifier) "push_back" (argument_list) "(new SymbolBlockData())" (() "(" (ERROR) "new" (identifier) "new" (call_expression) "SymbolBlockData()" (identifier) "SymbolBlockData" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (declaration) "void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);" (primitive_type) "void" (function_declarator) "newColumn(int row, const ::natashapb::SymbolBlock3X5& sb)" (identifier) "newColumn" (parameter_list) "(int row, const ::natashapb::SymbolBlock3X5& sb)" (() "(" (parameter_declaration) "int row" (primitive_type) "int" (identifier) "row" (,) "," (parameter_declaration) "const ::natashapb::SymbolBlock3X5& sb" (type_qualifier) "const" (const) "const" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "natashapb" (ERROR) "::SymbolBlock3X5&" (:) ":" (:) ":" (identifier) "SymbolBlock3X5" (&) "&" (identifier) "sb" ()) ")" (;) ";" (ERROR) "int getLength() const" (primitive_type) "int" (function_declarator) "getLength()" (identifier) "getLength" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_lst.size(); }" ({) "{" (return_statement) "return m_lst.size();" (return) "return" (call_expression) "m_lst.size()" (field_expression) "m_lst.size" (identifier) "m_lst" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }" (primitive_type) "void" (function_declarator) "setMaxDownNums(int maxDownNums)" (identifier) "setMaxDownNums" (parameter_list) "(int maxDownNums)" (() "(" (parameter_declaration) "int maxDownNums" (primitive_type) "int" (identifier) "maxDownNums" ()) ")" (compound_statement) "{ m_maxDownNums = maxDownNums; }" ({) "{" (expression_statement) "m_maxDownNums = maxDownNums;" (assignment_expression) "m_maxDownNums = maxDownNums" (identifier) "m_maxDownNums" (=) "=" (identifier) "maxDownNums" (;) ";" (}) "}" (ERROR) "int getMaxDownNums() const" (primitive_type) "int" (function_declarator) "getMaxDownNums()" (identifier) "getMaxDownNums" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return m_maxDownNums; }" ({) "{" (return_statement) "return m_maxDownNums;" (return) "return" (identifier) "m_maxDownNums" (;) ";" (}) "}" (function_definition) "SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }" (type_identifier) "SymbolBlockData" (pointer_declarator) "* getRow(int row)" (*) "*" (function_declarator) "getRow(int row)" (identifier) "getRow" (parameter_list) "(int row)" (() "(" (parameter_declaration) "int row" (primitive_type) "int" (identifier) "row" ()) ")" (compound_statement) "{\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }" ({) "{" (expression_statement) "assert(row >= 0 && row < m_lst.size());" (call_expression) "assert(row >= 0 && row < m_lst.size())" (identifier) "assert" (argument_list) "(row >= 0 && row < m_lst.size())" (() "(" (binary_expression) "row >= 0 && row < m_lst.size()" (binary_expression) "row >= 0" (identifier) "row" (>=) ">=" (number_literal) "0" (&&) "&&" (binary_expression) "row < m_lst.size()" (identifier) "row" (<) "<" (call_expression) "m_lst.size()" (field_expression) "m_lst.size" (identifier) "m_lst" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (return_statement) "return m_lst[row];" (return) "return" (subscript_expression) "m_lst[row]" (identifier) "m_lst" ([) "[" (identifier) "row" (]) "]" (;) ";" (}) "}" (ERROR) "::" (:) ":" (:) ":" (labeled_statement) "natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }" (statement_identifier) "natashapb" (:) ":" (ERROR) ":SymbolBlock3X5* getNode(int x, int y)" (:) ":" (type_identifier) "SymbolBlock3X5" (pointer_declarator) "* getNode(int x, int y)" (*) "*" (function_declarator) "getNode(int x, int y)" (identifier) "getNode" (parameter_list) "(int x, int y)" (() "(" (parameter_declaration) "int x" (primitive_type) "int" (identifier) "x" (,) "," (parameter_declaration) "int y" (primitive_type) "int" (identifier) "y" ()) ")" (compound_statement) "{\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }" ({) "{" (expression_statement) "assert(y >= 0 && y < m_lst.size());" (call_expression) "assert(y >= 0 && y < m_lst.size())" (identifier) "assert" (argument_list) "(y >= 0 && y < m_lst.size())" (() "(" (binary_expression) "y >= 0 && y < m_lst.size()" (binary_expression) "y >= 0" (identifier) "y" (>=) ">=" (number_literal) "0" (&&) "&&" (binary_expression) "y < m_lst.size()" (identifier) "y" (<) "<" (call_expression) "m_lst.size()" (field_expression) "m_lst.size" (identifier) "m_lst" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (expression_statement) "assert(x >= 0 && x < m_maxDownNums);" (call_expression) "assert(x >= 0 && x < m_maxDownNums)" (identifier) "assert" (argument_list) "(x >= 0 && x < m_maxDownNums)" (() "(" (binary_expression) "x >= 0 && x < m_maxDownNums" (binary_expression) "x >= 0" (identifier) "x" (>=) ">=" (number_literal) "0" (&&) "&&" (binary_expression) "x < m_maxDownNums" (identifier) "x" (<) "<" (identifier) "m_maxDownNums" ()) ")" (;) ";" (return_statement) "return m_lst[y]->at(x);" (return) "return" (call_expression) "m_lst[y]->at(x)" (field_expression) "m_lst[y]->at" (subscript_expression) "m_lst[y]" (identifier) "m_lst" ([) "[" (identifier) "y" (]) "]" (->) "->" (field_identifier) "at" (argument_list) "(x)" (() "(" (identifier) "x" ()) ")" (;) ";" (}) "}" (labeled_statement) "protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);" (statement_identifier) "protected" (:) ":" (declaration) "void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);" (primitive_type) "void" (function_declarator) "randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR)" (identifier) "randomNew" (parameter_list) "(::natashapb::StaticCascadingRandomResult3X5* pSCRR)" (() "(" (ERROR) "::" (:) ":" (:) ":" (parameter_declaration) "natashapb::StaticCascadingRandomResult3X5* pSCRR" (type_identifier) "natashapb" (ERROR) "::StaticCascadingRandomResult3X5" (:) ":" (:) ":" (identifier) "StaticCascadingRandomResult3X5" (pointer_declarator) "* pSCRR" (*) "*" (identifier) "pSCRR" ()) ")" (;) ";" (declaration) "void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);" (primitive_type) "void" (function_declarator) "fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB)" (identifier) "fill" (parameter_list) "(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB)" (() "(" (ERROR) "::" (:) ":" (:) ":" (parameter_declaration) "natashapb::StaticCascadingRandomResult3X5* pSCRR" (type_identifier) "natashapb" (ERROR) "::StaticCascadingRandomResult3X5" (:) ":" (:) ":" (identifier) "StaticCascadingRandomResult3X5" (pointer_declarator) "* pSCRR" (*) "*" (identifier) "pSCRR" (,) "," (parameter_declaration) "const ::natashapb::SymbolBlock3X5* pLastSB" (type_qualifier) "const" (const) "const" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "natashapb" (ERROR) "::SymbolBlock3X5" (:) ":" (:) ":" (identifier) "SymbolBlock3X5" (pointer_declarator) "* pLastSB" (*) "*" (identifier) "pLastSB" ()) ")" (;) ";" (labeled_statement) "protected:\n int m_maxDownNums;" (statement_identifier) "protected" (:) ":" (declaration) "int m_maxDownNums;" (primitive_type) "int" (identifier) "m_maxDownNums" (;) ";" (declaration) "SymbolBlockDataList m_lst;" (type_identifier) "SymbolBlockDataList" (identifier) "m_lst" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace natasha" (#endif) "#endif" (comment) "// __NATASHA_STATICCASCADINGREELS3X5_H__"
490
23
{"language": "c", "success": true, "metadata": {"lines": 44, "avg_line_length": 34.84, "nodes": 278, "errors": 0, "source_hash": "139ca7bc79862113f57b398b21feb28086b06fbceaf4192d77bd099c0ebee939", "categorized_nodes": 181}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __NATASHA_STATICCASCADINGREELS3X5_H__\n#define __NATASHA_STATICCASCADINGREELS3X5_H__\n\n#include <assert.h>\n#include <map>\n#include \"../protoc/base.pb.h\"\n#include \"reels.h\"\n\nnamespace natasha {\n\nclass StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;\n typedef std::vector<SymbolBlockData*> SymbolBlockDataList;\n\n public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}\n ~StaticCascadingReels3X5() {}\n\n public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);\n\n void clear();\n\n bool isEmpty() const { return m_lst.empty(); }\n\n public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }\n\n void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);\n\n int getLength() const { return m_lst.size(); }\n\n void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }\n\n int getMaxDownNums() const { return m_maxDownNums; }\n\n SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }\n\n ::natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }\n\n protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);\n\n void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);\n\n protected:\n int m_maxDownNums;\n SymbolBlockDataList m_lst;\n};\n\n} // namespace natasha\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 277], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 64, "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": "__NATASHA_STATICCASCADINGREELS3X5_H__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 45}}, {"id": 3, "type": "preproc_def", "text": "#define __NATASHA_STATICCASCADINGREELS3X5_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": "__NATASHA_STATICCASCADINGREELS3X5_H__", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 45}}, {"id": 6, "type": "preproc_include", "text": "#include <assert.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": "<assert.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <map>\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": "<map>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 14}}, {"id": 12, "type": "preproc_include", "text": "#include \"../protoc/base.pb.h\"\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": "string_literal", "text": "\"../protoc/base.pb.h\"", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 30}}, {"id": 15, "type": "preproc_include", "text": "#include \"reels.h\"\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": "string_literal", "text": "\"reels.h\"", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 18}}, {"id": 18, "type": "function_definition", "text": "namespace natasha {\n\nclass StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;\n typedef std::vector<SymbolBlockData*> SymbolBlockDataList;\n\n public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}\n ~StaticCascadingReels3X5() {}\n\n public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);\n\n void clear();\n\n bool isEmpty() const { return m_lst.empty(); }\n\n public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }\n\n void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);\n\n int getLength() const { return m_lst.size(); }\n\n void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }\n\n int getMaxDownNums() const { return m_maxDownNums; }\n\n SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }\n\n ::natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }\n\n protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);\n\n void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);\n\n protected:\n int m_maxDownNums;\n SymbolBlockDataList m_lst;\n};\n\n}", "parent": 0, "children": [19, 20], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 19, "type": "type_identifier", "text": "namespace", "parent": 18, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 9}}, {"id": 20, "type": "identifier", "text": "natasha", "parent": 18, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 17}}, {"id": 21, "type": "function_definition", "text": "class StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;\n typedef std::vector<SymbolBlockData*> SymbolBlockDataList;\n\n public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}\n ~StaticCascadingReels3X5() {}\n\n public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);\n\n void clear();\n\n bool isEmpty() const { return m_lst.empty(); }\n\n public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }\n\n void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);\n\n int getLength() const { return m_lst.size(); }\n\n void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }\n\n int getMaxDownNums() const { return m_maxDownNums; }\n\n SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }\n\n ::natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }\n\n protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);\n\n void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);\n\n protected:\n int m_maxDownNums;\n SymbolBlockDataList m_lst;\n}", "parent": 18, "children": [22], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 22, "type": "identifier", "text": "StaticCascadingReels3X5", "parent": 21, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 29}}, {"id": 23, "type": "labeled_statement", "text": "public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;", "parent": 21, "children": [24], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 12, "column": 69}}, {"id": 24, "type": "ERROR", "text": ":\n typedef std::vector< :", "parent": 23, "children": [25, 26, 27, 28], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 12, "column": 24}}, {"id": 25, "type": "type_identifier", "text": "typedef", "parent": 24, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 9}}, {"id": 26, "type": "identifier", "text": "std", "parent": 24, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 13}}, {"id": 27, "type": "identifier", "text": "vector", "parent": 24, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 21}}, {"id": 28, "type": "<", "text": "<", "parent": 24, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 22}}, {"id": 29, "type": "binary_expression", "text": "natashapb::SymbolBlock3X5*> SymbolBlockData", "parent": 23, "children": [30, 31, 34, 35], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 68}}, {"id": 30, "type": "identifier", "text": "natashapb", "parent": 29, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 34}}, {"id": 31, "type": "ERROR", "text": "::SymbolBlock3X5*", "parent": 29, "children": [32, 33], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 51}}, {"id": 32, "type": "identifier", "text": "SymbolBlock3X5", "parent": 31, "children": [], "start_point": {"row": 12, "column": 36}, "end_point": {"row": 12, "column": 50}}, {"id": 33, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 12, "column": 50}, "end_point": {"row": 12, "column": 51}}, {"id": 34, "type": ">", "text": ">", "parent": 29, "children": [], "start_point": {"row": 12, "column": 51}, "end_point": {"row": 12, "column": 52}}, {"id": 35, "type": "identifier", "text": "SymbolBlockData", "parent": 29, "children": [], "start_point": {"row": 12, "column": 53}, "end_point": {"row": 12, "column": 68}}, {"id": 36, "type": "type_definition", "text": "typedef std::vector<SymbolBlockData*> SymbolBlockDataList;", "parent": 21, "children": [37, 38, 39, 45], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 60}}, {"id": 37, "type": "typedef", "text": "typedef", "parent": 36, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 9}}, {"id": 38, "type": "type_identifier", "text": "std", "parent": 36, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 13}}, {"id": 39, "type": "ERROR", "text": "::vector<SymbolBlockData*>", "parent": 36, "children": [40, 41, 42, 43, 44], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 39}}, {"id": 40, "type": "type_identifier", "text": "vector", "parent": 39, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 21}}, {"id": 41, "type": "<", "text": "<", "parent": 39, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 22}}, {"id": 42, "type": "type_identifier", "text": "SymbolBlockData", "parent": 39, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 37}}, {"id": 43, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 38}}, {"id": 44, "type": ">", "text": ">", "parent": 39, "children": [], "start_point": {"row": 13, "column": 38}, "end_point": {"row": 13, "column": 39}}, {"id": 45, "type": "type_identifier", "text": "SymbolBlockDataList", "parent": 36, "children": [], "start_point": {"row": 13, "column": 40}, "end_point": {"row": 13, "column": 59}}, {"id": 46, "type": "labeled_statement", "text": "public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}", "parent": 21, "children": [47], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 16, "column": 50}}, {"id": 47, "type": "ERROR", "text": "StaticCascadingReels3X5() : m_maxDownNums(-1)", "parent": 46, "children": [48, 51], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 47}}, {"id": 48, "type": "call_expression", "text": "StaticCascadingReels3X5()", "parent": 47, "children": [49, 50], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 27}}, {"id": 49, "type": "identifier", "text": "StaticCascadingReels3X5", "parent": 48, "children": [], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 25}}, {"id": 50, "type": "argument_list", "text": "()", "parent": 48, "children": [], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 27}}, {"id": 51, "type": "call_expression", "text": "m_maxDownNums(-1)", "parent": 47, "children": [52, 53], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 47}}, {"id": 52, "type": "identifier", "text": "m_maxDownNums", "parent": 51, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 43}}, {"id": 53, "type": "argument_list", "text": "(-1)", "parent": 51, "children": [54], "start_point": {"row": 16, "column": 43}, "end_point": {"row": 16, "column": 47}}, {"id": 54, "type": "number_literal", "text": "-1", "parent": 53, "children": [], "start_point": {"row": 16, "column": 44}, "end_point": {"row": 16, "column": 46}}, {"id": 55, "type": "unary_expression", "text": "~StaticCascadingReels3X5()", "parent": 21, "children": [56, 57], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 28}}, {"id": 56, "type": "~", "text": "~", "parent": 55, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 3}}, {"id": 57, "type": "call_expression", "text": "StaticCascadingReels3X5()", "parent": 55, "children": [58, 59], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 28}}, {"id": 58, "type": "identifier", "text": "StaticCascadingReels3X5", "parent": 57, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 26}}, {"id": 59, "type": "argument_list", "text": "()", "parent": 57, "children": [], "start_point": {"row": 17, "column": 26}, "end_point": {"row": 17, "column": 28}}, {"id": 60, "type": "labeled_statement", "text": "public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);", "parent": 21, "children": [61], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 21, "column": 57}}, {"id": 61, "type": "declaration", "text": "void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);", "parent": 60, "children": [62, 63], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 21, "column": 57}}, {"id": 62, "type": "primitive_type", "text": "void", "parent": 61, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 6}}, {"id": 63, "type": "function_declarator", "text": "random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI)", "parent": 61, "children": [64, 65], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 21, "column": 56}}, {"id": 64, "type": "identifier", "text": "random", "parent": 63, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 13}}, {"id": 65, "type": "parameter_list", "text": "(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI)", "parent": 63, "children": [66, 73], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 21, "column": 56}}, {"id": 66, "type": "parameter_declaration", "text": "natashapb::RandomResult* pRandomResult", "parent": 65, "children": [67, 68, 70], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 54}}, {"id": 67, "type": "type_identifier", "text": "natashapb", "parent": 66, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 25}}, {"id": 68, "type": "ERROR", "text": "::RandomResult", "parent": 66, "children": [69], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 39}}, {"id": 69, "type": "identifier", "text": "RandomResult", "parent": 68, "children": [], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 39}}, {"id": 70, "type": "pointer_declarator", "text": "* pRandomResult", "parent": 66, "children": [71, 72], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 54}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 20, "column": 39}, "end_point": {"row": 20, "column": 40}}, {"id": 72, "type": "identifier", "text": "pRandomResult", "parent": 70, "children": [], "start_point": {"row": 20, "column": 41}, "end_point": {"row": 20, "column": 54}}, {"id": 73, "type": "parameter_declaration", "text": "const ::natashapb::UserGameModInfo* pUGMI", "parent": 65, "children": [74, 75, 77], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 55}}, {"id": 74, "type": "type_identifier", "text": "natashapb", "parent": 73, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 31}}, {"id": 75, "type": "ERROR", "text": "::UserGameModInfo", "parent": 73, "children": [76], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 48}}, {"id": 76, "type": "identifier", "text": "UserGameModInfo", "parent": 75, "children": [], "start_point": {"row": 21, "column": 33}, "end_point": {"row": 21, "column": 48}}, {"id": 77, "type": "pointer_declarator", "text": "* pUGMI", "parent": 73, "children": [78, 79], "start_point": {"row": 21, "column": 48}, "end_point": {"row": 21, "column": 55}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 21, "column": 48}, "end_point": {"row": 21, "column": 49}}, {"id": 79, "type": "identifier", "text": "pUGMI", "parent": 77, "children": [], "start_point": {"row": 21, "column": 50}, "end_point": {"row": 21, "column": 55}}, {"id": 80, "type": "declaration", "text": "void clear();", "parent": 21, "children": [81, 82], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 15}}, {"id": 81, "type": "primitive_type", "text": "void", "parent": 80, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 6}}, {"id": 82, "type": "function_declarator", "text": "clear()", "parent": 80, "children": [83, 84], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 14}}, {"id": 83, "type": "identifier", "text": "clear", "parent": 82, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 12}}, {"id": 84, "type": "parameter_list", "text": "()", "parent": 82, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 14}}, {"id": 85, "type": "ERROR", "text": "bool isEmpty() const", "parent": 21, "children": [86, 87], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 22}}, {"id": 86, "type": "primitive_type", "text": "bool", "parent": 85, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 6}}, {"id": 87, "type": "function_declarator", "text": "isEmpty()", "parent": 85, "children": [88, 89], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 16}}, {"id": 88, "type": "identifier", "text": "isEmpty", "parent": 87, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 14}}, {"id": 89, "type": "parameter_list", "text": "()", "parent": 87, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 16}}, {"id": 90, "type": "return_statement", "text": "return m_lst.empty();", "parent": 21, "children": [91], "start_point": {"row": 25, "column": 25}, "end_point": {"row": 25, "column": 46}}, {"id": 91, "type": "call_expression", "text": "m_lst.empty()", "parent": 90, "children": [92, 95], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 45}}, {"id": 92, "type": "field_expression", "text": "m_lst.empty", "parent": 91, "children": [93, 94], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 43}}, {"id": 93, "type": "identifier", "text": "m_lst", "parent": 92, "children": [], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 37}}, {"id": 94, "type": "field_identifier", "text": "empty", "parent": 92, "children": [], "start_point": {"row": 25, "column": 38}, "end_point": {"row": 25, "column": 43}}, {"id": 95, "type": "argument_list", "text": "()", "parent": 91, "children": [], "start_point": {"row": 25, "column": 43}, "end_point": {"row": 25, "column": 45}}, {"id": 96, "type": "labeled_statement", "text": "public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }", "parent": 21, "children": [97], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 28, "column": 59}}, {"id": 97, "type": "ERROR", "text": "void newRow()", "parent": 96, "children": [98, 99], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 15}}, {"id": 98, "type": "primitive_type", "text": "void", "parent": 97, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 6}}, {"id": 99, "type": "function_declarator", "text": "newRow()", "parent": 97, "children": [100, 101], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 15}}, {"id": 100, "type": "identifier", "text": "newRow", "parent": 99, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 13}}, {"id": 101, "type": "parameter_list", "text": "()", "parent": 99, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 15}}, {"id": 102, "type": "call_expression", "text": "m_lst.push_back(new SymbolBlockData())", "parent": 96, "children": [103, 106], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 56}}, {"id": 103, "type": "field_expression", "text": "m_lst.push_back", "parent": 102, "children": [104, 105], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 33}}, {"id": 104, "type": "identifier", "text": "m_lst", "parent": 103, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 23}}, {"id": 105, "type": "field_identifier", "text": "push_back", "parent": 103, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 33}}, {"id": 106, "type": "argument_list", "text": "(new SymbolBlockData())", "parent": 102, "children": [107], "start_point": {"row": 28, "column": 33}, "end_point": {"row": 28, "column": 56}}, {"id": 107, "type": "call_expression", "text": "SymbolBlockData()", "parent": 106, "children": [108, 109], "start_point": {"row": 28, "column": 38}, "end_point": {"row": 28, "column": 55}}, {"id": 108, "type": "identifier", "text": "SymbolBlockData", "parent": 107, "children": [], "start_point": {"row": 28, "column": 38}, "end_point": {"row": 28, "column": 53}}, {"id": 109, "type": "argument_list", "text": "()", "parent": 107, "children": [], "start_point": {"row": 28, "column": 53}, "end_point": {"row": 28, "column": 55}}, {"id": 110, "type": "declaration", "text": "void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);", "parent": 21, "children": [111, 112], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 65}}, {"id": 111, "type": "primitive_type", "text": "void", "parent": 110, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 6}}, {"id": 112, "type": "function_declarator", "text": "newColumn(int row, const ::natashapb::SymbolBlock3X5& sb)", "parent": 110, "children": [113, 114], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 64}}, {"id": 113, "type": "identifier", "text": "newColumn", "parent": 112, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 16}}, {"id": 114, "type": "parameter_list", "text": "(int row, const ::natashapb::SymbolBlock3X5& sb)", "parent": 112, "children": [115, 118], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 64}}, {"id": 115, "type": "parameter_declaration", "text": "int row", "parent": 114, "children": [116, 117], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 24}}, {"id": 116, "type": "primitive_type", "text": "int", "parent": 115, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 20}}, {"id": 117, "type": "identifier", "text": "row", "parent": 115, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 24}}, {"id": 118, "type": "parameter_declaration", "text": "const ::natashapb::SymbolBlock3X5& sb", "parent": 114, "children": [119, 120, 122], "start_point": {"row": 30, "column": 26}, "end_point": {"row": 30, "column": 63}}, {"id": 119, "type": "type_identifier", "text": "natashapb", "parent": 118, "children": [], "start_point": {"row": 30, "column": 34}, "end_point": {"row": 30, "column": 43}}, {"id": 120, "type": "ERROR", "text": "::SymbolBlock3X5&", "parent": 118, "children": [121], "start_point": {"row": 30, "column": 43}, "end_point": {"row": 30, "column": 60}}, {"id": 121, "type": "identifier", "text": "SymbolBlock3X5", "parent": 120, "children": [], "start_point": {"row": 30, "column": 45}, "end_point": {"row": 30, "column": 59}}, {"id": 122, "type": "identifier", "text": "sb", "parent": 118, "children": [], "start_point": {"row": 30, "column": 61}, "end_point": {"row": 30, "column": 63}}, {"id": 123, "type": "ERROR", "text": "int getLength() const", "parent": 21, "children": [124, 125], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 23}}, {"id": 124, "type": "primitive_type", "text": "int", "parent": 123, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 5}}, {"id": 125, "type": "function_declarator", "text": "getLength()", "parent": 123, "children": [126, 127], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 17}}, {"id": 126, "type": "identifier", "text": "getLength", "parent": 125, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 15}}, {"id": 127, "type": "parameter_list", "text": "()", "parent": 125, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 17}}, {"id": 128, "type": "return_statement", "text": "return m_lst.size();", "parent": 21, "children": [129], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 46}}, {"id": 129, "type": "call_expression", "text": "m_lst.size()", "parent": 128, "children": [130, 133], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 45}}, {"id": 130, "type": "field_expression", "text": "m_lst.size", "parent": 129, "children": [131, 132], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 43}}, {"id": 131, "type": "identifier", "text": "m_lst", "parent": 130, "children": [], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 38}}, {"id": 132, "type": "field_identifier", "text": "size", "parent": 130, "children": [], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 43}}, {"id": 133, "type": "argument_list", "text": "()", "parent": 129, "children": [], "start_point": {"row": 32, "column": 43}, "end_point": {"row": 32, "column": 45}}, {"id": 134, "type": "function_definition", "text": "void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }", "parent": 21, "children": [135, 136], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 71}}, {"id": 135, "type": "primitive_type", "text": "void", "parent": 134, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 6}}, {"id": 136, "type": "function_declarator", "text": "setMaxDownNums(int maxDownNums)", "parent": 134, "children": [137, 138], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 38}}, {"id": 137, "type": "identifier", "text": "setMaxDownNums", "parent": 136, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 21}}, {"id": 138, "type": "parameter_list", "text": "(int maxDownNums)", "parent": 136, "children": [139], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 38}}, {"id": 139, "type": "parameter_declaration", "text": "int maxDownNums", "parent": 138, "children": [140, 141], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 37}}, {"id": 140, "type": "primitive_type", "text": "int", "parent": 139, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 25}}, {"id": 141, "type": "identifier", "text": "maxDownNums", "parent": 139, "children": [], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 37}}, {"id": 142, "type": "assignment_expression", "text": "m_maxDownNums = maxDownNums", "parent": 134, "children": [143, 144, 145], "start_point": {"row": 34, "column": 41}, "end_point": {"row": 34, "column": 68}}, {"id": 143, "type": "identifier", "text": "m_maxDownNums", "parent": 142, "children": [], "start_point": {"row": 34, "column": 41}, "end_point": {"row": 34, "column": 54}}, {"id": 144, "type": "=", "text": "=", "parent": 142, "children": [], "start_point": {"row": 34, "column": 55}, "end_point": {"row": 34, "column": 56}}, {"id": 145, "type": "identifier", "text": "maxDownNums", "parent": 142, "children": [], "start_point": {"row": 34, "column": 57}, "end_point": {"row": 34, "column": 68}}, {"id": 146, "type": "ERROR", "text": "int getMaxDownNums() const", "parent": 21, "children": [147, 148], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 28}}, {"id": 147, "type": "primitive_type", "text": "int", "parent": 146, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 5}}, {"id": 148, "type": "function_declarator", "text": "getMaxDownNums()", "parent": 146, "children": [149, 150], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 22}}, {"id": 149, "type": "identifier", "text": "getMaxDownNums", "parent": 148, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 20}}, {"id": 150, "type": "parameter_list", "text": "()", "parent": 148, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 22}}, {"id": 151, "type": "return_statement", "text": "return m_maxDownNums;", "parent": 21, "children": [152], "start_point": {"row": 36, "column": 31}, "end_point": {"row": 36, "column": 52}}, {"id": 152, "type": "identifier", "text": "m_maxDownNums", "parent": 151, "children": [], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 51}}, {"id": 153, "type": "function_definition", "text": "SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }", "parent": 21, "children": [154, 155], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 42, "column": 3}}, {"id": 154, "type": "type_identifier", "text": "SymbolBlockData", "parent": 153, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 17}}, {"id": 155, "type": "pointer_declarator", "text": "* getRow(int row)", "parent": 153, "children": [156, 157], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 34}}, {"id": 156, "type": "*", "text": "*", "parent": 155, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 18}}, {"id": 157, "type": "function_declarator", "text": "getRow(int row)", "parent": 155, "children": [158, 159], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 34}}, {"id": 158, "type": "identifier", "text": "getRow", "parent": 157, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 25}}, {"id": 159, "type": "parameter_list", "text": "(int row)", "parent": 157, "children": [160], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 34}}, {"id": 160, "type": "parameter_declaration", "text": "int row", "parent": 159, "children": [161, 162], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 38, "column": 33}}, {"id": 161, "type": "primitive_type", "text": "int", "parent": 160, "children": [], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 38, "column": 29}}, {"id": 162, "type": "identifier", "text": "row", "parent": 160, "children": [], "start_point": {"row": 38, "column": 30}, "end_point": {"row": 38, "column": 33}}, {"id": 163, "type": "call_expression", "text": "assert(row >= 0 && row < m_lst.size())", "parent": 153, "children": [164, 165], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 42}}, {"id": 164, "type": "identifier", "text": "assert", "parent": 163, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 10}}, {"id": 165, "type": "argument_list", "text": "(row >= 0 && row < m_lst.size())", "parent": 163, "children": [166], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 42}}, {"id": 166, "type": "binary_expression", "text": "row >= 0 && row < m_lst.size()", "parent": 165, "children": [167, 171, 172], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 41}}, {"id": 167, "type": "binary_expression", "text": "row >= 0", "parent": 166, "children": [168, 169, 170], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 19}}, {"id": 168, "type": "identifier", "text": "row", "parent": 167, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 14}}, {"id": 169, "type": ">=", "text": ">=", "parent": 167, "children": [], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 17}}, {"id": 170, "type": "number_literal", "text": "0", "parent": 167, "children": [], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 19}}, {"id": 171, "type": "&&", "text": "&&", "parent": 166, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 22}}, {"id": 172, "type": "binary_expression", "text": "row < m_lst.size()", "parent": 166, "children": [173, 174, 175], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 41}}, {"id": 173, "type": "identifier", "text": "row", "parent": 172, "children": [], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 26}}, {"id": 174, "type": "<", "text": "<", "parent": 172, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 28}}, {"id": 175, "type": "call_expression", "text": "m_lst.size()", "parent": 172, "children": [176, 179], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 41}}, {"id": 176, "type": "field_expression", "text": "m_lst.size", "parent": 175, "children": [177, 178], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 39}}, {"id": 177, "type": "identifier", "text": "m_lst", "parent": 176, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 34}}, {"id": 178, "type": "field_identifier", "text": "size", "parent": 176, "children": [], "start_point": {"row": 39, "column": 35}, "end_point": {"row": 39, "column": 39}}, {"id": 179, "type": "argument_list", "text": "()", "parent": 175, "children": [], "start_point": {"row": 39, "column": 39}, "end_point": {"row": 39, "column": 41}}, {"id": 180, "type": "return_statement", "text": "return m_lst[row];", "parent": 153, "children": [181], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 22}}, {"id": 181, "type": "subscript_expression", "text": "m_lst[row]", "parent": 180, "children": [182, 183], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 21}}, {"id": 182, "type": "identifier", "text": "m_lst", "parent": 181, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 16}}, {"id": 183, "type": "identifier", "text": "row", "parent": 181, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 20}}, {"id": 184, "type": "labeled_statement", "text": "natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }", "parent": 21, "children": [185, 186], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 49, "column": 3}}, {"id": 185, "type": "statement_identifier", "text": "natashapb", "parent": 184, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 13}}, {"id": 186, "type": "ERROR", "text": ":SymbolBlock3X5* getNode(int x, int y)", "parent": 184, "children": [187, 188], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 52}}, {"id": 187, "type": "type_identifier", "text": "SymbolBlock3X5", "parent": 186, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 29}}, {"id": 188, "type": "pointer_declarator", "text": "* getNode(int x, int y)", "parent": 186, "children": [189, 190], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 52}}, {"id": 189, "type": "*", "text": "*", "parent": 188, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 30}}, {"id": 190, "type": "function_declarator", "text": "getNode(int x, int y)", "parent": 188, "children": [191, 192], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 52}}, {"id": 191, "type": "identifier", "text": "getNode", "parent": 190, "children": [], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 38}}, {"id": 192, "type": "parameter_list", "text": "(int x, int y)", "parent": 190, "children": [193, 196], "start_point": {"row": 44, "column": 38}, "end_point": {"row": 44, "column": 52}}, {"id": 193, "type": "parameter_declaration", "text": "int x", "parent": 192, "children": [194, 195], "start_point": {"row": 44, "column": 39}, "end_point": {"row": 44, "column": 44}}, {"id": 194, "type": "primitive_type", "text": "int", "parent": 193, "children": [], "start_point": {"row": 44, "column": 39}, "end_point": {"row": 44, "column": 42}}, {"id": 195, "type": "identifier", "text": "x", "parent": 193, "children": [], "start_point": {"row": 44, "column": 43}, "end_point": {"row": 44, "column": 44}}, {"id": 196, "type": "parameter_declaration", "text": "int y", "parent": 192, "children": [197, 198], "start_point": {"row": 44, "column": 46}, "end_point": {"row": 44, "column": 51}}, {"id": 197, "type": "primitive_type", "text": "int", "parent": 196, "children": [], "start_point": {"row": 44, "column": 46}, "end_point": {"row": 44, "column": 49}}, {"id": 198, "type": "identifier", "text": "y", "parent": 196, "children": [], "start_point": {"row": 44, "column": 50}, "end_point": {"row": 44, "column": 51}}, {"id": 199, "type": "call_expression", "text": "assert(y >= 0 && y < m_lst.size())", "parent": 184, "children": [200, 201], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 38}}, {"id": 200, "type": "identifier", "text": "assert", "parent": 199, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 10}}, {"id": 201, "type": "argument_list", "text": "(y >= 0 && y < m_lst.size())", "parent": 199, "children": [202], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 38}}, {"id": 202, "type": "binary_expression", "text": "y >= 0 && y < m_lst.size()", "parent": 201, "children": [203, 207, 208], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 37}}, {"id": 203, "type": "binary_expression", "text": "y >= 0", "parent": 202, "children": [204, 205, 206], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 17}}, {"id": 204, "type": "identifier", "text": "y", "parent": 203, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 12}}, {"id": 205, "type": ">=", "text": ">=", "parent": 203, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 15}}, {"id": 206, "type": "number_literal", "text": "0", "parent": 203, "children": [], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 17}}, {"id": 207, "type": "&&", "text": "&&", "parent": 202, "children": [], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 20}}, {"id": 208, "type": "binary_expression", "text": "y < m_lst.size()", "parent": 202, "children": [209, 210, 211], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 37}}, {"id": 209, "type": "identifier", "text": "y", "parent": 208, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 22}}, {"id": 210, "type": "<", "text": "<", "parent": 208, "children": [], "start_point": {"row": 45, "column": 23}, "end_point": {"row": 45, "column": 24}}, {"id": 211, "type": "call_expression", "text": "m_lst.size()", "parent": 208, "children": [212, 215], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 37}}, {"id": 212, "type": "field_expression", "text": "m_lst.size", "parent": 211, "children": [213, 214], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 35}}, {"id": 213, "type": "identifier", "text": "m_lst", "parent": 212, "children": [], "start_point": {"row": 45, "column": 25}, "end_point": {"row": 45, "column": 30}}, {"id": 214, "type": "field_identifier", "text": "size", "parent": 212, "children": [], "start_point": {"row": 45, "column": 31}, "end_point": {"row": 45, "column": 35}}, {"id": 215, "type": "argument_list", "text": "()", "parent": 211, "children": [], "start_point": {"row": 45, "column": 35}, "end_point": {"row": 45, "column": 37}}, {"id": 216, "type": "call_expression", "text": "assert(x >= 0 && x < m_maxDownNums)", "parent": 184, "children": [217, 218], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 39}}, {"id": 217, "type": "identifier", "text": "assert", "parent": 216, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 10}}, {"id": 218, "type": "argument_list", "text": "(x >= 0 && x < m_maxDownNums)", "parent": 216, "children": [219], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 39}}, {"id": 219, "type": "binary_expression", "text": "x >= 0 && x < m_maxDownNums", "parent": 218, "children": [220, 224, 225], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 38}}, {"id": 220, "type": "binary_expression", "text": "x >= 0", "parent": 219, "children": [221, 222, 223], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 17}}, {"id": 221, "type": "identifier", "text": "x", "parent": 220, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 12}}, {"id": 222, "type": ">=", "text": ">=", "parent": 220, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 15}}, {"id": 223, "type": "number_literal", "text": "0", "parent": 220, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 17}}, {"id": 224, "type": "&&", "text": "&&", "parent": 219, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 20}}, {"id": 225, "type": "binary_expression", "text": "x < m_maxDownNums", "parent": 219, "children": [226, 227, 228], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 38}}, {"id": 226, "type": "identifier", "text": "x", "parent": 225, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 22}}, {"id": 227, "type": "<", "text": "<", "parent": 225, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 24}}, {"id": 228, "type": "identifier", "text": "m_maxDownNums", "parent": 225, "children": [], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 38}}, {"id": 229, "type": "return_statement", "text": "return m_lst[y]->at(x);", "parent": 184, "children": [230], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 27}}, {"id": 230, "type": "call_expression", "text": "m_lst[y]->at(x)", "parent": 229, "children": [231, 236], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 26}}, {"id": 231, "type": "field_expression", "text": "m_lst[y]->at", "parent": 230, "children": [232, 235], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 23}}, {"id": 232, "type": "subscript_expression", "text": "m_lst[y]", "parent": 231, "children": [233, 234], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 19}}, {"id": 233, "type": "identifier", "text": "m_lst", "parent": 232, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 16}}, {"id": 234, "type": "identifier", "text": "y", "parent": 232, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 18}}, {"id": 235, "type": "field_identifier", "text": "at", "parent": 231, "children": [], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 23}}, {"id": 236, "type": "argument_list", "text": "(x)", "parent": 230, "children": [237], "start_point": {"row": 48, "column": 23}, "end_point": {"row": 48, "column": 26}}, {"id": 237, "type": "identifier", "text": "x", "parent": 236, "children": [], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 25}}, {"id": 238, "type": "labeled_statement", "text": "protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);", "parent": 21, "children": [239], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 52, "column": 69}}, {"id": 239, "type": "declaration", "text": "void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);", "parent": 238, "children": [240, 241], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 69}}, {"id": 240, "type": "primitive_type", "text": "void", "parent": 239, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 6}}, {"id": 241, "type": "function_declarator", "text": "randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR)", "parent": 239, "children": [242, 243], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 68}}, {"id": 242, "type": "identifier", "text": "randomNew", "parent": 241, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 16}}, {"id": 243, "type": "parameter_list", "text": "(::natashapb::StaticCascadingRandomResult3X5* pSCRR)", "parent": 241, "children": [244], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 68}}, {"id": 244, "type": "parameter_declaration", "text": "natashapb::StaticCascadingRandomResult3X5* pSCRR", "parent": 243, "children": [245, 246, 248], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 67}}, {"id": 245, "type": "type_identifier", "text": "natashapb", "parent": 244, "children": [], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 28}}, {"id": 246, "type": "ERROR", "text": "::StaticCascadingRandomResult3X5", "parent": 244, "children": [247], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 60}}, {"id": 247, "type": "identifier", "text": "StaticCascadingRandomResult3X5", "parent": 246, "children": [], "start_point": {"row": 52, "column": 30}, "end_point": {"row": 52, "column": 60}}, {"id": 248, "type": "pointer_declarator", "text": "* pSCRR", "parent": 244, "children": [249, 250], "start_point": {"row": 52, "column": 60}, "end_point": {"row": 52, "column": 67}}, {"id": 249, "type": "*", "text": "*", "parent": 248, "children": [], "start_point": {"row": 52, "column": 60}, "end_point": {"row": 52, "column": 61}}, {"id": 250, "type": "identifier", "text": "pSCRR", "parent": 248, "children": [], "start_point": {"row": 52, "column": 62}, "end_point": {"row": 52, "column": 67}}, {"id": 251, "type": "declaration", "text": "void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);", "parent": 21, "children": [252, 253], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 55, "column": 56}}, {"id": 252, "type": "primitive_type", "text": "void", "parent": 251, "children": [], "start_point": {"row": 54, "column": 2}, "end_point": {"row": 54, "column": 6}}, {"id": 253, "type": "function_declarator", "text": "fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB)", "parent": 251, "children": [254, 255], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 55, "column": 55}}, {"id": 254, "type": "identifier", "text": "fill", "parent": 253, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 11}}, {"id": 255, "type": "parameter_list", "text": "(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB)", "parent": 253, "children": [256, 263], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 55, "column": 55}}, {"id": 256, "type": "parameter_declaration", "text": "natashapb::StaticCascadingRandomResult3X5* pSCRR", "parent": 255, "children": [257, 258, 260], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 62}}, {"id": 257, "type": "type_identifier", "text": "natashapb", "parent": 256, "children": [], "start_point": {"row": 54, "column": 14}, "end_point": {"row": 54, "column": 23}}, {"id": 258, "type": "ERROR", "text": "::StaticCascadingRandomResult3X5", "parent": 256, "children": [259], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 55}}, {"id": 259, "type": "identifier", "text": "StaticCascadingRandomResult3X5", "parent": 258, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 55}}, {"id": 260, "type": "pointer_declarator", "text": "* pSCRR", "parent": 256, "children": [261, 262], "start_point": {"row": 54, "column": 55}, "end_point": {"row": 54, "column": 62}}, {"id": 261, "type": "*", "text": "*", "parent": 260, "children": [], "start_point": {"row": 54, "column": 55}, "end_point": {"row": 54, "column": 56}}, {"id": 262, "type": "identifier", "text": "pSCRR", "parent": 260, "children": [], "start_point": {"row": 54, "column": 57}, "end_point": {"row": 54, "column": 62}}, {"id": 263, "type": "parameter_declaration", "text": "const ::natashapb::SymbolBlock3X5* pLastSB", "parent": 255, "children": [264, 265, 267], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 54}}, {"id": 264, "type": "type_identifier", "text": "natashapb", "parent": 263, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 29}}, {"id": 265, "type": "ERROR", "text": "::SymbolBlock3X5", "parent": 263, "children": [266], "start_point": {"row": 55, "column": 29}, "end_point": {"row": 55, "column": 45}}, {"id": 266, "type": "identifier", "text": "SymbolBlock3X5", "parent": 265, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 45}}, {"id": 267, "type": "pointer_declarator", "text": "* pLastSB", "parent": 263, "children": [268, 269], "start_point": {"row": 55, "column": 45}, "end_point": {"row": 55, "column": 54}}, {"id": 268, "type": "*", "text": "*", "parent": 267, "children": [], "start_point": {"row": 55, "column": 45}, "end_point": {"row": 55, "column": 46}}, {"id": 269, "type": "identifier", "text": "pLastSB", "parent": 267, "children": [], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 54}}, {"id": 270, "type": "labeled_statement", "text": "protected:\n int m_maxDownNums;", "parent": 21, "children": [271], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 58, "column": 20}}, {"id": 271, "type": "declaration", "text": "int m_maxDownNums;", "parent": 270, "children": [272, 273], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 20}}, {"id": 272, "type": "primitive_type", "text": "int", "parent": 271, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 5}}, {"id": 273, "type": "identifier", "text": "m_maxDownNums", "parent": 271, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 19}}, {"id": 274, "type": "declaration", "text": "SymbolBlockDataList m_lst;", "parent": 21, "children": [275, 276], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 28}}, {"id": 275, "type": "type_identifier", "text": "SymbolBlockDataList", "parent": 274, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 21}}, {"id": 276, "type": "identifier", "text": "m_lst", "parent": 274, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 27}}, {"id": 277, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 6}}]}, "node_categories": {"declarations": {"functions": [18, 21, 63, 82, 87, 99, 112, 125, 134, 136, 148, 153, 157, 190, 241, 253], "variables": [36, 61, 66, 73, 80, 110, 115, 118, 139, 160, 193, 196, 239, 244, 251, 256, 263, 271, 274], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16], "modules": [], "enums": []}, "statements": {"expressions": [29, 48, 51, 55, 57, 91, 92, 102, 103, 107, 129, 130, 163, 166, 167, 172, 175, 176, 181, 199, 202, 203, 208, 211, 212, 216, 219, 220, 225, 230, 231, 232], "assignments": [142], "loops": [], "conditionals": [0, 1, 2, 5, 19, 20, 22, 25, 26, 27, 30, 32, 35, 38, 40, 42, 45, 49, 52, 58, 64, 67, 69, 72, 74, 76, 79, 83, 88, 93, 94, 100, 104, 105, 108, 113, 117, 119, 121, 122, 126, 131, 132, 137, 141, 143, 145, 149, 152, 154, 158, 162, 164, 168, 173, 177, 178, 182, 183, 185, 187, 191, 195, 198, 200, 204, 209, 213, 214, 217, 221, 226, 228, 233, 234, 235, 237, 242, 245, 247, 250, 254, 257, 259, 262, 264, 266, 269, 273, 275, 276, 277], "returns": [90, 128, 151, 180, 229], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 54, 170, 206, 223], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 18, "universal_type": "function", "name": "StaticCascadingReels3X5", "text_snippet": "namespace natasha {\n\nclass StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::Sy"}, {"node_id": 21, "universal_type": "function", "name": "StaticCascadingReels3X5", "text_snippet": "class StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> Symbol"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* p"}, {"node_id": 82, "universal_type": "function", "name": "unknown", "text_snippet": "clear()"}, {"node_id": 87, "universal_type": "function", "name": "unknown", "text_snippet": "isEmpty()"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "newRow()"}, {"node_id": 112, "universal_type": "function", "name": "unknown", "text_snippet": "newColumn(int row, const ::natashapb::SymbolBlock3X5& sb)"}, {"node_id": 125, "universal_type": "function", "name": "unknown", "text_snippet": "getLength()"}, {"node_id": 134, "universal_type": "function", "name": "setMaxDownNums", "text_snippet": "void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }"}, {"node_id": 136, "universal_type": "function", "name": "unknown", "text_snippet": "setMaxDownNums(int maxDownNums)"}, {"node_id": 148, "universal_type": "function", "name": "unknown", "text_snippet": "getMaxDownNums()"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row"}, {"node_id": 157, "universal_type": "function", "name": "unknown", "text_snippet": "getRow(int row)"}, {"node_id": 190, "universal_type": "function", "name": "y)", "text_snippet": "getNode(int x, int y)"}, {"node_id": 241, "universal_type": "function", "name": "unknown", "text_snippet": "randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR)"}, {"node_id": 253, "universal_type": "function", "name": "unknown", "text_snippet": "fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <assert.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <map>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"../protoc/base.pb.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"reels.h\"\n"}, {"node_id": 16, "text": "#include"}]}, "original_source_code": "#ifndef __NATASHA_STATICCASCADINGREELS3X5_H__\n#define __NATASHA_STATICCASCADINGREELS3X5_H__\n\n#include <assert.h>\n#include <map>\n#include \"../protoc/base.pb.h\"\n#include \"reels.h\"\n\nnamespace natasha {\n\nclass StaticCascadingReels3X5 {\n public:\n typedef std::vector< ::natashapb::SymbolBlock3X5*> SymbolBlockData;\n typedef std::vector<SymbolBlockData*> SymbolBlockDataList;\n\n public:\n StaticCascadingReels3X5() : m_maxDownNums(-1) {}\n ~StaticCascadingReels3X5() {}\n\n public:\n void random(::natashapb::RandomResult* pRandomResult,\n const ::natashapb::UserGameModInfo* pUGMI);\n\n void clear();\n\n bool isEmpty() const { return m_lst.empty(); }\n\n public:\n void newRow() { m_lst.push_back(new SymbolBlockData()); }\n\n void newColumn(int row, const ::natashapb::SymbolBlock3X5& sb);\n\n int getLength() const { return m_lst.size(); }\n\n void setMaxDownNums(int maxDownNums) { m_maxDownNums = maxDownNums; }\n\n int getMaxDownNums() const { return m_maxDownNums; }\n\n SymbolBlockData* getRow(int row) {\n assert(row >= 0 && row < m_lst.size());\n\n return m_lst[row];\n }\n\n ::natashapb::SymbolBlock3X5* getNode(int x, int y) {\n assert(y >= 0 && y < m_lst.size());\n assert(x >= 0 && x < m_maxDownNums);\n\n return m_lst[y]->at(x);\n }\n\n protected:\n void randomNew(::natashapb::StaticCascadingRandomResult3X5* pSCRR);\n\n void fill(::natashapb::StaticCascadingRandomResult3X5* pSCRR,\n const ::natashapb::SymbolBlock3X5* pLastSB);\n\n protected:\n int m_maxDownNums;\n SymbolBlockDataList m_lst;\n};\n\n} // namespace natasha\n\n#endif // __NATASHA_STATICCASCADINGREELS3X5_H__"}
80,996
c
// // math_lngamma_example.c // // Demonstrates accuracy of lngamma function // #include "liquid.h" #include <stdio.h> #include <stdlib.h> #include <math.h> #define OUTPUT_FILENAME "math_lngamma_example.m" int main() { unsigned int n = 256; // number of steps float zmin = 1e-3f; // minimum value float zmax = 6.00f; // maximum value unsigned int d = n/32; // print every d values to screen // log scale values float xmin = logf(zmin); float xmax = logf(zmax); float dx = (xmax-xmin)/(n-1); FILE * fid = fopen(OUTPUT_FILENAME,"w"); fprintf(fid,"clear all;\n"); fprintf(fid,"close all;\n"); unsigned int i; float z; float g; float x = xmin; // log(z) for (i=0; i<n; i++) { z = expf(x); g = liquid_lngammaf(z); fprintf(fid,"z(%4u) = %16.8e; g(%4u) = %16.8e;\n", i+1, z, i+1, g); if ( (i%d)==0 ) printf("lngamma(%12.8f) = %12.8f\n",z,g); x += dx; } fprintf(fid,"figure;\n"); fprintf(fid,"subplot(2,1,1);\n"); fprintf(fid," semilogx(z,g,z,log(gamma(z)));\n"); fprintf(fid," xlabel('z');\n"); fprintf(fid," ylabel('lngamma(z)');\n"); fprintf(fid,"subplot(2,1,2);\n"); fprintf(fid," loglog(z,abs(log(gamma(z))-g));\n"); fprintf(fid," xlabel('z');\n"); fprintf(fid," ylabel('error');\n"); fclose(fid); printf("results written to %s.\n", OUTPUT_FILENAME); return 0; }
29.74
47
(translation_unit) "//\n// math_lngamma_example.c\n//\n// Demonstrates accuracy of lngamma function\n//\n\n#include "liquid.h"\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n\n#define OUTPUT_FILENAME "math_lngamma_example.m"\n\nint main() {\n unsigned int n = 256; // number of steps\n float zmin = 1e-3f; // minimum value\n float zmax = 6.00f; // maximum value\n\n unsigned int d = n/32; // print every d values to screen\n\n // log scale values\n float xmin = logf(zmin);\n float xmax = logf(zmax);\n float dx = (xmax-xmin)/(n-1);\n\n FILE * fid = fopen(OUTPUT_FILENAME,"w");\n fprintf(fid,"clear all;\n");\n fprintf(fid,"close all;\n");\n unsigned int i;\n float z;\n float g;\n float x = xmin; // log(z)\n for (i=0; i<n; i++) {\n z = expf(x);\n g = liquid_lngammaf(z);\n\n fprintf(fid,"z(%4u) = %16.8e; g(%4u) = %16.8e;\n", i+1, z, i+1, g);\n if ( (i%d)==0 )\n printf("lngamma(%12.8f) = %12.8f\n",z,g);\n x += dx;\n }\n fprintf(fid,"figure;\n");\n fprintf(fid,"subplot(2,1,1);\n");\n fprintf(fid," semilogx(z,g,z,log(gamma(z)));\n");\n fprintf(fid," xlabel('z');\n");\n fprintf(fid," ylabel('lngamma(z)');\n");\n fprintf(fid,"subplot(2,1,2);\n");\n fprintf(fid," loglog(z,abs(log(gamma(z))-g));\n");\n fprintf(fid," xlabel('z');\n");\n fprintf(fid," ylabel('error');\n");\n fclose(fid);\n printf("results written to %s.\n", OUTPUT_FILENAME);\n\n return 0;\n}\n" (comment) "//" (comment) "// math_lngamma_example.c" (comment) "//" (comment) "// Demonstrates accuracy of lngamma function" (comment) "//" (preproc_include) "#include "liquid.h"\n" (#include) "#include" (string_literal) ""liquid.h"" (") """ (string_content) "liquid.h" (") """ (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 <math.h>\n" (#include) "#include" (system_lib_string) "<math.h>" (preproc_def) "#define OUTPUT_FILENAME "math_lngamma_example.m"\n" (#define) "#define" (identifier) "OUTPUT_FILENAME" (preproc_arg) ""math_lngamma_example.m"" (function_definition) "int main() {\n unsigned int n = 256; // number of steps\n float zmin = 1e-3f; // minimum value\n float zmax = 6.00f; // maximum value\n\n unsigned int d = n/32; // print every d values to screen\n\n // log scale values\n float xmin = logf(zmin);\n float xmax = logf(zmax);\n float dx = (xmax-xmin)/(n-1);\n\n FILE * fid = fopen(OUTPUT_FILENAME,"w");\n fprintf(fid,"clear all;\n");\n fprintf(fid,"close all;\n");\n unsigned int i;\n float z;\n float g;\n float x = xmin; // log(z)\n for (i=0; i<n; i++) {\n z = expf(x);\n g = liquid_lngammaf(z);\n\n fprintf(fid,"z(%4u) = %16.8e; g(%4u) = %16.8e;\n", i+1, z, i+1, g);\n if ( (i%d)==0 )\n printf("lngamma(%12.8f) = %12.8f\n",z,g);\n x += dx;\n }\n fprintf(fid,"figure;\n");\n fprintf(fid,"subplot(2,1,1);\n");\n fprintf(fid," semilogx(z,g,z,log(gamma(z)));\n");\n fprintf(fid," xlabel('z');\n");\n fprintf(fid," ylabel('lngamma(z)');\n");\n fprintf(fid,"subplot(2,1,2);\n");\n fprintf(fid," loglog(z,abs(log(gamma(z))-g));\n");\n fprintf(fid," xlabel('z');\n");\n fprintf(fid," ylabel('error');\n");\n fclose(fid);\n printf("results written to %s.\n", OUTPUT_FILENAME);\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n unsigned int n = 256; // number of steps\n float zmin = 1e-3f; // minimum value\n float zmax = 6.00f; // maximum value\n\n unsigned int d = n/32; // print every d values to screen\n\n // log scale values\n float xmin = logf(zmin);\n float xmax = logf(zmax);\n float dx = (xmax-xmin)/(n-1);\n\n FILE * fid = fopen(OUTPUT_FILENAME,"w");\n fprintf(fid,"clear all;\n");\n fprintf(fid,"close all;\n");\n unsigned int i;\n float z;\n float g;\n float x = xmin; // log(z)\n for (i=0; i<n; i++) {\n z = expf(x);\n g = liquid_lngammaf(z);\n\n fprintf(fid,"z(%4u) = %16.8e; g(%4u) = %16.8e;\n", i+1, z, i+1, g);\n if ( (i%d)==0 )\n printf("lngamma(%12.8f) = %12.8f\n",z,g);\n x += dx;\n }\n fprintf(fid,"figure;\n");\n fprintf(fid,"subplot(2,1,1);\n");\n fprintf(fid," semilogx(z,g,z,log(gamma(z)));\n");\n fprintf(fid," xlabel('z');\n");\n fprintf(fid," ylabel('lngamma(z)');\n");\n fprintf(fid,"subplot(2,1,2);\n");\n fprintf(fid," loglog(z,abs(log(gamma(z))-g));\n");\n fprintf(fid," xlabel('z');\n");\n fprintf(fid," ylabel('error');\n");\n fclose(fid);\n printf("results written to %s.\n", OUTPUT_FILENAME);\n\n return 0;\n}" ({) "{" (declaration) "unsigned int n = 256;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "n = 256" (identifier) "n" (=) "=" (number_literal) "256" (;) ";" (comment) "// number of steps" (declaration) "float zmin = 1e-3f;" (primitive_type) "float" (init_declarator) "zmin = 1e-3f" (identifier) "zmin" (=) "=" (number_literal) "1e-3f" (;) ";" (comment) "// minimum value" (declaration) "float zmax = 6.00f;" (primitive_type) "float" (init_declarator) "zmax = 6.00f" (identifier) "zmax" (=) "=" (number_literal) "6.00f" (;) ";" (comment) "// maximum value" (declaration) "unsigned int d = n/32;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "d = n/32" (identifier) "d" (=) "=" (binary_expression) "n/32" (identifier) "n" (/) "/" (number_literal) "32" (;) ";" (comment) "// print every d values to screen" (comment) "// log scale values" (declaration) "float xmin = logf(zmin);" (primitive_type) "float" (init_declarator) "xmin = logf(zmin)" (identifier) "xmin" (=) "=" (call_expression) "logf(zmin)" (identifier) "logf" (argument_list) "(zmin)" (() "(" (identifier) "zmin" ()) ")" (;) ";" (declaration) "float xmax = logf(zmax);" (primitive_type) "float" (init_declarator) "xmax = logf(zmax)" (identifier) "xmax" (=) "=" (call_expression) "logf(zmax)" (identifier) "logf" (argument_list) "(zmax)" (() "(" (identifier) "zmax" ()) ")" (;) ";" (declaration) "float dx = (xmax-xmin)/(n-1);" (primitive_type) "float" (init_declarator) "dx = (xmax-xmin)/(n-1)" (identifier) "dx" (=) "=" (binary_expression) "(xmax-xmin)/(n-1)" (parenthesized_expression) "(xmax-xmin)" (() "(" (binary_expression) "xmax-xmin" (identifier) "xmax" (-) "-" (identifier) "xmin" ()) ")" (/) "/" (parenthesized_expression) "(n-1)" (() "(" (binary_expression) "n-1" (identifier) "n" (-) "-" (number_literal) "1" ()) ")" (;) ";" (declaration) "FILE * fid = fopen(OUTPUT_FILENAME,"w");" (type_identifier) "FILE" (init_declarator) "* fid = fopen(OUTPUT_FILENAME,"w")" (pointer_declarator) "* fid" (*) "*" (identifier) "fid" (=) "=" (call_expression) "fopen(OUTPUT_FILENAME,"w")" (identifier) "fopen" (argument_list) "(OUTPUT_FILENAME,"w")" (() "(" (identifier) "OUTPUT_FILENAME" (,) "," (string_literal) ""w"" (") """ (string_content) "w" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(fid,"clear all;\n");" (call_expression) "fprintf(fid,"clear all;\n")" (identifier) "fprintf" (argument_list) "(fid,"clear all;\n")" (() "(" (identifier) "fid" (,) "," (string_literal) ""clear all;\n"" (") """ (string_content) "clear all;" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(fid,"close all;\n");" (call_expression) "fprintf(fid,"close all;\n")" (identifier) "fprintf" (argument_list) "(fid,"close all;\n")" (() "(" (identifier) "fid" (,) "," (string_literal) ""close all;\n"" (") """ (string_content) "close all;" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (declaration) "unsigned int i;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "i" (;) ";" (declaration) "float z;" (primitive_type) "float" (identifier) "z" (;) ";" (declaration) "float g;" (primitive_type) "float" (identifier) "g" (;) ";" (declaration) "float x = xmin;" (primitive_type) "float" (init_declarator) "x = xmin" (identifier) "x" (=) "=" (identifier) "xmin" (;) ";" (comment) "// log(z)" (for_statement) "for (i=0; i<n; i++) {\n z = expf(x);\n g = liquid_lngammaf(z);\n\n fprintf(fid,"z(%4u) = %16.8e; g(%4u) = %16.8e;\n", i+1, z, i+1, g);\n if ( (i%d)==0 )\n printf("lngamma(%12.8f) = %12.8f\n",z,g);\n x += dx;\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<n" (identifier) "i" (<) "<" (identifier) "n" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n z = expf(x);\n g = liquid_lngammaf(z);\n\n fprintf(fid,"z(%4u) = %16.8e; g(%4u) = %16.8e;\n", i+1, z, i+1, g);\n if ( (i%d)==0 )\n printf("lngamma(%12.8f) = %12.8f\n",z,g);\n x += dx;\n }" ({) "{" (expression_statement) "z = expf(x);" (assignment_expression) "z = expf(x)" (identifier) "z" (=) "=" (call_expression) "expf(x)" (identifier) "expf" (argument_list) "(x)" (() "(" (identifier) "x" ()) ")" (;) ";" (expression_statement) "g = liquid_lngammaf(z);" (assignment_expression) "g = liquid_lngammaf(z)" (identifier) "g" (=) "=" (call_expression) "liquid_lngammaf(z)" (identifier) "liquid_lngammaf" (argument_list) "(z)" (() "(" (identifier) "z" ()) ")" (;) ";" (expression_statement) "fprintf(fid,"z(%4u) = %16.8e; g(%4u) = %16.8e;\n", i+1, z, i+1, g);" (call_expression) "fprintf(fid,"z(%4u) = %16.8e; g(%4u) = %16.8e;\n", i+1, z, i+1, g)" (identifier) "fprintf" (argument_list) "(fid,"z(%4u) = %16.8e; g(%4u) = %16.8e;\n", i+1, z, i+1, g)" (() "(" (identifier) "fid" (,) "," (string_literal) ""z(%4u) = %16.8e; g(%4u) = %16.8e;\n"" (") """ (string_content) "z(%4u) = %16.8e; g(%4u) = %16.8e;" (escape_sequence) "\n" (") """ (,) "," (binary_expression) "i+1" (identifier) "i" (+) "+" (number_literal) "1" (,) "," (identifier) "z" (,) "," (binary_expression) "i+1" (identifier) "i" (+) "+" (number_literal) "1" (,) "," (identifier) "g" ()) ")" (;) ";" (if_statement) "if ( (i%d)==0 )\n printf("lngamma(%12.8f) = %12.8f\n",z,g);" (if) "if" (parenthesized_expression) "( (i%d)==0 )" (() "(" (binary_expression) "(i%d)==0" (parenthesized_expression) "(i%d)" (() "(" (binary_expression) "i%d" (identifier) "i" (%) "%" (identifier) "d" ()) ")" (==) "==" (number_literal) "0" ()) ")" (expression_statement) "printf("lngamma(%12.8f) = %12.8f\n",z,g);" (call_expression) "printf("lngamma(%12.8f) = %12.8f\n",z,g)" (identifier) "printf" (argument_list) "("lngamma(%12.8f) = %12.8f\n",z,g)" (() "(" (string_literal) ""lngamma(%12.8f) = %12.8f\n"" (") """ (string_content) "lngamma(%12.8f) = %12.8f" (escape_sequence) "\n" (") """ (,) "," (identifier) "z" (,) "," (identifier) "g" ()) ")" (;) ";" (expression_statement) "x += dx;" (assignment_expression) "x += dx" (identifier) "x" (+=) "+=" (identifier) "dx" (;) ";" (}) "}" (expression_statement) "fprintf(fid,"figure;\n");" (call_expression) "fprintf(fid,"figure;\n")" (identifier) "fprintf" (argument_list) "(fid,"figure;\n")" (() "(" (identifier) "fid" (,) "," (string_literal) ""figure;\n"" (") """ (string_content) "figure;" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(fid,"subplot(2,1,1);\n");" (call_expression) "fprintf(fid,"subplot(2,1,1);\n")" (identifier) "fprintf" (argument_list) "(fid,"subplot(2,1,1);\n")" (() "(" (identifier) "fid" (,) "," (string_literal) ""subplot(2,1,1);\n"" (") """ (string_content) "subplot(2,1,1);" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(fid," semilogx(z,g,z,log(gamma(z)));\n");" (call_expression) "fprintf(fid," semilogx(z,g,z,log(gamma(z)));\n")" (identifier) "fprintf" (argument_list) "(fid," semilogx(z,g,z,log(gamma(z)));\n")" (() "(" (identifier) "fid" (,) "," (string_literal) "" semilogx(z,g,z,log(gamma(z)));\n"" (") """ (string_content) " semilogx(z,g,z,log(gamma(z)));" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(fid," xlabel('z');\n");" (call_expression) "fprintf(fid," xlabel('z');\n")" (identifier) "fprintf" (argument_list) "(fid," xlabel('z');\n")" (() "(" (identifier) "fid" (,) "," (string_literal) "" xlabel('z');\n"" (") """ (string_content) " xlabel('z');" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(fid," ylabel('lngamma(z)');\n");" (call_expression) "fprintf(fid," ylabel('lngamma(z)');\n")" (identifier) "fprintf" (argument_list) "(fid," ylabel('lngamma(z)');\n")" (() "(" (identifier) "fid" (,) "," (string_literal) "" ylabel('lngamma(z)');\n"" (") """ (string_content) " ylabel('lngamma(z)');" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(fid,"subplot(2,1,2);\n");" (call_expression) "fprintf(fid,"subplot(2,1,2);\n")" (identifier) "fprintf" (argument_list) "(fid,"subplot(2,1,2);\n")" (() "(" (identifier) "fid" (,) "," (string_literal) ""subplot(2,1,2);\n"" (") """ (string_content) "subplot(2,1,2);" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(fid," loglog(z,abs(log(gamma(z))-g));\n");" (call_expression) "fprintf(fid," loglog(z,abs(log(gamma(z))-g));\n")" (identifier) "fprintf" (argument_list) "(fid," loglog(z,abs(log(gamma(z))-g));\n")" (() "(" (identifier) "fid" (,) "," (string_literal) "" loglog(z,abs(log(gamma(z))-g));\n"" (") """ (string_content) " loglog(z,abs(log(gamma(z))-g));" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(fid," xlabel('z');\n");" (call_expression) "fprintf(fid," xlabel('z');\n")" (identifier) "fprintf" (argument_list) "(fid," xlabel('z');\n")" (() "(" (identifier) "fid" (,) "," (string_literal) "" xlabel('z');\n"" (") """ (string_content) " xlabel('z');" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(fid," ylabel('error');\n");" (call_expression) "fprintf(fid," ylabel('error');\n")" (identifier) "fprintf" (argument_list) "(fid," ylabel('error');\n")" (() "(" (identifier) "fid" (,) "," (string_literal) "" ylabel('error');\n"" (") """ (string_content) " ylabel('error');" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fclose(fid);" (call_expression) "fclose(fid)" (identifier) "fclose" (argument_list) "(fid)" (() "(" (identifier) "fid" ()) ")" (;) ";" (expression_statement) "printf("results written to %s.\n", OUTPUT_FILENAME);" (call_expression) "printf("results written to %s.\n", OUTPUT_FILENAME)" (identifier) "printf" (argument_list) "("results written to %s.\n", OUTPUT_FILENAME)" (() "(" (string_literal) ""results written to %s.\n"" (") """ (string_content) "results written to %s." (escape_sequence) "\n" (") """ (,) "," (identifier) "OUTPUT_FILENAME" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
449
0
{"language": "c", "success": true, "metadata": {"lines": 47, "avg_line_length": 29.74, "nodes": 257, "errors": 0, "source_hash": "d305cf09f66144b6716458382384c851e1ea5bda0971915375589d78e6dabc79", "categorized_nodes": 170}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"liquid.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": "\"liquid.h\"", "parent": 0, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <stdio.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": "system_lib_string", "text": "<stdio.h>", "parent": 3, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <stdlib.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": "system_lib_string", "text": "<stdlib.h>", "parent": 6, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <math.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": "system_lib_string", "text": "<math.h>", "parent": 9, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 17}}, {"id": 12, "type": "preproc_def", "text": "#define OUTPUT_FILENAME \"math_lngamma_example.m\"\n", "parent": null, "children": [13, 14, 15], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 14, "type": "identifier", "text": "OUTPUT_FILENAME", "parent": 12, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 23}}, {"id": 15, "type": "preproc_arg", "text": "\"math_lngamma_example.m\"", "parent": 12, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 48}}, {"id": 16, "type": "function_definition", "text": "int main() {\n unsigned int n = 256; // number of steps\n float zmin = 1e-3f; // minimum value\n float zmax = 6.00f; // maximum value\n\n unsigned int d = n/32; // print every d values to screen\n\n // log scale values\n float xmin = logf(zmin);\n float xmax = logf(zmax);\n float dx = (xmax-xmin)/(n-1);\n\n FILE * fid = fopen(OUTPUT_FILENAME,\"w\");\n fprintf(fid,\"clear all;\\n\");\n fprintf(fid,\"close all;\\n\");\n unsigned int i;\n float z;\n float g;\n float x = xmin; // log(z)\n for (i=0; i<n; i++) {\n z = expf(x);\n g = liquid_lngammaf(z);\n\n fprintf(fid,\"z(%4u) = %16.8e; g(%4u) = %16.8e;\\n\", i+1, z, i+1, g);\n if ( (i%d)==0 )\n printf(\"lngamma(%12.8f) = %12.8f\\n\",z,g);\n x += dx;\n }\n fprintf(fid,\"figure;\\n\");\n fprintf(fid,\"subplot(2,1,1);\\n\");\n fprintf(fid,\" semilogx(z,g,z,log(gamma(z)));\\n\");\n fprintf(fid,\" xlabel('z');\\n\");\n fprintf(fid,\" ylabel('lngamma(z)');\\n\");\n fprintf(fid,\"subplot(2,1,2);\\n\");\n fprintf(fid,\" loglog(z,abs(log(gamma(z))-g));\\n\");\n fprintf(fid,\" xlabel('z');\\n\");\n fprintf(fid,\" ylabel('error');\\n\");\n fclose(fid);\n printf(\"results written to %s.\\n\", OUTPUT_FILENAME);\n\n return 0;\n}", "parent": null, "children": [17, 18], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 54, "column": 1}}, {"id": 17, "type": "primitive_type", "text": "int", "parent": 16, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 3}}, {"id": 18, "type": "function_declarator", "text": "main()", "parent": 16, "children": [19, 20], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 10}}, {"id": 19, "type": "identifier", "text": "main", "parent": 18, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 8}}, {"id": 20, "type": "parameter_list", "text": "()", "parent": 18, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 10}}, {"id": 21, "type": "declaration", "text": "unsigned int n = 256;", "parent": 16, "children": [22, 25], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 25}}, {"id": 22, "type": "sized_type_specifier", "text": "unsigned int", "parent": 21, "children": [23, 24], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 16}}, {"id": 23, "type": "unsigned", "text": "unsigned", "parent": 22, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 12}}, {"id": 24, "type": "primitive_type", "text": "int", "parent": 22, "children": [], "start_point": {"row": 14, "column": 13}, "end_point": {"row": 14, "column": 16}}, {"id": 25, "type": "init_declarator", "text": "n = 256", "parent": 21, "children": [26, 27, 28], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 24}}, {"id": 26, "type": "identifier", "text": "n", "parent": 25, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 18}}, {"id": 27, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 20}}, {"id": 28, "type": "number_literal", "text": "256", "parent": 25, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 24}}, {"id": 29, "type": "declaration", "text": "float zmin = 1e-3f;", "parent": 16, "children": [30, 31], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 23}}, {"id": 30, "type": "primitive_type", "text": "float", "parent": 29, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 9}}, {"id": 31, "type": "init_declarator", "text": "zmin = 1e-3f", "parent": 29, "children": [32, 33, 34], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 22}}, {"id": 32, "type": "identifier", "text": "zmin", "parent": 31, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 14}}, {"id": 33, "type": "=", "text": "=", "parent": 31, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 16}}, {"id": 34, "type": "number_literal", "text": "1e-3f", "parent": 31, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 22}}, {"id": 35, "type": "declaration", "text": "float zmax = 6.00f;", "parent": 16, "children": [36, 37], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 23}}, {"id": 36, "type": "primitive_type", "text": "float", "parent": 35, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 9}}, {"id": 37, "type": "init_declarator", "text": "zmax = 6.00f", "parent": 35, "children": [38, 39, 40], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 22}}, {"id": 38, "type": "identifier", "text": "zmax", "parent": 37, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 14}}, {"id": 39, "type": "=", "text": "=", "parent": 37, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 16}}, {"id": 40, "type": "number_literal", "text": "6.00f", "parent": 37, "children": [], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 22}}, {"id": 41, "type": "declaration", "text": "unsigned int d = n/32;", "parent": 16, "children": [42, 45], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 26}}, {"id": 42, "type": "sized_type_specifier", "text": "unsigned int", "parent": 41, "children": [43, 44], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 16}}, {"id": 43, "type": "unsigned", "text": "unsigned", "parent": 42, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 12}}, {"id": 44, "type": "primitive_type", "text": "int", "parent": 42, "children": [], "start_point": {"row": 18, "column": 13}, "end_point": {"row": 18, "column": 16}}, {"id": 45, "type": "init_declarator", "text": "d = n/32", "parent": 41, "children": [46, 47, 48], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 25}}, {"id": 46, "type": "identifier", "text": "d", "parent": 45, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 18}}, {"id": 47, "type": "=", "text": "=", "parent": 45, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 20}}, {"id": 48, "type": "binary_expression", "text": "n/32", "parent": 45, "children": [49, 50, 51], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 25}}, {"id": 49, "type": "identifier", "text": "n", "parent": 48, "children": [], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 18, "column": 22}}, {"id": 50, "type": "/", "text": "/", "parent": 48, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 23}}, {"id": 51, "type": "number_literal", "text": "32", "parent": 48, "children": [], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 25}}, {"id": 52, "type": "declaration", "text": "float xmin = logf(zmin);", "parent": 16, "children": [53, 54], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 28}}, {"id": 53, "type": "primitive_type", "text": "float", "parent": 52, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 9}}, {"id": 54, "type": "init_declarator", "text": "xmin = logf(zmin)", "parent": 52, "children": [55, 56, 57], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 27}}, {"id": 55, "type": "identifier", "text": "xmin", "parent": 54, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 14}}, {"id": 56, "type": "=", "text": "=", "parent": 54, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 16}}, {"id": 57, "type": "call_expression", "text": "logf(zmin)", "parent": 54, "children": [58, 59], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 27}}, {"id": 58, "type": "identifier", "text": "logf", "parent": 57, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 21}}, {"id": 59, "type": "argument_list", "text": "(zmin)", "parent": 57, "children": [60], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 27}}, {"id": 60, "type": "identifier", "text": "zmin", "parent": 59, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 26}}, {"id": 61, "type": "declaration", "text": "float xmax = logf(zmax);", "parent": 16, "children": [62, 63], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 28}}, {"id": 62, "type": "primitive_type", "text": "float", "parent": 61, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 9}}, {"id": 63, "type": "init_declarator", "text": "xmax = logf(zmax)", "parent": 61, "children": [64, 65, 66], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 27}}, {"id": 64, "type": "identifier", "text": "xmax", "parent": 63, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 14}}, {"id": 65, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 16}}, {"id": 66, "type": "call_expression", "text": "logf(zmax)", "parent": 63, "children": [67, 68], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 27}}, {"id": 67, "type": "identifier", "text": "logf", "parent": 66, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 21}}, {"id": 68, "type": "argument_list", "text": "(zmax)", "parent": 66, "children": [69], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 27}}, {"id": 69, "type": "identifier", "text": "zmax", "parent": 68, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 26}}, {"id": 70, "type": "declaration", "text": "float dx = (xmax-xmin)/(n-1);", "parent": 16, "children": [71, 72], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 33}}, {"id": 71, "type": "primitive_type", "text": "float", "parent": 70, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 9}}, {"id": 72, "type": "init_declarator", "text": "dx = (xmax-xmin)/(n-1)", "parent": 70, "children": [73, 74, 75], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 32}}, {"id": 73, "type": "identifier", "text": "dx", "parent": 72, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 12}}, {"id": 74, "type": "=", "text": "=", "parent": 72, "children": [], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 23, "column": 14}}, {"id": 75, "type": "binary_expression", "text": "(xmax-xmin)/(n-1)", "parent": 72, "children": [76, 81, 82], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 32}}, {"id": 76, "type": "parenthesized_expression", "text": "(xmax-xmin)", "parent": 75, "children": [77], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 26}}, {"id": 77, "type": "binary_expression", "text": "xmax-xmin", "parent": 76, "children": [78, 79, 80], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 25}}, {"id": 78, "type": "identifier", "text": "xmax", "parent": 77, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 20}}, {"id": 79, "type": "-", "text": "-", "parent": 77, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 21}}, {"id": 80, "type": "identifier", "text": "xmin", "parent": 77, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 25}}, {"id": 81, "type": "/", "text": "/", "parent": 75, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 27}}, {"id": 82, "type": "parenthesized_expression", "text": "(n-1)", "parent": 75, "children": [83], "start_point": {"row": 23, "column": 27}, "end_point": {"row": 23, "column": 32}}, {"id": 83, "type": "binary_expression", "text": "n-1", "parent": 82, "children": [84, 85, 86], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 31}}, {"id": 84, "type": "identifier", "text": "n", "parent": 83, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 29}}, {"id": 85, "type": "-", "text": "-", "parent": 83, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 30}}, {"id": 86, "type": "number_literal", "text": "1", "parent": 83, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 31}}, {"id": 87, "type": "declaration", "text": "FILE * fid = fopen(OUTPUT_FILENAME,\"w\");", "parent": 16, "children": [88, 89], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 44}}, {"id": 88, "type": "type_identifier", "text": "FILE", "parent": 87, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 8}}, {"id": 89, "type": "init_declarator", "text": "* fid = fopen(OUTPUT_FILENAME,\"w\")", "parent": 87, "children": [90, 93, 94], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 43}}, {"id": 90, "type": "pointer_declarator", "text": "* fid", "parent": 89, "children": [91, 92], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 14}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 10}}, {"id": 92, "type": "identifier", "text": "fid", "parent": 90, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 14}}, {"id": 93, "type": "=", "text": "=", "parent": 89, "children": [], "start_point": {"row": 25, "column": 15}, "end_point": {"row": 25, "column": 16}}, {"id": 94, "type": "call_expression", "text": "fopen(OUTPUT_FILENAME,\"w\")", "parent": 89, "children": [95, 96], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 43}}, {"id": 95, "type": "identifier", "text": "fopen", "parent": 94, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 22}}, {"id": 96, "type": "argument_list", "text": "(OUTPUT_FILENAME,\"w\")", "parent": 94, "children": [97, 98], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 43}}, {"id": 97, "type": "identifier", "text": "OUTPUT_FILENAME", "parent": 96, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 38}}, {"id": 98, "type": "string_literal", "text": "\"w\"", "parent": 96, "children": [], "start_point": {"row": 25, "column": 39}, "end_point": {"row": 25, "column": 42}}, {"id": 99, "type": "call_expression", "text": "fprintf(fid,\"clear all;\\n\")", "parent": 16, "children": [100, 101], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 31}}, {"id": 100, "type": "identifier", "text": "fprintf", "parent": 99, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 11}}, {"id": 101, "type": "argument_list", "text": "(fid,\"clear all;\\n\")", "parent": 99, "children": [102, 103], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 31}}, {"id": 102, "type": "identifier", "text": "fid", "parent": 101, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 15}}, {"id": 103, "type": "string_literal", "text": "\"clear all;\\n\"", "parent": 101, "children": [104], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 30}}, {"id": 104, "type": "escape_sequence", "text": "\\n", "parent": 103, "children": [], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 29}}, {"id": 105, "type": "call_expression", "text": "fprintf(fid,\"close all;\\n\")", "parent": 16, "children": [106, 107], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 31}}, {"id": 106, "type": "identifier", "text": "fprintf", "parent": 105, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 11}}, {"id": 107, "type": "argument_list", "text": "(fid,\"close all;\\n\")", "parent": 105, "children": [108, 109], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 31}}, {"id": 108, "type": "identifier", "text": "fid", "parent": 107, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 15}}, {"id": 109, "type": "string_literal", "text": "\"close all;\\n\"", "parent": 107, "children": [110], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 30}}, {"id": 110, "type": "escape_sequence", "text": "\\n", "parent": 109, "children": [], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 27, "column": 29}}, {"id": 111, "type": "declaration", "text": "unsigned int i;", "parent": 16, "children": [112, 115], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 19}}, {"id": 112, "type": "sized_type_specifier", "text": "unsigned int", "parent": 111, "children": [113, 114], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 16}}, {"id": 113, "type": "unsigned", "text": "unsigned", "parent": 112, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 12}}, {"id": 114, "type": "primitive_type", "text": "int", "parent": 112, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 16}}, {"id": 115, "type": "identifier", "text": "i", "parent": 111, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 116, "type": "declaration", "text": "float z;", "parent": 16, "children": [117, 118], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 12}}, {"id": 117, "type": "primitive_type", "text": "float", "parent": 116, "children": [], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 9}}, {"id": 118, "type": "identifier", "text": "z", "parent": 116, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 11}}, {"id": 119, "type": "declaration", "text": "float g;", "parent": 16, "children": [120, 121], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 12}}, {"id": 120, "type": "primitive_type", "text": "float", "parent": 119, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 9}}, {"id": 121, "type": "identifier", "text": "g", "parent": 119, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 11}}, {"id": 122, "type": "declaration", "text": "float x = xmin;", "parent": 16, "children": [123, 124], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 19}}, {"id": 123, "type": "primitive_type", "text": "float", "parent": 122, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 9}}, {"id": 124, "type": "init_declarator", "text": "x = xmin", "parent": 122, "children": [125, 126, 127], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 18}}, {"id": 125, "type": "identifier", "text": "x", "parent": 124, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 11}}, {"id": 126, "type": "=", "text": "=", "parent": 124, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 13}}, {"id": 127, "type": "identifier", "text": "xmin", "parent": 124, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 18}}, {"id": 128, "type": "for_statement", "text": "for (i=0; i<n; i++) {\n z = expf(x);\n g = liquid_lngammaf(z);\n\n fprintf(fid,\"z(%4u) = %16.8e; g(%4u) = %16.8e;\\n\", i+1, z, i+1, g);\n if ( (i%d)==0 )\n printf(\"lngamma(%12.8f) = %12.8f\\n\",z,g);\n x += dx;\n }", "parent": 16, "children": [129, 133, 137], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 40, "column": 5}}, {"id": 129, "type": "assignment_expression", "text": "i=0", "parent": 128, "children": [130, 131, 132], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 12}}, {"id": 130, "type": "identifier", "text": "i", "parent": 129, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 10}}, {"id": 131, "type": "=", "text": "=", "parent": 129, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 11}}, {"id": 132, "type": "number_literal", "text": "0", "parent": 129, "children": [], "start_point": {"row": 32, "column": 11}, "end_point": {"row": 32, "column": 12}}, {"id": 133, "type": "binary_expression", "text": "i<n", "parent": 128, "children": [134, 135, 136], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 17}}, {"id": 134, "type": "identifier", "text": "i", "parent": 133, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 15}}, {"id": 135, "type": "<", "text": "<", "parent": 133, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 16}}, {"id": 136, "type": "identifier", "text": "n", "parent": 133, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 17}}, {"id": 137, "type": "update_expression", "text": "i++", "parent": 128, "children": [138, 139], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 22}}, {"id": 138, "type": "identifier", "text": "i", "parent": 137, "children": [], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 20}}, {"id": 139, "type": "++", "text": "++", "parent": 137, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 22}}, {"id": 140, "type": "assignment_expression", "text": "z = expf(x)", "parent": 128, "children": [141, 142, 143], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 19}}, {"id": 141, "type": "identifier", "text": "z", "parent": 140, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 9}}, {"id": 142, "type": "=", "text": "=", "parent": 140, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 11}}, {"id": 143, "type": "call_expression", "text": "expf(x)", "parent": 140, "children": [144, 145], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 19}}, {"id": 144, "type": "identifier", "text": "expf", "parent": 143, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 16}}, {"id": 145, "type": "argument_list", "text": "(x)", "parent": 143, "children": [146], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 19}}, {"id": 146, "type": "identifier", "text": "x", "parent": 145, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 18}}, {"id": 147, "type": "assignment_expression", "text": "g = liquid_lngammaf(z)", "parent": 128, "children": [148, 149, 150], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 30}}, {"id": 148, "type": "identifier", "text": "g", "parent": 147, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 9}}, {"id": 149, "type": "=", "text": "=", "parent": 147, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 11}}, {"id": 150, "type": "call_expression", "text": "liquid_lngammaf(z)", "parent": 147, "children": [151, 152], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 30}}, {"id": 151, "type": "identifier", "text": "liquid_lngammaf", "parent": 150, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 27}}, {"id": 152, "type": "argument_list", "text": "(z)", "parent": 150, "children": [153], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 30}}, {"id": 153, "type": "identifier", "text": "z", "parent": 152, "children": [], "start_point": {"row": 34, "column": 28}, "end_point": {"row": 34, "column": 29}}, {"id": 154, "type": "call_expression", "text": "fprintf(fid,\"z(%4u) = %16.8e; g(%4u) = %16.8e;\\n\", i+1, z, i+1, g)", "parent": 128, "children": [155, 156], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 74}}, {"id": 155, "type": "identifier", "text": "fprintf", "parent": 154, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 15}}, {"id": 156, "type": "argument_list", "text": "(fid,\"z(%4u) = %16.8e; g(%4u) = %16.8e;\\n\", i+1, z, i+1, g)", "parent": 154, "children": [157, 158, 160, 164, 165, 169], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 74}}, {"id": 157, "type": "identifier", "text": "fid", "parent": 156, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 19}}, {"id": 158, "type": "string_literal", "text": "\"z(%4u) = %16.8e; g(%4u) = %16.8e;\\n\"", "parent": 156, "children": [159], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 57}}, {"id": 159, "type": "escape_sequence", "text": "\\n", "parent": 158, "children": [], "start_point": {"row": 36, "column": 54}, "end_point": {"row": 36, "column": 56}}, {"id": 160, "type": "binary_expression", "text": "i+1", "parent": 156, "children": [161, 162, 163], "start_point": {"row": 36, "column": 59}, "end_point": {"row": 36, "column": 62}}, {"id": 161, "type": "identifier", "text": "i", "parent": 160, "children": [], "start_point": {"row": 36, "column": 59}, "end_point": {"row": 36, "column": 60}}, {"id": 162, "type": "+", "text": "+", "parent": 160, "children": [], "start_point": {"row": 36, "column": 60}, "end_point": {"row": 36, "column": 61}}, {"id": 163, "type": "number_literal", "text": "1", "parent": 160, "children": [], "start_point": {"row": 36, "column": 61}, "end_point": {"row": 36, "column": 62}}, {"id": 164, "type": "identifier", "text": "z", "parent": 156, "children": [], "start_point": {"row": 36, "column": 64}, "end_point": {"row": 36, "column": 65}}, {"id": 165, "type": "binary_expression", "text": "i+1", "parent": 156, "children": [166, 167, 168], "start_point": {"row": 36, "column": 67}, "end_point": {"row": 36, "column": 70}}, {"id": 166, "type": "identifier", "text": "i", "parent": 165, "children": [], "start_point": {"row": 36, "column": 67}, "end_point": {"row": 36, "column": 68}}, {"id": 167, "type": "+", "text": "+", "parent": 165, "children": [], "start_point": {"row": 36, "column": 68}, "end_point": {"row": 36, "column": 69}}, {"id": 168, "type": "number_literal", "text": "1", "parent": 165, "children": [], "start_point": {"row": 36, "column": 69}, "end_point": {"row": 36, "column": 70}}, {"id": 169, "type": "identifier", "text": "g", "parent": 156, "children": [], "start_point": {"row": 36, "column": 72}, "end_point": {"row": 36, "column": 73}}, {"id": 170, "type": "if_statement", "text": "if ( (i%d)==0 )\n printf(\"lngamma(%12.8f) = %12.8f\\n\",z,g);", "parent": 128, "children": [171], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 38, "column": 53}}, {"id": 171, "type": "parenthesized_expression", "text": "( (i%d)==0 )", "parent": 170, "children": [172], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 23}}, {"id": 172, "type": "binary_expression", "text": "(i%d)==0", "parent": 171, "children": [173, 178, 179], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 21}}, {"id": 173, "type": "parenthesized_expression", "text": "(i%d)", "parent": 172, "children": [174], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 18}}, {"id": 174, "type": "binary_expression", "text": "i%d", "parent": 173, "children": [175, 176, 177], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 17}}, {"id": 175, "type": "identifier", "text": "i", "parent": 174, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 15}}, {"id": 176, "type": "%", "text": "%", "parent": 174, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 16}}, {"id": 177, "type": "identifier", "text": "d", "parent": 174, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 17}}, {"id": 178, "type": "==", "text": "==", "parent": 172, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 20}}, {"id": 179, "type": "number_literal", "text": "0", "parent": 172, "children": [], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 21}}, {"id": 180, "type": "call_expression", "text": "printf(\"lngamma(%12.8f) = %12.8f\\n\",z,g)", "parent": 170, "children": [181, 182], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 52}}, {"id": 181, "type": "identifier", "text": "printf", "parent": 180, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 18}}, {"id": 182, "type": "argument_list", "text": "(\"lngamma(%12.8f) = %12.8f\\n\",z,g)", "parent": 180, "children": [183, 185, 186], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 52}}, {"id": 183, "type": "string_literal", "text": "\"lngamma(%12.8f) = %12.8f\\n\"", "parent": 182, "children": [184], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 47}}, {"id": 184, "type": "escape_sequence", "text": "\\n", "parent": 183, "children": [], "start_point": {"row": 38, "column": 44}, "end_point": {"row": 38, "column": 46}}, {"id": 185, "type": "identifier", "text": "z", "parent": 182, "children": [], "start_point": {"row": 38, "column": 48}, "end_point": {"row": 38, "column": 49}}, {"id": 186, "type": "identifier", "text": "g", "parent": 182, "children": [], "start_point": {"row": 38, "column": 50}, "end_point": {"row": 38, "column": 51}}, {"id": 187, "type": "assignment_expression", "text": "x += dx", "parent": 128, "children": [188, 189, 190], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 15}}, {"id": 188, "type": "identifier", "text": "x", "parent": 187, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 9}}, {"id": 189, "type": "+=", "text": "+=", "parent": 187, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 12}}, {"id": 190, "type": "identifier", "text": "dx", "parent": 187, "children": [], "start_point": {"row": 39, "column": 13}, "end_point": {"row": 39, "column": 15}}, {"id": 191, "type": "call_expression", "text": "fprintf(fid,\"figure;\\n\")", "parent": 16, "children": [192, 193], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 28}}, {"id": 192, "type": "identifier", "text": "fprintf", "parent": 191, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 11}}, {"id": 193, "type": "argument_list", "text": "(fid,\"figure;\\n\")", "parent": 191, "children": [194, 195], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 28}}, {"id": 194, "type": "identifier", "text": "fid", "parent": 193, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 15}}, {"id": 195, "type": "string_literal", "text": "\"figure;\\n\"", "parent": 193, "children": [196], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 27}}, {"id": 196, "type": "escape_sequence", "text": "\\n", "parent": 195, "children": [], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 26}}, {"id": 197, "type": "call_expression", "text": "fprintf(fid,\"subplot(2,1,1);\\n\")", "parent": 16, "children": [198, 199], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 36}}, {"id": 198, "type": "identifier", "text": "fprintf", "parent": 197, "children": [], "start_point": {"row": 42, "column": 4}, "end_point": {"row": 42, "column": 11}}, {"id": 199, "type": "argument_list", "text": "(fid,\"subplot(2,1,1);\\n\")", "parent": 197, "children": [200, 201], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 36}}, {"id": 200, "type": "identifier", "text": "fid", "parent": 199, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 15}}, {"id": 201, "type": "string_literal", "text": "\"subplot(2,1,1);\\n\"", "parent": 199, "children": [202], "start_point": {"row": 42, "column": 16}, "end_point": {"row": 42, "column": 35}}, {"id": 202, "type": "escape_sequence", "text": "\\n", "parent": 201, "children": [], "start_point": {"row": 42, "column": 32}, "end_point": {"row": 42, "column": 34}}, {"id": 203, "type": "call_expression", "text": "fprintf(fid,\" semilogx(z,g,z,log(gamma(z)));\\n\")", "parent": 16, "children": [204, 205], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 53}}, {"id": 204, "type": "identifier", "text": "fprintf", "parent": 203, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 11}}, {"id": 205, "type": "argument_list", "text": "(fid,\" semilogx(z,g,z,log(gamma(z)));\\n\")", "parent": 203, "children": [206, 207], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 53}}, {"id": 206, "type": "identifier", "text": "fid", "parent": 205, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 15}}, {"id": 207, "type": "string_literal", "text": "\" semilogx(z,g,z,log(gamma(z)));\\n\"", "parent": 205, "children": [208], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 52}}, {"id": 208, "type": "escape_sequence", "text": "\\n", "parent": 207, "children": [], "start_point": {"row": 43, "column": 49}, "end_point": {"row": 43, "column": 51}}, {"id": 209, "type": "call_expression", "text": "fprintf(fid,\" xlabel('z');\\n\")", "parent": 16, "children": [210, 211], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 35}}, {"id": 210, "type": "identifier", "text": "fprintf", "parent": 209, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 11}}, {"id": 211, "type": "argument_list", "text": "(fid,\" xlabel('z');\\n\")", "parent": 209, "children": [212, 213], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 35}}, {"id": 212, "type": "identifier", "text": "fid", "parent": 211, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 15}}, {"id": 213, "type": "string_literal", "text": "\" xlabel('z');\\n\"", "parent": 211, "children": [214], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 34}}, {"id": 214, "type": "escape_sequence", "text": "\\n", "parent": 213, "children": [], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 33}}, {"id": 215, "type": "call_expression", "text": "fprintf(fid,\" ylabel('lngamma(z)');\\n\")", "parent": 16, "children": [216, 217], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 44}}, {"id": 216, "type": "identifier", "text": "fprintf", "parent": 215, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 11}}, {"id": 217, "type": "argument_list", "text": "(fid,\" ylabel('lngamma(z)');\\n\")", "parent": 215, "children": [218, 219], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 44}}, {"id": 218, "type": "identifier", "text": "fid", "parent": 217, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 15}}, {"id": 219, "type": "string_literal", "text": "\" ylabel('lngamma(z)');\\n\"", "parent": 217, "children": [220], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 43}}, {"id": 220, "type": "escape_sequence", "text": "\\n", "parent": 219, "children": [], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 42}}, {"id": 221, "type": "call_expression", "text": "fprintf(fid,\"subplot(2,1,2);\\n\")", "parent": 16, "children": [222, 223], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 36}}, {"id": 222, "type": "identifier", "text": "fprintf", "parent": 221, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 11}}, {"id": 223, "type": "argument_list", "text": "(fid,\"subplot(2,1,2);\\n\")", "parent": 221, "children": [224, 225], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 36}}, {"id": 224, "type": "identifier", "text": "fid", "parent": 223, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 15}}, {"id": 225, "type": "string_literal", "text": "\"subplot(2,1,2);\\n\"", "parent": 223, "children": [226], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 35}}, {"id": 226, "type": "escape_sequence", "text": "\\n", "parent": 225, "children": [], "start_point": {"row": 46, "column": 32}, "end_point": {"row": 46, "column": 34}}, {"id": 227, "type": "call_expression", "text": "fprintf(fid,\" loglog(z,abs(log(gamma(z))-g));\\n\")", "parent": 16, "children": [228, 229], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 54}}, {"id": 228, "type": "identifier", "text": "fprintf", "parent": 227, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 11}}, {"id": 229, "type": "argument_list", "text": "(fid,\" loglog(z,abs(log(gamma(z))-g));\\n\")", "parent": 227, "children": [230, 231], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 54}}, {"id": 230, "type": "identifier", "text": "fid", "parent": 229, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 15}}, {"id": 231, "type": "string_literal", "text": "\" loglog(z,abs(log(gamma(z))-g));\\n\"", "parent": 229, "children": [232], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 53}}, {"id": 232, "type": "escape_sequence", "text": "\\n", "parent": 231, "children": [], "start_point": {"row": 47, "column": 50}, "end_point": {"row": 47, "column": 52}}, {"id": 233, "type": "call_expression", "text": "fprintf(fid,\" xlabel('z');\\n\")", "parent": 16, "children": [234, 235], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 35}}, {"id": 234, "type": "identifier", "text": "fprintf", "parent": 233, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 11}}, {"id": 235, "type": "argument_list", "text": "(fid,\" xlabel('z');\\n\")", "parent": 233, "children": [236, 237], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 35}}, {"id": 236, "type": "identifier", "text": "fid", "parent": 235, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 15}}, {"id": 237, "type": "string_literal", "text": "\" xlabel('z');\\n\"", "parent": 235, "children": [238], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 34}}, {"id": 238, "type": "escape_sequence", "text": "\\n", "parent": 237, "children": [], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 33}}, {"id": 239, "type": "call_expression", "text": "fprintf(fid,\" ylabel('error');\\n\")", "parent": 16, "children": [240, 241], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 39}}, {"id": 240, "type": "identifier", "text": "fprintf", "parent": 239, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 11}}, {"id": 241, "type": "argument_list", "text": "(fid,\" ylabel('error');\\n\")", "parent": 239, "children": [242, 243], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 39}}, {"id": 242, "type": "identifier", "text": "fid", "parent": 241, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 15}}, {"id": 243, "type": "string_literal", "text": "\" ylabel('error');\\n\"", "parent": 241, "children": [244], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 38}}, {"id": 244, "type": "escape_sequence", "text": "\\n", "parent": 243, "children": [], "start_point": {"row": 49, "column": 35}, "end_point": {"row": 49, "column": 37}}, {"id": 245, "type": "call_expression", "text": "fclose(fid)", "parent": 16, "children": [246, 247], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 15}}, {"id": 246, "type": "identifier", "text": "fclose", "parent": 245, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 10}}, {"id": 247, "type": "argument_list", "text": "(fid)", "parent": 245, "children": [248], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 15}}, {"id": 248, "type": "identifier", "text": "fid", "parent": 247, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 14}}, {"id": 249, "type": "call_expression", "text": "printf(\"results written to %s.\\n\", OUTPUT_FILENAME)", "parent": 16, "children": [250, 251], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 55}}, {"id": 250, "type": "identifier", "text": "printf", "parent": 249, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 10}}, {"id": 251, "type": "argument_list", "text": "(\"results written to %s.\\n\", OUTPUT_FILENAME)", "parent": 249, "children": [252, 254], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 55}}, {"id": 252, "type": "string_literal", "text": "\"results written to %s.\\n\"", "parent": 251, "children": [253], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 37}}, {"id": 253, "type": "escape_sequence", "text": "\\n", "parent": 252, "children": [], "start_point": {"row": 51, "column": 34}, "end_point": {"row": 51, "column": 36}}, {"id": 254, "type": "identifier", "text": "OUTPUT_FILENAME", "parent": 251, "children": [], "start_point": {"row": 51, "column": 39}, "end_point": {"row": 51, "column": 54}}, {"id": 255, "type": "return_statement", "text": "return 0;", "parent": 16, "children": [256], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 13}}, {"id": 256, "type": "number_literal", "text": "0", "parent": 255, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 12}}]}, "node_categories": {"declarations": {"functions": [16, 18], "variables": [21, 29, 35, 41, 52, 61, 70, 87, 111, 116, 119, 122], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [48, 57, 66, 75, 76, 77, 82, 83, 94, 99, 105, 133, 137, 143, 150, 154, 160, 165, 171, 172, 173, 174, 180, 191, 197, 203, 209, 215, 221, 227, 233, 239, 245, 249], "assignments": [129, 140, 147, 187], "loops": [128], "conditionals": [14, 19, 22, 26, 32, 38, 42, 46, 49, 55, 58, 60, 64, 67, 69, 73, 78, 80, 84, 88, 92, 95, 97, 100, 102, 106, 108, 112, 115, 118, 121, 125, 127, 130, 134, 136, 138, 141, 144, 146, 148, 151, 153, 155, 157, 161, 164, 166, 169, 170, 175, 177, 181, 185, 186, 188, 190, 192, 194, 198, 200, 204, 206, 210, 212, 216, 218, 222, 224, 228, 230, 234, 236, 240, 242, 246, 248, 250, 254], "returns": [255], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 28, 34, 40, 51, 86, 98, 103, 109, 132, 158, 163, 168, 179, 183, 195, 201, 207, 213, 219, 225, 231, 237, 243, 252, 256], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 16, "universal_type": "function", "name": "main", "text_snippet": "int main() {\n unsigned int n = 256; // number of steps\n float zmin = 1e-3f; // minimum v"}, {"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"liquid.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 <stdlib.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <math.h>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "//\n// math_lngamma_example.c\n//\n// Demonstrates accuracy of lngamma function\n//\n\n#include \"liquid.h\"\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n\n#define OUTPUT_FILENAME \"math_lngamma_example.m\"\n\nint main() {\n unsigned int n = 256; // number of steps\n float zmin = 1e-3f; // minimum value\n float zmax = 6.00f; // maximum value\n\n unsigned int d = n/32; // print every d values to screen\n\n // log scale values\n float xmin = logf(zmin);\n float xmax = logf(zmax);\n float dx = (xmax-xmin)/(n-1);\n\n FILE * fid = fopen(OUTPUT_FILENAME,\"w\");\n fprintf(fid,\"clear all;\\n\");\n fprintf(fid,\"close all;\\n\");\n unsigned int i;\n float z;\n float g;\n float x = xmin; // log(z)\n for (i=0; i<n; i++) {\n z = expf(x);\n g = liquid_lngammaf(z);\n\n fprintf(fid,\"z(%4u) = %16.8e; g(%4u) = %16.8e;\\n\", i+1, z, i+1, g);\n if ( (i%d)==0 )\n printf(\"lngamma(%12.8f) = %12.8f\\n\",z,g);\n x += dx;\n }\n fprintf(fid,\"figure;\\n\");\n fprintf(fid,\"subplot(2,1,1);\\n\");\n fprintf(fid,\" semilogx(z,g,z,log(gamma(z)));\\n\");\n fprintf(fid,\" xlabel('z');\\n\");\n fprintf(fid,\" ylabel('lngamma(z)');\\n\");\n fprintf(fid,\"subplot(2,1,2);\\n\");\n fprintf(fid,\" loglog(z,abs(log(gamma(z))-g));\\n\");\n fprintf(fid,\" xlabel('z');\\n\");\n fprintf(fid,\" ylabel('error');\\n\");\n fclose(fid);\n printf(\"results written to %s.\\n\", OUTPUT_FILENAME);\n\n return 0;\n}\n"}
80,997
c
// // PoporFFmpeg.h // PoporFFmpeg // // Created by apple on 2019/2/14. // Copyright © 2019 popor. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> typedef void(^PoporFFmpegFinishBlock)(BOOL finished, NSString * info); // __BlockTypedef @interface PoporFFmpeg : NSObject @property (nonatomic, copy ) PoporFFmpegFinishBlock finishBlock; - (void)compressCmd:(NSString *)cmd finish:(PoporFFmpegFinishBlock)finishBlock; @end
31.79
14
(translation_unit) "//\n// PoporFFmpeg.h\n// PoporFFmpeg\n//\n// Created by apple on 2019/2/14.\n// Copyright © 2019 popor. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\ntypedef void(^PoporFFmpegFinishBlock)(BOOL finished, NSString * info); // __BlockTypedef\n\n@interface PoporFFmpeg : NSObject\n\n@property (nonatomic, copy ) PoporFFmpegFinishBlock finishBlock;\n\n- (void)compressCmd:(NSString *)cmd finish:(PoporFFmpegFinishBlock)finishBlock;\n\n@end\n" (comment) "//" (comment) "// PoporFFmpeg.h" (comment) "// PoporFFmpeg" (comment) "//" (comment) "// Created by apple on 2019/2/14." (comment) "// Copyright © 2019 popor. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <Foundation/Foundation.h>\n#" (preproc_directive) "import " (preproc_arg) "Foundation/Foundation.h>\n" (preproc_call) "import <UIKit/UIKit.h>\n\n" (preproc_directive) "import " (preproc_arg) "UIKit/UIKit.h>\n" (type_definition) "ypedef void(^PoporFFmpegFinishBlock)(BOOL finished, NSString * info); " (typedef) "ypedef " (primitive_type) "oid(" (function_declarator) "^PoporFFmpegFinishBlock)(BOOL finished, NSString * info);" (parenthesized_declarator) "^PoporFFmpegFinishBlock)(" (() "^" (ERROR) "P" (^) "P" (type_identifier) "oporFFmpegFinishBlock)" ()) "(" (parameter_list) "BOOL finished, NSString * info);" (() "B" (parameter_declaration) "OOL finished," (type_identifier) "OOL " (identifier) "inished," (,) " " (parameter_declaration) "SString * info)" (type_identifier) "SString " (pointer_declarator) " info)" (*) " " (identifier) "nfo)" ()) ";" (;) " " (comment) "/ __BlockTypedef\n" (ERROR) "interface PoporFFmpeg : NSObject\n\n@property (nonatomic, copy ) PoporFFmpegFinishBlock finishBlock;\n\n- (void)compressCmd:(NSString *)cmd finish:(P" (ERROR) "i" (type_identifier) "nterface " (function_declarator) "oporFFmpeg : NSObject\n\n@property (nonatomic, copy ) " (identifier) "oporFFmpeg " (ERROR) " NSObject\n\n@property " (:) " " (identifier) "SObject\n" (ERROR) "p" (identifier) "roperty " (parameter_list) "nonatomic, copy ) " (() "n" (identifier) "onatomic," (,) " " (identifier) "opy " ()) " " (declaration) "oporFFmpegFinishBlock finishBlock;\n" (type_identifier) "oporFFmpegFinishBlock " (identifier) "inishBlock;" (;) "\n" (unary_expression) " (void)compressCmd:" (-) " " (cast_expression) "void)compressCmd:" (() "v" (type_descriptor) "oid)" (primitive_type) "oid)" ()) "c" (identifier) "ompressCmd:" (:) "(" (() "N" (binary_expression) "SString *)cmd finish:" (identifier) "SString " (*) ")" (ERROR) "cmd " ()) "c" (identifier) "md " (identifier) "inish:" (:) "(" (() "P" (declaration) "oporFFmpegFinishBlock)finishBlock;\n" (type_identifier) "oporFFmpegFinishBlock)" (ERROR) "f" ()) "f" (identifier) "inishBlock;" (;) "\n" (ERROR) "e" (ERROR) "e" (expression_statement) "nd\n" (identifier) "nd\n" (;) ""
88
9
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 31.79, "nodes": 54, "errors": 0, "source_hash": "c4572d1f14df5a9d7927ed6d01931433fe92bbf96ed76e3cb7510c0d9c1d427b", "categorized_nodes": 32}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "import <Foundation/Foundation.h>\n#", "parent": null, "children": [1], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_arg", "text": "Foundation/Foundation.h>\n", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 2, "type": "preproc_call", "text": "import <UIKit/UIKit.h>\n\n", "parent": null, "children": [3], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 3, "type": "preproc_arg", "text": "UIKit/UIKit.h>\n", "parent": 2, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 23}}, {"id": 4, "type": "type_definition", "text": "ypedef void(^PoporFFmpegFinishBlock)(BOOL finished, NSString * info); ", "parent": null, "children": [5, 6, 7], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 70}}, {"id": 5, "type": "typedef", "text": "ypedef ", "parent": 4, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 6, "type": "primitive_type", "text": "oid(", "parent": 4, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 12}}, {"id": 7, "type": "function_declarator", "text": "^PoporFFmpegFinishBlock)(BOOL finished, NSString * info);", "parent": 4, "children": [8, 12], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 69}}, {"id": 8, "type": "parenthesized_declarator", "text": "^PoporFFmpegFinishBlock)(", "parent": 7, "children": [9, 11], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 37}}, {"id": 9, "type": "ERROR", "text": "P", "parent": 8, "children": [10], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 14}}, {"id": 10, "type": "^", "text": "P", "parent": 9, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 14}}, {"id": 11, "type": "type_identifier", "text": "oporFFmpegFinishBlock)", "parent": 8, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 36}}, {"id": 12, "type": "parameter_list", "text": "BOOL finished, NSString * info);", "parent": 7, "children": [13, 16], "start_point": {"row": 11, "column": 37}, "end_point": {"row": 11, "column": 69}}, {"id": 13, "type": "parameter_declaration", "text": "OOL finished,", "parent": 12, "children": [14, 15], "start_point": {"row": 11, "column": 38}, "end_point": {"row": 11, "column": 51}}, {"id": 14, "type": "type_identifier", "text": "OOL ", "parent": 13, "children": [], "start_point": {"row": 11, "column": 38}, "end_point": {"row": 11, "column": 42}}, {"id": 15, "type": "identifier", "text": "inished,", "parent": 13, "children": [], "start_point": {"row": 11, "column": 43}, "end_point": {"row": 11, "column": 51}}, {"id": 16, "type": "parameter_declaration", "text": "SString * info)", "parent": 12, "children": [17, 18], "start_point": {"row": 11, "column": 53}, "end_point": {"row": 11, "column": 68}}, {"id": 17, "type": "type_identifier", "text": "SString ", "parent": 16, "children": [], "start_point": {"row": 11, "column": 53}, "end_point": {"row": 11, "column": 61}}, {"id": 18, "type": "pointer_declarator", "text": " info)", "parent": 16, "children": [19, 20], "start_point": {"row": 11, "column": 62}, "end_point": {"row": 11, "column": 68}}, {"id": 19, "type": "*", "text": " ", "parent": 18, "children": [], "start_point": {"row": 11, "column": 62}, "end_point": {"row": 11, "column": 63}}, {"id": 20, "type": "identifier", "text": "nfo)", "parent": 18, "children": [], "start_point": {"row": 11, "column": 64}, "end_point": {"row": 11, "column": 68}}, {"id": 21, "type": "ERROR", "text": "interface PoporFFmpeg : NSObject\n\n@property (nonatomic, copy ) PoporFFmpegFinishBlock finishBlock;\n\n- (void)compressCmd:(NSString *)cmd finish:(P", "parent": null, "children": [22, 23, 24, 33, 36, 42], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 17, "column": 44}}, {"id": 22, "type": "ERROR", "text": "i", "parent": 21, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 23, "type": "type_identifier", "text": "nterface ", "parent": 21, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 10}}, {"id": 24, "type": "function_declarator", "text": "oporFFmpeg : NSObject\n\n@property (nonatomic, copy ) ", "parent": 21, "children": [25, 26, 30], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 15, "column": 29}}, {"id": 25, "type": "identifier", "text": "oporFFmpeg ", "parent": 24, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 22}}, {"id": 26, "type": "ERROR", "text": " NSObject\n\n@property ", "parent": 24, "children": [27, 28, 29], "start_point": {"row": 13, "column": 23}, "end_point": {"row": 15, "column": 9}}, {"id": 27, "type": "identifier", "text": "SObject\n", "parent": 26, "children": [], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 33}}, {"id": 28, "type": "ERROR", "text": "p", "parent": 26, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 29, "type": "identifier", "text": "roperty ", "parent": 26, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 30, "type": "parameter_list", "text": "nonatomic, copy ) ", "parent": 24, "children": [31, 32], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 29}}, {"id": 31, "type": "identifier", "text": "onatomic,", "parent": 30, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 32, "type": "identifier", "text": "opy ", "parent": 30, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 26}}, {"id": 33, "type": "declaration", "text": "oporFFmpegFinishBlock finishBlock;\n", "parent": 21, "children": [34, 35], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 65}}, {"id": 34, "type": "type_identifier", "text": "oporFFmpegFinishBlock ", "parent": 33, "children": [], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 15, "column": 52}}, {"id": 35, "type": "identifier", "text": "inishBlock;", "parent": 33, "children": [], "start_point": {"row": 15, "column": 53}, "end_point": {"row": 15, "column": 64}}, {"id": 36, "type": "unary_expression", "text": " (void)compressCmd:", "parent": 21, "children": [37, 38], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 19}}, {"id": 37, "type": "-", "text": " ", "parent": 36, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 38, "type": "cast_expression", "text": "void)compressCmd:", "parent": 36, "children": [39, 41], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 19}}, {"id": 39, "type": "type_descriptor", "text": "oid)", "parent": 38, "children": [40], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 40, "type": "primitive_type", "text": "oid)", "parent": 39, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 7}}, {"id": 41, "type": "identifier", "text": "ompressCmd:", "parent": 38, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 19}}, {"id": 42, "type": "binary_expression", "text": "SString *)cmd finish:", "parent": 21, "children": [43, 44, 46], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 42}}, {"id": 43, "type": "identifier", "text": "SString ", "parent": 42, "children": [], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 29}}, {"id": 44, "type": "ERROR", "text": "cmd ", "parent": 42, "children": [45], "start_point": {"row": 17, "column": 31}, "end_point": {"row": 17, "column": 35}}, {"id": 45, "type": "identifier", "text": "md ", "parent": 44, "children": [], "start_point": {"row": 17, "column": 32}, "end_point": {"row": 17, "column": 35}}, {"id": 46, "type": "identifier", "text": "inish:", "parent": 42, "children": [], "start_point": {"row": 17, "column": 36}, "end_point": {"row": 17, "column": 42}}, {"id": 47, "type": "declaration", "text": "oporFFmpegFinishBlock)finishBlock;\n", "parent": null, "children": [48, 49, 50], "start_point": {"row": 17, "column": 44}, "end_point": {"row": 17, "column": 79}}, {"id": 48, "type": "type_identifier", "text": "oporFFmpegFinishBlock)", "parent": 47, "children": [], "start_point": {"row": 17, "column": 44}, "end_point": {"row": 17, "column": 66}}, {"id": 49, "type": "ERROR", "text": "f", "parent": 47, "children": [], "start_point": {"row": 17, "column": 66}, "end_point": {"row": 17, "column": 67}}, {"id": 50, "type": "identifier", "text": "inishBlock;", "parent": 47, "children": [], "start_point": {"row": 17, "column": 67}, "end_point": {"row": 17, "column": 78}}, {"id": 51, "type": "ERROR", "text": "e", "parent": null, "children": [52], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 52, "type": "ERROR", "text": "e", "parent": 51, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 53, "type": "identifier", "text": "nd\n", "parent": null, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 4}}]}, "node_categories": {"declarations": {"functions": [7, 24], "variables": [4, 13, 16, 33, 47], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [36, 38, 42], "assignments": [], "loops": [], "conditionals": [11, 14, 15, 17, 20, 23, 25, 27, 29, 31, 32, 34, 35, 41, 43, 45, 46, 48, 50, 53], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 2], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 7, "universal_type": "function", "name": "unknown", "text_snippet": "^PoporFFmpegFinishBlock)(BOOL finished, NSString * info);"}, {"node_id": 24, "universal_type": "function", "name": "unknown", "text_snippet": "oporFFmpeg : NSObject\n\n@property (nonatomic, copy ) "}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// PoporFFmpeg.h\n// PoporFFmpeg\n//\n// Created by apple on 2019/2/14.\n// Copyright \u00a9 2019 popor. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\ntypedef void(^PoporFFmpegFinishBlock)(BOOL finished, NSString * info); // __BlockTypedef\n\n@interface PoporFFmpeg : NSObject\n\n@property (nonatomic, copy ) PoporFFmpegFinishBlock finishBlock;\n\n- (void)compressCmd:(NSString *)cmd finish:(PoporFFmpegFinishBlock)finishBlock;\n\n@end\n"}
80,998
c
// // KSYGPUPipBlendFilter.h // GPUImage // // Created by pengbin on 16/8/26. // Copyright © 2016年 ksyun. All rights reserved. #import <GPUImage/GPUImage.h> /** 图像混合filter * 将多个图层的内容进行叠加 * 每个图层有index, [0~n] * 叠加顺序为0在最下层, index 越大在更上层 * 可以每个图层分别指定位置和大小 * 可以每个图层分别制定透明度 * 可以动态交换图层 * 可以动态刷新图层内容(支持视频) * 输出的刷新率 与 masterLayer 保持一致 */ @interface KSYGPUPicMixer : GPUImageFilter { }; /** @abstract 初始化 @discussion 输出大小等于主要图层的大小 */ - (id)init; /** @abstract 初始化,并制定输出图像的大小 @param sz 输出图像的大小 */ - (id)initWithOutputSize:(CGSize)sz; /** @abstract 设置主要图层 (默认为0) @discussion 主要图层一般为视频图层, 当主要图层的输入刷新时, 输出才刷新 */ @property (nonatomic, assign) NSUInteger masterLayer; /** @abstract 设置图层的位置和大小 (单位为: 像素值 或者百分比) @param rect 大小和位置 @param idx 图层的索引 @discussion 缩放变形到对应的位置, 数值有如下两种表示方式 - 像素值:rect中宽度或高度的值必须大于1.0, 则认为是像素值 - 百分比:rect中宽度或高度的值必须小于等于1.0, 则认为是对应输出图像大小的百分比 @discussion 保持宽高比的设置方法 - 宽为0, 则按照高度和输入图像的宽高比计算出宽度 - 高为0, 则按照宽度和输入图像的宽高比计算出高度 @discussion 左上角的位置如果为非负值,则和宽高一样;如果为负数, 则自动居中放置 */ -(void)setPicRect: (CGRect) rect ofLayer: (NSInteger) idx; /** @abstract 获取图层的位置和大小 (单位为: 像素值 或者百分比) @param idx 图层的索引 @return 位置和大小 */ -(CGRect) getPicRectOfLayer:(NSInteger) idx; /** @abstract 设置图层的透明度 (默认为1.0) @param alpha 透明度(0~1.0), 0为全透明 @param idx 图层的索引 */ -(void)setPicAlpha: (CGFloat) alpha ofLayer: (NSInteger) idx; /** @abstract 获取图层的透明度 @param idx 图层的索引 @return 透明度 */ -(CGFloat) getPicAlphaOfLayer:(NSInteger) idx; /** @abstract 设置图层的旋转 (默认为norotation) @param rotation 透明度(0~1.0), 0为全透明 @param idx 图层的索引 @discussion 可用于设置镜像 (kGPUImageFlipHorizonal) */ -(void)setPicRotation: (GPUImageRotationMode) rotation ofLayer: (NSInteger) idx; /** @abstract 获取图层的旋转模式 @param idx 图层的索引 @return 旋转模式 */ -(GPUImageRotationMode) getPicRotationOfLayer:(NSInteger) idx; /** @abstract 清除特定图层的画面内容 @param index 指定被清除的图层 @discussion 比如切换不同的视频内容时,避免出现黑色背景 */ -(void)clearPicOfLayer:(NSInteger) index; @end
22.29
89
(translation_unit) "//\n// KSYGPUPipBlendFilter.h\n// GPUImage\n//\n// Created by pengbin on 16/8/26.\n// Copyright © 2016年 ksyun. All rights reserved.\n#import <GPUImage/GPUImage.h>\n/** 图像混合filter\n \n * 将多个图层的内容进行叠加\n * 每个图层有index, [0~n]\n * 叠加顺序为0在最下层, index 越大在更上层\n * 可以每个图层分别指定位置和大小\n * 可以每个图层分别制定透明度\n * 可以动态交换图层\n * 可以动态刷新图层内容(支持视频)\n * 输出的刷新率 与 masterLayer 保持一致\n */\n@interface KSYGPUPicMixer : GPUImageFilter {\n};\n\n/**\n @abstract 初始化\n @discussion 输出大小等于主要图层的大小\n */\n- (id)init;\n\n/**\n @abstract 初始化,并制定输出图像的大小\n @param sz 输出图像的大小\n */\n- (id)initWithOutputSize:(CGSize)sz;\n\n/**\n @abstract 设置主要图层 (默认为0)\n @discussion 主要图层一般为视频图层, 当主要图层的输入刷新时, 输出才刷新\n */\n@property (nonatomic, assign) NSUInteger masterLayer;\n\n/**\n @abstract 设置图层的位置和大小 (单位为: 像素值 或者百分比)\n @param rect 大小和位置\n @param idx 图层的索引\n @discussion 缩放变形到对应的位置, 数值有如下两种表示方式\n - 像素值:rect中宽度或高度的值必须大于1.0, 则认为是像素值\n - 百分比:rect中宽度或高度的值必须小于等于1.0, 则认为是对应输出图像大小的百分比\n @discussion 保持宽高比的设置方法\n - 宽为0, 则按照高度和输入图像的宽高比计算出宽度\n - 高为0, 则按照宽度和输入图像的宽高比计算出高度\n @discussion 左上角的位置如果为非负值,则和宽高一样;如果为负数, 则自动居中放置\n */\n-(void)setPicRect: (CGRect) rect\n ofLayer: (NSInteger) idx;\n/**\n @abstract 获取图层的位置和大小 (单位为: 像素值 或者百分比)\n @param idx 图层的索引\n @return 位置和大小\n */\n-(CGRect) getPicRectOfLayer:(NSInteger) idx;\n\n/**\n @abstract 设置图层的透明度 (默认为1.0)\n @param alpha 透明度(0~1.0), 0为全透明\n @param idx 图层的索引\n */\n-(void)setPicAlpha: (CGFloat) alpha\n ofLayer: (NSInteger) idx;\n/**\n @abstract 获取图层的透明度\n @param idx 图层的索引\n @return 透明度\n */\n-(CGFloat) getPicAlphaOfLayer:(NSInteger) idx;\n\n/**\n @abstract 设置图层的旋转 (默认为norotation)\n @param rotation 透明度(0~1.0), 0为全透明\n @param idx 图层的索引\n @discussion 可用于设置镜像 (kGPUImageFlipHorizonal)\n */\n-(void)setPicRotation: (GPUImageRotationMode) rotation\n ofLayer: (NSInteger) idx;\n/**\n @abstract 获取图层的旋转模式\n @param idx 图层的索引\n @return 旋转模式\n */\n-(GPUImageRotationMode) getPicRotationOfLayer:(NSInteger) idx;\n\n/**\n @abstract 清除特定图层的画面内容\n @param index 指定被清除的图层\n @discussion 比如切换不同的视频内容时,避免出现黑色背景\n */\n-(void)clearPicOfLayer:(NSInteger) index;\n\n@end\n" (comment) "//" (comment) "// KSYGPUPipBlendFilter.h" (comment) "// GPUImage" (comment) "//" (comment) "// Created by pengbin on 16/8/26." (comment) "// Copyright © 2016年 ksyun. All rights reserved.\n#i" (preproc_call) "port <GPUImage/GPUImage.h>\n/**" (preproc_directive) "port <G" (preproc_arg) "UImage/GPUImage.h>\n/*" (comment) " 图像混合filter\n \n * 将多个图层的内容进行叠加\n * 每个图层有index, [0~n]\n * 叠加顺序为0在最下层, index 越大在更上层\n * 可以每个图层分别指定位置和大小\n * 可以每个图层分别制定透明度\n * 可以动态交换图层\n * 可以动态刷新图层内容(支持视频)\n * 输出的刷新率 与 masterLayer 保持一致\n */\n@interface KSYGPUPicMixer : GPUImageFilter {\n};\n\n/**\n @abstract 初始化\n @discussion 输出大小等于主要图层的大小\n */\n- (id)init;\n\n/**\n @abstract 初始化,并制定输出图像的大小\n @param sz 输出图像的大小\n */\n- (id)initWithOutputSi" (ERROR) "e" (ERROR) "e" (function_definition) ":(CGSize)sz;\n\n/**\n @abstract 设置主要图层 (默认为0)\n" (type_identifier) ":(CGSize)" (identifier) "z;\n\n/**\n @abst" (ERROR) "act 设置主要图层 (默认" (:) "a" (identifier) "t 设置主要图层 (默认" (compound_statement) "0)\n" ({) "0" (}) "\n" (expression_statement) " " (;) " " (comment) "iscussion 主要图层一般为视频图层, 当主要图层的输入刷新时, 输出才刷新\n */\n@property (nonatomic, assign) NSUInte" (expression_statement) "er masterLa" (unary_expression) "er masterL" (-) "e" (cast_expression) " masterL" (() " " (type_descriptor) "ma" (type_identifier) "ma" ()) "s" (identifier) "terL" (;) "a" (comment) "r;\n\n/**\n @abstract 设置图层的位置和大小 (单位为: 像素值 或者百分比)\n @param rect 大小和位置\n @param idx 图层的索引\n @d" (expression_statement) "scussion 缩放变形到对应的位置, 数值有如下两种表示方式\n -" (unary_expression) "scussion 缩放变形到对应的位置, 数值有" (-) "s" (cast_expression) "ussion 缩放变形到对应的位置, 数值有" (() "u" (type_descriptor) "ss" (type_identifier) "ss" ()) "i" (identifier) "on 缩放变形到对应的位置, 数值有" (ERROR) "如下两种表示方式\n " (:) "如" (() "下" (identifier) "两种表示方式" ()) "\n" (identifier) " " (;) "-" (comment) "素值:rect中宽度或高度的值必须大于1.0, 则认为是像素值\n - 百分比:rect中宽度或高度的值必须小于等于1.0, 则认为是对应输出图像大小的百分比\n @discussion 保持宽高比的设置方法\n - 宽为0, 则按照高度和输入图像的宽高比计算出宽度\n - 高为0, 则按照宽度和输入图" (ERROR) "的宽高比计算出高度\n @discussion 左上角的位置如果为非负值,则和宽高" (ERROR) "的" (call_expression) "宽高比计算出高度\n @discussion 左上角的位置" (identifier) "宽高比计算出高度" (argument_list) " @discussion 左上角的位置" (() " " (identifier) "@discussi" (,) "o" (identifier) " 左上角的位" ()) "置" (identifier) "果为非负值,则和宽高" (expression_statement) "样;如果为负数, 则自动" (identifier) "样;如果为负数, 则自" (;) "动" (comment) "放置\n */\n-(void)setPicRect: (CGRect) rect\n ofLayer: (NSInteger) idx;\n/**\n @abstract 获取图层的位置和大小 (单位为: 像素值 或者百分比)\n @param idx 图层的索引\n @return 位置和大小\n */\n-(CGRect) getPicRectOfLayer:(NSInteger) idx;\n\n/**\n @abstract 设置图层的透明度 (默认为1.0)\n @param alpha 透明度(0~1.0), 0为全透明\n @param idx 图层的索引\n */\n-(void)setPicAlpha: (CGFloat) alpha\n ofLayer: (NSInteger) idx;\n/**\n @abstract 获取图层的透明度\n @param idx 图层的索引\n @return 透明度\n */\n-(CGFloat) getPicAlphaOfLayer:(NSInteger) idx;\n\n/**\n @abstract 设置图层的旋转 (默认为norotation)\n @param rotation 透明度(0~1.0), 0为全透明\n @param idx 图层的索引\n @discussion 可用于设置镜像 (kGPUImageFlipHorizonal)\n */\n-(void)setPicRotation: (GPUImageRotationMode) rotation\n " (ERROR) "ofLayer: (NSInteger) idx;\n/**\n @" (call_expression) "ofLayer: (NSInteger) idx;\n/" (unary_expression) "ofLayer: (NSInteg" (-) "o" (cast_expression) "fLayer: (NSInteg" (() "f" (type_descriptor) "Laye" (primitive_type) "Laye" ()) "r" (identifier) ": (NSInteg" (ERROR) "e" (:) "e" (argument_list) ") idx;\n/" (() ")" (identifier) " idx;\n" ()) "/" (identifier) "*\n @" (labeled_statement) "获取图层的旋转模式\n @param id" (statement_identifier) "获取图层的旋转" (:) "模" (expression_statement) "\n @param id" (cast_expression) "\n @param i" (() "\n" (type_descriptor) " @param " (type_identifier) " @param " ()) " " (identifier) " i" (;) "d" (comment) " 图层的索引\n @return 旋转模式\n */\n-(GPUImageRotationMode) getPicRotationOfLayer:(NSInteger) idx;\n\n/**\n @abstract 清除特定图层的画面内容\n @param index 指定被清除的图层\n @" (expression_statement) "iscussion 比如切换不同的视频内容时,避免出现黑色背景\n */\n-(void)c" (unary_expression) "iscussion 比如切换不同的视频内容时,避免出现" (-) "i" (cast_expression) "scussion 比如切换不同的视频内容时,避免出现" (() "s" (type_descriptor) "cussio" (type_identifier) "cussio" ()) "n" (identifier) "比如切换不同的视频内容时,避免出现" (ERROR) "黑色背景\n */\n-(void)" (:) "黑" (() "色" (identifier) "背景\n */\n-(" ()) "v" (identifier) "id)" (;) "c" (comment) "arPicOfLayer:(NSInteger) index;\n\n@end\n" (ERROR) "" (call_expression) "" (unary_expression) "" (-) "" (cast_expression) "" (() "" (type_descriptor) "" (primitive_type) "" ()) "" (identifier) "" (ERROR) "" (:) "" (argument_list) "" (() "" (identifier) "" ()) "" (identifier) "" (labeled_statement) "" (statement_identifier) "" (:) "" (expression_statement) "" (cast_expression) "" (() "" (type_descriptor) "" (type_identifier) "" ()) "" (identifier) "" (;) "" (comment) "" (expression_statement) "" (unary_expression) "" (-) "" (cast_expression) "" (() "" (type_descriptor) "" (type_identifier) "" ()) "" (identifier) "" (ERROR) "" (:) "" (() "" (identifier) "" ()) "" (identifier) "" (;) "" (comment) "" (ERROR) "" (call_expression) "" (unary_expression) "" (-) "" (cast_expression) "" (() "" (type_descriptor) "" (primitive_type) "" ()) "" (identifier) "" (ERROR) "" (:) "" (argument_list) "" (() "" (identifier) "" ()) "" (identifier) "" (labeled_statement) "" (statement_identifier) "" (:) "" (expression_statement) "" (cast_expression) "" (() "" (type_descriptor) "" (type_identifier) "" ()) "" (identifier) "" (;) "" (comment) "" (expression_statement) "" (unary_expression) "" (-) "" (cast_expression) "" (() "" (type_descriptor) "" (type_identifier) "" ()) "" (identifier) "" (ERROR) "" (:) "" (() "" (identifier) "" ()) "" (identifier) "" (;) "" (comment) "" (expression_statement) "" (unary_expression) "" (-) "" (cast_expression) "" (() "" (type_descriptor) "" (primitive_type) "" ()) "" (identifier) "" (ERROR) "" (:) "" (() "" (identifier) "" ()) "" (identifier) "" (;) "" (ERROR) "" (ERROR) "" (expression_statement) "" (identifier) "" (;) ""
227
18
{"language": "c", "success": true, "metadata": {"lines": 89, "avg_line_length": 22.29, "nodes": 127, "errors": 0, "source_hash": "bde12747866b51d5d2c01686ffb9d8331c596c361d9141b7b4e5f931d54ce31e", "categorized_nodes": 75}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port <GPUImage/GPUImage.h>\n/**", "parent": null, "children": [1, 2], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "port <G", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "UImage/GPUImage.h>\n/*", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 29}}, {"id": 3, "type": "ERROR", "text": "e", "parent": null, "children": [4], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 4, "type": "ERROR", "text": "e", "parent": 3, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 5, "type": "function_definition", "text": ":(CGSize)sz;\n\n/**\n @abstract \u8bbe\u7f6e\u4e3b\u8981\u56fe\u5c42 (\u9ed8\u8ba4\u4e3a0)\n", "parent": null, "children": [6, 7, 8], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 19, "column": 1}}, {"id": 6, "type": "type_identifier", "text": ":(CGSize)", "parent": 5, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 10}}, {"id": 7, "type": "identifier", "text": "z;\n\n/**\n @abst", "parent": 5, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 25}}, {"id": 8, "type": "ERROR", "text": "act \u8bbe\u7f6e\u4e3b\u8981\u56fe\u5c42 (\u9ed8\u8ba4", "parent": 5, "children": [9], "start_point": {"row": 18, "column": 26}, "end_point": {"row": 18, "column": 42}}, {"id": 9, "type": "identifier", "text": "t \u8bbe\u7f6e\u4e3b\u8981\u56fe\u5c42 (\u9ed8\u8ba4", "parent": 8, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 42}}, {"id": 10, "type": "unary_expression", "text": "er masterL", "parent": null, "children": [11, 12], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 10}}, {"id": 11, "type": "-", "text": "e", "parent": 10, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 12, "type": "cast_expression", "text": " masterL", "parent": 10, "children": [13, 15], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 10}}, {"id": 13, "type": "type_descriptor", "text": "ma", "parent": 12, "children": [14], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 5}}, {"id": 14, "type": "type_identifier", "text": "ma", "parent": 13, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 5}}, {"id": 15, "type": "identifier", "text": "terL", "parent": 12, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 10}}, {"id": 16, "type": "unary_expression", "text": "scussion \u7f29\u653e\u53d8\u5f62\u5230\u5bf9\u5e94\u7684\u4f4d\u7f6e, \u6570\u503c\u6709", "parent": null, "children": [17, 18], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 24}}, {"id": 17, "type": "-", "text": "s", "parent": 16, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 18, "type": "cast_expression", "text": "ussion \u7f29\u653e\u53d8\u5f62\u5230\u5bf9\u5e94\u7684\u4f4d\u7f6e, \u6570\u503c\u6709", "parent": 16, "children": [19, 21], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 24}}, {"id": 19, "type": "type_descriptor", "text": "ss", "parent": 18, "children": [20], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 5}}, {"id": 20, "type": "type_identifier", "text": "ss", "parent": 19, "children": [], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 5}}, {"id": 21, "type": "identifier", "text": "on \u7f29\u653e\u53d8\u5f62\u5230\u5bf9\u5e94\u7684\u4f4d\u7f6e, \u6570\u503c\u6709", "parent": 18, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 24}}, {"id": 22, "type": "ERROR", "text": "\u5982\u4e0b\u4e24\u79cd\u8868\u793a\u65b9\u5f0f\n ", "parent": null, "children": [23, 24], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 35}}, {"id": 23, "type": "identifier", "text": "\u4e24\u79cd\u8868\u793a\u65b9\u5f0f", "parent": 22, "children": [], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 32}}, {"id": 24, "type": "identifier", "text": " ", "parent": 22, "children": [], "start_point": {"row": 31, "column": 33}, "end_point": {"row": 31, "column": 35}}, {"id": 25, "type": "ERROR", "text": "\u7684\u5bbd\u9ad8\u6bd4\u8ba1\u7b97\u51fa\u9ad8\u5ea6\n @discussion \u5de6\u4e0a\u89d2\u7684\u4f4d\u7f6e\u5982\u679c\u4e3a\u975e\u8d1f\u503c,\u5219\u548c\u5bbd\u9ad8", "parent": null, "children": [26, 27, 32], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 40}}, {"id": 26, "type": "ERROR", "text": "\u7684", "parent": 25, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 27, "type": "call_expression", "text": "\u5bbd\u9ad8\u6bd4\u8ba1\u7b97\u51fa\u9ad8\u5ea6\n @discussion \u5de6\u4e0a\u89d2\u7684\u4f4d\u7f6e", "parent": 25, "children": [28, 29], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 29}}, {"id": 28, "type": "identifier", "text": "\u5bbd\u9ad8\u6bd4\u8ba1\u7b97\u51fa\u9ad8\u5ea6", "parent": 27, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 9}}, {"id": 29, "type": "argument_list", "text": " @discussion \u5de6\u4e0a\u89d2\u7684\u4f4d\u7f6e", "parent": 27, "children": [30, 31], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 29}}, {"id": 30, "type": "identifier", "text": "@discussi", "parent": 29, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 20}}, {"id": 31, "type": "identifier", "text": " \u5de6\u4e0a\u89d2\u7684\u4f4d", "parent": 29, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 28}}, {"id": 32, "type": "identifier", "text": "\u679c\u4e3a\u975e\u8d1f\u503c,\u5219\u548c\u5bbd\u9ad8", "parent": 25, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 40}}, {"id": 33, "type": "identifier", "text": "\u6837;\u5982\u679c\u4e3a\u8d1f\u6570, \u5219\u81ea", "parent": null, "children": [], "start_point": {"row": 37, "column": 41}, "end_point": {"row": 37, "column": 52}}, {"id": 34, "type": "ERROR", "text": "ofLayer: (NSInteger) idx;\n/**\n @", "parent": null, "children": [35, 45], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 32}}, {"id": 35, "type": "call_expression", "text": "ofLayer: (NSInteger) idx;\n/", "parent": 34, "children": [36, 42, 43], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 27}}, {"id": 36, "type": "unary_expression", "text": "ofLayer: (NSInteg", "parent": 35, "children": [37, 38], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 17}}, {"id": 37, "type": "-", "text": "o", "parent": 36, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 38, "type": "cast_expression", "text": "fLayer: (NSInteg", "parent": 36, "children": [39, 41], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 17}}, {"id": 39, "type": "type_descriptor", "text": "Laye", "parent": 38, "children": [40], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 6}}, {"id": 40, "type": "primitive_type", "text": "Laye", "parent": 39, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 6}}, {"id": 41, "type": "identifier", "text": ": (NSInteg", "parent": 38, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 17}}, {"id": 42, "type": "ERROR", "text": "e", "parent": 35, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 18}}, {"id": 43, "type": "argument_list", "text": ") idx;\n/", "parent": 35, "children": [44], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 27}}, {"id": 44, "type": "identifier", "text": " idx;\n", "parent": 43, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 26}}, {"id": 45, "type": "identifier", "text": "*\n @", "parent": 34, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 32}}, {"id": 46, "type": "labeled_statement", "text": "\u83b7\u53d6\u56fe\u5c42\u7684\u65cb\u8f6c\u6a21\u5f0f\n @param id", "parent": null, "children": [47], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 35}}, {"id": 47, "type": "statement_identifier", "text": "\u83b7\u53d6\u56fe\u5c42\u7684\u65cb\u8f6c", "parent": 46, "children": [], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 17}}, {"id": 48, "type": "cast_expression", "text": "\n @param i", "parent": 46, "children": [49, 51], "start_point": {"row": 52, "column": 19}, "end_point": {"row": 52, "column": 34}}, {"id": 49, "type": "type_descriptor", "text": " @param ", "parent": 48, "children": [50], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 29}}, {"id": 50, "type": "type_identifier", "text": " @param ", "parent": 49, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 29}}, {"id": 51, "type": "identifier", "text": " i", "parent": 48, "children": [], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 34}}, {"id": 52, "type": "unary_expression", "text": "iscussion \u6bd4\u5982\u5207\u6362\u4e0d\u540c\u7684\u89c6\u9891\u5185\u5bb9\u65f6\uff0c\u907f\u514d\u51fa\u73b0", "parent": null, "children": [53, 54], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 27}}, {"id": 53, "type": "-", "text": "i", "parent": 52, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 1}}, {"id": 54, "type": "cast_expression", "text": "scussion \u6bd4\u5982\u5207\u6362\u4e0d\u540c\u7684\u89c6\u9891\u5185\u5bb9\u65f6\uff0c\u907f\u514d\u51fa\u73b0", "parent": 52, "children": [55, 57], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 27}}, {"id": 55, "type": "type_descriptor", "text": "cussio", "parent": 54, "children": [56], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 8}}, {"id": 56, "type": "type_identifier", "text": "cussio", "parent": 55, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 8}}, {"id": 57, "type": "identifier", "text": "\u6bd4\u5982\u5207\u6362\u4e0d\u540c\u7684\u89c6\u9891\u5185\u5bb9\u65f6\uff0c\u907f\u514d\u51fa\u73b0", "parent": 54, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 27}}, {"id": 58, "type": "ERROR", "text": "\u9ed1\u8272\u80cc\u666f\n */\n-(void)", "parent": null, "children": [59, 60], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 43}}, {"id": 59, "type": "identifier", "text": "\u80cc\u666f\n */\n-(", "parent": 58, "children": [], "start_point": {"row": 58, "column": 29}, "end_point": {"row": 58, "column": 38}}, {"id": 60, "type": "identifier", "text": "id)", "parent": 58, "children": [], "start_point": {"row": 58, "column": 40}, "end_point": {"row": 58, "column": 43}}, {"id": 61, "type": "ERROR", "text": "", "parent": null, "children": [62, 72], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 35}}, {"id": 62, "type": "call_expression", "text": "", "parent": 61, "children": [63, 69, 70], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 29}}, {"id": 63, "type": "unary_expression", "text": "", "parent": 62, "children": [64, 65], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 18}}, {"id": 64, "type": "-", "text": "", "parent": 63, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 65, "type": "cast_expression", "text": "", "parent": 63, "children": [66, 68], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 18}}, {"id": 66, "type": "type_descriptor", "text": "", "parent": 65, "children": [67], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 6}}, {"id": 67, "type": "primitive_type", "text": "", "parent": 66, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 6}}, {"id": 68, "type": "identifier", "text": "", "parent": 65, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 18}}, {"id": 69, "type": "ERROR", "text": "", "parent": 62, "children": [], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 19}}, {"id": 70, "type": "argument_list", "text": "", "parent": 62, "children": [71], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 29}}, {"id": 71, "type": "identifier", "text": "", "parent": 70, "children": [], "start_point": {"row": 65, "column": 21}, "end_point": {"row": 65, "column": 28}}, {"id": 72, "type": "identifier", "text": "", "parent": 61, "children": [], "start_point": {"row": 65, "column": 30}, "end_point": {"row": 65, "column": 35}}, {"id": 73, "type": "labeled_statement", "text": "", "parent": null, "children": [74], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 36}}, {"id": 74, "type": "statement_identifier", "text": "", "parent": 73, "children": [], "start_point": {"row": 66, "column": 11}, "end_point": {"row": 66, "column": 18}}, {"id": 75, "type": "cast_expression", "text": "", "parent": 73, "children": [76, 78], "start_point": {"row": 66, "column": 20}, "end_point": {"row": 66, "column": 35}}, {"id": 76, "type": "type_descriptor", "text": "", "parent": 75, "children": [77], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 30}}, {"id": 77, "type": "type_identifier", "text": "", "parent": 76, "children": [], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 30}}, {"id": 78, "type": "identifier", "text": "", "parent": 75, "children": [], "start_point": {"row": 66, "column": 32}, "end_point": {"row": 66, "column": 35}}, {"id": 79, "type": "unary_expression", "text": "", "parent": null, "children": [80, 81], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 29}}, {"id": 80, "type": "-", "text": "", "parent": 79, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 1}}, {"id": 81, "type": "cast_expression", "text": "", "parent": 79, "children": [82, 84], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 29}}, {"id": 82, "type": "type_descriptor", "text": "", "parent": 81, "children": [83], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 9}}, {"id": 83, "type": "type_identifier", "text": "", "parent": 82, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 9}}, {"id": 84, "type": "identifier", "text": "", "parent": 81, "children": [], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 29}}, {"id": 85, "type": "ERROR", "text": "", "parent": null, "children": [86, 87], "start_point": {"row": 72, "column": 29}, "end_point": {"row": 72, "column": 45}}, {"id": 86, "type": "identifier", "text": "", "parent": 85, "children": [], "start_point": {"row": 72, "column": 31}, "end_point": {"row": 72, "column": 40}}, {"id": 87, "type": "identifier", "text": "", "parent": 85, "children": [], "start_point": {"row": 72, "column": 42}, "end_point": {"row": 72, "column": 45}}, {"id": 88, "type": "ERROR", "text": "", "parent": null, "children": [89, 99], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 54}}, {"id": 89, "type": "call_expression", "text": "", "parent": 88, "children": [90, 96, 97], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 45}}, {"id": 90, "type": "unary_expression", "text": "", "parent": 89, "children": [91, 92], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 21}}, {"id": 91, "type": "-", "text": "", "parent": 90, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 1}}, {"id": 92, "type": "cast_expression", "text": "", "parent": 90, "children": [93, 95], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 21}}, {"id": 93, "type": "type_descriptor", "text": "", "parent": 92, "children": [94], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 6}}, {"id": 94, "type": "primitive_type", "text": "", "parent": 93, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 6}}, {"id": 95, "type": "identifier", "text": "", "parent": 92, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 21}}, {"id": 96, "type": "ERROR", "text": "", "parent": 89, "children": [], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 22}}, {"id": 97, "type": "argument_list", "text": "", "parent": 89, "children": [98], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 45}}, {"id": 98, "type": "identifier", "text": "", "parent": 97, "children": [], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 44}}, {"id": 99, "type": "identifier", "text": "", "parent": 88, "children": [], "start_point": {"row": 80, "column": 46}, "end_point": {"row": 80, "column": 54}}, {"id": 100, "type": "labeled_statement", "text": "", "parent": null, "children": [101], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 39}}, {"id": 101, "type": "statement_identifier", "text": "", "parent": 100, "children": [], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 21}}, {"id": 102, "type": "cast_expression", "text": "", "parent": 100, "children": [103, 105], "start_point": {"row": 81, "column": 23}, "end_point": {"row": 81, "column": 38}}, {"id": 103, "type": "type_descriptor", "text": "", "parent": 102, "children": [104], "start_point": {"row": 81, "column": 24}, "end_point": {"row": 81, "column": 33}}, {"id": 104, "type": "type_identifier", "text": "", "parent": 103, "children": [], "start_point": {"row": 81, "column": 24}, "end_point": {"row": 81, "column": 33}}, {"id": 105, "type": "identifier", "text": "", "parent": 102, "children": [], "start_point": {"row": 81, "column": 35}, "end_point": {"row": 81, "column": 38}}, {"id": 106, "type": "unary_expression", "text": "", "parent": null, "children": [107, 108], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 45}}, {"id": 107, "type": "-", "text": "", "parent": 106, "children": [], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 1}}, {"id": 108, "type": "cast_expression", "text": "", "parent": 106, "children": [109, 111], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 45}}, {"id": 109, "type": "type_descriptor", "text": "", "parent": 108, "children": [110], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 22}}, {"id": 110, "type": "type_identifier", "text": "", "parent": 109, "children": [], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 22}}, {"id": 111, "type": "identifier", "text": "", "parent": 108, "children": [], "start_point": {"row": 87, "column": 24}, "end_point": {"row": 87, "column": 45}}, {"id": 112, "type": "ERROR", "text": "", "parent": null, "children": [113, 114], "start_point": {"row": 87, "column": 45}, "end_point": {"row": 87, "column": 61}}, {"id": 113, "type": "identifier", "text": "", "parent": 112, "children": [], "start_point": {"row": 87, "column": 47}, "end_point": {"row": 87, "column": 56}}, {"id": 114, "type": "identifier", "text": "", "parent": 112, "children": [], "start_point": {"row": 87, "column": 58}, "end_point": {"row": 87, "column": 61}}, {"id": 115, "type": "unary_expression", "text": "", "parent": null, "children": [116, 117], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 22}}, {"id": 116, "type": "-", "text": "", "parent": 115, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 1}}, {"id": 117, "type": "cast_expression", "text": "", "parent": 115, "children": [118, 120], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 22}}, {"id": 118, "type": "type_descriptor", "text": "", "parent": 117, "children": [119], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 6}}, {"id": 119, "type": "primitive_type", "text": "", "parent": 118, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 6}}, {"id": 120, "type": "identifier", "text": "", "parent": 117, "children": [], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 22}}, {"id": 121, "type": "ERROR", "text": "", "parent": null, "children": [122, 123], "start_point": {"row": 94, "column": 22}, "end_point": {"row": 94, "column": 40}}, {"id": 122, "type": "identifier", "text": "", "parent": 121, "children": [], "start_point": {"row": 94, "column": 24}, "end_point": {"row": 94, "column": 33}}, {"id": 123, "type": "identifier", "text": "", "parent": 121, "children": [], "start_point": {"row": 94, "column": 35}, "end_point": {"row": 94, "column": 40}}, {"id": 124, "type": "ERROR", "text": "", "parent": null, "children": [125], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 1}}, {"id": 125, "type": "ERROR", "text": "", "parent": 124, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 1}}, {"id": 126, "type": "identifier", "text": "", "parent": null, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 4}}]}, "node_categories": {"declarations": {"functions": [5], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 12, 16, 18, 27, 35, 36, 38, 48, 52, 54, 62, 63, 65, 75, 79, 81, 89, 90, 92, 102, 106, 108, 115, 117], "assignments": [], "loops": [], "conditionals": [6, 7, 9, 14, 15, 20, 21, 23, 24, 28, 30, 31, 32, 33, 41, 44, 45, 47, 50, 51, 56, 57, 59, 60, 68, 71, 72, 74, 77, 78, 83, 84, 86, 87, 95, 98, 99, 101, 104, 105, 110, 111, 113, 114, 120, 122, 123, 126], "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": "unknown", "text_snippet": ":(CGSize)sz;\n\n/**\n @abstract \u8bbe\u7f6e\u4e3b\u8981\u56fe\u5c42 (\u9ed8\u8ba4\u4e3a0)\n"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// KSYGPUPipBlendFilter.h\n// GPUImage\n//\n// Created by pengbin on 16/8/26.\n// Copyright \u00a9 2016\u5e74 ksyun. All rights reserved.\n#import <GPUImage/GPUImage.h>\n/** \u56fe\u50cf\u6df7\u5408filter\n \n * \u5c06\u591a\u4e2a\u56fe\u5c42\u7684\u5185\u5bb9\u8fdb\u884c\u53e0\u52a0\n * \u6bcf\u4e2a\u56fe\u5c42\u6709index, [0~n]\n * \u53e0\u52a0\u987a\u5e8f\u4e3a0\u5728\u6700\u4e0b\u5c42, index \u8d8a\u5927\u5728\u66f4\u4e0a\u5c42\n * \u53ef\u4ee5\u6bcf\u4e2a\u56fe\u5c42\u5206\u522b\u6307\u5b9a\u4f4d\u7f6e\u548c\u5927\u5c0f\n * \u53ef\u4ee5\u6bcf\u4e2a\u56fe\u5c42\u5206\u522b\u5236\u5b9a\u900f\u660e\u5ea6\n * \u53ef\u4ee5\u52a8\u6001\u4ea4\u6362\u56fe\u5c42\n * \u53ef\u4ee5\u52a8\u6001\u5237\u65b0\u56fe\u5c42\u5185\u5bb9(\u652f\u6301\u89c6\u9891)\n * \u8f93\u51fa\u7684\u5237\u65b0\u7387 \u4e0e masterLayer \u4fdd\u6301\u4e00\u81f4\n */\n@interface KSYGPUPicMixer : GPUImageFilter {\n};\n\n/**\n @abstract \u521d\u59cb\u5316\n @discussion \u8f93\u51fa\u5927\u5c0f\u7b49\u4e8e\u4e3b\u8981\u56fe\u5c42\u7684\u5927\u5c0f\n */\n- (id)init;\n\n/**\n @abstract \u521d\u59cb\u5316,\u5e76\u5236\u5b9a\u8f93\u51fa\u56fe\u50cf\u7684\u5927\u5c0f\n @param sz \u8f93\u51fa\u56fe\u50cf\u7684\u5927\u5c0f\n */\n- (id)initWithOutputSize:(CGSize)sz;\n\n/**\n @abstract \u8bbe\u7f6e\u4e3b\u8981\u56fe\u5c42 (\u9ed8\u8ba4\u4e3a0)\n @discussion \u4e3b\u8981\u56fe\u5c42\u4e00\u822c\u4e3a\u89c6\u9891\u56fe\u5c42, \u5f53\u4e3b\u8981\u56fe\u5c42\u7684\u8f93\u5165\u5237\u65b0\u65f6, \u8f93\u51fa\u624d\u5237\u65b0\n */\n@property (nonatomic, assign) NSUInteger masterLayer;\n\n/**\n @abstract \u8bbe\u7f6e\u56fe\u5c42\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f (\u5355\u4f4d\u4e3a: \u50cf\u7d20\u503c \u6216\u8005\u767e\u5206\u6bd4)\n @param rect \u5927\u5c0f\u548c\u4f4d\u7f6e\n @param idx \u56fe\u5c42\u7684\u7d22\u5f15\n @discussion \u7f29\u653e\u53d8\u5f62\u5230\u5bf9\u5e94\u7684\u4f4d\u7f6e, \u6570\u503c\u6709\u5982\u4e0b\u4e24\u79cd\u8868\u793a\u65b9\u5f0f\n - \u50cf\u7d20\u503c:rect\u4e2d\u5bbd\u5ea6\u6216\u9ad8\u5ea6\u7684\u503c\u5fc5\u987b\u5927\u4e8e1.0, \u5219\u8ba4\u4e3a\u662f\u50cf\u7d20\u503c\n - \u767e\u5206\u6bd4:rect\u4e2d\u5bbd\u5ea6\u6216\u9ad8\u5ea6\u7684\u503c\u5fc5\u987b\u5c0f\u4e8e\u7b49\u4e8e1.0, \u5219\u8ba4\u4e3a\u662f\u5bf9\u5e94\u8f93\u51fa\u56fe\u50cf\u5927\u5c0f\u7684\u767e\u5206\u6bd4\n @discussion \u4fdd\u6301\u5bbd\u9ad8\u6bd4\u7684\u8bbe\u7f6e\u65b9\u6cd5\n - \u5bbd\u4e3a0, \u5219\u6309\u7167\u9ad8\u5ea6\u548c\u8f93\u5165\u56fe\u50cf\u7684\u5bbd\u9ad8\u6bd4\u8ba1\u7b97\u51fa\u5bbd\u5ea6\n - \u9ad8\u4e3a0, \u5219\u6309\u7167\u5bbd\u5ea6\u548c\u8f93\u5165\u56fe\u50cf\u7684\u5bbd\u9ad8\u6bd4\u8ba1\u7b97\u51fa\u9ad8\u5ea6\n @discussion \u5de6\u4e0a\u89d2\u7684\u4f4d\u7f6e\u5982\u679c\u4e3a\u975e\u8d1f\u503c,\u5219\u548c\u5bbd\u9ad8\u4e00\u6837;\u5982\u679c\u4e3a\u8d1f\u6570, \u5219\u81ea\u52a8\u5c45\u4e2d\u653e\u7f6e\n */\n-(void)setPicRect: (CGRect) rect\n ofLayer: (NSInteger) idx;\n/**\n @abstract \u83b7\u53d6\u56fe\u5c42\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f (\u5355\u4f4d\u4e3a: \u50cf\u7d20\u503c \u6216\u8005\u767e\u5206\u6bd4)\n @param idx \u56fe\u5c42\u7684\u7d22\u5f15\n @return \u4f4d\u7f6e\u548c\u5927\u5c0f\n */\n-(CGRect) getPicRectOfLayer:(NSInteger) idx;\n\n/**\n @abstract \u8bbe\u7f6e\u56fe\u5c42\u7684\u900f\u660e\u5ea6 (\u9ed8\u8ba4\u4e3a1.0)\n @param alpha \u900f\u660e\u5ea6(0~1.0), 0\u4e3a\u5168\u900f\u660e\n @param idx \u56fe\u5c42\u7684\u7d22\u5f15\n */\n-(void)setPicAlpha: (CGFloat) alpha\n ofLayer: (NSInteger) idx;\n/**\n @abstract \u83b7\u53d6\u56fe\u5c42\u7684\u900f\u660e\u5ea6\n @param idx \u56fe\u5c42\u7684\u7d22\u5f15\n @return \u900f\u660e\u5ea6\n */\n-(CGFloat) getPicAlphaOfLayer:(NSInteger) idx;\n\n/**\n @abstract \u8bbe\u7f6e\u56fe\u5c42\u7684\u65cb\u8f6c (\u9ed8\u8ba4\u4e3anorotation)\n @param rotation \u900f\u660e\u5ea6(0~1.0), 0\u4e3a\u5168\u900f\u660e\n @param idx \u56fe\u5c42\u7684\u7d22\u5f15\n @discussion \u53ef\u7528\u4e8e\u8bbe\u7f6e\u955c\u50cf (kGPUImageFlipHorizonal)\n */\n-(void)setPicRotation: (GPUImageRotationMode) rotation\n ofLayer: (NSInteger) idx;\n/**\n @abstract \u83b7\u53d6\u56fe\u5c42\u7684\u65cb\u8f6c\u6a21\u5f0f\n @param idx \u56fe\u5c42\u7684\u7d22\u5f15\n @return \u65cb\u8f6c\u6a21\u5f0f\n */\n-(GPUImageRotationMode) getPicRotationOfLayer:(NSInteger) idx;\n\n/**\n @abstract \u6e05\u9664\u7279\u5b9a\u56fe\u5c42\u7684\u753b\u9762\u5185\u5bb9\n @param index \u6307\u5b9a\u88ab\u6e05\u9664\u7684\u56fe\u5c42\n @discussion \u6bd4\u5982\u5207\u6362\u4e0d\u540c\u7684\u89c6\u9891\u5185\u5bb9\u65f6\uff0c\u907f\u514d\u51fa\u73b0\u9ed1\u8272\u80cc\u666f\n */\n-(void)clearPicOfLayer:(NSInteger) index;\n\n@end\n"}
80,999